Data encoding and decoding method, device and equipment
By inserting K-codes of marker symbols into data blocks and utilizing indicator symbol types, the incompatibility problem of multiple encoding methods is solved, encoding compatibility and efficiency are improved, and the decoding process is simplified.
Patent Information
- Application Number
- CN202411360125.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2026-03-27
AI Technical Summary
When a device supports multiple encoding methods simultaneously, the incompatibility of these methods necessitates the setup of multiple sets of encoding logic circuits, leading to complexity and redundancy in implementation.
By inserting K-codes of marker symbols into data blocks and using marker indicators and symbol indicators to indicate the type of encoded symbols, redundant data is reduced and the compatibility of encoding methods is improved.
It achieves compatibility with different encoding methods and improves encoding efficiency, simplifies the decoding process, and reduces redundant data.
Smart Images

Figure CN121750151A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of interface communication, and in particular to a data encoding and decoding method, device and equipment. BACKGROUND
[0002] In the process of data transmission, the transmitted data block usually needs to be encoded. Among them, 8b / 10b encoding and 128b / 132b encoding are two common encoding methods. The 8b / 10b encoding is to encode 8 bits of data to obtain 10 bits of data, and the 128b / 132b encoding is to encode 128 bits of data to obtain 132 bits of data.
[0003] At present, in the case that a device supports multiple encoding methods, due to the incompatibility of different encoding methods, it is necessary to set multiple sets of encoding logic circuits corresponding to the multiple encoding methods in the device. For example, when a device supports 8b / 10b encoding and 128b / 132b encoding at the same time, two different sets of encoding logic circuits need to be set to realize 8b / 10b encoding and 128b / 132b encoding respectively. Therefore, how to improve the compatibility of different encoding methods is an urgent technical problem to be solved. SUMMARY
[0004] The present application provides a data encoding and decoding method, device and equipment, which is used to improve the compatibility of different encoding methods and improve the encoding efficiency.
[0005] To achieve the above purpose, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a data encoding method of a device interface is provided, which is applied to a first device. The first device can be one of a master device or a slave device. The method comprises: obtaining a first data block, the first data block comprising at least one marker symbol, each marker symbol in the at least one marker symbol comprising at least one K code, the at least one K code being consistent with a K code in 8b / 10b encoding; encoding the first data block to obtain a second data block, the second data block comprising at least one encoded marker symbol corresponding to the at least one marker symbol; wherein a first encoded marker symbol in the at least one encoded marker symbol comprises a marker indication and a symbol indication, the bit width of the marker indication being smaller than the bit width of the at least one K code, the marker indication being used to indicate the at least one K code in a first marker symbol corresponding to the first encoded marker symbol, and the symbol indication being used to indicate that a next symbol of the first encoded marker symbol is a second encoded marker symbol or an encoded data symbol, i.e. the symbol indication is used to indicate the type of the next symbol, or is used to indicate whether the next symbol is an encoded marker symbol; and transmitting the second data block.
[0007] In the technical solution, the marker in the first data block comprises at least one K code, the at least one K code is consistent with the K code in the 8b / 10b coding, and in the second data block obtained by coding the first data block, the at least one K code in the first marker is indicated by a marker indication in the first coding marker, the type of the next coding symbol is indicated by a symbol indication, and the bit width of the marker indication is smaller than the bit width of the at least one K code. In this way, when used in multiple coding modes, the multiple coding modes can all use K codes to mark data blocks or boundaries of data blocks with different functions, thereby improving the compatibility of the multiple coding modes, reducing the redundant data after coding, and improving the coding efficiency. For example, when used in the 128b / 132b coding mode, the compatibility of the 8b / 10b coding and the 128b / 132b coding can be improved.
[0008] In a possible implementation of the first aspect, the at least one K code in the first marker comprises a first K code and a second K code, the marker indication comprises a first marker indication and a second marker indication, the first marker indication is used to indicate the first K code, and the second marker indication is used to indicate the second K code. In the possible implementation, when the at least one K code comprises the first K code and the second K code, the first K code and the second K code can be coded respectively, thereby improving the coding flexibility of each K code.
[0009] In a possible implementation of the first aspect, the at least one K code in the first marker comprises a first K code, the first marker further comprises data, the marker indication is used to indicate the first K code, and the first coding marker further comprises coding data corresponding to the data. In the possible implementation, when the first marker comprises the first K code and the data, the first K code and the data can be coded respectively, thereby improving the coding flexibility of the first marker.
[0010] In a possible implementation of the first aspect, the first data block further comprises at least one data symbol, the second data block further comprises at least one coding data symbol corresponding to the at least one data symbol, and the at least one coding data symbol is located after the at least one coding marker. In the possible implementation, by setting the at least one coding data symbol to be located after the at least one coding marker, the difficulty of decoding the second data block can be simplified, and the decoding efficiency can be improved.
[0011] In a possible implementation of the first aspect, the first coding marker further comprises a position indication, and the position indication is used to indicate the position of the first marker in the first data block. In the possible implementation, by adding the position indication in the first coding marker, the position of the first marker corresponding to the first coding marker in the first data block can be quickly and accurately determined when the second data block is decoded, and the decoding efficiency can be improved.
[0012] In a possible implementation of the first aspect, the second data block further includes a block header, and the block header is used to indicate that the second data block is the marker data block. In the possible implementation, the second data block is determined to be the marker data block through the block header in the second data block, so that when the second data block is decoded, at least one encoded marker symbol in the second data block can be quickly and accurately decoded, thereby improving decoding efficiency.
[0013] In a second aspect, a data decoding method of an apparatus interface is provided, and the method is applied to a second apparatus. The second apparatus can be one of a slave device or a master device. The method includes the following steps: receiving a second data block, the second data block including at least one encoded marker symbol, a first encoded marker symbol in the at least one encoded marker symbol including a marker indication and a symbol indication, the marker indication being used to indicate at least one K code in a first marker symbol corresponding to the first encoded marker symbol, and the symbol indication being used to indicate that a next symbol of the first encoded marker symbol is a second encoded marker symbol or an encoded data symbol; and decoding the second data block according to the marker indication and the symbol indication to obtain a first data block, the first data block including at least one marker symbol corresponding to the at least one encoded marker symbol, each marker symbol in the at least one marker symbol including at least one K code.
[0014] In a possible implementation of the second aspect, the at least one K code in the first marker symbol includes a first K code and a second K code, and the marker indication includes a first marker indication and a second marker indication, the first marker indication being used to indicate the first K code, and the second marker indication being used to indicate the second K code.
[0015] In a possible implementation of the second aspect, the at least one K code in the first marker symbol includes a first K code, the first marker symbol further includes data, the marker indication is used to indicate the first K code, and the first encoded marker symbol further includes encoded data corresponding to the data.
[0016] In a possible implementation of the second aspect, the second data block further includes at least one encoded data symbol, the at least one encoded data symbol being located after the at least one encoded marker symbol, and the first data block further includes at least one data symbol corresponding to the at least one encoded data symbol.
[0017] In a possible implementation of the second aspect, the first encoded marker symbol further includes a position indication, the position indication being used to indicate a position of the first marker symbol in the first data block; and the decoding of the second data block to obtain the first data block according to the marker indication and the symbol indication includes: decoding the second data block to obtain the first data block according to the marker indication, the symbol indication, and the position indication.
[0018] In a possible implementation manner of the second aspect, the second data block further includes a block header, and the block header is used to indicate that the second data block is the marker data block.
[0019] In a third aspect, a data encoding apparatus is provided. The apparatus can implement the functions of the first apparatus in the method described above. The functions can be implemented by hardware, or by corresponding software executed by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
[0020] In a possible implementation manner of the third aspect, the apparatus includes a processing unit and a sending unit. The processing unit is configured to support the apparatus to perform the corresponding functions in the method described above. The sending unit is configured to support the apparatus to communicate with the second apparatus.
[0021] In another possible implementation manner of the third aspect, the apparatus includes a processing circuit and a transmitter. The processing circuit is configured to support the apparatus to perform the corresponding functions in the method described above. The transmitter is configured to support the apparatus to communicate with the second apparatus.
[0022] In a fourth aspect, a data decoding apparatus is provided. The apparatus can implement the functions of the second apparatus in the method described above. The functions can be implemented by hardware, or by corresponding software executed by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
[0023] In a possible implementation manner of the fourth aspect, the apparatus includes a receiving unit and a processing unit. The processing unit is configured to support the apparatus to perform the corresponding functions in the method described above. The receiving unit is configured to support the apparatus to communicate with the first apparatus.
[0024] In another possible implementation manner of the fourth aspect, the apparatus includes a processing circuit and a receiver. The processing circuit is configured to support the apparatus to perform the corresponding functions in the method described above. The receiver is configured to support the apparatus to communicate with the first apparatus.
[0025] In another aspect of the present application, an electronic device is provided. The electronic device includes a first apparatus and a second apparatus. The first apparatus is the data encoding apparatus provided in the third aspect or any possible implementation manner of the third aspect, and can be used to perform the method provided in the first aspect or any possible implementation manner of the first aspect. The second apparatus is the data decoding apparatus provided in the fourth aspect or any possible implementation manner of the fourth aspect, and can be used to perform the method provided in the second aspect or any possible implementation manner of the second aspect.
[0026] In a further aspect of the present application, a readable storage medium is provided, which stores a computer program or instructions, when the computer program or instructions are executed by a device, the device is caused to perform the method provided by the first aspect or any possible implementation of the first aspect.
[0027] In a further aspect of the present application, a readable storage medium is provided, which stores a computer program or instructions, when the computer program or instructions are executed by a device, the device is caused to perform the method provided by the second aspect or any possible implementation of the second aspect.
[0028] In a further aspect of the present application, a computer program product is provided, which includes a computer program (also can be referred to as code or instructions), when the computer program is executed by a device, the device is caused to perform the method provided by the first aspect or any possible implementation of the first aspect.
[0029] In a further aspect of the present application, a computer program product is provided, which includes a computer program (also can be referred to as code or instructions), when the computer program is executed by a device, the device is caused to perform the method provided by the second aspect or any possible implementation of the second aspect.
[0030] It can be understood that the beneficial effects of other aspects in addition to the first aspect and any possible implementation of the first aspect can be correspondingly referred to the beneficial effects of the above-mentioned first aspect and any possible implementation of the first aspect, which will not be described here. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 A structural schematic diagram of an electronic device provided by an embodiment of the present application is provided;
[0032] Figure 2 A schematic diagram of a device provided by an embodiment of the present application for implementing 8b / 10b encoding and 128b / 132b encoding is provided;
[0033] Figure 3 A schematic diagram of another device provided by an embodiment of the present application for implementing 8b / 10b encoding and 128b / 132b encoding is provided;
[0034] Figure 4 A flowchart of a data encoding method provided by an embodiment of the present application is provided;
[0035] Figure 5 A schematic diagram of a marker symbol and encoding the marker symbol provided by an embodiment of the present application is provided;
[0036] Figure 6Another schematic diagram of a mark symbol and a coding mark provided for an embodiment of the present application;
[0037] Figure 7 A schematic diagram of shifting a first data block provided for an embodiment of the present application;
[0038] Figure 8 A schematic diagram of a second data block provided for an embodiment of the present application;
[0039] Figure 9 A flowchart of a data decoding method provided for an embodiment of the present application;
[0040] Figure 10 A structural schematic diagram of a first device provided for an embodiment of the present application;
[0041] Figure 11 Another structural schematic diagram of a first device provided for an embodiment of the present application;
[0042] Figure 12 A structural schematic diagram of a second device provided for an embodiment of the present application;
[0043] Figure 13 Another structural schematic diagram of a second device provided for an embodiment of the present application. DETAILED DESCRIPTION
[0044] In this embodiment, each circuit, software or other component can be described as or referred to as "for" performing one or more tasks. In this case, "for" is used to imply structure or function by indicating that the circuit / software / component includes structure (e.g. circuitry) that performs the task(s) during operation. Thus, the circuit / software / component can be referred to as for performing the task(s) even when the specified circuit / software / component is not currently operational (e.g. not turned on).
[0045] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the present application, "at least one" means one or more, and "multiple" means two or more. The association relationship of the associated objects is described by "and / or", which means that there can be three kinds of relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b or c can represent a, b, c, a and b, a and c, b and c, a, b and c; where a, b and c can be single or multiple.
[0046] The terms "first" and "second" and the like in the description used in the specification are used for distinguishing between similar elements and not necessarily for describing a sequential or chronological order. The term "coupled" as used herein is used to indicate that two or more elements, for example, a first element and a second element, co-operate with one another to provide some implementation-dependent behavior. Accordingly, the term "coupled" should be understood in a broad sense as an indirect or direct electrical connection between two or more elements.
[0047] It should be noted that the terms "exemplary" and "for example" are used herein to mean "an example of." Any implementation or design scheme described as "exemplary" or "for example" in the specification is not necessarily to be construed as preferred or advantageous over other implementations or design schemes. In fact, a term "exemplary" or "for example" is used to present concepts in a concrete manner.
[0048] The technical solutions provided in the present application can be applied to an electronic device comprising a plurality of communication devices, which are also referred to as devices. Optionally, the devices can be components in the electronic device, chips applied to the components, or interface devices or modules in the chips, and two different devices can be connected to each other. In the present application, the plurality of devices can transmit signals through interface devices.
[0049] Optionally, when the device is a chip, the chip can further comprise an interface module, that is, the present application can be applied to an interface module for interconnection between chips. The interface module can be understood as an intellectual property (IP) module integrated in a chip. Alternatively, the interface module can also be sold as an IP module independently. For example, the chip can be a system on chip (SoC), a central processing unit (CPU), or a graphics processing unit (GPU), and the interface module can be an interface module in the SoC, the CPU, or the GPU. Optionally, the chip can also be a small chip such as a die, and the interface module can be a transmitting circuit and / or a receiving circuit in the die.
[0050] The structure of the electronic device is exemplarily described below by taking an example in which the electronic device comprises two devices.
[0051] Figure 1A structural schematic diagram of an electronic device is provided in embodiments of the present application. The electronic device includes a first device 101 and a second device 102 connected through an interface. For example, the first device 101 includes an interface A, and the second device 102 includes an interface B. The interface A and the interface B are connected through a cable. The first device 101 can output a signal to the second device 102 through the interface A, and the second device 102 can receive the signal from the first device 101 through the interface B. The cable can include a single-ended signal line or a differential signal line, and embodiments are not limited in this regard.
[0052] In a possible embodiment, the electronic device can include a master device and a slave device. The master device can also be referred to as a host or a master state machine, and the slave device can also be referred to as a slave or a slave state machine. In actual applications, the first device 101 can be the master device, and the second device 102 can be the slave device. Alternatively, the first device 101 can be the slave device, and the second device 102 can be the master device.
[0053] Optionally, the master device can be a processor or a SoC including a processor in the electronic device. For example, the processor can include a central processing unit (CPU), a neural-network processing unit (NPU), a graphics processing unit (GPU), an application processor, an application specific integrated circuit (ASIC), a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or the like. Optionally, the slave device can include a camera, a display, a memory, a sensor, an audio device, or the like. For example, the memory can include a random access memory (RAM), a read-only memory (ROM), a flash, a disk, or the like. For example, the audio device can include a speaker, a microphone, a loudspeaker, or the like.
[0054] Optionally, the interface A and the interface B can include, but are not limited to, a peripheral component interconnect express (PCIe) interface, a small computer system interface (SCSI), a serial attached SCSI (SAS) interface, a universal serial bus (USB) interface, a Mobile Industry Processor Interface (MIPI), a high definition multimedia interface (HDMI), a mini HDMI, a micro HDMI, a display port (DP), a unified multimedia interconnection (UMMI) interface, a unified media interconnection (UMI) interface, a type-A (type-A) interface, a type-B (type-B) interface, a type-C (type-C) interface, or a private interface, and the like.
[0055] It can be understood that the above-mentioned interfaces with different interface specifications are only exemplary, and in actual application, the interface specifications can also include other or any future interface specifications, and the embodiments of the present application do not make specific limitations thereto.
[0056] In the present application, the electronic device can include, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device (MID), a camera, a wearable device (for example, a smart watch, a smart bracelet, a pedometer, etc.), a sound equipment, an audio and video player, a set-top box, a game console, a printer, a mouse, a keyboard, a vehicle-mounted device (for example, a device on a vehicle such as a car, a bicycle, an electric vehicle, an airplane, a ship, a train, and a high-speed rail), a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a smart home device (for example, a refrigerator, a television, an air conditioner, an electricity meter, etc.), a smart robot, a plant device, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, or a wireless terminal in a smart home, a flight device (for example, a smart robot, a hot air balloon, a drone, an airplane), and the like.
[0057] In the above electronic device, in the process of data transmission between two devices through an interface, the transmitted data block usually needs to be encoded. Among them, 8b / 10b encoding and 128b / 132b encoding are two common encoding methods. The 8b / 10b encoding is to encode 8 bits of data to obtain 10 bits of data, and the 128b / 132b encoding is to encode 128 bits of data to obtain 132 bits of data.
[0058] In the application process, different encoding methods usually use different symbol patterns for encoding. For example, for 8b / 10b encoding, K code is usually used for encoding; and for 128 / 132 encoding, a special symbol pattern is usually used for encoding. In an implementation mode, in the case of supporting multiple encoding methods in a device, due to the incompatibility of different encoding methods, multiple sets of encoding logic circuits corresponding to the multiple encoding methods need to be set in the device. For example, the 8b / 10b encoding logic circuit and the 128b / 132b encoding logic circuit are set in the device. Figure 2As shown in the figure, taking an example of a device supporting 8b / 10b encoding and 128b / 132b encoding simultaneously, the device needs to encode the original data through two different encoding logic circuits, i.e. for 8b / 10b encoding, a set of encoding logic circuits is needed to insert K codes into the original data and perform 8b / 10b encoding, and for 128b / 132b encoding, another set of encoding logic circuits is needed to insert related symbols into the original data and perform 128b / 132b encoding, the related symbols being different from the K codes. In this implementation, the K codes used by 8b / 10b encoding are incompatible with the related symbols used by 128b / 132b encoding, and two different encoding logic circuits are needed, thus there are problems of high cost and difficulty in design and implementation in circuit implementation.
[0059] Based on this, the embodiment of the present application provides a data encoding method, the data block in the method includes K codes in 8b / 10b encoding, and the K codes are reconstructed in the encoding process, so as to improve the compatibility of 8b / 10b encoding and 128b / 132b encoding when used for 128b / 132b encoding, and also to reduce the redundant data after encoding and improve the encoding efficiency. In the embodiment of the present application, as shown in the figure, taking an example of a device supporting 8b / 10b encoding and 128b / 132b encoding simultaneously, the device can insert K codes through the same circuit in the process of 8b / 10b encoding and 128b / 132b encoding, and then encode through different circuits, i.e. the functional circuit for inserting K codes can be shared, so as to improve the compatibility of the two encoding modes. The technical solutions of the embodiment of the present application will be described in detail below. Figure 3
[0060] Figure 4 A flowchart of a data encoding method provided by the embodiment of the present application is shown in the figure, the method can be applied to an electronic device including a first device and a second device, and can be executed by the first device, the first device being one of a master device or a slave device, and the second device being the other of the master device or the slave device, the method including the following steps.
[0061] S201: The first device acquires a first data block, the first data block including at least one marker symbol, each marker symbol in the at least one marker symbol including at least one K code.
[0062] The data block in the embodiments of the present application can also be referred to as a block, and the data has no special meaning or is referred to as unspecified. The first data block can be a data block containing a marker symbol, and the type of the first data block can be referred to as a marker data block. In actual applications, the type of a data block that does not contain a marker symbol can be referred to as a service data block, that is, the service data block only includes a data symbol, and the data symbol only contains service data. The service data in the embodiments of the present application can be translated as data, which can be image data, sensor data, or audio data, and the like.
[0063] In addition, the marker symbol in the embodiments of the present application can be a symbol containing a K code. The marker symbol can only include a K code, or can include a K code and service data at the same time. The type of the marker symbol including only a K code can be referred to as type 1 (type 1), and the type of the marker symbol including a K code and service data at the same time can be referred to as type 2 (type 2). The K code or combination of K codes can be used to mark data blocks or data packets of different functions, and can also be used to mark the boundaries of data blocks or data packets, such as marking the start of a data block or the packet header of a data packet.
[0064] Optionally, the length of each data block can be 16 bytes, and the length of each symbol can be 2 bytes, that is, each data block can include 8 symbols. For example, the length of the first data block is 16 bytes, that is, the first data block includes 8 symbols, and the 8 symbols include the at least one marker symbol. The length of each marker symbol in the at least one marker symbol is 2 bytes.
[0065] In a possible embodiment, for the input original data, the first device can insert a K code in the original data according to the type or position of different data, and divide the data after the K code is inserted into one or more data blocks according to a preset length, such as dividing the data after the K code is inserted into one or more data blocks according to a length of 16 bytes. The first data block can be any data block containing a marker symbol in the one or more data blocks.
[0066] Optionally, each marker symbol in the at least one marker symbol includes one K code; or each marker symbol in the at least one marker symbol includes two K codes; or a part of the marker symbols in the at least one marker symbol includes one K code, and another part of the marker symbols includes two K codes. For example, the first marker symbol includes a first K code; or the first marker symbol includes a first K code and a second K code.
[0067] Optionally, when the marker symbol in the present application includes different K codes, the marker meaning corresponding to the marker symbol is also different. For example, when the marker symbol includes one K code and data, and is <K28.3, data[7:0]>, the marker meaning corresponding to the marker symbol can be a data layer (DL) header + DL layer data; when the marker symbol includes two K codes, and is <K28.6, K28.6>, the marker meaning corresponding to the marker symbol can be entering a sleep state; when the marker symbol includes two K codes, and is <K29.7, <K29.7>, the marker meaning corresponding to the marker symbol can be switching a working mode; when the marker symbol includes two K codes, and is <K29.7, <K28.6>, the marker meaning corresponding to the marker symbol can be a timestamp sequence; when the marker symbol includes two K codes, and is <K28.1, <K28.1>, the marker meaning corresponding to the marker symbol can be a link idle.
[0068] S202: The first device encodes the first data block to obtain a second data block, the second data block including at least one encoded marker symbol, the first encoded marker symbol including a marker indication and a symbol indication, the marker indication being used to indicate at least one K code in a first marker symbol corresponding to the first encoded marker symbol, and the symbol indication being used to indicate that a next symbol of the first encoded marker symbol is a second encoded marker symbol or an encoded data symbol.
[0069] The at least one encoded marker symbol can be obtained by encoding the at least one marker symbol, and the at least one encoded marker symbol corresponds to the at least one marker symbol in a one-to-one manner. For example, the at least one encoded marker symbol includes a first encoded marker symbol, the at least one marker symbol includes a first marker symbol, and the first encoded marker symbol is obtained by encoding the first marker symbol, that is, the first encoded marker symbol corresponds to the first marker symbol.
[0070] Similarly, encoding one data symbol can obtain one data encoded symbol. If the number of data symbols included in the first data block is 0, the number of encoded data symbols included in the second data block is also 0; if the first data block includes one or more data symbols, the second data block includes one or more encoded data symbols, the one or more encoded data symbols being obtained by encoding the one or more data symbols, and the at least one encoded data symbol corresponding to the at least one data symbol in a one-to-one manner.
[0071] In addition, the first coded marker symbol can be any one of the at least one coded marker symbols. Each of the at least one coded marker symbols can include a marker indicator and a symbol indicator. The marker indicator in each coded marker symbol can be used to indicate the K code in the corresponding marker symbol. The symbol indicator in each coded marker symbol can be used to indicate that its next symbol is a coded marker symbol or a coded data symbol.
[0072] In one possible embodiment, the first device encodes the first data block to obtain the second data block, which may include: the first device reconstructing and encoding each of the at least one tag symbol to obtain the at least one encoded tag symbol. Specifically, for any tag symbol, after reconstructing and encoding the tag symbol, the first device uses a tag indicator in the corresponding encoded tag symbol to indicate the K code in the tag symbol, and the bit width of the tag indicator is smaller than the bit width of the K code.
[0073] The following section uses the first marker symbol and the first encoded marker symbol as examples to introduce and explain the structure of the marker symbols in the first data block and the encoded marker symbols in the second data block.
[0074] In one possible example, such as Figure 5 As shown, the first tag symbol includes a first K code and a second K code. The first encoded tag symbol includes a tag indicator and a symbol indicator. The tag indicator includes a first tag indicator and a second tag indicator. The first tag indicator indicates the first K code, and the second tag indicator indicates the second K code. The symbol indicator indicates that the next symbol of the first encoded tag symbol is an encoded tag symbol or an encoded data symbol; in other words, the symbol indicator indicates that the next symbol of the first encoded tag symbol is an encoded tag symbol or is not an encoded tag symbol. Optionally, the first encoded tag symbol may also include reserved bits.
[0075] For example, the length of the first marker symbol is 2 bytes, the length of the first K code and the length of the second K code are both 1 byte, the first K code occupies the high-order byte, and the second K code occupies the low-order byte; the length of the first encoded marker symbol is 2 bytes, the length of the first marker indicator and the length of the second marker indicator are both 4 bits, and the length of the symbol indicator is 1 bit. For example, as shown in Table 1 below, the bit positions occupied by the second marker indicator can be [3:0], the bit positions [7:4] can be reserved, the bit positions occupied by the first marker indicator can be [11:8], and the bit positions occupied by the symbol indicator can be
[12] .
[0076] Optionally, the first encoding mark symbol can further comprise a position indication, the position indication being used to indicate a position of the first mark symbol in the first data block. For example, as shown in Table 1 below, the length of the position indication can be 3 bits, for example, the bit position occupied by the position indication can be [15:13].
[0077] Table 1
[0078]
[0079] It can be understood that the bit positions and lengths occupied by the first mark indication, the second mark indication, the symbol indication and the position indication shown in Table 1 above, and the meanings represented by the corresponding bit values, are all exemplary, and in actual applications, different bit positions and lengths can be occupied, or the corresponding bit values can represent different meanings, and the above Table 1 does not limit the embodiments of the present application. Figure 5 In another possible example, as shown in Table 2 below, the first mark symbol comprises a first K code and data, the first encoding mark symbol comprises a mark indication, a symbol indication and encoding data corresponding to the data, the mark indication is used to indicate the first K code, and the symbol indication is used to indicate that the next symbol of the first encoding mark symbol is an encoding mark symbol or an encoding data symbol.
[0080] Figure 6 For example, the length of the first mark symbol is 2 bytes, the length of the first K code and the data is 1 byte, the first K code occupies the high byte, and the data occupies the low byte; the length of the first encoding mark symbol is 2 bytes, the length of the mark indication is 4 bits, the length of the symbol indication is 1 bit, and the length of the encoding data is 8 bits. For example, as shown in Table 2 below, the bit position occupied by the encoding data can be [7:0], the bit position occupied by the mark indication can be [11:8], and the bit position occupied by the symbol indication can be
[12] .
[0081] Optionally, the first encoding mark symbol can further comprise a position indication, the position indication being used to indicate a position of the first mark symbol in the first data block. For example, as shown in Table 2 below, the length of the position indication can be 3 bits, for example, the bit position occupied by the position indication can be [15:13].
[0082] Table 2
[0083]
[0084]
[0085] It can be understood that the bit positions and lengths occupied by the first mark indication, the second mark indication, the symbol indication and the position indication shown in Table 1 above, and the meanings represented by the corresponding bit values, are all exemplary, and in actual applications, different bit positions and lengths can be occupied, or the corresponding bit values can represent different meanings, and the above Table 1 does not limit the embodiments of the present application. Figure 6 The bit positions and lengths occupied by the marker indicators, symbol indicators and position indicators shown in Table 2, as well as the meanings represented by the corresponding bit values, are all exemplary. In practical applications, different bit positions and lengths may be occupied, or the corresponding bit values may represent different meanings. Table 2 does not constitute a limitation on the embodiments of this application.
[0086] Furthermore, the first data block also includes at least one data symbol, and the positions of the at least one data symbol and the at least one marker symbol in the first data block can be random. For example, the at least one data symbol may be located after the at least one marker symbol; or, the at least one data symbol may not be located after the at least one marker symbol, for example, the at least one data symbol may be located before the at least one marker symbol, or the at least one data symbol may be scattered among the at least one marker symbol.
[0087] In one possible embodiment, if the at least one data symbol is not located after the at least one marker symbol, the first device may, during the encoding of the first data block, first perform a shift operation on the symbols in the first data block so that the at least one data symbol is located after the at least one marker symbol, and then reconstruct and encode the at least one marker symbol and encode the at least one data symbol to obtain the second data block.
[0088] For example, such as Figure 7 As shown, the first data block includes 8 symbols, which can be represented as s1 to s8 in sequence. Among them, s1, s2, s3, s6 and s8 are marker symbols, and s4, s5 and s7 are data symbols. In the process of encoding the first data block, the first device can shift s6 and s8 before s4. The order of the 8 symbols after shifting is s1, s2, s3, s6, s8, s4, s5 and s7 in sequence.
[0089] Optionally, if the first data block includes at least one marker symbol and at least one data symbol, the second data block includes at least one encoded marker symbol corresponding to the at least one marker symbol and at least one encoded data symbol corresponding to the at least one data symbol, and the at least one encoded data symbol is located after the at least one encoded marker symbol.
[0090] Further, the first apparatus can also insert a block header in the head of the encoded symbol in the encoding process, that is, the encoded data block can also include a block header, which can be used to indicate the type of the encoded data block, such as indicating that the encoded data block is a marker data block or a service data block. The type of the encoded data block is consistent with the type of the data block before encoding. Optionally, the length of the block header can be 4 bits. For example, when the type of the data block is a marker data block, the block header can be 1100, and when the type of the data block is a service data block, the block header can be 0011; or when the type of the data block is a marker data block, the block header can be 0011, and when the type of the data block is a service data block, the block header can be 1100.
[0091] For example, as shown in FIG. 1, the first data block includes at least one marker symbol and at least one data symbol. Figure 7 For example, as shown in FIG. 2, the second data block obtained by the first apparatus encoding the first data block can include a block header, five encoded marker symbols s1', s2', s3', s6', and s8', and three encoded data symbols s4', s5', and s7'. Figure 8 For example, as shown in FIG. 2, the second data block obtained by the first apparatus encoding the first data block can include a block header, five encoded marker symbols s1', s2', s3', s6', and s8', and three encoded data symbols s4', s5', and s7'. Figure 8 For example, as shown in FIG. 3, the block header is 1100, and s1' to s8' are the corresponding encoded symbols of s1 to s8.
[0092] It can be understood that the length of the block header and the type represented by the values of the corresponding bits of the block header described in the above examples are exemplary, and in actual application, the block header can also have other lengths, or the type represented by different values of the corresponding bits of the block header can also be other, and the above examples do not limit the embodiments of the present application.
[0093] For example, as shown in FIG. 1, the first data block includes at least one marker symbol and at least one data symbol. Figure 7 For example, as shown in FIG. 2, the second data block obtained by the first apparatus encoding the first data block can include a block header, five encoded marker symbols s1', s2', s3', s6', and s8', and three encoded data symbols s4', s5', and s7'.
[0094] S203: The first apparatus sends the second data block to the second apparatus.
[0095] In a possible embodiment, after the first device encodes the first data block to obtain the second data block, the first device can send the second data block to the second device, for example, the first device can send the second data block to the second device through a transmission line between an interface of the first device and an interface of the second device. The transmission line can be a differential signal line or a single-ended signal line.
[0096] In the embodiment of the present application, the marker symbol in the first data block obtained by the first device includes at least one K code, the at least one K code is consistent with the K code in the 8b / 10b encoding, and in the second data block obtained by encoding the first data block, at least one K code in the corresponding marker symbol is indicated by using a marker indication in the encoded marker symbol, the type of the next encoding symbol is indicated by using a symbol indication, and the bit width of the marker indication is smaller than the bit width of the at least one K code. Therefore, when used for multiple encoding modes, the multiple encoding modes can all use K codes to mark different functions of data blocks or boundaries of data blocks, which can improve the compatibility of the multiple encoding modes, and at the same time, can reduce the redundant data after encoding and improve the encoding efficiency. For example, when used for the 128b / 132b encoding mode, the compatibility of the 8b / 10b encoding and the 128b / 132b encoding can be improved.
[0097] The process that the second device receives the second data block and decodes the second data block in the electronic device is described in detail below.
[0098] Figure 9 A flowchart of a data decoding method provided by the embodiment of the present application is shown in the figure. The method can be applied to an electronic device including a first device and a second device, and can be specifically executed by the second device. The first device is one of a master device or a slave device, and the second device is the other of the master device or the slave device. The method includes the following steps.
[0099] S204: The second device receives the second data block, and the second data block includes at least one encoded marker symbol. A first encoded marker symbol in the at least one encoded marker symbol includes a marker indication and a symbol indication. The marker indication is used to indicate at least one K code in a first marker symbol corresponding to the first encoded marker symbol. The symbol indication is used to indicate that the next symbol of the first encoded marker symbol is a second encoded marker symbol or an encoded data symbol.
[0100] The at least one encoded marker symbol can be obtained by encoding the at least one marker symbol, and the at least one encoded marker symbol corresponds to the at least one marker symbol in a one-to-one manner. The at least one marker symbol can include the first marker symbol corresponding to the first encoded marker symbol. The first encoded marker symbol can be any one of the at least one encoded marker symbol.
[0101] In addition, each of the at least one encoded marker symbol can include a marker indication and a symbol indication, the marker indication in each encoded marker symbol can be used to indicate the K code in the corresponding marker symbol, and the symbol indication in each encoded marker symbol can be used to indicate that the next symbol of itself is an encoded marker symbol or an encoded data symbol.
[0102] Optionally, the at least one K code can include one K code, or the at least one K code includes two K codes. When the number of K codes included in the at least one K code is different, the marker indication is also different. The structure of any encoded marker symbol in the second data block is exemplified below by taking the first encoded marker symbol as an example.
[0103] In a possible example, the first encoded marker symbol includes a marker indication and a symbol indication, the marker indication includes a first marker indication and a second marker indication, the first marker indication is used to indicate a first K code, the second marker indication is used to indicate a second K code, and the symbol indication is used to indicate that the next symbol of the first encoded marker symbol is an encoded marker symbol or an encoded data symbol. In the case where the marker indication includes the first marker indication and the second marker indication, the first marker symbol corresponding to the first encoded marker symbol includes the first K code and the second K code.
[0104] In another possible example, the first encoded marker symbol includes a marker indication, a symbol indication, and encoded data, the marker indication is used to indicate a first K code, and the symbol indication is used to indicate that the next symbol of the first encoded marker symbol is an encoded marker symbol or an encoded data symbol. In the case where the marker indication is used to indicate only the first K code, the first marker symbol corresponding to the first encoded marker symbol includes the first K code and data, and the encoded data in the first encoded marker symbol can be obtained by encoding the data.
[0105] Optionally, the first encoded marker symbol can further include a position indication, and the position indication is used to indicate the position of the first marker symbol in the first data block after decoding. The first data block can be a data block obtained by decoding the second data block.
[0106] Optionally, the second data block further includes at least one encoded data symbol, and the at least one encoded data symbol is located after the at least one encoded marker symbol. The at least one encoded data symbol can be obtained by encoding the at least one data symbol, and the at least one encoded data symbol corresponds to the at least one data symbol in a one-to-one manner.
[0107] Further, the second data block further comprises a block header, the block header being used to indicate a type of the second data block, such as to indicate that the second data block is a marker data block. The type of the data block before decoding is consistent with the type of the data block after decoding, i.e., the first data block is also a marker data block. Optionally, the length of the block header can be 4 bits. For example, when the type of the data block is a marker data block, the block header can be 1100, and when the type of the data block is a service data block, the block header can be 0011; or, when the type of the data block is a marker data block, the block header can be 0011, and when the type of the data block is a service data block, the block header can be 1100.
[0108] S205: The second device decodes the second data block according to the marker indication and the symbol indication to obtain the first data block, the first data block comprising at least one marker symbol corresponding to the at least one encoded marker symbol, each of the at least one marker symbol comprising at least one K code.
[0109] Optionally, after the second device receives the second data block, the second device can determine, according to the block header of the second data block, that the second data block is a marker data block, i.e., that the second data block comprises at least one encoded marker symbol, and then the second device can decode the at least one encoded marker symbol according to the marker indication and the symbol indication in the at least one encoded marker symbol. If the block header of a data block received by the second device indicates that the data block is a service data block, it is indicated that the data block only comprises encoded data symbols, and then the second device can directly decode the encoded data symbols in the data block.
[0110] Further, the first encoded marker symbol further comprises a position indication, the position indication being used to indicate a position of the decoded first marker symbol in the first data block. That is, any of the at least one encoded marker symbol further comprises a position indication, the position indication being used to indicate a position of the corresponding marker symbol in the decoded first data block. The second device can specifically decode the second data block according to the marker indication, the symbol indication and the position indication.
[0111] In a possible embodiment, in the case that the second device determines, according to the block header of the second data block, that the second data block is a marker data block, i.e., the second data block includes at least one encoded marker symbol, the second device can first decode the first encoded marker symbol after the block header. Specifically, the second device can determine, according to the marker indication in the first encoded marker symbol, at least one K code included in the corresponding marker symbol, and determine, according to the position indication in the first encoded marker symbol, the position of the corresponding marker symbol in the decoded first data block, to obtain the marker symbol corresponding to the first encoded marker symbol and the position of the marker symbol in the first data block. Then, the second device can determine, according to the symbol indication in the first encoded marker symbol, that the next encoded symbol in the first encoded marker symbol is an encoded marker symbol or an encoded data symbol. If the next encoded symbol is an encoded marker symbol, the second device can decode the encoded marker symbol according to the similar decoding manner; if the next encoded symbol is an encoded data symbol, the second device can directly decode the encoded data symbol to obtain the corresponding data symbol. In this way, the decoding of the last encoded symbol in the second data block is completed. Optionally, in the case that the at least one encoded marker symbol further includes encoded data, the second device can further decode the encoded data to obtain the data included in the corresponding marker symbol.
[0112] For example, referring to FIG. 11, Figure 8 As shown in FIG. 11, the second device determines, according to the block header 1100, that the second data block is a marker data block, and thus decodes the first encoded marker symbol s1’ according to the above-mentioned decoding manner of the encoded marker symbol to obtain the marker symbol s1 and the position of the marker symbol s1 in the first data block; determines s2’ to be an encoded marker symbol according to the symbol indication in the encoded marker symbol s1’, and then decodes the encoded marker symbol s2’ according to the similar manner; similarly, the decoding of the encoded marker symbols s3’, s6’, and s8’ is sequentially completed; then, s4’ is determined to be an encoded data symbol according to the symbol indication in the encoded marker symbol s8’, and thus s4’ is decoded according to the decoding manner of the encoded data symbol; similarly, the decoding of the encoded data symbols s3’ and s7’ is sequentially completed according to the decoding manner of the encoded data symbol. The order of the data symbols s4, s5, and s7 in the first data block is consistent with the order of the encoded data symbols s4’, s5’, and s7’ in the second data block, and the data symbols s4, s5, and s7 are located in the positions in the first data block except the positions occupied by the marker symbols s1, s2, s3, s6, and s8.
[0113] Thus, in the case that the second data block comprises the at least one encoded marker symbol, the second device decodes the at least one encoded marker symbol to obtain the at least one marker symbol, i.e., the first data block comprises the at least one marker symbol; in the case that the second data block further comprises at least one encoded data symbol after the at least one encoded marker symbol, the second device decodes the at least one encoded marker symbol and the at least one encoded data symbol to obtain the at least one marker symbol and the at least one data symbol, i.e., the first data block comprises the at least one marker symbol and the at least one data symbol, and the position of the at least one marker symbol in the first data block is consistent with the indicated position indicated by the position indication in the at least one encoded symbol.
[0114] It can be understood that the related content described in the above embodiment of encoding the first data block by the first device can be correspondingly introduced into the embodiment of decoding the second data block by the second device, which will not be described herein again.
[0115] In the embodiment of the present application, the second data block received by the second device comprises at least one encoded symbol, each encoded marker symbol comprises a marker indication and a symbol indication, or further comprises a position indication, the second device can determine at least one K code in the corresponding marker symbol according to the marker indication, determine the position of the corresponding marker symbol in the decoded first data block according to the position indication, and determine the type of the corresponding next encoded symbol according to the symbol indication, and the bit width of the marker indication is less than the bit width of the at least one K code, so that the compatibility of the multiple decoding modes can be improved when used for multiple decoding modes, and the redundant data in the second data block can be reduced and the decoding efficiency can be improved.
[0116] The above mainly introduces the scheme provided by the embodiment of the present application from the perspective of the interaction between the first device and the second device. It can be understood that the first device and the second device comprise the corresponding hardware structure and / or software module for executing each function in order to realize the above functions. Those skilled in the art should easily realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical scheme. The professional skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0117] The embodiments of the present application can divide the functional modules of the first device and the second device according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical functional division. In actual implementation, another division manner can be used. The following will be described by taking the division of each functional module according to each function as an example.
[0118] In the case of using the integrated unit, Figure 10 A structural diagram of a first device involved in the above embodiments is shown. The first device can also be referred to as a data encoding device. The device can be a device or a chip applied to the device or a module in the device. The device includes a processing unit 301 and a sending unit 302. In a possible embodiment, the processing unit 301 is configured to support the device to perform S201 and S202 in the above method embodiments. The sending unit 302 is configured to support the device to perform S203 in the above method embodiments. The sending unit 302 can be an interface module. All related contents of each step involved in the above method embodiments can be referred to the functional description of the corresponding functional module, which will not be described herein again.
[0119] On the basis of using hardware, the processing unit 301 in the embodiments of the present application can be a processing circuit of the device, and the sending unit 302 can be a transmitter of the device. The transmitter can be integrated with the receiver to serve as a transceiver. The specific transceiver can also be referred to as a communication interface or an interface circuit, which is referred to as an interface in Figure 1 , so as to transceive data on a cable through the transceiver.
[0120] Figure 11 Another structural diagram of a first device provided by the embodiments of the present application is shown. The device can be a device or a chip applied to the device. The device includes a processing circuit 311 and a transmitter 312. In a possible embodiment, the processing circuit 311 is configured to support the device to perform S201-S202 in the above method embodiments and / or other technical processes described herein. The transmitter 312 is configured to support the device to communicate, for example, to support the device to communicate with a second device. The transmitter 312 can be an interface element.
[0121] In the embodiments of the present application, the processing circuit 311 can be a processor, which can include a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute the various exemplary logical blocks, modules and circuits described in combination with the disclosure of the present application. The processor can also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like.
[0122] In the case of using an integrated unit, Figure 12 A structural diagram of a second device involved in the above-mentioned embodiments is shown, which can also be referred to as a data decoding device. The device can be a device or a chip applied to a device, which includes a receiving unit 401 and a processing unit 402. In a possible embodiment, the receiving unit 401 is configured to support the device to perform S204 in the above-mentioned method embodiments, and the receiving unit 401 can be an interface module; the processing unit 402 is configured to support the device to perform S205 in the above-mentioned method embodiments, and / or other technical processes described herein. All related contents of the steps involved in the above-mentioned method embodiments can be referred to the function description of the corresponding functional modules, which will not be repeated here in the embodiments of the present application.
[0123] On the basis of hardware implementation, the processing unit 402 in the embodiments of the present application can be a processing circuit of the device, and the receiving unit 401 can be a receiver of the device, which can be integrated with a transmitter to serve as a transceiver. The specific transceiver can also be referred to as a communication interface or an interface circuit, which is referred to as an interface in Figure 1 , so as to transceive data on a cable through the transceiver.
[0124] Figure 13 Another structural diagram of a second device provided in the embodiments of the present application is shown, which can be a device or a chip applied to a device, and the device includes a receiver 411 and a processing circuit 412. In a possible embodiment, the processing circuit 412 is configured to support the device to perform S205 in the above-mentioned method embodiments, and / or other technical processes described herein; the receiver 411 is configured to support the device to communicate, such as supporting the device to communicate with the first device, and the receiver 411 can be an interface element.
[0125] In the embodiments of the present application, the processing circuit 412 can be a processor, which can include a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, transistor logic device, hardware component or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure of the present application. The processor can also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and the like.
[0126] In another embodiment of the present application, an electronic device is provided, which includes a first device and a second device connected through an interface; wherein the first device can be or include the above-mentioned Figure 10 or Figure 11 The provided device is used to execute the steps of the first device in the above-mentioned method embodiments; the second device can be or include the above-mentioned Figure 12 or Figure 13 The provided device is used to execute the steps of the second device in the above-mentioned method embodiments.
[0127] It can be understood that all related contents of the steps involved in the above-mentioned method embodiments can be cited into the embodiments of the first device and the second device, and the embodiments of the electronic device, which will not be described here in the embodiments of the present application.
[0128] In several embodiments provided in the present application, it should be understood that the disclosed method and device can be implemented by other ways. For example, the above-mentioned device embodiments are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0129] The integrated unit, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium, which can include a U disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk and various storage medium capable of storing program codes. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product or all or part of the technical solutions of the present application.
[0130] In another embodiment of the present application, a readable storage medium is also provided, which stores a computer program or instructions, when the device runs the computer program or instructions, so that the device executes the steps of the first device in the above-mentioned method embodiments.
[0131] In another embodiment of the present application, a readable storage medium is also provided, which stores a computer program or instructions, when the computer program or instructions are executed by a device, the device is caused to perform the steps of the second apparatus in the above-mentioned method embodiments.
[0132] In yet another embodiment of the present application, a computer program product is also provided, which comprises a computer program, when the computer program is executed by a device, the device is caused to perform the steps of the first apparatus in the above-mentioned method embodiments.
[0133] In yet another embodiment of the present application, a computer program product is also provided, which comprises a computer program, when the computer program is executed by a device, the device is caused to perform the steps of the second apparatus in the above-mentioned method embodiments.
[0134] Finally, it should be noted that: the above is only a specific implementation of the present application, but the protection scope of the present application is not limited to this, any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A data encoding method for a device interface, characterized in that, The method includes: Acquire a first data block, the first data block comprising at least one marker symbol, each of the at least one marker symbol comprising at least one K code; The first data block is encoded to obtain a second data block, the second data block including at least one encoded tag symbol corresponding to the at least one tag symbol; wherein, the first encoded tag symbol among the at least one encoded tag symbol includes a tag indicator and a symbol indicator, the tag indicator is used to indicate the at least one K code in the first tag symbol corresponding to the first encoded tag symbol, and the symbol indicator is used to indicate that the next symbol of the first encoded tag symbol is a second encoded tag symbol or an encoded data symbol; Send the second data block.
2. The method according to claim 1, characterized in that, The at least one K code in the first mark symbol includes a first K code and a second K code, and the mark indication includes a first mark indication and a second mark indication, wherein the first mark indication is used to indicate the first K code and the second mark indication is used to indicate the second K code.
3. The method according to claim 1, characterized in that, The at least one K code in the first marker symbol includes a first K code, the first marker symbol also includes data, the marker indicator is used to indicate the first K code, and the first coded marker symbol also includes coded data corresponding to the data.
4. The method according to any one of claims 1-3, characterized in that, The first data block further includes at least one data symbol, and the second data block further includes at least one encoded data symbol corresponding to the at least one data symbol, wherein the at least one encoded data symbol is located after the at least one encoded tag symbol.
5. The method according to any one of claims 1-4, characterized in that, The first coded marker symbol further includes a position indicator, which indicates the position of the first marker symbol in the first data block.
6. The method according to any one of claims 1-5, characterized in that, The second data block also includes a block header, which indicates that the second data block is a marked data block.
7. A data decoding method for a device interface, characterized in that, The method includes: Receive a second data block, the second data block including at least one coded marker symbol, the first coded marker symbol of the at least one coded marker symbol including a marker indicator and a symbol indicator, the marker indicator being used to indicate at least one K code in the first marker symbol corresponding to the first coded marker symbol, the symbol indicator being used to indicate that the next symbol of the first coded marker symbol is a second coded marker symbol or a coded data symbol; The second data block is decoded according to the mark indication and the symbol indication to obtain the first data block, the first data block including at least one mark symbol corresponding to the at least one encoded mark symbol, each of the at least one mark symbol including at least one K code.
8. The method according to claim 7, characterized in that, The at least one K code in the first mark symbol includes a first K code and a second K code, and the mark indication includes a first mark indication and a second mark indication, wherein the first mark indication is used to indicate the first K code and the second mark indication is used to indicate the second K code.
9. The method according to claim 7, characterized in that, The at least one K code in the first marker symbol includes a first K code, the first marker symbol also includes data, the marker indicator is used to indicate the first K code, and the first coded marker symbol also includes coded data corresponding to the data.
10. The method according to any one of claims 7-9, characterized in that, The second data block further includes at least one encoded data symbol, which is located after the at least one encoded marker symbol, and the first data block further includes at least one data symbol corresponding to the at least one encoded data symbol.
11. The method according to any one of claims 7-10, characterized in that, The first coded marker symbol further includes a position indicator, which indicates the position of the first marker symbol in the first data block; Decoding the second data block to obtain the first data block based on the marker indication and the symbol indication includes: The second data block is decoded to obtain the first data block based on the mark indication, the symbol indication, and the position indication.
12. The method according to any one of claims 7-11, characterized in that, The second data block also includes a block header, which indicates that the second data block is a marked data block.
13. A data encoding device, characterized in that, The device includes: Processing unit, configured to acquire a first data block, the first data block including at least one marker symbol, each of the at least one marker symbol including at least one K code; The processing unit is further configured to encode the first data block to obtain a second data block, the second data block including at least one encoded tag symbol corresponding to the at least one tag symbol; wherein, the first encoded tag symbol among the at least one encoded tag symbol includes a tag indicator and a symbol indicator, the tag indicator is used to indicate the at least one K code in the first tag symbol corresponding to the first encoded tag symbol, and the symbol indicator is used to indicate that the next symbol of the first encoded tag symbol is a second encoded tag symbol or an encoded data symbol; A sending unit is used to send the second data block.
14. The apparatus according to claim 13, characterized in that, The at least one K code in the first mark symbol includes a first K code and a second K code, and the mark indication includes a first mark indication and a second mark indication, wherein the first mark indication is used to indicate the first K code and the second mark indication is used to indicate the second K code.
15. The apparatus according to claim 13, characterized in that, The at least one K code in the first marker symbol includes a first K code, the first marker symbol also includes data, the marker indicator is used to indicate the first K code, and the first coded marker symbol also includes coded data corresponding to the data.
16. The apparatus according to any one of claims 13-15, characterized in that, The first data block further includes at least one data symbol, and the second data block further includes at least one encoded data symbol corresponding to the at least one data symbol, wherein the at least one encoded data symbol is located after the at least one encoded tag symbol.
17. The apparatus according to any one of claims 13-16, characterized in that, The first coded marker symbol further includes a position indicator, which indicates the position of the first marker symbol in the first data block.
18. The apparatus according to any one of claims 13-17, characterized in that, The second data block also includes a block header, which indicates that the second data block is a marked data block.
19. A data decoding device, characterized in that, The device includes: A receiving unit is configured to receive a second data block, the second data block including at least one coded marker symbol, wherein the first coded marker symbol among the at least one coded marker symbol includes a marker indicator and a symbol indicator, the marker indicator is used to indicate at least one K code among the first marker symbols corresponding to the first coded marker symbol, and the symbol indicator is used to indicate that the next symbol of the first coded marker symbol is a second coded marker symbol or a coded data symbol; A processing unit is configured to decode the second data block to obtain a first data block according to the mark indication and the symbol indication, the first data block including at least one mark symbol corresponding to the at least one encoded mark symbol, each of the at least one mark symbol including at least one K code.
20. The apparatus according to claim 19, characterized in that, The at least one K code in the first mark symbol includes a first K code and a second K code, and the mark indication includes a first mark indication and a second mark indication, wherein the first mark indication is used to indicate the first K code and the second mark indication is used to indicate the second K code.
21. The apparatus according to claim 19, characterized in that, The at least one K code in the first marker symbol includes a first K code, the first marker symbol also includes data, the marker indicator is used to indicate the first K code, and the first coded marker symbol also includes coded data corresponding to the data.
22. The apparatus according to any one of claims 19-21, characterized in that, The second data block further includes at least one encoded data symbol, which is located after the at least one encoded marker symbol, and the first data block further includes at least one data symbol corresponding to the at least one encoded data symbol.
23. The apparatus according to any one of claims 19-22, characterized in that, The first coded marker symbol further includes a position indicator, which indicates the position of the first marker symbol in the first data block; The processing unit is further configured to decode the second data block to obtain the first data block based on the marker indication, the symbol indication, and the position indication.
24. The apparatus according to any one of claims 19-23, characterized in that, The second data block also includes a block header, which indicates that the second data block is a marked data block.
25. A data encoding device, characterized in that, The apparatus includes a processing circuit and a transmitter, the processing circuit and the transmitter being configured to support the apparatus in performing the method as described in any one of claims 1-6.
26. A data decoding device, characterized in that, The apparatus includes a processing circuit and a receiver, the processing circuit and the receiver being configured to support the apparatus in performing the method as described in any one of claims 7-12.
27. An electronic device, characterized in that, The electronic device includes a first device and a second device connected via an interface, wherein the first device includes the device as described in any one of claims 13-18 or the device as described in claim 25, and the second device includes the device as described in any one of claims 19-24 or the device as described in claim 26.
28. A readable storage medium, characterized in that, The readable storage medium stores instructions that, when executed by the device, cause the device to perform the method as described in any one of claims 1-12.
29. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a device, causes the device to perform the method as described in any one of claims 1-12.