Patent Description:
A driving part of a liquid crystal display panel generally includes a timing controller, a source driver and a gate driver, wherein the main function of the controller is to process each frame of image data to generate a data signal and a control signal corresponding to each frame of image data, the data signal is communicated to the source driver, and the source driver converts the received data signal into a data voltage to be written to a corresponding pixel on the liquid crystal display panel.

With the increase of the resolution of the liquid crystal display panel, the rate of data transmission between the controller and the source driver in the liquid crystal display panel is higher and higher, and nowadays, there is an 8b/10b (i.e., encoding <NUM>-bit data into <NUM>-bit data) encoding method for high speed data transmission. In particular, <NUM>-bit original data is divided into two parts, 5b/6b (i.e., encoding <NUM>-bit data into <NUM>-bit data) encoding is performed on the first <NUM> digits thereof, and 3b/4b (i.e., encoding <NUM>-bit data into <NUM>-bit data) encoding is performed on the last <NUM> digits thereof.

However, with the development of codec technology, in the current field of timing control, there are usually two approaches for signal transmission, Phase Locked Loop (PLL for short) and Delay-locked Loop (DLL for short), wherein the PLL is more common, and the DLL is not universal, for example, the above-mentioned encoding method only supports the PLL transmission approach and not the DLL transmission approach.

<CIT> discloses a method and apparatus for using a modified 8B/10B system for transmitting <NUM> bit wide data packets in <NUM> bit code in which 5B/6B encoder/decoders separate the <NUM> bit wide data into two <NUM> bit nibbles. Unique special codes are provided which are not capable of aliasing with other <NUM> bit code words to provide reliable byte boundaries. <CIT> does not address the identified problem.

In general, an encoding procedure will not take a jumping edge between every code word into account, which is not conducive to a transmission approach using the DLL, because a DLL transmission approach requires that a jumping edge needs to occur in the procedure of transmission and it relies on the jumping edge for time synchronization.

Embodiments of this application provide an encoding method and apparatus, a display apparatus, a medium and a signal transmission system. The technical solutions are as follows.

In a first aspect, there is provided an encoding method including:.

In an embodiment, the alternative <NUM>-bit data satisfies:<MAT><MAT> wherein enc[k1] is specified-digit data in the alternative <NUM>-bit data, enc[k2] is data in the alternative <NUM>-bit data other than the specified-digit data, din[m] is specified-digit data in the <NUM>-bit data, F is data determined based on at least one of other digit data in the <NUM>-bit data, ~ represents performing an inversion operation, and ^ represents performing an exclusive OR operation.

In an embodiment, the encoding <NUM>-bit data corresponding to a to-be-encoded byte of to-be-transmitted data into alternative <NUM>-bit data includes:.

In an embodiment, the first-digit data of the alternative <NUM>-bit data is a first numerical value, and
the detecting whether the first-digit data of the alternative <NUM>-bit data is the same as the previous-digit data adjacent to the first-digit data includes:.

In an embodiment, the method further includes:
adding a first identification code at a preset position of the encoded to-be-transmitted data to obtain target data, the first identification code being preset <NUM>-bit data, the first identification code including at least <NUM> consecutive digits of the same data, the first identification code being used for identifying transmitted content, start of transmission or end of transmission, and the encoded to-be-transmitted data including the target <NUM>-bit data obtained by encoding the <NUM>-bit data corresponding to the to-be-encoded byte for sending.

In an embodiment, the method further includes:.

In a second aspect, there is provided an encoding apparatus including:.

In a third aspect, there is provided a display apparatus including:
a controller and a plurality of source driver chips, the controller including an encoding apparatus as described in the second aspect.

In a fourth aspect, there is provided a non-transitory computer readable storage medium, and when instructions in the non-transitory computer readable storage medium are executed by a processor, the processor is enabled to perform any of the encoding methods as described in the first aspect.

It will be appreciated that, the above general description and the following detailed description is just exemplary, and cannot limit this application.

In order to more clearly illustrate the embodiments of this application, the appended drawings needing to be used in the description of the embodiments will be introduced briefly in the following. Obviously, the drawings in the following description are only some embodiments of this application, and for the person having ordinary skills in the art, other drawings may also be obtained according to these drawings under the premise of not paying out undue experimentation.

The drawings herein are incorporated into the specification and constitute a part of the specification, show embodiments in accordance with this application, and are used for explaining the principle of this application along with the specification.

To make the objects, technical solutions and advantages of this application clearer, in the following, this application will be further described in detail in conjunction with the drawings. Obviously, the described embodiments are just a part of embodiments of this application, and not all the embodiments. Based on the embodiments in this application, all the other embodiments obtained by the person having ordinary skills in the art under the premise of not paying out undue experimentation pertain to the scope protected by this application.

Reference is made to <FIG>, which is a schematic diagram of an application environment of an encoding method provided by an exemplary embodiment of the disclosure. As shown in <FIG>, the encoding method is applied in a display apparatus, the display apparatus includes a controller <NUM> and a plurality of source driver chips <NUM>, a plurality of first signal lines H of the controller <NUM> are coupled to the plurality of source driver chips <NUM> in a one to one correspondence, the controller is also coupled to a second signal line L, and the plurality of source driver chips <NUM> are connected in parallel and coupled to the second signal line L. The signal transmission rate of a first signal line is less than that of the second signal line, the first signal line may be called a low speed signal line and is usually used for identifying a level state, and the second signal line may be called a high speed signal line and is usually used for transmitting a high speed differential signal. The controller <NUM> may be any of a timing controller, a system on chip (SOC for short) and a microcontroller unit (MCU) integrated into a timing controller.

It is noted that, the encoding method provided by the embodiment of the disclosure may also be applied in other implementation environment, <FIG> is just a schematic illustration, and the connection relationship between the controller and a source driver chip is also just a schematic illustration, and in fact, the connection relationship between the two will suffice as long as it is ensured that effective data transmission can be conducted between the two.

In an embodiment of the disclosure, there is provided a new 8b/10b (i.e., encoding <NUM>-bit data into <NUM>-bit data) encoding method, wherein both the <NUM>-bit data before the encoding and the target <NUM>-bit data obtained after the encoding is binary data, data transmitted between the controller <NUM> and a source driver chip <NUM> may be encoded by adopting the encoding method, and the data transmitted between the controller <NUM> and the source driver chip <NUM> may be data transmitted in a first signal line, or may also be data transmitted in the second signal line, which will not be limited by the embodiment of the disclosure.

As shown in <FIG> is a flow diagram of an encoding method provided by an embodiment of the disclosure, which may be applied in the environment as shown in <FIG>. The method includes:.

For the encoding method provided by the embodiment of the disclosure, at the time of data encoding, <NUM>-bit data is encoded into alternative <NUM>-bit data first, then a jumping edge is arranged between every two adjacent <NUM>-bit data, and the jumping edge may effectively reduce transmission errors. Moreover, the encoding approach as described above meets the requirements of the PLL and the DLL, such that a receiving end can support the signal transmission approaches of the PLL and the DLL simultaneously.

In practical applications, the less the consecutive and identical data in the transmitted data, the better the jitter performance is, and the better the jitter performance, the lower the probability of transmission errors is. The conventional 8b/10b encoding algorithm at least can ensure that in the encoded <NUM>-bit data, there is at least one digit different from other digits in any consecutive six digits.

Another embodiment of the disclosure provides a flow diagram of another encoding method, which may be applied in an environment as shown in <FIG>, and the method includes:.

The encoding method provided by the embodiment of the disclosure employs the above approach to encode <NUM>-bit data into target <NUM>-bit data, wherein there is at least one digit different from other digits in any consecutive five digits in the obtained target <NUM>-bit data, which, as compared to the conventional encoding method, can reduce the amount of consecutive and identical data in every <NUM>-bit data (i.e., each encoded byte), may ensure the encoded data has a better jitter performance in a subsequent transmission procedure, and thereby lower the probability of transmission errors.

An embodiment of the disclosure provides an encoding method, which, as shown in <FIG>, may be applied in an environment as shown in <FIG>, and the method includes the following steps.

At step <NUM>, <NUM>-bit data corresponding to a to-be-encoded byte of to-be-transmitted data is encoded into alternative <NUM>-bit data. Step <NUM> or step <NUM> is to be performed.

Before data transmission, it is necessary to encode the to-be-transmitted data, the to-be-transmitted data includes at least one to-be-encoded byte, and each to-be-encoded byte is <NUM>-bit data. It is noted that in the embodiments of the disclosure, at a sending end of data, the bit digits of the data are sorted from low digit to high digit. For example, the arrangement order of data <NUM> is from right to left, that is, its first-digit data is <NUM>, its last-digit data is <NUM>, "<NUM>" is its high <NUM>-digit data, and "<NUM>" is its low four digits.

In an embodiment of the disclosure, the encoding basis for each digit data in the alternative <NUM>-bit data includes the same digit data din[m] in the <NUM>-bit data, din[m] is data of a specified digit in the <NUM>-bit data, <NUM>≥m≥<NUM>, and thus each digit data in the alternative <NUM>-bit data is associated with the same digit data din[m]. In an embodiment of the disclosure, data of a specified digit may be set in the alternative <NUM>-bit data, and the specified-digit data is associated with the afore-mentioned same digit data din[m]. Since each digit data in the alternative <NUM>-bit data is associated with the same digit data din[m], and the specified-digit data is associated with the same digit data din[m], the specified-digit data may reflect the state of the alternative <NUM>-bit data, for example, reflect whether the alternative <NUM>-bit data has undergone an inversion operation subsequently, and a decoding end may perform corresponding processing based on the numerical value of the specified-digit data.

Exemplarily, the alternative <NUM>-bit data satisfies:<MAT><MAT> wherein enc[k1] is specified-digit data in the alternative <NUM>-bit data, which specified-digit data is the (k1+<NUM>)-th digit data, enc[k2] is data in the alternative <NUM>-bit data other than the specified-digit data, that is, data other than the (k1+<NUM>)-th digit data, F is data determined based on at least one of other digit data in the <NUM>-bit data, ~ represents an inversion operation, and ^ represents performing an exclusive OR operation. The inversion operation represents inverting a binary digit, for example, <NUM> is inverted to <NUM>, and <NUM> is inverted to <NUM>; and the exclusive OR operation represents two binary digits XOR each other, and its rule is that it is true as long as the former and the latter are different, wherein true is <NUM>, false is <NUM>, and then <NUM>^<NUM>=<NUM>, <NUM>^<NUM>=<NUM>, <NUM>^<NUM>=<NUM>, <NUM>^<NUM>=<NUM>.

It can be seen from the above formulae that enc[k2] = enc[k1] ^ F, and it may be obvious that there is a relationship between other digit data and the specified-digit data. Assume that all digit data in the alternative <NUM>-bit data is inverted to obtain target <NUM>-bit data, and it may be seen that<MAT><MAT> wherein dout[k1] is the specified-digit data in the target <NUM>-bit data obtained by inverting the specified-digit data enc[k1] in the alternative <NUM>-bit data, the specified-digit data is the (k1+<NUM>)-th digit data, and dout[k2] is data in the target <NUM>-bit data obtained by inverting data in the alternative <NUM>-bit data other than the specified-digit data,.

Thus, dout[k2] = dout[k1] ^ F, which is consistent with the relationship enc[k2] = enc[k1] ^ F. Therefore, in the embodiment of the disclosure, by employing the above-described encoding method, the relationship between respective data in the finally obtained target <NUM>-bit data keeps unchanged relative to the alternative <NUM>-bit data, no matter whether the alternative <NUM>-bit data has been inverted. Therefore, after obtaining the target <NUM>-bit data, the decoding end may decode it to obtain corresponding <NUM>-bit data, no matter it is inverted. Thus, it may be possible to realize compatibility of the encoding method provided by the embodiment of the disclosure with the existing decoding methods, and at the time of decoding, it is unnecessary to take into account the relationship between to-be-decoded <NUM>-bit data and previous <NUM>-bit data, and the computational cost can be reduced.

Exemplarily, assume that the specified data is the tenth-digit data of the alternative <NUM>-bit data, i.e., k1 = <NUM>, and din[m] is the fourth-digit data of the <NUM>-bit data, i.e., m = <NUM>, and a procedure of encoding <NUM>-bit data corresponding to a to-be-encoded byte of to-be-transmitted data into alternative <NUM>-bit data includes:.

The AND operation represents two binary digits AND each other, and its rule is that it is true only if both the former and the latter are <NUM>, otherwise, it is false, wherein true is <NUM>, false is <NUM>, and then <NUM>&<NUM>=<NUM>, <NUM>&<NUM>=<NUM>, <NUM>& <NUM>=<NUM>, <NUM>&<NUM>=<NUM>; and the OR operation represents two binary digits OR each other, and its rule is that it is true if only one of the former and the latter is <NUM>, wherein true is <NUM>, false is <NUM>, and then <NUM>|<NUM>=<NUM>, <NUM>|<NUM>=l, <NUM>|<NUM>=<NUM>, <NUM>|<NUM>=<NUM>.

Exemplarily, as shown in <FIG>, assume that the to-be-encoded <NUM>-bit data is <NUM>, and its first-digit data to the eighth-digit data is successively <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>. Then, as shown in <FIG>, according to the above encoding approach, it may be encoded to obtain alternative <NUM>-bit data <NUM>, wherein in the alternative <NUM>-bit data,<MAT> <MAT> <MAT><MAT><MAT> <MAT> <MAT> the eighth-digit data enc[<NUM>] = ~din[<NUM>] ^ din[<NUM>] = <NUM>; the ninth-digit data enc[<NUM>] = ~din[<NUM>] ^ din[<NUM>] = <NUM>; the tenth-digit data enc[<NUM>] = ~din[<NUM>] = <NUM>.

By the above encoding approach, it may be ensured that there is at least one digit different from other digits in any consecutive six digits of the obtained alternative <NUM>-bit data, that is, <NUM> consecutive <NUM> or <NUM> consecutive <NUM> will not occur.

At the step <NUM>, it is detected whether the first-digit data of the alternative <NUM>-bit data is the same as the previous-digit data adjacent to the first-digit data, when the to-be-encoded byte is not the first byte of the to-be-transmitted data.

Since the to-be-transmitted data may include multiple bytes, and the encoding approach may be different for situations in which the to-be-encoded byte is the first byte and is not the first byte, at the time of encoding, it may be possible to first detect whether the to-be-encoded byte is the first byte of the to-be-transmitted data, and if no, since the data is encoded in order, it shows that there exist at least one encoded byte in front of the to-be-encoded byte, that is, byte(s) for which the 8b/10b encoding has been done. For a byte for which the 8b/10b encoding has been done, actually, original <NUM>-bit digits of data have been converted into <NUM>-bit digits of data, and therefore an encoded byte corresponds to <NUM>-bit data. For the to-be-encoded alternative <NUM>-bit data, it may be possible to detect the first-digit data of the alternative <NUM>-bit data and the previous-digit data adjacent to the first-digit data (that is, the last digit of previous <NUM>-bit data) so as to compare whether they are the same.

In an embodiment of the disclosure, in order to rapidly detect whether the first-digit data of the alternative <NUM>-bit data is the same as the previous-digit data adjacent to the first-digit data, the first-digit data of the alternative <NUM>-bit data may be set to a fixed first numerical value, and thus, it may be judged whether the first-digit data of the alternative <NUM>-bit data is the same as the previous-digit data adjacent to the first-digit data by judging the previous-digit data adjacent to the first-digit data is equal to the first numerical value.

Then, the step <NUM> includes:
detecting whether the previous-digit data is the first numerical value; determining that the first-digit data is the same as the previous-digit data when the previous-digit data is the first numerical value; and determining that the first-digit data is different from the previous-digit data when the previous-digit data is not the first numerical value. Exemplarily, reference is made to the above encoding approach, the tenth-digit data enc[<NUM>] = ~din[m] ^ din[m] = <NUM>, for example, enc[<NUM>] = ~din[<NUM>] ^ din[<NUM>] = <NUM>, and at this point, the first numerical value is <NUM>. Of course, the first numerical value may also be set to <NUM>, as long as it is ensured that the encoded data can be decoded by the decoding end, which will not be limited by the embodiment of the disclosure.

If the first-digit data is the same as the previous-digit data, step <NUM> may be performed, and if the first-digit data is different from the previous-digit data, step <NUM> may be performed.

At the step <NUM>, the alternative <NUM>-bit data is inverted to obtain the target <NUM>-bit data, when the numerical value of the first-digit data is the same as that of the previous-digit data. Step <NUM> is to be performed.

Exemplarily, reference is made to <FIG>, which takes two adjacent bytes of the to-be-transmitted data as an example, wherein the first-digit data to the eight-digit data din[<NUM>]-din[<NUM>] of the to-be-encoded byte is <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, and <NUM>, respectively, and the first-digit data to the eight-digit data din[<NUM>]-din[<NUM>] of the previous byte of the to-be-encoded byte is <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, and <NUM>, respectively.

Referring to <FIG>, the first-digit data to the tenth-digit data enc[<NUM>]-enc[<NUM>] of the alternative <NUM>-bit data obtained by encoding the two bytes is <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, and <NUM>, respectively. The first-digit data to the tenth-digit data enc[<NUM>]-enc[<NUM>] of the <NUM>-bit data corresponding to the previous byte of the alternative <NUM>-bit data, i.e., the previous target <NUM>-bit data (<NUM>-bit data which has been encoded), is <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, and <NUM>, respectively. Since the first-digit data of the alternative <NUM>-bit data is <NUM>, its previous-digit data is also <NUM>, and both are the same, the alternative <NUM>-bit data is inverted to obtain the target <NUM>-bit data, and dout[<NUM>]-dout[<NUM>] of the target <NUM>-bit data is <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, and <NUM>, respectively.

At the step <NUM>, the alternative <NUM>-bit data is determined as the target <NUM>-bit data, when the numerical value of the first-digit data is different from that of the previous-digit data. Step <NUM> is to be performed.

Referring to <FIG>, the first-digit data to the tenth-digit data enc[<NUM>]-enc[<NUM>] of the alternative <NUM>-bit data obtained by encoding the two bytes is <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, and <NUM>, respectively. The first-digit data to the tenth-digit data enc[<NUM>]-enc[<NUM>] of the <NUM>-bit data corresponding to the previous byte of the alternative <NUM>-bit data, i.e., the previous target <NUM>-bit data (<NUM>-bit data which has been encoded), is <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, and <NUM>, respectively. Since the first-digit data of the alternative <NUM>-bit data is <NUM>, its previous-digit data is <NUM>, and the two are different, the alternative <NUM>-bit data enc[<NUM>]-enc[<NUM>] may be taken as the target <NUM>-bit data dout[<NUM>]-dout[<NUM>] directly.

The above steps <NUM> to <NUM> may guarantee that there is a jumping edge between every two adjacent encoded bytes (namely, every two <NUM>-bit data), which facilitates the receiving end to clearly differentiate between every two adjacent encoded bytes and implement accurate decoding.

At the step <NUM>, when the to-be-encoded byte is the first byte of the to-be-transmitted data, assume that the previous-digit data of the first-digit data of the <NUM>-bit data is <NUM>, and the alternative <NUM>-bit data is processed according to the step <NUM> or the step <NUM>, to obtain the target <NUM>-bit data. Step <NUM> is to be performed.

In the embodiment of the disclosure, since the to-be-encoded byte is the first byte of the to-be-transmitted data, the previous-digit data of the first-digit data of the alternative <NUM>-bit data does not exist. The one embodiment of the disclosure simply assume that the previous-digit data is <NUM>, and in other embodiments, it may also be assumed that the previous-digit data of its first-digit data is <NUM>, and then other procedures may refer to the above steps <NUM> to <NUM>.

In a practical application, when the to-be-encoded byte is the first byte of the to-be-transmitted data, other approaches may also be employed to process the alternative <NUM>-bit data to obtain the target <NUM>-bit data, as long as it is ensured that the receiving end can effectively decode it.

For example, when the to-be-encoded byte is the first byte of the to-be-transmitted data, that is, the previous-digit data does not exist before its first-digit data, it may be possible to assume that there is a jumping edge between the first-digit data of the alternative <NUM>-bit data and the previous-digit data, and take the alternative <NUM>-bit data as the target <NUM>-bit data directly, of which a specific procedure may refer to the above step <NUM>.

In a practical application, when the to-be-encoded byte is the first byte of the to-be-transmitted data, it may also be possible to assume that there is not a jumping edge between the first-digit data of the alternative <NUM>-bit data and the previous-digit data, the alternative <NUM>-bit data may be inverted to obtain the target <NUM>-bit data, of which a specific procedure may refer to the above step <NUM>.

It further needs to be noted that, when the to-be-encoded byte is the first byte of the to-be-transmitted data, it may also be assumed that the previous-digit data of its first-digit data is <NUM>, and then the above steps <NUM>-<NUM> are performed, which will not be limited by the embodiments of the disclosure.

At the step <NUM>, a first identification code is added at a preset position of the encoded to-be-transmitted data to obtain target data.

The encoded to-be-transmitted data includes the target <NUM>-bit data obtained by encoding the <NUM>-bit data corresponding to the to-be-encoded byte. In an embodiment, to ensure that the receiving end receives data in units of <NUM> bits, the sending end also needs to send data in units of <NUM> bits, and therefore, the first identification code needs to be <NUM>-bit data, and it may be preset data, and it suffices that it plays the role of identification.

In the embodiment of the disclosure, the 8b/10b encoding algorithm provided by the steps <NUM> to <NUM> may guarantee that there is at least one digit different from other digits in any consecutive five digits of <NUM>-bit data.

Therefore, the first identification code may include at least <NUM> consecutive digits of the same data, so as to be distinguished from normally transmitted <NUM>-bit data. Exemplarily, the identification code may include <NUM> consecutive <NUM> or <NUM> consecutive <NUM>, and the first identification code is used for identifying transmitted content, start of transmission or end of transmission.

Exemplarily, the first identification code may be K, of which a specific code value may refer to Table <NUM>.

Therein, 0b represents binary, each identification code in K1 to K4 corresponds to two representations, and its first-digit data (note: meaning the first digit in right low digits here) is determined according to the previous-digit data to ensure that a flipping edge is formed between it and the previous-digit data. For example, when the previous-digit data of the first-digit data of the K1 code is <NUM>, the K1 code of which the first-digit data is <NUM>, namely, <NUM>, is employed, and when the previous-digit data of the first-digit data of the K1 code is <NUM>, the K1 code of which the first-digit data is <NUM>, namely, <NUM>, is employed. Thus, effective recognition of the first identification code may be guaranteed. Exemplarily, in Table <NUM>, K1 is used for indicating start of transmission, K2 is used for indicating transmission cutoff, K3 is used for indicating a cutoff position of a row signal and may further be used for instructing a linear feedback register to perform a reset operation, and K4 is used for indicating end of transmission.

For example, when the first identification code is used for indicating start of transmission, the first identification code may be added in front of the to-be-transmitted data directly, or also may be added in front of the to-be-transmitted data in the form of a combined code. Exemplarily, as shown in <FIG>, when the first identification code is added in front of the to-be-transmitted data in the form of a combined code, a procedure of adding the first identification code in front of the encoded to-be-transmitted data to obtain the target data may include the following steps.

At step <NUM>, the first identification code and a second identification code are spliced to obtain the combined code, the second identification code being preset <NUM>-bit data, the second identification code comprising at least <NUM> consecutive digits of the same data, and the second identification code being different from the first identification code.

In an embodiment of the disclosure, the combined code may include at least one first identification code and at least one second identification code. The numerical value of a first identification code at a different position in one and the same combined code may be different, for example, the first identification codes in the combined code include different K1s in Table <NUM>. Likewise, the numerical value of a second identification code at a different position may be different. The sending end and the receiving end may agree on the arrangement mode of the combined code in advance, and record this by employing a combined code table. In some embodiments, when there is at least one identification code which is transmitted correctly in the combined code, the receiving end may recover the correct combined code by querying the combined code table. For example, the first identification code is K1, the second identification code is G1, and then the combined code may be K1G1G1K1, and when K1 is transmitted erroneously, the receiving end may recover K1G1G1K1 by querying the table according to G1.

Exemplarily, the second identification code may be denoted as G, and G may be in four forms: G1, G2, G3, and G4, of which specific code values may refer to Table <NUM>, in which Ob represents binary.

Exemplarily, assume that the combined code is obtained by combining the first identification code K and the second identification code G in the form of KGKG, and then the combined code table may refer to Table <NUM>. Assume that the received combined code is successively arranged <NUM>, <NUM>, <NUM>, and <NUM>. By employing the combined code to query the combined code table as shown in Table <NUM>, it may be found that all the first <NUM><NUM>-bit data of the combined code are the same as the first <NUM><NUM>-bit data in the combined code in the first row in Table <NUM>, and therefore, it may be determined that the correct combined code is successively arranged <NUM>, <NUM>, <NUM>, and <NUM>, and accordingly the first identification code that may be extracted is K1.

At step <NUM>, the combined code is added at a preset position of the encoded to-be-transmitted data to obtain target data.

In an embodiment, the preset position is determined according to the content indicated by the first identification code. For example, when the first identification code indicates start of transmission, the preset position is a position in front of the to-be-transmitted data, that is, in front of the first-digit data of the first set of <NUM>-bit data; when the first identification code indicates end of transmission, the preset position is a position behind the to-be-transmitted data, that is, behind the last-digit data of the last set of <NUM>-bit data of the to-be-transmitted data; and when the first identification code is used for identifying transmitted content, the preset position may be between two specified sets of <NUM>-bit data of the to-be-transmitted data.

In an embodiment, at step <NUM>, the target data is sent.

In the embodiments of the disclosure, when the sending end of data is a controller, the receiving end of data may be a source driver chip, and when the sending end of data is a source driver chip, the receiving end of data may be a controller. Exemplarily, referring to <FIG>, the controller may send the target data to a corresponding source driver chip by a first signal line (e.g., high speed differential signal line) or the second signal line, which will not be limited by the embodiments of the disclosure.

In an embodiment of the disclosure, after the to-be-transmitted data is encoded, the encoded to-be-transmitted data may be sent to the decoding end. The steps <NUM> and <NUM> are schematically illustrated just taking as an example that the encoded to-be-transmitted data is processed to obtain the target data and then transmitted to the decoding end. In a practical implementation, other processing or no processing may be performed on the encoded to-be-transmitted data, which will not be limited by the embodiment of the disclosure.

It is noted that, the order of the steps of the encoding method provided by the embodiments of the disclosure may be appropriately adjusted, and the steps may also be increased or decreased accordingly according to the situation. Variations of the method easily occurring to any skilled person familiar with the technical field within the technical scope disclosed by the invention should all be encompassed within the protective scope of the invention, and therefore will not be repeated any longer.

For the encoding method provided by the embodiments of the disclosure, at the time of data encoding, <NUM>-bit data is encoded into alternative <NUM>-bit data first, then based on the tenth-digit data in the alternative <NUM>-bit data, it is determined whether an inversion operation is performed on the alternative <NUM>-bit data to obtain ultimate target <NUM>-bit data, thus a jumping edge is arranged between every two adjacent <NUM>-bit data, and based on the tenth-digit data, it may be determined whether the target <NUM>-bit data is data obtained by the inversion operation, which can effectively ensure that the to-be-transmitted data can be correctly recovered at a receiving end, and the jumping edge may effectively reduce transmission errors.

It is noted that, in the current field of timing control, there are usually two approaches for signal transmission, PLL and DLL, wherein the PLL is more common, and the DLL requires that a jumping edge needs to occur in a transmission procedure. However, since it can be ensured that a jumping edge occurs between two adjacent encoded bytes (that is, two adjacent sets of <NUM>-bit data), the above described encoding method may effectively reduce the probability of incorrect transmission, and meet the requirements of the PLL and the DLL, such that the receiving end can support the signal transmission approaches of the PLL and the DLL simultaneously.

In a practical application, the less the consecutive and identical data in the transmitted data, the better the jitter performance is. Since the 8b/10b encoding algorithm provided by the step <NUM> may ensure that at least one of any <NUM> consecutive digits of the <NUM>-bit data is different from the other digits, as compared to the conventional encoding method, it can reduce the amount of consecutive and identical data in every <NUM>-bit data (i.e., each encoded byte), may ensure the encoded data has a better jitter performance in a subsequent transmission procedure, and thereby lower the probability of transmission errors.

Referring to the step <NUM>, since the relationship between respective data of the finally obtained <NUM>-bit data keeps unchanged no matter whether an inversion operation has been performed on to-be-decode <NUM>-bit data at the decoding end, to be adapted to a decoding method in the related art, in an embodiment of the disclosure, it is assumed that specified-digit data in the to-be-decoded <NUM>-bit data is an indication digit for indicating whether to invert, and there is provided a decoding method, which corresponds to the encoding method provided by <FIG> in the embodiment of the disclosure. As shown in <FIG>, the method may be applied in an environment as shown in <FIG>, assume that the specified-digit data is the tenth-digit data, and the method includes the following steps.

The target data includes at least one set of <NUM>-bit data, which is binary data. In an embodiment, the target data generally includes at least two sets of <NUM>-bit data, wherein a first identification code may be included, and the first identification code may identify transmitted content, start of transmission or end of transmission, to facilitate better recognition of to-be-decoded data.

In an embodiment of the disclosure, when the sending end of data is a controller, the receiving end of data may be a source driver chip, and when the sending end of data is a source driver chip, the receiving end of data may be a controller. Exemplarily, as shown in <FIG>, the source driver chip may send the target data to a corresponding controller via a first signal line (e.g., a high speed differential signal line) or the second signal line, which will not be limited by the embodiment of the disclosure.

At step <NUM>, when it is detected that the target data includes a combined code, a first identification code is determined according to the combined code, and to-be-decoded data is determined according to the first identification code.

In an embodiment of the disclosure, the combined code is obtained by splicing the first identification code and a second identification code; the first identification code is preset <NUM>-bit data, and the first identification code includes at least <NUM> consecutive digits of the same data; the second identification code is also preset <NUM>-bit data, and the second identification code also includes at least <NUM> consecutive digits of the same data; and the second identification code is different from the first identification code.

The combined code may include at least one first identification code and at least one second identification code, and the numerical value of a first identification code at a different position in the same combined code may be different. For example, the first identification codes in the combined code include different K1 in table <NUM>. Similarly, the numerical value of a second identification code at a different position may be different. The sending end and the receiving end may pre-agree on an arrangement way of a combined code, and employ a form of a combined code table for record. In some embodiments, when there is at least one identification code in a combined code which is correctly transmitted, the receiving end may recover the correct combined code by querying the combined code table.

When it is detected that the target data includes a combined code, the receiving end may determine a first identification code according to the combined code, and then determine to-be-decoded data according to the first identification code. In particular, the receiving end may query a combined code table according to the combined code, and when there is at least one identification code in the combined code which may be queried in the combined code table, which shows there is at least one identification code transmitted correctly in the combined code, the correct combined code may be recovered by querying the table, and then a first identification code is extracted from a preset position of the combined code, to determine to-be-decoded data.

It is noted that, when any of the identification codes in the combined code cannot be queried in the combined code table, it shows that the combined code is incorrect and the corresponding to-be-decoded data is also transmitted incorrectly, which may not be processed subsequently.

Since the first identification is used for identifying transmitted content, start of transmission or end of transmission, the position of a specific first identification code in the target data is determined according to the first identification code, and then the to-be-decoded data is determined according to the first identification code and its position.

In an embodiment of the disclosure, the first identification code is carried in the form of a combined code, which may improve the accuracy of decoding the first identification code.

At step <NUM>, when it is detected that the target data includes a first identification code, to-be-decoded data is determined according to the first identification code.

The to-be-decoded data includes at least one set of to-be-decoded <NUM>-bit data, the first identification code is preset <NUM>-bit data, and the first identification code includes at least <NUM> consecutive digits of identical data.

Since a first identification code is used for identifying transmitted content, start of transmission or end of transmission, it may be possible to determine the position of a specific first identification code in the target data according to the first identification code, and then determine the to-be-decoded data according to the first identification code and its position. Here, reference may be made to the relevant content at the step <NUM>.

At step <NUM>, the tenth-digit data of the to-be-decoded <NUM>-bit data is detected, the tenth-digit data being used for indicating whether the first <NUM> bits of data in the to-be-decoded <NUM>-bit data have undergone an inversion operation.

In an embodiment of the disclosure, assume that when the tenth-digit data of the to-be-decoded <NUM>-bit data is a first numerical value, it is indicated that the target <NUM>-bit data is determined by performing an inversion operation on the to-be-decoded <NUM>-bit data, that is, it may be considered that the first <NUM> bits of data of the to-be-decoded <NUM>-bit data have undergone an inversion operation, and when the tenth-digit data in the to-be-decoded <NUM>-bit data is not the first numerical value, it is indicated that the target <NUM>-bit data is not determined by performing an inversion operation on the to-be-decoded <NUM>-bit data, that is, it may be considered that the first <NUM> bits of data of the to-be-decoded <NUM>-bit data have not undergone an inversion operation.

At step <NUM>, the first <NUM> bits of data are inverted to obtain pre-decoded <NUM>-bit data, when the tenth-digit data indicates that the first <NUM> bits of data have undergone an inversion operation.

Exemplarily, assume that when the tenth-digit data is <NUM>, it may indicate that the <NUM> bits of data have undergone an inversion operation, and when the tenth-digit data is <NUM>, it may indicate that the <NUM> bits of data have not undergone an inversion operation. Assume that the to-be-decoded <NUM>-bit data is <NUM>. Its tenth digit is <NUM>, showing that the first <NUM> bits of data <NUM> have undergone an inversion operation, and the first <NUM> bits of data <NUM> are inverted to obtain pre-decoded <NUM>-bit data <NUM>.

At step <NUM>, the first <NUM> bits of data are taken as pre-decoded <NUM>-bit data, when the tenth-digit data indicates that the first <NUM> bits of data have not undergone an inversion operation.

Exemplarily, assume that when the tenth-digit data is <NUM>, it may indicate that the <NUM> bits of data have undergone an inversion operation, and when the tenth-digit data is <NUM>, it may indicate that the <NUM> bits of data have not undergone an inversion operation. Assume that the to-be-decoded <NUM>-bit data is <NUM>. Its tenth digit is <NUM>, showing that the first <NUM> bits of data <NUM> have not undergone an inversion operation, and the first <NUM> bits of data <NUM> are taken as pre-decoded <NUM>-bit data <NUM>.

At step <NUM>, the pre-decoded <NUM>-bit data is decoded into <NUM>-bit data.

At least one of any <NUM> consecutive digits of the pre-decoded <NUM>-bit data is different from the other digits, that is, <NUM> consecutive <NUM> or <NUM> consecutive <NUM> will not appear in the <NUM>-bit data. Decoding the pre-decoded <NUM>-bit data into <NUM>-bit data includes decoding the pre-decoded <NUM>-bit data into the <NUM>-bit data as follows:<MAT><MAT><MAT><MAT><MAT> <MAT> <MAT> <MAT> wherein d_code[i] is the (i+<NUM>)-th digit data in the <NUM>-bit data, <NUM>≥i≥<NUM>, and i is an integer; Dout[j] is the (j+<NUM>)-th digit data in the <NUM>-bit data, <NUM>≥j≥<NUM>, and j is an integer; and ^ represents performing an exclusive OR operation, ~ represents performing an inversion operation, & represents performing an AND operation, and | represents performing an OR operation. Therein, explanation of the inversion operation, the AND operation, the OR operation and the exclusive OR operation may be referred to the description with respect to the step <NUM>.

Exemplarily, as shown in <FIG>, assume that the pre-decoded <NUM>-bit data is <NUM>, and its first-digit data to the ninth-digit data is successively <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>, <NUM>. Then, it may be decoded into <NUM>-bit data <NUM> according to the above decoding approach, wherein in the <NUM>-bit data,<MAT><MAT><MAT><MAT><MAT> <MAT> <MAT> <MAT>.

It is noted that, the order of the steps of the decoding method provided by the individual embodiments of the disclosure may be appropriately adjusted, and the steps may also be increased or decreased accordingly according to the situation. For example, the steps <NUM> to <NUM> may not be performed, and it may be possible to take the first <NUM> bits of data as the pre-decoded <NUM>-bit data directly after the step <NUM>. Variations of the method easily occurring to any skilled person familiar with the technical field within the technical scope disclosed by the disclosure should all be encompassed within the protective scope of the invention, and therefore will not be repeated any longer.

Moreover, the above decoding method is just illustrated taking that the tenth-digit data is the specified-digit data as an example. In a practical application, the specified-digit data may also be other-digit data, and the corresponding decoding method may be simply changed referring to the above embodiment, which will not be repeated by the embodiment of the disclosure any longer.

For the decoding method provided by the individual embodiments of the disclosure, at the time of data decoding, the <NUM>-bit data is decoded into <NUM>-bit data according to the tenth-digit data first, and then the <NUM>-bit data is decoded into <NUM>-bit data, which can effectively ensure that the transmitted data can be correctly recovered at a receiving end, and the jumping edge may effectively reduce transmission errors, such that the receiving end can support the clock transmission approaches of the PLL and the DLL simultaneously by the above decoding approach.

An embodiment of the disclosure provides an encoding method. As shown in <FIG>, the method may be applied in an environment as shown in <FIG>, and the method includes the following steps.

At step <NUM>, <NUM>-bit data corresponding to a to-be-encoded byte of to-be-transmitted data is encoded into target <NUM>-bit data, the to-be-transmitted data comprising at least one to-be-encoded byte.

An encoding procedure of the step <NUM> may refer to the procedure of encoding <NUM>-bit data corresponding to a to-be-encoded byte of to-be-transmitted data into alternative <NUM>-bit data at the step <NUM>, which will not be repeated by the embodiment of the disclosure any longer.

At step <NUM>, a first identification code is added at a preset position of the encoded to-be-transmitted data to obtain target data.

The step <NUM> may refer to the step <NUM>.

In an embodiment of the disclosure, after the to-be-transmitted data is encoded, the encoded to-be-transmitted data may be sent to a decoding end. The steps <NUM> and <NUM> are schematically illustrated just taking as an example that the encoded to-be-transmitted data is processed to obtain the target data and then transmitted to the decoding end. In a practical implementation, other processing or no processing may be performed on the encoded to-be-transmitted data, which will not be limited by the embodiment of the disclosure.

An embodiment of the disclosure provides a decoding method, which corresponds to the encoding method provided by <FIG> in the embodiment of the disclosure. As shown in <FIG>, the method may be applied in an environment as shown in <FIG>, and the method includes the following steps.

At step <NUM>, the to-be-decoded <NUM>-bit data is decoded to <NUM>-bit data.

In the embodiment of the disclosure, since steps such as the steps <NUM> to <NUM> are not performed at the encoding end, it is unnecessary to perform actions of <NUM> to <NUM> at the decoding end. At the decoding end, it may be possible to delete the tenth-digit data of the to-be-decoded <NUM>-bit data to obtain pre-decoded <NUM>-bit data, and then decode the pre-decoded <NUM>-bit data to <NUM>-bit data. This procedure may refer to the step <NUM>.

Of course, the decoding end may further adopt other decoding approaches, for example, a decoding procedure at the decoding end employs a reverse procedure of the step <NUM> directly, which will not be repeated by the embodiment of the disclosure.

The decoding method provided by the embodiment of the disclosure may effectively implement the decoding of the encoded data.

An embodiment of the disclosure provides an encoding apparatus, and as shown in <FIG>, the apparatus includes:.

For the encoding apparatus provided by the embodiment of the disclosure, at the time of data encoding, the encoder encodes <NUM>-bit data into alternative <NUM>-bit data first, and then arranges a jumping edge between every two adjacent <NUM>-bit data, which jumping edge may effectively reduce transmission errors. Moreover, the encoding approach as described above meets the requirements of the PLL and the DLL, such that a receiving end can support the signal transmission approaches of the PLL and the DLL simultaneously.

In an embodiment, the encoder <NUM> is used for:.

In an embodiment, the first-digit data of the alternative <NUM>-bit data is a first numerical value,
the detector <NUM> is used for:.

Further, as shown in <FIG>, the encoding apparatus further includes:.

In an embodiment, the processor <NUM> is used for:.

For explanation of the first identification code, the second identification code, the combined identification code and other relevant features, it may further refer to the description in connection with <FIG>.

For the encoding apparatus provided by the embodiments of the disclosure, at the time of data encoding, <NUM>-bit data is encoded into alternative <NUM>-bit data first, then based on the tenth-digit data in the alternative <NUM>-bit data, it is determined whether an inversion operation is performed on the alternative <NUM>-bit data to obtain ultimate target <NUM>-bit data, thus a jumping edge is arranged between every two adjacent <NUM>-bit data, and based on the tenth-digit data, it may be determined whether the target <NUM>-bit data is data obtained by the inversion operation, which can effectively ensure that the to-be-transmitted data can be correctly recovered at a receiving end, and the jumping edge may effectively reduce transmission errors.

An embodiment of the disclosure provides an encoding apparatus comprising:.

The encoding apparatus provided by the embodiment of the disclosure employs the above approach to encode <NUM>-bit data into target <NUM>-bit data, wherein there is at least one digit different from other digits in any consecutive five digits in the obtained target <NUM>-bit data, which, as compared to the conventional encoding method, can reduce the amount of consecutive and identical data in every <NUM>-bit data (i.e., each encoded byte), may ensure the encoded data has a better jitter performance in a subsequent transmission procedure, and thereby lower the probability of transmission errors.

An embodiment of the disclosure provides a display apparatus comprising:.

In a practical application, since two-way transmission may be conducted for data of the controller and the source driver chip, both the controller and the source driver chip may perform data encoding, and both the controller and each said source driver chip include an encoding apparatus provided by the embodiments of the disclosure.

The display apparatus is a liquid crystal display apparatus or an organic light emitting diode (OLED for short), and the controller is at least one of a timing controller, an SOC and an MCU. In an embodiment, the display apparatus may further be any product or component with the display function, such as electronic paper, a panel, a mobile phone, a tablet computer, a television, a notebook computer, a digital photo frame, a navigator, etc..

An embodiment of the disclosure provides a non-transitory computer readable storage medium, and when instructions in the non-transitory computer readable storage medium are executed by a processor, the processor is enabled to perform an encoding method provided by the embodiments of the disclosure.

An embodiment of the disclosure provides a signal transmission system comprising: a controller and a source driver chip comprising a controller and a plurality of source driver chips, both the controller and each of the source driver chips comprising an encoding apparatus as described in any of the third aspect and the fourth aspect.

<FIG> shows a structural schematic diagram of a display apparatus <NUM> provided by an exemplary embodiment of the disclosure. The apparatus <NUM> may be any product or component with the display function, such as a liquid crystal panel, electronic paper, an OLED panel, a mobile phone, a tablet computer, a television, a display, a notebook computer, a digital photo frame, a navigator, etc. The display apparatus includes a controller and a plurality of source driver chips, and the controller is at least one of a timing controller, an SOC and an MCU. In general, the apparatus <NUM> further includes a processor <NUM> and a memory <NUM>.

The processor <NUM> may include one or more processing core, for example, <NUM>-core processor, <NUM>-core processor, etc. The processor <NUM> may be implemented employing at least one hardware form of DSP (digital signal processing), FPGA (field programmable gate array) and PLA (programmable logic array). The processor <NUM> may also include a main processor and a coprocessor, the main processor is a processor for processing data in a wake-up state, also called CPU (central processing unit), and the coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor <NUM> may be integrated with a GPU (graphics processing unit), and the GPU is used for rendering and drawing content that is required by a display screen for display. In some embodiments, the processor <NUM> may further include an AI (artificial intelligence) processor, which AI processor is used for processing computational operations related with machine learning.

The memory <NUM> may include one or more computer readable storage medium, and the computer readable storage medium may be non-transitory. The memory <NUM> may further include a high speed random access memory and a non-volatile memory, for example, one or more disk storage device, a flash storage device. In some embodiments, the non-transitory computer readable storage medium in the memory <NUM> is used for storing at least one instruction, which is used for being processed by the processor <NUM> to implement a data transmission method provided by the method embodiments in this application.

In some embodiments, the apparatus <NUM> may further include a peripheral device interface <NUM> and at least one peripheral device. The processor <NUM>, the memory <NUM> and the peripheral device interface <NUM> may be connected via a bus or a signal line(s). An individual peripheral device may be coupled to the peripheral device interface <NUM> via the bus, a signal line or a circuit board. In particular, the peripheral device includes at least one of an RF circuit <NUM>, a display screen <NUM>, a camera <NUM>, an audio circuit <NUM>, a positioning assembly <NUM> and a power source <NUM>.

The peripheral device interface <NUM> may be used for connecting at least one peripheral device related with I/O (input/output) to the processor <NUM> and the memory <NUM>. In some embodiments, the processor <NUM>, the memory <NUM> and the peripheral device interface <NUM> are integrated into one and the same chip or circuit board; and in some other embodiments, any one or two of the processor <NUM>, the memory <NUM> and the peripheral device interface <NUM> may be implemented in a separate chip or circuit board, which will not be limited by the embodiments.

The RF circuit <NUM> is used for receiving and transmitting an RF (radio frequency) signal, also called an electromagnetic signal. The RF circuit <NUM> communicates with a communication network and other communication devices through an electromagnetic signal. The RF circuit <NUM> converts an electrical signal to an electromagnetic signal for sending, or converts a received electromagnetic signal to an electrical signal. In an embodiment, the RF circuit <NUM> includes an antenna system, an RF transceiver, one or more amplifier, a tuner, an oscillator, a digital signal processor, a codec chipset, a user ID card, etc. The RF circuit <NUM> may communicate with other apparatuses through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to, World Wide Web, Metropolitan Area Network, Intranet, each generation of mobile communication network (<NUM>, <NUM>, <NUM>, and <NUM>), Wireless Local Area Network and/or WiFi (Wireless Fidelity) network. In some embodiments, the RF circuit <NUM> may further include a circuit related with NFC (near field communication), which will not be limited by this application.

The display screen <NUM> is used for displaying a UI (user interface). The UI may include graphics, a text, an icon, a video and any combination thereof. When the display screen <NUM> is a touch display screen, the display screen <NUM> is also capable of capturing a touch signal on or above the surface of the display screen <NUM>. The touch signal may be inputted to the processor <NUM> as a control signal for processing. At this point, the display screen <NUM> may further be used for providing a virtual button and/or virtual keyboard, also called a soft button and/or soft keyboard. In some embodiments, there may be one display screen <NUM>, which is arranged on the front panel of the apparatus <NUM>; in other embodiments, there may be at least two display screens <NUM>, which are arranged on different surfaces of the apparatus <NUM> respectively or take on a folded design; and in still other embodiments, the display screen <NUM> may be a flexible display screen, and arranged on a curved surface or folded surface of the apparatus <NUM>. Moreover, the display screen <NUM> may further be set to a non-rectangular irregular pattern, namely, a special-shaped screen. The display screen <NUM> may be manufactured employing a material such as LCD (liquid crystal display), OLED (organic light emitting diode), etc..

The camera assembly <NUM> is used for capturing an image or video. In an embodiment, the camera assembly <NUM> includes a front camera and a rear camera. Generally, the front camera is arranged on the front panel of the apparatus, and the rear camera is arranged on the back of the apparatus. In some embodiments, there are at least two rear cameras, which are any of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, to achieve fusion of the main camera and the depth-of-field camera to realize the background blurring function, fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (virtual reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly <NUM> may further include a flash. The flash may be a mono-color-temperature flash, or also may be a dual-color-temperature flash. The dual-color-temperature flash refers to a combination of a warm light flash and a cold light flash, and may be used for light compensation at different color temperatures.

The audio circuit <NUM> may include a microphone and a speaker. The microphone is used for capturing sound waves of a user and the environment, and converting the sound waves to an electrical signal to be inputted to the processor <NUM> for processing, or inputted to the RF circuit <NUM> to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be a plurality of microphones, which are arranged at different locations of the apparatus <NUM>, respectively. The microphone may further be an array microphone or an omnidirectional acquisition microphone. The speaker is used for converting an electrical signal from the processor <NUM> or the RF circuit <NUM> to sound waves. The speaker may be a conventional thin film speaker, or also may be a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it may not only convert an electrical signal to sound waves audible to humans, but also convert the electrical signal to sound waves inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit <NUM> may further include a headphone jack.

The positioning assembly <NUM> is used for positioning the current geographic position of the apparatus <NUM> to implement navigation or LBS (location based service). The positioning assembly <NUM> may be one based on the GPS (Global Positioning System) of America, the Beidou system of China or the Galileo system of Russia.

The power source <NUM> is used for powering individual components in the apparatus <NUM>. The power source <NUM> may be an AC, DC, disposable battery or rechargeable battery. When the power source <NUM> comprises a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged by a wired line, and the wireless rechargeable battery is a battery charged by a wireless coil. The rechargeable battery may further be used for supporting the fast charging technology.

In some embodiments, the apparatus <NUM> further includes one or more sensor <NUM>. The one or more sensor <NUM> includes, but is not limited to, an acceleration sensor <NUM>, a gyroscope sensor <NUM>, a pressure sensor <NUM>, a fingerprint sensor <NUM>, an optical sensor <NUM> and a proximity sensor <NUM>.

The acceleration sensor <NUM> may detect accelerations on three coordinate axes of a coordinate system established according to the apparatus <NUM>. For example, the acceleration sensor <NUM> may be used for detecting components on the three coordinate axes of the gravitational acceleration. The processor <NUM> may control the touch display screen <NUM> to conduct display of the user interface in a horizontal view or a vertical view, according to the gravitational acceleration signal captured by the acceleration sensor <NUM>. The acceleration sensor <NUM> may further be used for collecting movement data of a user or a game.

The gyroscope sensor <NUM> may detect the body direction and the rotation angle of the apparatus <NUM>, and the gyroscope sensor <NUM> may cooperate with the acceleration sensor <NUM> to capture a user's 3D action on the apparatus <NUM>. The processor <NUM> may achieve the following functions according to the data captured by the gyroscope sensor <NUM>: motion sensing (for example, changing the UI according to the tilt operation of the user), image stabilization during shooting, game control and inertial navigation.

The pressure sensor <NUM> may be arranged at a side frame of the apparatus <NUM> and/or a lower layer of the touch display screen <NUM>. When the pressure sensor <NUM> is arranged at a side frame of the apparatus <NUM>, it may detect a user's holding signal for the apparatus <NUM>, and the processor <NUM> performs left or right hand recognition or shortcut operation according to the holding signal captured by the pressure sensor <NUM>. When the pressure sensor <NUM> is arranged at a lower layer of the touch display screen <NUM>, the processor <NUM> realizes control of an operable control on the UI interface according to a user's pressure operation on the touch display screen <NUM>. The operable control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.

The fingerprint sensor <NUM> is used for capturing a fingerprint of a user, and the processor <NUM> identifies the identity of the user according to the fingerprint captured by the fingerprint sensor <NUM>, or the fingerprint sensor <NUM> identifies the identity of the user according to the captured fingerprint. When the identity of the user is identified as a trusted identity, the processor <NUM> authorizes the user to perform a related sensitive operation, which sensitive operation includes unlocking screen, viewing encrypted information, downloading software, paying and changing settings, etc. The fingerprint sensor <NUM> may be arranged on the front, back or side of the apparatus <NUM>. When the apparatus <NUM> is arranged with a physical button or manufacturer's Logo, the fingerprint sensor <NUM> may be integrated with the physical button or manufacturer's Logo.

The optical sensor <NUM> is used for capturing ambient light intensity. In an embodiment, the processor <NUM> may control the display brightness of the touch display screen <NUM> according to the ambient light intensity captured by the optical sensor <NUM>. In particular, when the ambient light intensity is high, the display brightness of the touch display screen <NUM> is increased; and when the ambient light intensity is low, the display brightness of the touch display screen <NUM> is decreased. In a further embodiment, the processor <NUM> may further dynamically adjust a shooting parameter of the camera assembly <NUM> according to the ambient light intensity captured by the optical sensor <NUM>.

The proximity sensor <NUM>, also called a distance sensor, is generally arranged at the front panel of the apparatus <NUM>. The proximity sensor <NUM> is used for capturing the distance between the user and the front of the apparatus <NUM>. In an embodiment, when the proximity sensor <NUM> detects that the distance between the user and the front of the apparatus <NUM> decreases gradually, the processor <NUM> controls the touch display screen <NUM> to switch from a bright-screen state to an turnoff-screen state; and when the proximity sensor <NUM> detects that the distance between the user and the front of the apparatus <NUM> increases gradually, the processor <NUM> controls the touch display screen <NUM> to switch from the turnoff-screen state to the bright-screen state.

It may be appreciated by the person having ordinary skills in the art that, the structure shown in <FIG> does not constitute a limitation to the apparatus <NUM>, may include more or less components than the figure, or combine some components, or employ a different component arrangement.

An embodiment of the disclosure provides a chip, and the chip includes a programmable logic circuit and/or a program instruction, which is used for implementing an encoding method provided by the embodiments of the disclosure when the chip runs.

An embodiment of the disclosure provides a computer program product, and in the computer program product is stored an instruction, which causes a computer to perform an encoding method provided by the embodiments of the disclosure when it runs on the computer.

For the apparatuses in the above embodiments, specific approaches for performing operations by their respective components have been described in detail in relevant method embodiments, which will not be elucidated here. Moreover, in the individual embodiments of the disclosure, "/" may represent conversion, for example, 8b/10b represents converting <NUM>-bit data into <NUM>-bit data.

In this text, various techniques may be described in the general context of software, hardware, element or program modules. In general, these modules include routines, programs, objects, elements, components, data structures, etc. for performing specific tasks or implementing specific abstract data types. The terms "module", "function" and "component", etc. used in this text generally represent software, firmware, hardware or a combination thereof. Features of the techniques described in this text are independent of a platform, which means that the techniques may be realized on various computing platforms with various processors.

Other implementation schemes of this application will easily occur to the person having skills in the art after considering the specification and practicing the invention disclosed herein. This application aims at covering any variations, uses or adaptations of this application, and these variations, uses or adaptations follow the general principles of this application and include common sense or common technical means in the art which is not disclosed by this application. The specification and the embodiments are simply deemed as exemplary, and the scope of this application is identified by the claims.

Claim 1:
An encoding method, comprising encoding (<NUM>) <NUM>-bit data corresponding to a to-be-encoded byte of to-be-transmitted data into alternative <NUM>-bit data, the to-be-transmitted data comprising at least one to-be-encoded byte, characterized by further comprising:
detecting (<NUM>) whether the first-digit data of the alternative <NUM>-bit data is the same as the previous-digit data adjacent to the first-digit data, when the to-be-encoded byte is not the first byte of the to-be-transmitted data;
inverting (<NUM>) the alternative <NUM>-bit data to obtain target <NUM>-bit data, when the numerical value of the first-digit data is the same as that of the previous-digit data;
determining (<NUM>) the alternative <NUM>-bit data as the target <NUM>-bit data, when the numerical value of the first-digit data is different from that of the previous-digit data;
wherein the <NUM>-bit data, the alternative <NUM>-bit data and the target <NUM>-bit data is all binary data.