Data transmission method, system and computer readable storage medium
By detecting the environmental parameters of the transmission channel and dynamically selecting error detection and correction algorithms to encode and verify the data, it solves the problems of low data transmission efficiency and insufficient multi-bit error correction capabilities in the existing technology, and achieves efficient and reliable data transmission.
Patent Information
- Application Number
- CN202011106012.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-15
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-10-15
AI Technical Summary
Existing technologies are difficult to improve data transmission efficiency while ensuring the reliability of data transmission. Especially in channel environments with high bit error rates and high packet loss rates, multi-bit errors cannot be effectively corrected during the transmission process, affecting the transmission of images and videos. quality.
By detecting the environmental parameters of the transmission channel, select a suitable error detection and correction algorithm (such as a combination of FEC, CRC, and ECC) to encode and verify the data, and dynamically adjust the error detection and correction algorithm according to the bit error rate and packet loss rate to achieve Multi-bit error correction during data transmission.
On the basis of ensuring the reliability of data transmission, it improves the data transmission efficiency, avoids the problem of excessive data redundancy in error detection and correction processing, and is suitable for a variety of high-speed data transmission systems.
Smart Images

Figure CN114374470B_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the field of communication technology, and in particular to a data transmission method, system and computer-readable storage medium. [Background technology]
[0002] With the development of communication technology, the application of electronic equipment has higher and higher requirements for image and video processing. In the process of image and video transmission, error detection and correction technology is needed to perform error detection and correction on the transmitted data to ensure the reliability of data transmission.
[0003] However, there is no data transmission method in the related art that can improve the data transmission efficiency while ensuring the data transmission reliability. [Summary of the invention]
[0004] In view of this, the present invention provides a data transmission method, system and computer-readable storage medium, which are used to improve data transmission efficiency while ensuring data transmission reliability.
[0005] In a first aspect, an embodiment of the present invention provides a data transmission method, which is applied to a first device, and the method includes:
[0006] If the environmental parameters of the transmission channel meet the first algorithm start-up conditions, encode the acquired transmission data by using the first error detection and correction algorithm to generate first coded data, and send the first coded data to the second device;
[0007] If the environmental parameters of the transmission channel meet the conditions for starting the second algorithm, the acquired transmission data is encoded by a second error detection and correction algorithm to generate second encoded data, and the second encoded data is sent to a second device. The second error detection and correction algorithm is different from the first error detection and correction algorithm.
[0008] In a possible implementation, the method further includes:
[0009] Get the environment parameters of the transmission channel.
[0010] In a possible implementation, the environmental parameters of the transmission channel include a bit error rate; obtaining the environmental parameters of the transmission channel includes: sending a first sequence and a second sequence to the second device in sequence, so that the second device can count the number of bits of the correct second sequence received, the first sequence being used to implement state machine equalization training; receiving the number of bits of the correct second sequence sent by the second device; calculating the bit error rate according to the number of bits of the correct second sequence sent by the second device and the total number of bits of the sent second sequence; or,
[0011] The transmission channel environment parameter includes a system transmission rate; and obtaining the transmission channel environment parameter includes: reading the system transmission rate from a speed switching status register.
[0012] In a possible implementation, if the environmental parameters of the transmission channel meet the first algorithm start condition, the method further includes: collecting raw data; performing encoding format conversion on the raw data to generate the transmission data; or,
[0013] If the environmental parameters of the transmission channel meet the second algorithm start-up conditions, the method further includes: collecting original data; and converting the encoding format of the original data to generate the transmission data.
[0014] In a possible implementation manner, the environmental parameter of the transmission channel includes a packet loss rate; and obtaining the environmental parameter of the transmission channel includes:
[0015] Sending a test data packet to the second device, and recording the number of the test data packets sent;
[0016] Receive the number of correctly received test data packets counted and returned by the second device;
[0017] The packet loss rate is calculated based on the number of correct test data packets and the number of sent test data packets.
[0018] In a possible implementation, before encoding the acquired transmission data by the first error detection and correction algorithm, it also includes: collecting original data; converting the encoding format of the original data to generate the transmission data; or, before encoding the acquired transmission data by the second error detection and correction algorithm, it also includes: collecting original data; converting the encoding format of the original data to generate the transmission data.
[0019] In a possible implementation manner, the transmission channel environment parameter includes one of a bit error rate, a system transmission rate, and the packet loss rate, or any combination thereof;
[0020] The transmission channel environment parameter meets the first algorithm start-up condition including: the bit error rate is greater than or equal to the first threshold, the system transmission rate is greater than or equal to the second threshold, and the packet loss rate is greater than or equal to the third threshold, or any combination thereof;
[0021] The transmission channel environment parameters meeting the second algorithm activation condition include: the bit error rate being less than a first threshold, the system transmission rate being less than a second threshold, and the packet loss rate being less than a third threshold, or any combination thereof.
[0022] In a possible implementation, the first error detection and correction algorithm includes at least two error detection and correction algorithms, and the second error detection and correction algorithm includes at least one error detection and correction algorithm; or,
[0023] The number of error detection and correction algorithms in the first error detection and correction algorithm is greater than the number of error detection and correction algorithms in the second error detection and correction algorithm.
[0024] In a possible implementation, the first error detection and correction algorithm includes a forward error correction FEC algorithm, a net core cyclic redundancy check CRC algorithm, and a header error correction code ECC algorithm; or the first error detection and correction algorithm includes an FEC algorithm and a CRC algorithm; or the first error detection and correction algorithm includes an FEC algorithm and an ECC algorithm; or,
[0025] The second error detection and correction algorithm includes an FEC algorithm; or the second error detection and correction algorithm includes a CRC algorithm; or the second error detection and correction algorithm includes an ECC algorithm; or the second error detection and correction algorithm includes a CRC algorithm and an ECC algorithm.
[0026] In a possible implementation, the first coded data includes an indication field, and the indication field of the first coded data is used to indicate that the environmental parameter meets the first algorithm start-up condition; and / or,
[0027] The second coded data includes an indication field, and the indication field of the second coded data is used to indicate that the environmental parameter meets the second algorithm startup condition.
[0028] In a possible implementation, the first device is a camera module, and the second device is a mainboard; or
[0029] The first device is a camera module, and the second device is a host; or
[0030] The first device is a motherboard, and the second device is a display screen; or
[0031] The first device is a host, and the second device is a display screen.
[0032] In a second aspect, an embodiment of the present invention provides a data transmission method, which is applied to a second device, and the method includes:
[0033] The encoded data is received;
[0034] If it is determined that the first algorithm start condition is met, the coded data is verified by a first error detection and correction algorithm to generate transmission data;
[0035] If it is determined that the second algorithm start-up condition is met, the coded data is verified by a second error detection and correction algorithm to generate transmission data.
[0036] In a possible implementation, the method further includes:
[0037] Receiving a first sequence and a second sequence sent in sequence by a first device, wherein the first sequence is used to implement state machine equalization training;
[0038] Calculating a bit error rate according to the number of bits of the received correct second sequence and the total number of bits of the sent second sequence;
[0039] If the bit error rate meets the first algorithm start-up condition, sending a first bit error rate status to the first device, where the first bit error rate status is used to indicate that the bit error rate meets the first algorithm start-up condition;
[0040] If the bit error rate meets the second algorithm start-up condition, a second bit error rate status is sent to the first device, where the second bit error rate status is used to indicate that the bit error rate meets the second algorithm start-up condition.
[0041] In a possible implementation, the method further includes:
[0042] receiving a test data packet sent by the first device;
[0043] The packet loss rate is calculated based on the number of correct test data packets received and the number of test data packets sent;
[0044] If the packet loss rate meets the first algorithm activation condition, sending a first packet loss rate status to the first device, where the first packet loss rate status is used to indicate that the packet loss rate meets the first algorithm activation condition;
[0045] If the packet loss rate meets the second algorithm activation condition, a second packet loss rate status is sent to the first device, where the first packet loss rate status is used to indicate that the packet loss rate meets the second algorithm activation condition.
[0046] In a possible implementation, the first error detection and correction algorithm includes at least two error detection and correction algorithms, the second error detection and correction algorithm includes at least one error detection and correction algorithm, and the number of error detection and correction algorithms in the first error detection and correction algorithm is greater than the number of error detection and correction algorithms in the second error detection and correction algorithm.
[0047] In a possible implementation, the first error detection and correction algorithm includes an FEC algorithm, a CRC algorithm, and an ECC algorithm; or
[0048] The first error detection and correction algorithm includes an FEC algorithm and a CRC algorithm; or
[0049] The first error detection and correction algorithm includes an FEC algorithm and an ECC algorithm; or
[0050] The second error detection and correction algorithm includes a FEC algorithm; or
[0051] The second error detection and correction algorithm includes a CRC algorithm; or
[0052] The second error detection and correction algorithm includes an ECC algorithm; or
[0053] The second error detection and correction algorithm includes a CRC algorithm and an ECC algorithm.
[0054] In a possible implementation, the determining that the first algorithm start condition is met includes: determining that the coded data includes an indication field; the determining that the second algorithm start condition is met includes: determining that the coded data does not include an indication field; or,
[0055] The determining that the first algorithm start condition is met includes: determining that the coded data does not include an indication field; the determining that the second algorithm start condition is met includes: determining that the second coded data includes an indication field; or,
[0056] The determining that the first algorithm startup condition is met includes: determining that the indication field in the first coded data is a first value; the determining that the second algorithm startup condition is met includes: determining that the indication field in the second coded data is a second value.
[0057] In a third aspect, an embodiment of the present invention provides a first device, comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the device, enable the device to perform the data transmission method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0058] In a fourth aspect, an embodiment of the present invention provides a second device, comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the device, enable the device to execute the data transmission method in any possible implementation of the second aspect or the first aspect.
[0059] In a fifth aspect, an embodiment of the present invention provides a data transmission system, including: a first device and a second device, wherein the first device and the second device are communicatively connected via a transmission channel;
[0060] The first device is configured to encode the acquired transmission data by using a first error detection and correction algorithm to generate first coded data if the environmental parameter of the transmission channel meets the first algorithm start-up condition, and send the first coded data to the second device; if the environmental parameter of the transmission channel meets the second algorithm start-up condition, encode the acquired transmission data by using a second error detection and correction algorithm to generate second coded data, and send the second coded data to the second device, wherein the second error detection and correction algorithm is different from the first error detection and correction algorithm;
[0061] The second device is used to receive encoded data; if it is determined that the first algorithm startup condition is met, the encoded data is verified by the first error detection and correction algorithm to generate transmission data; if it is determined that the second algorithm startup condition is met, the encoded data is verified by the second error detection and correction algorithm to generate transmission data.
[0062] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used for program code executed by a device, and the program code includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0063] In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used for program code executed by a device, and the program code includes instructions for executing the method in the second aspect or any possible implementation of the second aspect.
[0064] In an eighth aspect, an embodiment of the present invention provides a computer program product comprising instructions, characterized in that when the computer program product runs on a computer or any at least one processor, the computer executes the data transmission method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0065] In the ninth aspect, an embodiment of the present invention provides a computer program product comprising instructions, characterized in that when the computer program product runs on a computer or any at least one processor, the computer executes the data transmission method in the above-mentioned second aspect or any possible implementation of the second aspect.
[0066] In the technical solution provided by the embodiment of the present invention, the first device selects a first error detection and correction algorithm to encode the transmission data to generate first coded data according to whether the environmental parameters of the transmission channel meet the first algorithm startup conditions, or the first device selects a second error detection and correction algorithm to encode the transmission data to generate second coded data according to whether the environmental parameters of the transmission channel meet the second algorithm startup conditions. The second device receives the coded data, and if it is determined that the first algorithm startup conditions are met, the coded data is verified by the first error detection and correction algorithm to generate the transmission data; if it is determined that the second algorithm startup conditions are met, the coded data is verified by the second error detection and correction algorithm to generate the transmission data, thereby realizing error detection and correction processing of the transmission data in the data transmission process by the selected error detection and correction algorithm, thereby improving the data transmission efficiency on the basis of ensuring the data transmission reliability.
Brief Description of the Drawings
[0067] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0068] Figure 1 is a schematic diagram of error detection and correction techniques in some embodiments;
[0069] Figure 2 It is a structural schematic diagram of a data transmission system based on D-PHY in the related art;
[0070] Figure 3 yes Figure 2 A flow chart of a data transmission method based on D-PHY in a data transmission system;
[0071] Figure 4 is a schematic diagram of the format of a second data block transmitted based on D-PHY in the related art;
[0072] Figure 5 It is a structural schematic diagram of a data transmission system based on C-PHY in the related art;
[0073] Figure 6 yes Figure 5 A flow chart of a data transmission method based on C-PHY in a data transmission system;
[0074] Figure 7 It is a schematic diagram of the format of a data packet transmitted based on C-PHY in the related art;
[0075] Figure 8 A schematic diagram of a hierarchical structure of a CSI-3-based data transmission system in the related art;
[0076] Fig. 9 is based on Figure 8 Schematic diagram of the format of MIPI UniPro L2 layer data frame of the data transmission system;
[0077] Fig.10 It is a structural schematic diagram of a data transmission system based on HDMI in the related art;
[0078] Fig.11 yes Fig.10 A flow chart of a data transmission method based on HDMI in a data transmission system;
[0079] Fig.12 is a schematic diagram of the format of a second data block transmitted based on HDMI in the related art;
[0080] Fig.13 is a schematic diagram of the format of a third data block transmitted based on HDMI in the related art;
[0081] Fig.14 It is a structural diagram of a data transmission system based on DP in the related art;
[0082] Fig.15 is a flow chart of a data transmission method based on DP in the related art;
[0083] Fig.16 This is a schematic diagram of the format of a link layer data frame based on DP;
[0084] Fig.17 This is a schematic diagram of the format of a data frame implementing single-channel FEC at the PHY layer based on DP;
[0085] Fig.18a is a communication schematic diagram of a data transmission system provided by some embodiments of the present invention;
[0086] Fig.18b is a schematic diagram of a board-level connection between a first device and a second device provided by some embodiments of the present invention;
[0087] Fig.18c is a schematic diagram of a board-level connection between a first device and a second device provided in some other embodiments of the present invention;
[0088] Fig.18d is a flow chart of a data transmission method provided by an embodiment of the present invention;
[0089] Fig.19 is a schematic diagram of the structure of a data transmission system provided by some embodiments of the present invention;
[0090] Fig. 20is a flow chart of a data transmission method provided by some embodiments of the present invention;
[0091] Fig.21 is a schematic diagram of the data format of the training code stream in some embodiments of the present invention;
[0092] Fig. 22 is a schematic diagram of the format of a data block transmitted based on D-PHY in some embodiments of the present invention;
[0093] Fig.23 is a flow chart of a data transmission method provided by other embodiments of the present invention;
[0094] Fig.24 is a schematic diagram of the structure of a data transmission system provided in some other embodiments;
[0095] Fig.25 is a flow chart of a data transmission method provided by other embodiments;
[0096] Fig.26 is a schematic diagram of the format of a data block transmitted based on HDMI in an embodiment of the present invention;
[0097] Fig. 27 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. [Specific implementation method]
[0098] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0099] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0100] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0101] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0102] With the advancement of electronic devices, the application of electronic devices has higher and higher requirements for image and data processing. In electronic devices, this requirement is mainly reflected in the transmission rate requirements of the interface between the system on chip (System on Chip, SOC) and peripheral devices. Image and video transmission technologies represented by the Camera Serial Interface 2 (CSI-2) of the Mobile Industry Processor Interface (MIPI), Camera Serial Interface 3 (CSI-3), High-Definition Multimedia Interface (HDMI), and Display Port (DP) have shown many advantages in processing flexibility and functionality.
[0103] However, due to the complex channel environment, transmission errors are inevitable in the transmission process of images and videos, especially the high bit error rate caused by factors such as signal transmission path loss, channel interference and terminal movement. For image and video transmission, since it is more sensitive to channel errors or sudden data packet loss, a certain number of bit errors or packet loss may reduce the image quality by many orders of magnitude, directly affecting the final decoding recovery and the expression of visual content. Therefore, a powerful channel coding method is needed to ensure a certain bit error rate. Among them, bit error refers to random errors or sudden errors in the received data caused by channels, equipment, etc.; packet loss refers to the failure of one or more data packets to be transmitted to the destination. Since different error detection and correction algorithms are suitable for different channel environments, different error detection and correction algorithms need to be used according to the size of bit error rate, packet loss rate, etc. in the transmission process of images and videos to reduce the bit error rate and packet loss rate of image and video transmission, improve the reconstruction quality of images and videos at the receiving end, and make the image and video transmission process have the characteristics of low complexity and simple implementation.
[0104] At present, the error detection and correction technologies used in the image and video transmission process can be divided into the sending end error detection and correction technology and the receiving end error detection and correction technology according to their links in the communication. Figure 1As shown, in the transmission process of images and videos, error detection and correction technology may include source coding, channel coding, transmission line transmission, channel decoding and source decoding, wherein source coding belongs to the source processing part, channel coding, transmission line transmission and channel decoding belong to the channel processing part, and source decoding belongs to the destination processing part. The error detection and correction technology at the sending end is a method of adding redundant information during channel coding to enhance the error detection and correction capability of the coded bit stream. The error detection and correction technology at the receiving end is based on channel decoding. The decoder approximately restores the lost or erroneous data according to the decoding rules, and there is no need to perform technical processing in advance at the sending end, such as error compensation in fax images, error concealment technology in videos, etc. In the error detection and correction technology at the sending end, the error detection and correction technology at the channel decoding stage is pre-processed at the sending end, and redundant information that can be used for error detection or correction is added. It should be noted that: the data transmission method provided in the embodiment of the present invention uses the error detection and correction technology at the sending end to perform error detection and correction processing on the transmission data.
[0105] CSI-2 is an interface developed by the MIPI organization for transmitting image data between the camera chip and the main control chip of electronic devices. CSI-2 is compatible with two port physical layers (PHY), namely C-PHY and D-PHY, so CSI-2 corresponds to two different error detection and correction algorithms.
[0106] Figure 2 It is a structural diagram of a data transmission system based on D-PHY in the related art, such as Figure 2 As shown, the data transmission system may include a first device and a second device, the first device includes an image processing unit and a sending device, the second device includes a main processor unit and a receiving device, the sending device and the receiving device are communicatively connected via a transmission channel, the image processing unit is communicatively connected to the sending device, and the main processor unit is communicatively connected to the receiving device. Among them, the sending device includes a first format conversion module, a protocol sending unit and a PHY layer sending module. The protocol sending unit includes a header error correction code (ErrorCorrection Code, referred to as ECC) encoding module and a net core cyclic redundancy check (Cyclic Redundancy Check, referred to as CRC) encoding module. The receiving device includes a second format conversion module, a protocol receiving unit and a PHY layer receiving module, and the protocol receiving unit includes a header ECC decoding module and a net core CRC decoding module. Among them, the PHY layer sending module and the PHY layer receiving module are communicatively connected via a transmission channel.
[0107] The related technology provides a data transmission method based on D-PHY, wherein the first device includes a camera module, the second device includes a mainboard of a mobile phone, the protocol sending unit includes a CSI-2 sending unit, the protocol receiving unit includes a CSI-2 receiving unit, the PHY layer sending module includes a D-PHY sending module, and the PHY layer receiving module includes a D-PHY receiving module.
[0108] Figure 3 yes Figure 2 The flowchart of the data transmission method based on D-PHY in the data transmission system is as follows: Figure 3 As shown, the method includes:
[0109] Step 102: The main processor unit configures parameters of the image processing unit.
[0110] Specifically, in all practical use scenarios, the mainboard can configure the working parameters of the camera module so that the camera module can work according to the requirements of the working parameters. The working parameters may include resolution, frame rate, interface rate, etc.
[0111] Step 104: The protocol sending unit sends a training code stream to the protocol receiving unit.
[0112] Specifically, the protocol sending unit sends a training code stream to the PHY layer sending module, the PHY layer sending module sends the training code stream to the PHY layer receiving module through the transmission channel, and then the PHY layer receiving module sends the training code stream to the protocol receiving unit, the protocol receiving unit receives the training code stream, and adaptively adjusts the parameters to implement the CSI-2 state machine equalization training process. After the state machine equalization training is implemented, the first device starts the transmission process of the image data stream.
[0113] Step 106: The image processing unit collects an image data stream and sends the collected image data stream to the first format conversion module.
[0114] Step 108: The first format conversion module converts the encoding format of the image data stream to generate a first data block, and adds a data packet header to the first data block.
[0115] Figure 4 is a schematic diagram of the format of a second data block transmitted based on D-PHY in the related art, Figure 4 As shown, the first format conversion module (such as Figure 2The first format conversion module converts the image data stream into a binary encoding format to form a payload (Payload). Wherein, "Payload" is used to represent the first data block. The data packet header may include a data type identifier (Data Identifier, referred to as Data ID), a byte count (16-bit WC) and a virtual channel identifier (Virtual Channel Extension, referred to as VCX). Wherein, the byte count is used to mark the number of "Payload", and WC is the abbreviation of word count (Word Count). The first format conversion module sends the first data block with the data packet header added to the protocol sending unit.
[0116] Step 110: The protocol sending unit performs ECC encoding on the data packet header through the packet header ECC encoding module to generate a first ECC field.
[0117] Figure 4 As shown, the header ECC encoding module (such as Figure 2 As shown in FIG. 1 ), Data ID, WC and VCX are ECC-encoded by a 6-bit extended Hamming code to generate a first ECC field, wherein the ECC field is, for example, a 6-bit field. It should be noted that: Figure 4 The ECC field shown in is the first ECC field.
[0118] Step 112: The protocol sending unit performs CRC encoding on the first data block through the clean core CRC encoding module to generate a CRC field.
[0119] Figure 4 As shown, the net core CRC encoding module (such as Figure 2 As shown in FIG. 1 , the CRC field is generated by CRC encoding the “Payload” through a polynomial. The polynomial is, for example: X 16 +X 12 +X 5 +X 0 , the CRC field is, for example, a 16-bit field, that is, Figure 4 In the “16-bit CRC” section,
[0120] Step 114: The protocol sending unit generates a second data block according to the first data block, the data packet header, the first ECC field and the CRC field.
[0121] Figure 4 As shown, the protocol sending unit (such as Figure 2As shown in FIG. 1 , the first ECC field and the CRC field are placed at the head and tail of "Payload" respectively, the Data ID, WC and VCX in the data packet header are placed at the specified positions of the data packet respectively, and the Start of Transmit (SoT) mark is set at the beginning of the data packet and the End of Transmit (EoT) mark is set at the end of the data packet to form Figure 4 The second data block in the long packet format shown in .
[0122] Step 116: The protocol sending unit sends the second data block to the PHY layer sending module. The PHY layer sending module sends the second data block to the PHY layer receiving module through the transmission channel. The PHY layer receiving module sends the second data block to the protocol receiving unit.
[0123] Step 118: The protocol receiving unit performs a CRC check on the CRC field in the second data block through the clean core CRC decoding module to generate a CRC check result.
[0124] Net core CRC decoding module (such as Figure 2 ) divide the CRC field in the second data block by the polynomial modulo 2 to obtain the remainder, which is the CRC check result. If the CRC check result is 0, it indicates that the received "Payload" is correct data; if the CRC check result is not 0, it indicates that the received "Payload" is incorrect data. The polynomial may include X 16 +X 12 +X 5 +X 0 .
[0125] Step 120: The protocol receiving unit performs an ECC check on the data packet header in the second data block through the packet header ECC decoding module to generate an ECC check result.
[0126] Packet header ECC decoding module (such as Figure 2 The first ECC field is XORed with the second ECC field to obtain the ECC check result. If the ECC check result is 0, it indicates that the data packet header is correct; if the ECC check result is not 0 and the ECC check result indicates a 1-bit error and an error bit, it indicates that the error bit of the data packet header needs to be corrected; if the ECC check result is not 0 and the ECC check result indicates more than 2-bit errors, it indicates that an uncorrectable error has occurred in the data packet header.
[0127] Among them, the packet header ECC decoding module can use the same encoding rules as the packet header ECC encoding module to ECC encode the Data ID, WC and VCX in the data packet header, that is, the packet header ECC decoding module can use 6-bit extended Hamming code to ECC encode DataID, WC and VCX to generate the second ECC field.
[0128] Step 122: If the protocol receiving unit recognizes that the CRC check result is 0 and the ECC check result is 0, the protocol receiving unit unpacks the second data block to generate the first data block.
[0129] Specifically, the protocol receiving unit removes the SoT identifier, the EoT identifier, the first ECC field, the CRC field, the Data ID, the WC, and the VCX in the second data block, so as to unpack the second data block to obtain the first data block.
[0130] The protocol receiving unit sends the first data block obtained by unpacking to the second format conversion module.
[0131] Step 124: The second format conversion module converts the encoding format of the first data block to generate an image data stream, and uploads the image data stream to the main processor unit.
[0132] The second format conversion module (such as Figure 2 As shown), the first data block is converted into a pixel image coding format to generate an image data stream, and the image data stream is uploaded to the main processor unit.
[0133] As an optional scheme, if the protocol receiving unit recognizes that the ECC check result is not 0 and the ECC check result indicates a 1-bit error and an error bit, the error bit of the data packet header is corrected, the second data block is unpacked to generate a first data block, and then the first data block is converted into a pixel image encoding format to generate an image data stream, and the image data stream is uploaded to the main processor unit.
[0134] As another optional scheme, if the protocol receiving unit recognizes that the CRC check result is not 0 and / or recognizes that the ECC check result is not 0 and the ECC check result indicates that there are more than 2-bit errors, the second data block will be discarded, directly skipped or retransmitted. In this case, the developer can determine how to handle the second data block.
[0135] Figure 5 is a schematic diagram of the structure of a data transmission system based on C-PHY in the related art, such as Figure 5As shown, the data transmission system may include a first device and a second device, the first device includes an image processing unit and a sending device, the second device includes a main processor unit and a receiving device, the sending device and the receiving device are communicatively connected via a transmission channel, the image processing unit is communicatively connected to the sending device, and the main processor unit is communicatively connected to the receiving device. Among them, the sending device includes a first format conversion module, a protocol sending unit and a PHY layer sending module. The protocol sending unit includes a header CRC encoding module and a net core CRC encoding module. The receiving device includes a second format conversion module, a protocol receiving unit and a PHY layer receiving module, and the protocol receiving unit includes a header CRC decoding module and a net core CRC decoding module. Among them, the PHY layer sending module and the PHY layer receiving module are communicatively connected via a transmission channel.
[0136] The related technology also provides a data transmission method based on C-PHY, wherein the first device includes a camera module, the second device includes a mainboard of a mobile phone, the protocol sending unit includes a CSI-2 sending unit, the protocol receiving unit includes a CSI-2 receiving unit, the PHY layer sending module includes a C-PHY sending module, and the PHY layer receiving module includes a C-PHY receiving module. Figure 6 yes Figure 5 Flow chart of the data transmission method based on C-PHY in the data transmission system, such as Figure 6 As shown, the method includes:
[0137] Step 202: The main processor unit configures parameters of the image processing unit.
[0138] Step 204: The protocol sending unit sends a training code stream to the protocol receiving unit.
[0139] Step 206: The image processing unit collects the image data stream and sends the collected image data stream to the first format conversion module.
[0140] The description of steps 202 to 206 can be found in steps 102 to 106 and will not be repeated here.
[0141] Step 208: The first format conversion module converts the encoding format of the image data stream to generate a first data block, and adds a data packet header to the first data block.
[0142] Figure 7 It is a schematic diagram of the format of a data packet transmitted based on C-PHY in the related art, such as Figure 5 and Figure 7 As shown, the first format conversion module (such as Figure 5The first format conversion module performs binary encoding format conversion on the image data stream to form a first data block "Payload". The data packet header may include Data ID, 16-bit WC and VCX. The first format conversion module sends the first data block with the data packet header added to the protocol sending unit.
[0143] Step 210: The protocol sending unit performs CRC encoding on the data packet header through the packet header CRC encoding module to generate a PH-CRC field.
[0144] Figure 7 As shown, the packet header CRC encoding module (such as Figure 5 As shown in FIG. 1 ), the Data ID, WC and VCX in the data packet are CEC-encoded by a polynomial to generate a PH-CRC field. The polynomial may include X 16 +X 12 +X 5 +X 0 .
[0145] Step 212: The protocol sending unit performs CRC encoding on the first data block through the clean core CRC encoding module to generate a PF-CRC field.
[0146] Figure 7 As shown, the net core CRC encoding module (such as Figure 5 As shown in FIG. 1 , the CRC encoding of “Payload” is performed by a polynomial to generate a PF-CRC field. The polynomial is, for example, 16 +X 12 +X 5 +X 0 .
[0147] Since C-PHY adopts a unique three-line encoding method, that is, three levels are encoded simultaneously, if one level is encoded incorrectly, the subsequent level encoding will also be incorrect, resulting in multiple bit errors. Therefore, in order to enhance data reliability and detect multiple bits errors, the CRC encoding module can perform CRC encoding and verification on the transmitted data.
[0148] Step 214: The protocol sending unit generates a second data block according to the first data block, the data packet header, the PH-CRC field, the PF-CRC field and the reserved field (RES for short).
[0149] Figure 7 As shown, the protocol sending unit (such as Figure 5As shown in FIG. 1 ), the PH-CRC field and the PF-CRC field are placed at the head and tail of "Payload" respectively, the Data ID, WC, VCX, RES and Filler fields in the data packet header are placed at the specified positions of the second data block respectively, and the SoT mark is set at the beginning position of the second data block and the EoT mark is set at the end position of the second data block to form Figure 7 The second data block in the long packet format shown in .
[0150] Step 216: The protocol sending unit sends the second data block to the PHY layer sending module. The PHY layer sending module sends the second data block to the PHY layer receiving module through the transmission channel. The PHY layer receiving module sends the second data block to the protocol receiving unit.
[0151] Step 218: The protocol receiving unit performs a CRC check on the PH-CRC field in the second data block through the packet header CRC decoding module to generate a first CRC check result.
[0152] Packet header CRC decoding module (such as Figure 7 As shown in FIG. 1 ), the PH-CRC field in the second data block is divided modulo 2 by the polynomial to obtain a remainder, which is the first CRC check result. The first CRC check result may be 0 or not 0. The polynomial is, for example: 16 +X 12 +X 5 +X 0 .
[0153] Step 220: The protocol receiving unit performs a CRC check on the PF-CRC field in the second data block through the clean core CRC decoding module to generate a second CRC check result.
[0154] The net core CRC decoding module performs modulo 2 division on the PF-CRC field in the second data block and the polynomial to obtain a remainder, which is the second CRC check result. The second CRC check result may be 0 or not 0. The polynomial is, for example: X 16 +X 12 +X 5 +X 0 .
[0155] Step 222: If the protocol receiving unit recognizes that the first CRC check result and the second CRC check result are both 0, the protocol receiving unit unpacks the second data block to generate the first data block.
[0156] If the protocol receiving unit recognizes that both the first CRC check result and the second CRC check result are 0, it indicates that the information of the second data block is completely correct, and the unpacking process of the second data block can continue.
[0157] Specifically, the protocol receiving unit removes the SoT identifier, the EoT identifier, the PH-CRC field, the PF-CRC field, the Data ID, the WC, the VCX, the RES and the Filler in the second data block to unpack the second data block to obtain the first data block.
[0158] The protocol receiving unit sends the first data block obtained by unpacking to the second format conversion module.
[0159] Step 224: The second format conversion module performs encoding format conversion on the first data block to generate an image data stream, and uploads the image data stream to the main processor unit.
[0160] The protocol receiving unit converts the first data block into a pixel image coding format to generate an image data stream, and uploads the image data stream to the main processor unit.
[0161] As an optional scheme, if the first CRC check result of the protocol receiving unit is not 0 and / or the second CRC check result is not 0, it indicates that an uncorrectable error has occurred in the field of the second data block, and the second data block will be discarded, directly skipped or retransmitted. In this case, the developer can determine how to handle the second data block.
[0162] Figure 8 FIG. 1 is a schematic diagram of a hierarchical structure of a data transmission system based on CSI-3 in the related art. Figure 8 As shown, the data transmission system includes a first device and a second device, and the first device and the second device are connected by a transmission channel. The first device includes an image processing unit, a sending device, a device management entity (Device Management Entity) and a PHY layer sending module, wherein the image processing unit includes a camera application layer (Camera Application Layer, the sending device includes a transport layer (Transport) L4 layer, a network layer (Network) L3 layer, a data link layer (Data Link) L2 layer, and a PHY adaptation layer (PHY Adaptor) L1.5 layer; the second device includes a main processor unit, a receiving device, a device management entity (Device Management Entity) and a PHY layer receiving module, wherein the main processor unit includes a host application layer (Host Application Layer), and the receiving device includes a PHY adaptation layer (PHY Adaptor) L1.5 layer, a data link layer (Data Link) L2 layer, a network layer (Network) L3 layer and a transport layer (Transport) L4 layer. The PHY layer sending module and the PHY layer receiving module are connected by a transmission channel.
[0163] The related technology also provides a data transmission method based on CSI-3. Fig. 9 is based on Figure 8 The format diagram of the MIPI UniPro L2 layer data frame of the data transmission system is as follows: Figure 8 and Fig. 9 As shown in the figure, for all camera module actual use scenarios, on the first device side, when the L3 layer image data block is transmitted to the L2 layer, the L2 layer adds the L2 layer header characters on the basis of the L3 layer image data block, and uses the CCITT CRC-16 algorithm to check the L3 layer image data block to generate a 16-bit CRC check field. The 16-bit CRC check field is added to the end of the L2 layer data frame, as shown in the figure. Fig. 9 As shown, the L2 layer data frame also includes a data link layer control identifier (Data Link Layer Control Symbol Identifier, referred to as ESC_DL) field, an L2 layer data packet end frame identifier (End of Frame for even L2SDU, referred to as EOF_EVEN) field, a frame sequence number (Frame Sequence Number, referred to as Frame Seq Number) and a traffic class (Traffic Class, referred to as TC) field. Then, the image data block is checked at the L2 layer of the second device according to the modulo-2 division to obtain the remainder. If the remainder is 0, it indicates that the current data packet information is completely correct, then the L2 layer image data block is restored to the L3 layer image data block, and the restored L3 layer image data block is transmitted to the L3 layer; if the remainder is not 0, it indicates that an uncorrectable error has occurred in the L2 layer image data block, and the erroneous data packet is discarded, directly skipped or retransmitted. In this case, the developer can determine how to handle the data packet. The process of the data transmission method based on CSI-3 in the related technology can be found in. Figure 6 The C-PHY-based data transmission method shown will not be described again here.
[0164] In the scheme of the data transmission method based on CSI-2 and CSI-3 of the above-mentioned related technology, the CRC algorithm and the ECC algorithm or the CRC algorithm is used to perform error detection and correction processing on the data, resulting in less data redundancy, thereby improving the efficiency of data transmission. However, since it is impossible to correct the error data of multiple bits, the reliable transmission of data cannot be effectively guaranteed for burst errors. When the transmission channel is interfered with (for example, interference such as additive noise and random noise) and the bit error rate is high, data packet loss will occur, which will cause image freezes and distortions, thereby greatly affecting the user experience.
[0165] HDMI is an interface for high-definition multimedia transmission established by the HDMI Forum, and is mainly used for the transmission of videos, images, etc. between devices. HDMI can be applied to multimedia transmission between a first device and a second device inside an electronic device, for example, the first device is, for example, a motherboard of a mobile phone, and the second device is, for example, a display screen of a mobile phone; or HDMI can be applied to multimedia transmission between different electronic devices, such as multimedia transmission between a host and a display screen.
[0166] Fig.10 It is a structural diagram of a data transmission system based on HDMI in the related art, such as Fig.10 As shown, the data transmission system may include a first device and a second device, the first device includes a video data processing unit and a sending device, the second device includes a load (sink) unit and a receiving device, the sending device and the receiving device are connected through a transmission channel, the video data processing unit is connected to the sending device, and the load unit is connected to the receiving device. Among them, the sending device includes a first format conversion module, a protocol sending unit and a PHY layer sending module. The protocol sending unit includes a minimized transmission differential signal (Transition-minimized differential signaling, referred to as TMDS) Consumer Electronics Control (Consumer Electronics Control, referred to as CEC) encoding module and a forward error correction (Forward Error Correction, referred to as FEC) encoding module. The receiving device includes a second format conversion module, a protocol receiving unit and a PHY layer receiving module, the protocol receiving unit includes a TMDS CEC decoding module and a FEC decoding module, wherein the PHY layer sending module and the PHY layer receiving module are connected through a transmission channel.
[0167] The related technology also provides a data transmission method based on HDMI, wherein the load unit includes a display screen, the protocol sending unit includes an HDMI sending unit, and the protocol receiving unit includes an HDMI receiving unit. Fig.11 yes Fig.10 The flowchart of the data transmission method based on HDMI in the data transmission system is as follows: Fig.11 As shown, the method includes:
[0168] Step 302: The video data processing unit configures working parameters for the load unit.
[0169] Specifically, in all practical use scenarios, the video processing unit can configure the working parameters of the video / image data controller of the display screen so that the display screen can work according to the requirements of the working parameters. The working parameters may include resolution, frame rate, interface rate, etc.
[0170] Step 304: The video data processing unit collects images or video data streams, and sends the collected images or video data streams to the first format conversion module.
[0171] Step 306: The first format conversion module converts the encoding format of the image or video data stream to generate a first data block and adds a data packet header to the first data block.
[0172] Fig.12 is a schematic diagram of the format of a second data block transmitted based on HDMI in the related art, Fig.12 As shown, the data packet header includes a preamble (Premble), data synchronization information (Sync), control / data information (C / D) and a reserved field (Rsvd). The first format conversion module (such as Fig.10 The first format conversion module adds a preamble, data synchronization information (Sync), control / data information (C / D) and a reserved field (Rsvd) to the header of the first data block (Payload). The preamble is used to indicate that the "Payload" is various types of packet information (Data Island) or video pixel data (Video Data), wherein the content of the packet information includes an audio data packet or an image information packet, etc. The first format conversion module sends the first data block with the data packet header added to the protocol sending unit.
[0173] like Fig.12 As shown, for example: the first data block (Payload) may include a command (Commad) or data (Data).
[0174] Step 308: The protocol sending unit performs ECC encoding on the first data block to generate a first ECC field and performs CRC encoding on the first data block to generate a CRC field through the TMDS CEC encoding module.
[0175] Specifically, the TMDS CEC encoding module uses a 6-bit extended Hamming code to perform ECC encoding on the "Payload" to generate a first ECC field and a check bit (Parity) field; the TMDS CEC encoding module uses a 16-bit CRC to perform CRC encoding on the "Payload" to generate a CRC (16-bit CRC) field and a check bit (Parity) field.
[0176] Step 310: The protocol sending unit adds the first ECC field and the CRC field to the end of the first data block to generate a second data block.
[0177] The specific format of the generated second data block can be found in Fig.12 As shown. Fig.12As shown, a check bit (Parity) field may be further set after the first ECC field and the CRC field in the second data block.
[0178] Step 312: The protocol sending unit divides the second data block into multiple FEC data blocks through the FEC encoding module.
[0179] Fig.13 is a schematic diagram of the format of the third data block transmitted based on HDMI in the related art, such as Fig.13 As shown, the FEC data block includes a Symbol data block (Super Block Payload). The "Super Block Payload" may include a command (Commad) or data (Data).
[0180] Step 314: The protocol sending unit performs FEC encoding on each FEC data block through the FEC encoding module to generate an FEC check code.
[0181] Specifically, the FEC encoding module performs FEC encoding on each FEC data block through the RS code encoding algorithm to generate an FEC check code (RS Block / Parity).
[0182] Step 316: The protocol sending unit adds the FEC check code to the end of the FEC data block through the FEC encoding module to generate a third data block.
[0183] The specific format of the third data block formed can be found in Fig.13 As shown, the third data block also includes a start bit (StartSuper Block) field and a byte number (RS Block Symbol / Byte) field.
[0184] Step 318: The protocol sending unit sends the third data block to the PHY layer sending module. The PHY layer sending module sends the third data block to the PHY layer receiving module through the transmission channel. The PHY layer receiving module sends the third data block to the protocol receiving unit.
[0185] Step 320: The protocol receiving unit performs FEC check on the third data block through the FEC decoding module to generate an FEC check result.
[0186] Specifically, the FEC decoding module performs FEC verification on the third data block through the RS code decoding algorithm to generate an FEC verification result. The FEC verification result includes a successful verification, a correctable error result, or an uncorrectable error result. Among them, the correctable error result is an error within the verification capability of the FEC algorithm, and this type of error can be corrected, so that the FEC algorithm can detect and correct multi-bit error data; the uncorrectable error result is an error outside the verification capability of the FEC algorithm, and this type of error data cannot be corrected.
[0187] Step 322: If the protocol receiving unit identifies through the FEC decoding module that the FEC check result includes a correctable error result, the erroneous data of the third data block is corrected, and the protocol receiving unit unpacks the third data block to generate a second data block.
[0188] The protocol receiving unit removes the start bit (Start Super Block) field, the number of bytes (RSBlock Symbol / Byte) field and the FEC check code in the third data block to obtain the second data block.
[0189] If the protocol receiving unit recognizes through the FEC decoding module that the FEC verification result includes verification success, indicating that there is no erroneous data in the third data block, the third data block can be directly unpacked to generate the second data block.
[0190] Then, the protocol receiving unit sends the second data block to the TMDS CEC decoding module.
[0191] If the protocol receiving unit identifies through the FEC decoding module that the FEC check result includes an uncorrectable error result, the third data block is discarded, directly skipped or retransmitted. In this case, the developer can determine how to handle the third data block.
[0192] Step 324: The protocol receiving unit performs a CRC check on the CRC field in the second data block through the TMDS CEC decoding module to generate a CRC check result.
[0193] The TMDS CEC decoding module performs modulo 2 division on the CRC field in the second data block and the polynomial to obtain a remainder, which is the CRC check result. The CRC check result can be 0 or not 0. The polynomial may include X 16 +X 12 +X 5 +X 0 .
[0194] Step 326: The protocol receiving unit performs an ECC check on the first ECC field in the second data block through the TMDS CEC decoding module to generate an ECC check result.
[0195] The TMDS CEC decoding module performs ECC encoding on the "Payload" in the second data block to generate a second ECC field, and performs XOR calculation on the first ECC field and the second ECC field to obtain the ECC check result. If the ECC check result is 0, it indicates that the "Payload" is correct; if the ECC check result is not 0 and the ECC check result indicates a 1-bit error and an error bit, it indicates that the error bit of the "Payload" needs to be corrected; if the ECC check result is not 0 and the ECC check result indicates an error of more than 2 bits, it indicates that an uncorrectable error has occurred in the "Payload". Among them, the TMDS CEC decoding module can use the same encoding rules as the TMDS CEC encoding module to perform ECC encoding on the "Payload", that is, the TMDS CEC decoding module can perform ECC encoding on the "Payload" through a 6-bit extended Hamming code to generate a second ECC field.
[0196] Step 328: The protocol receiving unit determines whether the CRC check result and the ECC check result are both 0. If so, execute step 330; if it is determined to be retransmission, execute step 312.
[0197] Step 330: The protocol receiving unit unpacks the second data block to generate a first data block, and sends the first data block to the second format conversion unit.
[0198] Specifically, the protocol receiving unit removes the preamble (Premble), data synchronization information (Sync), control / data information (C / D), reserved field (Rsvd), first ECC field, CRC field and check bit (Parity) field in the second data block to unpack the second data block to obtain the first data block.
[0199] Step 332: The second format conversion module converts the encoding format of the first data block to generate an image or video data stream, and uploads the image or video data stream to the load unit.
[0200] The second format conversion module performs pixel image coding format conversion on the first data block to generate an image or video data stream, and uploads the image or video data stream to the load unit.
[0201] As an optional scheme, if the protocol receiving unit recognizes that the ECC check result is not 0 and the ECC check result indicates a 1-bit error and an error bit, the error bit of the second data block is corrected, the second data block is unpacked to generate a first data block, and then, the protocol receiving unit converts the first data block into a pixel image coding format to generate an image or video data stream, and uploads the image or video data stream to the load unit.
[0202] As another optional solution, if the protocol receiving unit recognizes that the CRC check result is not 0 and / or recognizes that the ECC check result is not 0 and the ECC check result indicates that there are more than 2-bit errors, the second data block is discarded, directly skipped or retransmitted. In this case, the developer can determine how to handle the data packet. If it is determined that the second data block is to be retransmitted, step 312 can be continued. At this time, the protocol receiving unit can return an error notification to the protocol sending unit through the auxiliary channel, informing the protocol sending unit that an error has occurred in the second data block and that it needs to be retransmitted.
[0203] DisplayPort (DP for short) is a digital video interface standard developed by a consortium of PC and chip manufacturers and standardized by the Video Electronics Standards Association (VESA). Fig.14 It is a structural diagram of a data transmission system based on DP in the related art, such as Fig.14 As shown, Fig.15 Data transmission system in Fig.10 The difference is: Fig.15 In the embodiment, the TMDS CEC encoding module and the FEC encoding module are both located in the PHY layer sending module, the PHY layer sending module also includes a channel encoding module, the TMDS CEC decoding module and the FEC decoding module are both located in the PHY layer receiving module, and the PHY layer receiving module also includes a channel decoding module.
[0204] Fig.15 FIG. 1 is a flow chart of a data transmission method based on DP in the related art. Fig.15 As shown, Fig.15 Data transmission method in Fig.11 The difference in the process of data transmission method in is:
[0205] Fig.15 After step 310, the method further includes: step S1, the protocol sending unit performs channel coding on the second data block through the channel coding module to generate a coded second data block, and then in step 312, the coded second data block is divided into multiple FEC data blocks.
[0206] For example, the channel coding may include 128b / 132b coding or 8b / 10b coding.
[0207] Fig.15 After step 330, the method further includes: step S2, the protocol sending unit performs channel decoding on the first data block through the channel decoding module to generate a decoded first data block.
[0208] For example, channel decoding may include 128b / 132b decoding or 8b / 10b decoding.
[0209] Fig.16 This is a schematic diagram of the format of the link layer data frame based on DP, such as Fig.16 As shown, Fig.16 A plurality of data frames are shown, and the plurality of data frames include a data frame (Link Layer Frame) N-1, a data frame (Link Layer Frame) N, and a data frame (Link Layer Frame) N+1. Each data frame includes a control data packet (Control Packet) and a transport data packet (Transport Packet). Fig.16 The transmission data packet in is equivalent to Fig.12 The second data block in the packet. The transmission data packet has the characteristics of a multi-lane data stream, in which the ECC field and the CRC field are both inserted with check bits at the end of the data packet to verify and protect the data. The last byte of the data stream is generally mapped to the CRC byte for use. For a CRC check bit with only one byte (in the lowest bit), the highest bit must be filled with 0 to generate the CRC value, and other CRCs do not need to be filled. Each CRC used can have a different number of bytes. The Link Layer data frame of DP will be compressed during the data transmission process, so the check fields such as CRC and ECC are mapped and checked in the Byte data stream.
[0210] Fig.17 This is a schematic diagram of the format of a data frame that implements single-channel FEC at the PHY layer based on DP, such as Fig.17 As shown, what is shown is a data frame obtained after channel coding and FEC coding of the second data block, and the data frame may include FEC data block link layer coding (LL Codes for FEC Block), FEC data block check bit code (FEC Parity Codesfor Block), polarity code (CD_ADJ Code, referred to as CAJ Code) and FEC marker (FEC_PM). Among them, CAJ is the reserved coding polarity bit, and PM is the marker of the FEC data frame format. The channel decoding module performs the reverse decoding process of the channel coding module, and generates the second data block after performing FEC check and channel decoding on the obtained data frame. DP implements FEC coding error correction at the PHY layer to ensure reliable data transmission.
[0211] The above-mentioned scheme of the data transmission method based on HDMI and DP of the related technology uses the FEC algorithm to perform error detection and correction processing on the image or video data, so it can perform error detection and correction of multiple bits of error data on the image or video data, thereby improving the reliability of data transmission. However, since only a combination of the FEC algorithm, the CRC algorithm and the ECC algorithm can be used for error detection and correction processing during the data transmission process, it will cause large data redundancy, thereby reducing the efficiency of data transmission. In addition, the data transmission method based on HDMI and DP is only applicable to specific display application scenarios and cannot be extended to data reliability transmission of other high-speed data transmission systems.
[0212] In summary, there is no data transmission method in the related art that can improve the data transmission efficiency on the basis of ensuring the data transmission reliability. In order to solve the technical problem that the above-mentioned related art cannot improve the data transmission efficiency on the basis of ensuring the data transmission reliability, the embodiment of the present invention provides a data transmission method, which detects the transmission channel environment, selects an error detection and correction algorithm suitable for the transmission channel environment, and performs error detection and correction processing on the transmission data in the data transmission process through the selected error detection and correction algorithm, thereby improving the data transmission efficiency on the basis of ensuring the data transmission reliability. The technical solution of the embodiment of the present invention can be flexibly extended to the data reliability transmission of other high-speed data transmission systems.
[0213] Fig.18a is a communication schematic diagram of a data transmission system provided by some embodiments of the present invention, such as Fig.18a The data transmission system includes a first device and a second device, wherein the first device includes a sending device and a first device control interface, and the second device includes a receiving device and a second device control interface. A plurality of transmission channels and clock channels are arranged between the sending device and the receiving device, and both the transmission channels and the clock channels are unidirectional channels, and the transmission channels can transmit image data from the first device to the second device; an auxiliary channel (for example, I 2 C bus), the auxiliary channel is a bidirectional transmission channel, and the auxiliary channel includes a data line SDA and a clock signal line SCL. Among them, data can be transmitted between the sending device and the receiving device through a high-speed interface, and data can be transmitted between the first device control interface and the second device control interface through a low-speed interface.
[0214] In an embodiment of the present invention, as an optional solution, the first device and the second device may be different devices, that is, the first device and the second device are two separate devices. For example, the first device is a camera module, and the second device is a host; for another example, the first device is a host, and the second device is a display. Examples of hosts include but are not limited to devices equipped with iOS, Android, Microsoft or other operating systems. Optionally, the host is a mobile phone, a tablet computer, a wearable device, a smart TV or a personal computer.
[0215] In an embodiment of the present invention, as another optional solution, the data transmission system is provided in an electronic device, that is, the electronic device includes a first device and a second device. For example, the first device is a camera module, and the second device is a motherboard; for another example, the first device is a motherboard, and the second device is a display screen. Examples of electronic devices include, but are not limited to, devices equipped with iOS, Android, Microsoft or other operating systems. Optionally, the electronic device includes a mobile phone, a tablet computer, a wearable device, a security device, a smart TV or a personal computer. Among them, the security device may include a security camera device.
[0216] Fig.18b is a schematic diagram of a board-level connection between a first device and a second device provided in some embodiments of the present invention, such as Fig.18b As shown, taking the first device as a camera module and the second device as a mobile phone as an example, the mobile phone includes a mainboard, the mainboard includes an application processor (AP), and the mainboard is connected to the camera module through a connector (BTB) and a flexible printed circuit (FPC). Among them, the BTB is mainly used to connect the camera module and the mainboard. Usually, the BTB includes multiple CSI-2 signal pins; the FPC is full of CSI-2 signal transmission lines to cooperate with the BTB to complete the connection between the camera module and the mainboard.
[0217] Fig.18c is a schematic diagram of a board-level connection between a first device and a second device provided in some other embodiments of the present invention, such as Fig.18cAs shown, taking the first device as a mobile phone and the second device as a display screen as an example, the mobile phone includes a mainboard, the mainboard includes an AP, and the display screen (not shown in the figure) includes a mobile phone display driver IC (Display Driver IC, DDIC for short) module. The mainboard is connected to the DDIC module through BTB and FPC. Among them, BTB is mainly used to connect the DDIC module and the mainboard. Usually, BTB includes multiple DSI-2 signal pins; FPC is full of DSI-2 signal transmission lines to cooperate with BTB to complete the connection between the FFIC module and the mainboard. Among them, the DSI-2 protocol is a protocol interface established by MIPI to connect SoC and DDIC.
[0218] Based on the above data transmission system, an embodiment of the present invention provides a data transmission method, which includes:
[0219] If the environmental parameters of the transmission channel meet the conditions for starting the first algorithm, the first device encodes the acquired transmission data through the first error detection and correction algorithm to generate first coded data, and sends the first coded data to the second device. The second device receives the coded data; if it is determined that the conditions for starting the first algorithm are met, the coded data is verified through the first error detection and correction algorithm to generate transmission data; if it is determined that the conditions for starting the second algorithm are met, the coded data is verified through the second error detection and correction algorithm to generate transmission data.
[0220] The second error detection and correction algorithm is different from the first error detection and correction algorithm.
[0221] As an alternative, Fig.18d is a flow chart of a data transmission method provided by an embodiment of the present invention, such as Fig.18d As shown, the method includes:
[0222] Step 100a: The first device determines whether the environmental parameters of the transmission channel meet the first algorithm start-up condition or the second algorithm start-up condition. If the first algorithm start-up condition is met, step 100b is executed; if the second algorithm start-up condition is met, step 100c is executed.
[0223] In the embodiment of the present invention, judging whether the environmental parameter of the transmission channel meets the first algorithm start condition or the second algorithm start condition may be performed by the first device or the second device. As an optional solution, step 100a is performed by the first device.
[0224] If step 100a is executed by the second device, if the second device determines that the environmental parameters of the transmission channel meet the first algorithm startup conditions, then the first environmental parameter state is returned to the first device, where the first environmental parameter state is, for example, a first bit error rate state or a first packet loss rate state, and the first environmental parameter state is used to indicate that the environmental parameters meet the first algorithm startup conditions; if the second device determines that the environmental parameters of the transmission channel meet the second algorithm startup conditions, then the second environmental parameter state is returned to the first device, where the second environmental parameter state is, for example, a second bit error rate state or a second packet loss rate state, and the second environmental parameter state is used to indicate that the environmental parameters meet the second algorithm startup conditions.
[0225] Step 100b: The first device encodes the acquired transmission data through a first error detection and correction algorithm to generate first encoded data, and sends the first encoded data to the second device, and then continues to execute step 100d.
[0226] Step 100c: The first device encodes the acquired transmission data by using a second error detection and correction algorithm to generate second encoded data, and sends the second encoded data to the second device.
[0227] Step 100d: The second device receives the encoded data.
[0228] Step 100e: If the second device determines that the first algorithm startup condition is met, the coded data is verified by the first error detection and correction algorithm to generate transmission data; if it is determined that the second algorithm startup condition is met, the coded data is verified by the second error detection and correction algorithm to generate transmission data.
[0229] In the embodiment of the present invention, the first device may obtain the environmental parameters of the transmission channel, and determine whether the environmental parameters of the transmission channel meet the first algorithm start-up condition or the second algorithm start-up condition.
[0230] As an optional solution, if the environmental parameters of the transmission channel include a bit error rate, the first device obtaining the environmental parameters of the transmission channel may include: the first device sequentially sends a first sequence and a second sequence to the second device, so that the second device can count the number of bits of the correct second sequence received, the first sequence is used to implement state machine equalization training; receiving the number of bits of the correct second sequence sent by the second device; calculating the bit error rate according to the number of bits of the correct second sequence sent by the second device and the total number of bits of the second sequence sent. The first device determines whether the environmental parameters of the transmission channel meet the first algorithm start-up conditions or meet the second algorithm start-up conditions, including: the first device determines whether the bit error rate is greater than or equal to the first threshold, if it is determined that the bit error rate is greater than or equal to the first threshold, it indicates that the environmental parameters of the transmission channel meet the first algorithm start-up conditions; if it is determined that the bit error rate is less than the first threshold, it indicates that the environmental parameters of the transmission channel meet the second algorithm start-up conditions.
[0231] As another optional solution, if the environmental parameters of the transmission channel include the system transmission rate, the first device obtains the environmental parameters of the transmission channel including: the first device reads the system transmission rate from the speed change status register. The first device determines whether the environmental parameters of the transmission channel meet the first algorithm start-up condition or the second algorithm start-up condition, including: the first device determines whether the system transmission rate is greater than or equal to the second threshold value, if it is determined that the system transmission rate is greater than or equal to the second threshold value, it indicates that the environmental parameters of the transmission channel meet the first algorithm start-up condition; if it is determined that the system transmission rate is less than the second threshold value, it indicates that the environmental parameters of the transmission channel meet the second algorithm start-up condition. For example: For this situation, please refer to Fig.23 Step 506 and step 508.
[0232] As another optional scheme, if the environmental parameters of the transmission channel include a packet loss rate, the first device obtains the environmental parameters of the transmission channel including: the first device sends a test data packet to the second device, and records the number of the test data packets sent; receives the number of correct test data packets received and returned by the second device; and calculates the packet loss rate based on the number of correct test data packets and the number of test data packets sent. The first device determines whether the environmental parameters of the transmission channel meet the first algorithm startup conditions or the second algorithm startup conditions, including: the first device determines whether the packet loss rate is greater than or equal to a third threshold; if it is determined that the packet loss rate is greater than or equal to the third threshold, it indicates that the environmental parameters of the transmission channel meet the first algorithm startup conditions; if it is determined that the packet loss rate is less than the third threshold, it indicates that the environmental parameters of the transmission channel meet the second algorithm startup conditions. For example: For this case, please refer to Fig.25 Step 606 and step 612.
[0233] In the embodiment of the present invention, the second device may also obtain the environmental parameters of the transmission channel, and determine whether the environmental parameters of the transmission channel meet the first algorithm start-up condition or the second algorithm start-up condition.
[0234] As an optional solution, if the environmental parameters of the transmission channel include a bit error rate, the second device receives the first sequence and the second sequence sent in sequence by the first device, the first sequence is used to implement state machine equalization training; the bit error rate is calculated according to the number of bits of the received correct second sequence and the total number of bits of the sent second sequence; if the bit error rate meets the first algorithm start-up condition, the first bit error rate state is sent to the first device, the first bit error rate state is used to indicate that the bit error rate meets the first algorithm start-up condition; if the bit error rate meets the second algorithm start-up condition, the second bit error rate state is sent to the first device, the second bit error rate state is used to indicate that the bit error rate meets the second algorithm start-up condition. The second device determines whether the environmental parameters of the transmission channel meet the first algorithm start-up condition or the second algorithm start-up condition, including: the second device determines whether the bit error rate is greater than or equal to the first threshold value, if it is determined that the bit error rate is greater than or equal to the first threshold value, it indicates that the environmental parameters of the transmission channel meet the first algorithm start-up condition; if it is determined that the bit error rate is less than the first threshold value, it indicates that the environmental parameters of the transmission channel meet the second algorithm start-up condition. Among them, the first device can know that the bit error rate meets the first algorithm activation condition according to the first bit error rate state, and can use the first error detection and correction algorithm for encoding; the first device can know that the bit error rate meets the second algorithm activation condition according to the second bit error rate state, and can use the second error detection and correction algorithm for encoding. For example: This situation can be referred to Fig. 20 Steps 406 to 416 and step 446.
[0235] As another optional solution, if the environmental parameters of the transmission channel include a packet loss rate, the second device receives the test data packet sent by the first device; the packet loss rate is calculated according to the number of correct test data packets received and the number of test data packets sent; if the packet loss rate meets the first algorithm start-up condition, a first packet loss rate state is sent to the first device, and the first packet loss rate state is used to indicate that the packet loss rate meets the first algorithm start-up condition; if the packet loss rate meets the second algorithm start-up condition, a second packet loss rate state is sent to the first device, and the first packet loss rate state is used to indicate that the packet loss rate meets the second algorithm start-up condition. The second device determines whether the environmental parameters of the transmission channel meet the first algorithm start-up condition or the second algorithm start-up condition, including: the second device determines whether the packet loss rate is greater than or equal to a third threshold value, if it is determined that the packet loss rate is greater than or equal to the third threshold value, it indicates that the environmental parameters of the transmission channel meet the first algorithm start-up condition; if it is determined that the packet loss rate is less than the third threshold value, it indicates that the environmental parameters of the transmission channel meet the second algorithm start-up condition. Among them, the first device can know that the packet loss rate meets the first algorithm activation condition according to the first packet loss rate state, and can use the first error detection and correction algorithm for encoding; the first device can know that the packet loss rate meets the second algorithm activation condition according to the second packet loss rate state, and can use the second error detection and correction algorithm for encoding.
[0236] In this embodiment, the method further includes: the first device collects raw data; and performs coding format conversion on the raw data to generate the transmission data. The raw data includes, but is not limited to, image data stream, video data stream, instruction data, storage data, or network data, wherein the network data is, for example, 2G / 3G / 4G / 5G data or WLAN data. For example, the first device performs coding format conversion on the raw data to generate the transmission data, including: performing binary coding format conversion on the raw data to generate the transmission data.
[0237] As an optional solution, after the first device determines that the environmental parameters of the transmission channel meet the first algorithm startup conditions, the first device executes the step of collecting raw data; or after the first device determines that the environmental parameters of the transmission channel meet the first algorithm startup conditions, the first device executes the step of collecting raw data. For example: This situation can be referred to Fig.23 Step 510 and step 538. For example: This situation can be seen in Fig.23 Step 510 and step 538.
[0238] As another optional solution, after the second device determines that the environmental parameters of the transmission channel meet the first algorithm start-up conditions and returns the first bit error rate status to the first device, the first device performs the step of collecting raw data; or after the second device determines that the environmental parameters of the transmission channel meet the first algorithm start-up conditions and returns the first bit error rate status to the first device, the first device performs the step of collecting raw data. For example: This situation can be seen in Fig. 20 Step 418 and step 448.
[0239] As another optional solution, before the first device encodes the acquired transmission data by the first error detection and correction algorithm and before encoding the acquired transmission data by the second error detection and correction algorithm, the step of collecting raw data is performed. In this case, the first device does not need to wait for the judgment result that the environmental parameters of the transmission channel meet the first algorithm start-up conditions or meet the second algorithm start-up conditions, and can collect raw data in real time. For example: This case can be referred to Fig.25 Step 614 and step 650.
[0240] In an embodiment of the present invention, determining whether the environmental channel parameters meet the first algorithm startup conditions may also include: any combination of the bit error rate being greater than or equal to the first threshold, the system transmission rate being greater than or equal to the second threshold, and the packet loss rate being greater than or equal to the third threshold.
[0241] In the embodiment of the present invention, judging whether the transmission channel environment parameters meet the second algorithm startup condition may also include any combination of: the bit error rate is less than the first threshold, the system transmission rate is less than the second threshold, and the packet loss rate is less than the third threshold.
[0242] In an optional embodiment, the first error detection and correction algorithm includes at least two error detection and correction algorithms, the second error detection and correction algorithm includes at least one error detection and correction algorithm, and the number of error detection and correction algorithms in the first error detection and correction algorithm is greater than the number of error detection and correction algorithms in the second error detection and correction algorithm.
[0243] As an optional solution, the first error detection and correction algorithm includes an FEC algorithm, a CRC algorithm and an ECC algorithm (for example, Fig. 20 Steps 420 to 444 in Fig.23 Steps 512 to 524 in the above); or, the first error detection and correction algorithm includes an FEC algorithm and a CRC algorithm; or, the first error detection and correction algorithm includes an FEC algorithm and an ECC algorithm. For example: Fig. 20 In steps 420 to 444 of Fig.23In step 512 to step 524, the transmission data includes the first data block, and the first coded data includes the fourth data block. It should be noted that the FEC algorithm includes but is not limited to the Reed-Solomon codes (RS codes for short) algorithm.
[0244] As another optional solution, the second error detection and correction algorithm includes an FEC algorithm (for example: Fig.25 or, the second error detection and correction algorithm includes a CRC algorithm; or, the second error detection and correction algorithm includes an ECC algorithm; or, the second error detection and correction algorithm includes a CRC algorithm and an ECC algorithm (for example: Fig. 20 Steps 450 to 468 in Fig.23 540 to 558 in FIG. 1 ). For example: Fig.25 In step 654 to step 666, the transmission data includes the first data block, and the first coded data includes the third data block. For another example: Fig. 20 In steps 450 to 468 of Fig.23 In steps 540 to 558, the transmission data includes the first data block, and the first encoded data includes the fifth data block.
[0245] In an embodiment of the present invention, the first coded data includes an indication field, and the indication field of the first coded data is used to indicate that the environmental parameters meet the conditions for starting the first algorithm; and / or, the second coded data includes an indication field, and the indication field of the second coded data is used to indicate that the environmental parameters meet the conditions for starting the second algorithm.
[0246] If only the first coded data includes the indication field, the indication field is, for example, 1. In this case, the second device determines that the first algorithm startup condition is met specifically including: the second device determines that the coded data includes the indication field; the second device determines that the second algorithm startup condition is met specifically including: determining that the coded data does not include the indication field.
[0247] If only the second coded data includes the indication field, the indication field is, for example, 1. In this case, the second device determines that the first algorithm startup condition is met specifically including: the second device determines that the coded data does not include the indication field; the second device determines that the second algorithm startup condition is met specifically including: the second device determines that the coded data includes the indication field.
[0248] If both the first coded data and the second coded data include an indication field, the indication field in the first coded data and the indication field in the second coded data can be set to different values. The indication field in the first coded data is a first value, for example, 1, and the indication field in the second coded data is a second value, for example, 0. In this case, the second device determines that the first algorithm startup condition is met, specifically including: the second device determines that the indication field in the coded data is 1; the second device determines that the second algorithm startup condition is met, specifically including: the second device determines that the indication field in the coded data is 0. Among them, the first value is used to indicate that the environmental parameter meets the first algorithm startup condition, and the second value is used for the environmental parameter to meet the second algorithm startup condition.
[0249] The indication field includes a reserved field or a newly added field. When the indication field includes a newly added field, the indication field is, for example, a bit error rate confirmation field (such as Fig. 20 Step 428 in the transmission rate confirmation field (such as Fig.23 Step 520 in the above example) or the packet loss rate confirmation field (e.g. Fig.25 622 in step 622).
[0250] In the embodiment of the present invention, the checking of the coded data by the first error detection and correction algorithm includes: if it is determined that the coded data includes an indication field, performing FEC check on the coded data, the indication field is used to indicate that the environmental parameters meet the first algorithm start-up conditions; performing CRC check and / or ECC check on the coded data after FEC check. For example: In this case, please refer to Fig. 20 Step 436 and step 438, and Fig.23 528 and step 530.
[0251] In the embodiment of the present invention, the checking of the coded data by the first error detection and correction algorithm includes: performing FEC check on the coded data; if it is determined that the coded data includes an indication field, performing CRC check and / or ECC check on the coded data after FEC check, and the indication field is used to indicate that the environmental parameters meet the conditions for starting the first algorithm. For example: In this case, please refer to Fig.25 Steps 636 to 640 in .
[0252] In the technical solution of the data transmission method provided by the embodiment of the present invention, the first device selects a first error detection and correction algorithm to encode the transmission data to generate first coded data according to whether the environmental parameters of the transmission channel meet the first algorithm startup conditions, or the first device selects a second error detection and correction algorithm to encode the transmission data to generate second coded data according to whether the environmental parameters of the transmission channel meet the second algorithm startup conditions. The second device receives the coded data, and if it is determined that the first algorithm startup conditions are met, the coded data is verified by the first error detection and correction algorithm to generate the transmission data; if it is determined that the second algorithm startup conditions are met, the coded data is verified by the second error detection and correction algorithm to generate the transmission data, thereby realizing error detection and correction processing of the transmission data in the data transmission process by the selected error detection and correction algorithm, thereby improving the data transmission efficiency on the basis of ensuring the reliability of data transmission.
[0253] Fig.19 is a schematic diagram of a data transmission system provided by some embodiments of the present invention, such as Fig.19 As shown, the data transmission system is, for example, a MIPI CSI-2D-PHY data transmission system, which adopts the CSI-2 protocol architecture. Fig.19 As shown, the system includes a first device and a second device, the first device includes an image processing unit and a sending device, and the second device includes a main processor unit and a receiving device. Wherein, if the first device is a camera module, the image processing unit is a camera sensor (Sensor), and the sending module is an interface circuit; if the second device is a mainboard, the main processor unit is an AP, and the receiving module is an interface circuit. The sending device includes a first format conversion module, a protocol sending unit, and a PHY layer sending module. The protocol sending unit includes an ECC encoding module, a CRC encoding module, and an FEC encoding module. The receiving device includes a second format conversion module, a protocol receiving unit, and a PHY layer receiving module, and the protocol receiving unit includes a header ECC decoding module, a net core CRC decoding module, and an FEC decoding module, wherein the PHY layer sending module and the PHY layer receiving module are connected to each other through a transmission channel. Fig.19 A transmission channel is used as an example for description. The protocol sending unit includes a CSI-2 sending unit, the protocol receiving unit includes a CSI-2 receiving unit, the PHY layer sending module includes a D-PHY sending module, and the PHY layer receiving module includes a D-PHY receiving module.
[0254] Fig. 20 is a flow chart of a data transmission method provided by some embodiments of the present invention, such as Fig. 20 As shown, the method includes:
[0255] Step 402: The second device configures working parameters for the first device.
[0256] like Fig.19As shown, the main processor unit of the second device configures the working parameters of the image processing unit.
[0257] Specifically, in all practical use scenarios, the mainboard can configure the working parameters of the camera module so that the camera module can work according to the requirements of the working parameters. The working parameters may include resolution, frame rate, interface rate, etc.
[0258] The user clicks the icon of the camera APP of the second device to open the camera APP, thereby triggering the second device to configure the working parameters of the first device.
[0259] Step 404: The first device sends the first sequence to the second device.
[0260] Fig.21 Schematic diagram of the data format of the training code stream in some embodiments of the present invention. Fig.21 As shown, when the link is in a high speed (HS) transmission state, the first device sends a training code stream to the second device through the transmission channel to complete the system training process. Fig.19 As shown in the figure, the protocol sending unit sends the training code stream to the protocol receiving unit through the transmission channel. Specifically, the protocol sending unit sends the training code stream to the PHY layer sending module, the PHY layer sending module sends the training code stream to the PHY layer receiving module through the transmission channel, and then the PHY layer receiving module sends the training code stream to the protocol receiving unit to implement the CSI-2 state machine equalization training process.
[0261] like Fig.21 As shown, the training code stream includes a data type sequence, an equalization sequence, a first sequence, a second sequence and a third sequence. In the process of sending the training code stream by the first device, first, the first device sends a data type sequence to the second device, and the data type sequence includes "Control Word". "Control Word" can indicate that the training code stream is a control packet. For example, the "Control Word" can be 0101. Then, the first device sends an equalization sequence to the second device. Next, the first device sends a first sequence to the second device, and the first sequence may include a pseudo-random binary sequence (PRBS) 15 sequence. For example, the first device may send 1 million PRBS15 sequences to the second device to implement the state machine equalization training process.
[0262] Step 406: The first device sends a second sequence to the second device.
[0263] like Fig.21As shown, during the process of sending the training code stream, the first device sends a second sequence to the second device, and the second sequence may include a PRBS31 sequence. For example, the first device may send 1 million PRBS31 sequences to the second device.
[0264] Step 408: The first device sends a third sequence to the second device.
[0265] like Fig.21 As shown, in the process of sending the training code stream, the first device sends a third sequence to the second device, and the third sequence may include an idle (IDLE) sequence. The second device may directly discard the IDLE sequence, ignore the IDLE sequence, and keep the link recovery clock locked.
[0266] Step 410: The second device counts the number of bits of the received correct second sequence.
[0267] During the time period when the first device sends the IDLE sequence, the second device counts the number of bits of the correct second sequence. Fig.19 As shown) counts the number of bits of the correct second sequence received.
[0268] Step 412: The second device calculates a bit error rate according to the number of correct bits of the second sequence and the total number of bits of the second sequence sent by the first device.
[0269] During the time period when the first device sends the IDLE sequence, the second device calculates the bit error rate. Specifically, the second device calculates the bit error rate using the formula 1-n / N, where n is the number of correct bits of the second sequence and N is the total number of bits of the second sequence. Fig.19 The bit error rate is calculated.
[0270] Step 414 , the second device determines whether the bit error rate is greater than or equal to the first threshold, and if so, executes step 416 ; if not, executes step 446 .
[0271] During the time period when the first device sends the IDLE sequence, the second device determines whether the bit error rate is greater than or equal to a first threshold. The first threshold is, for example, 1e-12, 1e-15 or 1e-10. Fig.19 As shown) determines whether the bit error rate is greater than or equal to a first threshold.
[0272] As an optional solution, steps 406 to 416 and step 446 can be replaced by: the first device sends the first sequence and the second sequence to the second device in sequence, so that the second device can count the number of bits of the correct second sequence received, and the first sequence is used to implement state machine equalization training; receive the number of bits of the correct second sequence sent by the second device; calculate the bit error rate according to the number of bits of the correct second sequence sent by the second device and the total number of bits of the sent second sequence. The first device determines whether the bit error rate is greater than or equal to the first threshold.
[0273] Step 416: The second device returns the first bit error rate status to the first device.
[0274] If the second device determines that the bit error rate is greater than or equal to the first threshold, it indicates that the bit error rate is large. At this time, the second device generates a first bit error rate state (Bit Error RatemState, BER State for short) corresponding to the judgment result that the bit error rate is greater than or equal to the first threshold. For example, the first bit error rate state can be 1.
[0275] Then, before the end of the time period in which the first device sends the IDLE sequence, the protocol receiving unit of the second device returns the first bit error rate state to the protocol sending unit of the first device through the auxiliary channel (AUX).
[0276] The time period for sending the third sequence can be used for the steps of calculating and judging the bit error rate, so that the steps of calculating and judging the bit error rate can be completed in the process of sending the training code stream.
[0277] Step 418: The first device collects the image data stream, and performs coding format conversion on the image data stream to generate a first data block.
[0278] Image processing unit (such as Fig.19 ) to collect the image data stream, and send the collected image data stream to the first format conversion module (as shown in Fig.19 As shown), the first format conversion module converts the encoding format of the image data stream.
[0279] Step 420: The first device adds a data packet header to the first data block.
[0280] Fig. 22 is a schematic diagram of the format of a data block transmitted based on D-PHY in some embodiments of the present invention, such as Fig. 22 As shown, the first format conversion module (such as Fig.19The first format conversion module converts the image data stream into a binary encoding format to form a "Payload". The data packet header may include a Data ID, a 16-bit WC, and a VCX. The first format conversion module sends the first data block with the data packet header added to the protocol sending unit (such as Fig.19 shown).
[0281] Step 422: The first device performs ECC encoding on the data packet header to generate a first ECC field, and performs CRC encoding on the first data block to generate a CRC field.
[0282] As Fig. 22 As shown, the protocol sending unit passes through the packet header ECC encoding module (such as Fig.19 The packet header ECC encoding module performs ECC encoding on the Data ID, WC and VCX through a 6-bit extended Hamming code to generate the first ECC field, where the ECC field is a 6-bit field. It should be noted that: Fig. 22 The ECC fields shown in include a first ECC field.
[0283] like Fig. 22 As shown, the protocol sending unit passes through the net core CRC encoding module (such as Fig.19 The CRC encoding module performs CRC encoding on the first data block to generate a CRC field. The CRC encoding module performs CRC encoding on the "Payload" through a polynomial to generate a CRC field. The polynomial is, for example: 16 +X 12 +X 5 +X 0 , the CRC field is a 16-bit field.
[0284] Step 424: The first device inserts the first ECC field and the CRC field into the header and the trailer of the first data block to generate a second data block.
[0285] like Fig. 22 As shown, the protocol sending unit (such as Fig.19 As shown in FIG. 1 , the first ECC field and the CRC field are placed at the header and the tail of the "Payload" packet respectively, and the Data ID, WC and VCX are located at the designated positions of the second data block respectively. It should be noted that: Fig. 22 The ECC field shown in is the first ECC field.
[0286] Step 426: The first device performs FEC encoding on different data segments of the second data block, generates an FEC check code corresponding to each data segment, and places each FEC check code at the end of the corresponding data segment.
[0287] like Fig. 22 As shown, the protocol sending unit (such as Fig.19 (as shown in the figure) if it is determined that the first bit error rate state is 1, the second data block is divided into a plurality of data segments through the FEC encoding module, for example, the plurality of data segments may include Part 0 to Part N-1 of the second data block. The FEC encoding module performs FEC encoding on different data segments of the second data block, generates an FEC check code (FEC Parity) corresponding to each data segment, and places each FEC check code at the end of the corresponding data segment.
[0288] Step 428: The first device adds an indication field before the second data block to generate a third data block.
[0289] In this embodiment, as an optional solution, the indication field is a newly added field, and the indication field is, for example, a bit error rate confirmation (Bit Error Rate Ensure, referred to as BER EN) field. The bit error rate confirmation field is used to indicate that the bit error rate is greater than or equal to the first threshold. Fig. 22 As shown, the protocol sending unit passes through the FEC encoding module (such as Fig.19 (as shown in FIG. 1 ) adds a BER EN field before the second data block. The value of the bit error rate confirmation field is, for example, 1.
[0290] As another optional solution, the indication field is a reserved field. In this case, step 428 may include: the first device sets a value of the reserved field so that the reserved field is used to indicate that the bit error rate is greater than or equal to the first threshold. The value of the reserved field is 1, for example.
[0291] Step 430: The first device sets a SoT marker at the start position of the third data block and sets an EoT marker at the end position of the third data block to form a fourth data block.
[0292] like Fig. 22 As shown, the protocol sending unit (such as Fig.19 As shown in FIG. 1 , a SoT identifier is set at the start position of the third data block and an EoT is set at the end position of the third data block to form a fourth data block.
[0293] Step 432: The first device sends the fourth data block to the second device.
[0294] like Fig. 22 As shown, the protocol sending unit (such as Fig.19 As shown) sends the fourth data block to the PHY layer sending module (as shown Fig.19 As shown), the PHY layer sending module sends the fourth data block to the PHY layer receiving module (as shown) through the transmission channel. Fig.19 As shown), the PHY layer receiving module sends the fourth data block to the protocol receiving unit (as shown Fig.19shown).
[0295] Step 434: The second device removes the SoT and the EoT of the fourth data block to generate a third data block.
[0296] like Fig. 22 As shown, the protocol receiving unit (such as Fig.19 ) removes the SoT and EoT of the fourth data block to generate a third data block.
[0297] Step 436: The second device parses the third data block.
[0298] , protocol receiving unit (such as Fig.19 As shown) parse the third data block.
[0299] Step 438: If the second device parses the indication field, it performs FEC error detection and correction on the third data block to generate a second data block.
[0300] Protocol receiving unit (such as Fig.19 As shown in FIG. 1 ), if the indication field is parsed, the judgment result that the bit error rate is greater than or equal to the first threshold can be obtained through the indication field, and then the first error detection and correction algorithm is determined to be adopted, and the FEC decoding module is activated (as shown in FIG. 1 ). Fig.19 As shown in FIG. 1 , the FEC decoding module performs FEC check on the third data block through the RS code decoding algorithm to generate an FEC check result. The FEC check result includes a check success, a correctable error result, or an uncorrectable error result.
[0301] If the protocol receiving unit identifies that the FEC check result includes a correctable error result, it corrects the erroneous data of the third data block and unpacks the third data block to generate a second data block.
[0302] If the protocol receiving unit recognizes that the FEC check result includes a successful check, indicating that there is no erroneous data in the third data block, the third data block can be directly unpacked to generate a second data block.
[0303] If the protocol receiving unit recognizes that the FEC check result includes an uncorrectable error result, the third data block is discarded, directly skipped, or retransmitted. In this case, the developer can determine how to handle the third data block.
[0304] Step 440: The second device performs a CRC check on the CRC field in the second data block to generate a CRC check result.
[0305] Protocol receiving unit (such as Fig.19As shown in FIG. 1 , the CRC field in the second data block is divided modulo 2 by the polynomial through the net core CRC decoding module to obtain the remainder, which is the CRC check result. If the CRC check result is 0, it indicates that the received "Payload" is correct data; if the CRC check result is not 0, it indicates that the received "Payload" is wrong data. The polynomial may include X 16 +X 12 +X 5 +X 0 .
[0306] Step 442: The second device performs an ECC check on the data packet header in the second data block to generate an ECC check result.
[0307] like Fig. 22 As shown, the protocol receiving unit passes through the packet header ECC decoding module (such as Fig.19 (as shown in the figure) ECC encoding is performed on the Data ID, WC and VCX in the data packet header to generate a second ECC field, and the first ECC field and the second ECC field are XORed to obtain an ECC check result. If the ECC check result is 0, it indicates that the data packet header is correct; if the ECC check result is not 0 and the ECC check result indicates that there is a 1-bit error and an error bit, it indicates that the error bit of the data packet header needs to be corrected; if the ECC check result is not 0 and the ECC check result indicates that there are more than 2-bit errors, it indicates that an uncorrectable error has occurred in the data packet header.
[0308] Among them, the packet header ECC decoding module can use the same encoding rules as the packet header ECC encoding module to ECC encode the Data ID, WC and VCX in the data packet header, that is, the packet header ECC decoding module can use 6-bit extended Hamming code to ECC encode DataID, WC and VCX to generate the second ECC field.
[0309] Step 444: If the second device recognizes that the check result is 0 and the verification result is 0, it unpacks the second data block to generate the first data block, converts the encoding format of the first data block to generate an image data stream, and the process ends.
[0310] Protocol receiving unit (such as Fig.19 As shown), if the check result is identified as 0 and the verification result is 0, remove the data packet header of the second data block to obtain the first data block.
[0311] The second format conversion module (such as Fig.19Specifically, the second format conversion module performs pixel image encoding format conversion on the first data block to generate an image data stream, and uploads the image data stream to the main processor unit.
[0312] Step 446: The second device returns the second bit error rate status to the first device.
[0313] If the second device determines that the bit error rate is less than the first threshold, it indicates that the bit error rate is small. At this time, the second device generates a second bit error rate state (Bit Error Ratem State, BER State for short) corresponding to the judgment result that the bit error rate is less than the first threshold. For example, the second bit error rate state can be 0.
[0314] Then, before the end of the time period in which the first device sends the IDLE sequence, the protocol receiving unit of the second device returns the second bit error rate state to the protocol sending unit of the first device through the auxiliary channel (AUX).
[0315] Step 448: The first device collects the image data stream, and performs coding format conversion on the image data stream to generate a first data block.
[0316] Image processing unit (such as Fig.19 ) to collect the image data stream, and send the collected image data stream to the first format conversion module (as shown in Fig.19 As shown), the first format conversion module converts the encoding format of the image data stream to generate a first data block.
[0317] Step 450: The first device adds a data packet header to the first data block.
[0318] like Fig. 22 As shown, the first format conversion module (such as Fig.19 The first format conversion module converts the image data stream into a binary encoding format to form a "Payload". The data packet header may include a Data ID, a 16-bit WC, and a VCX. The first format conversion module sends the first data block with the data packet header added to the protocol sending unit (such as Fig.19 shown).
[0319] Step 452: The first device performs ECC encoding on the data packet header to generate a first ECC field, and performs CRC encoding on the first data block to generate a CRC field.
[0320] like Fig. 22 As shown, the protocol sending unit passes through the packet header ECC encoding module (such as Fig.19The packet header is encoded by the ECC encoding module (as shown in FIG. 1 ) to generate the first ECC field. The packet header ECC encoding module performs ECC encoding on the Data ID, WC and VCX through a 6-bit extended Hamming code to generate the first ECC field, wherein the ECC field is a 6-bit field. It should be noted that: Fig. 22 The ECC fields shown in include a first ECC field.
[0321] like Fig. 22 As shown, the protocol sending unit passes through the net core CRC encoding module (such as Fig.19 The CRC encoding module performs CRC encoding on the first data block to generate a CRC field. The CRC encoding module performs CRC encoding on the "Payload" through a polynomial to generate a CRC field. The polynomial is, for example: 16 +X 12 +X 5 +X 0 , the CRC field is a 16-bit field.
[0322] Step 454: The first device inserts the first ECC field and the CRC field into the header and the trailer of the first data block to generate a second data block.
[0323] like Fig. 22 As shown, the protocol sending unit (such as Fig.19 As shown in FIG. 1 , the first ECC field and the CRC field are placed at the header and the tail of the "Payload" respectively, and the Data ID, WC and VCX are located at the specified positions of the second data block respectively.
[0324] Step 456: The first device sets a SoT marker at the start position of the second data block and sets an EoT marker at the end position of the second data block to form a fifth data block.
[0325] like Fig. 22 As shown, the protocol sending unit (such as Fig.19 As shown in FIG. 1 , a SoT marker is set at the start position of the second data block and an EoT marker is set at the end position of the second data block to form a fifth data block.
[0326] Step 458: The first device sends the fifth data block to the second device.
[0327] like Fig. 22 As shown, the protocol sending unit (such as Fig.19 As shown) sends the fifth data block to the PHY layer sending module (as shown Fig.19 As shown), the PHY layer sending module sends the fifth data block to the PHY layer receiving module (as shown) through the transmission channel. Fig.19 As shown), the PHY layer receiving module sends the fifth data block to the protocol receiving unit (as shown Fig.19shown).
[0328] Step 460: The second device removes the SoT and the EoT of the fifth data block to generate a second data block.
[0329] like Fig. 22 As shown, the protocol receiving unit (such as Fig.19 ) removes the SoT and EoT of the fifth data block to generate a second data block.
[0330] Step 462: The second device parses the second data block.
[0331] The protocol receiving module parses the second data block through the FEC decoding module.
[0332] Step 464: If the second device fails to parse out the indication field, it performs a CRC check on the CRC field in the second data block to generate a CRC check result.
[0333] Protocol receiving unit (such as Fig.19 As shown) if the indication field is not parsed, the judgment result that the bit error rate is less than the first threshold is obtained, and then it is determined to adopt the second error detection and correction algorithm, and activate the net core CRC decoding module (as shown Fig.19 As shown), the CRC check and ECC check are performed by the clean core CRC decoding module. It should be noted that: in this embodiment, if the second device fails to parse the indication field, it can also first execute step 466, and then execute the step of performing CRC check on the CRC field in the second data block in step 464 to generate a CRC check result.
[0334] Protocol receiving unit (such as Fig.19 As shown in FIG. 1 , the CRC field in the second data block is divided modulo 2 by the polynomial through the net core CRC decoding module to obtain the remainder, which is the CRC check result. If the CRC check result is 0, it indicates that the received "Payload" is correct data; if the CRC check result is not 0, it indicates that the received "Payload" is wrong data. The polynomial is, for example: X 16 +X 12 +X 5 +X 0 .
[0335] Step 466: The second device performs an ECC check on the data packet header in the second data block to generate an ECC check result.
[0336] like Fig. 22 As shown, the protocol receiving unit passes through the packet header ECC decoding module (such as Fig.19(as shown in the figure) ECC encoding is performed on the Data ID, WC and VCX in the data packet header to generate a second ECC field, and the first ECC field and the second ECC field are XORed to obtain an ECC check result. If the ECC check result is 0, it indicates that the data packet header is correct; if the ECC check result is not 0 and the ECC check result indicates that there is a 1-bit error and an error bit, it indicates that the error bit of the data packet header needs to be corrected; if the ECC check result is not 0 and the ECC check result indicates that there are more than 2-bit errors, it indicates that an uncorrectable error has occurred in the data packet header.
[0337] Among them, the packet header ECC decoding module can use the same encoding rules as the packet header ECC encoding module to ECC encode the Data ID, WC and VCX in the data packet header, that is, the packet header ECC decoding module can use 6-bit extended Hamming code to ECC encode DataID, WC and VCX to generate the second ECC field.
[0338] Step 468: If the second device recognizes that the check result is 0 and the verification result is 0, it unpacks the second data block to generate the first data block, and converts the encoding format of the first data block to generate an image data stream.
[0339] like Fig. 22 As shown, the protocol receiving unit (such as Fig.19 As shown), if the check result is identified as 0 and the verification result is 0, remove the data packet header of the second data block to obtain the first data block.
[0340] The second format conversion module performs encoding format conversion on the first data block to generate an image data stream, and uploads the image data stream to the main processor unit. Specifically, the second format conversion module performs pixel image encoding format conversion on the first data block to generate an image data stream, and uploads the image data stream to the main processor unit.
[0341] It should be noted that: Fig. 20 Steps 420 to 444 in the method may be replaced by: a scheme of encoding by an FEC algorithm and a CRC algorithm; or a scheme of encoding by an FEC algorithm and an ECC algorithm. Fig. 20 Steps 450 to 468 in the method can be replaced by: a scheme of performing verification through an FEC algorithm; or a scheme of performing verification through a CRC algorithm; or a scheme of performing verification through an ECC algorithm.
[0342] In the technical solution of the embodiment of the present invention, the bit error rate is obtained by detecting the transmission channel environment. When the bit error rate is large, a combination of the FEC algorithm, the CRC algorithm and the ECC algorithm is selected to perform error detection and correction processing on the transmission data during the data transmission process, thereby realizing error detection and correction of multi-bit error data, thereby improving the reliability of data transmission; when the bit error rate is small, a combination of the CRC algorithm and the ECC algorithm is selected to perform error detection and correction processing on the transmission data during the data transmission process, thereby avoiding the situation where data redundancy is large during error detection and correction processing, thereby improving data transmission efficiency. The data transmission method of this embodiment improves the data transmission efficiency on the basis of ensuring the reliability of data transmission. In the embodiment of the present invention, under the situation of ensuring maximum transmission efficiency and minimum power consumption, multi-bit error correction can be realized, especially when the bit error rate is large, so that the reliability of data transmission is improved.
[0343] Fig.23 is a flow chart of a data transmission method provided by other embodiments of the present invention, such as Fig.23 As shown, Fig.23 and Fig. 20 The data transfer methods shown differ in that: Fig.23 The first error detection and correction algorithm or the second error detection and correction algorithm is determined by the system transmission rate. The distinguishing steps can be as follows:
[0344] Step 504: The first device sends the first sequence to the second device.
[0345] First, the first device sends a data type sequence to the second device, and the data type sequence includes "ControlWord". "Control Word" can indicate that the training code stream is a control packet. For example, the "Control Word" can be 0101. Then, the first device sends an equalization sequence to the second device. Next, the first device sends a first sequence to the second device, and the first sequence may include a PRBS15 sequence. For example, the first device may send 1 million PRBS15 sequences to the second device to implement a state machine equalization training process. Since the bit error rate does not need to be calculated in the subsequent embodiment, the second sequence and the third sequence do not need to be sent subsequently, thereby improving the training efficiency.
[0346] Protocol sending unit (such as Fig.19 As shown) sends the first sequence to the protocol receiving unit through the transmission channel.
[0347] Step 506: The first device reads the system transmission rate from the speed switching status register.
[0348] Protocol sending unit (such as Fig.19 The system transmission rate is read from the speed switching status register.
[0349] Step 508 , the first device determines whether the system transmission rate is greater than or equal to the second threshold, and if so, executes step 510 ; if not, executes step 538 .
[0350] like Fig.19 As shown, the protocol sending unit determines whether the system transmission rate is greater than or equal to a second threshold value. The second threshold value is, for example, 16 Gbps, 32 Gbps, 8 Gbps, 28 Gbps, 56 Gbps, 10 Gbps or 40 Gbps.
[0351] In this embodiment, step 502 may refer to the description in step 402 .
[0352] In this embodiment, steps 510 to 536 may refer to steps 418 to 444. The difference is that in this embodiment, the indication field includes a transport rate ensure (TR EN) field, which is used to indicate that the system transmission rate is greater than or equal to the second threshold, and the value of the transport rate ensure field is, for example, 1. Alternatively, the indication field is a reserved field, in which case step 520 may include: the first device sets the value of the reserved field so that the reserved field is used to indicate that the system transmission rate is greater than or equal to the second threshold, and the value of the reserved field is, for example, 1. .
[0353] In this embodiment, steps 538 to 558 may refer to steps 448 to 448.
[0354] In the technical solution of this embodiment, the first device directly reads the system transmission rate from the speed change status register and selects a suitable error detection and correction algorithm according to the transmission rate. There is no need to obtain the bit error rate by sending the second sequence, which reduces the frequent interaction process between the first device and the second device, thereby improving the training efficiency of the system.
[0355] Fig.24 is a schematic diagram of the structure of a data transmission system provided by other embodiments, such as Fig.24As shown, the data transmission system is, for example, an HDMI data transmission system, and the data transmission system may include a first device and a second device, the first device includes a video data processing unit and a transmitting device, the second device includes a load (sink) unit and a receiving device, the transmitting device and the receiving device are connected in communication through a transmission channel, the video data processing unit is connected in communication with the transmitting device, and the load unit is connected in communication with the receiving device. Wherein, if the first device is a mainboard, the video data processing unit is an AP, and the transmitting module is an interface circuit; if the second device is a display screen, the load unit is a display module, and the receiving device is an interface circuit. Wherein, the transmitting device includes a first format conversion module, a protocol transmitting unit, and a PHY layer transmitting module. The protocol transmitting unit includes a TMDS CEC encoding module, an FEC encoding module, and a channel encoding module. The receiving device includes a second format conversion module, a protocol receiving unit, and a PHY layer receiving module, and the protocol receiving unit includes a TMDS CEC decoding module, an FEC decoding module, and a channel decoding module, wherein the PHY layer transmitting module and the PHY layer receiving module are connected in communication through a transmission channel.
[0356] Fig.25 is a flowchart of a data transmission method provided by other embodiments, such as Fig.25 As shown, the method includes:
[0357] Step 602: The first device configures working parameters for the second device.
[0358] like Fig.24 As shown, the video data processing unit of the first device configures the working parameters of the load unit of the second device.
[0359] Specifically, in all practical use scenarios, the mainboard can configure the working parameters of the display module so that the display module can work according to the requirements of the working parameters. The working parameters may include resolution, frame rate, interface rate, etc.
[0360] Step 604: The first device sends the first sequence to the second device.
[0361] First, the first device sends a data type sequence to the second device, and the data type sequence includes "ControlWord". "Control Word" can indicate that the training code stream is a control packet. For example, the "Control Word" can be 0101. Then, the first device sends an equalization sequence to the second device. Next, the first device sends a first sequence to the second device, and the first sequence may include a PRBS15 sequence. For example, the first device may send 1 million PRBS15 sequences to the second device to implement a state machine equalization training process. Since the bit error rate does not need to be calculated in the subsequent embodiment, the second sequence and the third sequence do not need to be sent subsequently, thereby improving the training efficiency.
[0362] Protocol sending unit (such as Fig.24 As shown) sends the first sequence to the protocol receiving unit through the transmission channel.
[0363] Step 606: The first device sends a test data packet to the second device, and records the number of the sent test data packets.
[0364] As an optional solution, the test data packet may include an application layer data packet or a control data packet. Fig.24 As shown) the number of test data packets sent is recorded through a register.
[0365] Step 608: The second device counts the number of correct test data packets received, and returns the counted number of correct test data packets to the first device.
[0366] The protocol receiving unit of the second device (such as Fig.24 As shown) counts the number of correct test data packets received, and returns the number of correct test data packets to the protocol sending unit of the first device through the auxiliary channel.
[0367] Step 610: The first device calculates the packet loss rate according to the number of correct test data packets and the number of sent test data packets.
[0368] Specifically, the first device calculates the bit error rate by the formula 1-m / M, where m is the number of correct test data packets and N is the number of sent test data packets. Fig.24 The packet loss rate is calculated.
[0369] Step 612: The first device determines whether the packet loss rate is greater than or equal to a third threshold value. If so, execute step 616; if not, execute step 652.
[0370] Protocol sending unit (such as Fig.24As shown) determines whether the packet loss rate is greater than or equal to a third threshold.
[0371] The packet loss rate is, for example, 0.1% to 1%.
[0372] As an optional solution, steps 606 to 612 in this embodiment can be replaced by: the second device receives the test data packet sent by the first device; the packet loss rate is calculated according to the number of correct test data packets received and the number of test data packets sent; if the packet loss rate meets the first algorithm start-up condition, the first packet loss rate state is sent to the first device, and the first packet loss rate state is used to indicate that the packet loss rate meets the first algorithm start-up condition; if the packet loss rate meets the second algorithm start-up condition, the second packet loss rate state is sent to the first device, and the first packet loss rate state is used to indicate that the packet loss rate meets the second algorithm start-up condition. The second device determines whether the environmental parameters of the transmission channel meet the first algorithm start-up condition or the second algorithm start-up condition, including: the second device determines whether the packet loss rate is greater than or equal to the third threshold value, if it is determined that the packet loss rate is greater than or equal to the third threshold value, it indicates that the environmental parameters of the transmission channel meet the first algorithm start-up condition; if it is determined that the packet loss rate is less than the third threshold value, it indicates that the environmental parameters of the transmission channel meet the second algorithm start-up condition.
[0373] Step 614: The first device collects an image or video data stream, and performs coding format conversion on the image data stream to generate a first data block.
[0374] Video data processing unit (such as Fig.24 ) to collect image or video data stream, and send the collected image or video data stream to the first format conversion module (as shown in Fig.24 shown).
[0375] As an optional solution, step 614 may be performed after step 604 .
[0376] Step 616: The first device adds a data packet header to the first data block.
[0377] The first format conversion module (such as Fig.24 As shown in the figure, the image or video data stream is converted into a binary encoding format to form a "Payload".
[0378] Fig.26 is a schematic diagram of the format of a data block transmitted based on HDMI in an embodiment of the present invention, such as Fig.26As shown in the figure, the data packet header includes a preamble, data synchronization information (Sync), control / data information (C / D) and a reserved field (Rsvd). The protocol sending unit adds the preamble, data synchronization information (Sync), control / data information (C / D) and Rsvd to the header of the data block (Payload). Among them, the preamble is used to indicate that the "Payload" is various types of packet information (Data Island) or video pixel data (Video Data), and the content of the packet information includes audio data packets or image information packets, etc.
[0379] Step 618: The first device performs ECC encoding on the first data block to generate a first ECC field, and performs CRC encoding on the first data block to generate a CRC field.
[0380] Specifically, the protocol sending unit uses a 6-bit extended Hamming code to perform ECC encoding on "Payload" through the TMDS CED encoding module to generate a first ECC field and a check bit (Parity) field; the TMDS CED encoding module uses a 16-bit CRC to perform CRC encoding on "Payload" to generate a CRC (16-bit CRC) field and a check bit (Parity) field. It should be noted that: Fig.26 The ECC field shown in is the first ECC field.
[0381] Step 620: The first device adds the first ECC field and the CRC field to the end of the first data block.
[0382] like Fig.26 As shown, the protocol sending unit (such as Fig.24 As shown) the first ECC field and CRC field are added to the end of "Payload".
[0383] Step 622: The first device adds an indication field to the header of the first data block to generate a second data block.
[0384] In this embodiment, as an optional solution, the indication field is a newly added field, and the indication field is, for example, a packet loss rate confirmation field (Packet Loss Rate Ensure, PLR EN for short). The packet loss rate confirmation field is used to indicate that the packet loss rate is greater than or equal to the third threshold.
[0385] The specific format of the generated second data block can be found in Fig.26 As shown. The value of the packet loss rate confirmation field is, for example, 1. Fig.26 As shown, a check bit (Parity) field may be further set after the first ECC field and the CRC field in the second data block.
[0386] As another optional solution, the indication field is a reserved field. In this case, step 622 may include: the first device sets a value of the reserved field so that the reserved field is used to indicate that the packet loss rate is greater than or equal to the first threshold. The value of the reserved field is 1, for example.
[0387] Step 624: The first device performs channel coding on the second data block to generate an encoded second data block.
[0388] The protocol sending unit performs channel coding on the second data block through the channel coding module to generate a coded second data block.
[0389] Step 626: The first device divides the second data block into multiple FEC data blocks.
[0390] like Fig.13 As shown, the FEC data block includes the Symbol data block (Super Block Payload). The protocol sending unit uses the FEC encoding module (such as Fig.24 As shown), the second data block is divided into multiple FEC data blocks.
[0391] Step 628: The first device performs FEC encoding on each FEC data block to generate an FEC check code.
[0392] like Fig.13 As shown, the protocol sending unit uses the RS code encoding algorithm to perform FEC encoding on each FEC data block through the FEC encoding module to generate an FEC check code (RS Block / Parity).
[0393] Step 630: The first device adds the FEC check code to the end of the FEC data block to generate a third data block.
[0394] The specific format of the third data block formed can be found in Fig.13 As shown, the third data block also includes a start bit (StartSuper Block) field and a byte number (RS Block Symbol / Byte) field.
[0395] Step 632: The first device sends the third data block to the second device.
[0396] Protocol sending unit (such as Fig.24 As shown) sends the third data block to the PHY layer sending module (as shown Fig.24 As shown), the PHY layer sending module sends the third data block to the PHY layer receiving module (as shown) through the transmission channel. Fig.24 As shown), the PHY layer receiving module sends the third data block to the protocol receiving unit.
[0397] Step 634: The second device performs FEC error detection and correction on the third data block to generate a second data block.
[0398] The protocol receiving unit passes through the FEC decoding module (such as Fig.24 The RS code decoding algorithm is used to perform FEC check on the third data block to generate an FEC check result. The FEC check result includes a check success, a correctable error result, or an uncorrectable error result.
[0399] If the protocol receiving unit identifies that the FEC check result includes a correctable error result, it corrects the erroneous data of the third data block and unpacks the third data block to generate a second data block.
[0400] If it is identified that the FEC check result includes a successful check, it indicates that there is no erroneous data in the third data block, and the third data block can be directly unpacked to generate the second data block.
[0401] If the protocol receiving unit recognizes that the FEC check result includes an uncorrectable error result, the third data block is discarded, directly skipped, or retransmitted. In this case, the developer can determine how to handle the third data block.
[0402] Step 636: The second device parses the second data block.
[0403] Protocol receiving unit (such as Fig.24 As shown) parse the second data block.
[0404] Step 638: If the second device parses the indication field, it performs a CRC check on the CRC field in the second data block to generate a CRC check result.
[0405] Protocol receiving unit (such as Fig.24 As shown) if the indication field is parsed, the packet loss rate is greater than or equal to the third threshold value, and then it is determined to use the first error detection and correction algorithm and activate the TMDS CEC decoding module (as shown Fig.24 As shown in FIG. 1 ), the TMDS CEC decoding module performs modulo 2 division on the CRC field in the second data block and the polynomial to obtain a remainder, which is the CRC check result. The CRC check result may be 0 or not 0. The polynomial may include X 16 +X 12 +X 5 +X 0 .
[0406] Step 640: If the second device parses the indication field, it performs an ECC check on the first ECC field in the second data block to generate an ECC check result.
[0407] TMDS CEC decoding module (such as Fig.24 (as shown) ECC encodes the "Payload" in the second data block to generate a second ECC field, and XORs the first ECC field with the second ECC field to obtain an ECC check result. If the ECC check result is 0, it indicates that the "Payload" is correct; if the ECC check result is not 0 and the ECC check result indicates a 1-bit error and an error bit, it indicates that the error bit of the "Payload" needs to be corrected; if the ECC check result is not 0 and the ECC check result indicates more than 2-bit errors, it indicates that an uncorrectable error has occurred in the "Payload". Among them, the TMDS CEC decoding module can use the same encoding rules as the TMDS CEC encoding module to perform ECC encoding on the "Payload", that is, the TMDS CEC decoding module can perform ECC encoding on the "Payload" through a 6-bit extended Hamming code to generate a second ECC field.
[0408] It should be noted that: in this embodiment, if the second device parses out the indication field, it may also first execute step 640 and then execute step 638.
[0409] Step 642: The second device determines whether the CRC check result and the ECC check result are both 0. If so, execute step 644; if retransmission is determined, execute step 626.
[0410] Protocol receiving unit (such as Fig.24 As shown) determine whether the CRC check result and the ECC check result are both 0.
[0411] Step 644: The second device unpacks the second data block to generate a first data block.
[0412] Protocol receiving unit (such as Fig.24 As shown) unpacks the second data block to generate the first data block.
[0413] Specifically, the protocol receiving unit removes the preamble (Premble), data synchronization information (Sync), control / data information (C / D), reserved field (Rsvd), packet loss rate confirmation field (PLR EN)), first ECC field, CRC field and check bit (Parity) field in the second data block to unpack the second data block to obtain the first data block.
[0414] Step 646: The second device performs channel decoding on the first data block to generate a decoded first data block.
[0415] The protocol receiving unit passes through the channel decoding module (such as Fig.24As shown in FIG. 1 ), channel decoding is performed on the first data block to generate a decoded first data block.
[0416] Step 648: The second device converts the encoding format of the first data block to generate an image or video data stream, and the process ends.
[0417] The second format conversion module (such as Fig.24 ) converts the encoding format of the first data block to generate an image or video data stream, and uploads the image or video data stream to a load unit (such as Fig.24 Specifically, the second format conversion module performs pixel image coding format conversion on the first data block to generate an image data stream, and uploads the image data stream to the load unit.
[0418] As an optional scheme, if the second device recognizes that the ECC check result is not 0 and the ECC check result indicates a 1-bit error and an error bit, the error bit of the second data block is corrected, the second data block is unpacked to generate a first data block, and then the first data block is channel-decoded to generate a decoded first data block, and the first data block is converted into a pixel image coding format to generate an image or video data stream.
[0419] As another optional solution, if the second device recognizes that the ECC check result is not 0 and / or recognizes that the ECC check result is not 0 and the verification result indicates that there are more than 2-bit errors, the second data block is discarded, directly skipped, or retransmitted. In this case, the developer can determine how to process the data packet. If it is determined that the second data block is to be retransmitted, step 626 can be continued.
[0420] Step 650: The first device collects an image or video data stream, and performs coding format conversion on the image or video data stream to generate a first data block.
[0421] As an optional solution, step 650 may be performed after step 604 .
[0422] The first format conversion module (such as Fig.24 As shown in the figure, the image or video data stream is converted into a binary encoding format to form a "Payload".
[0423] Step 652: The first device performs channel coding on the first data block to generate an encoded first data block.
[0424] , protocol sending unit (such as Fig.24 As shown in FIG. 1 , the first data block is channel-encoded by a channel coding module to generate an encoded first data block.
[0425] Step 654: The first device divides the first data block into multiple FEC data blocks.
[0426] Step 656: The first device performs FEC encoding on each FEC data block to generate an FEC check code.
[0427] Step 658: The first device adds the FEC check code to the end of the FEC data block to generate a fourth data block.
[0428] Step 660: The first device sends the fourth data block to the second device.
[0429] Step 662: The second device parses the fourth data block.
[0430] Step 664: If the second device fails to parse out the indication field, it performs FEC error detection and correction on the fourth data block to generate a first data block.
[0431] If the protocol receiving unit (such as Fig.24 The method further comprises: performing an FEC check on the fourth data block by using the RS code decoding algorithm through the FEC decoding module, and generating an FEC check result. The FEC check result includes a successful check, a correctable error result, or an uncorrectable error result.
[0432] If the protocol receiving unit identifies that the FEC check result includes a correctable error result, it corrects the erroneous data of the fourth data block and unpacks the fourth data block to generate the first data block.
[0433] If the protocol receiving unit recognizes that the FEC check result includes a successful check, indicating that there is no erroneous data in the fourth data block, the third data block can be directly unpacked to generate the first data block.
[0434] If the protocol receiving unit recognizes that the FEC check result includes an uncorrectable error result, the fourth data block is discarded, directly skipped, or retransmitted. In this case, the developer can determine how to handle the fourth data block.
[0435] Step 666: The second device unpacks the fourth data block to generate a first data block.
[0436] Step 668: The second device performs channel decoding on the first data block to generate a decoded first data block.
[0437] Step 670: The second device converts the encoding format of the first data block to generate an image or video data stream.
[0438] Protocol receiving unit (such as Fig.24) converts the encoding format of the first data block to generate an image or video data stream, and uploads the image or video data stream to a load unit (such as Fig.24 shown).
[0439] It should be noted that: Fig.25 Steps 616 to 646 in the above method can be replaced by: a scheme of encoding through an FEC algorithm and a CRC algorithm; or, a scheme of encoding through an FEC algorithm and an ECC algorithm. Fig.25 Steps 654 to 666 in the above method can be replaced by: a scheme of performing verification through a CRC algorithm and an ECC algorithm; or a scheme of performing verification through a CRC algorithm; or a scheme of performing verification through an ECC algorithm.
[0440] In the technical solution of the embodiment of the present invention, the packet loss rate is obtained by detecting the transmission channel environment. When the packet loss rate is large, a combination of the FEC algorithm, the CRC algorithm and the ECC algorithm is selected to perform error detection and correction processing on the transmission data during the data transmission process, thereby realizing error detection and correction of multi-bit error data, thereby improving the reliability of data transmission; when the packet loss rate is small, the FEC algorithm is selected to perform error detection and correction processing on the transmission data during the data transmission process, thereby avoiding the situation of large data redundancy during error detection and correction processing, thereby improving data transmission efficiency. The data transmission method of this embodiment improves the data transmission efficiency on the basis of ensuring the reliability of data transmission.
[0441] The embodiment of the invention further provides a first device, which can be a terminal device or a circuit device built into the terminal device. The device can be used to perform the functions / steps in the above method embodiment. The first device is a host, and the host can use the following Fig. 27 Electronic equipment shown.
[0442] The embodiment of the invention further provides a second device, which can be a terminal device or a circuit device built into the terminal device. The device can be used to perform the functions / steps in the above method embodiment. The second device is a host, and the host can use the following Fig. 27 Electronic equipment shown.
[0443] Fig. 27 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Fig. 27 As shown, the electronic device 900 includes a processor 910 and a transceiver 920. Optionally, the electronic device 900 may also include a memory 930. The processor 910, the transceiver 920 and the memory 930 may communicate with each other through an internal connection path to transmit control and / or data signals, and the memory 930 is used to store a computer program, and the processor 910 is used to call and run the computer program from the memory 930.
[0444] Optionally, the electronic device 900 may further include an antenna 940 for transmitting the wireless signal output by the transceiver 920 .
[0445] The processor 910 and the memory 930 may be combined into a processing device, or more commonly, they are independent components, and the processor 910 is used to execute the program code stored in the memory 930 to implement the above functions. In specific implementation, the memory 930 may also be integrated into the processor 910, or may be independent of the processor 910.
[0446] In addition, in order to make the functions of the electronic device 900 more complete, the electronic device 900 may further include one or more of an input unit 960, a display unit 970, an audio circuit 980, a camera 990, and a sensor 901, and the audio circuit may further include a speaker 982, a microphone 984, and the like. The display unit 970 may include a display screen.
[0447] Optionally, the electronic device 900 may further include a power supply 950 for providing power to various devices or circuits in the terminal device.
[0448] It should be understood that Fig. 27 The electronic device 900 shown can implement Fig. 20 , Fig.23 or Fig.25 The various processes of the method embodiment shown. The operations and / or functions of the various units in the electronic device 900 are respectively to implement the corresponding processes in the above method embodiment. For details, please refer to the description in the above method embodiment. To avoid repetition, the detailed description is appropriately omitted here.
[0449] It should be understood that Fig. 27 The processor 910 in the electronic device 900 shown may be a system on a chip (SOC), which may include a central processing unit (CPU), and may further include other types of processors, the CPU may be called a main CPU. The various processors work together to implement the previous method flow, and each processor may selectively execute a portion of the software driver.
[0450] In summary, the various processors or processing units within the processor 910 can work together to implement the previous method flow, and the corresponding software programs of the various processors or processing units can be stored in the memory 930.
[0451] The present invention also provides a computer-readable storage medium in which instructions are stored. When the instructions are executed on a computer, the computer executes the above-mentioned Fig. 20 , Fig.23 or Fig.25 The various steps in the data transmission method shown.
[0452] The present invention also provides a computer program product comprising instructions, which, when executed on a computer or any at least one processor, causes the computer to execute the following Fig. 20 , Fig.23 or Fig.25 The various steps in the data transmission method shown.
[0453] The present invention further provides a chip, comprising a processor, wherein the processor is used to read and run a computer program stored in a memory to execute corresponding operations and / or processes executed by the data transmission method provided by the present invention.
[0454] Optionally, the chip also includes a memory, which is connected to the processor via a circuit or wire, and the processor is used to read and execute the computer program in the memory. Further optionally, the chip also includes a communication interface, and the processor is connected to the communication interface. The communication interface is used to receive data and / or information to be processed, and the processor obtains the data and / or information from the communication interface and processes the data and / or information. The communication interface can be an input and output interface.
[0455] In the above embodiments, the processor 910 involved may include, for example, a central processing unit (CPU), a microprocessor, a microcontroller or a digital signal processor, and may also include a GPU, an NPU and an ISP. The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as application-specific integrated circuits (ASICs), or one or more integrated circuits for controlling the execution of the program of the technical solution of the present invention. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a memory.
[0456] The memory can be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or it can also be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer.
[0457] In the embodiments of the present invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. A and B may be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c may be single or multiple.
[0458] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0459] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0460] In several embodiments provided by the present invention, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0461] The above is only a specific embodiment of the present invention. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A data transmission method, characterized in that: Applied to a first device, the method includes: If the environmental parameters of the transmission channel meet the first algorithm start-up conditions, encode the acquired transmission data by using the first error detection and correction algorithm to generate first coded data, and send the first coded data to the second device; If the environmental parameters of the transmission channel meet the second algorithm start-up condition, encode the acquired transmission data by using a second error detection and correction algorithm to generate second coded data, and send the second coded data to a second device, where the second error detection and correction algorithm is different from the first error detection and correction algorithm; The environmental parameters of the transmission channel include one of a bit error rate, a system transmission rate and a packet loss rate or any combination thereof; The environmental parameters of the transmission channel meeting the first algorithm start-up condition include: the bit error rate is greater than or equal to the first threshold, the system transmission rate is greater than or equal to the second threshold, and the packet loss rate is greater than or equal to the third threshold, or any combination thereof; The environmental parameters of the transmission channel meeting the second algorithm start-up condition include: the bit error rate is less than the first threshold, the system transmission rate is less than the second threshold, and the packet loss rate is less than the third threshold, or any combination thereof; The first error detection and correction algorithm includes a forward error correction FEC algorithm, a net core cyclic redundancy check CRC algorithm and a header error correction code ECC algorithm; or the first error detection and correction algorithm includes an FEC algorithm and a CRC algorithm; or the first error detection and correction algorithm includes an FEC algorithm and an ECC algorithm; or, The second error detection and correction algorithm includes an FEC algorithm; or the second error detection and correction algorithm includes a CRC algorithm; or the second error detection and correction algorithm includes an ECC algorithm; or the second error detection and correction algorithm includes a CRC algorithm and an ECC algorithm.
2. The method according to claim 1, characterized in that Also includes: Get the environment parameters of the transmission channel.
3. The method according to claim 2, characterized in that The environmental parameters of the transmission channel include a bit error rate; the acquiring of the environmental parameters of the transmission channel includes: sequentially sending a first sequence and a second sequence to the second device so that the second device can count the number of bits of the correct second sequence received, wherein the first sequence is used to implement state machine equalization training; receiving the number of bits of the correct second sequence sent by the second device; calculating the bit error rate according to the number of bits of the correct second sequence sent by the second device and the total number of bits of the sent second sequence; or, The transmission channel environment parameter includes a system transmission rate; and obtaining the transmission channel environment parameter includes: reading the system transmission rate from a speed switching status register.
4. The method according to claim 1 or 3, characterized in that: If the environmental parameters of the transmission channel meet the first algorithm start condition, the method further includes: collecting original data; converting the encoding format of the original data to generate the transmission data; or, If the environmental parameters of the transmission channel meet the second algorithm start-up conditions, the method further includes: collecting original data; and converting the encoding format of the original data to generate the transmission data.
5. The method according to claim 2, characterized in that: The environmental parameters of the transmission channel include a packet loss rate; and obtaining the environmental parameters of the transmission channel includes: Sending a test data packet to the second device, and recording the number of the test data packets sent; Receive the number of correctly received test data packets counted and returned by the second device; The packet loss rate is calculated based on the number of correct test data packets and the number of sent test data packets.
6. The method according to claim 1 or 5, characterized in that: Before encoding the acquired transmission data by the first error detection and correction algorithm, the method further includes: collecting original data; converting the encoding format of the original data to generate the transmission data; or, before encoding the acquired transmission data by the second error detection and correction algorithm, the method further includes: collecting original data; converting the encoding format of the original data to generate the transmission data.
7. The method according to any one of claims 1 to 6, characterized in that: The first error detection and correction algorithm includes at least two error detection and correction algorithms, and the second error detection and correction algorithm includes at least one error detection and correction algorithm; or, The number of error detection and correction algorithms in the first error detection and correction algorithm is greater than the number of error detection and correction algorithms in the second error detection and correction algorithm.
8. The method according to any one of claims 1 to 7, characterized in that: The first coded data includes an indication field, and the indication field of the first coded data is used to indicate that the environmental parameter meets the first algorithm start-up condition; and / or, The second coded data includes an indication field, and the indication field of the second coded data is used to indicate that the environmental parameter meets the second algorithm startup condition.
9. The method according to any one of claims 1 to 8, characterized in that: The first device is a camera module, and the second device is a motherboard; or The first device is a camera module, and the second device is a host; or The first device is a motherboard, and the second device is a display screen; or The first device is a host, and the second device is a display screen.
10. A data transmission method, characterized in that: Applied to the second device, the method includes: The encoded data is received; If it is determined that the environmental parameters of the transmission channel meet the first algorithm start-up condition, the coded data is verified by a first error detection and correction algorithm to generate transmission data; If it is determined that the environmental parameters of the transmission channel meet the second algorithm start-up conditions, the coded data is verified by a second error detection and correction algorithm to generate transmission data; The coded data includes an indication field, where the indication field is used to indicate that the environmental parameter meets the first algorithm start-up condition or the environmental parameter meets the second algorithm start-up condition; The environmental parameters of the transmission channel include one of a bit error rate, a system transmission rate and a packet loss rate or any combination thereof; The environmental parameters of the transmission channel meeting the first algorithm start-up condition include: the bit error rate is greater than or equal to the first threshold, the system transmission rate is greater than or equal to the second threshold, and the packet loss rate is greater than or equal to the third threshold, or any combination thereof; The environmental parameters of the transmission channel meeting the second algorithm start-up condition include: the bit error rate is less than the first threshold, the system transmission rate is less than the second threshold, and the packet loss rate is less than the third threshold, or any combination thereof; The first error detection and correction algorithm includes an FEC algorithm, a CRC algorithm and an ECC algorithm; or The first error detection and correction algorithm includes an FEC algorithm and a CRC algorithm; or The first error detection and correction algorithm includes an FEC algorithm and an ECC algorithm; or The second error detection and correction algorithm includes a FEC algorithm; or The second error detection and correction algorithm includes a CRC algorithm; or The second error detection and correction algorithm includes an ECC algorithm; or The second error detection and correction algorithm includes a CRC algorithm and an ECC algorithm.
11. The method according to claim 10, characterized in that The method further comprises: Receiving a first sequence and a second sequence sent in sequence by a first device, wherein the first sequence is used to implement state machine equalization training; Calculating a bit error rate according to the number of bits of the received correct second sequence and the total number of bits of the sent second sequence; If the bit error rate meets the first algorithm start-up condition, sending a first bit error rate status to the first device, where the first bit error rate status is used to indicate that the bit error rate meets the first algorithm start-up condition; If the bit error rate meets the second algorithm start-up condition, a second bit error rate status is sent to the first device, where the second bit error rate status is used to indicate that the bit error rate meets the second algorithm start-up condition.
12. The method according to claim 10, characterized in that The method further comprises: receiving a test data packet sent by the first device; The packet loss rate is calculated based on the number of correct test data packets received and the number of test data packets sent; If the packet loss rate meets the first algorithm activation condition, sending a first packet loss rate status to the first device, where the first packet loss rate status is used to indicate that the packet loss rate meets the first algorithm activation condition; If the packet loss rate meets the second algorithm activation condition, a second packet loss rate status is sent to the first device, where the first packet loss rate status is used to indicate that the packet loss rate meets the second algorithm activation condition.
13. The method according to claim 10, characterized in that The first error detection and correction algorithm includes at least two error detection and correction algorithms, the second error detection and correction algorithm includes at least one error detection and correction algorithm, and the number of error detection and correction algorithms in the first error detection and correction algorithm is greater than the number of error detection and correction algorithms in the second error detection and correction algorithm.
14. The method according to claim 11, characterized in that The determining that the first algorithm start condition is met includes: determining that the coded data includes an indication field; the determining that the second algorithm start condition is met includes: determining that the coded data does not include an indication field; or, The determining that the first algorithm start condition is met includes: determining that the coded data does not include an indication field; the determining that the second algorithm start condition is met includes: determining that the coded data includes an indication field; or, The determining that the first algorithm start condition is met includes: determining that the indication field in the encoded data is a first value; the determining that the second algorithm start condition is met includes: determining that the indication field in the encoded data is a second value.
15. A first device, characterized in that: include: one or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the device, enable the device to perform the data transmission method described in any one of claims 1 to 9.
16. A second device, characterized in that: include: one or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the device, enable the device to perform the data transmission method described in any one of claims 10 to 14.
17. A data transmission system, characterized in that: include: A first device and a second device, wherein the first device and the second device are communicatively connected via a transmission channel; The first device is configured to encode the acquired transmission data by using a first error detection and correction algorithm to generate first coded data if the environmental parameter of the transmission channel meets the first algorithm start-up condition, and send the first coded data to the second device; if the environmental parameter of the transmission channel meets the second algorithm start-up condition, encode the acquired transmission data by using a second error detection and correction algorithm to generate second coded data, and send the second coded data to the second device, wherein the second error detection and correction algorithm is different from the first error detection and correction algorithm; The second device is configured to verify the first coded data sent by the first device by using a first error detection and correction algorithm to generate transmission data if the first coded data sent by the first device is received; and verify the second coded data by using a second error detection and correction algorithm to generate transmission data if the second coded data sent by the first device is received; The environmental parameters of the transmission channel include one of a bit error rate, a system transmission rate and a packet loss rate or any combination thereof; The environmental parameters of the transmission channel meeting the first algorithm start-up condition include: the bit error rate is greater than or equal to the first threshold, the system transmission rate is greater than or equal to the second threshold, and the packet loss rate is greater than or equal to the third threshold, or any combination thereof; The environmental parameters of the transmission channel meeting the second algorithm start-up condition include: the bit error rate is less than the first threshold, the system transmission rate is less than the second threshold, and the packet loss rate is less than the third threshold, or any combination thereof; The first error detection and correction algorithm includes an FEC algorithm, a CRC algorithm and an ECC algorithm; or the first error detection and correction algorithm includes an FEC algorithm and a CRC algorithm; or the first error detection and correction algorithm includes an FEC algorithm and an ECC algorithm; or, The second error detection and correction algorithm includes an FEC algorithm; or the second error detection and correction algorithm includes a CRC algorithm; or the second error detection and correction algorithm includes an ECC algorithm; or the second error detection and correction algorithm includes a CRC algorithm and an ECC algorithm.
18. The system according to claim 17, characterized in that The first device is a camera module, and the second device is a motherboard; or The first device is a camera module, and the second device is a host; or The first device is a motherboard, and the second device is a display screen; or The first device is a host, and the second device is a display screen.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the data transmission method described in any one of claims 1 to 9, or when the program is running, the device where the computer-readable storage medium is located is controlled to execute the data transmission method described in any one of claims 10 to 14.
20. A computer program product comprising instructions, characterized in that When the computer program product runs on a computer or any one processor, the computer is enabled to execute the data transmission method according to any one of claims 1 to 9; or, the computer is enabled to execute the data transmission method according to any one of claims 10 to 14.
Citation Information
Patent Citations
Efficient dynamic transmission with high speed and high reliability
CN102098130A
Method and system for configuring uplink forward error correction flow
CN102158308A
Error control method, receiving end, transmitting end and system
CN102790666A
Data transmission method and data transmission system for digital video optical transceiver system
CN104639919A
Voice data transmission method and device
CN109218083A
