CN113438051A - Encoding method, encoding device, and storage medium - Google Patents

Encoding method, encoding device, and storage medium Download PDF

Info

Publication number
CN113438051A
CN113438051A CN202110652223.6A CN202110652223A CN113438051A CN 113438051 A CN113438051 A CN 113438051A CN 202110652223 A CN202110652223 A CN 202110652223A CN 113438051 A CN113438051 A CN 113438051A
Authority
CN
China
Prior art keywords
bit
data
original
stream data
bit stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110652223.6A
Other languages
Chinese (zh)
Inventor
刘金风
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL China Star Optoelectronics Technology Co Ltd
TCL Huaxing Photoelectric Technology Co Ltd
Original Assignee
TCL Huaxing Photoelectric Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TCL Huaxing Photoelectric Technology Co Ltd filed Critical TCL Huaxing Photoelectric Technology Co Ltd
Priority to CN202110652223.6A priority Critical patent/CN113438051A/en
Publication of CN113438051A publication Critical patent/CN113438051A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • H04L1/0007Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format by modifying the frame length
    • H04L1/0008Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format by modifying the frame length by supplementing frame payload, e.g. with padding bits

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The embodiment of the invention discloses an encoding method, an encoding device and a storage medium; the encoding method comprises the steps of obtaining original bit stream data; determining a first data relation criterion, and judging the original bit stream data according to the first data relation criterion; if the position information of the continuous same logic value in the original bit stream data meets the first data relation criterion, carrying out logic operation on the original bit stream data to obtain target bit stream data of which the position information of the continuous same logic value meets a second data relation criterion; wherein the intersection of the first data relationship criterion and the second data relationship criterion is an empty set; the embodiment of the invention only encodes the data segment which is possible to generate error codes in the transmission process, thereby saving the transmission channel and improving the transmission efficiency of the data.

Description

Encoding method, encoding device, and storage medium
Technical Field
The present invention relates to the field of display, and in particular, to an encoding method, an encoding apparatus, and a storage medium.
Background
Digital signal encoding techniques usually perform logical operations on all data packets (i.e., bit streams), which results in that a lot of time and effort are consumed for data encoding and decoding during data transmission, thereby causing slow data transmission, affecting response time, reducing image quality, and having low channel utilization rate, which is not favorable for data transmission efficiency.
Therefore, an encoding method, an encoding apparatus and a storage medium are needed to solve the above technical problems.
Disclosure of Invention
Embodiments of the present invention provide an encoding method, an encoding apparatus, and a storage medium, which can solve the technical problem that a large amount of time and effort are required to be consumed for data encoding in the transmission process at present.
The embodiment of the invention provides an encoding method, which comprises the following steps:
acquiring original bit stream data;
determining a first data relation criterion, and judging the original bit stream data according to the first data relation criterion;
if the position information of the continuous same logic value in the original bit stream data meets the first data relation criterion, performing logic operation on the original bit stream data to obtain target bit stream data of which the position information of the continuous same logic value meets a second data relation criterion;
wherein an intersection of the first data relationship criterion and the second data relationship criterion is an empty set.
In an embodiment, the original bitstream data has a bit number of 8, and if the position information of consecutive identical logic values in the original bitstream data satisfies the first data relation criterion, the step of performing a logic operation on the original bitstream data includes: if the continuous same logic values in the original bit stream data are from the 4 th bit to the 7 th bit, performing logic operation on the original bit stream data; or if the continuous same logic values in the original bit stream data are from bit 1 to bit 6, performing logic operation on the original bit stream data; or if the continuous same logic values in the original bit stream data are from bit 1 to bit 6, performing logic operation on the original bit stream data; or if the continuous same logic values in the original bit stream data are from 0 th bit to 4 th bit, the logic value of the 0 th bit is opposite to the logic value of the 6 th bit, and the logic value of the 0 th bit is opposite to the logic value of the 7 th bit, performing logic operation on the original bit stream data.
In one embodiment, the step of performing a logical operation on the original bitstream data comprises: determining a first parameter according to the logic value of a first designated bit and the logic value of a second designated bit of the original bit stream data; and performing logic operation on the original bit stream data by using the first parameter.
In an embodiment, the step of determining the first parameter according to the logic value of the first designated bit and the logic value of the second designated bit of the original bitstream data comprises: if the logic value of a first designated bit of the original bit stream data is the same as that of a second designated bit, the first parameter is 0; if the logic value of the first designated bit of the original bit stream data is different from the logic value of the second designated bit, the first parameter is 1.
In an embodiment, the step of performing a logical operation on the original bitstream data by using the first parameter includes: performing any one of the following operation modes on the original bit stream data: and carrying out non-operation, carrying out logical operation with the first parameter and directly assigning values.
In an embodiment, the step of determining the first parameter according to the logic value of the first designated bit and the logic value of the second designated bit of the original bitstream data comprises: determining the first parameter according to the logic value of the 0 th bit and the logic value of the 1 st bit of the original bit stream data; or the number of bits of the original bit stream data is m bits, and the first parameter is determined according to the logic value of the (m-1) th bit and the logic value of the second (m-2) th bit of the original bit stream data.
In an embodiment, the step of performing a logical operation on the original bitstream data to obtain target bitstream data having position information of consecutive same logical values satisfying the second data relation criterion includes: after inverting the 1 st bit of the original bit stream data, assigning the bit as the 0 th bit of the target bit stream data; after inverting the 1 st bit of the original bit stream data, assigning the bit as the 1 st bit of the target bit stream data; assigning the 1 st bit of the original bit stream data as the 2 nd bit of the target bit stream data; assigning a 2 nd bit of the original bitstream data to a 3 rd bit of the target bitstream data; after inverting the 3 rd bit of the original bit stream data, assigning a value subjected to exclusive OR operation with the first parameter as the 4 th bit of the target bit stream data; assigning the value of the XOR operation of the 4 th bit of the original bit stream data and the first parameter as the 5 th bit of the target bit stream data; after inverting the 5 th bit of the original bit stream data, assigning the 5 th bit as the 6 th bit of the target bit stream data; after inverting the 6 th bit of the original bit stream data, assigning a value subjected to exclusive OR operation with the first parameter as the 7 th bit of the target bit stream data; and assigning the value obtained by carrying out XOR operation on the 7 th bit of the original bit stream data and the first parameter as the 8 th bit of the target bit stream data.
In one embodiment, the encoding method further comprises the steps of: performing bit increasing operation on the original bit stream data to obtain first bit stream data; and when the position information of continuous same logic values in the original bit stream data does not meet the first data relation criterion, taking the first bit stream data as the target bit stream data.
An embodiment of the present invention further provides an encoding apparatus, where the encoding apparatus includes:
an acquisition unit configured to acquire original bit stream data;
the logic operation unit is used for carrying out bit increasing operation;
and the encoding unit is used for determining a first data relation criterion, judging the original bit stream data according to the first data relation criterion, and if the position information of continuous same logic values in the original bit stream data meets the first data relation criterion, performing logic operation on the original bit stream data to acquire target bit stream data of which the position information of continuous same logic values meets a second data relation criterion.
An embodiment of the present invention further provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform steps in any one of the above encoding methods.
The embodiment of the invention only encodes the data segment which is possible to generate error codes in the transmission process, thereby saving the transmission channel and improving the transmission efficiency of the data.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a first flowchart of an encoding method according to an embodiment of the present invention;
fig. 2 is a second flowchart of an encoding method according to an embodiment of the present invention;
fig. 3 is a third flowchart illustrating an encoding method according to an embodiment of the present invention;
fig. 4 is a fourth flowchart illustrating an encoding method according to an embodiment of the present invention;
fig. 5 is a fifth flowchart illustrating an encoding method according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an encoding apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a storage medium according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. Furthermore, it should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, and are not intended to limit the present invention. In the present invention, unless otherwise specified, the use of directional terms such as "upper" and "lower" generally means upper and lower in the actual use or operation of the device, particularly in the orientation of the figures of the drawings; while "inner" and "outer" are with respect to the outline of the device.
Digital signal encoding techniques usually perform logical operations on all data packets (i.e., bit streams), which results in that a lot of time and effort are consumed for data encoding and decoding during data transmission, thereby causing slow data transmission, affecting response time, reducing image quality, and having low channel utilization rate, which is not favorable for data transmission efficiency.
Referring to fig. 1 to 5, an embodiment of the invention provides an encoding method, including the following steps:
s100, acquiring original bit stream data;
s200, determining a first data relation criterion, and judging the original bit stream data according to the first data relation criterion;
s300, if the position information of the continuous same logic value in the original bit stream data meets the first data relation criterion, carrying out logic operation on the original bit stream data to obtain target bit stream data of which the position information of the continuous same logic value meets a second data relation criterion;
wherein an intersection of the first data relationship criterion and the second data relationship criterion is an empty set.
The embodiment of the invention only encodes the data segment which is possible to generate error codes in the transmission process, thereby saving the transmission channel and improving the transmission efficiency of the data.
The technical solution of the present invention will now be described with reference to specific embodiments.
Meanwhile, it should be noted that the symbols or expressions appearing in the embodiments of the present application represent the following meanings:
in the corresponding bit stream, the lowest bit is the 0 th bit N [0], the next lowest bit is the 1 st bit N [1], and so on until the highest bit. For example, the bitstream data is 0101, and the logical value corresponding to the 0 th bit is 1, the logical value corresponding to the 1 st bit is 0, the logical value corresponding to the second bit is 1, and the logical value corresponding to the third bitstream is 0. Where bit 0 represents a position in the bitstream, the logical value is usually "0" or "1", and the other bits can be analogized in turn.
"a ═ B" represents: a is identical to B.
"a ═ B" represents: b is assigned to A.
"a ═ B" represents: b is assigned to A after negation.
"-B" represents: not, i.e. negating B.
"^ B" stands for: and (4) carrying out exclusive-or operation.
The encoding method includes the steps of:
s100, obtaining original bitstream data, specifically referring to fig. 1.
In this embodiment, the number of bits of the original bitstream data is 8. The bit number of the target bit stream data is 9. The original bit stream data is represented by M [ x: y ], such as M [7:0], representing the logical values of the 0 th bit to the 7 th bit of the original bit stream; the target bitstream data is represented by N [ x: y ], e.g., N [8:0], representing the logical values of the 0 th bit through the 8 th bit of the target bitstream, as shown in FIG. 3.
In this embodiment, step S100 includes:
and S110, acquiring original bit stream data.
S120, determining a first parameter according to the logic value of the first designated bit and the logic value of the second designated bit of the original bit stream data.
In the present embodiment, step S120 may be performed in step S100 or step S300.
In this embodiment, step S120 includes:
s121, determining whether the logic value of the first designated bit of the original bitstream data is the same as the logic value of the second designated bit, specifically referring to fig. 2.
S122a, if the logic value of the first designated bit of the original bitstream data is the same as the logic value of the second designated bit, the first parameter is 0, specifically referring to fig. 2.
In this embodiment, the first parameter is represented by X, and when a logical value of a first specified bit of the original bitstream data is the same as a logical value of a second specified bit, X is 0.
S122b, if the logic value of the first designated bit of the original bitstream data is different from the logic value of the second designated bit, the first parameter is 1, specifically referring to fig. 2.
In this embodiment, the first parameter is represented by X, and when a logical value of a first specified bit of the original bitstream data is different from a logical value of a second specified bit, X is 1.
In this embodiment, the first designated bit is a 0 th bit, and the second designated bit is a 1 st bit; or the number of bits of the original bit stream data is m bits, the first designated bit is the (m-1) th bit, and the second designated bit is the (m-2) th bit. m is an integer greater than or equal to 1.
In this embodiment, the number of bits of the original bitstream data is 8 bits, the first designated bit is a 0 th bit, and the second designated bit is a 1 st bit; or, the first designated bit is a 7 th bit, and the second designated bit is a 6 th bit. Expressed in logical language as "M [1] ═ M [0], or M [7] ═ M [6 ]".
S200, determining a first data relation criterion, and determining the original bitstream data according to the first data relation criterion, specifically referring to fig. 1.
In this embodiment, step S200 includes:
s210, determining a first data relation criterion.
In this embodiment, the number of bits of the original bitstream data is 8 bits, the first data relation criterion may be that the number corresponding to the positions of consecutive identical logic values is greater than or equal to 4, for example, 11110000, and the number corresponding to the positions of consecutive identical logic values is 4, so as to satisfy the first data relation criterion.
In this embodiment, the number of bits of the original bitstream data is 8 bits, and the first data relation criterion may be whether any of the following conditions is satisfied: a. the continuous same logic values in the original bit stream data are from 4 th bit to 7 th bit; b. the continuous same logic values in the original bit stream data are bit 1 to bit 6; c. the continuous same logic values in the original bit stream data are bit 1 to bit 6; d. the continuous same logic values in the original bit stream data are from 0 th bit to 4 th bit, the logic value of the 0 th bit is opposite to that of the 6 th bit, and the logic value of the 0 th bit is opposite to that of the 7 th bit. Examples of the case satisfying d are 00011111.
S220, judging the original bit stream data according to the first data relation criterion.
In this embodiment, the first data relation criterion in step S200 is expressed in logic language as "NAND (M [7:4]), NAND (M [6:1]), NAND (M [5:0]), OR (NAND (M [7:6]), OR (M [4:0])) OR (M [7:6]), NAND (M [4:0])) OR (M [7:4]), OR (M [6:1]), OR (M [5:0])) 1. Wherein NAND means "and operation first and then negation", referring to fig. 4 and 5.
S300, if the position information of the continuous same logic value in the original bitstream data meets the first data relation criterion, performing a logic operation on the original bitstream data to obtain target bitstream data whose position information of the continuous same logic value meets a second data relation criterion, as shown in fig. 1.
In this embodiment, an intersection of the first data relationship criterion and the second data relationship criterion is an empty set. The first data relation criterion and the second data relation criterion are mutually exclusive, that is, the target bitstream data is obtained by performing logic operation on the original bitstream data, and the target bitstream data does not satisfy the first data relation criterion, so that the number of positions corresponding to the continuous same logic value of the target bitstream data may be less than 4.
In this embodiment, step S300 includes:
s310a, if the position information of consecutive identical logic values in the original bitstream data satisfies the first data relation criterion, performing a logic operation on the original bitstream data.
In this embodiment, the step of performing the logic operation on the original bitstream data may include step S120, and please refer to any of the above embodiments for specific embodiments of step S120.
In this embodiment, the step of performing the logic operation on the original bitstream data further includes:
s311, performing logic operation on the original bit stream data by using the first parameter.
In this embodiment, any one of the following operation methods is performed on the original bitstream data: and carrying out non-operation, carrying out logical operation with the first parameter and directly assigning values.
In this embodiment, step S311 includes, with reference to fig. 4 and 5:
s311a, inverting the 1 st bit of the original bitstream data, and assigning the bit to be the 0 th bit of the target bitstream data.
S311b, inverting the 1 st bit of the original bitstream data, and assigning the bit to be the 1 st bit of the target bitstream data.
S311c, assigning the 1 st bit of the original bitstream data to be the 2 nd bit of the target bitstream data.
S311d, assigning the 2 nd bit of the original bitstream data to be the 3 rd bit of the target bitstream data.
S311e, after inverting the 3 rd bit of the original bitstream data, assigning the value obtained by performing an exclusive or operation with the first parameter as the 4 th bit of the target bitstream data.
S311f, assigning the value obtained by xoring the 4 th bit of the original bitstream data with the first parameter as the 5 th bit of the target bitstream data.
S311g, inverting the 5 th bit of the original bitstream data, and assigning the bit to be the 6 th bit of the target bitstream data.
S311h, after inverting the 6 th bit of the original bitstream data, assigning a value obtained by performing an exclusive or operation with the first parameter as the 7 th bit of the target bitstream data.
S311i, assigning the value obtained by xoring the 7 th bit of the original bitstream data with the first parameter to be the 8 th bit of the target bitstream data.
In this embodiment, referring to fig. 4 and 5 specifically, step S311 is expressed by the logic language as:
N[0]=~M[1]
N[1]=~M[1]
N[2]=M[1]
N[3]=M[2]
N[4]=~X^M[3]
N[5]=X^M[4]
N[6]=~M[5]
N[7]=~X^M[6]
N[8]=X^M[7]。
in fig. 4 and 5, step S300 is simply replaced with step S311.
In this embodiment, the encoding method further includes:
s410, performing a bit increasing operation on the original bitstream data to obtain a first bitstream data, specifically referring to fig. 2 and fig. 3.
In this embodiment, the ith bit of the original bitstream data is assigned to be the (i +1) th bit of the first bitstream data;
and after inverting the 0 th bit of the original bit stream data, assigning the bit as the 0 th bit of the first bit stream data.
In this embodiment, i is an integer greater than or equal to 0.
In this embodiment, the number of bits of the original bitstream data is 8, the number of bits of the first bitstream data is 9, and the first bitstream data is represented by P [ x, y ].
In this embodiment, the bit-adding operation includes the following steps: directly assigning the 0 th bit to the 7 th bit of the original bit stream data as the 1 st bit to the 8 th bit of the first bit stream data respectively, after inverting the logic value of the 0 th bit of the original bit stream data, assigning the 0 th bit as the 0 th bit of the first bit stream data, and expressing the 0 th bit as follows by using a logic language: see fig. 4 and 5 for details, P [8:1] ═ M [7:0] and P [0] ═ M [0 ].
In this embodiment, step S410 may be located before step S200, specifically referring to fig. 5, or located after when the position information of consecutive identical logic values in the original bitstream data does not satisfy the first data relation criterion, specifically referring to fig. 4, one step less operation may be performed.
In this embodiment, if the position information of the continuous same logical value in the original bitstream data does not satisfy the first data relation criterion, step S420 is performed:
s420, regarding the first bitstream data as the target bitstream data, specifically referring to fig. 2 and fig. 3.
In this embodiment, the 0 th bit to the 8 th bit of the first bit stream data are directly assigned as the 0 th bit to the 8 th bit of the target bit stream data, and the first bit stream data is expressed as N [8:0] ═ P [8:0] in a logical language as the target bit stream data, specifically referring to fig. 4 and 5.
In this embodiment, the encoding method further includes:
s500, outputting the target bitstream data, specifically referring to fig. 2 and fig. 3.
The embodiment of the invention only encodes the data segment which is possible to generate error codes in the transmission process, thereby saving the transmission channel and improving the transmission efficiency of the data.
Referring to fig. 6, an embodiment of the present invention further provides an encoding apparatus 10, including:
an acquisition unit 20 for acquiring original bit stream data;
a logic operation unit 30 for performing a bit increment operation;
the encoding unit 40 is configured to determine a first data relationship criterion, determine the original bitstream data according to the first data relationship criterion, and perform a logical operation on the original bitstream data if position information of consecutive same logical values in the original bitstream data satisfies the first data relationship criterion, so as to obtain target bitstream data whose position information of consecutive same logical values satisfies a second data relationship criterion.
The technical solution of the present invention will now be described with reference to specific embodiments.
In this embodiment, the bit number of the original bit stream data is 8, the bit number of the target bit stream is 9, and the encoding device 10 is further configured to perform a logic operation on the original bit stream data if consecutive identical logic values in the original bit stream data are from the 4 th bit to the 7 th bit; or if the continuous same logic values in the original bit stream data are from bit 1 to bit 6, performing logic operation on the original bit stream data; or if the continuous same logic values in the original bit stream data are from bit 1 to bit 6, performing logic operation on the original bit stream data; or if the continuous same logic values in the original bit stream data are from 0 th bit to 4 th bit, the logic value of the 0 th bit is opposite to the logic value of the 6 th bit, and the logic value of the 0 th bit is opposite to the logic value of the 7 th bit, performing logic operation on the original bit stream data.
In this embodiment, the encoding device 10 is further configured to perform the logic operation on the original bitstream data, including: determining a first parameter according to the logic value of a first designated bit and the logic value of a second designated bit of the original bit stream data; and performing logic operation on the original bit stream data by using the first parameter.
In this embodiment, the encoding device 10 further includes a step of determining the first parameter according to the logic value of the first designated bit and the logic value of the second designated bit of the original bitstream data, including: if the logic value of a first designated bit of the original bit stream data is the same as that of a second designated bit, the first parameter is 0; if the logic value of the first designated bit of the original bit stream data is different from the logic value of the second designated bit, the first parameter is 1.
In this embodiment, the encoding device 10 further includes a logic unit for performing a logic operation on the original bitstream data by using the first parameter, including: performing any one of the following operation modes on the original bit stream data: and carrying out non-operation, carrying out logical operation with the first parameter and directly assigning values.
In this embodiment, the encoding device 10 further includes a step of determining the first parameter according to the logic value of the first designated bit and the logic value of the second designated bit of the original bitstream data, including: determining the first parameter according to the logic value of the 0 th bit and the logic value of the 1 st bit of the original bit stream data; or the number of bits of the original bit stream data is m bits, and the first parameter is determined according to the logic value of the (m-1) th bit and the logic value of the second (m-2) th bit of the original bit stream data.
In this embodiment, the encoding device 10 further includes a step of obtaining target bitstream data in which the original bitstream data has 8 bits and the target bitstream data has 9 bits, and performing a logical operation on the original bitstream data to obtain target bitstream data in which position information of consecutive identical logical values satisfies a second data relation criterion, the step including: after inverting the 1 st bit of the original bit stream data, assigning the bit as the 0 th bit of the target bit stream data; after inverting the 1 st bit of the original bit stream data, assigning the bit as the 1 st bit of the target bit stream data; assigning the 1 st bit of the original bit stream data as the 2 nd bit of the target bit stream data; assigning a 2 nd bit of the original bitstream data to a 3 rd bit of the target bitstream data; after inverting the 3 rd bit of the original bit stream data, assigning a value subjected to exclusive OR operation with the first parameter as the 4 th bit of the target bit stream data; assigning the value of the XOR operation of the 4 th bit of the original bit stream data and the first parameter as the 5 th bit of the target bit stream data; after inverting the 5 th bit of the original bit stream data, assigning the 5 th bit as the 6 th bit of the target bit stream data; after inverting the 6 th bit of the original bit stream data, assigning a value subjected to exclusive OR operation with the first parameter as the 7 th bit of the target bit stream data; and assigning the value obtained by carrying out XOR operation on the 7 th bit of the original bit stream data and the first parameter as the 8 th bit of the target bit stream data.
In this embodiment, the encoding apparatus 10 further includes a step for the encoding method, further including: performing bit increasing operation on the original bit stream data to obtain first bit stream data; and when the position information of continuous same logic values in the original bit stream data does not meet the first data relation criterion, taking the first bit stream data as the target bit stream data.
The embodiment of the invention only encodes the data segment which is possible to generate error codes in the transmission process, thereby saving the transmission channel and improving the transmission efficiency of the data.
Referring to fig. 7, an embodiment of the present invention further provides a storage medium 1, where the storage medium 1 stores a plurality of instructions, and the instructions are suitable for being loaded by the processor 2 to perform steps in any of the above encoding methods.
Please refer to any embodiment of the above encoding method for steps in a specific encoding method, which is not described herein again.
The embodiment of the invention discloses an encoding method, an encoding device and a storage medium; the encoding method comprises the steps of obtaining original bit stream data; determining a first data relation criterion, and judging the original bit stream data according to the first data relation criterion; if the position information of the continuous same logic value in the original bit stream data meets the first data relation criterion, carrying out logic operation on the original bit stream data to obtain target bit stream data of which the position information of the continuous same logic value meets a second data relation criterion; wherein the intersection of the first data relationship criterion and the second data relationship criterion is an empty set; the embodiment of the invention only encodes the data segment which is possible to generate error codes in the transmission process, thereby saving the transmission channel and improving the transmission efficiency of the data.
The encoding method, the encoding apparatus and the storage medium provided by the embodiments of the present invention are described in detail above, and the principles and embodiments of the present invention are explained herein by applying specific examples, and the descriptions of the above embodiments are only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An encoding method, comprising the steps of:
acquiring original bit stream data;
determining a first data relation criterion, and judging the original bit stream data according to the first data relation criterion;
if the position information of the continuous same logic value in the original bit stream data meets the first data relation criterion, performing logic operation on the original bit stream data to obtain target bit stream data of which the position information of the continuous same logic value meets a second data relation criterion;
wherein an intersection of the first data relationship criterion and the second data relationship criterion is an empty set.
2. The encoding method according to claim 1, wherein the original bitstream data has a bit number of 8, and the step of performing the logical operation on the original bitstream data if the position information of consecutive identical logical values in the original bitstream data satisfies the first data relation criterion comprises:
if the continuous same logic values in the original bit stream data are from the 4 th bit to the 7 th bit, performing logic operation on the original bit stream data; alternatively, the first and second electrodes may be,
if the continuous same logic values in the original bit stream data are from bit 1 to bit 6, performing logic operation on the original bit stream data; alternatively, the first and second electrodes may be,
if the continuous same logic values in the original bit stream data are from bit 1 to bit 6, performing logic operation on the original bit stream data; alternatively, the first and second electrodes may be,
and if the continuous same logic values in the original bit stream data are from 0 bit to 4 bit, the logic value of the 0 bit is opposite to the logic value of the 6 bit, and the logic value of the 0 bit is opposite to the logic value of the 7 bit, performing logic operation on the original bit stream data.
3. The encoding method according to claim 1, wherein the step of performing a logical operation on the original bitstream data comprises:
determining a first parameter according to the logic value of a first designated bit and the logic value of a second designated bit of the original bit stream data;
and performing logic operation on the original bit stream data by using the first parameter.
4. The encoding method as claimed in claim 3, wherein the step of determining the first parameter according to the logic values of the first and second designated bits of the original bitstream data comprises:
if the logic value of a first designated bit of the original bit stream data is the same as that of a second designated bit, the first parameter is 0;
if the logic value of the first designated bit of the original bit stream data is different from the logic value of the second designated bit, the first parameter is 1.
5. The encoding method according to claim 4, wherein the step of performing a logical operation on the original bitstream data using the first parameter comprises:
performing any one of the following operation modes on the original bit stream data: and carrying out non-operation, carrying out logical operation with the first parameter and directly assigning values.
6. The encoding method as claimed in claim 5, wherein the step of determining the first parameter according to the logic values of the first and second designated bits of the original bitstream data comprises:
determining the first parameter according to the logic value of the 0 th bit and the logic value of the 1 st bit of the original bit stream data; alternatively, the first and second electrodes may be,
the number of bits of the original bit stream data is m bits, and the first parameter is determined according to the logic value of the (m-1) th bit and the logic value of the second (m-2) th bit of the original bit stream data.
7. The encoding method according to claim 6, wherein the original bitstream data has a bit number of 8 bits, the target bitstream data has a bit number of 9 bits, and the step of performing the logical operation on the original bitstream data to obtain the target bitstream data having the position information of the consecutive same logical values satisfying the second data relation criterion comprises:
after inverting the 1 st bit of the original bit stream data, assigning the bit as the 0 th bit of the target bit stream data;
after inverting the 1 st bit of the original bit stream data, assigning the bit as the 1 st bit of the target bit stream data;
assigning the 1 st bit of the original bit stream data as the 2 nd bit of the target bit stream data;
assigning a 2 nd bit of the original bitstream data to a 3 rd bit of the target bitstream data;
after inverting the 3 rd bit of the original bit stream data, assigning a value subjected to exclusive OR operation with the first parameter as the 4 th bit of the target bit stream data;
assigning the value of the XOR operation of the 4 th bit of the original bit stream data and the first parameter as the 5 th bit of the target bit stream data;
after inverting the 5 th bit of the original bit stream data, assigning the 5 th bit as the 6 th bit of the target bit stream data;
after inverting the 6 th bit of the original bit stream data, assigning a value subjected to exclusive OR operation with the first parameter as the 7 th bit of the target bit stream data;
and assigning the value obtained by carrying out XOR operation on the 7 th bit of the original bit stream data and the first parameter as the 8 th bit of the target bit stream data.
8. The encoding method according to claim 3, wherein the step of the encoding method further comprises:
performing bit increasing operation on the original bit stream data to obtain first bit stream data;
and when the position information of continuous same logic values in the original bit stream data does not meet the first data relation criterion, taking the first bit stream data as the target bit stream data.
9. An encoding apparatus, characterized in that the encoding apparatus comprises:
an acquisition unit configured to acquire original bit stream data;
the logic operation unit is used for carrying out bit increasing operation;
and the encoding unit is used for determining a first data relation criterion, judging the original bit stream data according to the first data relation criterion, and if the position information of continuous same logic values in the original bit stream data meets the first data relation criterion, performing logic operation on the original bit stream data to acquire target bit stream data of which the position information of continuous same logic values meets a second data relation criterion.
10. A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the encoding method of any one of claims 1 to 8.
CN202110652223.6A 2021-06-11 2021-06-11 Encoding method, encoding device, and storage medium Pending CN113438051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110652223.6A CN113438051A (en) 2021-06-11 2021-06-11 Encoding method, encoding device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110652223.6A CN113438051A (en) 2021-06-11 2021-06-11 Encoding method, encoding device, and storage medium

Publications (1)

Publication Number Publication Date
CN113438051A true CN113438051A (en) 2021-09-24

Family

ID=77755653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110652223.6A Pending CN113438051A (en) 2021-06-11 2021-06-11 Encoding method, encoding device, and storage medium

Country Status (1)

Country Link
CN (1) CN113438051A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108768587A (en) * 2018-05-11 2018-11-06 深圳市华星光电技术有限公司 Coding method, equipment and readable storage medium storing program for executing
CN108847916A (en) * 2018-05-30 2018-11-20 深圳市华星光电技术有限公司 Coding method, equipment and readable storage medium storing program for executing
CN110474711A (en) * 2018-05-11 2019-11-19 深圳市华星光电技术有限公司 Coding method, equipment and readable storage medium storing program for executing
CN110474709A (en) * 2018-05-11 2019-11-19 深圳市华星光电技术有限公司 Coding method, equipment and readable storage medium storing program for executing
CN112492386A (en) * 2020-11-09 2021-03-12 Tcl华星光电技术有限公司 Decoding method, decoding device and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108768587A (en) * 2018-05-11 2018-11-06 深圳市华星光电技术有限公司 Coding method, equipment and readable storage medium storing program for executing
CN110474711A (en) * 2018-05-11 2019-11-19 深圳市华星光电技术有限公司 Coding method, equipment and readable storage medium storing program for executing
CN110474709A (en) * 2018-05-11 2019-11-19 深圳市华星光电技术有限公司 Coding method, equipment and readable storage medium storing program for executing
CN108847916A (en) * 2018-05-30 2018-11-20 深圳市华星光电技术有限公司 Coding method, equipment and readable storage medium storing program for executing
CN112492386A (en) * 2020-11-09 2021-03-12 Tcl华星光电技术有限公司 Decoding method, decoding device and readable storage medium

Similar Documents

Publication Publication Date Title
JP6333439B2 (en) Perform rounding according to instructions
CN110413812B (en) Neural network model training method and device, electronic equipment and storage medium
CN116506073B (en) Industrial computer platform data rapid transmission method and system
CN114462356B (en) Text error correction method and device, electronic equipment and medium
CN111325096A (en) Live stream sampling method and device and electronic equipment
CN110134441B (en) RISC-V branch prediction method, apparatus, electronic device and storage medium
CN110049333B (en) JPEG _ LS image compression output coding code stream splicing system and method
CN113438051A (en) Encoding method, encoding device, and storage medium
US20050105556A1 (en) Packet processor and buffer memory controller for extracting and aligning packet header fields to improve efficiency of packet header processing of main processor and method and medium therefor
CN116842346A (en) Spectrum processing method, spectrum processing device, computer equipment and readable storage medium
CN116795324A (en) Mixed precision floating-point multiplication device and mixed precision floating-point number processing method
CN116932202A (en) Access method, processor, electronic device and readable storage medium
JP2010160721A (en) Image processing device, method and program
CN114070470A (en) Encoding and decoding method and device
CN113014357B (en) Data encoding method, data encoding device, and storage medium
CN108287697B (en) Html escape character replacing method, device and terminal
CN108769695B (en) Frame type conversion method, system and terminal
CN111367497B (en) Posit data format-based floating-point number multiplication method and device
CN111788607A (en) Batch density increase for improved progressive mesh compression
CN113438050B (en) Encoding method, decoding method, encoding device and decoding device
CN116016724B (en) Message parsing method, device, equipment and medium
CN113407358B (en) Data encoding method, device and storage medium
CN116112670A (en) Encoding method, apparatus, device and readable storage medium
US6954155B2 (en) Data compression method and processor
CN115546086A (en) Image processing method, image processing device, computer-readable storage medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210924