Data transmission method and electronic device

A unified data transmission method for electronic devices simplifies intermodule communication by using a common data packet structure across scenarios, addressing the complexity of current interface standards and reducing circuit area and power consumption.

JP7666596B2Active Publication Date: 2025-04-22HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2023528212
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-12-17
Filing Date
2021-11-04
Publication Date
2025-04-22
Estimated Expiration
2041-11-04

AI Technical Summary

Technical Problem

Current electronic devices face challenges due to multiple interaction interfaces between processors and modules like displays, cameras, and memory, leading to complex interface standards and increased circuit area, which is problematic for lighter and thinner device designs.

Method used

A unified data transmission method that uses a common data packet structure across different scenarios (camera, display, storage) with data type information, allowing for simplified intermodule data transmission and reduced circuit area by using the same protocol architecture for all modules.

Benefits of technology

This approach simplifies data transmission processes, reduces circuit complexity and area, lowers power consumption, and enhances transmission efficiency by eliminating the need for multiple protocol standards and dedicated physical layer interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007666596000006
    Figure 0007666596000006
  • Figure 0007666596000007
    Figure 0007666596000007
  • Figure 0007666596000008
    Figure 0007666596000008
Patent Text Reader

Abstract

This application provides a data transmission method and electronic device, which relate to the field of terminal technology and can unify protocol standards, simplify the inter-module data transmission process, and reduce circuit area. The method includes a first transmission unit, in a protocol layer of the first transmission unit, packing data to be transmitted in an application layer of the first transmission unit to generate a data packet. The data packet includes data type information, which indicates an application scenario of the data packet, and the application scenario includes one of a camera scenario, a display scenario, and a storage scenario. The first transmission unit transmits the data packet to a physical layer of the first transmission unit through the protocol layer of the first transmission unit. The first transmission unit transmits the data packet to a second transmission unit through the physical layer of the first transmission unit.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] TECHNICAL FIELD Embodiments of the present application relate to the field of terminal technology, in particular to data transmission methods and electronic devices. [Background technology]

[0002] Currently, multiple modules, such as processors, displays, cameras, and memories, are built into electronic devices (e.g., mobile phones or tablet computers) to meet the applications of electronic devices in multiple scenarios, such as mobile communication, entertainment, and travel.

[0003] However, since there are multiple interaction interfaces between the processor and modules such as the display, camera, and memory, and the interface standards between different modules are different, designers need to deal with multiple conflicting proprietary physical layer interfaces in the process of designing a functional system, which is difficult.

[0004] In view of this, the MIPI Alliance has proposed interface standards for consumer electronic products to avoid the conflict of interface standards. However, the MIPI Alliance has formulated different standards and protocol specifications for different camera interfaces, display interfaces, storage interfaces, etc. As a result, the protocol standards are complex and the circuit area required for function implementation is large. However, users are now purchasing lighter and thinner mobile electronic devices. Since it is limited by the internal space area of ​​the electronic device, the function implementation of the electronic device is challenged. Summary of the Invention

[0005] According to the data transmission method and electronic device provided in the embodiments of the present application, the protocol standard can be unified, the inter-module data transmission process can be simplified, and the circuit area can be reduced.

[0006] In order to achieve the above objectives, the following technical solutions are used in the embodiments of this application.

[0007] According to a first aspect, an embodiment of the present application provides a data transmission method. The method may include: a first transmission unit packing data to be transmitted of an application layer of the first transmission unit at a protocol layer of the first transmission unit to generate a data packet. The data packet includes data type information, and the data type information indicates an application scenario of the data packet, and the application scenario includes any one of a camera scenario, a display scenario, and a storage scenario. The first transmission unit transmits the data packet to a physical layer of the first transmission unit through the protocol layer of the first transmission unit. The first transmission unit transmits the data packet to a second transmission unit through the physical layer of the first transmission unit.

[0008] For example, in a camera scenario, the first transmission unit is, for example, a camera module, and the second transmission unit is, for example, a SOC. In a display scenario, the first transmission unit is, for example, a SOC, and the second transmission unit is, for example, a DDIC. In a storage scenario, the first transmission unit is, for example, a storage module, and the second transmission unit is, for example, a SOC. Alternatively, the first transmission unit is, for example, a SOC, and the second transmission unit is, for example, a storage module.

[0009] In this way, the first transmission unit and the second transmission unit can perform data transmission based on the same data transmission protocol by using the same data packet structure. Moreover, the data type information included in the data packet indicates the current application scenario of the data packet, thereby improving data transmission efficiency. Furthermore, the camera module, the display module, and the storage module can communicate with the SOC based on the same data transmission protocol to implement link multiplexing and reduce the circuit area.

[0010] In a possible implementation, the data packet types of the data packets include long packets and short packets, where the long packets include a data packet header subpacket, a payload data subpacket, and a data packet footer subpacket, and the short packets include a data packet header subpacket and a data packet footer subpacket.

[0011] In some embodiments, the data packets are classified into long data packets and short data packets based on different carrying data. The long data packets may also be described as long packets, and the short data packets may also be described as short packets. In this embodiment of the present application, the long data packets and the short data packets are not distinguished by the length of the bits occupied by the data packets.

[0012] In a possible implementation, the data type information is carried in a data type field in the data packet header subpacket, and a first value of the data type field indicates that the application scenario is a display scenario and that the data packet is a short data packet or a long data packet.

[0013] In a possible implementation, the data type information is carried in a data type field in the data packet header subpacket, and a second value of the data type field indicates that the application scenario is a camera scenario and that the data packet is a short control packet or a long data packet.

[0014] In a possible implementation, the data type information is carried in a data type field in the data packet header subpacket, and a third value of the data type field indicates that the application scenario is a storage scenario and that the data packet is one of a short acknowledgement ACK packet, a short negative acknowledgement NACK packet, a long data packet, and a long control packet.

[0015] In some embodiments, a portion of a data packet that has a specific information or a specific number is called a subpacket of the data packet. The data packet structure provided in this embodiment of the present application can be applied to a camera scenario, a display scenario, and a storage scenario. The value of the field indicates the scenario to which the data packet being transmitted is applied.

[0016] Therefore, based on the same protocol architecture, a general data packet structure applicable to a camera scenario, a display scenario, and a storage scenario is configured, and a data type field in the data packet is used to identify the application scenario of the data packet. Compared with the prior art in which different scenarios correspond to different protocol architectures and data of different data packet structures are transmitted, the embodiment of the present application provides a protocol architecture and a general data packet structure, so that the circuit complexity and circuit area are effectively reduced, thereby reducing the circuit power consumption and improving the transmission efficiency.

[0017] In a possible implementation, the first transmission unit packing the data to be transmitted of the application layer of the first transmission unit at the protocol layer of the first transmission unit to generate a data packet includes the first transmission unit receiving the data to be transmitted sent by the application layer of the first transmission unit at the protocol layer of the first transmission unit, the first transmission unit segmenting the data to be transmitted at the protocol layer of the first transmission unit to generate payload data, and generating a data packet header, a cyclic redundancy check (CRC) code, and a data packet footer, and generating the data packet after packing the payload data, the data packet header, and the data packet footer, where the data packet footer includes a CRC field indicating a CRC code.

[0018] In some embodiments, the application layer of the first transmission unit sends data to the protocol layer, which needs to assemble the segmented data, add a required packet header and a required packet footer to the data packet, and then send the data packet by the physical layer to the physical layer of the second transmission unit. The physical layer of the second transmission unit sends the received data packet to the protocol layer, which unpacks the data packet to generate the segmented data, and reassembles the data to be sent to the application layer, completing the data transmission from the first transmission unit to the second transmission unit.

[0019] In this way, in the above steps, the first transmission unit and the second transmission unit complete packet packing and unpacking of a common data packet based on the same protocol architecture, thereby implementing high-speed data transmission.

[0020] According to a second aspect, an embodiment of the present application provides a data transmission method. The method may include: a first transmission unit stores a first data packet to be transmitted in a buffer of the first transmission unit. The first transmission unit transmits the first data packet to a second transmission unit and starts a timer. If the timer has not expired and a size of the remaining free space in the buffer of the first transmission unit is equal to or greater than a size of the second data packet to be transmitted, the first transmission unit transmits the second data packet to the second transmission unit and restarts the timer.

[0021] In some embodiments, if the size of the remaining free space in the buffer of the first transmission unit can be used to buffer the data packet to be transmitted next, the data packet is continued to be transmitted. Furthermore, a timer is set in the data link layer of the first transmission unit. Each time a data packet is transmitted, the timer is refreshed to resume timing until all data packets are transmitted. For example, if the remaining free space in the buffer of the first transmission unit is equal to or larger than the size of the space that needs to be occupied by the data packet to be transmitted next, the data packet to be transmitted is stored in the buffer of the first transmission unit, the data packet to be transmitted is transmitted, and the timer is restarted. As another example, in the data transmission process, the size of the data packets that need to be transmitted is all the same. Therefore, the size of the buffer space of the buffer of the first transmission unit may be configured to be an integer multiple of the size of the data packet. In this case, in the data transmission process, the first transmission unit only needs to determine that the buffer of the first transmission unit is not full (i.e., the size of the remaining free space in the buffer of the first transmission unit is an integer multiple of the size of the data packet) to continue to transmit the next data packet.

[0022] In this way, the first transmission unit uses a buffer mechanism to transmit subsequent data packets without waiting for the second transmission unit to feed back a response signal.

[0023] In a possible implementation, after the first transmission unit sends the first data packet to the second transmission unit and starts the timer, the method further includes the first transmission unit receiving a first acknowledgment ACK signal sent by the second transmission unit, deleting the first data packet from a buffer of the first transmission unit, and restarting the timer, where the first ACK signal is a feedback signal corresponding to the first data packet.

[0024] For example, after receiving a correct data packet, the second transmission unit places the frame number of the data packet as a parameter in an ACK packet and feeds back the frame number to the first transmission unit. Alternatively, after receiving a group of data packets, the data link layer of the second transmission unit correspondingly returns one ACK packet including the frame number of the packet footer of the group of data packets, indicating that all data packets before that frame number have been correctly received.

[0025] Correspondingly, the first transmission unit receives the corresponding ACK packet based on the frame number order, and after receiving the ACK, deletes the corresponding data packet from the buffer of the first transmission unit to obtain more buffer space for transmitting the subsequent data packet.

[0026] In a possible implementation, the method further includes stopping the first transmission unit from transmitting data packets if the size of the remaining free space in the buffer of the first data packets is less than the size of the second data packets to be transmitted. If the timer expires and the first transmission unit has not yet received a second ACK signal, the first transmission unit obtains a fourth data packet having the smallest frame number among the one or more third data packets buffered in the buffer of the first transmission unit. The first transmission unit retransmits the fourth data packet to the second transmission unit and restarts the timer.

[0027] In a possible implementation, after the first transmission unit retransmits the fourth data packet to the second transmission unit, the method further includes the first transmission unit retransmitting one or more third data packets to the second transmission unit in ascending frame number order and restarting a timer each time a third data packet is transmitted.

[0028] For example, in a data transmission process, when a data packet transmission error occurs and data transmission needs to be performed, the data transmission mechanism includes a timeout retransmission. Specifically, when the first transmission unit does not receive an ACK, the first transmission unit cannot delete the data packet. As a result, the buffer of the first transmission unit may be completely filled with data. After the buffer of the first transmission unit is completely filled with data, the data packet transmission is stopped, and the timer is not refreshed when the data packet is not transmitted. Thus, the clock is accumulated until it exceeds a preset time. The first transmission unit determines that the data transmission is abnormal and retransmission is required, and performs data retransmission starting from the smallest frame number based on the frame numbers of the data packets that have not been deleted from the buffer of the first transmission unit.

[0029] In a possible implementation, the method further includes the first transmission unit receiving the first negative acknowledgment NACK signal sent by the second transmission unit and ceasing to transmit the data packet. The first transmission unit determines a fifth data packet corresponding to the first NACK signal. The first transmission unit retransmits the fifth data packet to the second transmission unit and restarts the timer.

[0030] In a possible implementation, after the first transmission unit retransmits the fifth data packet to the second transmission unit, the method further includes the first transmission unit retransmitting one or more sixth data packets buffered in the buffer of the first transmission unit to the second transmission unit in ascending order of frame numbers of the one or more sixth data packets, and restarting a timer each time a sixth data packet is transmitted, where the frame number of the fifth data packet is lower than the frame number of the one or more sixth data packets.

[0031] For example, the data retransmission mechanism further includes NACK retransmission. Specifically, after receiving NACK, the first transmission unit determines that the transmission of the data packet corresponding to the frame number of NACK is abnormal, stops sending the data packet, and stops the timer. Then, the data packet corresponding to the frame number of NACK is retransmitted. If the buffer of the first transmission unit further includes other buffered data packets, these buffered data packets are retransmitted in the ascending order of the frame numbers of the buffered data packets in the buffer of the first transmission unit. After that, the transmission of all packets is completed.

[0032] According to a third aspect, an embodiment of the present application provides an electronic device including a processor and a memory. The memory is coupled to the processor, and the memory is configured to store a computer program code, the computer program code including a computer instruction. When the processor reads the computer instruction from the memory, the electronic device can perform the following operations: A first transmission unit packs data to be transmitted of an application layer of the first transmission unit in a protocol layer of the first transmission unit to generate a data packet, where the data packet includes data type information, and the data type information indicates an application scenario of the data packet, the application scenario including any one of a camera scenario, a display scenario, and a storage scenario; The first transmission unit transmits the data packet to a physical layer of the first transmission unit through the protocol layer of the first transmission unit; The first transmission unit transmits the data packet to a second transmission unit through the physical layer of the first transmission unit.

[0033] In a possible implementation, the data packet types of the data packets include long packets and short packets, where the long packets include a data packet header subpacket, a payload data subpacket, and a data packet footer subpacket, and the short packets include a data packet header subpacket and a data packet footer subpacket.

[0034] In a possible implementation, the data type information is carried in a data type field in the data packet header subpacket, and a first value of the data type field indicates that the application scenario is a display scenario and that the data packet is a short data packet or a long data packet.

[0035] In a possible implementation, the data type information is carried in a data type field in the data packet header subpacket, and a second value of the data type field indicates that the application scenario is a camera scenario and that the data packet is a short control packet or a long data packet.

[0036] In a possible implementation, the data type information is carried in a data type field in the data packet header subpacket, and a third value of the data type field indicates that the application scenario is a storage scenario and that the data packet is one of a short acknowledgement ACK packet, a short negative acknowledgement NACK packet, a long data packet, and a long control packet.

[0037] In a possible implementation, the first transmission unit packing the data to be transmitted of the application layer of the first transmission unit at the protocol layer of the first transmission unit to generate a data packet includes the first transmission unit receiving the data to be transmitted sent by the application layer of the first transmission unit at the protocol layer of the first transmission unit, the first transmission unit segmenting the data to be transmitted at the protocol layer of the first transmission unit to generate payload data, and generating a data packet header, a cyclic redundancy check (CRC) code, and a data packet footer, and generating the data packet after packing the payload data, the data packet header, and the data packet footer, where the data packet footer includes a CRC field indicating a CRC code.

[0038] Furthermore, for the technical effects of the electronic device according to the third aspect, please refer to the technical effects of the data transmission method according to the first aspect, and the details will not be described again here.

[0039] According to a fourth aspect, an embodiment of the present application provides an electronic device including a processor and a memory. The memory is coupled to the processor, and the memory is configured to store a computer program code, the computer program code including computer instructions. When the processor reads the computer instructions from the memory, the electronic device can perform the following operations: A first transmission unit stores a first data packet to be transmitted in a buffer of the first transmission unit. The first transmission unit transmits the first data packet to a second transmission unit and starts a timer. If the timer has not expired and the size of the remaining free space in the buffer of the first transmission unit is equal to or greater than the size of the second data packet to be transmitted, the first transmission unit transmits the second data packet to the second transmission unit and restarts the timer.

[0040] In a possible implementation, when the processor reads the computer instructions from the memory, the electronic device can further perform the following operations: the first transmission unit further includes receiving a first acknowledgement ACK signal sent by the second transmission unit, deleting the first data packet from a buffer of the first transmission unit, and restarting a timer, where the first ACK signal is a feedback signal corresponding to the first data packet.

[0041] In a possible implementation, when the processor reads the computer instructions from the memory, the electronic device may further perform the following operations: if the size of the remaining free space in the buffer of the first data packet is less than the size of the second data packet to be transmitted, the first transmission unit stops transmitting the data packet; if the timer expires and the first transmission unit has not yet received a second ACK signal, the first transmission unit obtains a fourth data packet having the smallest frame number among the one or more third data packets buffered in the buffer of the first transmission unit; the first transmission unit retransmits the fourth data packet to the second transmission unit and restarts the timer.

[0042] In a possible implementation, when the processor reads the computer instructions from the memory, the electronic device may further perform the following operations: the first transmission unit retransmits one or more third data packets to the second transmission unit in ascending frame number order, and restarts the timer each time a third data packet is transmitted.

[0043] In a possible implementation, when the processor reads the computer instructions from the memory, the electronic device may further perform the following operations: the first transmission unit receives a first negative acknowledgement NACK signal sent by the second transmission unit and stops sending data packets; the first transmission unit determines a fifth data packet corresponding to the first NACK signal; the first transmission unit retransmits the fifth data packet to the second transmission unit and restarts the timer.

[0044] In a possible implementation, when the processor reads the computer instructions from the memory, the electronic device may further perform the following operations: the first transmission unit retransmits the one or more sixth data packets buffered in the buffer of the first transmission unit to the second transmission unit in ascending order of frame numbers of the one or more sixth data packets, and restarts a timer every time a sixth data packet is transmitted, where the frame number of the fifth data packet is lower than the frame number of the one or more sixth data packets.

[0045] Furthermore, for the technical effects of the electronic device according to the fourth aspect, please refer to the technical effects of the data transmission method according to the second aspect, and the details will not be described again here.

[0046] According to a fifth aspect, an embodiment of the present application provides an electronic device. The electronic device has a function to perform the data transmission method according to the first aspect and any one of the possible implementations of the first aspect, or the electronic device has a function to perform the data transmission method according to the second aspect and any one of the possible implementations of the second aspect. The functions may be performed by hardware, or may be performed by the hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions.

[0047] According to a sixth aspect, an embodiment of the present application provides a chip. The chip includes a processor, the processor is coupled to a memory, and the memory stores program instructions. When the program instructions stored in the memory are executed by the processor, the functions of the data transmission method according to the first aspect and any one of the possible implementations of the first aspect are performed. Alternatively, when the program instructions stored in the memory are executed by the processor, the functions of the data transmission method according to the second aspect and any one of the possible implementations of the second aspect are performed.

[0048] According to a seventh aspect, an embodiment of the present application provides a computer-readable storage medium including computer instructions, which when executed on an electronic device, can cause the electronic device to perform the data transmission method according to the first aspect and any one of the possible implementations of the first aspect, or can cause the electronic device to perform the data transmission method according to the second aspect and any one of the possible implementations of the second aspect.

[0049] According to an eighth aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to perform the data transmission method according to the first aspect and any one of the possible implementations of the first aspect, or enables the electronic device to perform the data transmission method according to the second aspect and any one of the possible implementations of the second aspect.

[0050] According to a ninth aspect, there is provided a circuit system, the circuit system including a processing circuit, the processing circuit configured to perform the data transmission method according to the first aspect and any one of the possible implementations of the first aspect, or the data transmission method according to the second aspect and any one of the possible implementations of the second aspect.

[0051] According to a tenth aspect, an embodiment of the present application provides a chip system including at least one processor and at least one interface circuit. The at least one interface circuit is configured to perform a transceiver function and send instructions to the at least one processor. When the at least one processor executes the instructions, the at least one processor performs a data transmission method according to the first aspect and any one of the possible implementations of the first aspect, or the at least one processor performs a data transmission method according to the second aspect and any one of the possible implementations of the second aspect. [Brief description of the drawings]

[0052] [Figure 1] 1 is a schematic diagram of a configuration of an electronic device according to an embodiment of the present application; [Diagram 2] FIG. 1 is a schematic diagram of a structure of an electronic device according to an embodiment of the present application. [Figure 3A] FIG. 2 is a schematic diagram of a display position according to an embodiment of the present application. [Figure 3B] FIG. 2 is a schematic diagram of a camera position according to an embodiment of the present application. [Figure 4A(a)] FIG. 1 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 4A(b)] FIG. 1 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 4A(c)] FIG. 1 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 4B(a)] FIG. 2 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Figure 4B(b)] FIG. 2 is a schematic diagram of a group of interfaces according to an embodiment of the present application. [Diagram 5] FIG. 1 is a schematic diagram of a UniPro structure according to an embodiment of the present application. [Figure 6] FIG. 2 is a schematic diagram of a DME interface according to an embodiment of the present application. [Figure 7] FIG. 1 is a schematic diagram of a CSI-2 protocol architecture according to an embodiment of the present application. [Figure 8] FIG. 1 is a schematic diagram of a DSI-2 protocol architecture according to an embodiment of the present application. [Figure 9] FIG. 2 is a schematic diagram of a circuit link according to an embodiment of the present application. [Figure 10] FIG. 1 is a schematic diagram of a general data transmission protocol architecture according to an embodiment of the present application; [Figure 11] FIG. 2 is a schematic diagram of a data transmission protocol architecture in a camera scenario according to an embodiment of the present application; [Figure 12] FIG. 2 is a schematic diagram of a data transmission protocol architecture in a display scenario according to an embodiment of the present application; [Figure 13] FIG. 2 is a schematic diagram of a data transmission protocol architecture in a storage scenario according to an embodiment of the present application; [Figure 14] FIG. 2 is a schematic diagram of a point-to-point transmission scenario according to an embodiment of the present application. [Figure 15] FIG. 2 is a schematic diagram of link management according to an embodiment of the present application. [Figure 16] FIG. 1 is a schematic diagram of a data packet structure according to an embodiment of the present application; [Figure 17] FIG. 2 is a schematic diagram of a data packet structure according to an embodiment of the present application; [Figure 18] FIG. 3 is a schematic diagram of a data packet structure according to an embodiment of the present application; [Figure 19] FIG. 4 is a schematic diagram of a data packet structure according to an embodiment of the present application; [Figure 20] FIG. 5 is a schematic diagram of a data packet structure according to an embodiment of the present application; [Figure 21] FIG. 6 is a schematic diagram of a data packet structure according to an embodiment of the present application; [Figure 22] FIG. 7 is a schematic diagram of a data packet structure according to an embodiment of the present application; [Figure 23] FIG. 2 is a schematic diagram of data buffering at a transmitter according to an embodiment of the present application. [Figure 24] FIG. 2 is a schematic diagram of data buffering at a receiver according to an embodiment of the present application. [Diagram 25] FIG. 2 is a schematic diagram of an ACK feedback mechanism according to an embodiment of the present application; [Figure 26] FIG. 2 is a schematic diagram of a NACK feedback mechanism according to an embodiment of the present application; [Figure 27A] FIG. 1 is a schematic diagram of a data transmission procedure based on a timeout retransmission mechanism according to an embodiment of the present application; [Figure 27B] FIG. 1 is a schematic diagram of a data transmission procedure based on a timeout retransmission mechanism according to an embodiment of the present application; [Figure 28]FIG. 2 is a schematic diagram of a data transmission procedure based on a timeout retransmission mechanism according to an embodiment of the present application; [Figure 29A] FIG. 1 is a schematic diagram of a data transmission procedure based on a NACK retransmission mechanism according to an embodiment of the present application; [Figure 29B] FIG. 1 is a schematic diagram of a data transmission procedure based on a NACK retransmission mechanism according to an embodiment of the present application; [Diagram 30] FIG. 2 is a schematic diagram of a data transmission procedure based on a NACK retransmission mechanism according to an embodiment of the present application; [Diagram 31] FIG. 2 is a schematic diagram of a link structure according to an embodiment of the present application. [Diagram 32] 1 is a schematic diagram of a structure of a link port according to an embodiment of the present application; [Diagram 33] 1 is a flowchart 1 of a data transmission method according to an embodiment of the present application. [Figure 34A] 2 is a flowchart 2 of the data transmission method according to an embodiment of the present application. [Figure 34B] 2 is a flowchart 2 of the data transmission method according to an embodiment of the present application. [Diagram 35] 3 is a flowchart 3 of a data transmission method according to an embodiment of the present application. [Diagram 36] 1 is a structure of a PRL-C image transmission system according to an embodiment of the present application. [Figure 37] 4 is a flowchart 4 of the data transmission method according to an embodiment of the present application. [Figure 38] 5 is a flowchart 5 of a data transmission method according to an embodiment of the present application. [Figure 39] 6 is a flowchart 6 of a data transmission method according to an embodiment of the present application. [Diagram 40] 7 is a flow chart 7 of a data transmission method according to an embodiment of the present application. [Diagram 41] 8 is a flow chart 8 of a data transmission method according to an embodiment of the present application. [Diagram 42] FIG. 1 is a schematic diagram of the structure of a data transmission device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0053] The following describes in detail the data transmission method and electronic device provided in the embodiments of the present application with reference to the accompanying drawings.

[0054] The terms "comprise", "have", and any variations thereof mentioned in the description of the embodiments of the present application are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, and may optionally further include other steps or units not listed, or may optionally further include other inherent steps or units of the process, method, product, or device.

[0055] It should be noted that in the embodiments of the present application, words such as "example" or "for example" are used to denote providing an example, illustration, or description. Any embodiment or design solution described in the embodiments of the present application as "example" or "for example" should not be described as preferred or having more advantages over other embodiments or design solutions. Indeed, the use of words such as "example" or "for example" is intended to present the relevant concept in a concrete manner.

[0056] In the description of the embodiments of the present application, unless otherwise stated, "plurality" means two or more than two. The term "and / or" only indicates an association relationship between related objects, and indicates that three relationships may exist. For example, A and / or B may represent the following three cases: only A exists, both A and B exist, and only B exists.

[0057] The data transmission method provided in the embodiment of the present application may be applied to an electronic device. For example, as shown in FIG. 1, the electronic device may be a terminal device having one or more functions of photographing, storing, and displaying, such as a mobile phone 11, a notebook computer 12, a tablet computer 13, a large-screen display device 14, an augmented reality (AR) / virtual reality (VR) device 15, a wearable device (such as a smart watch 16, smart glasses 17, and earphones 18), an in-vehicle device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), an artificial intelligence device, or a dedicated camera (such as a single-lens reflex camera or a card camera). The specific type of the electronic device is not limited in the embodiment of the present application.

[0058] 2 is a schematic diagram of the structure of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identification module (SIM) card interface 195, and the like.

[0059] It may be understood that the structure shown in this embodiment of the present application does not constitute a specific limitation for the electronic device 100. In some other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or some components may be combined, or some components may be divided, or a different component layout may exist. The components shown may be implemented by hardware, software, or a combination of software and hardware.

[0060] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a neural-network processing unit (NPU), and / or the like. The different processing units may be separate components or may be integrated into one or more processors.

[0061] The controller can generate an operation control signal according to the instruction operation code and the time series signal to complete the control of instruction reading and instruction execution.

[0062] A memory may also be disposed in the processor 110 and configured to store instructions and data. In some embodiments, the memory in the processor 110 is a cache. The memory may store instructions or data that are currently being used or are used periodically by the processor 110. When the processor 110 needs to use the instructions or data again, the processor 110 may retrieve the instructions or data directly from the memory. This avoids repeated accesses, reduces the latency of the processor 110, and improves system efficiency.

[0063] In some embodiments, the processor 110 may include one or more interfaces, which may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, a universal serial bus (USB) interface, and / or the like.

[0064] The I2C interface is a bidirectional synchronous serial bus and includes one serial data line (SDA) and one serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be separately coupled to the camera 193, the sensor module 180, the charger, the flash, etc., through different I2C bus interfaces. For example, the processor 110 may be coupled to the camera 193 through an I2C interface, such that the processor 110 communicates with the camera 193 through the I2C bus interface to implement a picture taking function of the electronic device 100.

[0065] The MIPI interface is configured to connect the processor 110 to peripheral components, such as the display 194 or the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 via the CSI interface to perform picture taking functions of the electronic device 100. The processor 110 communicates with the display 194 via the DSI interface to perform display functions of the electronic device 100.

[0066] The GPIO interface may be configured by software. The GPIO interface may be configured as control signals or as data signals. In some embodiments, the GPIO interface may be configured to connect the processor 110 to the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface may alternatively be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0067] The USB interface 130 is an interface that complies with the USB standard specification, and may specifically be a mini USB interface, a micro USB interface, a USB type-C interface, etc. The USB interface 130 may be configured to connect to a charger to charge the electronic device 100, or may be configured to transmit data between the electronic device 100 and a peripheral device, or may be configured to connect to a headset to play audio on the headset. Alternatively, the interface may be configured to connect to another electronic device, for example, an AR device.

[0068] It may be understood that the interface connection relationships between modules shown in this embodiment of the present application are merely an example for the purposes of description and do not constitute limitations on the structure of the electronic device 100. In some other embodiments of the present application, the electronic device 100 may alternatively use a different interface connection scheme than that in the above embodiment or may use a combination of multiple interface connection schemes.

[0069] The charging management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. The charging management module 140 provides power to the electronic device by using the power management module 141 while charging the battery 142.

[0070] Power management module 141 is configured to connect battery 142 and charging management module 140 to processor 110. Power management module 141 receives an input of battery 142 and / or an input of charging management module 140 and provides power to processor 110, internal memory 121, display 194, camera 193, wireless communication module 160, etc. In some other embodiments, power management module 141 and charging management module 140 may alternatively be located in the same device.

[0071] The wireless communication functions of the electronic device 100 may be implemented by antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, a baseband processor, and the like.

[0072] Antenna 1 and Antenna 2 are configured to transmit and receive electromagnetic signals. Each antenna of electronic device 100 may be configured to cover one or more communication frequency bands. Different antennas may also be multiplexed to improve antenna utilization. For example, Antenna 1 may be multiplexed as a diversity antenna in a wireless local area network. In some other embodiments, the antennas may be used in combination with tuning switches.

[0073] The mobile communication module 150 may provide a solution including wireless communication technologies such as 2G, 3G, 4G, and 5G, which are applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 may receive electromagnetic waves by the antenna 1, perform processing such as filtering or amplification on the received electromagnetic waves, and send the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 may further amplify the signal modulated by the modem processor and convert the amplified signal into an electromagnetic wave for emission by the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 and at least some of the modules of the processor 110 may be disposed in the same device.

[0074] The wireless communication module 160 may be applied to the electronic device 100 to provide wireless communication solutions including wireless local area network (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC) technology, infrared (IR) technology, and the like. The wireless communication module 160 may incorporate at least one communication processing module and may be one or more components. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and sends the processed signal to the processor 110. The wireless communication module 160 may further receive signals to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the processed signal into electromagnetic waves for emission by the antenna 2.

[0075] In some embodiments, in the electronic device 100, the antenna 1 and the mobile communication module 150 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, such that the electronic device 100 can communicate with networks and other devices by using wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, IR technologies, and / or the like. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a BeiDou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation system (SBAS).

[0076] The electronic device 100 performs display functions by using a GPU, a display 194, an application processor, etc. The GPU is a microprocessor for image processing and connects the display 194 to the application processor. The GPU is configured to perform mathematical and geometric calculations and render images. The processor 110 may include one or more GPUs that execute program functions to generate and modify display information.

[0077] The display 194 is configured to display images, videos, etc. The display 194 includes a display panel, which may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini LED, a micro LED, a micro OLED, quantum dot light-emitting diodes (QLED), etc.

[0078] In some embodiments, the electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1. In this embodiment of the present application, the location and number of displays 194 configured for displaying the data transmission process are not specifically limited.

[0079] For example, as shown in (a) of FIG. 3A, the electronic device 100 includes one display 194. As shown in (b) of FIG. 3A, the electronic device 100 is a folding screen electronic device including multiple displays 194 (in other words, the display 194 can be folded). The folding screen electronic device 100 shown in (b) of FIG. 3A folds the display inward (or outward) along a folding edge in response to a user's operation, so that the display forms at least two screens (e.g., screen A and screen B). As shown in (c) of FIG. 3A, when the display is in a folded state, there is a display (e.g., screen C) on the outer surface.

[0080] The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, an optical proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.

[0081] The touch sensor may also be referred to as a "touch component." The touch sensor may be disposed on the display 194, and the touch sensor and the display 194 form a touch screen, also referred to as a "touch screen." The touch sensor is configured to detect touches made at or near the touch sensor. The touch sensor may forward the detected touches to an application processor for determining the type of touch event. A visual output associated with the touch may be provided on the display 194. In some other embodiments, the touch sensor may alternatively be disposed on a surface of the electronic device 100, and is in a location different from that of the display 194.

[0082] The electronic device 100 may implement picture taking functions through an ISP, a camera 193, a video codec, a GPU, a display 194, an application processor, and the like.

[0083] The ISP is configured to process data fed back by the camera 193. For example, during picture taking, the shutter is pressed and light is transmitted through the lens to the camera's photosensitive elements. The light signal is converted to an electrical signal, which the camera's photosensitive elements send to the ISP for processing to convert the electrical signal into a visual image. The ISP may also perform algorithmic optimization for image noise, brightness, and appearance. The ISP may also optimize parameters such as exposure and color temperature for the camera scenario. In some embodiments, the ISP may be located in the camera 193.

[0084] The camera 193 is configured to capture still images or video. An optical image of an object is generated through a lens and projected onto a photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary meta-oxide-semiconductor (CMOS) phototransistor. The semiconductor element converts the optical signal into an electrical signal, and then sends the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format, such as RGB format or YUV format.

[0085] In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1. In this embodiment of the present application, the location and number of cameras 193 configured for taking pictures in the data transmission process are not specifically limited.

[0086] The camera 193 may be located in an edge area of ​​the electronic device 100, may be an off-screen camera, or may be a pop-up camera. The camera 193 may include a rear camera and may further include a front camera. The specific location and type of the camera 193 are not limited to the embodiments of the present application.

[0087] For example, see Figure 3B for the layout of cameras in electronic device 100. The front side of electronic device 100 is the side on which display 194 is located. As shown in Figure 3B (a), camera 1931 is located on the front side of electronic device 100, and the camera is a front-facing camera. As shown in Figure 3B (b), camera 1932 is located on the rear side of electronic device 100, and the camera is a rear-facing camera.

[0088] The digital signal processor is configured to process digital signals, and may process other digital signals in addition to digital image signals, for example, when the electronic device 100 selects a frequency, the digital signal processor is configured to perform a Fourier transform on the frequency energy, etc.

[0089] A video codec is configured to compress or decompress digital video. Electronic device 100 may support one or more video codecs. In this manner, electronic device 100 may play or record video in multiple coding formats, such as moving picture experts group (MPET)-1, MPEG-2, MPEG-3, and MPEG-4.

[0090] The NPU is a neural-network (NN) computing processor. The NPU can process input information in real time by referring to the structure of biological neural networks, for example, by referring to the mode of transmission between neurons in the human brain, and can also continuously self-learn. Applications such as intelligent perception of the electronic device 100, for example, image recognition, face recognition, voice recognition, and text understanding, can be implemented through the NPU.

[0091] The external memory interface 120 may be configured to connect to an external storage card, such as a microSD card, to expand the storage capabilities of the electronic device 100. The external storage card communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files are stored on the external storage card.

[0092] The internal memory 121 may be configured to store computer executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, applications required by at least one function (e.g., sound playback function or image playback function), and the like. The data storage area may store data generated by processes of the electronic device 100, and the like (e.g., audio data, photo books, and the like). Furthermore, the internal memory 121 may include a high-speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or a universal flash storage (UFS). The processor 110 executes instructions stored in the internal memory 121 and / or instructions stored in a memory located in the processor to perform various functions, applications, and data processing of the electronic device 100.

[0093] Audio module 170 includes a speaker, a receiver, a microphone, a headset jack, etc., and is configured to convert digital audio information into an analog audio signal for output, and to convert analog audio input into a digital audio signal. Audio module 170 may also be configured to encode and decode audio signals. In some embodiments, audio module 170 may be located in processor 110, or some functional modules of audio module 170 may be located in processor 110. Electronic device 100 may perform audio functions, such as music playback and recording, through the audio module, a speaker, a receiver, a microphone, a headset jack, an application processor, etc.

[0094] The buttons 190 include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive the button input and generate button signal inputs related to function control and user settings of the electronic device 100.

[0095] The motor 191 may generate vibration prompts. The motor 191 may be configured to provide incoming call vibration prompts and touch vibration feedback. For example, operations performed for different applications (e.g., taking pictures and playing audio) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations performed in different areas of the display 194. Different application scenarios (e.g., time reminders, receiving information, alarm clocks, games) may also correspond to different vibration feedback effects. The touch vibration feedback effects may be further customized.

[0096] Indicator 192 may be an indicator light and may be configured to indicate charging status and power changes, or may be configured to indicate messages, missed calls, notifications, and the like.

[0097] The SIM card interface 195 is configured to connect a SIM card. The SIM card may be inserted into or removed from the SIM card interface 195 to effect attachment and detachment to and from the electronic device 100. The electronic device 100 may support one or N SIM card interfaces, where N is a positive integer greater than 1.

[0098] The following describes the data transmission method provided in the embodiment of the present application by using an example in which the electronic device is a mobile phone with the structure shown in FIG.

[0099] In some embodiments, the user may use touch, button, air gesture, voice, etc. to instruct the mobile phone to activate the camera and display a photo capture preview interface. For example, in response to the user tapping the camera icon 41 on the home screen 401 shown in FIG. 4A(a), the mobile phone activates the camera and displays the photo capture preview interface 401 shown in FIG. 4A(a). Alternatively, in response to the user tapping a voice command to open the camera, the mobile phone activates the camera and displays the photo capture preview interface 402 shown in FIG. 4(b). In response to the user tapping the photo capture control 42, the mobile phone invokes the camera to capture an image and sends the captured raw image data to the processor for processing. After processing the raw image data, the processor generates an image that the user can view and stores the image in memory. The mobile phone displays the interface 403 shown in FIG. 4A(c), displaying thumbnails 43 of previously captured images.

[0100] Alternatively, in response to a user tapping on the gallery icon 44 on the home screen 401 shown in Fig. 4A(a), the mobile phone launches the jalali and displays a gallery interface 404 shown in Fig. 4B(a). A captured image or a video preview image stored in the memory is displayed in the gallery interface 404. In response to a user tapping on the preview image 45, the mobile phone calls up the corresponding image data stored in the memory by using the processor, and displays the image data by using the display unit. An interface 405 shown in Fig. 4B(b) is displayed.

[0101] It can be seen that the above image capture, image storage, and image display process includes at least interactions between a processing unit, a photography unit, a display unit, and a storage unit. When data transmission between different units is based on different protocol standards, the data transmission process is complicated and error-prone. The processing unit includes, for example, a CPU or a system on chip (SOC). The photography unit includes, for example, a camera. The display unit includes, for example, a display. The storage unit includes, for example, a memory.

[0102] In some embodiments, the MIPI Alliance develops different protocol specifications based on different application scenarios to resolve interface conflict issues and reduce the design difficulty of functional systems, for example, standards and protocol specifications for storage interfaces, camera interfaces, display interfaces, and other aspects are developed.

[0103] Based on the storage scenario, the MIPI Alliance has formulated the Unipro technical specification. The Unipro protocol defines a 6+1 layer data transmission structure, including an application layer, a transport layer, a network layer, a data link layer, a physical layer adapter layer, and a physical layer. The main functions include message segmentation and reassembly, packet header format generation and parsing, error handling, cyclic redundancy check (CRC) code generation and checking, control packet generation and parsing, data buffering, data retransmission, traffic control, and link management and configuration. Optionally, a device management entity (DME) is configured to control and configure the Unipro, for example, to control power on, power off, and reset of the Unipro, startup of the lower layer links, and change of power consumption mode.

[0104] For example, Figure 5 is a schematic diagram of a UniPro structure according to an embodiment of the present application. As shown in Figure 5, a host includes a processing unit, such as a CPU or SoC. A device includes a storage unit, such as a universal flash storage (UFS) or an embedded multimedia card (eMMC). The host and the device perform data transmission based on the UniPro protocol. The host and the device perform bidirectional transmission. In other words, the host and the device can be either a transmitter or a receiver.

[0105] The L1 layer is a physical layer, e.g., M-PHY. The L1 layer uses serial interface technology developed especially for mobile devices, only two differential signal lines are needed for each link, and the L1 layer has several power saving modes. The data unit transmitted at the L1 layer is a physical symbol (PHY symbol).

[0106] The L1.5 layer is a PHY adapter layer, configured to detect multiple bidirectional links, can provide access to the status and control parameters of the peer end, and can change the power mode. The data units transmitted at the L1.5 layer are symbols, which are 17 bits in length. The first bit indicates the symbol type. For example, if the value of the first bit is 0, it indicates that the symbol being transmitted is a data symbol, and the remaining bits indicate the transmitted data. If the value of the first bit is 1, it indicates that the symbol being transmitted is a control symbol, the following 8 bits indicate a control command, and the last 8 bits indicate the control parameters. Furthermore, the control parameters change based on the control command.

[0107] The L2 layer is a data link layer, which is configured to ensure the validity and robustness of data transmission in the communication process. The main functions of the L2 layer include framing and deframing, PHY initialization, traffic control, priority division, CRC generation, data retransmission, etc. The data unit transmitted at the L2 layer is a frame. Based on the L1.5 layer, independent symbols are packed, and each frame can be packed with up to 144 symbols, occupying 288 bytes. A header field is added to the frame header of the frame, and a trailer field is added to the frame trailer. In addition, a CRC field is further included in the frame structure, occupying 16 bits. Correspondingly, the frame at the L2 layer also includes a data frame and a control frame. The control frame includes an acknowledgement and flow control frame (AFC) and a negative acknowledgement frame (NAC). Specifically, the receiver sends AFC or NAC to the sender, where AFC indicates correct reception and indicates available buffer space at the L2 layer, and NAC indicates a reception error.

[0108] The L3 layer is a network layer, which is configured to route data to the correct target device. The data unit transmitted at the L3 layer is a data packet. A shorter header field is added based on the frame at the L2 layer, occupying 7 bits, and is used to identify the destination address for data routing.

[0109] The L4 layer is the transport layer, and its main functions include addressing, disassembly and reassembly, error handling, packet assembly and disassembly, formatting, and end-to-end flow control. The data unit transmitted at the L4 layer is a data segment. A port identification code field is added based on the package at the L3 layer, occupying 5 bits, and is used to identify different ports.

[0110] Furthermore, as shown in FIG. 6, a layer management (LM) service access point (SAP) interface is configured between the DME and each of the layers. The SAP design allows the layers to be implemented independently and allows the layers to be combined or separated if functionality is ensured. Based on the SAP, the DME can access the status and control parameters of each layer, manage the power consumption mode of each layer, control the power on, power off, and reset of Unipro, end point reset, startup of lower layer links, and sleep mode switching, and set the attributes of each layer. Furthermore, the DME can access and control the Unipro module of the peer device.

[0111] It can be seen that the data transmission structure defined in the UniPro protocol standard is complicated. In point-to-point storage scenarios, many functions at each layer are redundant, such as the port management function applied to multi-port scenarios. There are multiple layers in UniPro, and each layer needs a logical interface, which needs to be connected to the DME, and the DME manages the entire link. As a result, the circuit occupies a large area. In addition, the link management process is complicated and time-consuming. Furthermore, the complicated structure brings about a large number of error types that may occur, which increases the difficulty of error handling. Furthermore, the data coding method in UniPro is 8B10B, which has low coding efficiency, thereby affecting the data transmission rate.

[0112] Based on the camera scenario, the MIPI Alliance has formulated the camera serial interface 2 (CSI-2) protocol. The CSI-2 protocol defines a high-speed serial interface between a processor and a camera module. As shown in Figure 7, in a communication system in which the CSI-2 protocol is applied, the transmitter is a camera module and the receiver is a wireless access point (AP) end (e.g., a CPU). The CSI-2 protocol architecture is divided into three layers, namely, an application layer, a protocol layer, and a physical layer (PHY layer). The protocol layer includes a pixel to byte packing formats layer, a low level protocol layer, and a lane management layer. The physical layer can be a C-PHY or a D-PHY.

[0113] Based on the display scenario, the MIPI Alliance formulated the display serial interface 2 (DSI-2) protocol, which defines a high-speed serial interface between a processor and a display module. As shown in Figure 8, in a communication system in which the DSI-2 protocol is applied, the transmitter is the AP end (e.g., CPU) and the receiver is the display module. Similar to the CSI-2 protocol architecture, the DSI-2 protocol architecture also includes three layers, namely, an application layer, a protocol layer, and a physical layer. The protocol layer includes a pixel-to-byte packing format layer, a low-level protocol layer, and a lane management layer. The physical layer can be a C-PHY or a D-PHY.

[0114] For example, as shown in Table 1, the contents and functions defined in the CSI-2 protocol architecture and the DSI-2 protocol architecture are described. [Table 1]

[0115] Based on the description of the Unipro protocol, the CSI-2 protocol, and the DSI-2 protocol, it can be seen that currently, in electronic devices, the protocol architectures used by the camera module, the display module, and the storage module are different. Furthermore, the various physical interfaces are different from each other, resulting in completely different circuit structures for each part. In the schematic diagram of the circuit link shown in FIG. 9, the three parts, namely the camera module, the display module, and the storage module, need to separately use different link lanes to communicate with the SOC. As a result, the circuit structure is complicated, the interconnection area is increased, and the transmission rate is low. Furthermore, the error handling is complicated, the link transmission is complicated, and various interface problems are likely to occur. The camera module, for example, includes a camera sensor chip. The display module, for example, includes a display driver IC (DDIC). The storage module, for example, includes a storage sensor chip.

[0116] Therefore, the embodiment of the present application provides a data transmission protocol architecture for a point-to-point transmission scenario. The protocol architecture may be applied to a storage scenario, a camera scenario, and a display scenario. The architecture is simple, which can effectively simplify the circuit structure and improve the transmission efficiency.

[0117] For example, as shown in FIG. 10, a typical data transmission protocol architecture is composed of an application layer, LAThe application layer includes a basic transmission capability of the protocol layer, a protocol layer (PL), and a physical layer (PL). The application layer is configured to invoke the basic transmission capabilities of the protocol layer to implement the application functions of the application layer, including, for example, a host parameter set for the device. The protocol layer is configured to provide data transmission lanes, for example, transparent data transmission rates, between a sender and a receiver to provide a reliable data transmission service to the application layer. Optionally, the protocol layer may further ensure the reliability of data transmission through segmentation / reassembly and error control above the physical layer. The physical layer is configured to provide the mechanical, electronic, functional, and specification characteristics for creating, maintaining, and breaking down the physical lanes required for data transmission.

[0118] Optionally, the general protocol architecture provided in the embodiment of the present application shown in FIG. 10 may be applied to the scenarios shown in FIG. 4A(a) to FIG. 4A(c) and FIG. 4B(a) and FIG. 4B(b) and other data transmission scenarios. As shown in FIG. 31, the camera module, the display module, and the storage module all perform data transmission based on the protocol architecture provided in the embodiment of the present application. Since the same protocol architecture is applied in the transmission process of the modules, the transmission interface is the same. Therefore, the modules do not need to be separately connected to the SOC as shown in FIG. 9, but can be connected to the SCO based on the same transmission interface, thereby implementing link multiplexing, reducing the line layout, and reducing the circuit area.

[0119] In some embodiments, the protocol architecture shown in FIG. 10 has different specific implementations for different application scenarios.

[0120] For example, based on the protocol architecture shown in Fig. 10, as shown in Fig. 11, in a camera scenario, the data transmission detection of the protocol architecture is from the camera end to the AP end. After the camera acquires data, the control bus controls the application layer 1001 at the camera end to generate pixel data or embedded data to be sent to the protocol layer 1002. The protocol layer 1002 can pack data by using a pixel byte packing formats function 1101, a packet header & ECC generation function 1102, and a payload CRC & packet footer generation function 1103. Specific implementations include generating data packet headers and error correction codes (ECC), and generating cyclic redundancy check (CRC) codes and data packet footers. The implementation order of the functions is not limited in this embodiment of the present application. The data packet is then sent by the camera end physical layer 1003 to the AP physical layer 1006 for processing, and then sent to the protocol layer 1005. The protocol layer 1005 can unpack the data packet by using the packet header correction and reporting function 1110, the payload error checking and reporting function 1111, and the byte-to-pixel unpacking format function 1112. A specific implementation includes checking and reporting the data packet header and ECC, and checking and reporting the CRC and the data packet footer. The protocol layer 1005 sends the generated pixel data or embedded data to the application layer 1004. The implementation order of the functions of the camera end protocol layer 1002 and the AP protocol layer 1005 is not limited in this embodiment of the present application. For specific steps of data transmission in a camera scenario, please refer to the relevant contents of the procedure shown in Figure 35 below.The details will not be described again here.

[0121] For example, based on the protocol architecture shown in FIG. 10, as shown in FIG. 12, in a display scenario, the data transmission detection of the protocol architecture is from the AP end to the DDIC end. After the AP end obtains the data, the control bus controls the application layer 1001 at the AP end to generate pixel data or embedded data to be sent to the protocol layer 1002 for data packing. Then, the data packet is sent by the physical layer 1003 to the physical layer 1006 of the DDIC for transmission to the protocol layer 1005 for data packet unpacking, and then sent to the application layer 1004. The main functions of the protocol layers at the AP end and the DDIC end include packing and unpacking pixel data, generating, checking and reporting data packet headers and ECC, and generating, checking and reporting CRC and data packet footers. The implementation order of the functions of the protocol layer 1002 at the AP end and the protocol layer 1005 at the DDCI end is not limited in this embodiment of the present application. For specific steps of data transmission in a display scenario, please refer to the relevant contents of the procedure shown in FIG. 37 below. The details will not be described again here.

[0122] For example, based on the protocol architecture shown in FIG. 10, as shown in FIG. 13, in a storage scenario, the data transmission detection of the protocol architecture is bidirectional transmission, and application data between two devices can be transmitted to each other to implement data storage. The protocol layer is mainly divided into two parts. One part is a data transmission part, the main functions of which include message segmentation and reassembly function, packet header format generation and parsing function, CRC generation and checking function, control data packet generation, parsing and data buffering function, and data transmission and traffic control function. The other part is a link management and setting part, the main functions of which include command transmission and control function, error detection and test mode function, and register access and setting function. The protocol layer is mainly configured to implement data packing and unpacking process. The implementation order of the functions is not particularly limited in this embodiment of the present application. For specific steps of data transmission in a storage scenario, please refer to the relevant contents of the procedure shown in FIG. 38 below. Details will not be described again here.

[0123] Furthermore, for the sake of simplicity in the following description, the protocols of the interfaces in different scenarios are defined as consuming electronic device interface (CEDI) standard protocols. Specifically, the standard protocols can be divided into two parts, namely, physical layer protocols and protocol layer protocols. The physical layer (PHY) protocols include C-PHY, D-PHY, and M-PHY. The protocol layer protocols include dedicated protocols designed for cameras, such as the CEDI protocol for camera (PRL-C), dedicated protocols designed for displays, such as the CEDI protocol for display (PRL-D), and dedicated protocols designed for memories, such as the CEDI protocol for storage (PRL-S). The CEDI standard protocol is a protocol standard used to standardize interface transmission, and can also be described as electronic device interface standard, interface standard protocol, etc. This is not particularly limited in this embodiment of the present application.

[0124] It can be seen that, compared with that in the MIPI protocol architecture, in the protocol architecture provided in the embodiment of the present application, in the case of a point-to-point transmission scenario, the physical adapter layer, the data link layer, the transport layer, and the network layer are not distinguished. Based on the common protocol architecture, data packing and unpacking processes can be implemented in the protocol layers in each data transmission scenario to complete the data transmission. In other words, PRL-C, PRL-D, and PRL-S can be directly combined to implement transmission in three modes in the same link structure.

[0125] Considering kore, in the protocol architecture provided in the embodiment of the present application, the required functions are directly implemented by using the protocol layer, thereby simplifying the protocol architecture and removing redundant functions. Furthermore, the simplification of the circuit structure and function can reduce the logic resource by about 18.7% and reduce the power consumption by about 9.6%.

[0126] Furthermore, in this embodiment of the present application, data coding can be performed in a 128B / 132B coding method, and the coding efficiency can reach 96.97%. However, the coding method used in the MIPI protocol architecture is 8B10B, and the coding efficiency is as low as 80%. Therefore, compared with the MIPI protocol architecture, the protocol architecture provided in the embodiment of the present application can improve the coding efficiency by 17%. Furthermore, based on the high coding efficiency, the data transmission efficiency can be further improved.

[0127] In some embodiments, the protocol layers in the protocol architecture provided in the embodiments of the present application may be established based on various physical layers, and different physical layers have corresponding physical layer matching interfaces. The main functions of the physical layers include, for example, lane distribution and combining functions, and forward error correction (FEC) functions. For example, as shown in Figures 31 and 32, the ports of all modules can perform data transmission based on the same physical layer. In this case, only one port A including four pins needs to be configured in the SOC, and data transmission by the camera module, the display module, and the storage module may be implemented by physical layer multiplexing. In this way, the cost in the physical layer is reduced, and the links in the physical layer are reduced.

[0128] For example, based on the protocol architectures shown in Figures 11, 12, and 13, it can be seen that in different scenarios, the physical layer in the protocol architecture is integrated. Furthermore, the physical layer includes a lane distribution and combining function. As shown in Figure 11, the physical layer 1003 of the transmitting side includes a logical physical layer lane distribution and coding function 1104, and the physical layer 1006 of the receiving side includes a logical physical layer lane distribution and coding function 1109. Furthermore, the physical layer corresponds to a forward error correction function. As shown in Figure 11, the physical layer 1003 of the transmitting side corresponds to a forward error correction code encoding function 1105, and the physical layer 1006 of the receiving side corresponds to a forward error correction code decoding function 1108.

[0129] Optionally, for example, the physical layer in the protocol architecture provided in the embodiments of the present application is implemented as a serializer-deserializer (Serdes) architecture, where the serializer is also called a transmitter (Tx) in the Serdes architecture, and the deserializer is also called a receiver (Rx) in the Serdes architecture.

[0130] The single lane rate of the protocol architecture provided in the embodiment of the present application based on the Serdes architecture is 16 Gbps, and the single lane rate of the MIPI protocol architecture is 11.6 Gbps. In comparison, the single lane rate is improved by 37%. Furthermore, Serdes is a time-division multiplexing (TDM) and point-to-point communication technology. Specifically, the transmitter converts multiple low-speed parallel signals into high-speed serial signals for transmission, and then transmits the signals through a transmission medium (e.g., optical cable or copper wiring). Finally, the receiver converts the high-speed serial signals into low-speed parallel signals after receiving the signals. Therefore, compared with the MIPI protocol architecture, the protocol architecture provided in the embodiment of the present application uses differential signals for transmission instead of single-ended signals, thereby improving the interference resistance of the link. Clock and data recovery technology is used to replace the simultaneous transmission of data and clock, thereby eliminating the problem of signal clock offset that limits the data transmission rate. Coding technology is used to reduce signal distortion and improve the interference resistance of signals. Pre-emphasis and equalization techniques are used to compensate for high frequency losses in a signal, thereby improving the transmission recovery capability of the signal.

[0131] Therefore, a unified physical layer is used for PRL-C, PRL-D, and PRL-S. The physical layer interfaces do not need to be set separately, and a unified physical layer interface is configured. Therefore, the cost at the physical layer can be reduced, and the circuit structure at the physical layer can be reduced. In the physical implementation of the circuit design, only four pins need to be connected separately to the camera module, the display module, the storage module, and the SOC, and multiple devices may be connected in series. Compared with the MIPI protocol architecture, the protocol architecture provided in the embodiment of the present application has the characteristics of low power consumption and low electromagnetic interference (EMI), and can implement fast startup and minimal circuit design. For example, the circuit area of ​​PRL-S is reduced by 20% compared with Unipro.

[0132] For example, referring to the description of Figures 10, 11, 12 and 13, the protocol architecture provided in this embodiment of the present application has a simple three-layer architecture. As shown in Figure 14, in a point-to-point transmission scenario, the protocol architecture can accommodate any one-way or two-way high-speed data transmission, and is applicable to scenarios such as photography, display and storage. Multiple different functions are implemented in the same protocol architecture, the circuit structure is simplified, and the requirements of the light and thin design of some electronic devices are met.

[0133] It should be noted that Fig. 14 is a schematic diagram of a transmission scenario between a module and an SOC, and the SOC must be the same SOC. Fig. 14 is used to show that a camera module, a display module, and a storage module can perform high-speed data transmission with an SOC, and is not used to restrict the circuit connection relationship between the module and the SOC.

[0134] In some embodiments, in the data transmission process, the transmission link needs to be managed. Generally, there are two scenarios for link management. One scenario is data transmission within a module, and the physical layer link needs to be managed. For example, as shown in FIG. 15(a), the link manager sends a corresponding command to the physical layer, and then the physical layer returns a corresponding result. Another link management scenario is data transmission between two modules, and interaction with the data link layer of the peer module is required. For example, as shown in FIG. 15(b), the link manager controls the data link layer of the local end (device A) to send a data control packet to the physical layer, and interacts with the link manager of the peer end (device B) to obtain a response data packet. The data link layer is a protocol layer in the protocol architecture provided in the embodiment of the present application, or may be described as a link layer. This is not described below.

[0135] Therefore, in the link management process provided in this embodiment of the present application, based on a simple protocol architecture, as shown in Figure 13, the link manager is a module in the protocol layer. Therefore, the link manager manages the data link layer and the physical layer, and communicates with the application layer through a logical interface between the data link layer and the application layer. Compared with the Unipro protocol architecture in which the link management is performed by using the DME, and six logical interfaces need to be added for the DME to communicate with each layer, the link management method provided in this embodiment of the present application does not need any newly added logical interfaces. Furthermore, in the link management process, only the data link layer and the physical layer need to be managed, and the link management process is simple, thereby avoiding the problem that the link management time is long and the response is not timely caused by multi-layer interaction.

[0136] The above describes the protocol architecture and link management related contents provided in the embodiment of the present application. The following describes a data transmission method based on the protocol architecture.

[0137] Firstly, the structure of data packets in the data transmission process is introduced to ensure the efficiency and reliability of data transmission.

[0138] In some embodiments, based on the protocol architecture diagrams shown in Figures 11, 12 and 13, the application layer 1001 of the sender sends data to the protocol layer 1002, which needs to frame the segmented data. The required packet header and packet footer are added to the data packet, and then the data packet is sent to the physical layer 1006 of the receiver through the physical layer 1003. The physical layer 1006 of the receiver sends the received data packet to the protocol layer 1005, which unpacks the data packet to generate segmented reassembled data to be transmitted to the application layer 1004, and completes the data transmission from the sender to the receiver. For example, as shown in Figure 11, the application layer 1001 of the AP generates pixel data or embedded data to be transmitted to the protocol layer 1002, and the protocol layer 1002 packs the data by using the pixel byte packing format function 1101. A packet header is generated and added to the data packet by using a packet header and error correction code generation function 1102, and a packet footer is generated and added to the data packet by using a payload CRC and packet footer generation function 1103, and a data packet to be transmitted is generated. Then, after the transmission is performed through the physical layer 1003 and the physical layer 1006, the DDIC protocol layer 1005 receives the data packet and checks and corrects the data packet by using a packet header correction and reporting function 1110 and a payload error check and reporting function 1111. The data packet is unpacked by using a byte-to-pixel unpacking format function 1112, and the unpacked pixel data or embedded data is sent to the application layer 1004. In this way, the data transmission process in which the camera sends the pixel data or embedded data to the AP is completed.

[0139] In some embodiments, based on the protocol architecture provided in the embodiments of the present application, data packets are classified into different "data packet types" based on different functions of signaling on the interface, i.e., whether system commands or payload data are transmitted. For example, control packets are used to transmit system commands, and data packets are used to transmit payload data. Each data packet type represents a predefined data packet structure used for a given data packet. Furthermore, since each type of data packet has a different function, the data packet may have a predefined length or a dynamically changing length. Optionally, subpackets or fields in a data packet are configured by using byte values ​​configured by unsigned integers of 8 bits, 16 bits, or other bit numbers. Based on the flexible extensibility of the interface, new packet structures may be added, or the definitions of data packet field values ​​may be changed based on actual requirements.

[0140] In some embodiments, data packets are classified into long data packets and short data packets based on different carried data, and the parts of the data packets having specific information or specific numbers are called subpackets of the data packets. For example, as shown in FIG. 16(a), the long data packets include a data packet header subpacket, a payload data subpacket, and a data packet footer subpacket. As shown in FIG. 16(b), the short data packets include a data packet header subpacket and a data packet footer subpacket. Specifically, to ensure efficient and reliable transmission of data packets, the transmission of each data packet begins by using a data packet header subpacket, and the transmission of the data packet ends by using a data packet footer subpacket. Optionally, the data packet header subpacket occupies 48 bits. The payload data subpackets occupy different numbers of bits based on the number of payload data. The data packet footer subpacket occupies 16 bits. It can be understood that the length of the current data packet and the length of each subpacket and each field in the current data packet are all examples for description in this embodiment of the present application, and the details will not be described again below. In this embodiment of the present application, the long data packet and the short data packet are not distinguished by the length of the bits occupied by the data packet.

[0141] As shown in Figure 17, a payload subpacket is a combination of useful data fields and contains some or all of the data that needs to be transmitted between a transmitter and a receiver. The data transfer format varies based on the data type.

[0142] The data packet footer subpacket includes a CRC field. The CRC field occupies 16 bits and indicates a cyclic redundancy check result obtained after the transmitter performs error detection on all contents of the data packet except the CRC, so as to ensure the integrity and reliability of the entire data packet. Based on the CRC field, the receiver can determine the number of error bits detected through the CRC and the integrity of the data packet. Generally, the CRC field is determined by using the CCITT-16 algorithm. For the specific algorithm, please refer to the prior art. The details will not be described again in this embodiment of the present application.

[0143] In some embodiments, the data packet structure provided in this embodiment of the present application can be applied to a camera scenario, a display scenario, and a storage scenario. The value of the field indicates the scenario to which the data packet being transmitted is applied. For example, as shown in FIG. 17, the data packet header subpacket includes a data type field, a word count field, and a Ctrl-bits field. The data type field occupies 8 bits and indicates the scenario to which the data packet is transmitted. The Ctrl-bits field occupies 24 bits and is used to form different data packet header formats based on different picture taking, display, and storage scenarios to implement functions required by different scenarios. The data count field occupies 16 bits and is information based on a byte value format. The information indicates the number of bytes occupied by the payload subpacket in the data packet.

[0144] For example, Table 2 shows the application scenarios of the transmitted data packets, the data packet types, and the meanings represented by the data packets when the type field has different values. The data type field value of 0x01-0x1F (i.e., 01h-1Fb) indicates that the transmitted data packets are display protocol packets. The data type field value of 0x20-0x4F (i.e., 20h-4Fh) indicates that the transmitted data packets are camera protocol packets. The data type field value of 0x50-0x7F (i.e., 50h-7Fh) indicates that the transmitted data packets are storage protocol packets. The data type field values ​​of 0x80-0x8F (i.e., 80h-8Fh), 0x90-0x9F (i.e., 90H-9Fh), and 0xA0-0xAF (i.e., A0h-AFh) correspond to the camera, storage, and display data packets defined by the user, respectively. A data type field value of 0xB0 to 0xFFF (ie, B0h to FFh) indicates that the transmitted data packet is in a reserved data format. [Table 2] TIFF0007666596000003.tif117131

[0145] Furthermore, in the process of transmitting a data packet, the lower data bits of the field need to be transmitted first, and then the higher data bits of the field are transmitted. In addition, in the same data subpacket, the data bits are transmitted sequentially based on the field order. The interface of the protocol architecture provided in the embodiment of the present application has flexible extensibility. Therefore, the transmission rules of the fields and the corresponding data bits may be changed based on the actual requirements.

[0146] For example, based on Table 2, the following describes the structure of a data packet in different scenarios when the data type field has different values.

[0147] Example 1: The value of the data type field is 50h, and the data packet being transmitted is a long data packet used in a storage scenario.

[0148] As shown in Figure 18, the data in the Data Packet Payload subpackets of the Data Packet is valid storage data transmitted by the transmitter to the receiver. The Data Packet Header subpackets are combinations having a common structure or minimum fields. The minimum fields include at least a Data Type field, a Number of Data field, an End of Message (EOM) indication field, a Frame Number field, and a Reserved field.

[0149] The end-of-message indication field occupies one bit and indicates that the data stream transmission ends, for example to indicate to the application layer that the data packet being transmitted is the last data packet in the data stream being transmitted.

[0150] The frame number field occupies 7 bits and indicates the frame number of the data packet. In this way, the transmitter and receiver can record the frame number of the data packet so as to prevent the loss of the data packet. Generally, the value of the frame number field starts with 1 and increases by 1 until it reaches the value 127. Then, the value starts with 0.

[0151] Example 2: The value of the data type field is 51h or 52, the data packet being transmitted is used in a storage scenario, and the data packet type is a short acknowledgement (ACK) packet in a short control packet, indicating that the data packet was received correctly.

[0152] For example, as shown in FIG. 19, a data packet header subpacket in a data packet includes a data type field, a credit request (CReq) field, a frame number field, a credit value field, a reserved field, a CRC upper 8 bits (CRC-16H) field, and a CRC lower 8 bits (CRC-16L) field.

[0153] The CReq field occupies one bit and is used to perform traffic control on the transmitted data.

[0154] The frame number field occupies 7 bits. For the function of the frame number field, please refer to the related description in Example 1. The details will not be described again here.

[0155] The credit value field occupies 16 bits and indicates the credit value of the data packet.

[0156] The CRC-16H field occupies 8 bits and indicates the value of the 8 most significant bits of the cyclic redundancy check code.

[0157] The CRC-16L field occupies 8 bits and indicates the value of the 8 least significant bits of the cyclic redundancy check code.

[0158] Example 3: The value of the data type field is 53h, the data packet being transmitted is used in a storage scenario, and the data packet type is a short negative acknowledgement (NACK) packet in a short control packet, indicating that there was an error in receiving the data packet.

[0159] For example, as shown in FIG. 20, the data packet header subpacket in the data packet includes a data type field, a reset request (RReq) field, a reserved field, a CRC upper 8 bits (CRC-16H) field, and a CRC lower 8 bits (CRC-16L) field.

[0160] The RReq field occupies 1 bit. For the function of the RReq field, please refer to the related description of the CReq field in Example 2. The details will not be described again here.

[0161] Example 4: The value of the data type field is from 10H to 1Fh, and the data packet being transmitted is a long data packet used in a display scenario. Alternatively, the value of the data type field is from 30h to 4Fh, and the data packet being transmitted is a long data packet used in a camera scenario. The data packet structure of the long data packet in the display scenario is the same as that in the camera scenario.

[0162] For example, as shown in FIG. 21, the data packet header subpacket in a data packet includes a data type field, a number of data fields, a start of frame (SOF) field, an end of frame (EOF) field, a start of line (SOL) field, an end of line (EOL) field, a virtual channel (VC) number field, a cyclic running index (CRI) field, a reserved (RSV) field, and a packet header (PH) error correction code (ECC) field.

[0163] The SOF field occupies one bit and indicates the start flag of the frame data.

[0164] The EOF field occupies one bit and indicates the end of a frame of data.

[0165] The SOL field occupies one bit and indicates the start of a line of data.

[0166] The EOL field occupies one bit and indicates the end of a line of data.

[0167] The VC field occupies 4 bits and indicates the lane to which the transmitted data packet belongs.

[0168] The CRI field occupies 2 bits and indicates the cycle number of the data packet.

[0169] The packet header error correction code field occupies 7 bits and is used for error detection and correction of packet header data, and can simultaneously implement 1-bit error correction and 2-bit error detection.

[0170] Example 5: The value of the data type field is 01h to 0Fh, and the data packet being transmitted is a short data packet used in a display scenario. Alternatively, the value of the data type field is 20h to 2Fh, and the data packet being transmitted is a short data packet used in a camera scenario. The data packet structure of the short data packet in the display scenario is the same as that in the camera scenario.

[0171] For example, as shown in FIG. 22, a data packet header subpacket in a data packet includes a data type field, a short packet data field, a reserved field, a virtual channel number (VC number) field, a CRI field, and a short packet error correction code (short packet ECC) field.

[0172] The short packet data field occupies 16 bits and is the valid data of the short packet.

[0173] The error correction code field of the short packet occupies 7 bits and is used for detecting and correcting errors in the data in the short data packet.

[0174] For the functions of the virtual channel number field and the CRI field, please refer to the relevant description in Example 4. The details will not be described again here.

[0175] Therefore, based on the same protocol architecture, a general data packet structure applicable to a camera scenario, a display scenario, and a storage scenario is constructed, and a data type field in the data packet is used to identify the application scenario of the data packet. Compared with the prior art in which different scenarios correspond to different protocol architectures and data of different data packet structures are transmitted, this embodiment of the present application provides a protocol architecture and a general data packet structure, so that the circuit complexity and circuit area can be effectively reduced, thereby reducing the circuit power consumption and improving the transmission efficiency.

[0176] For example, based on the protocol architecture shown in Figure 13, the transmission process of a long data packet in a storage scenario is described. The application layer 1001 of the sending side sends application data to the protocol layer 1002. The protocol layer 1002 packs the application data by using the message segmentation and reassembly function 1301, adds a data type field, a frame number field, an end of message indication field, and a data number field to the packet header of the data packet by using the packet header generation and parsing function 1302, and adds a cyclic redundancy check field to the packet footer of the data packet by using the CRC generation and checking function 1303. The protocol layer 1002 frames the data packet to form a complete data packet, and then sends the data packet to the physical layer 1006 of the receiving side by the physical layer 1003.

[0177] Correspondingly, after receiving the data packet sent by the physical layer 1006, the receiving protocol layer 1005 distinguishes whether the data packet is a data packet or a control packet based on the data type field in the packet header by using the packet header generation and parsing function 1310. If the data packet is a data packet, packet format parsing is performed on the packet header by using the packet header generation and parsing function 1310. Alternatively, if the data packet is a control packet, the operation and response are performed based on the specific content of the control packet. In the current scenario, the transmitted data packet is a long data packet. Therefore, packet format parsing is performed on the packet header by using the packet header generation and parsing function 1310. The protocol layer 1005 reports the error to the link management based on the cyclic redundancy check field by using the CRC generation and check function 1311, and reassembles the data packet by using the message segmentation and reassembly function 1309. In this way, the protocol layer 1005 completes the data packet unpacking process, and sends the application data generated after unpacking to the application layer 1004, thereby completing the transmission of the long data packet in the storage scenario.

[0178] In the above general data packet structure, data is transmitted between layers, and 128B / 132B coding is supported. Compared with the protocol architecture in the prior art, in which data is transmitted in a data packet structure, each layer has a corresponding data relationship, and each layer of data has a different function format, the protocol architecture and general data packet structure provided in this embodiment of the present application can facilitate interaction, improve transmission efficiency, and reduce transmission errors.

[0179] Furthermore, the transmitter may dynamically select and change the data packet transmission rate based on actual usage requirements without exceeding the maximum transmission capability of the transmitter.

[0180] In some cases, the transmitter transmits padding data packets to maintain the data transmission rate of each protocol link or ensure clock synchronization to avoid inconvenience caused to the receiver for accurate decoding. Furthermore, since each data packet is transmitted from a data packet header subpacket, the padding data packets can be inserted after the payload data subpacket or the data packet footer subpacket.

[0181] The above describes the structure of the data packet transmitted according to the protocol architecture provided in the embodiment of the present application, and the framing and deframing process of the data packet in the transmission process. The following describes possible error types and retransmission mechanisms in the data transmission process.

[0182] It can be seen from the above description of the protocol architecture in some embodiments that the protocol architecture can combine PRL-C, PRL-D, and PRL-S protocol architectures. Correspondingly, the error types of the protocol architecture can also be combined. Thus, the error types are reduced. Furthermore, the protocol architecture has a simple structure, and the complexity and difficulty of error handling are reduced, so that the error handling efficiency can be improved and better error handling results can be obtained.

[0183] For example, Table 3 shows the types of errors that may be generated in the protocol architecture provided in the embodiment of the present application. The error of entering high speed data state (enter hs request, EHR) is detected by the physical layer of the device, and other errors are detected by the data link layer of the device. After the errors shown in Table 3 occur, the device stores the error status in a register whose control interface address space is 0x0001. The error types corresponding to different bit values ​​are shown in Table 3. After the error is reported, the error status is cleared.

[0184] It should be noted that the bit values ​​and corresponding error types are only examples for description, and the setting and updating of the values ​​in the registers can be changed based on the actual situation. Furthermore, after the error occurs and is reported, the device can take a solution based on the actual situation, which is not particularly limited in this embodiment of the present application. [Table 3]

[0185] As shown in Table 3, an EHR error means that if an error occurs in the sequence of the EHR and is detected by the physical layer, the EHR error must be recorded and reported, regardless of whether the error occurs in one bit of data or multiple bits of data. For example, a display device must report an EHR error when an AP queries the error status. Even if an error occurs in the EHR, the bits following the error bit in the EHR (e.g., synchronization code or training code) and the subsequent data packet may be correct, but the confidence in the data packet integrity is reduced.

[0186] ECC error (1 bit) means that if a 1-bit error is found and corrected in the ECC field in the data packet header, an ECC error (1 bit) is recorded and reported. In other words, if an ECC error (1 bit) occurs, even if the information in the packet header is corrected, the ECC error (1 bit) is still reported to, for example, the application layer and AP of a display device.

[0187] ECC error (multiple bits) means that if a multi-bit error is found in the ECC field in the data packet header, an ECC error (multiple bits) is recorded and reported. When an ECC error (multiple bits) occurs, the information in the data packet header is corrupted. Furthermore, since such an error is usually accompanied by a CRC error, the data link layer of the transmitter needs to be notified.

[0188] CRC error means that if the CRC calculated by the device does not match the CRC received, a CRC error is reported. When a CRC error occurs, the data link layer needs to be notified that the payload data is corrupted.

[0189] Data type identification error means that if the data type received by the device does not match the expected data type, a data type identification error is recorded and reported.

[0190] Virtual channel ID identification error means that if the virtual channel ID received by the device does not match the expected virtual channel ID, a data type identification error is reported.

[0191] A transmission length error means that if the data payload length received by the device does not match the length indicated by the number of data field in the packet header, then a transmission length error is recorded and reported.

[0192] Frame Sync Error means that if the device detects that the Frame Sync End cannot be paired with the Frame Sync Start, the device will record and report a Frame Sync Error.

[0193] Frame Data Error means that if an error occurs in a frame of data after frame synchronization has been achieved, then a Frame Data Error must be recorded and reported.

[0194] Receiver timeout error means that if the receiver does not receive data within a preset time, a receiver timeout error will be recorded.

[0195] Frame number error means that if the frame number recorded in the stored data does not match the actual frame number, a frame number error is reported.

[0196] Count error means that if the data number indicated by the data record field does not match the actual data number, a count error is recorded and reported.

[0197] In some scenarios, when an error occurs in data transmission, data retransmission needs to be performed. Therefore, a data retransmission mechanism is described based on the protocol architecture provided in the embodiments of this application.

[0198] In some embodiments, in the system architecture provided in this embodiment of the present application, the data link layer needs to support data retransmission. In this case, a sufficient buffer needs to be provided in the data link layer to buffer the data packets that are in transit. The size of the buffer is defined by a register. For example, the size of the buffer is 4096 bytes.

[0199] For example, every time a transmitter (i.e., a local end device) transmits a data packet, the transmitter (i.e., a local end device) stores the data in a buffer. Moreover, the transmitted data packets are strictly sorted based on frame numbers. Moreover, every time the transmitter receives an ACK packet corresponding to a frame number, the transmitter fetches the buffered data corresponding to the frame number from the buffer. As shown in FIG. 23, if the transmitter transmits N data packets (i.e., N data frames) and receives M corresponding ACK packets, there are (NM) data packets in the buffer. N and M are positive integers, and M≦N.

[0200] Correspondingly, for a receiver (i.e., a peer end device), each time a data packet sent by a transmitter is received, the receiver first determines whether the frame number is precisely aligned. If the frame number is correct and precisely aligned, the frame number is buffered in the receiver's buffer, and an ACK packet corresponding to the frame number is fed back to the transmitter. If the received frame number is incorrect, the data frame reception is stopped, and a NACK packet is fed back to the transmitter. Furthermore, each time the receiver feeds back an ACK packet corresponding to the frame number, the receiver fetches the corresponding buffered data packet from the buffer. As shown in FIG. 24, if the receiver receives N data packets (i.e., N data frames) and sends M corresponding ACK packets, there are (NM) data packets in the buffer.

[0201] In some embodiments, after receiving a data packet, the data link layer of the receiver first stores the data packet in a buffer, and if the received data packet has no error (e.g., CRC error or length error), the data link layer of the receiver feeds back an ACK packet to the transmitter and fetches the data packet from the buffer.

[0202] For example, as shown in FIG. 25, after receiving a correct data packet, the receiver puts the frame number of the data packet into an ACK packet as a parameter, and feeds back the frame number to the transmitter. Alternatively, after receiving a group of data packets, the data link layer of the receiver correspondingly returns one ACK packet indicating the frame number of the packet footer of the group of data packets, indicating that all data packets before that frame number have been received correctly. When data packet reception is determined by using a group, the ACK packet can be fed back only when it is ensured that all data packets of the group are normally received. Furthermore, a maximum value is preset. In the subsequent grouping and determination process, the number of data packets in the group cannot exceed the preset maximum value. For example, if the preset maximum value is 16, the maximum number of data packets grouped and determined simultaneously is 16. The preset maximum value may be changed based on a specific implementation. In the grouping and determination process, if an error occurs, the receiver returns the frame number of the last data packet that was correctly received, and sends a NACK packet. In this way, the transmitter can determine the frame number of the erroneous data packet and retransmit the data packet from that frame number.

[0203] In some embodiments, when an exception occurs during the process of the receiver's data link layer receiving a data packet and it is determined that the data packet is not received correctly, the data link layer feeds back a NACK packet to the transmitting device and discards the data packet. For example, Table 4 shows some possible causes of data reception errors. When a data packet is not received correctly due to an abnormal physical layer condition, the reset request (RReq) field is set to 1, as shown in Figure 20. When a data packet is not received correctly due to other error causes, the RReq field is set to 0. [Table 4]

[0204] Correspondingly, as shown in Figure 26, when the transmitter receives a NACK fed back by the receiver, the retransmission mechanism is triggered. First, the value of Reset Req (i.e., reset request field) is determined. If Reset Req=1, link repair is performed directly, and then data retransmission is performed. If Reset Req=0, the physical layer status needs to be obtained first. If the physical layer status is normal, data is retransmitted directly. If there is an error in the fed back physical layer status, link repair is performed first, and then data is retransmitted.

[0205] In some embodiments, the sender and the receiver manage the frame number of the data packet to be transmitted. As described in the above description of the data packet structure, the frame number indication field included in the data packet header subpacket occupies 7 bits and indicates the frame number of the data packet to be transmitted. The value range of the frame number is from 0 to 31. When transmitting each data packet, the sender needs to pack the frame number into the data packet header. Correspondingly, after receiving the data packet, the receiver determines that the sequence of frame numbers indicated in the data packet is consistent with the sequence of frame numbers recorded locally. When an ACK packet is fed back, the frame number is incremented by one, and then packed into an ACK packet and sent to the sender. After the sender transmits a data packet whose frame number is 31, the frame number value is set by using a rotation mechanism within 0 to 31, and the frame number is reset to 0, that is, the frame number of the next transmitted data packet is set to 0. Similarly, the receiver also sets the frame of the ACK packet by using a rotation mechanism to ensure that the frame numbers at both ends are aligned.

[0206] In some embodiments, the retransmission mechanism includes timeout retransmission and NACK retransmission. Timeout retransmission means that if the transmitter does not receive a response signal within a preset time after transmitting a data packet, the transmitter considers the transmission of the data packet to be unsuccessful and initiates a data retransmission mechanism to retransmit the data packet. NACK retransmission means that the transmitter receives a NACK fed back by the receiver, finds that the transmission of the data packet indicated by the NACK was abnormal, and initiates a data retransmission mechanism to retransmit the data packet.

[0207] It should be noted that the ACK / NACK feedback scheme in timeout retransmission and NACK retransmission may be single data packet feedback. Specifically, the receiver feeds back an ACK / NACK every time a data packet is received. Alternatively, the ACK / NACK feedback scheme may be data packet grouping feedback. Specifically, the data packets are grouped in the above manner, and the receiver feeds back an ACK / NACK every time a group of data packets is received.

[0208] In some scenarios, Figures 27A and 27B are schematic diagrams of a data transmission procedure based on a timeout retransmission mechanism. As shown in Figures 27A and 27B, steps 1-1 to 1-10 are included.

[0209] Step 1-1: The transmitter numbers the data packets to be transmitted and stores the data packets in a buffer.

[0210] In some embodiments, a register is set for each of the transmitter and receiver ports and is configured to count the frame numbers of transmitted or received data packets to ensure that the frame numbers are correct.

[0211] For example, as shown in FIG. 28, the transmitter transmits data packets in the order of frame numbers, eg, frame 1, then frame 2.

[0212] Step 1-2: The sender transmits a data packet and starts a timer, where the timer is restarted every time a data packet is transmitted.

[0213] In some embodiments, when the transmitter's buffer is completely filled with data, the data is not transmitted. If the size of the remaining space in the transmitter's buffer can be used to buffer the data packet to be transmitted next, the data packet is transmitted continuously. Furthermore, a timer is set in the data link layer of the transmitter. Every time a data packet is transmitted, the timer is refreshed to restart timing until all data packets are transmitted. In other words, the transmitter may transmit a subsequent data packet without waiting for the receiver to feed back a response signal, thereby improving data transmission efficiency. For example, when the remaining free space in the transmitter's buffer is equal to or greater than the size of the space that needs to be occupied by the data packet to be transmitted next, the data packet to be transmitted is stored in the buffer, the data packet to be transmitted is transmitted, and the timer is restarted. As another example, in the data transmission process, the size of the data packets that need to be transmitted is all the same. Therefore, the size of the buffer space of the buffer may be configured to be an integer multiple of the size of the data packet. In this case, in the data transmission process, the sender only needs to determine that it is not full (i.e., the size of the remaining free space in the buffer is an integer multiple of the size of the data packet) to continue sending the next data packet.

[0214] For example, in the device shown in Figure 28, the transmitter starts transmitting data, numbers the data packet to be transmitted as 1, stores data packet 1 (i.e., frame 1) in the buffer, and then starts the timer to start timing. Then, the next data packet to be transmitted is numbered as 2, and after data packet 2 (i.e., frame 2) is stored in the buffer, data packet 2 is transmitted, the timer is refreshed, and timing is restarted.

[0215] Step 1-3: The receiver stores the received data packets in a buffer.

[0216] Step 1-4: The receiver feeds back an ACK packet corresponding to the frame number to the transmitter, and deletes the data packet corresponding to that frame number from the buffer.

[0217] For example, as shown in Figure 28, after receiving a data packet, the receiver will feed back the ACK of the corresponding frame number. For example, after frame 1 is received, it is determined that the data is normal, and ACK1 is fed back to the sender.

[0218] Step 1-5: The sender receives an ACK packet within the preset time. If so, step 1-6 is executed. If not, step 1-7 is executed.

[0219] Step 1-6: The frame number corresponding to the ACK packet is determined, and the data packet corresponding to the frame number is deleted from the buffer.

[0220] Step 1-7: The transmitter stops transmitting data packets and acquires the physical layer state.

[0221] In some embodiments, the transmitter receives the corresponding ACK packets in the order of frame numbers. As shown in FIG. 28, the transmitter receives ACK1 and ACK2 in order. After receiving the ACK, the transmitter removes the corresponding data packet from the buffer to obtain more buffer space for transmitting the subsequent data packet. As shown in FIG. 28, after ACK1 is received, frame 1 is removed from the buffer and the timer is refreshed. After ACK2 is received, frame 2 is removed from the buffer and the timer is refreshed. If the buffer is not completely filled with data, the transmitter may continue to transmit data packets in order. However, if the transmitter does not receive an ACK, the transmitter cannot remove the data packet. As a result, the buffer may be completely filled with data. After the buffer is completely filled with data, the data packet transmission is stopped and the timer is not refreshed if no data packet is transmitted. Thus, the time is accumulated until it exceeds a preset time. The transmitter determines that the data transmission is abnormal and needs to be retransmitted, and performs data retransmission starting from the smallest frame number based on the frame numbers of the data packets that have not been deleted from the buffer. Corresponding to step 1-2, the transmitter's buffer is not completely filled with data includes that the remaining free space in the transmitter's buffer is greater than or equal to the data packet to be transmitted next. Alternatively, the data to be transmitted is divided into data packets of the same size, and the size of the buffer space of the buffer is an integer multiple of the size of the data packet. In this case, the transmitter's buffer is not completely filled with data includes that the transmitter's buffer is not full.

[0222] For example, as shown in FIG. 28, the transmitter receives ACK1, ACK2, . . . and ACKM in sequence, and determines that the transmission of the first M data packets is normal. Correspondingly, the first M data packets are deleted from the buffer after the corresponding ACK is received. The transmitter continues to transmit frame N, but does not receive any ACK after ACKM. As the number of transmitted data packets increases, the buffer is gradually filled with data packets, and the transmitter does not transmit data packets and waits for the timer to expire. In this case, it is determined that the data packet with the smallest frame number in the buffer is frame M+1. Further, the physical layer status is determined to determine whether link repair needs to be performed. M and N are positive integers greater than 2, and N>M.

[0223] In some other embodiments, multiple timers are set. Each time data is transmitted, one timer is started, and timing is stopped after an ACK corresponding to the data packet is received. After the timer is refreshed, the timer is used to operate for other data packets to be transmitted. Thus, compared with the timeout retransmission scenario with one timer, the multiple timers operate separately, and data can be retransmitted without waiting for the buffer to be completely filled and the timer to time out. Instead, data transmission may be stopped directly after the timer expires. In that case, the abnormal data packet corresponding to the timed-out timer is determined, and data retransmission is performed after all timers are refreshed. In this way, the waiting delay is reduced, and the transmission efficiency is further improved.

[0224] Step 1-8: The transmitter determines that the physical layer conditions are normal. If so, step 1-9 is performed. If not, step 1-10 is performed.

[0225] Step 1-9: The sender retransmits the data packets that were not successfully transmitted.

[0226] The contents of the Frame Number fields in the payload subpackets and the data packet header subpackets of the retransmitted data packets match those in the original data packets, i.e., those stored in the transmitter's buffer.

[0227] In some embodiments, after the abnormal data packet is retransmitted, return to step 1-1, that is, continue transmitting the data packets that have not been completely transmitted, and perform the above steps cyclically.

[0228] Step 1-10: The transmitter sends a link repair command to the physical layer to repair the link. After the link is repaired, step 1-9 is executed.

[0229] For example, as shown in FIG. 28, after link repair is completed, it is determined based on the frame numbers of the data packets in the buffer to retransmit the abnormal data packets from frame M+1, and continue to transmit the data packets whose transmission has not been completed.

[0230] It should be noted that the transmitter and receiver are each configured with a buffer.

[0231] In some other embodiments, Figures 29A and 29B are schematic diagrams of a data transmission procedure based on a NACK retransmission mechanism. As shown in Figures 29A and 29B, steps 2-1 to 2-11 are included.

[0232] Step 2-1: The transmitter numbers the data packets to be transmitted and stores the data packets in a buffer.

[0233] Step 2-2: The sender transmits a data packet and starts a timer, where the timer is restarted every time a data packet is transmitted.

[0234] In some embodiments, the data link layer of the transmitter stores data packets with data frame numbers 0, 1, 2, ... N in a buffer of the transmitter and transmits the data packets to the peer end at the same time. When the data buffer is completely filled with data, the data packets are not transmitted. The timer is enabled during the data transmission, and the timer is restarted every time a data packet is transmitted.

[0235] For example, as shown in Figure 30, a transmitter starts transmitting data, numbers the data packet to be transmitted as 1, stores data packet 1 (i.e., frame 1) in a buffer, then transmits data packet 1, starts a timer and starts timing, then the next data packet to be transmitted is numbered as 2, stores data packet 2 (i.e., frame 2) in a buffer, then transmits data packet 2, refreshes the timer, and restarts timing.

[0236] Step 2-3: The receiver stores the received data packets in a buffer.

[0237] Step 2-4: The receiver determines that the data packet transmission is normal. If so, step 2-5 is performed. If not, step 2-7 is performed.

[0238] Step 2-5: The receiver feeds back an ACK packet corresponding to the frame number to the transmitter, and deletes the data packet corresponding to the frame number from the buffer.

[0239] Step 2-6: The sender receives the ACK packet, and based on the ACK packet, deletes the corresponding data packet from the buffer and refreshes the timer. Then, step 2-1 is executed.

[0240] In some embodiments, each time the receiver receives a data packet, the receiver stores the data packet in the receiver's buffer, determines that the data packet is normal, and then returns an ACK packet corresponding to the frame number. Each time the transmitter receives an ACK packet, the transmitter removes the corresponding packet from the buffer. If the data buffer is not completely filled with data, the transmitter continues to transmit data packets until all data packets are transmitted. In some embodiments, the transmitter continues to store data packets to be transmitted in the buffer, and the above steps are repeated until all data packets are transmitted.

[0241] Step 2-7: The receiver feeds back a NACK packet, indicating the corresponding frame number.

[0242] Step 2-8: The sender receives the NACK packet and stops the timer.

[0243] In some embodiments, after receiving a NACK, the transmitter determines that the transmission of the data packet corresponding to the frame number of the NACK was abnormal, stops transmitting the data packet, and stops the timer.

[0244] For example, as shown in FIG. 30, after receiving a NACK, the sender stops data transmission, stops the timer, and initiates a data retransmission mechanism.

[0245] Step 2-9: The sender determines the cause of the error. If Reset Req=1, step 2-10 is executed. If Reset Req=0, step 2-11 is executed.

[0246] Step 2-10: The transmitter sends a link repair command to the physical layer to repair the link.

[0247] Step 2-11: The sender retransmits the data packet that was not successfully transmitted. Then, step 2-1 is executed.

[0248] In some embodiments, the transmitter continues to buffer data packets to be transmitted, and the above steps are repeated until all data packets have been transmitted.

[0249] In some embodiments, when Reset Req=1, link repair is performed directly, and then data retransmission is performed. When Reset Req=0, the physical layer status needs to be acquired first. If the physical layer status is normal, data is retransmitted directly. If there is an error in the fed back physical layer status, link repair is performed first, and then data is retransmitted.

[0250] For example, as shown in Figure 30, after determining the frame number corresponding to the NACK, the transmitter starts to retransmit the abnormal data packet, and retransmits the buffered data packets in the buffer in the ascending order of the frame numbers of the buffered data packets. Then, the transmission of all packets is completed.

[0251] For other contents, please refer to Step 1-1 to Step 1-10, and the details will not be described again here.

[0252] In the above description of the contents of the timeout retransmission procedure shown in Figures 27A and 27B and the NACK retransmission procedure shown in Figures 29A and 29B, it should be noted that the sender is a camera module and the corresponding receiver is a SOC, or the sender is a SOC and the corresponding receiver is a DDIC. Alternatively, a bidirectional transmission is performed between a storage module and a SOC, and the sender or receiver is a storage module or a SOC. Furthermore, the two retransmission mechanisms, i.e., timeout retransmission and NACK retransmission, may be used in the protocol provided in this embodiment of the present application, or may be used in other data transmission protocols.

[0253] In some embodiments, in the Unipro protocol, a data retransmission function is also built into the L2 layer. The following briefly describes the data retransmission mechanism defined in the Unipro protocol.

[0254] In the Unipro protocol, after the sender transmits each protocol data unit (PDU) (i.e., data packet or data packet group), the receiver determines the received data packets individually or in groups. As mentioned above, the Unipro sender also transmits data packets based on frame numbers, where the frame number value ranges from 0 to 31. In addition, a rotation mechanism is used. When data packets are grouped for determination, a group contains a maximum of 16 data packets.

[0255] It is assumed that the receiver determines the data packets for each group, and each group contains 16 data packets. After the transmitter transmits the 16 data packets of the first group, the timer corresponding to the first group is reset and starts counting, and the transmitter waits for the AFC fed back by the receiver. If the receiver does not detect the end of frame field or the CRC field, no AFC is sent. If the transmitter does not receive the AFC before the timer expires, the transmitter sends a request to the physical adapter layer and waits to receive a command. After the command is received, the NAC is sent. Then the transmitter transmits the high priority AFC and the low priority AFC, determines the data packets that need to be retransmitted, and starts retransmission.

[0256] It can be seen that in the Unipro protocol, the sender needs to wait for the acknowledgement signal sent by the receiver before sending the subsequent data packet. By comparison, according to the retransmission mechanism provided in this embodiment of the present application, after a data packet is sent, the data continues to be stored in the buffer and transmitted without waiting for the acknowledgement signal. Since the buffer mechanism is used, the data transmission efficiency is effectively improved. Moreover, when the data transmission is abnormal, the correct data packet can be directly retrieved from the buffer for retransmission, so that it can be ensured that the data is not lost, and the transmission order of the data packet remains unchanged.

[0257] The above describes the contents of the data packet structure and retransmission mechanism for transmitting data based on the protocol architecture provided in the embodiment of the present application. The following describes the data transmission method in the camera scenario, the display scenario, and the storage scenario by using the system architecture.

[0258] In some embodiments, the protocol architecture provided in the embodiments of the present application can be applied in a camera scenario, a display scenario, and a storage scenario. Thus, in the data transmission process, link multiplexing can be implemented to further reduce the circuit area and improve the data transmission efficiency.

[0259] For example, in the link structure shown in FIG. 31, the camera module, the display module, and the storage module are separately connected to a switch, and transmit data to the SOC and / or receive data transmitted by the SOC through the switch. The camera module includes, for example, a camera sensor chip. The display module includes, for example, a display driver IC (DDIC). The storage module includes, for example, a storage sensor chip. A serial interface technology is used between the modules, and includes at least two transmission lanes, for example, lane 0 and lane 1 shown in FIG. 31. Furthermore, at least one of the transmission lanes between the modules is a bidirectional transmission lane. As described above about the physical layer, differential signal lines are used for the transmission lanes between the modules (for example, lane 0+ and lane 0- are a pair of differential signal lines, and lane 1+ and lane 1- are a pair of differential signal lines). The differential signals are used for transmission instead of single-ended signals, thereby enhancing the interference resistance capability of the link. Furthermore, for the differential signal transmission technology, please refer to the prior art, and the details will not be described again here.

[0260] As shown in FIG. 32, the transmission ports between modules (eg, port A, port B, port C, and port D) include the protocol architecture provided in the embodiment of the present application.

[0261] In some embodiments, after receiving a data packet, the switch can distinguish an application scenario corresponding to the data packet based on the value of the data type field in the data packet, and send the data packet to the corresponding module, as shown in Figure 31. Optionally, the switch may alternatively refer to the physical address of each module to send the data packet to the corresponding module.

[0262] It should be noted that the data transmission detection in the camera scenario is from the camera module to the SOC, the data transmission detection in the display scenario is from the SOC to the display module, and the data transmission detection in the storage scenario is bidirectional transmission between the storage module and the SOC.

[0263] In some embodiments, at least one of the camera module, the display module, and the storage module has a data packet to be transmitted. For example, when a photo is taken by a mobile phone, the photo is displayed and stored at the same time. In this case, the lane between the SOC and the switch needs to have a link multiplexing function, as shown in FIG. 31.

[0264] In some scenarios, the maximum bandwidth of the multiplexed links between the SOC and the switch can satisfy the total bandwidth requirements for data transmission of the camera module, the display module, and the storage module. After receiving the data packet, the switch directly sends the data packet to the lane of the corresponding module based on the value of the data type field in the data packet.

[0265] In some other embodiments, the maximum bandwidth of the multiplexed links between the SOC and the switch cannot satisfy the total bandwidth requirements for data transmission of the camera module, the display module, and the storage module. In this case, the SOC and the switch sequentially transmit data packets to the switch based on the preset priority. Then, the switch transmits the data packets to the lanes of the corresponding modules based on the value of the data type field in the data packets. The preset priorities of the camera module, the display module, and the storage module in different applications may be different. The preset priorities are pre-set in the application by the application program developer. This is not particularly limited in this embodiment of the present application. For example, after the camera application takes an image, the captured image needs to be displayed first and then saved for the user to view later. Therefore, the priority of transmitting data by the display module may be pre-set higher than the priority of transmitting data by the storage module.

[0266] For example, Figure 33 is a schematic flowchart of a data transmission method according to an embodiment of the present application. Please refer to Figure 33. The method includes S101 to S105.

[0267] S101: Obtain the total transmission bandwidth and the maximum bandwidth of the multiplexed links.

[0268] In some embodiments, the total bandwidth obtained by the SOC for the data to be transmitted of the camera module, the display module, and the storage module is S0. At least one of the camera module, the display module, and the storage module has a data packet to be transmitted.

[0269] In some embodiments, the SOC obtains the maximum bandwidth of the multiplexed links as S1, which is the maximum bandwidth that can be caused by the multiplexed links.

[0270] It should be noted that before the total transmission bandwidth and the maximum bandwidth of the multiplexed links are obtained, it is necessary to determine that the parameters of the modules of the data to be transmitted in the electronic device have been set and the data transmission is possible. For example, the SOC sets the parameters of the camera module, the display module, and the storage module.

[0271] S102: The total bandwidth is less than or equal to the maximum bandwidth. If so, step S103 is executed. If not, step S105 is executed.

[0272] In some embodiments, a comparison module (e.g., a register) in the SOC compares the value of S0 with the value of S1 to determine a transmission mode. If S0≦S1, all data packets to be transmitted are transmitted simultaneously, and the switch routes the data packets to the corresponding module, i.e., step S104 is executed. If S0>S1, the data packets to be transmitted are sent in the order of the preset priority, i.e., step S105 is executed. In this way, it is avoided that data transmission may fail or data transmission efficiency may be affected when the transmission bandwidth is larger than the maximum bandwidth of the multiplexed link.

[0273] S104: The switch sends the data to the corresponding receiver based on the value of the data type field.

[0274] In some embodiments, after receiving a data packet, the switch parses the data packet header subpacket of the data packet to obtain the value of the data type field, and routes the data packet to a corresponding module based on different scenarios indicated by different values ​​of the data type field as shown in Table 2.

[0275] For example, as shown in FIGS. 34A and 34B, step S104 may be specifically implemented as steps S1041 to S10410.

[0276] S1041: The switch determines that the value of the data type field is within (01h~4Fh). If so, step S1042 is executed. If not, step S1405 is executed.

[0277] In some embodiments, after obtaining the value of the data type field, the switch determines, based on Table 2, that the value is within the value range (01h~4Fh) and the corresponding application scenario is a display scenario or a camera scenario.

[0278] S1042: The switch determines that the value of the data type field is within (01h to 1Fh). If so, step S1043 is executed. If not, step S1044 is executed.

[0279] S1043: The switch transmits data from the SOC to the display module.

[0280] S1044: The switch transmits data from the camera module to the SOC.

[0281] In some embodiments, after determining in steps S1042 to S1044 that the value of the data type field is within the value range (01h to 4Fh), the switch further determines a specific range of the value. If it is determined that the value of the data type field is within the value range (01h to 1Fh), it is determined that the scenario corresponding to the data packet is a display module, and the data is transmitted from the SOC to the display module. If the value of the data type field is not within the value range (01h to 1Fh), i.e., is within the value range (20h to 4Fh), it is determined that the scenario corresponding to the data packet is a camera scenario, and the data is transmitted from the camera module to the SOC.

[0282] S1045: The switch determines that the value of the data type field is within (50h - 7Fh). If so, step S1046 is executed. If not, step S1047 is executed.

[0283] S1046: The switch transmits data from the SOC to the storage module, or transmits data from the storage module to the SOC.

[0284] In some embodiments, after it is determined in steps S1045 and S1046 that the value of the data type field is not within the value range (01h-4Fh), the switch determines whether the value of the data type field is within the value range (50h-7Fh). If so, it is determined that the scenario corresponding to the data packet is a storage scenario, and a bidirectional data transmission is performed between the storage module and the SOC.

[0285] S1047: The switch determines that the value of the data type field is within (80h~8Fh). If so, step S1044 is executed. If not, step S1048 is executed.

[0286] In some embodiments, after determining that the value of the data type field is not within the value range (01h-4Fh) and is not within the value range (50h-7Fh), the switch determines whether the value of the data type field is within the value range (80h-8Fh) and if so, the data is transmitted from the camera module to the SOC.

[0287] S1048: The switch determines that the value of the data type field is within (90h~9Fh). If so, step S1046 is executed. If not, step S1049 is executed.

[0288] In some embodiments, after determining that the value of the data type field is not within the value range (01h-4Fh), not within the value range (50h-7Fh), and not within the value range (80h-8Fh), the switch determines whether the value of the data type field is within the value range (90h-9Fh), and if so, bidirectional data transmission is performed between the storage module and the SOC.

[0289] S1049: The switch determines that the value of the data type field is within (A0h~AFh). If so, step S1043 is executed. If not, step S10410 is executed.

[0290] S10410: The switch determines that the data packet is a reserved data packet and transmits the data in a preset manner.

[0291] In some embodiments, after determining that the value of the data type field is not within the value range (01h-4Fh), not within the value range (50h-7Fh), not within the value range (80h-8Fh), and not within the value range (90h-9Fh), the switch determines whether the value of the data type field is within the value range (A0h-AFh). If so, the data is transmitted from the SOC to the display module. If not, the data packet is determined to be a reserved data packet, and the data may be transmitted in a preset manner. The preset manner is a transmission manner predefined by a developer. For example, some values ​​of the data type field are predefined to instruct the switch to send the data to the display module.

[0292] S105: The sender sequentially transmits the data to the switch based on the preset priority. Then, step S104 is executed.

[0293] For example, it is assumed that the preset priority is the descending order of the camera module, the storage module, and the display module. The comparison module compares the value of S0 with the value of S1. If S0>S1, all data packets cannot be transmitted at the same time, and the data of each module needs to be transmitted sequentially based on the preset priority.

[0294] For example, based on the preset priority, the SOC first determines whether the camera system has data that needs to be transmitted, and transmits the data of the camera module to the SOC if the camera system has data that needs to be transmitted. If the camera system does not have data that needs to be transmitted, the SOC continues to determine whether the storage system has data that needs to be transmitted. If the storage system has data that needs to be transmitted, the data is transmitted from the SOC to the storage module, or the data is transmitted from the storage module to the SOC, based on the requirement. If the storage system does not have data that needs to be transmitted, the SOC continues to determine whether the display system has data that needs to be transmitted. If the display system has data that needs to be transmitted, the data is transmitted from the SOC to the display module.

[0295] The following describes the specific implementation of steps S103 to S105, that is, the specific data transmission method in the process of transmitting data to a receiver in different transmission scenarios.

[0296] Among several scenarios, the data transmission method provided in this embodiment of the present application may be applied to a camera scenario. For example, Figure 35 shows a data transmission method applied to a camera scenario according to an embodiment of the present application. Based on the protocol architecture shown in Figure 11, as shown in Figure 35, the method includes S201 to S211.

[0297] S201: Set parameters of the camera module and perform PRL-C state machine equalization training.

[0298] The camera module may be, for example, the camera shown in FIG. 11, or may be described as an image processing unit.

[0299] In some embodiments, the CPU completes the parameter setting of the camera module and trains the PRL-C state machine to ensure that the PRL-C parameters are stable and the lane environment and system environment are stable. This can ensure that data transmission can be performed stably in the subsequent execution process and the bit error rate is within a preset threshold. For the specific state machine equalization training process, please refer to the prior art. The details will not be described again here.

[0300] S202: The protocol layer of the camera module receives pixel data sent by the application layer of the camera module, and segments the pixel data into payload data in a byte format.

[0301] For example, as shown in Fig. 11, the application layer 1001 of the camera module obtains an image data stream, i.e., pixel data, and sends the pixel data to the protocol layer 1002. The protocol layer 1002 segments the pixel data by using pixel byte packing formats function 1101, for example, segmenting the pixel data into an 8-bit field of payload data to complete the pixel byte packing process.

[0302] S203: The protocol layer of the camera module generates a data packet header and an error correction code.

[0303] For example, as shown in FIG. 11, by using a packet header & ECC generation function 1102, based on the data packet structures shown in FIG. 16 to FIG. 22, the protocol layer 1002 of the camera module generates a data packet header and an error correction code, and adds a data packet header subpacket to the payload data subpacket. For example, as shown in FIG. 21, the protocol layer 1002 adds a data type field, a data number field, a SOF field, an EOF field, a SOL field, a VC number field, and a CRI field to the payload data. Furthermore, the field is encoded by using an ECC algorithm to form an ECC error correction field, and an ECC error correction field (ECC field of PH) is added after the field to generate the data packet header subpacket. The ECC algorithm includes, for example, an extended Hamming code algorithm. The field is encoded by using a 7-bit extended Hamming code algorithm to form a 7-bit ECC error correction field.

[0304] S204: The protocol layer of the camera module generates a CRC and a data packet footer based on the payload data.

[0305] For example, as shown in Fig. 11, the camera module protocol layer 1002 encodes the payload data by using a payload CRC & packet footer generation function 1103 to generate, for example, a 16-bit CRC field to form a data packet footer subpacket. For example, the encoding is performed by using X16+X12+X5+X0 as a polynomial to generate the CRC field. For the process of generating the CRC, please refer to the prior art, and the details will not be described again here.

[0306] It should be noted that the execution order of the functions in steps S202 to S204 is not particularly limited in this embodiment of the present application, and the data packet packing process is completed by using steps S202 to S204 in the protocol layer 1002.

[0307] S205: The protocol layer of the camera module sends the generated data packet to the physical layer of the camera module.

[0308] For example, as shown in FIG. 11, the protocol layer 1002 of the camera module transmits the generated data packets to the physical layer 1003 .

[0309] S206: The physical layer of the camera module performs lane distribution on the data packet, and sends the data packet to the physical layer at the AP end.

[0310] For example, as shown in Fig. 11, the physical layer 1003 completes the allocation of the transmission lane of the received data packet as necessary by using the logical PHY lane distribution & coding function 1104, and sends the data packet to the receiver physical layer 1006. For example, when the camera side logical physical layer lane distribution & coding function 1104 and the AP side logical physical layer lane distribution & coding function 1109 in Fig. 11 are implemented, the transmission lane of the data in each data packet is allocated through negotiation by the corresponding lane management shown in Fig. 11. For example, lane 0 is used to transmit byte 1, lane 1 is used to transmit byte 2. For the specific lane allocation process, please refer to the prior art, and the details will not be described again here.

[0311] S207: The physical layer at the AP end performs lane bonding to obtain the data packet, and sends the data packet to the protocol layer at the AP end.

[0312] For example, as shown in FIG. 11, after receiving a data packet, the physical layer of the receiver (i.e., AP side) combines data of multiple lanes as necessary by using a logical PHY lane distribution & coding function 1109, and then sends the obtained data packet to the protocol layer 1005.

[0313] S208: The protocol layer at the AP end performs CRC verification on the data packet header.

[0314] For example, as shown in FIG. 11, the protocol layer 1005 of the AP determines whether an error occurs in the data packet header subpacket information by using a packet header correction & report function 1110. For example, a data type field, a data number field, a SOF field, an EOF field, a SOL field, a VC number field, and a CRI field are added to the payload by ECC decoding. Furthermore, the fields are encoded by using the same encoding rule as that in the transmitter to form a 7-bit ECC′ error correction field, and then an exclusive OR operation is performed on the ECC and ECC′. If the result is 0, it indicates that the packet header information is correct, and then the data packet header field is unpacked. If the result is not 0 and the XOR result indicates that a 1-bit error exists, error correction may be performed on the error bit indicated by the XOR result, and then the packet header subpacket is unpacked. Furthermore, another XOR result indicates that an uncorrectable error (e.g., the number of error bits is 2 bits or more) occurs in the packet header of the data packet. In this case, a preset error handling solution is executed for the erroneous data packet, for example, the erroneous data packet is discarded, the erroneous data packet is skipped, or the erroneous data packet is retransmitted. The specific solution may be preset in the system by researchers and developers.

[0315] S209: The protocol layer at the AP end removes the packet header of the data packet.

[0316] For example, as shown in FIG. 11, if the AP's protocol layer 1005 determines that the packet header of the data packet is error-free or has had errors removed by using the packet header correction and reporting function 1110, the protocol layer removes the packet header of the data packet.

[0317] S210: The protocol layer at the AP end checks the payload data of the data packet and removes the packet footer.

[0318] For example, as shown in FIG. 11, the protocol layer 1005 of the AP checks the payload data based on a payload error check & report function 1111 by using a CRC field in the data packet to determine whether the payload data is transmitted correctly. For example, based on the payload error check & report function 1111, the CRC field in the data packet is divided by a modulo 2 polynomial X16+X12+X15+X0. If the remainder is 0, it indicates that the received payload data is correct data. If the remainder is not 0, the received payload data is erroneous data. In this case, a preset error handling solution is performed on the erroneous data packet. For example, the erroneous data packet is discarded, the erroneous data packet is skipped, or the erroneous data packet is retransmitted. The specific solution may be preset by researchers and developers in the system.

[0319] Furthermore, as shown in FIG. 11, after the payload data is determined to be normal by using the payload error checking and reporting function 1111, the packet footer of the data packet is removed.

[0320] S211: The protocol layer at the AP end converts the payload data in byte format into pixel data, and sends the pixel data to the application layer.

[0321] For example, as shown in FIG. 11, the protocol layer 1005 converts the payload data in units of 8-bit fields into pixel data by using a byte to pixel unpacking formats function 1112, and sends the pixel data to the application layer 1004 of the AP to complete the data transmission process.

[0322] It should be noted that the physical layer of the transmitter and receiver supports a transmission rate of 16Gbps / lane or more, supports 128B / 132B codec, and supports lane distribution and combining functions. The execution order of the functions in steps S208 to S211 is not particularly limited in this embodiment of the present application, and the data packet unpacking process is completed by using steps S208 to S211 in the protocol layer 1005.

[0323] For example, by using a data transmission method as shown in Fig. 14, the camera module can transmit data to the SOC through a high-speed transmission interface. In the structure of the PRL-C image transmission system shown in Fig. 36, a data lane and a clock lane are established between the PRL-C transmitter module and the PRL-C receiver module in the camera module to transmit data. In addition, a serial clock line (SDA) and a serial data line (SDA) are established between the control interface of the primary device (e.g., SOC) and the control interface of the secondary device (e.g., camera module) to set parameters of the camera module.

[0324] Therefore, the data transmission method provided in this embodiment of the present application is applied to the camera scenario, and can meet the user's quality requirements for the captured image and ensure transmission efficiency. Furthermore, the line layout of the circuit is not increased, and the user's requirements for light and thin electronic devices, such as the trend of light and thin design of mobile phones, are met. For example, the camera scenario includes scenarios with strict requirements for imaging quality, such as Vlog, short video, live broadcast of large-scale games, and AR.

[0325] Among other scenarios, the data transmission method provided in this embodiment of the present application may be applied to a display scenario. For example, Figure 37 shows a data transmission method applied to a display scenario according to an embodiment of the present application. Based on the protocol architecture shown in Figure 12, as shown in Figure 37, the method includes S301 to S311.

[0326] S301: Set parameters of the display module and perform PRL-D state machine equalization training.

[0327] The display module is, for example, a DDIC as shown in FIG. 12, or may be described as an image display unit.

[0328] In some embodiments, the CPU completes the parameter setting of the display module and trains the PRL-D state machine to ensure that the PRL-D parameters are stable. This can ensure that data transmission can be stably performed in the subsequent execution process. For the specific state machine equalization training process, please refer to the prior art. The details will not be described again here.

[0329] S302: The protocol layer at the AP end receives pixel data sent by the application layer at the AP end, and segments the pixel data into payload data in a byte format.

[0330] For example, as shown in Fig. 12, an application layer 1001 at an AP end obtains an image data stream, i.e., pixel data, and sends the pixel data to a protocol layer 1002. The protocol layer 1002 segments the pixel data by using a pixel byte packing format function 1101, for example, segments the pixel data into an 8-bit field of payload data, and completes the pixel byte packing process.

[0331] S303: The protocol layer at the AP end generates a data packet header and an error correction code.

[0332] For example, as shown in Figure 12, by using the packet header and error correction code generation function 1102, based on the data packet structure shown in Figure 16 to Figure 22, the protocol layer 1002 at the AP end generates a data packet header and an error correction code, and adds a data packet header subpacket to the payload data subpacket. For example, as shown in Figure 21, the protocol layer 1002 adds a data type field, a data number field, a SOF field, an EOF field, a SOL field, a VC number field, and a CRI field to the payload data. Furthermore, the fields are encoded by using a 7-bit extended Hamming code to form a 7-bit ECC error correction field, and the 7-bit ECC error correction field (ECC field of PH) is added last to generate a data packet header subpacket.

[0333] S304: The protocol layer at the AP end generates a CRC and a data packet footer based on the payload data.

[0334] For example, as shown in Fig. 12, the protocol layer 1002 at the AP end encodes the payload data by using the payload CRC and packet footer generation function 1103 to generate, for example, a 16-bit CRC field to form a data packet footer subpacket. For example, the encoding is performed by using X16+X12+X5+X0 as a polynomial to generate the CRC field. For the process of generating the CRC, please refer to the prior art, and the details will not be described again here.

[0335] The data packet generation process is then completed by using three modules in the protocol layer.

[0336] It should be noted that the execution order of the functions in steps S302 to S304 is not particularly limited in this embodiment of the present application, and the data packet packing process is completed by using steps S302 to S304 in the protocol layer 1002.

[0337] S305: The protocol layer at the AP end sends the generated data packet to the physical layer at the AP end.

[0338] For example, as shown in FIG. 12, the protocol layer 1002 at the AP end sends the generated data packet to the physical layer 1003 .

[0339] S306: The physical layer at the AP end performs lane distribution on the data packets, and sends the data packets to the physical layer of the display module.

[0340] For example, as shown in Figure 12, after receiving a data packet, the AP side physical layer 1003 completes the allocation of the transmission lane of the data packet as necessary by using the logical physical layer lane distribution and coding function 1104, and sends the data packet to the DDIC side physical layer 1006. For the specific lane allocation process, please refer to the prior art, and the details will not be described again here.

[0341] S307: The physical layer of the display module performs lane bonding to obtain a data packet, and sends the data packet to the protocol layer of the display module.

[0342] For example, as shown in FIG. 12, after receiving a data packet by the logical physical layer lane distribution and coding function 1109, the physical layer 1006 of the display module (i.e., DDIC) combines the data of multiple lanes, if necessary, and then sends the obtained data packet to the protocol layer 1005.

[0343] S308: The protocol layer of the display module performs a CRC verification on the data packet header.

[0344] For example, as shown in FIG. 12, the protocol layer 1005 of the display module determines whether an error occurs in the data packet header subpacket information by using a packet header correction & report function 1110. For example, a data type field, a data number field, a SOF field, an EOF field, a SOL field, a VC number field, and a CRI field are added to the payload by ECC decoding. Further, the fields are encoded by using the same encoding rule as that in the transmitter to form a 7-bit ECC′ error correction field, and then an exclusive OR operation is performed on the ECC and ECC′. If the result is 0, it indicates that the packet header information is correct, and then the data packet header field is unpacked. If the result is not 0 and the XOR result indicates that a 1-bit error exists, error correction may be performed on the error bit indicated by the XOR result, and then the packet header subpacket is unpacked. Furthermore, other XOR results indicate that an uncorrectable error (e.g., the number of error bits is more than one bit) occurs in the packet header of the data packet. In this case, a preset error handling solution is performed on the erroneous data packet. For example, the erroneous data packet is discarded, the erroneous data packet is skipped, or the erroneous data packet is retransmitted. The specific solution may be preset by researchers and developers in the system.

[0345] S309: The protocol layer of the display module removes the packet header of the data packet.

[0346] For example, as shown in FIG. 12, if the protocol layer 1005 of the display module determines that the packet header of the data packet is error-free or has had errors removed by using the packet header correction and reporting function 1110, the protocol layer removes the packet header of the data packet.

[0347] S310: The protocol layer of the display module checks the payload data of the data packet and removes the packet footer.

[0348] For example, the protocol layer 1005 of the display module checks the payload data by using a payload error check & report function 1111 and a CRC field in the data packet to determine whether the payload data is transmitted correctly. For example, the payload error check & report function 1111 is used to divide the CRC field in the data packet by a modulo 2 polynomial X16+X12+X15+X0. If the remainder is 0, it indicates that the received payload data is correct data. If the remainder is not 0, the received payload data is erroneous data. In this case, a preset error handling solution is performed on the erroneous data packet. For example, the erroneous data packet is discarded, the erroneous data packet is skipped, or the erroneous data packet is retransmitted. The specific solution may be preset by researchers and developers in the system.

[0349] Furthermore, as shown in FIG. 12, after the payload data is determined to be normal by using the payload error checking and reporting function 1111, the packet footer of the data packet is removed.

[0350] S311: The protocol layer of the display module converts the payload data in byte format into pixel data, and sends the pixel data to the application layer.

[0351] For example, as shown in FIG. 12, the protocol layer 1005 of the display module converts the payload data in units of 8-bit fields into pixel data by using a byte to pixel unpacking formats function 1112, and sends the pixel data to the application layer 1004 of the display module to complete the data transmission process.

[0352] It should be noted that the execution order of the functions in steps S308 to S311 is not particularly limited in this embodiment of the present application, and the data packet unpacking process is completed by using steps S308 to S311 in the protocol layer 1005.

[0353] For example, by using a data transmission method as shown in FIG. 14, the SOC can transmit data to the display module C through a high-speed transmission interface.

[0354] Therefore, the data transmission method provided in this embodiment of the present application can be applied to display scenarios to meet the high-speed data transmission requirements of display systems, thereby implementing high-definition and ultra-high-definition displays.

[0355] Among other scenarios, the data transmission method provided in this embodiment of the present application may be applied to a storage scenario. For example, Figure 38 shows a data transmission method applied to a storage scenario according to an embodiment of the present application. Based on the protocol architecture shown in Figure 13, as shown in Figure 38, the method includes S401 to S411.

[0356] S401: Set parameters of device B and perform PRL-S state machine equalization training.

[0357] Device A and device B may be, for example, device A and device B shown in FIG. 13, or may be described as a storage module and a SOC. Bidirectional data transmission may be implemented between device A and device B.

[0358] In some embodiments, device A sends data to device B, and device A completes parameter configuration of device B. For example, device A generates a parameter setting control packet based on a parameter setting requirement, and sends the parameter setting control packet to device B through link management. Device B sets corresponding parameters based on the parameter setting control packet, completes the configuration, and feeds back the configuration result to device A, thereby completing the configuration process. It should be noted that in the parameter setting process, an example in which device A sends data to device B is used for description. Thus, device A sets parameters of device B. Therefore, correspondingly, the parameter setting process is also applicable to a scenario in which device B sends data to device A. In this case, device B needs to set parameters of device A.

[0359] In addition, the PRL-S state machine needs to be further trained to ensure that the parameters of the PRL-S state machine are stable. This can ensure that data transmission can be stably performed in the subsequent execution process. For the specific state machine equalization training process, please refer to the prior art. The details will not be described again here.

[0360] S402: The protocol layer of device A receives a message sent by the application layer of device A, and segments the message to generate payload data.

[0361] For example, as shown in Fig. 13, an application layer 1001 of device A obtains application data (which may also be described as a data message) and sends the data message to a protocol layer 1002. The protocol layer 1002 segments the data message by using a message segmentation and reassembly function 1301. Specifically, the data message is decomposed into one or more data packets based on different lengths, and the length of the decomposed data packets cannot exceed a specified maximum value. The maximum value may be obtained experimentally or specified in a protocol, or may be an experimental value.

[0362] S403: The protocol layer of device A generates a data packet header.

[0363] For example, as shown in Figure 13, by using packet header generation and parsing function 1302, based on the data packet structures shown in Figures 16 to 22, protocol layer 1002 of device A generates a data packet header and adds a data packet header subpacket to the payload data subpacket. For example, as shown in Figure 18, the protocol layer adds a data type field, a number of data field, an EOM field, a frame number field, and a reserved field to the payload data to generate a data packet header subpacket.

[0364] S404: The protocol layer of device A generates a CRC and a data packet footer based on the payload data, and generates a data packet.

[0365] For example, as shown in Fig. 13, the protocol layer 1002 of device A encodes the payload data by using a CRC generation & check function 1303 to generate a 16-bit CRC field to form a data packet footer subpacket. For example, the encoding is performed by using X16+X12+X5+X0 as a polynomial to generate the CRC field. For the process of generating the CRC, please refer to the prior art, and the details will not be described again here.

[0366] It should be noted that the execution order of the functions in steps S402 to S404 is not particularly limited in this embodiment of the present application, and the data packet packing process is completed by using steps S402 to S404 in the protocol layer 1002.

[0367] S405: The protocol layer of device A performs data retransmission and flow control based on the bidirectional transmission status.

[0368] For example, as shown in FIG. 13, the protocol layer 1002 of device A performs data retransmission and traffic control by using a data retransmission & traffic control function 1305 based on a bidirectional transmission state.

[0369] S406: The physical layer of device A receives the data packet sent by the protocol layer of device A, performs lane distribution on the data packet, and sends the data packet to the physical layer of device B.

[0370] For example, as shown in FIG. 13, a logical PHY lane distribution & coding function 1104 After receiving the data packet sent by the protocol layer 1002, physicsThe layer 1003 completes the allocation of transmission lanes for the data packets as necessary, and sends the data packets to the physical layer 1006 of device B. For the specific lane allocation process, please refer to the prior art, and the details will not be described again here.

[0371] S407: The physical layer of device B performs lane bonding to obtain the data packet, and sends the data packet to the protocol layer of device B.

[0372] For example, as shown in FIG. 13, after receiving a data packet by using a logical PHY lane distribution & coding function 1109, the physical layer 1006 of device B combines the data of multiple lanes as necessary, and then sends the obtained data packet to the protocol layer 1005.

[0373] S408: The protocol layer of device B parses and disassembles the data packet header, and removes the packet header.

[0374] For example, as shown in FIG. 13, the protocol layer 1005 of device B parses and disassembles the data packet header by using a packet header generation & parsing function 1310 to remove the data packet.

[0375] S409: The protocol layer of the device B checks the payload data of the data packet and removes the packet footer.

[0376] For example, the protocol layer 1005 of the device B checks the payload data based on a CRC generation & check function 1311 by using a CRC field in the data packet to determine whether the payload data is transmitted correctly. For example, based on the CRC generation & check function 1311, the CRC field in the data packet is divided by a modulo 2 polynomial X16+X12+X15+X0. If the remainder is 0, it indicates that the received payload data is correct data. If the remainder is not 0, the received payload data is erroneous data. In this case, a preset error handling solution is performed on the erroneous data packet. For example, the erroneous data packet is discarded, the erroneous data packet is skipped, or the erroneous data packet is retransmitted. A specific solution may be preset by researchers and developers in the system.

[0377] S410: The protocol layer of device B performs data retransmission and traffic control based on the bidirectional transmission state, and returns a corresponding data packet.

[0378] For example, as shown in FIG. 13, the protocol layer of device B performs data retransmission and traffic control by using a data retransmission & traffic control function 1313 based on the bidirectional transmission status.

[0379] S411: The protocol layer of device B combines the received data and sends the combined data to the application layer of device B.

[0380] Further, as shown in FIG. 13, the protocol layer 1005 of device B combines the received payload data by using a message segmentation and reassembly function 1309 to package the received payload data into a big data message that can be received by the physical layer, and sends the data message to the application layer 1004 to complete the data transmission process.

[0381] It should be noted that the execution order of the functions in steps S408 to S411 is not particularly limited in this embodiment of the present application, and the data packet unpacking process is completed by using steps S408 to S411 in the protocol layer 1005.

[0382] For example, by using a data transmission method as shown in FIG. 14, bidirectional data transmission can be implemented between the storage module and the SOC through the high-speed transmission interface.

[0383] Therefore, the data transmission method provided in this embodiment of the present application can be applied to high-speed storage scenarios and support high-speed data transmission of 16 Gbit / s on the signal lane. Data storage at higher speeds is implemented in the limited space of electronic devices. Furthermore, a corresponding physical layer adaptation circuit may be added and arranged with other SerDes-based physical layer circuits to implement high-speed data storage. In this way, the protocol architecture provided in this embodiment of the present application can be applied to fields such as high-speed data collection, video image processing, modem communication, satellite remote sensing measurement, and real-time data calculation, and can meet the requirements of the above scenarios for high-speed and large-capacity data transmission and storage.

[0384] In some scenarios, the electronic device has a low requirement for transmission bandwidth. For example, a smart watch has a low requirement for transmission bandwidth. Alternatively, the internal space of the electronic device is large enough to allow a large number of interconnection interface lines between components in the electronic device. Huawei Vision is used as an example. Although a high bandwidth is required for display, a single-lane low-speed interface technology may be used due to the large internal space. In this case, although there are a large number of cables, the cost caused by the high-speed interface may be reduced. In other words, optionally, when the electronic device has a low bandwidth requirement or a large internal space, a relatively low-speed PHY layer technology may be applied to the physical layer to reduce the transmission cost. It should be noted that although a relatively low-speed physical layer can ensure that a low bandwidth is provided, the physical layer can still perform the functions implemented by the physical layer in the protocol architecture provided in the embodiment of the present application. Furthermore, the functions of the application layer and the protocol layer based on the low-speed physical layer are also the same as the functions implemented by the application layer and the protocol layer in the protocol architecture provided in the embodiment of the present application.

[0385] For example, Figure 39 shows a data transmission method according to an embodiment of the present application. As shown in Figure 39, the method includes S501 to S507.

[0386] S501: The parameters of device B are set.

[0387] In some embodiments, device A sets the parameters of device B through link management. For specific setting methods and supplementary explanations, please refer to the relevant description of step S401. Details will not be described again here.

[0388] S502: Perform PRL-C, PRL-D, or PRL-S state machine equalization training.

[0389] S503: The protocol layer of device A generates a data packet corresponding to PRL-C, PRL-D, or PRL-S.

[0390] S504: The physical layer of device A receives the data packet sent by the protocol layer of device A, performs lane distribution on the data packet, and sends the data packet to the physical layer of device B.

[0391] S505: The physical layer of device B performs lane bonding to obtain the data packet.

[0392] S506: The data packet header is unpacked by using PRL-C, PRL-D, or PRL-S.

[0393] S507: Device B sends the processed data to the application layer of device B.

[0394] For specific implementation of steps S502 to S507, please refer to the relevant contents of steps S201 to S211, steps S301 to S311, or steps S401 to S411 according to different application scenarios, and the details will not be described again here.

[0395] For example, Figure 40 is a schematic diagram of a data transmission method according to an embodiment of the present application. As shown in Figure 40, the method includes S4001 to S4004.

[0396] S4001: The first transmission unit, in the protocol layer of the first transmission unit, packs data to be transmitted in the application layer of the first transmission unit to generate a data packet.

[0397] For example, in a camera scenario, the first transmission unit is, for example, a camera module, and the second transmission unit is, for example, a SOC. In a display scenario, the first transmission unit is, for example, a SOC, and the second transmission unit is, for example, a DDIC. In a storage scenario, the first transmission unit is, for example, a storage module, and the second transmission unit is, for example, a SOC. Alternatively, the first transmission unit is, for example, a SOC, and the second transmission unit is, for example, a storage module.

[0398] In some embodiments, in the packing process, the first transmission unit uses a data type field included in the data packet header subpacket to indicate an application scenario of the currently transmitted data packet, for example, the application scenario includes, for example, a camera scenario, a display scenario, or a storage scenario.

[0399] Optionally, for the data packet structure, please refer to the related contents shown in Figures 16 to 20. For the packing process, please refer to the related contents described in steps S202 to S204 shown in Figure 35. Alternatively, for the packing process, please refer to the related contents described in steps S302 to S304 shown in Figure 37. Alternatively, for the packing process, please refer to the related contents described in steps S402 to S405 shown in Figure 38. Alternatively, for the packing process, please refer to the related contents described in step S503 shown in Figure 39. Details will not be described again here.

[0400] S4002: The first transmission unit transmits a data packet to the physical layer of the first transmission unit through the protocol layer of the first transmission unit.

[0401] Optionally, for a process in which the protocol layer of the transmitter transmits the data packet generated by packing to the physical layer, please refer to the relevant content described in step S205 shown in FIG. 35. Alternatively, for the packing process, please refer to the step S205 shown in FIG. S Please refer to the related contents described in step S305 for the packing process. Alternatively, please refer to the related contents described in step S406 shown in Fig. 38 for the packing process. Alternatively, please refer to the related contents described in step S505 shown in Fig. 39 for the packing process. Details will not be described again here.

[0402] S4003: The first transmission unit transmits the data packet to the second transmission unit through the physical layer of the first transmission unit.

[0403] Optionally, for specific implementation methods of the data transmission process, please refer to the related contents shown in Figure 33 and Figure 34A and Figure 34B. Alternatively, the data transmission process can be performed by the steps shown in Figure 35. S Please refer to the related contents described in steps S206 and S207. Alternatively, the data transmission process may be performed in the steps shown in FIG. S Please refer to the related contents described in steps S306 and S307. Alternatively, the data transmission process may be performed in the steps shown in FIG. S Please refer to the related contents described in steps S406 and S407. Alternatively, the data transmission process may be performed in the steps shown in FIG. S Please refer to the relevant contents described in 504 and step S505. For the data transmission method in the data transmission process, please refer to the relevant contents shown in Figure 23 to Figure 30. The details will not be described again here.

[0404] S4004: The second transmission unit, at the protocol layer of the second transmission unit, unpacks the data packet received by the physical layer of the second transmission unit, and sends the obtained data to the application layer of the second transmission unit.

[0405] Optionally, for the unpacking process, please refer to the relevant contents described in step S211 shown in Figure 35. Alternatively, for the unpacking process, please refer to the relevant contents described in steps S308 to S311 shown in Figure 37. Alternatively, for the unpacking process, please refer to the relevant contents described in steps S408 to S411 shown in Figure 38. Alternatively, for the packing process, please refer to the relevant contents described in steps S506 and S507 shown in Figure 39. Details will not be described again here.

[0406] Therefore, according to the data transmission method provided in this embodiment of the present application, the transmission units in the electronic devices can perform data transmission by using the same data transmission protocol and the same data packet structure. Furthermore, the data type information carried in the data packet indicates the current application scenario of the data packet, thereby improving the data transmission efficiency.

[0407] For example, FIG. 41 is a schematic diagram of another data transmission method according to an embodiment of the present application. 41 As shown in FIG. 1, the method includes S4101 to S4105.

[0408] S4101: The first transmission unit stores a data packet to be transmitted in a buffer of the first transmission unit.

[0409] Optionally, step S 4101For this, please refer to the relevant contents described in step 1-1 shown in Figure 27A and Figure 28, or refer to the relevant contents described in step 2-1 shown in Figure 29A and Figure 30. Details will not be described again here.

[0410] S4102: The first transmission unit sends a first data packet to the second transmission unit and starts a timer.

[0411] Optionally, step S 4102 For details, please refer to the relevant contents described in step 1-2 shown in Figure 27A and Figure 28, or refer to the relevant contents described in step 2-2 shown in Figure 29A and Figure 30. Details will not be described again here.

[0412] S4103: The second transmission unit receives the first data packet, and stores the first data packet in a buffer of the second transmission unit.

[0413] Optionally, step S 4103 For details, please refer to the relevant contents described in steps 1-3 shown in Figures 27A and 28, or refer to the relevant contents described in steps 2-3 shown in Figures 29A and 30. Details will not be described again here.

[0414] A buffer is configured in each of the first transmission unit and the second transmission unit, and when a data packet needs to be buffered, the data packet is buffered in each of the buffers.

[0415] S4104: If the timer has not expired and the size of the remaining free space in the buffer of the first transmission unit is greater than or equal to the size of the second data packet to be transmitted, the first transmission unit transmits the second data packet to the second transmission unit and restarts the timer.

[0416] S4105: The second transmission unit receives the second data packet, and stores the second data packet in a buffer of the second transmission unit.

[0417] In some embodiments, in steps S4104 and S4105, if the size of the remaining space in the buffer of the first transmission unit can be used to buffer the data packet to be transmitted next, the data packet is still transmitted. Furthermore, a timer is configured in the data link layer of the first transmission unit. Each time a data packet is transmitted, the timer is refreshed to restart timing until all data packets are transmitted.

[0418] Optionally, the first transmission unit is further configured to perform the steps performed by the transmitter in Figures 27A to 30, and the second transmission unit is further configured to perform the steps performed by the receiver in Figures 27A to 30. Details are not described again here.

[0419] In this way, the first transmission unit uses a buffer mechanism to transmit subsequent data packets without waiting for the second transmission unit to feed back a response signal, thereby improving data transmission efficiency.

[0420] It should be noted that the order of performing step S4103 and step S4104 is not particularly limited in this embodiment of the present application. For example, step S4104 is performed first, and then step S4103 is performed. Specifically, when the second transmission unit does not receive the first data packet, the first transmission unit may send the next data packet.

[0421] The above has described in detail the data transmission method provided in the embodiment of the present application. The following will describe in detail the data transmission device provided in the embodiment of the present application with reference to FIG.

[0422] In a possible design, FIG. 42 is a schematic diagram of the structure of a data transmission device according to this embodiment of the present application. The data transmission device may be configured to implement the method described in the above method embodiment. For example, FIG. 42 As shown, the data transmission device 4200 includes a processing module 4201 and a transceiver module 4202 .

[0423] Optionally, the processing module 4201 is configured to assist the data transmission device 4200 in performing steps S4001 and S4002 of FIG. 40 and / or to assist the data transmission device 4200 in performing step S4101 of FIG. 41 and / or other processes of the techniques described herein.

[0424] Optionally, the transceiver module 4202 is configured to assist the data transmission device 4200 in performing step S4003 of FIG. 40 and / or to assist in performing steps S4102 and S4104 of FIG. 41 and / or other processes of the techniques described herein.

[0425] All relevant contents of the steps in the method embodiments may be cited in the functional descriptions of the corresponding functional modules, and the details will not be described again here.

[0426] Optionally, the data transmission device 4200 shown in FIG. 42 may further include a storage unit (not shown in FIG. 42), which stores programs or instructions. When the processing module 4201 and the transceiver module 4202 execute the programs or instructions, the data transmission device 4200 shown in FIG. 42 can perform the data transmission method in the method embodiment.

[0427] Optionally, the transceiver module may include a receiving module and a transmitting module. The receiving module is configured to receive the feedback signal sent by the second transmission unit. The transmitting module is configured to transmit data to the second transmission unit. The specific implementation of the transceiver module is not particularly limited in this embodiment of the present application.

[0428] For the technical effects of the data transmission device 4200 shown in Figure 42, please refer to the technical effects of the data transmission method in the method embodiment. The details will not be described again here.

[0429] An embodiment of the present application further provides a chip system including a processor, the processor being coupled to a memory, the memory being configured to store a program or instruction, and when the program or instruction is executed by the processor, the chip system can perform the method in any one of the above method embodiments.

[0430] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor and is implemented by reading software code stored in a memory.

[0431] Optionally, one or more memories may also be present in the chip system. The memory may be integrated with the processor or may be located separately from the processor. This is not limited in the embodiments of the present application. For example, the memory may be a non-transitory processor, read-only memory ROM. The memory and the processor may be integrated on the same chip or may be located separately on different chips. The type of memory and the method of setting the memory and the processor are not particularly limited in the embodiments of the present application.

[0432] For example, the chip system may be a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a system on chip (SoC), a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), or a programmable logic device (PLD), or other integrated chip.

[0433] It should be understood that the steps in the above method embodiments may be implemented by using hardware integrated logic circuitry in a processor or by using instructions in the form of software. The steps of the methods disclosed with reference to the embodiments of the present application may be directly executed by a hardware processor, or may be executed by a combination of hardware and software modules in a processor.

[0434] An embodiment of the present application further provides a storage medium configured to store instructions for use by the above communication device.

[0435] The embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed on a server, the server can execute the above-mentioned related method steps to implement the data transmission method in the above-mentioned embodiment.

[0436] The embodiments of the present application further provide a computer program product, which, when executed on a computer, can cause the computer to execute the relevant steps above to implement the data transmission method in the above embodiments.

[0437] Furthermore, the embodiment of the present application further provides an apparatus. The apparatus may be specifically a component or a module, and the apparatus may include one or more processors and a memory connected to each other. The memory is configured to store a computer program, and the one or more computer programs include instructions. When the instructions are executed by the one or more processors, the apparatus can perform the data transmission method in the above method embodiment.

[0438] The apparatus, computer readable storage medium, computer program product, or chip provided in the embodiments of the present application are configured to execute the corresponding method provided above. Therefore, for the advantageous effects that can be achieved, please refer to the advantageous effects in the corresponding method provided above. Details will not be described again here.

[0439] The method and algorithm steps described in conjunction with the contents disclosed herein may be implemented by hardware or may be implemented by a processor by executing software instructions. The software instructions may include corresponding software modules. The software modules may be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a hard disk, a removable hard disk, a compact disk read-only memory (CD-ROM), or any other form of storage medium well known in the art. For example, the storage medium is coupled to the processor such that the processor can read information from the storage medium and write information to the storage medium. Indeed, the storage medium may alternatively be a component of the processor. The processor and the storage medium may reside in an application-specific integrated circuit (ASIC).

[0440] Based on the description of the implementation, it is obvious to those skilled in the art that for convenience and concise description, the above division into functional modules is merely used as an example for description. In actual application, functions may be assigned to different functional modules for implementation based on requirements. In other words, the internal structure of the device is divided into different functional modules to implement all or part of the functions described above. For detailed operation processes of the above systems, devices and units, please refer to the corresponding processes in the above method embodiments, and the details will not be described again here.

[0441] It should be understood that in some embodiments provided in the present application, the disclosed methods may be implemented in other ways. For example, the above device embodiments are merely examples. For example, the module or unit division is merely a logical functional division. In actual implementation, other division methods may be used. For example, multiple units or components may be combined or integrated into other systems, or some features may be ignored or not implemented. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be implemented by some interfaces. Indirect couplings or communication connections between modules or units may be implemented in electrical, mechanical, or other forms.

[0442] The units described as separate parts may or may not be physically separated, and the parts shown as units may or may not be physical units, and may be located in one place or distributed among multiple network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.

[0443] Furthermore, the functional units in the embodiments of the present application may be integrated into one processing unit, or each of the units may exist physically alone, or two or more units may be integrated into one unit. The integrated units may be implemented in the form of hardware or software functional units.

[0444] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, the integrated unit may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be essentially implemented in the form of a software product, or the part that contributes to the prior art, or all or part of the technical solution. The computer software product is stored in a storage medium and includes some instructions for instructing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the method described in the embodiments of the present application. The storage medium includes any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0445] The above description is merely a specific implementation of the present application, and is not intended to limit the scope of protection of the embodiments of the present application. Any modifications or replacements within the technical scope disclosed in the embodiments of the present application should be within the scope of protection of the embodiments of the present application. Therefore, the scope of protection of the present application should be subject to the scope of protection of the claims.

[0446] This application claims priority to Chinese Patent Application No. 202011263644.1, entitled "NEW STORAGE DATA TRANSMISSION STRUCTURE," filed with the State Intellectual Property Office of the People's Republic of China on November 12, 2020, and Chinese Patent Application No. 202011496824.4, entitled "DATA TRANSMISSION METHOD AND ELECTRONIC DEVICE," filed with the State Intellectual Property Office of the People's Republic of China on December 17, 2020. These Chinese applications are incorporated herein by reference in their entireties.

Claims

1. 1. A data transmission method, comprising: Packing data to be transmitted of an application layer of the first transmission unit at a protocol layer of the first transmission unit to generate a data packet, the data packet including data type information, the data type information indicating an application scenario of the data packet, the application scenario including any one of a camera scenario, a display scenario, and a storage scenario; transmitting, by the first transmission unit, the data packet through the protocol layer of the first transmission unit to a physical layer of the first transmission unit; transmitting, by the first transmission unit, the data packet to a second transmission unit through the physical layer of the first transmission unit; The method according to claim 1,

2. data packet types of the data packets include long packets and short packets, the long packets including a data packet header subpacket, a payload data subpacket, and a data packet footer subpacket, and the short packets including the data packet header subpacket and the data packet footer subpacket; The method of claim 1.

3. the data type information is carried in a data type field in the data packet header subpacket, a first value of the data type field indicating that the application scenario is the display scenario and that the data packet is a short data packet or a long data packet. The method of claim 2.

4. the data type information is carried in a data type field in the data packet header subpacket, a second value of the data type field indicating that the application scenario is the camera scenario and that the data packet is a short control packet or a long data packet. The method of claim 2.

5. the data type information is carried in a data type field in the data packet header subpacket, and a third value of the data type field indicates that the application scenario is the storage scenario and that the data packet is one of a short acknowledgement (ACK) packet, a short negative acknowledgement (NACK) packet, a long data packet, and a long control packet. The method of claim 2.

6. The step of generating a data packet by packing data to be transmitted of an application layer of the first transmission unit in a protocol layer of the first transmission unit by the first transmission unit includes: receiving, by the first transmission unit, at the protocol layer of the first transmission unit, the data to be transmitted that is sent by the application layer of the first transmission unit; Segmenting the data to be transmitted by the first transmission unit at the protocol layer of the first transmission unit to generate payload data, and generating a data packet header, a cyclic redundancy check (CRC) code, and a data packet footer, and generating the data packet after packing the payload data, the data packet header, and the data packet footer. having The data packet footer includes a CRC field indicating the CRC code.

6. The method according to any one of claims 1 to 5.

7. 1. An electronic device having a processor and a memory, the memory is coupled to the processor; the memory is configured to store program instructions; When the processor executes the program instructions, the electronic device is capable of carrying out the data transmission method according to any one of claims 1 to 6. Electronic devices.

8. A chip system having a processor and a memory, the processor is coupled to a memory, the memory storing program instructions; When the program instructions stored in the memory are executed by the processor, the program instructions cause the processor to perform a data transmission method according to any one of claims 1 to 6. Chip system.

9. having program instructions, When the program instructions are executed, a data transmission method according to any one of claims 1 to 6 is performed. A computer-readable storage medium.

10. 1. A computer program having instructions, comprising: When said computer program is executed on an electronic device, said electronic device is capable of carrying out the data transmission method according to any one of claims 1 to 6. Computer program.

Citation Information

Patent Citations

  • Terminal device and hidden channel communication method and device

    CN106657136A

  • Short packet communication in power line communication network

    JP2016540398A

  • Data transmission method, sending node, receiving node, and data transmission system

    US20180295555A1

  • Communication device, communication method, and program

    WO2020129685A1

  • Communication device, communication method, and program

    WO2020166378A1