Data transmission method and device

CN120359771APending Publication Date: 2025-07-22YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380085823.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

The prior art is difficult to effectively use a fixed bandwidth link to transmit data of multiple data streams or variable rate data streams, resulting in low data transmission efficiency and high cost.

Method used

By allocating bandwidth to each data stream on the communication interface of the first electronic device, and determining the size of the data packet to be sent for each data stream based on the bandwidth, making it a fixed value, and then data is transmitted using a fixed bandwidth link.

Benefits of technology

It realizes efficient transmission of multiple data streams or variable rate data streams on a fixed bandwidth link, improving transmission efficiency and reducing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120359771A_ABST
    Figure CN120359771A_ABST
Patent Text Reader

Abstract

A data transmission method and device can be applied to the field of automatic driving, intelligent driving or unmanned driving. In the embodiment of the invention, a communication interface of first electronic equipment is at least used for sending to-be-sent data packets of M data streams, and M is an integer greater than or equal to 1. The first data stream is one of the M data streams, the size of a to-be-sent data packet of the first data stream is a first target value, the first target value is associated with the target bandwidth of the first data stream, and the target bandwidth is smaller than or equal to the bandwidth of the communication interface. A communication interface sends M data streams, and the size of a to-be-sent data packet of each data stream is a fixed value, for example, the size of a to-be-sent data packet of a first data stream is a first target value. Therefore, the M data streams can be subjected to data transmission through the interface with the fixed bandwidth, the data transmission efficiency is improved, and the data transmission cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Data transmission method and device Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data transmission method and device. Background Art

[0002] With technological advancements, electronic products are becoming increasingly powerful, and data exchange between devices within them is becoming increasingly frequent and complex. Take smart cars, for example. They can be equipped with a wide variety of electronic devices to perform different functions and enhance the comfort and safety of drivers and passengers. For example, multiple speakers and display screens installed inside the car provide a comfortable audio and video entertainment experience. Ultrasonic radar, lidar, and millimeter-wave radar, for example, are used to sense the vehicle's surroundings and provide feedback to the driver, thereby reducing driver misjudgment and improving driver and passenger safety.

[0003] In some cases, the normal operation of a function may involve the interaction of multiple data streams. The data packet format of each data stream may be different, and even the data packets belonging to the same data stream may have different sizes (this is called variable-rate data flow). How to use a fixed-bandwidth link to transmit data from multiple data streams or variable-rate data streams is an urgent problem.

[0004] Summary of the Invention

[0005] The data transmission method and apparatus provided in the embodiments of the present application can use a fixed-bandwidth link to transmit data of multiple data streams or data of variable-rate data streams.

[0006] In a first aspect, an embodiment of the present application provides a data transmission method, applied to a first electronic device; the first electronic device includes a communication interface, the communication interface being used to send at least M data streams of to-be-sent data packets, where M is an integer greater than or equal to 1; the method comprising:

[0007] Acquire a first data packet, where the first data packet is a data packet to be sent of a first data stream;

[0008] sending the first data packet;

[0009] The size of the data packet to be sent of the first data stream is a first target value, and the first target value is associated with the target bandwidth of the first data stream; the first data stream is one of the M data streams, and the target bandwidth is less than or equal to the bandwidth of the communication interface; the data packet to be sent includes indication information and load information, the size of the load information is a second target value, and the second target value is less than the first target value.

[0010] In an embodiment of the present application, the communication interface of the first electronic device is at least used to send data packets to be sent of one or more data streams, and the size of each data packet to be sent of a data stream is a fixed value and is associated with the bandwidth allocated to the data stream. Optionally, the data packet sizes between data streams may be unequal. By allocating bandwidth to each data stream and then determining the size of the data packet to be sent of each data stream as a fixed value based on the bandwidth, on the one hand, a variable rate data stream can be adjusted to a fixed rate for data transmission. On the other hand, a communication interface with a fixed bandwidth can be used to transmit data of multiple data streams. This can improve data transmission efficiency and reduce the cost of data transmission.

[0011] In a possible implementation of the first aspect, when the size of the target data packet of the first data flow is smaller than the second target value, the payload information of the first data packet includes the target data packet and padding bits.

[0012] In the embodiment of the present application, the target data packet of the first data stream may be a data packet received by the first electronic device, or a data packet from other units of the first electronic device, and there is no limitation on this. The target data packet can also be understood as a data packet to be encapsulated, and the data packet obtained after encapsulation is the first data packet. For example, the target data packet can be used as part of the load information in the first data packet. In the case that the target data packet cannot fill the load information of the first data packet, by filling invalid bits, the target data packet + filling bits meet the requirements of the load information, which can ensure that the size of the first data packet is a fixed value, so that the data of the first data stream can be transmitted using a fixed bandwidth. This is equivalent to encapsulating a target data packet with a size smaller than the second target value into a data packet with a size of the first target value by data encapsulation.

[0013] The first data packet with the marked value can be used to transmit data using a fixed bandwidth.

[0014] In another possible implementation of the first aspect, when the size of the target data packet of the first data flow is equal to the second target value, the payload information of the first data packet is the target data packet.

[0015] In an embodiment of the present application, the target data packet of the first data stream may be a data packet received by the first electronic device, or a data packet from other units of the first electronic device, without limitation. The target data packet can also be understood as a data packet to be encapsulated, and the data packet obtained after encapsulation is the first data packet. For example, the target data packet can be used as part of the load information in the first data packet. In the case where the target data packet can fill the load information of the first data packet, the target data packet can be directly used as the load information of the first data packet, thereby obtaining the first data packet. Since the size of the first data packet is a fixed value, the data of the first data stream can be transmitted using a fixed bandwidth. This is equivalent to encapsulating the target data packet whose size is equal to the second target value into a first data packet whose size is the first target value through data encapsulation, thereby enabling data transmission using a fixed bandwidth.

[0016] In another possible implementation of the first aspect, when the target data packet of the first data stream is N times the second target value, N is an integer greater than or equal to 1; the target data packet is composed of N segments of data (it can be understood that the target data packet contains N segments of data), the size of each segment of the N segments of data is the second target value, and the load information of the first data packet is one segment of the N segments of data.

[0017] In the embodiment of the present application, since N is an integer greater than or equal to 1, and the target data packet is composed of N segments of data, the size of each segment of data is the second target value, which is equivalent to the target data packet being divided into N segments of data, and the size of each segment is the second target value. Therefore, any segment of the N segments of data can be used as the payload information of the first data packet, so that the size of the first data packet is a fixed value, thereby enabling the use of a fixed bandwidth to transmit the data of the first data stream. This is equivalent to encapsulating a target data packet whose size is an integer multiple of the second target value into a first data packet whose size is the first target value through data encapsulation, thereby enabling the use of a fixed bandwidth for data transmission.

[0018] In another possible implementation of the first aspect, when the size of the target data packet of the first data stream is L times the second target value, L is not an integer, and L is greater than 1; the target data packet is composed of P segments of data (it can be understood that the target data packet contains P segments of data), and P is an integer rounded up to L; the P segments of data include P-1 segments of data and the Pth segment of data; the size of each segment of data in the P-1 segment of data is the second target value, and the size of the Pth segment of data is smaller than the second target value; the load information of the first data packet is a segment of the P-1 segment of data, or the load information of the first data packet includes the Pth segment of data and padding bits.

[0019] In another possible implementation of the first aspect, when the size of the target data packet of the first data stream is K times the second target value, K is not an integer, and K is greater than 0 and less than 1; the load information of the first data packet is the target data packet and padding bits.

[0020] In an embodiment of the present application, the size of the target data packet of the first data stream is L times (L is not an integer) the above-mentioned second target value, and the target data packet is composed of P-1 segments of data with a size of the second target value and a segment of data smaller than the second target value (referred to as the P-th segment of data). Any segment of data in the P-1 segments of data with a size of the second target value is used as the load information of the first data packet, or the P-th segment of data and the padding bits together constitute the load information of the first data packet. The size of the first data packet is made to be a fixed value, so that the data of the first data stream can be transmitted using a fixed bandwidth. This is equivalent to encapsulating the target data packet with a size that is a decimal multiple of the second target value into a first data packet with a size of the first target value through data encapsulation, so that data can be transmitted using a fixed bandwidth.

[0021] It can be seen from the four embodiments provided above that the size of the target data packet of the first data stream can be different (for example, less than the second target value, equal to the second target value, and greater than the second target value, respectively). The solution provided in the embodiments of the present application encapsulates the target data packet into a first data packet of a fixed size by splitting or filling the target data packet, so that the data of the first data stream can be transmitted using a fixed bandwidth.

[0022] In another possible implementation of the first aspect, when the first electronic device does not receive the target data packet of the first data stream, the first data packet payload information is entirely filled with padding bits, that is, the number of valid bits contained in the first data packet payload information is zero.

[0023] In the embodiments of the present application, when the first electronic device fails to receive the target data packet of the first data stream, this may refer to the first electronic device failing to receive the target data packet within a data transmission period. By padding bits in the payload information of the first data packet and marking the number of valid bits contained in the first data packet as zero, it is possible to ensure that transmission on the fixed bandwidth interface is not interrupted, thereby avoiding transmission anomalies.

[0024] In another possible implementation of the first aspect, the method further includes: sending the to-be-sent data packets of the M data streams in sequence through the communication interface.

[0025] In an embodiment of the present application, a communication interface sequentially transmits data packets from M data streams to be transmitted. This may mean that within a transmission cycle, the communication interface sequentially transmits data packets from the M data streams. For example, if M is 2, and the data packets to be transmitted from the M data streams are respectively a first data packet to be transmitted and a second data packet to be transmitted, the communication interface may sequentially transmit the first data packet to be transmitted and the second data packet to be transmitted within a cycle. Furthermore, over multiple cycles, it may be shown that the first electronic device alternately transmits the first data packet to be transmitted and the second data packet to be transmitted. For example, the first electronic device sequentially transmits the first data packet to be transmitted and the second data packet to be transmitted. Specifically, the order in which the first electronic device transmits the data packets is: first data packet to be transmitted, second data packet to be transmitted, first data packet to be transmitted, second data packet to be transmitted, etc. Since the size of each of the data packets to be transmitted from the M data streams is a fixed value, transmitting the data packets to be transmitted from the M data streams can occupy a fixed bandwidth, and a transmission interface with a fixed bandwidth can be used to transmit data from the M data streams.

[0026] In another possible implementation of the first aspect, the indication information includes first indication information, where the first indication information is used to indicate a data flow type to which the data packet to be sent belongs.

[0027] In an embodiment of the present application, the indication information in the first data packet includes first indication information, which is used to indicate the type of data stream to which the to-be-sent data packet belongs. This enables the data receiving end to determine the type of data stream to which the to-be-sent data packet belongs based on the first indication information and select an unpacking method corresponding to the data stream type to unpack the to-be-sent data packet. Furthermore, the to-be-sent data packet can be sent to the corresponding data stream node based on the data stream type.

[0028] In another possible implementation of the first aspect, the indication information includes second indication information, where the second indication information is used to indicate the number of valid bits in the data packet to be sent.

[0029] In this embodiment of the present application, the indication information in the first data packet includes second indication information, where the second indication information is used to indicate the number of valid bits in the data packet to be sent. Based on the second indication information, the data receiving end can obtain the number of valid bits in the first data packet, thereby extracting the valid data in the first data packet and restoring the original data of the first data stream.

[0030] In another possible implementation of the first aspect, the indication information includes third indication information, and the third indication information is used to indicate a data flow identifier to which the data packet to be sent belongs.

[0031] In an embodiment of the present application, the data stream to which the data packet to be sent belongs can be determined based on the third indication information. In some scenarios, there are multiple data streams of the same type, and the data stream to which the data packet to be sent belongs cannot be determined based solely on the first indication information, thereby preventing the data packet to be sent from being placed on the correct data transmission node. By determining the data stream type to which the data packet to be sent belongs through the first indication information, and then determining the data stream identifier to which the data packet to be sent belongs based on the third indication information, the data stream to which the data packet to be sent belongs can be accurately obtained, and the data packet to be sent can then be transmitted through the correct data transmission node.

[0032] In another possible implementation of the first aspect, the first data packet is a to-be-sent data packet of a first data flow, including:

[0033] The first data packet is a data packet to be sent of the first data stream in a target transmission period, and the communication interface is used at least to send the data packets to be sent of the M data streams in the target transmission period.

[0034] In the embodiment of the present application, the target transmission period may refer to a data transmission period. Since the sizes of the data packets to be sent for the M data streams are all fixed, the target transmission period is used to send at least the data packets to be sent for the M data streams. This means that the number of data packets sent within the target transmission period can be a fixed value. In other words, the data packets of the M data streams can be transmitted using a fixed bandwidth.

[0035] In another possible implementation of the first aspect, the communication interface includes a time division multiplexing (TDM) interface.

[0036] In an embodiment of the present application, the communication interface of the first electronic device includes a TDM interface. The TDM interface has the characteristics of simplicity, high efficiency, and a fixed rate, and can simply and efficiently transmit data of one or more data streams.

[0037] In a second aspect, an embodiment of the present application provides a data transmission method, which is applied to a second electronic device; the second electronic device includes a communication interface, the communication interface is used to receive M data streams of to-be-processed data packets, where M is an integer greater than or equal to 1; the method includes:

[0038] Receive M data packets to be processed;

[0039] Processing the M data packets to be processed;

[0040] Among them, the first data packet to be processed among the M data packets to be processed belongs to the first data stream, the first data packet to be processed includes indication information and load information, and the first data stream is one of the M data streams; the size of the first data packet to be processed is a first target value, and the first target value is associated with the target bandwidth for transmitting the first data stream, and the target bandwidth is less than or equal to the bandwidth of the communication interface; the size of the load information is a second target value, and the second target value is less than the first target value.

[0041] In an embodiment of the present application, the communication interface of the second electronic device is at least used to receive M data packets to be processed of data streams, where M is an integer greater than or equal to 1. The M data packets to be processed correspond one-to-one to the M data streams, that is, the M data packets to be processed are data packets to be processed of the M data streams. Taking the first data stream among the M data streams as an example, the first data packet to be processed among the M data packets to be processed may belong to the first data stream, and the size of the first data packet to be processed is a fixed value. This is equivalent to the sizes of the data packets to be processed belonging to the first data stream being fixed values, that is, the data of the first data stream is transmitted using a fixed bandwidth. When the communication interface of the second electronic device receives data packets to be processed of multiple data streams, the data of each data stream occupies a fixed bandwidth, which is equivalent to using a communication interface with a fixed bandwidth to receive data of multiple data streams.

[0042] In a possible implementation manner of the second aspect, the target data packet of the first data flow includes valid bits in the payload information.

[0043] In the embodiment of the present application, the target data packet may refer to a data packet obtained after decapsulating the data packet to be processed, and the target data packet includes valid bits of payload information in the data packet to be processed.

[0044] In another possible implementation of the second aspect, the indication information includes first indication information, where the first indication information is used to indicate a data flow type to which the first to-be-processed data packet belongs.

[0045] In an embodiment of the present application, the indication information in the first data packet to be processed includes first indication information, which is used to indicate the data stream type described in the data packet to be processed. This allows the second electronic device to easily identify the data stream type to which the first data packet to be processed belongs and perform corresponding processing on the first data packet to be processed. For example, based on the data stream type, the second electronic device may select an unpacking method corresponding to the data stream type and use it to unpack the first data packet to be processed. For another example, based on the first indication information, the first data packet to be processed may be sent to a corresponding data transmission node.

[0046] In another possible implementation of the second aspect, the indication information further includes second indication information, where the second indication information is used to indicate the number of valid bits in the load information.

[0047] In an embodiment of the present application, the indication information in the first data packet to be processed includes second indication information, where the second indication information is used to indicate the number of valid bits in the payload information. This allows the second electronic device to determine the valid bits in the first data packet to be processed based on the second indication information, thereby recovering the target data packet of the first data stream.

[0048] In another possible implementation of the second aspect, the indication information includes third indication information, and the third indication information is used to indicate a data flow identifier to which the first data packet to be processed belongs.

[0049] In an embodiment of the present application, the indication information in the first data packet to be processed includes third indication information, and the third indication information is used to indicate the data stream described in the data packet to be processed. This allows the second electronic device to easily identify the data stream to which the first data packet to be processed belongs, and send the data obtained by decapsulating the first data packet to be processed to the data transmission node of the corresponding data stream. In some scenarios, a data stream includes multiple data, and the data stream to which the data packet to be sent belongs cannot be determined based on the first indication information alone, so that the data packet to be sent cannot be placed on the correct data transmission node. By determining the type of data stream to which the data packet to be sent belongs through the first indication information, and then determining the data stream identifier to which the data packet to be sent belongs based on the third indication information, the data stream to which the data packet to be sent belongs can be accurately obtained, and the data packet to be sent can then be transmitted through the correct data transmission node.

[0050] In another possible implementation of the second aspect, the communication interface includes a TDM interface.

[0051] In an embodiment of the present application, the communication interface of the second electronic device includes a TDM interface. The TDM interface has the characteristics of simplicity, high efficiency, and a fixed rate, and can simply and efficiently transmit data of one or more data streams.

[0052] In a third aspect, an embodiment of the present application provides a data transmission device, which includes a module for executing any one implementation of the first aspect or the second aspect.

[0053] In a fourth aspect, an embodiment of the present application provides a chip comprising a processor. When the processor invokes a computer program or instruction, the implementation described in any one of the first or second aspects is executed. In other words, the processor is configured to implement the implementation described in any one of the first or second aspects.

[0054] Optionally, the chip further includes a communication interface, where the communication interface is used to receive and / or send data, and / or the communication interface is used to provide input and / or output for the processor.

[0055] Optionally, the chip may further include a memory, which may be used to store computer programs or instructions. Furthermore, the memory may be located outside the processor, or may be integrated with the memory.

[0056] In a fifth aspect, an embodiment of the present application further provides a terminal, which includes the data transmission device of the third aspect.

[0057] Optionally, the terminal can be an intelligent terminal or transportation tool such as a vehicle, a drone, or a robot.

[0058] In a sixth aspect, an embodiment of the present application provides a data transmission system, which includes a first electronic device for executing any one of the implementations of the first aspect and a second electronic device for executing any one of the implementations of the second aspect.

[0059] In the seventh aspect, an embodiment of the present application provides a communication device, which includes a processor and a storage medium, wherein the storage medium stores instructions. When the instructions are executed by the processor, any one of the implementations of the above-mentioned first aspect or second aspect is implemented.

[0060] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, which is used to store instructions or computer programs. When the instructions or computer programs are executed, the implementation method described in any one of the first or second aspects above is implemented.

[0061] In a ninth aspect, the present application provides a computer program product, which includes computer instructions or a computer program. When the instructions or the computer program are executed, the implementation method described in any one of the first or second aspects above is implemented.

[0062] Optionally, the computer program product may be a software installation package or an image package. When the aforementioned method is required, the computer program product may be downloaded and executed on a computing device.

[0063] The beneficial effects of the technical solutions provided in the third to ninth aspects of this application can refer to the beneficial effects of the technical solutions in the first or second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0065] FIG1 is a schematic diagram of a multiplexing transmission technology provided in an embodiment of the present application;

[0066] FIG2 is a schematic diagram of TDM data transmission provided in an embodiment of the present application;

[0067] FIG3 is a schematic diagram of the operation of the first TDM interface provided in an embodiment of the present application;

[0068] FIG4 is a schematic diagram of data transmission provided by an embodiment of the present application;

[0069] FIG5 is a schematic diagram of the architecture of a data transmission system provided in an embodiment of the present application;

[0070] FIG6 is a schematic diagram of a first scenario provided in an embodiment of the present application;

[0071] FIG7 is a schematic diagram of a second scenario provided in an embodiment of the present application;

[0072] FIG8 is a schematic diagram of a third scenario provided in an embodiment of the present application;

[0073] FIG9 is a flow chart of a data transmission method provided in an embodiment of the present application;

[0074] FIG10 is a schematic diagram of a data packet encapsulation format provided in an embodiment of the present application;

[0075] FIG11A is a schematic diagram of a first data packet encapsulation method provided in an embodiment of the present application;

[0076] FIG11B is a schematic diagram of a second data packet encapsulation method provided in an embodiment of the present application;

[0077] FIG12A is a schematic diagram of a third data packet encapsulation method provided in an embodiment of the present application;

[0078] FIG12B is a schematic diagram of a fourth data packet encapsulation method provided in an embodiment of the present application;

[0079] FIG13 is a schematic diagram of a fifth data packet encapsulation provided in an embodiment of the present application;

[0080] FIG14 is a schematic flow chart of another data transmission method provided in an embodiment of the present application;

[0081] FIG15 is a schematic diagram of data packet processing provided in an embodiment of the present application;

[0082] 16 and 17 are schematic diagrams of another data packet processing according to an embodiment of the present application;

[0083] FIG18 is a schematic structural diagram of a signal transmitting device provided in an embodiment of the present application;

[0084] FIG19 is a schematic structural diagram of a signal receiving device provided in an embodiment of the present application;

[0085] FIG20 is a schematic structural diagram of another possible signal transmitting device provided in an embodiment of the present application;

[0086] FIG21 is a schematic structural diagram of another possible signal receiving device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0087] With the advancement of communication technology, a variety of data transmission methods have emerged, providing solutions for flexible, efficient, and fast data transmission. Multiplexing technology, among others, can effectively improve data link utilization and reduce data transmission costs, and has been widely adopted. Multiplexing technology is essentially a data transmission method in which a multiplexing device aggregates data from multiple data streams, then transmits the aggregated data via a shared channel. A demultiplexing device then separates the data and distributes it to the data transmission nodes of the multiple data streams. For example, see Figure 1, which is a schematic diagram of multiplexing transmission technology. Multiplexing device 101 aggregates data from M data streams to form a single data stream, where M is an integer greater than or equal to 1. The aggregated data stream is transmitted via a shared channel 103 to a demultiplexing device 102, which splits the data and distributes it to the M data streams at the receiving end. It should be noted that multiple data streams may belong to the same data stream type. An electronic device can generate and receive multiple data streams, or it may generate and receive only one data stream. The embodiment of the present application does not limit this. The shared channel 103 can be a wired channel or a wireless channel. The embodiment of the present application does not limit this either.

[0088] However, different data streams have different data flow requirements, data generation hardware devices, and transmission protocols, resulting in different data packet sizes used by different data streams. In addition, even for the same type of data stream, the size of the data packet used to carry the data may be different (this is called a variable rate data stream). For example, the size of the data packet of the compressed video H.264 / H.265 code stream may be different. Using a fixed bandwidth interface, such as a wired TDM interface, to transmit multiple data streams or variable rate data streams may cause data transmission errors or even the inability to transmit. How to use a fixed bandwidth interface to transmit data packets of multiple data streams or variable rate data streams is an urgent problem that needs to be solved.

[0089] The method of the present application is described below with reference to the accompanying drawings.

[0090] Please refer to Figure 2, which is a schematic diagram of TDM data transmission provided by an embodiment of the present application. As shown in Figure 2, it includes a transmitting end 201 and a receiving end 202. Among them, the transmitting end 201 is used to aggregate multiple signals to form a TDM frame signal and send it out. The receiving end 202 is used to receive the TDM frame signal and shunt the TDM frame signal to form multiple signals. Specifically, please refer to Figure 2, the TDM frame signal is composed of signals carried by N time slots, and N is an integer greater than or equal to 1. The transmitting end 201 summarizes the data carried by time slot 1, time slot 2, time slot 3, ..., and time slot N to form a TDM frame signal. It can be seen from Figure 2 that time slot 1, time slot 2, time slot 3, ..., and time slot N are arranged in sequence from right to left to form a TDM frame signal. After receiving the TDM frame signal, the receiving end 202 shunts it and obtains the data carried in time slot 1, time slot 2, time slot 3, ..., and time slot N in sequence. It should be noted that the TDM frame signal may include an indicator signal for indicating signal synchronization, etc. For example, the frame synchronization signal is used to identify the start and end of a target transmission cycle.

[0091] Furthermore, to facilitate the introduction of the solution, the subsequent description uses the example of one or more time slots within a TDM transmission period to introduce the solution. The impact of the indication information on the solution does not need to be considered in understanding the solution. However, during the implementation of the solution, it should not be assumed that the TDM frame signal provided in this application only includes one or more time slots.

[0092] For example, in the process of introducing the TDM frame in the embodiment of the present application, the time slot in the TDM frame may be introduced. Regarding other parts of the TDM frame (for example, the frame synchronization signal), no specific limitation is made unless the embodiment of the application is used.

[0093] In some scenarios, the N time slots are of equal size, that is, the time occupied by any one of the N time slots is equal to 1 / N of the time occupied by a frame of TDM signal (called a target transmission period). The N time slots carry data from N data streams, that is, each time slot carries data from one data stream, and the data streams carried by the N time slots are different. For example, time slot 1 carries data from data stream 1, time slot 2 carries data from data stream 2, time slot 3 carries data from data stream 3, ..., and time slot N carries data from data stream N. Among them, data stream 1, data stream 2, data stream 3, ..., and data stream N are different.

[0094] For example, please refer to Figure 3, which is a working diagram of the first TDM interface provided in an embodiment of the present application, which is used to show the situation where the time slots are of the same size within a target transmission cycle. Among them, a target transmission cycle can refer to the duration occupied by a frame of TDM signal, and the same time slot size can refer to the same amount of data carried by the time slot. In some possible scenarios, the same time slot size can also refer to the same amount of data carried / sent, which is irrelevant to the time of transmitting data. For example, time slot 1 and time slot 2 can refer to the amount of data carried / sent being 5KB, wherein time slot 1 occupies 3ms and time slot 2 occupies 5ms (the situation where time slot 1 and time slot 2 occupy different times), or, time slot 1 and time slot 2 both occupy 4ms (the situation where time slot 1 and time slot 2 occupy the same time). In other possible scenarios, the same time slot size can also refer to the same time of transmitting data, which is irrelevant to the amount of data carried / sent. For example, time slot 1 and time slot 2 both occupy 4ms, where the amount of data carried / sent by time slot 1 is 5KB, and the amount of data carried / sent by time slot 2 is 8KB (the case where the amount of data carried / sent by time slot 1 and time slot 2 is different), or the amount of data carried / sent by time slot 1 and time slot 2 are both 8KB (the case where the amount of data carried / sent by time slot 1 and time slot 2 is the same).

[0095] As shown in Figure 3, Figure 3 includes a clock signal, a frame synchronization signal, and a data signal. The clock signal can be used to determine the data transmission rate and timing. Only one data bit (for example, 0 or 1) can be transmitted within one clock cycle. A time slot includes A clock cycles, where A is an integer greater than or equal to 1. Taking A equal to 16 as an example, it means that time slots 1, 2, 3, and 4 shown in Figure 3 each include 16 clock cycles, which means that each time slot can carry 16 data bits. The sending end fills the data bits in each time slot in sequence according to the clock cycle, and the receiving end parses and restores the data carried by the time slot based on the clock signal.

[0096] The frame synchronization signal is used to identify the start and end of a target transmission cycle. As shown in Figure 3, at the beginning of the target transmission cycle, the frame synchronization signal is adjusted from a low level to a high level. The high level lasts for one clock cycle, after which the frame synchronization signal returns to its original low level until the next target transmission cycle begins, at which point the frame synchronization signal is adjusted from a low level to a high level again.

[0097] The data signal is used to indicate the bit quantization of an audio data sample through level transitions.

[0098] As can be seen from Figure 3, the frame synchronization signal and one or more time slots for carrying data together constitute a target transmission cycle. For ease of description, the following description is based on an example of a target transmission cycle including one or more time slots.

[0099] Figure 3 above shows the transmission of multiple data streams at the same rate over a TDM interface. However, data streams typically require different data transmission rates. For example, data stream 1 requires 5 MB / s bandwidth, data stream 2 requires 10 MB / s bandwidth, and data stream 3 requires 15 MB / s bandwidth. If data streams 1, 2, and 3 are transmitted at the same rate, data congestion or low bandwidth utilization may occur.

[0100] In view of this, an embodiment of the present application provides a data transmission method that enables a data stream to occupy multiple time slots for data transmission. By reasonably allocating time slots to data streams, the communication interface can meet the transmission requirements of each data stream. On the one hand, it can solve the problem of data congestion that may occur, and on the other hand, it can also improve bandwidth utilization. For example, time slots can be allocated to data streams based on the requirements of the data stream, or they can be allocated to data streams based on the allocable bandwidth of the communication interface. For the specific implementation process, please refer to the subsequent description, which is not described in detail here. Similarly, allocating time slots to data streams can also be understood as matching corresponding time slots according to the transmission requirements of the data stream. Exemplarily, a time slot can be a time unit for transmitting data, for example, a time slot can be a time slot, or multiple time slots. For another example, a time slot can also be a time of a target length, for example, a time slot size of 5ms or 10ms, etc., which is not limited by the embodiments of the present application.

[0101] In some scenarios, available time slots can be allocated to a data stream at a time slot granularity based on the data stream's needs. Alternatively, available time slots can be allocated to a data stream at a time slot granularity based on the time slots that can be allocated by the TDM interface. The specific number of time slots allocated to a data stream and the size of each time slot are not limited in the embodiments of the present application.

[0102] For example, please refer to Figure 4, which is a schematic diagram of data transmission provided in an embodiment of the present application, used to show the situation where different numbers of time slots are allocated to different data streams within a target transmission cycle.

[0103] FIG4 is similar to FIG3 , both including a clock signal, a frame synchronization signal and a data signal. For a detailed description of the clock signal, the frame synchronization signal and the data signal, please refer to the relevant introduction in FIG3 , which will not be repeated here.

[0104] In addition, Figure 4 also includes data stream 1, data stream 2, and data stream 3, where data stream 1 occupies time slots 1 and 2, data stream 2 occupies time slot 3, and data stream 3 occupies time slot 4. This means that the sizes of the first data packets corresponding to data streams 2 and 3 are equal, and the size of the first data packet corresponding to data stream 1 is twice the size of the first data packet corresponding to data stream 2 or data stream 3.

[0105] In one possible implementation, the time slot allocated to the data flow may be determined based on the requirements of the data flow.

[0106] The data stream requirement refers to the data rate requirement of the data stream. It can refer to the minimum requirement for transmitting the data of the data stream or the optimal requirement for transmitting the data of the data stream, which is not limited in the present embodiment. For example, the minimum bandwidth for transmitting the data of data stream 1 is 5 MB / s, and the optimal bandwidth for transmitting the data of data stream 1 can be 7 MB / s. The minimum requirement for transmitting the data of the data stream can refer to the average rate required for transmitting the data stream, or slightly higher than the average rate. The optimal requirement for transmitting the data of the data stream can refer to the maximum data transmission rate of the data stream. For a fixed-rate data stream, the data transmission rate required at each moment is a fixed value. Typically, the "minimum requirement" and "optimal requirement" of a fixed-rate data stream are the same. For a variable-rate data stream, the data transmission rate required at each moment is not fixed. For example, the rate requirement at the first moment is 3 MB / s, and the rate requirement at the second moment is 7 MB / s. If the average data transmission rate required by the variable-rate data stream is 5 MB / s, the corresponding "minimum requirement" is 5 MB / s. If the maximum data transmission rate required by the variable-rate data stream is 7 MB / s, the corresponding "optimal requirement" can be 7 MB / s.

[0107] When a TDM interface transmits a data stream, the parameters of the TDM interface can be determined based on the above-mentioned "minimum requirements" or "optimal requirements" so that the bandwidth of the TDM interface can meet the "minimum requirements" or "optimal requirements" of the data stream.

[0108] When a TDM interface transmits multiple data streams, the TDM interface parameters can also be determined based on the aforementioned "minimum requirements" or "optimal requirements" to ensure that the TDM interface bandwidth meets the combined bandwidth requirements of the multiple data streams. Bandwidth can then be allocated based on the data stream requirements. For example, if the combined bandwidth required by data streams 1, 2, and 3 is 10 MB / s, data stream 1 requires 5 MB / s, data stream 2 requires 2.5 MB / s, and data stream 3 also requires 2.5 MB / s.

[0109] Furthermore, the time slots occupied by a data stream can be determined based on the bandwidth allocated to it. For example, a time slot can be viewed as a sub-interface with a fixed bandwidth. For example, the bandwidth of a time slot can be equal to the bandwidth of the TDM interface divided by the number of time slots, or the bandwidth of a time slot can be equal to the quantization bit width of a time slot multiplied by the sampling frequency of the TDM interface. For example, time slots can be allocated to data streams at the granularity of time slots. For example, if the bandwidth of a time slot is 0.6 MB / s, 9 time slots (9×0.6=5.4 MB / s) need to be allocated to data stream 1, and 5 time slots (5×0.6=3 MB / s) need to be allocated to data stream 2 or data stream 3 to meet the bandwidth required by data stream 1, data stream 2, and data stream 3.

[0110] Another possible implementation manner may be to determine the time slot allocated to the data stream based on the allocatable bandwidth of the TDM interface.

[0111] The allocatable bandwidth of a TDM interface can also refer to the bandwidth of the TDM interface. For example, if the sampling frequency of a TDM interface is 48 kHz, it consists of 8 time slots, and the quantization bit width of each time slot is 8 bits, then the amount of data transmitted per unit time by the TDM interface is 8 × 8 × 48 KB = 3,072,000 bits = 384,000 bytes = 375 KB, which means the bandwidth of the TDM interface is 375 KB / s.

[0112] In some scenarios, the bandwidth of a TDM interface cannot be adjusted, for example, it cannot be increased or decreased. However, if the bandwidth required by a data flow is not equal to the bandwidth of the TDM interface, it is not possible to allocate the bandwidth exactly as required by the data flow (the bandwidth allocated to the data flow may be more or less than the data flow's requirements).

[0113] In one possible implementation, bandwidth may be allocated proportionally.

[0114] For example, if data stream 1 requires 5 MB / s, data stream 2 requires 2.5 MB / s, and data stream 3 also requires 2.5 MB / s, and the TDM interface bandwidth is 20 MB / s, bandwidth can be allocated to the three data streams in a 2:1:1 ratio. For example, 10 MB / s can be allocated to data stream 1, and 5 MB / s to either data stream 2 or data stream 3.

[0115] As can be seen from Figure 4, the frame synchronization signal and one or more time slots for carrying data together constitute a target transmission cycle. For ease of description, the following description is based on an example of a target transmission cycle including one or more time slots.

[0116] In Figures 3 and 4 above, LSB (least significant bit) is used to represent the low bit of data, and MSB (most significant bit) is used to represent the high bit of data. In a time slot, the low bit of data can be located to the right of the high bit of data.

[0117] It is understandable that the size of a time slot is positively correlated with the number of bits that the time slot can carry. Normally, the number of bits occupied by a data stream in a frame of TDM signal is fixed, and the number of bits carried by a frame of TDM signal is also fixed, that is, the rate at which TDM transmits data is fixed. In the case where a TDM interface transmits a data stream, if the data stream is a variable rate data stream (that is, the size of the data packet is not fixed), then the data packets of the variable rate data stream need to be encapsulated and adjusted to a data packet of a first target value in size, and the first target value is the number of bits carried by a frame of TDM signal. In the case where a TDM interface transmits multiple data streams, the data packets of each data stream need to be encapsulated into a data packet of a first target value in size, and the first target value is related to the number of time slots allocated to the data stream. Taking the first data stream among multiple data streams as an example, the time slots allocated to the first data stream are 2, and the number of bits that a time slot can carry is 10 bits, then the first target value is 20 bits.

[0118] The embodiments of the present application are described below with reference to the accompanying drawings.

[0119] The following describes the system architecture used in the embodiments of this application. It should be noted that the system architecture and scenarios described in this application are intended to more clearly illustrate the technical solutions of this application and do not constitute a limitation on the technical solutions provided by this application. It should be understood that as the system architecture evolves and new scenarios emerge, the technical solutions provided in this application will also be applicable to similar technical problems.

[0120] Please refer to Figure 5, which is a schematic diagram of the architecture of a data transmission system provided in an embodiment of the present application. The data transmission system 500 includes a first electronic device 510 and a second electronic device 520.

[0121] The first electronic device 510 includes an acquisition unit 511 and a sending unit 512. The acquisition unit 511 and the sending unit 512 can be connected. The acquisition unit 511 is used to acquire data or data packets to be sent, and the sending unit 512 is used to send data or data packets.

[0122] The acquisition unit 511 has computing capabilities. For example, the acquisition unit 511 can determine information such as the size of the data packet to be sent, the packet format, and the sending order of the data packet to be sent, and provide information such as the data packet to be sent and the sending order of the data packet to be sent to the sending unit 512. The size of the data packet to be sent may refer to the number of bits occupied by the data packet to be sent, and the size of the data packet to be sent may be related to the amount of data that the sending unit 512 can send at one time. The packet format of the data packet to be sent is used to indicate the position and size of the indication information and data information in the data packet to be sent, and the acquisition unit 511 may determine the data packet to be sent based on the size and packet format of the data packet to be sent. In the case where the acquisition unit 511 determines multiple data packets to be sent, the sending order of the sending unit 512 is indicated by the sending order of the data packets to be sent, so that the receiving end of the data packet can correctly restore the original information.

[0123] It can be understood that the data packet to be sent may refer to an encapsulated data packet, that is, a data packet having a size of the first target value.

[0124] Optionally, the acquisition unit 511 can be implemented by hardware or software. For example, the acquisition unit 511 can be implemented by a general-purpose processor, such as a central processing unit (CPU) or a microprocessor. Alternatively, the acquisition unit 511 can be implemented in the form of a hardware circuit, and the functions of some or all of the units completed by the acquisition unit 511 are realized by designing the hardware circuit. For example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC), which realizes the functions of some or all of the above units by designing the logical relationship of the components in the circuit; for example, in another implementation, the hardware circuit can be realized by a programmable logic device (PLD), taking a field programmable gate array (FPGA) as an example, which can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by a configuration file, thereby realizing the functions of some or all of the above units.

[0125] As a possible example, the acquisition unit 511 is capable of processing data from multiple data streams. For example, the acquisition unit 511 is capable of generating corresponding multiple data packets based on the data of the multiple data streams in sequence. For example, the first data packet, the second data packet, and the third data packet are generated based on the data of the first data stream, the data of the second data stream, and the data of the third data stream in sequence. Among them, the first data stream, the second data stream, and the third data stream all belong to the above-mentioned multiple data streams, and the first data packet, the second data packet, and the third data packet all belong to the above-mentioned multiple data streams. In addition, the acquisition unit 511 may also generate multiple data packets based on the data of multiple data streams in parallel, or may be capable of processing data of two or more data streams at the same time.

[0126] The transmitting unit 512 is used to transmit signals. As a possible example, the transmitting unit 512 may include a signal transmitter, a modulator, and a transmitting antenna, and may optionally include an amplifier, etc. A signal generator (such as a voltage-controlled oscillator, etc.) may generate an electromagnetic wave signal (also known as a radar signal waveform). For example, in a radar using FMCW modulation, the signal transmitter may generate a sawtooth wave or a triangle wave. The generated electromagnetic wave signal waveform is subjected to frequency conversion modulation processing, modulated to a certain frequency band (for example, between 77 GHz and 78 GHz), and radiated into space through the transmitting antenna.

[0127] As another possible example, the sending unit 512 further supports multiplexing technology and can send multiple data packets to be sent determined by the obtaining unit 511 in a multiplexed manner. Supported multiplexing technologies include TDM, FDM, WDM, CDMA, and SDMA, and the specific multiplexing technology used is not limited in this embodiment of the application.

[0128] As another possible example, the sending unit 512 also supports wired transmission. For example, data may be transmitted through one or more of the following transmission media, including: twisted pair, coaxial cable, and optical fiber.

[0129] The second electronic device 520 includes a receiving unit 521 and a processing unit 522, which can be connected to each other. The receiving unit 521 is used to receive data or data packets sent by the first electronic device 510, and the processing unit 522 is used to process the received data or data packets, such as unpacking, distributing, and recovering data.

[0130] The receiving unit 521 is used to receive signals. As a possible example, the receiving unit 521 may include a signal receiver, a demodulator, and a receiving antenna, and may optionally include a low-noise amplifier, etc. The signal receiver can receive a radio frequency signal (e.g., between 77 GHz and 78 GHz) through the receiving antenna, mix the received radio frequency signal with an electromagnetic wave signal generated by a local oscillator (e.g., a voltage-controlled oscillator), and demodulate it to obtain an intermediate frequency or baseband signal. The intermediate frequency or baseband signal can also be demodulated by the demodulator to restore the original signal.

[0131] As another possible example, the receiving unit 521 further supports multiplexing technology, can demultiplex the received signal, recover one or more original data streams, and send the recovered data streams to the corresponding terminal. The multiplexing technologies that the receiving unit 521 can support include TDM, FDM, WDM, CDMA, and SDMA, etc. The specific multiplexing technology used is not limited in this embodiment of the application.

[0132] As another possible example, the receiving unit 521 also supports receiving signals through wired transmission. For example, data can be received through one or more of the following transmission media, including: twisted pair, coaxial cable, and optical fiber.

[0133] The processing unit 522 has computing capabilities. In one possible implementation, the processing unit 522 can perform operations such as unpacking or forwarding the data stream received by the receiving unit 521. For example, the receiving unit 521 receives a TDM data packet, and the processing unit 522 can unpack the TDM data packet to obtain data of multiple data streams. The processing unit 522 can also forward the obtained data of the multiple data streams to the corresponding device. In another possible implementation, the processing unit 522 can also parse and use the data received by the receiving unit 521. For example, the processing unit 522 is a display device, and the processing unit 522 can display images based on the data received by the receiving unit 521. For another example, the processing unit 522 is a display device, and the processing unit 522 can play sound based on the data received by the receiving unit 521.

[0134] Optionally, the processing unit 522 may be implemented by hardware or software. For example, the specific implementation of the processing unit 522 by hardware or software may refer to the specific implementation of the acquisition unit 511 described above, which will not be repeated here.

[0135] The above describes the built-in units of the first electronic device 510 and the second electronic device 520, respectively, as examples. The following provides appropriate examples of the first electronic device 510 and the second electronic device 520. The first electronic device 510 has the ability to acquire and transmit data packets, and may be, for example, a vehicle-mounted chip, a camera, or an ultrasonic radar. The second electronic device 520 has the ability to receive and process data packets, and may be, for example, a digital signal processor (DSP), a display, or a display device.

[0136] The first electronic device 510 sends a data packet to the second electronic device 520, which may be done by directly sending the data packet via a wired or wireless method, or by implementing the sending of the data packet through multiple relay devices. It should be noted that the multiple relay devices may not change the format of the data packet itself, such as unpacking, deleting or adding new data packets, but only forward the data packet. The relay device may also forward the data packet via a wired or wireless method, and the number of relay devices is not limited in the embodiment of the present application. It should be noted that the relay device connected to the first electronic device 510 is capable of receiving data packets from the sending unit 512. For example, the sending unit 512 sends data via a fixed-rate interface, and the relay device also receives data via several fixed-rate ports. For another example, the sending unit 512 sends data via TDM technology, and the relay device needs to be able to support TDM technology for receiving data.

[0137] The following is an illustrative introduction to possible implementation methods of the data transmission system 500 in conjunction with Figures 6 to 8. Figures 6 and 7 are illustrative examples of application scenarios in which the central control device in a smart car sends data to a display device. Figure 8 is illustrative examples of application scenarios in which the camera module in a smart car sends data to the central control device. It should be noted that the technical solution provided in this application is not limited to the application scenarios of smart cars, and all scenarios that conform to the system architecture in Figure 5 fall within the scope of protection of the embodiments of this application. For example, scenarios such as smart homes, smart communities, and smart agriculture.

[0138] Please refer to Figure 6, which is a schematic diagram of the first scenario provided by the embodiment of the present application, including a central control device 610 and a display device 620. The central control device 610 includes a vehicle computer chip 611 and a transmission chip TX612, and the display device 620 includes a transmission chip RX621 and a DSP622.

[0139] The vehicle-computer chip 611 is used to obtain data packets to be sent for one or more data streams and send them out through the TDM interface. Among them, when the vehicle-computer chip 611 is used to obtain data packets to be sent for a data stream, the size of the data packet to be sent can be equal to the number of bits that can be carried by a target transmission cycle. When the vehicle-computer chip 611 is used to obtain data packets to be sent for multiple data streams, the sum of the data packets to be sent for the multiple data streams can be equal to the number of bits that can be carried by a target transmission cycle. The type of the above-mentioned one or more data streams is not limited in the embodiments of the present application. For example, it can be audio, video, brake control or motor control, etc. For an introduction on how the vehicle-computer chip 611 obtains data packets to be sent for one or more data streams, please refer to the subsequent related content and it will not be described in detail here.

[0140] The transmission chip TX612 can receive data packets to be sent and forward the received data packets to be sent. For example, the transmission chip TX612 can receive data packets to be sent from the vehicle-computer chip 611 and forward them. For another example, the transmission chip TX612 can receive data packets to be sent from the vehicle-computer chip 611 through the TDM interface and forward them. In some embodiments, the transmission chip TX612 can forward the received data packets through a wired channel. For example, the transmission chip TX612 forwards the received data packets through twisted pair cables, coaxial cables, or optical fibers. In another embodiment, the transmission chip TX612 can also forward the received data packets through a wireless channel. The frequency band of the wireless channel is not limited in the embodiment of the present application, for example, it can be between 77 GHz and 78 GHz.

[0141] The transmission chip RX621 is used to receive data packets and then forward them. For example, the transmission chip RX621 receives data packets from the central control device 610 and forwards them. In another example, the transmission chip RX621 receives data packets from the central control device 610 and forwards them via a fixed-rate interface. In one embodiment, the transmission chip RX621 does not process the received data packets and directly forwards them via the TDM interface. In another embodiment, the transmission chip RX621 pre-processes the received data packets, such as by demultiplexing, and then forwards the pre-processed data packets via the TDM interface. The demultiplexed data packets may be forwarded to a single electronic device or to multiple electronic devices. For example, if the data packets received by the transmission chip RX621 all belong to a single data stream, the received data packets may be forwarded to the electronic device executing that data stream. In another example, if the data packets received by the transmission chip RX621 belong to multiple data streams, and the multiple data streams are executed by multiple different electronic devices, the received data packets may be distributed to multiple different electronic devices. For another example, the data packets received by the transmission chip RX621 belong to multiple data streams, and the multiple data streams are all executed by one electronic device. The received data packets can be forwarded to the electronic device.

[0142] The digital signal processing (DSP) 622 is used to receive and process data. For example, the DSP 622 can receive and process data packets from the transmission chip RX 621. For another example, the DSP 622 can receive and process data packets from the transmission chip RX 621 via a fixed-rate interface (e.g., a TDM interface). The DSP 622's data packet processing includes, but is not limited to, unpacking, restoring the original data sequence, and utilizing valid data within the data packets.

[0143] In a possible implementation, the data processed by the DSP 622 may be sent to a display screen of the display device 620 , and the display screen may display images based on the data processed by the DSP 622 .

[0144] From the above description of Figure 6, it can be seen that the car-machine chip 611 has the function of acquiring data packets and sending data packets through a fixed-rate interface, while the DSP622 has the function of receiving data packets and processing data packets through a fixed-rate interface. Therefore, the car-machine chip 611 can be regarded as the first electronic device 510 in Figure 5, and the DSP622 can be regarded as the second electronic device 520 in Figure 5. The transmission chip TX612 and the transmission chip RX621 in Figure 6 can both be regarded as relay devices for forwarding signals from the car-machine chip 611. In the description of Figure 5 above, more or fewer relay devices may be included between the first electronic device 510 and the second electronic device 520 to forward the functions of the first electronic device 510. Therefore, more or fewer relay devices may also be included between the car-machine chip 611 and the DSP622, and this application does not limit this.

[0145] 7 , which is a schematic diagram of a second scenario provided by an embodiment of the present application, including a central control device 710 and a display device 720 . The central control device 710 includes a vehicle computer chip 711 and a transmission chip TX712 , and the display device 720 includes a transmission chip RX721 and a DSP722 .

[0146] The difference between Figure 7 and Figure 6 is that the car computer chip 711 and the transmission chip TX712 in Figure 7 transmit data through a non-fixed rate interface (for example, a USB interface), while the car computer chip 611 and the transmission chip TX612 in Figure 6 transmit data through a fixed rate interface (for example, a TDM interface).

[0147] The vehicle-computer chip 711 is used to obtain data packets to be sent from one or more data streams and send them out through the USB interface. It should be noted that the interface used by the vehicle-computer chip 711 to send data is not a TDM interface. For example, the vehicle-computer chip 711 can also be a serial peripheral interface (SPI), a thunderbolt interface (Thunderbolt) or a high-definition multimedia interface (HDMI), etc. The type of the above-mentioned one or more data streams is not limited in this embodiment of the application. For example, it can be audio, video, brake control or motor control, etc. For an introduction on how the vehicle-computer chip 711 obtains data packets to be sent from one or more data streams, please refer to the subsequent related content and will not be described in detail here.

[0148] The transmission chip TX712 can receive data packets to be sent and forward the received data packets to be sent. For example, the transmission chip TX712 can receive data packets to be sent from the vehicle-computer chip 711 and forward them. For another example, the transmission chip TX712 can receive data packets to be sent from the vehicle-computer chip 711 through a USB interface and forward them. In some embodiments, the transmission chip TX712 can forward the received data packets through a wired channel. For example, the transmission chip TX712 forwards the received data packets through a twisted pair, a coaxial cable or an optical fiber. In another embodiment, the transmission chip TX712 can also forward the received data packets through a wireless channel. Among them, the frequency band of the wireless channel and the like are not limited in the embodiments of the present application, for example, it can be between 77GHz and 78GHz.

[0149] The transmission chip RX721 is used to receive data packets and then forward the received data packets. For example, the transmission chip RX721 receives data packets from the central control device 710 and forwards them. For another example, the transmission chip RX721 receives data packets from the central control device 710 and forwards them through the TDM interface. Since the car chip 711 does not send data packets to the transmission chip TX712 through the TDM interface, the data packets received by the transmission chip RX721 through the wired / wireless channel cannot usually be directly forwarded using a fixed-rate interface. The transmission chip RX721 needs to first encapsulate the received data packets into data packets that can be transmitted by a fixed-rate interface (for example, a TDM interface) (equivalent to obtaining data packets), and then send them out through a fixed-rate interface (for example, a TDM interface). For an introduction on how to encapsulate the received data packets so that they can be transmitted using a fixed-rate interface (for example, a TDM interface), please refer to the subsequent description of related content, which will not be described in detail here.

[0150] The DSP 722 is used to receive and process data. For example, the DSP 722 can receive data packets from the transmission chip RX 721, process the received data packets, and display them on the screen. For another example, the DSP 722 can receive data packets from the transmission chip RX 721 via a fixed-rate interface (e.g., a TDM interface) and process the received data packets. The DSP 722's processing of data packets includes, but is not limited to, unpacking, restoring the original data sequence, and using the valid data in the data packets.

[0151] As can be seen from the above description of FIG. 7 , the transmission chip RX721 has the function of acquiring data packets and sending them via a fixed-rate interface (e.g., a TDM interface), while the DSP722 has the function of receiving and processing data packets via a fixed-rate interface (e.g., a TDM interface). Therefore, the transmission chip RX721 can be considered the first electronic device 510 in FIG. 5 , and the DSP722 can be considered the second electronic device 520 in FIG. Furthermore, the transmission chip RX721 and the DSP722 both belong to the display device 720 , and the data transmission between the transmission chip RX721 and the DSP722 can be considered direct data transmission. For example, the transmission chip RX721 and the DSP722 transmit data via on-chip wiring.

[0152] In a possible implementation, the data processed by the DSP 722 may be sent to a display screen of the display device 720 , and the display screen may display images according to the data processed by the DSP 722 .

[0153] Please refer to Figure 8, which is a schematic diagram of the third scenario provided by the embodiment of the present application, including a camera module 810 and a central control device 820. Among them, the camera module 810 includes a digital camera 811 and a transmission chip TX812, and the central control device 820 includes a transmission chip RX821 and a car chip 822.

[0154] The digital camera 811 is used to acquire data and send the acquired data through a fixed rate interface (e.g., a TDM interface). For example, the digital camera 811 is used to acquire audio and / or video data and send the acquired data through a fixed rate interface (e.g., a TDM interface). It should be noted that the data acquired by the digital camera 811 is not directly encapsulated into a data packet format that can be sent by a fixed rate interface (e.g., a TDM interface). For example, the digital camera 811 needs to perform H.264 / H.265 encoding first, and then encapsulate the encoded data packet to generate a data packet that can be sent by a fixed rate interface (e.g., a TDM interface). For an introduction to data packet encapsulation, please refer to the subsequent related description, which will not be described in detail here.

[0155] The transmission chip TX812 is used to receive data through a fixed rate interface (for example, a TDM interface) and send data. The transmission chip TX812 can directly send the data it receives, or it can preprocess the data it receives and then send the preprocessed data. In one possible implementation, the preprocessing method can be to decapsulate the data packets received by the transmission chip TX812 to reduce the additional overhead of transmitting data. For example, the transmission chip TX812 decapsulates the received data packets and restores them to the H.264 / H.265 encoding format, thereby reducing the additional overhead of data transmission. In some implementations, the transmission chip TX812 can send data through a wired channel. For example, the transmission chip TX612 sends data through twisted pair cables, coaxial cables, or optical fibers. In another implementation, the transmission chip TX612 can also send data through a wireless channel. The frequency band of the wireless channel is not limited in this embodiment of the application, for example, it can be between 77 GHz and 78 GHz.

[0156] The transmission chip RX821 is used to receive data packets and then forward the received data packets. For example, the transmission chip RX821 receives data packets from the camera module 810 and forwards them. For another example, the transmission chip RX821 receives data packets from the camera module 810 and forwards them through the USB interface. It should be noted that the interface used by the transmission chip RX821 to send data is not a fixed rate interface (for example, a TDM interface). For example, the transmission chip RX821 can also be a serial peripheral interface, a thunderbolt interface or a high-definition multimedia interface.

[0157] The vehicle-mounted chip 822 is configured to receive data packets via a USB interface, such as data packets from the transmission chip RX821. In some embodiments, the vehicle-mounted chip 822 is further configured to process the received data packets. The specific manner in which the data packets are processed is not limited in this embodiment. For example, the vehicle-mounted chip 822 may utilize, forward, or decompress the received data packets.

[0158] It is understandable that multiplexing technology can improve data transmission efficiency, reduce data transmission costs, and facilitate maintenance. Furthermore, fixed-rate interfaces (e.g., TDM interfaces) are widely used due to their simple structure, low cost, and fixed rate. Therefore, data transmission through fixed-rate interfaces (e.g., TDM interfaces) has the characteristics of low technical difficulty, high data transmission efficiency, and low data transmission cost. However, due to different requirements for data transmission rate, data latency, etc. for different services, the packet sizes used by different data streams may be different. Even the same data stream may use different packet sizes, making it impossible to directly use fixed-rate interfaces (e.g., TDM interfaces) for data transmission. With the diverse needs of in-vehicle applications, such as video applications such as car screen projection and surround view, the video services such as H.264 / 265 used do not arrive at a uniform rate and the packet sizes vary. They cannot be transmitted directly on TDM interfaces. If existing transmission interfaces can be reused, the cycle of new application deployment can be simplified and the solution cost can be reduced. Taking smart cars as an example, in-vehicle applications are constantly increasing, such as video applications such as car screen projection and surround view. New applications often cannot directly use fixed-rate interfaces (e.g., TDM interfaces) for data transmission, requiring the addition of additional data transmission links. Reusing existing data transmission interfaces (e.g., TDM interfaces) for data transmission not only reduces data transmission costs but also shortens application deployment cycles.

[0159] In summary, using a fixed-rate interface (e.g., a TDM interface) to transmit packets of different data streams or variable-rate data streams offers the advantages of low cost, high efficiency, and low technical difficulty. Encapsulating packets of different data streams or variable-rate data streams into packets that can be transmitted over a fixed-rate interface (e.g., a TDM interface) is a pressing technical challenge.

[0160] In view of this, embodiments of the present application provide a data transmission method and apparatus. In embodiments of the present application, the data transmission apparatus is at least configured to send / receive data packets of M data streams (M is an integer greater than or equal to 1). The data packets of the M data streams are M encapsulated data packets, and the packet size of each data stream is associated with the target bandwidth of the data stream. In this way, the M data streams can use a fixed rate interface (e.g., a TDM interface) for data transmission, thereby improving data transmission efficiency and saving data transmission costs.

[0161] The target bandwidth can be the bandwidth allocated to a data stream by a data transmission interface (e.g., transmitting unit 512 or receiving unit 521 in FIG. 5 ). For a fixed-rate communication interface, the size of each data packet is fixed, and the size of each data packet is equal to the communication interface bandwidth divided by the cycle frequency or sampling frequency. Therefore, the data packet size of the data stream can be determined based on the target bandwidth. For example, if the bandwidth allocated to data stream 1 is 375KB / s and the sampling frequency of the data transmission interface is 48KHz, then the data packet size of data stream 1 is 375×1024×8 / 48K=38400B×8 / 48K=3072000bit / 48K=64bit.

[0162] The method provided in this application is introduced below with reference to the accompanying drawings.

[0163] Please refer to Figure 9, which is a flowchart of a data transmission method provided by an embodiment of the present application. Optionally, it can be implemented based on the first electronic device 510 shown in Figure 5.

[0164] The data transmission method shown in FIG9 may include one or more steps from step S901 to step S902. It should be understood that for the convenience of description, the description is given in the order of S901 to S902, and it is not intended to limit the execution to the above order. The embodiment of the present application does not limit the execution order, execution time, and number of executions of the above one or more steps. Steps S901 to S902 are as follows:

[0165] Before specifically introducing the method shown in FIG. 9 , some necessary explanations are first given for possible subsequent situations.

[0166] (1) The first target value is associated with the target bandwidth of the first data stream. This means that the first target value can be determined based on the target bandwidth of the first data stream, and the first target value cannot be simply considered to be equal to the target bandwidth. The first target value is the size of the data packet to be sent by the first data stream (also referred to as the first data packet). The target bandwidth is the bandwidth allocated to the first data stream, or the bandwidth used to transmit data of the first data stream.

[0167] For example, the target bandwidth is 375 KB / s, and the sampling frequency of the data transmission interface is 48 kHz. Then, the first target value is equal to 375×1024×8 / 48K=38400B×8 / 48K=3072000bit / 48K=64bit.

[0168] (2) The method shown in FIG9 is intended to introduce how to obtain the first data packet and how to send the first data packet within a transmission cycle, and the transmission cycle is referred to as the target transmission cycle. It can be understood that FIG9 uses a transmission cycle as an example to introduce the technical solution proposed in this application. The technical solution proposed in this application can be applied to a fixed-rate data transmission interface (equivalent to, the size of each cycle is equal), and the data transmission interface includes multiple transmission cycles, for example, 10 transmission cycles or 100 transmission cycles. The embodiment of this application does not limit this. The method shown in FIG9 can be applied to each transmission cycle of the data transmission interface.

[0169] S901: A first electronic device obtains a first data packet.

[0170] The first electronic device may be, for example, the first electronic device 510 shown in FIG5 , specifically, the vehicle computer chip 611 in FIG6 , the transmission chip RX721 in FIG7 , or the digital camera 811 in FIG8 . For a detailed description of the first electronic device, please refer to the above content.

[0171] In a possible implementation, the first electronic device can encapsulate the received data packet to obtain the first data packet.

[0172] Among them, the data packets received by the first electronic device may include data packets of one data stream or multiple data streams. For example, the first electronic device receives data packets of M data streams, where M is an integer greater than or equal to 1. For example, when M is equal to 3, the first electronic device receives data packets of 3 data streams. Optionally, the first electronic device can be used to encapsulate data packets received from other devices to obtain a first data packet. In some possible scenarios, the data packets that need to be encapsulated may also come from a unit inside the first electronic device. For example, the first electronic device may be a system-on-a-chip (SOC) of a car computer. The unit inside the SOC can generate H.264 / H.265 data, and the SOC can also encapsulate the H.264 / H.265 data generated internally to obtain a first data packet.

[0173] The first electronic device encapsulates the received data packets. Exemplarily, the received data packets can be grouped according to the data stream type and the data packets can be encapsulated by group. For example, taking M equal to 3 as an example, the first electronic device receives data packets from three data streams, and the three data streams are the first data stream, the second data stream, and the third data stream. The first electronic device can receive one or more data packets from the three data streams respectively, and the number of received data packets is not limited in the embodiment of the present application. For example, the first electronic device receives three data packets from the first data stream, two data packets from the second data stream, and one data packet from the third data stream. How to encapsulate the received data packets will be described in detail in the subsequent introduction and will not be described in detail here.

[0174] In some scenarios, the first electronic device may not receive a data packet of a certain data stream or a data stream has no data packet to be sent (it can be understood that the service corresponding to the data stream has no data packet to be sent), which is equivalent to a certain data stream temporarily having no corresponding data packet, or the number of data packets received by the first electronic device for a certain data stream is 0, or the number of data packets received by the first electronic device for a certain data stream during the target sending period is 0. Taking the first data stream as an example, the number of data packets received by the first electronic device for the first data stream is 0. In this scenario, the embodiment of the present application also provides a solution, which will not be described in detail here.

[0175] It should be noted that the number of data packets received by the first electronic device for each data stream may refer to data packets that have been received but not yet sent by the first electronic device. For example, the first electronic device may include a cache capable of caching data of a first numerical value. The first electronic device processes and forwards the received data packets. The data packets stored in the cache that have not yet been processed and forwarded may be referred to as the number of data packets received by the first electronic device for each data stream.

[0176] Next, we will describe how the first electronic device obtains the first data packet in different scenarios. For ease of description, the first data packet may refer to a data packet to be sent in a data stream. For example, the first data packet may be a data packet to be sent in the first data stream. The following description of the technical solution provided in this application uses the first data packet as an example of a data packet to be sent in the first data stream.

[0177] Case 1: The first electronic device receives only data packets of one data stream (eg, the first data stream). In this case, the first electronic device processes only the data packets belonging to the data stream to obtain the first data packet.

[0178] The first data packet size is a first target value, and the first target value is associated with a target bandwidth of the first data flow. The target bandwidth of the first data flow is less than or equal to the bandwidth of the communication interface of the first electronic device. The first data packet may include indication information and payload information. The size of the payload information is a second target value, and the second target value is less than the first target value.

[0179] 5 , the first electronic device 510 includes an acquiring unit 511 and a sending unit 512 . The communication interface may refer to the sending unit 512 , and the bandwidth of the communication interface may refer to the transmission bandwidth supported by the sending unit 512 .

[0180] Taking a TDM communication interface as an example, the maximum bandwidth of a TDM interface is determined by the number of TDM channels, the quantization bit width of each channel, and the sampling frequency. For example, if a TDM interface supports 8 channels of data transmission, each channel has a quantization bit width of 16 bits, and the sampling frequency is 48 kHz, the amount of data transmitted per second on the TDM interface is 8 × 16 × 48K / 8 = 6,144,000 bits = 768,000 bytes = 750 KB, resulting in a bandwidth of 750 KB / s.

[0181] It should be noted that a TDM interface can support selection of the number of TDM channels, quantization bit width, and sampling frequency. The number of channels, quantization bit width, and sampling frequency can be selected appropriately based on data flow requirements. Table 1 illustrates the number of TDM channels and quantization bit widths that a TDM interface may support.

[0182] Table 1

[0183] As shown in Table 1, Table 1 lists the four TDM channel numbers and three quantization bit width options supported by the TDM interface. Among them, the four TDM channel numbers are 4, 8, 16, and 32, and the three quantization bit widths are 16 bits, 24 bits, and 32 bits. The four TDM channel number options and the three quantization bit widths are combined to determine that TDM can support 12 transmission bandwidths, that is, the number of data bytes transmitted by the TDM interface each time is 12. Please refer to Table 1 for details and will not be described one by one here. In addition, the TDM interface can also support the selection of multiple sampling frequencies, such as 24KHz, 48KHz, or 96KHz. It is understandable that the TDM interface may support the selection of more or fewer parameters (channel number, quantization bit width, and sampling frequency), and the parameters provided in Table 1 should not be used as a limitation to this solution.

[0184] Before a TDM interface starts data transmission, you can determine the interface's transmission bandwidth by selecting a combination of the number of TDM channels supported, the quantization bit width, and the sampling frequency. For example, if the interface supports 16 channels, the quantization bit width is 16 bits, and the sampling frequency is 48 kHz, the interface's transmission bandwidth is 1.5 MB / s.

[0185] In a possible implementation, the number of paths, quantization bit width, and sampling frequency of the TDM interface can be flexibly determined.

[0186] Method 1: The number of channels, quantization bit width, and sampling frequency of the TDM interface can be determined through pre-configuration. For example, after clarifying the data flow requirements of the TDM interface, appropriate parameters can be selected from the parameters supported by the TDM interface to determine the number of channels, quantization bit width, and sampling frequency of the TDM interface.

[0187] Method 2: The number of channels, quantization bit width, and sampling frequency of the TDM interface can also be determined by the user's choice. For example, when the data stream requirements of the TDM interface change, the user can reselect the number of channels, quantization bit width, and sampling frequency of the TDM interface. Specifically, when the number of data streams that the TDM interface needs to transmit increases from 8 to 16, the user can re-determine the number of channels of the TDM interface to 16 channels, thereby meeting the requirements brought about by the change in data streams. Alternatively, when the number of data streams remains unchanged and the data stream rate requirement increases, the user can adjust the sampling frequency or quantization bit width to meet the requirements brought about by the change in data streams.

[0188] As mentioned above, the target bandwidth of the first data stream is less than or equal to the bandwidth of the communication interface of the first electronic device. Next, the target bandwidth of the first data stream is exemplarily described in conjunction with the bandwidth of the communication interface.

[0189] In a possible implementation manner, the target bandwidth of the first data flow may be the bandwidth required by the first data flow.

[0190] For example, the first data stream may be a video transmission data stream. The bandwidth required to transmit videos of different resolutions varies. For example, within the same encoding format, the bandwidth required to transmit a 480P resolution video is typically less than that required to transmit a 4K resolution video. Therefore, the bandwidth required for the data stream can be determined based on the data stream's needs, and the target bandwidth can be the bandwidth required for the data stream.

[0191] For example, if the required bandwidth (i.e., target bandwidth) for the first data stream after encapsulation is 1.5 MB / s, the TDM interface parameters can be configured as 16 channels, each with a 16-bit quantization bit width and a sampling frequency of 48 kHz. Accordingly, the size of the data packet to be transmitted for the first data stream is 16 × 16 = 256 bits.

[0192] It should be noted that, when the first electronic device is used to transmit a data stream, the target bandwidth may be equal to the bandwidth of the communication interface. In other words, the target bandwidth may refer to the number of bits carried by a frame of TDM signal or the number of bits that can be transmitted in a TDM cycle.

[0193] In another possible implementation, the target bandwidth may also be a bandwidth that can be allocated to the first data stream by the TDM interface.

[0194] For example, the maximum number of transmission channels supported by a TDM interface is 16, the maximum quantization bit width of each channel is 32 bits, and the sampling frequency is 48 kHz. Therefore, the maximum bandwidth that the TDM interface can allocate to the first data stream is 3 MB / s. For example, if the first data stream requires a bandwidth of 4 MB / s, but the TDM interface can allocate 3 MB / s to it, the target bandwidth is 3 MB / s. For another example, if the first data stream requires a bandwidth of 2 MB / s, but the minimum bandwidth allocated to it by the TDM interface is 3 MB / s, the target bandwidth can be 3 MB / s. For another example, if the first data stream requires a bandwidth of 1 MB / s, but the bandwidth that the TDM interface can allocate to it is 3 MB / s. Since the bandwidth that the TDM interface can allocate is greater than the bandwidth required by the first data stream, to save transmission energy, the TDM interface parameters can be appropriately adjusted so that the bandwidth that the TDM interface can allocate to the first data stream is 1 MB / s. In this case, the target bandwidth is 1 MB / s. Furthermore, a first target value may be determined based on the target bandwidth and the sampling frequency of the TDM interface. Specific steps for determining the first target value based on the target bandwidth can be found in the above description and will not be repeated here.

[0195] The above contents explain and illustrate the bandwidth, target bandwidth, first target value, etc. of the communication interface respectively. Next, based on the above description and in conjunction with the accompanying drawings, an exemplary description is given of how to obtain the first data packet.

[0196] Before specifically introducing how to obtain the first data packet, the format of the encapsulated first data packet is exemplarily described with reference to FIG. 10 .

[0197] Please refer to Figure 10, which is a schematic diagram of a data packet encapsulation format provided in an embodiment of the present application, for illustrating the format of a first data packet. As shown in Figure 10, the first data packet includes indication information and payload information, wherein the indication information includes first indication information and second indication information, etc.

[0198] The first indication information can be used to indicate the type of data stream to which the first data packet belongs, so as to facilitate the selection of an unpacking method corresponding to the data stream type for unpacking the data packet to be sent. In addition, the data packet to be sent can also be sent to the corresponding data stream node according to the type of data stream. For example, when a first electronic device receives a target data packet of two data streams, the type of data stream carried in the encapsulated data packet can be marked with the first indication information. The data receiving end can then select an unpacking method corresponding to the data stream type according to the first indication information in the received data packet to unpack the data carried in the first data packet.

[0199] It is understandable that the target data packet may refer to a data packet before encapsulation, or a data packet that needs to be encapsulated, that is, a data packet that needs to be encapsulated into a fixed size (eg, the first target value).

[0200] It should be noted that, in the case of transmitting only one data stream, since there is no need to distinguish between data streams in the data packet, the first data packet may not include indication information for indicating the type of the data stream.

[0201] The second indication information can be used to indicate the number of valid bits in the payload information. As shown in Figure 10, the payload information may include padding bits. For example, if the payload information is "target data packet + padding bits," "partial data of the target data packet + padding bits," or "padding bits," the second indication information can be used to indicate the valid bits in the payload information, thereby correctly restoring the original data and avoiding incorrect depacketization.

[0202] In a possible implementation, when the payload information includes valid data and invalid data, the valid data may be located in the first N bits of the payload information or in the last N bits of the payload information, where N is the number of valid bits.

[0203] For example, when N is 10, the second indication information indicates that the number of valid bits in the load information is 10, indicating that the load information includes 10 valid bits. The 10 valid bits can be the first 10 bits in the load information or the last 10 bits in the load information. This embodiment of the present application does not limit this.

[0204] In addition to the first indication information and the second indication information, the indication information may also include more indication information, for example, third indication information and fourth indication information.

[0205] Among them, the third indication information can be reserved indication information, and the function of the indication information can be set or the indication information can be enabled for indication when needed. Exemplarily, the third indication information can be used to indicate the type of data stream. For example, the third indication information uses "000" to represent the first data stream and "001" to represent the second data stream. The specific distinction is not limited in the embodiment of the present application. Exemplarily, the third indication information can also be used as a data stream header indication. For example, "1" is used to indicate that the data carried by the load information in the first data packet is the packet header. For another example, "0" is used to indicate that the data carried by the load information in the first data packet is the packet tail. It can be understood that the third indication information can also be used to indicate other information, and the embodiment of the present application does not limit this.

[0206] Optionally, the third indication information can also be used to indicate the data stream identifier to which the first data packet belongs, facilitating the data receiving end to transmit the payload in the first data packet to the appropriate data transmission node. For example, the first electronic device receives target data packets from two data streams, namely the first data stream and the second data stream. The data receiving end can then, based on the third indication information in the data packet, transmit the decapsulated data packet to the data transmission node indicated by the third indication information. Optionally, the data transmission node for the decapsulated data packet can be determined based on the first and third indication information.

[0207] The fourth indication information may be verification information and error correction information for at least one of the first indication information, the second indication information, and the third indication information. For example, the fourth indication information may be a forward error correction code that can correct errors in at least one of the first indication information, the second indication information, and the third indication information. Alternatively, the fourth indication information may be an error detection code (exemplarily, the fourth indication information may be a cyclic redundancy check (CRC)) that can detect errors and provide protection, thereby ensuring that the obtained indication information is accurate and effective, thereby better enabling data transmission.

[0208] It should be noted that the type of indication information included in the indication information (for example, the first indication information, the second indication information, etc.), the size of the indication information (for example, the number of bits occupied by the first indication information), and the order of the indication information are not limited in the embodiments of the present application. Before encapsulating the data packet, the type of indication information included in the encapsulated data packet, the number of indication information, and the order of the indication information can be determined in a preset manner. For example, the encapsulated data packet can be preset to include the first indication information and the second indication information, wherein the first indication information occupies 4 bits and the second indication information occupies 6 bits. The order of the indication information can be, for example, the first indication information, the second indication information, the third indication information, and the fourth indication information arranged in sequence, and the arrangement can also be the second indication information, the first indication information, the third indication information, and the fourth indication information.

[0209] Next, an exemplary introduction is given to the load information shown in FIG10 , which is used to carry the data packet to be encapsulated, or the target data packet. For example, the data packet of the first data stream received by the first electronic device. The size of the load information can be preset, or determined in combination with the first target value and the size of the indication information. For example, the size of the load information can be preset to 6 bytes, 8 bytes, or 10 bytes, etc. For another example, the first target value is 8 bytes, and the indication information determines that it needs to occupy 1 byte, then the size of the load information is 7 bytes. The size of the load information can be called the second target value, and the second target value is smaller than the first target value.

[0210] Since the size of the target data packet is uncertain, the composition of the payload information after encapsulation will also be different, including the following five forms.

[0211] Form 1: The target data packet is payload information.

[0212] If the target data packet and the payload are of the same size, the target data packet can be used as the payload of the first data packet. For example, if the target data packet is 6 bytes and the payload is also 6 bytes, the target data packet can be used as the payload of the first data packet.

[0213] Form 2: The target data packet + padding bits are payload information.

[0214] If the target data packet is smaller than the payload information, the payload information can be determined by padding with invalid bits. For example, the payload information can be composed of the target data packet + padding bits (the valid bit data is the first N bits of the payload information), or the padding bits + target data packet (the valid bit data is the last N bits of the payload information). N is the number of valid bits in the payload information. The second indication information can be used to indicate that the number of valid bits in the payload information is N. For example, N is 10, 20, or 100.

[0215] Form 3: Partial data of the target data packet.

[0216] If the target data packet is larger than the payload information, part of the target data packet can be intercepted as the payload information. For example, if the target data packet is 20 bytes and the second target value is 10 bytes, the first 10 bytes of the target data packet can be intercepted as the payload information.

[0217] In some possible scenarios, if the target packet size is an integer multiple of the payload, the target packet can be divided into multiple segments, each of which can be used as payload information. For example, if the target packet size is 50 bytes and the second target value is 10 bytes, the target packet can be divided into five consecutive segments, each of which can be used as payload information.

[0218] Form 4: Partial data of the target data packet + padding bits.

[0219] In other possible scenarios, when the size of the target data packet is not an integer multiple of the payload information, after intercepting multiple segments of data with a size of the second target value from the target data packet, the size of the remaining last segment of data will be smaller than the second target value and cannot be used as payload information. Therefore, padding bits are required so that the payload information can carry the last segment of data. For example, if the size of the target data packet is 46 bytes and the second target value is 10 bytes, then the first four segments of data with a size of 10 bytes intercepted can all be used as payload information, and the remaining segment of data with a size of 6 bytes cannot be directly used as payload information and needs to be filled with 4 bytes of bit data. Therefore, in this case, the payload information consists of part of the data of the target data packet + padding bits. In addition, the indication information in the first data packet can mark the valid data in the payload information (for example, 6 bytes of valid data) to facilitate identification and unpacking by the receiving end.

[0220] Form 5: Filling bits.

[0221] Typically, a TDM interface transmits data in different data streams using time division. A single transmission cycle includes data from one or more data streams. The receiving end extracts data within that cycle according to pre-set rules. Missing data within a transmission cycle can cause data timing errors and reception anomalies. For example, if data from five data streams is sent during a transmission cycle, but only four are transmitted, the receiving end may misidentify the data stream type and fail to receive the noise data.

[0222] To avoid the aforementioned phenomenon, if the target data packet is not received, padding bits are used as payload information to prevent data timing distortion and data reception anomalies. For example, if the payload information is 10 bits, 10 bits of "0" can be used as payload information, or 10 bits of "1" can be used as payload information, although this is not limited in this embodiment of the application. Furthermore, indication information in the first data packet can be used to indicate that the number of valid bits in the payload information is 0.

[0223] From the above description, it can be seen that the technical solution provided by the embodiment of the present application can encapsulate a data packet of any size into a data packet of the first target value. Therefore, the encapsulation process can be called adaptation layer (ADL) encapsulation, and the encapsulated data packet is called an ADL data packet. From the above analysis, it can be seen that the size of the ADL data packet is the first target value, and the first target value is configurable. For the configuration method, please refer to the above description and will not be repeated here. Therefore, the size of the ADL data packet is configurable.

[0224] The format of the first data packet is exemplarily introduced in FIG10 above. The encapsulation process of the data packet is exemplarily introduced below in conjunction with FIG11A and FIG11B.

[0225] As shown in FIG11A , it is a first data packet encapsulation schematic diagram provided in an embodiment of the present application, which is used to exemplarily introduce the situation where the size of the target data packet is a non-integer multiple of the second target value and the target data packet is not received.

[0226] Figure 11A includes target data packet 1, target data packet 2, and ADL data packets 1-7. Target data packet 1 and target data packet 2 can be, for example, data packets belonging to a first data stream received sequentially by a first electronic device. ADL data packets 1-7 are encapsulated data packets, and ADL data packets 1-7 can all be referred to as first data packets. Because the first electronic device receives data packets from only one data stream, the size of the first data packet is the number of bits that can be carried by a TDM transmission cycle.

[0227] Next, the encapsulation process shown in Figure 11A is exemplified using the first data stream as an H.264 / H.265 video data stream. The H.264 / H.265 video data stream is a variable-rate data stream, and therefore, the sizes of target data packet 1 and target data packet 2 may differ. The first data packet obtained after encapsulation may include indication information and payload information, wherein the size of the payload information is a second target value, which is smaller than the first target value, and the payload information carries the data before encapsulation. For example, if the first target value is 8 bytes, the second target value may be 6 bytes, and these 6 bytes carry the data before encapsulation.

[0228] In FIG11A , the sizes of target data packet 1 and target data packet 2 are not integer multiples of the second target value. For example, the size of target data packet 1 may be 3.5 times the second target value, and the size of target data packet 2 may be 1.8 times the second target value.

[0229] The target data packet 1 and the target data packet 2 may be segmented according to the second target value.

[0230] After segmentation, target data packet 1 includes four segments of data, of which the sizes of the first three segments are the second target value and can be directly used as the payload information of the first data packet (consistent with form three in FIG10 ), for example, as the payload information of ADL data packet 1, ADL data packet 2, and ADL data packet 3, respectively. The size of the fourth segment of data is smaller than the second target value and requires padding bits (consistent with form four in FIG10 ). The dotted box after target data packet 1 in FIG11A represents the padding bits. For example, the payload information in ADL data packet 4 consists of the fourth segment of data + padding bits.

[0231] After segmentation, target data packet 2 includes two segments of data, where the size of the first segment of data is the second target value and can be directly used as the payload information of the first data packet (consistent with Form 3 in FIG10 ), for example, as the payload information of ADL data packet 5. Similarly, the size of the second-end data is smaller than the second target value and requires padding bits (consistent with Form 4 in FIG10 ). The dashed box after target data packet 2 in FIG11A represents padding bits. For example, the payload information in ADL data packet 6 consists of the second segment of data + padding bits.

[0232] When the target data packet size is larger than the second target value, segmenting and padding the target data packet with bits can encapsulate the target data packet into multiple fixed-length data packets for output, thereby adapting to the fixed-bandwidth interface and transmitting data at a uniform rate. After segmenting and padding the data packets of different data streams to obtain fixed-length data packets, the same fixed-bandwidth interface can be reused, which can improve data transmission efficiency and save data transmission costs. If the data of a newly added data stream is encapsulated into data packets of the target length and the existing data transmission interface is reused, the online cycle of the new data stream can be reduced, saving project costs.

[0233] In one possible scenario, the first electronic device does not receive the target data packet of the first data stream, and it needs to obtain the first data packet by filling bits (conforming to form five in Figure 10), such as ADL data packet 7 in Figure 11A. The indication information in ADL data packet 7 indicates that the valid data of the load information is 0.

[0234] In the case that the target data packet is not received, the first data packet is determined by filling bits, thereby ensuring that data flow is not interrupted and reducing abnormal situations caused by data flow interruption.

[0235] FIG. 11A respectively lists the cases where the size of the target data packet is a non-integer multiple of the second target value and the case where the target data packet is not received.

[0236] Next, FIG. 11B is used to introduce the case where the size of the target data packet is an integer multiple of the second target value and the size of the target data packet is smaller than the second target value.

[0237] Please refer to Figure 11B, which is a schematic diagram of the second data packet encapsulation provided in an embodiment of the present application, including a target data packet 3, a target data packet 4, a target data packet 5, and ADL data packets 8-12. Among them, the target data packet 3, the target data packet 4, and the target data packet 5 can be, for example, data packets belonging to the first data stream received in sequence by the first electronic device, and the ADL data packets 8-12 are data packets obtained after encapsulation. The ADL data packets 8-12 can all be referred to as first data packets. Since the first electronic device only receives data packets of one data stream, the size of the first data packet is the number of bits that can be carried by one TDM transmission cycle.

[0238] Next, the encapsulation process shown in Figure 11B is exemplified using the first data stream as an H.264 / H.265 video data stream. The H.264 / H.265 video data stream is a variable-rate data stream, and therefore, the sizes of target data packets 3, 4, and 5 may differ. The first data packet obtained after encapsulation may include indication information and payload information, wherein the size of the payload information is a second target value, which is smaller than the first target value, and the payload information carries the data before encapsulation. For example, if the first target value is 8 bytes, the second target value may be 6 bytes, and these 6 bytes carry the data before encapsulation.

[0239] In FIG11B , target data packet 3 and target data packet 4 are both integer multiples of the second target value. For example, the size of target data packet 3 is 3 times the second target value. Target data packet 3 can be segmented according to the second target value. After segmentation, target data packet 3 includes 3 segments of data. The size of each segment of data is the second target value, which can be directly used as the payload information of the first data packet (in accordance with form three in FIG10 ). For example, they can be used as the payload information of ADL data packet 8, ADL data packet 9, and ADL data packet 10, respectively. The size of target data packet 4 is 1 times the second target value. Target data packet 4 can be directly used as the payload information of the first data packet (in accordance with form one in FIG10 ). For example, target data packet 4 can be used as the payload information of ADL data packet 11.

[0240] When the target data packet size is an integer multiple of the second target value, segmenting the target data packet can encapsulate the target data packet into multiple fixed-length data packets for output, thereby adapting to the fixed-bandwidth interface and enabling uniform data transmission. After segmenting the data packets of different data streams into fixed-length data packets, the same fixed-bandwidth interface can be reused, which can improve data transmission efficiency and save data transmission costs. If the data of a newly added data stream is encapsulated into data packets of the target length and the existing data transmission interface is reused, the online cycle of the new data stream can be reduced, saving project costs.

[0241] In one possible scenario, when the size of the target data packet received by the first electronic device is smaller than the second target value, the target data packet may be bit-padded so that the padded data size is equal to the second target value (in accordance with Form 2 in FIG. 10 ). For example, if the size of the target data packet 5 in FIG. 11B is smaller than the second target value, the target data packet 5 may be carried in the payload information of the first data packet by means of padding bits. The payload information of the ADL data packet 12 in FIG. 11B includes the target data packet 5 and padding bits.

[0242] If the target data packet size is less than the second target value, padding the target data packet can encapsulate the target data packet into a fixed-length data packet output, thereby adapting to the fixed-bandwidth interface and transmitting data at a uniform rate. After padding the data packets of different data streams to obtain fixed-length data packets, the same fixed-bandwidth interface can be reused, which can improve data transmission efficiency and save data transmission costs. If the data of a newly added data stream is encapsulated into a data packet of the target length and the existing data transmission interface is reused, the online cycle of the new data stream can be reduced, saving project costs.

[0243] The above Figures 11A and 11B introduce how to encapsulate the received target data packet into one or more first data packets. If the multiple received target data packets are non-integer multiples of the second target value, a large amount of bit data needs to be filled in to determine the size of the encapsulated data packet to be the second target value, which increases the additional overhead of data transmission and affects the efficiency of data transmission.

[0244] In view of this, an embodiment of the present application also provides another data encapsulation method for demonstrating the situation of encapsulating one or more data packets in one ADL packet.

[0245] In one possible scenario, the payload information in the first data packet may include data of two target data packets, as shown in FIG12A .

[0246] FIG12A is a schematic diagram of a third data encapsulation method provided in an embodiment of the present application, and FIG12A includes a target data packet 6, a target data packet 7, and ADL data packets 13-17. Target data packets 6 and 7 can be, for example, data packets belonging to a first data stream received sequentially by a first electronic device, and ADL data packets 13-17 are data packets obtained after encapsulation. ADL data packets 13-17 can all be referred to as first data packets. Since the first electronic device only receives data packets from one data stream, the size of the first data packet is the number of bits that can be carried by one TDM transmission cycle.

[0247] Next, the encapsulation process shown in Figure 12A is exemplified using the first data stream as an H.264 / H.265 video data stream. The H.264 / H.265 video data stream is a variable-rate data stream, and therefore, the sizes of target data packet 6 and target data packet 7 may be different. The first data packet obtained after encapsulation may include indication information and payload information, wherein the size of the payload information is a second target value, which is smaller than the first target value, and the payload information carries the data before encapsulation. For example, if the first target value is 8 bytes, the second target value may be 6 bytes, and these 6 bytes carry the data before encapsulation.

[0248] The sizes of target data packets 6 and 7 in FIG12A are not limited in this embodiment of the present application. For example, the size of target data packet 6 or target data packet 7 can be an integer multiple of the second target value (for example, 1 times, 2 times, etc. of the second target value) or a non-integer multiple of the second target value (for example, 0.5 times, 1.6 times, etc.). For example, the size of target data packet 6 is 3.4 times the second target value, and the size of target data packet 7 is 1.2 times the second target value.

[0249] The difference between the encapsulation method shown in Figure 12A and the encapsulation method shown in Figures 11A and 11B above is that the encapsulation method shown in Figure 12A can be combined and encapsulated, so that the load information in the first data packet obtained after encapsulation can include data of one or more target data packets, avoiding filling a large amount of bit data and reducing additional overhead.

[0250] Specifically, referring to Figure 12A , target data packet 6 is segmented according to the second target value, and the first three segments serve as payload information for ADL data packet 13, ADL data packet 14, and ADL data packet 15, respectively. The remaining segment of target data packet 6 is smaller than the second target value and cannot be directly used as payload information for ADL data packet 16. Bit padding is required.

[0251] In one possible implementation, if bit padding is required, data from subsequent packets can be used for bit padding. For example, if the fourth segment of target packet 6 is smaller than the second target value, partial data from target packet 7 can be used to fill the missing portion. Therefore, the payload information in ADL packet 16 includes data from target packets 6 and 7.

[0252] In one possible scenario, when bit filling is required and there is no subsequent data packet, invalid bit data can be used for filling. For the specific filling method, please refer to the relevant description of Figure 11A and will not be repeated here. For example, after the target data packet 7 in Figure 12A is segmented, the first segment of data and the last segment of data of the target data packet 6 constitute the payload information of the ADL data packet 16. The size of the second segment of data of the target data packet 7 is smaller than the second target value and cannot be used alone as the payload information of the ADL data packet 17. Moreover, if no new data packet belonging to the first data stream is received after the target data packet 7, the second end data can be filled with bits to constitute the payload information of the ADL data packet 17.

[0253] In another possible scenario, the payload information in the first data packet may include data of multiple target data packets, as shown in FIG12B .

[0254] FIG12B is another data encapsulation diagram provided in an embodiment of the present application, including target data packet 8, target data packet 9, target data packet 10, and ADL data packets 18-19. Target data packets 8-10 may be, for example, data packets belonging to a first data stream received sequentially by a first electronic device, and ADL data packets 18-19 are data packets obtained after encapsulation. ADL data packets 18-19 may all be referred to as first data packets.

[0255] The sizes of target data packet 8 and target data packet 9 are both smaller than the second target value, and the sum of the sizes of target data packet 8 and target data packet 9 is also smaller than the second target value. Therefore, more target data packets are required to form the payload information of ADL data packet 18. As can be seen from Figure 13, target data packet 8, target data packet 9, and part of the data of target data packet 10 constitute the payload information of ADL data packet 18. The remaining data of target data packet 10 can be encapsulated into ADL data packet 19 by using padding bits.

[0256] By combining and encapsulating multiple data packets to obtain fixed-length data packets, the number of padding bits can be reduced, allowing the communication interface to transmit as much valid data as possible and reduce the transmission of invalid data, thereby reducing unnecessary transmission overhead and improving data transmission efficiency.

[0257] It should be noted that, through the encapsulation method of Figures 12A and 12B, it is necessary to add an identifier for indicating a complete data packet in the indication information of the first data packet, so that the receiving end can smoothly recover the original target data packet. For example, in the case where the payload information of the first data packet includes data of multiple target data packets, the number of target data packets contained in the payload information and the amount of data occupied by each target data packet can be indicated in the indication information. Taking Figure 12B as an example, the payload information of the ADL data packet 18 includes data of three target data packets, and the data amounts of the three target data packets are 3 bytes, 4 bytes and 3 bytes respectively. Then the indication information of the ADL data packet 18 needs to be able to indicate that the ADL data packet 18 includes data of 3 target data packets, and the data amounts are 3 bytes, 4 bytes and 3 bytes respectively. As for how the indication information is implemented, the embodiments of the present application do not limit this. For example, the network abstraction layer (NAL) of the H.264 / H.265 video data stream can restore the scattered data to the original data packet.

[0258] The above exemplifies how the first electronic device obtains the first data packet when the first electronic device receives only a data packet of one data stream. Next, with reference to the accompanying drawings, it is exemplified how the first electronic device obtains the first data packet when the first electronic device receives data packets of multiple data streams.

[0259] Case 2: The first electronic device receives data packets of multiple data streams. In this case, the first electronic device needs to process the data packets of the multiple data streams respectively to obtain the first data packet.

[0260] Among them, multiple data streams. For example, there can be M data streams, where M is an integer greater than or equal to 1. The data packets of multiple data streams can be, for example, data packets of 8, 10 or 16 data streams, which is not limited in the embodiments of the present application. The number of data packets of different data streams that the first electronic device can receive is related to the number of channels that the communication interface can support. For example, if the communication interface supports the transmission of 48 channels of data at most, then the first electronic device can receive data packets of 48 data streams at most. In addition, bandwidth needs to be allocated for each data stream, and the specific allocation method is not limited in the embodiments of the present application. For example, it can be equal distribution, that is, multiple data streams divide the bandwidth supported by the communication interface equally, and the bandwidth occupied by each data stream is equal. For example, it can also be on-demand allocation, that is, bandwidth is allocated according to the needs of the data stream. For example, it can also be user-defined allocation, that is, the user independently configures the bandwidth occupied by each data stream.

[0261] For ease of description, the following uses the example of a first electronic device receiving data packets from three data streams to exemplify a method for obtaining a first data packet when the first electronic device receives data packets from multiple data streams. As shown in FIG13 , a fifth encapsulation schematic diagram provided in an embodiment of the present application includes a first data stream, a second data stream, and a third data stream.

[0262] In the case of receiving multiple data stream data packets, each data stream will be allocated a target bandwidth for data transmission. The principle of allocating bandwidth can be, for example, allocation according to the data stream demand, and the bandwidth used for each data stream can also be determined according to the bandwidth that can be allocated by the electronic device. The way of allocating bandwidth can be, for example, pre-configured or user-defined. For example, before the first electronic device transmits data, the bandwidth for each data stream can be configured. It is also possible to adjust the bandwidth used by the data stream during the process of data transmission by the first electronic device. The target bandwidth here is associated with the size of the above-mentioned ADL data packet, which is equivalent to the target bandwidth being equal to the size of the ADL data packet. The target bandwidth here refers to the number of bits that can be carried by a TDM cycle. Please refer to the above-mentioned related description for details and will not be repeated here.

[0263] After determining the target bandwidth of each data stream (equivalent to determining the ADL data packet size of each data stream), the data packets of each received data stream can be encapsulated using the encapsulation method shown in Figures 11A-11B or the encapsulation method shown in Figures 12A-12B. For example, a target transmission cycle can transmit 10 bytes (equivalent to the bandwidth of the communication interface being 10 bytes), and the target bandwidths allocated to the first data stream, the second data stream, and the third data stream are 3 bytes, 4 bytes, and 3 bytes, respectively. Then, the size of the ADL data packet corresponding to the first data stream needs to be 3 bytes, the size of the ADL data packet corresponding to the second data stream needs to be 4 bytes, and the size of the ADL data packet corresponding to the third data stream needs to be 3 bytes. Please refer to the corresponding description above for the specific encapsulation process, which will not be repeated here.

[0264] Exemplarily, the data packet obtained by ADL encapsulation of the first data stream is ADL1 (for example, a size of 3 bytes), the data packet obtained by ADL encapsulation of the second data stream is ADL2 (for example, a size of 4 bytes), and the data packet obtained by ADL encapsulation of the second data stream is ADL3 (for example, a size of 3 bytes). ADL1_1, ADL1_2, and ADL1_N in Figure 13 respectively represent the three ADL data packets obtained by encapsulating the first data stream, wherein ADL1_1 represents the first data packet obtained by encapsulating the first data stream, ADL1_2 represents the second data packet obtained by encapsulating the first data stream, and ADL1_N represents the Nth data packet obtained by encapsulating the first data stream. Similarly, ADL2_1, ADL2_2, and ADL2_N respectively represent the three ADL data packets obtained by encapsulating the second data stream, and ADL1_N, ADL2_N, and ADL3_N respectively represent the three ADL data packets obtained by encapsulating the first data stream.

[0265] In one possible implementation, the ADL packets of multiple data streams are sequentially encapsulated into a single TDM signal frame. The order of the ADL packets of multiple data streams within a single TDM signal frame is not limited in this embodiment of the present application. For example, the order of ADL1, ADL2, and ADL3 within a single TDM signal frame may be ADL1, ADL2, ADL3, or ADL2, ADL1, ADL3, or ADL3, ADL2, ADL1, and so on.

[0266] For example, the order of ADL packets of multiple data streams within a TDM frame can be preconfigured or user-defined. For example, the order of ADL packets for each data stream within a TDM frame can be configured before encapsulation, or the order of ADL packets for each data stream within a TDM frame can be flexibly modified during data transmission.

[0267] For ease of description, this application describes the order of ADL packets in a TDM frame as ADL1, ADL2, and ADL3. As shown in Figure 13, ADL1_1, ADL2_1, and ADL3_1 constitute the first TDM frame, ADL1_2, ADL2_2, and ADL3_2 constitute the second TDM frame, and ADL1_N, ADL2_N, and ADL3_N constitute the Nth TDM frame.

[0268] It is understood that ADL1_1, ADL2_1, ADL3_1, ADL1_2, ADL2_2, ADL3_2, ADL1_N, ADL2_N, and ADL3_N shown in FIG13 may all be first data packets, i.e., data packets encapsulated as fixed-bandwidth packets. However, during data transmission, data is transmitted as a whole within a TDM frame signal. Therefore, when a TDM frame signal includes multiple first data packets, transmitting a first data packet can be understood as transmitting a TDM frame signal carrying the first data packet.

[0269] Through the encapsulation method shown in FIG13 , multiple data streams can be encapsulated into fixed-length data packets, which facilitates data transmission through a fixed-bandwidth data transmission interface, thereby increasing data transmission rate and reducing data transmission costs.

[0270] S902: The first electronic device sends a first data packet.

[0271] Among them, the first electronic device can be, for example, the first electronic device 510 shown in Figure 5. Specifically, the first electronic device can be, for example, the car computer chip 611 in Figure 6, or the transmission chip RX721 in Figure 7, or the digital camera 811 in Figure 8, etc.

[0272] The first data packet is the first data packet obtained in step S901, for example, the first data packet shown in Figure 11A, or the first data packet shown in Figure 11B, or the first data packet shown in Figure 12A, or the first data packet shown in Figure 12B, or it can also be ADL1_1, ADL2_1, ADL3_1, ADL1_2, ADL2_2, ADL3_2, ADL1_N, ADL2_N and ADL3_N shown in Figure 13.

[0273] The first electronic device can use a TDM interface to send through a wireless channel or a wired channel. The modulation method of the signal is not limited in this embodiment of the present application. For example, it can be amplitude shift keying (ASK) modulation, frequency shift keying (FSK) modulation or phase shift keying (PSK) modulation.

[0274] FIG9 above illustrates how, by encapsulating received data packets into fixed-size packets, the encapsulated data packets can be transmitted using a fixed-bandwidth data transmission interface. This allows variable-rate data streams to transmit data using a fixed-bandwidth interface, or allows multiple data streams to share a single data transmission interface, thereby improving data transmission efficiency and reducing data transmission costs. Furthermore, the method shown in FIG9 allows newly added data streams to reuse existing data transmission interfaces, reducing the data stream's online cycle and saving data stream costs.

[0275] Next, an example is given of how the data receiving end recovers the original data packet from the received signal.

[0276] Please refer to Figure 14, which is a flowchart of another data transmission method provided in an embodiment of the present application. Optionally, it can be implemented based on the first electronic device 510 shown in Figure 5.

[0277] The data transmission method shown in Figure 14 may include one or more steps from step S1401 to step S1402. It should be understood that for the convenience of description, the order of S1401 to S1402 is described here, and it is not intended to limit the execution to the above order. The embodiment of the present application does not limit the order of execution, execution time, and number of executions of the above one or more steps. Steps S1401 to S1402 are as follows:

[0278] S1401: The second electronic device receives M data packets to be processed.

[0279] The second electronic device may be, for example, the second electronic device 520 shown in FIG5 , specifically, the DSP 622 in FIG6 , the DSP 722 in FIG7 , or the transmission chip TX812 in FIG8 . For a detailed description of the second electronic device, please refer to the above content and will not be repeated here.

[0280] The M data packets to be processed may refer to the data packets contained in a received TDM frame signal, where M is an integer greater than or equal to 1. For example, if the TDM frame signal includes only ADL data packets of one data stream (e.g., Case 1 in step S901), M is equal to 1. For another example, if the TDM frame signal includes ADL data packets of multiple data streams, M is equal to the number of data streams. For example, if the TDM frame signal includes ADL data packets of eight data streams, then M is equal to 8.

[0281] The second electronic device can use a TDM interface to receive the M data packets to be processed through a wireless signal or a wired channel. The modulation mode of the received signal is not limited in this embodiment of the application, and can be, for example, ASK modulation, FSK modulation, or PSK modulation. The process of receiving the signal may also include demultiplexing, low-noise methods, or demodulation. And finally recover the first data packet as shown in Figures 11A-11B, or the first data packet as shown in Figures 12A-12B, or the first frame signal, the second frame signal, or the third frame signal as shown in Figure 13.

[0282] S1402: The second electronic device processes M data packets to be processed.

[0283] The M data packets to be processed may be, for example, the M data packets to be processed received by the second electronic device in step S1401, where M is an integer greater than or equal to 1.

[0284] When M is equal to 1, it indicates that the second electronic device receives a TDM signal frame containing only one data packet, or that the data transmitter transmits data from only one data stream. In this case, valid data can be recovered from the data packet to be processed based on the number of valid bits indicated by the indicator information in the data packet to be processed.

[0285] The embodiments of the present application do not limit how to determine the valid bits in the load information based on the indication information.

[0286] For example, how to read out the valid information from the payload information when the number of valid bits is known can be configured in a preset manner.

[0287] For example, the size of the first data packet to be processed (one of the M data packets to be processed) is 6 bytes, of which the indication information occupies 2 bytes and the payload information occupies 4 bytes. The number of valid bits indicated by the indication information is 2 bytes, and the 2-byte data can be any 2-byte data in the payload information. Specifically, the following two methods may be used:

[0288] In the first method, the payload information is composed of valid data + invalid data, that is, the valid data is in the front and the invalid data is in the back. Then the first 2 bytes of the payload information can be used as valid data, and the remaining 2 bytes of data can be discarded.

[0289] In the second method, the payload information is composed of invalid data + valid data, that is, the invalid data is in the front and the valid data is in the back. Then the second half of the 2 bytes of the payload information can be used as valid data and the remaining 2 bytes of data can be discarded.

[0290] When M is greater than 1, this indicates that the second electronic device receives a TDM signal frame containing multiple data packets (equivalent to multiple data packets to be processed), or that the data transmitter transmits data from multiple data streams. In this case, the valid data in each data packet to be processed can also be recovered using the number of valid bits indicated by the indicator information in each data packet to be processed. For details on how to read valid bits from the payload information, please refer to the relevant content above and will not be repeated here.

[0291] In a possible implementation, after recovering valid data from the M data packets to be processed, it is also necessary to recover the target data packet. The target data packet may be, for example, the target data packet described in FIG9 .

[0292] The target data packet may refer to a data packet used by the first data stream to transmit data. For example, the target data packet may be composed of valid data in one data packet to be processed, or may be composed of valid data in multiple data packets to be processed, which is not specifically limited in the embodiments of the present application.

[0293] For the convenience of description, the data packet to be processed may also be referred to as an ADL data packet or a first data packet, that is, a data packet of a fixed size obtained through ADL processing.

[0294] For example, please refer to Figure 15, which is a packet processing diagram provided in an embodiment of the present application, including ADL packets 1-7, target packet 1 and target packet 2.

[0295] Figure 15 is used to illustrate the process of the second electronic device processing the received data packets when M is equal to 1 (the TDM interface only transmits data of one data stream). Among them, ADL data packets 1-7 represent 7 TDM frame signals received by the second electronic device in sequence, target data packet 1 is the target data packet obtained by the second electronic device processing ADL data packets 1-4, and target data packet 2 is the target data packet obtained by the second electronic device processing ADL data packets 5-6. The processing process can be, for example, that the second electronic device determines whether the ADL data packet is a packet header / packet tail and the number of valid bits based on the indication information of the ADL data packet. If the ADL data packet is not a packet tail, the valid bits in the ADL packet are stored in a cache queue. If the ADL data packet is a packet tail, the data in the cache queue is extracted and combined with the valid bit data in the ADL data packet to form a new data packet, that is, the target data packet is obtained.

[0296] For example, the indication information of ADL data packets 1-3 all indicate that the ADL data packet is not the end of the packet and the valid bits are all the payload information, and all the payload information in ADL data packets 1-3 is stored in the cache queue. The indication information of ADL data packet 4 indicates that ADL data packet 4 is the end of the packet and the number of valid bits is the target value. The valid information in ADL data packet 4 and the data in the cache queue are combined in sequence to obtain a new data packet, namely target data packet 1. Among them, the target value can be a specific number or a percentage, for example, the target value is 2 bytes, or 50%, etc. This embodiment of the present application is not limited to this.

[0297] For another example, the indication information of ADL packet 5 indicates that the ADL packet is not the end of the packet and the valid bits are all the payload information. Therefore, all the payload information in ADL packet 4 is stored in the cache queue. The indication information of ADL packet 6 indicates that ADL packet 6 is the end of the packet and the number of valid bits is the target value. The valid information in ADL packet 6 and the data in the cache queue are sequentially combined to obtain a new packet, which is the target packet 2.

[0298] For another example, the indication information of ADL data packet 7 indicates that the number of valid bits in the ADL data packet is 0, and the data packet can be directly ignored.

[0299] For example, please refer to Figure 16, which is another packet processing diagram provided in an embodiment of the present application, including ADL packets 13-17, target packet 6 and target packet 7.

[0300] FIG16 also illustrates the process by which the second electronic device processes a received data packet when M is 1 (the TDM interface transmits data on only one data stream). FIG16 differs from FIG15 in that, whereas an ADL data packet in FIG15 may only include a header and a trailer, an ADL data packet in FIG16 may include both a header and a trailer, and may also include both a header and a trailer. For example, ADL data packet 16 includes both a header and a trailer.

[0301] Among them, ADL data packets 13-17 represent 5 TDM frame signals received in sequence by the second electronic device, target data packet 6 is the target data packet obtained by the second electronic device processing ADL data packets 13-16, and target data packet 7 is the target data packet obtained by the second electronic device processing ADL data packets 16 and 17. The processing process may be, for example, that the second electronic device determines whether the ADL data packet is a packet header / packet tail and the number of valid bits based on the indication information of the ADL data packet. If the ADL data packet is not a packet tail, the valid bits in the ADL packet are stored in a cache queue. If the ADL data packet includes a packet tail, it is further determined whether the ADL data packet also includes a packet header. If it does not include a packet header, the target data packet can be obtained according to the processing method shown in Figure 15, which will not be repeated here.

[0302] If the ADL data packet also includes a header, the number of headers N is determined, and the payload information of the ADL data packet is split into N+1 parts according to the number of headers N. For example, if there is one header, the payload information is split into two parts, if there are two headers, the payload information is split into three parts, and so on. The size of each piece of data can be based on the indication information in the ADL data packet. For example, when it is indicated to be split into two parts, the size of the first part is 2 bytes, and the size of the second part is 3 bytes. The embodiment of the present application does not limit how to mark the size of each piece of data through the indication information. After the splitting is completed, the first piece of data obtained can be combined with the information in the cache queue to form a new data packet, which is the target data packet. If the second piece of data is not the end of the packet, the second piece of data can be stored in the cache queue and formed into a new data packet with the subsequent data.

[0303] For example, the indication information of ADL data packets 13-15 all indicate that the ADL data packet is not a packet tail, then the valid bit data therein can be stored in the cache queue according to the indication information (when the ADL data packet is not a packet tail, the valid bit data is the payload information). The indication information of ADL data packet 16 indicates that the ADL data packet includes a packet tail and a packet header, so the payload information of ADL data packet 16 can be divided into two parts, and also indicates that the size of the first data is 2 bytes, then the remaining data in the payload information is the second part. The first data can be combined with the data in the cache queue to form a new data packet, which is the target data packet 2. The second data can be stored in the cache queue and formed into a new data packet with the subsequent data. The indication information of ADL data packet 17 indicates that the ADL data packet only includes a packet tail, then the valid bit data in ADL data packet 17 can be restored according to the indication information, and formed into a new data packet with the data in the cache queue, which is the target data packet 7.

[0304] For example, please refer to Figure 17, which is another packet processing diagram provided in an embodiment of the present application, including a first frame TDM signal, a second frame TDM signal and a third frame TDM signal.

[0305] Figure 17 is used to illustrate the process of the second electronic device processing the received data packet when M is greater than 1 (a frame of TDM signal includes multiple data packets, such as ADL1_1, ADL2_1 and ADL3_1). The difference between Figure 17 and Figures 15-16 is that the data packet processing process shown in Figures 15 and 16 only needs to process the data packets of one data stream, but the data packet processing process shown in Figure 17 needs to process the data packets of multiple data streams at the same time, that is, the data packets of M data streams, and M can be 3, for example. When processing the data packets of multiple data streams, it is necessary to first group the data packets of the multiple data streams and process them in groups. The process of processing one of the groups is similar to the process of processing a data stream data packet shown in Figures 15 and 16. For the specific implementation process, please refer to Figures 15 and 16, which will not be repeated here.

[0306] For example, the indication information of each ADL packet in Figure 17 can be used to indicate the data stream to which the ADL packet belongs. For example, the indication information in ADL1_1, ADL1_2, and ADL1_N indicates that the ADL packet belongs to the first data stream, the indication information in ADL2_1, ADL2_2, and ADL2_N indicates that the ADL packet belongs to the second data stream, and the indication information in ADL3_1, ADL3_2, and ADL3_N indicates that the ADL packet belongs to the third data stream. In Figure 17, ADL1_1, ADL1_2, and ADL1_N are the pending data packets or the first data packet of the first data stream. ADL2_1, ADL2_2, and ADL2_N are the pending data packets or the first data packet of the second data stream. ADL3_1, ADL3_2, and ADL3_N are the pending data packets or the first data packet of the second data stream. First, the data packets to be processed in each data stream are grouped. For example, ADL1_1, ADL1_2, and ADL1_N are grouped into the first group, ADL2_1, ADL2_2, and ADL2_N into the second group, and ADL3_1, ADL3_2, and ADL3_N into the third group. The data in each group is processed according to the scheme shown in Figure 15 or Figure 16 to obtain the target data packets belonging to each group. The specific processing process is not repeated here.

[0307] The communication interface of the second electronic device is at least used to receive M data packets to be processed of data streams, where M is an integer greater than or equal to 1. A total of M data packets to be processed are received, wherein the M data packets to be processed correspond one-to-one to the M data streams, that is, the M data packets to be processed are data packets to be processed of the M data streams. Taking the first data stream among the M data streams as an example, the first data packet to be processed among the M data packets to be processed belongs to the first data stream, and the size of the first data packet to be processed is a fixed value. This is equivalent to the sizes of the data packets to be processed belonging to the first data stream being fixed values, that is, the data of the first data stream is transmitted using a fixed bandwidth. When the communication interface of the second electronic device receives data packets to be processed of multiple data streams, the data of each data stream occupies a fixed bandwidth, which is equivalent to using a communication interface with a fixed bandwidth to receive data of multiple data streams.

[0308] Furthermore, the data flow and the number of valid bits in the data packet to be processed can be determined using the indication information in the data packet to be processed. Multiple received data packets to be processed can be grouped according to the data flow, and the data in each group can be recovered using the number of valid bits to obtain the target data packet.

[0309] The following describes an apparatus for implementing the aforementioned data transmission method.

[0310] It should be understood that the division of the units in the device provided in the embodiments of the present application is only a division of logical functions, and in actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. In addition, the units in the device can be implemented in the form of a processor calling software; for example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or to implement the functions of each unit of the device, wherein the processor is, for example, a general-purpose processor, such as a central processing unit (CPU) or a microprocessor, and the memory is a memory within the device or a memory outside the device. Alternatively, the units in the device can be implemented in the form of hardware circuits, and the functions of some or all of the units can be realized by designing the hardware circuits. The hardware circuit can be understood as one or more processors. For example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC), which realizes the functions of some or all of the above units by designing the logical relationship of the components in the circuit. For another example, in another implementation, the hardware circuit can be implemented by a programmable logic device (PLD). Taking a field programmable gate array (FPGA) as an example, it can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by configuring the configuration file, thereby realizing the functions of some or all of the above units. All units of the above devices can be implemented in the form of software called by the processor, or in the form of hardware circuits, or in part by the form of software called by the processor, and the rest by hardware circuits.

[0311] It can be seen that each unit in the following device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0312] In addition, the various units in the above apparatus may be fully or partially integrated together, or may be implemented independently. In one implementation, these units are integrated together and implemented in the form of a system on a chip. The SOC may include at least one processor for implementing any of the above methods or implementing the functions of the various units of the apparatus. The at least one processor may be of different types, such as a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.

[0313] Two possible arrangements are listed below.

[0314] Please refer to Figure 18, which is a schematic diagram of the structure of a signal transmission device provided in an embodiment of the present application. Signal transmission device 180 includes an acquisition module 1801 and a transmission module 1802. Acquisition module 1801 can be used to perform operations such as determination, calculation, generation, and detection, and / or to support other processes of the aforementioned embodiments. Transmission module 1802 can be used to participate in the signal transmission process, including but not limited to signal generation, modulation, and transmission.

[0315] Optionally, the signal transmitting device 180 may be an independent device or a device included in an independent device (e.g., the first electronic device 510), such as a chip, a software module, or an integrated circuit. The signal transmitting device 180 is used to implement the aforementioned data transmission method, such as the data transmission method shown in FIG9 .

[0316] As a possible implementation, the acquisition module 1801 is configured to acquire a first data packet, where the first data packet is a data packet to be sent in a first data flow.

[0317] The sending module 1802 is configured to send a first data packet.

[0318] Among them, the size of the data packet to be sent of the first data stream is a first target value, and the above-mentioned first target value is associated with the target bandwidth of the above-mentioned first data stream; the above-mentioned first data stream is a data stream among the above-mentioned M data streams, and the above-mentioned target bandwidth is less than or equal to the bandwidth of the above-mentioned communication interface; the above-mentioned data packet to be sent includes indication information and load information, and the size of the above-mentioned load information is a second target value, and the above-mentioned second target value is less than the above-mentioned first target value.

[0319] Optionally, the above-mentioned acquisition module 1801 and sending module 1802 are modules in the first electronic device. The sending module 1802 can be, for example, a communication interface in the first electronic device, which is used to send at least M data flow quotas of data packets to be sent, where M is an integer greater than or equal to 1, for example, M is 8, 16 or 32.

[0320] As a possible implementation manner, when the size of the target data packet of the first data stream is smaller than the second target value, the payload information of the first data packet includes the target data packet and padding bits.

[0321] As a possible implementation manner, when the size of the target data packet of the first data flow is equal to the second target value, the payload information of the first data packet is the target data packet.

[0322] As a possible implementation, when the target data packet of the above-mentioned first data stream is N times the above-mentioned second target value, N is an integer greater than or equal to 1; the above-mentioned target data packet is composed of N segments of data, the size of each segment of the above-mentioned N segments of data is the above-mentioned second target value, and the load information of the above-mentioned first data packet is one segment of the above-mentioned N segments of data.

[0323] As a possible implementation, when the size of the target data packet of the above-mentioned first data stream is L times the above-mentioned second target value, L is not an integer; the above-mentioned target data packet is composed of P segments of data, and P is an integer rounded up from L; the above-mentioned P segments of data include P-1 segments of data and the Pth segment of data; the size of each segment of data in the above-mentioned P-1 segments of data is the above-mentioned second target value, and the size of the above-mentioned Pth segment of data is smaller than the above-mentioned second target value; the load information of the above-mentioned first data packet is one segment of the above-mentioned P-1 segments of data, or the load information of the above-mentioned first data packet includes the Pth segment of data and padding bits.

[0324] As a possible implementation manner, when the first electronic device does not receive the target data packet of the first data stream, the number of valid bits included in the first data packet is zero.

[0325] As a possible implementation, the to-be-sent data packets of the M data streams are sent sequentially through the communication interface.

[0326] As a possible implementation manner, the above-mentioned indication information includes first indication information, and the above-mentioned first indication information is used to indicate the data flow to which the above-mentioned data packet to be sent belongs.

[0327] As a possible implementation manner, the above-mentioned indication information includes second indication information, and the above-mentioned second indication information is used to indicate the number of valid bits in the above-mentioned data packet to be sent.

[0328] As a possible implementation manner, the above-mentioned indication information includes third indication information, and the above-mentioned third indication information is used to indicate the data flow to which the above-mentioned data packet to be sent belongs.

[0329] As a possible implementation manner, the above-mentioned first data packet is the data packet to be sent of the first data stream, including: the above-mentioned first data packet is the data packet to be sent of the first data stream in the target transmission period, and the above-mentioned communication interface is at least used to send the data packets to be sent of the above-mentioned M data streams in the above-mentioned target transmission period.

[0330] As a possible implementation, the above-mentioned communication interface includes a time division multiplexing TDM interface.

[0331] Please refer to Figure 19, which is a schematic diagram of the structure of a signal receiving device provided in an embodiment of the present application. Signal receiving device 190 includes a receiving module 1901 and a processing module 1902. Processing module 1902 can be used to perform operations such as determination, calculation, generation, and detection, and / or to support other processes of the aforementioned embodiments. Receiving module 1901 can be used to participate in the signal reception process, including but not limited to signal reception, demodulation, and recovery.

[0332] Optionally, the signal receiving device 190 may be an independent device, or a device included in an independent device (e.g., the second electronic device 520), such as a chip, a software module, or an integrated circuit. The signal receiving device 190 is used to implement the aforementioned data transmission method, such as the data transmission method shown in FIG. 15 .

[0333] As a possible implementation, the receiving module 1901 is configured to receive M data packets to be processed;

[0334] The processing module 1902 is used to process the M data packets to be processed;

[0335] Among them, the first data packet to be processed among the above-mentioned M data packets to be processed belongs to the first data stream, the above-mentioned first data packet to be processed includes indication information and load information, and the above-mentioned first data stream is a data stream among the above-mentioned M data streams; the size of the above-mentioned first data packet to be processed is a first target value, and the above-mentioned first target value is associated with the target bandwidth for transmitting the above-mentioned first data stream, and the above-mentioned target bandwidth is less than or equal to the bandwidth of the above-mentioned communication interface; the size of the above-mentioned load information is a second target value, and the above-mentioned second target value is less than the above-mentioned first target value.

[0336] Optionally, the upper receiving module 1901 and the processing module 1902 belong to the second electronic device, wherein the receiving module 1901 can be, for example, a communication interface of the second electronic device, which is used to receive M data streams of data packets to be processed, where M is an integer greater than or equal to 1, for example, M is 3.

[0337] As a possible implementation manner, the target data packet of the first data flow includes valid bits in the payload information.

[0338] As a possible implementation manner, the indication information includes first indication information, and the first indication information is used to indicate the data flow to which the first data packet to be processed belongs.

[0339] As a possible implementation manner, the above-mentioned indication information further includes second indication information, and the above-mentioned second indication information is used to indicate the number of valid bits in the above-mentioned load information.

[0340] As a possible implementation manner, the above-mentioned indication information includes third indication information, and the above-mentioned third indication information is used to indicate the data flow to which the above-mentioned data packet to be sent belongs.

[0341] As a possible implementation manner, the above-mentioned first data packet is the data packet to be sent of the first data stream, including: the above-mentioned first data packet is the data packet to be sent of the first data stream in the target transmission period, and the above-mentioned communication interface is at least used to send the data packets to be sent of the above-mentioned M data streams in the above-mentioned target transmission period.

[0342] As a possible implementation, the communication interface includes a TDM interface.

[0343] Please refer to Figure 20, which is a schematic diagram of the structure of another possible signal transmitting device 200 provided in an embodiment of the present application. The signal transmitting device 200 may include at least one processor 2001 and a communication interface 2002. Optionally, it may also include at least one memory 2003. Further optionally, it may also include a connecting line 2004, wherein the processor 2001, the communication interface 2002 and / or the memory 2003 are connected via the connecting line 2004, communicate with each other via the connecting line 2004, and transmit control and / or data signals. Optionally, the signal transmitting device 200 can be an independent device, such as an independent device such as an ECU or a car box (T-box), or it can be a device contained in an independent device, such as a chip, a software module, or an integrated circuit.

[0344] in:

[0345] (1) The processor 2001 is a module that performs arithmetic operations and / or logical operations, and may specifically include one or more of the following devices: CPU, MCU, GPU, MPU, ASIC, FPGA, CPLD, coprocessor (to assist the central processing unit in completing corresponding processing and applications), and / or NPU, etc.

[0346] (2) The communication interface 2002 can be used to provide information input or output for the at least one processor. In some possible scenarios, the communication interface 2002 may include an interface circuit. And / or, the communication interface 2002 can be used to receive data sent from the outside and / or send data to the outside. For example, the communication interface 2002 may include a wired link interface such as an Ethernet cable, or a wireless link (Wi-Fi, Bluetooth, general wireless transmission, vehicle-mounted short-range communication technology and other short-range wireless communication technologies, etc.) interface. Optionally, the communication interface 2002 may also include a transmitter (such as a radio frequency transmitter, antenna, etc.) coupled to the interface, or a receiver, etc.

[0347] Alternatively, if the signal transmitting apparatus 200 is a standalone device, the communication interface 2002 may include a receiver and a transmitter. The receiver and the transmitter may be the same component or different components. When the receiver and the transmitter are the same component, the component may be referred to as a transceiver.

[0348] Optionally, if the signal transmitting device 200 is a chip or a circuit, the communication interface 2002 may include an input interface and an output interface. The input interface and the output interface may be the same interface, or may be different interfaces.

[0349] Optionally, the functions of the communication interface 2002 may be implemented by a transceiver circuit or a dedicated transceiver chip. The processor 2001 may be implemented by a dedicated processing chip, a processing circuit, a processor or a general-purpose chip.

[0350] (3) Memory 2003 is used to provide storage space, which can store data such as operating systems and computer programs. Memory 2003 can be one or a combination of random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM).

[0351] The functions and actions of the modules or units in the signal transmitting device 200 listed above are merely exemplary.

[0352] Each functional unit in the signal transmitting device 200 can be used to implement the aforementioned data transmission method. To avoid redundancy, a detailed description thereof is omitted here.

[0353] Optionally, the processor 2001 may be a processor specifically used to execute the aforementioned method (for convenience of distinction, referred to as a dedicated processor), or a processor that executes the aforementioned method by calling a computer program (for convenience of distinction, referred to as a dedicated processor). Optionally, the at least one processor may include both a dedicated processor and a general-purpose processor.

[0354] Optionally, in the case where the computing device includes at least one memory 2003 , if the processor 2001 implements the aforementioned data transmission method by calling a computer program, the computer program may be stored in the memory 2003 .

[0355] Please refer to Figure 21, which is a structural diagram of another possible signal receiving device 210 provided in an embodiment of the present application. The signal receiving device 210 may include at least one processor 2101 and a communication interface 2102. Optionally, it may also include at least one memory 2103. Further optionally, it may also include a connecting line 2104, wherein the processor 2101, the communication interface 2102 and / or the memory 2103 are connected via the connecting line 2104, communicate with each other via the connecting line 2104, and transmit control and / or data signals. Optionally, the signal receiving device 210 can be an independent device, such as an independent device such as an ECU, a car box (T-box), etc., or it can be a device contained in an independent device, such as a chip, a software module, or an integrated circuit.

[0356] in:

[0357] (1) The processor 2101 may be a module that performs arithmetic operations and / or logical operations, and may specifically include one or more of the following devices: a CPU, an MCU, a GPU, an MPU, an ASIC, an FPGA, a CPLD, a coprocessor (to assist the central processing unit in completing corresponding processing and applications), and / or an NPU, etc.

[0358] (2) The communication interface 2102 can be used to provide information input or output for the at least one processor. In some possible scenarios, the communication interface 2102 may include an interface circuit. And / or, the communication interface 2102 can be used to receive data sent from the outside and / or send data to the outside. For example, the communication interface 2102 may include a wired link interface such as an Ethernet cable, or a wireless link (Wi-Fi, Bluetooth, general wireless transmission, vehicle-mounted short-range communication technology and other short-range wireless communication technologies, etc.) interface. Optionally, the communication interface 2102 may also include a transmitter (such as a radio frequency transmitter, antenna, etc.) coupled to the interface, or a receiver, etc.

[0359] Alternatively, if the signal receiving device 210 is a standalone device, the communication interface 2102 may include a receiver and a transmitter. The receiver and the transmitter may be the same component or different components. When the receiver and the transmitter are the same component, the component may be referred to as a transceiver.

[0360] Optionally, if the signal receiving device 210 is a chip or a circuit, the communication interface 2102 may include an input interface and an output interface. The input interface and the output interface may be the same interface, or may be different interfaces.

[0361] Optionally, the functions of the communication interface 2102 may be implemented by a transceiver circuit or a dedicated transceiver chip. The processor 2101 may be implemented by a dedicated processing chip, a processing circuit, a processor or a general-purpose chip.

[0362] (3) Memory 2103 is used to provide storage space, which can store data such as operating systems and computer programs. Memory 2103 can be one or a combination of random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM).

[0363] The functions and actions of the modules or units in the signal receiving device 210 listed above are merely exemplary.

[0364] Each functional unit in the signal receiving device 210 can be used to implement the aforementioned data transmission method. To avoid redundancy, a detailed description thereof is omitted here.

[0365] Optionally, the processor 2101 may be a processor specifically used to execute the aforementioned method (for convenience of distinction, referred to as a dedicated processor), or a processor that executes the aforementioned method by calling a computer program (for convenience of distinction, referred to as a dedicated processor). Optionally, the at least one processor may include both a dedicated processor and a general-purpose processor.

[0366] Optionally, in the case where the computing device includes at least one memory 2103 , if the processor 2101 implements the aforementioned data transmission method by calling a computer program, the computer program may be stored in the memory 2103 .

[0367] The present application also provides a chip system, comprising a processor and a communication interface, wherein the communication interface is configured to receive and / or transmit data, and / or the communication interface is configured to provide input and / or output to the processor. The chip system is configured to implement the aforementioned data transmission method, such as the data transmission method shown in FIG9 or FIG15 .

[0368] An embodiment of the present application also provides a terminal, which includes the aforementioned signal transmitting device and / or signal receiving device, for example, including one or more of the following: signal transmitting device 180, signal receiving device 190, signal transmitting device 200 or signal receiving device 210.

[0369] As a possible implementation method, the terminal may be an intelligent terminal or transportation tool such as a vehicle, a drone, or a robot.

[0370] An embodiment of the present application also provides a data transmission system, including a signal transmitting device and a signal receiving device, for example, including a signal transmitting device 180 and a signal receiving device 190, or a signal transmitting device 180 and a signal receiving device 210, or a signal transmitting device 200 and a signal receiving device 190, a signal transmitting device 200 and a signal receiving device 210.

[0371] An embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on at least one processor, the aforementioned data transmission method is implemented, such as the data transmission method shown in Figures 9 and 14.

[0372] An embodiment of the present application also provides a computer program product, which includes computer instructions and, when executed by a computing device, implements the aforementioned data transmission method, such as the data transmission method shown in Figures 9 and 14.

[0373] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

Claims

1. A data transmission method, characterized in that: The method is applied to a first electronic device; the first electronic device includes a communication interface, the communication interface is at least used to send data packets to be sent of M data streams, M is an integer greater than or equal to 1; the method includes: Acquire a first data packet, where the first data packet is a data packet to be sent of a first data flow; Sending the first data packet; Among them, the size of the data packet to be sent of the first data stream is a first target value, and the first target value is associated with the target bandwidth of the first data stream; the first data stream is one of the M data streams, and the target bandwidth is less than or equal to the bandwidth of the communication interface; the data packet to be sent includes indication information and load information, the size of the load information is a second target value, and the second target value is less than the first target value.

2. The method according to claim 1, characterized in that When the size of the target data packet of the first data stream is N times the second target value, N is an integer greater than or equal to 1; the target data packet is composed of N segments of data, the size of each segment of the N segments of data is the second target value, and the load information of the first data packet is one segment of the N segments of data.

3. The method according to claim 1, characterized in that When the size of the target data packet of the first data stream is L times the second target value, L is not an integer, and L is greater than 1; the target data packet consists of P segments of data, P is an integer rounded up from L; the P segments of data include P-1 segments of data and the Pth segment of data; the size of each segment of data in the P-1 segments of data is the second target value, and the size of the Pth segment of data is smaller than the second target value; the load information of the first data packet is one segment of the P-1 segments of data, or the load information of the first data packet includes the Pth segment of data and padding bits.

4. The method according to any one of claims 1 to 3, characterized in that: When the first electronic device does not receive the target data packet of the first data stream, the load information of the first data packet is all filling bits.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The to-be-sent data packets of the M data streams are sent sequentially through the communication interface.

6. The method according to any one of claims 1 to 5, characterized in that: The indication information includes first indication information, and the first indication information is used to indicate the type of data flow to which the data packet to be sent belongs.

7. The method according to any one of claims 1 to 6, characterized in that: The indication information includes second indication information, and the second indication information is used to indicate the number of valid bits in the data packet to be sent.

8. The method according to any one of claims 1 to 7, characterized in that: The indication information includes third indication information, and the third indication information is used to indicate the data flow identifier to which the data packet to be sent belongs.

9. The method according to any one of claims 1 to 8, characterized in that: The first data packet is a data packet to be sent of the first data flow, including: The first data packet is a data packet to be sent of the first data stream in a target transmission period, and the communication interface is used at least to send the data packets to be sent of the M data streams in the target transmission period.

10. The method according to any one of claims 1 to 9, characterized in that: The communication interface comprises a time division multiplexing TDM interface.

11. A data transmission method, characterized in that: The method is applied to a second electronic device; the second electronic device includes a communication interface, the communication interface is used to receive M data streams of to-be-processed data packets, M is an integer greater than or equal to 1; the method includes: Receive M data packets to be processed; Processing the M data packets to be processed; The first data packet to be processed among the M data packets to be processed belongs to the first data stream, the first data packet to be processed includes indication information and load information, and the first data stream is one of the M data streams; the size of the first data packet to be processed is the first destination data stream. A target value is set, and the first target value is associated with a target bandwidth for transmitting the first data stream, and the target bandwidth is less than or equal to the bandwidth of the communication interface; the size of the load information is a second target value, and the second target value is less than the first target value.

12. The method according to claim 11, characterized in that The target data packet of the first data flow includes valid bits in the payload information.

13. The method according to claim 11 or 12, characterized in that: The indication information includes first indication information, and the first indication information is used to indicate the data flow type to which the first to-be-processed data packet belongs.

14. The method according to any one of claims 11 to 13, characterized in that: The indication information further includes second indication information, where the second indication information is used to indicate the number of valid bits in the load information.

15. The method according to any one of claims 11 to 14, characterized in that: The indication information further includes third indication information, and the third indication information is used to indicate the data flow identifier to which the first data packet to be processed belongs.

16. The method according to any one of claims 11 to 15, characterized in that: The communication interface comprises a TDM interface.

17. A data transmission device, characterized in that: The data transmission device comprises a module for executing the method of any one of claims 1-10, or the method of any one of claims 11-16.

18. A data transmission system, characterized in that: The data transmission system includes a first electronic device and a second electronic device; the first electronic device is used to execute the method described in any one of claims 1-10, and the second electronic device is used to execute the method described in any one of claims 11-16.

19. A communication device, characterized in that: The communication device includes a processor and a storage medium, wherein the storage medium stores instructions, and when the instructions are executed by the processor, the method according to any one of claims 1 to 10 or the method according to any one of claims 11 to 16 is implemented.

20. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions, and when the instructions are executed by a processor, the method of any one of claims 1 to 10 or the method of any one of claims 11 to 16 is implemented.

21. A computer program product, characterized in that The computer program product comprises instructions, and when the instructions are executed by a processor, the method according to any one of claims 1 to 10 or the method according to any one of claims 11 to 16 is implemented.