Data transmission method, chip, and storage medium
By directly transmitting data packets in the physical layer of the target node in the automotive electronic control unit (ECU), the problems of large transmission delay and low bandwidth utilization are solved, and more efficient data transmission is achieved.
Patent Information
- Application Number
- PCT/CN2024/077133
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-26
- Filing Date
- 2024-02-09
- Publication Date
- 2025-03-06
AI Technical Summary
During data transmission, existing automotive electronic control units (ECUs) have low bandwidth utilization and large transmission delay, which is mainly due to the complex and verbose packet packaging caused by multi-layer protocol processing.
By directly transmitting data packets at the physical layer of the target node, avoiding multi-layer protocol processing, and directly sending the data packets to be transmitted to the downstream nodes through the physical layer.
It improves the bandwidth utilization and transmission efficiency of data transmission, reduces transmission delay, and realizes real-time data transmission of target nodes.
Smart Images

Figure CN2024077133_06032025_PF_FP_ABST
Abstract
Description
Data transmission method, chip and storage medium
[0001] This application claims priority to PCT patent application filed on August 25, 2023, with application number "PCT / CN2023 / 115046" and patent name "A data forwarding method, chip and electronic device", and PCT patent application filed on December 26, 2023, with application number "PCT / CN2023 / 142094" and patent name "Networked data transmission method, chip and communication system", all of which are incorporated herein by reference. Technical Field
[0002] The embodiments of the present application relate to the field of electronic communication technology, and in particular to a data transmission method, chip, and storage medium. Background Art
[0003] As cars become more and more intelligent, there are more and more Electronic Control Units (ECUs) in cars. Data transmission inside the car is achieved through ECUs.
[0004] Currently, as shown in Figure 1, an ECU typically includes a sensor, a microcontroller unit (MCU), and an Ethernet physical layer (PHY) chip. Based on this, the specific process of ECU data transmission can be as follows: after the MCU obtains the sensor data to be transmitted from the sensor, the MCU can encapsulate the sensor data to obtain an encapsulated data packet. The Ethernet physical layer chip then sends the encapsulated data packet to the Ethernet switch connected to the ECU. The Ethernet switch forwards the encapsulated data packet to the central processing unit, so that the central processing unit can parse the encapsulated data packet to obtain the sensor data.
[0005] However, data transmitted in accordance with standard Ethernet usually needs to be processed by multiple layers of protocols. For example, referring to FIG2 , taking the application layer protocol as the Constrained Application Protocol (CoAP) as an example, the data of the external device needs to be processed by the physical layer, Media Access Control Address (MAC) layer, Internet Protocol (IP) layer, User Datagram Protocol (UDP) layer and CoAP layer in the standard network model before it can be sent to the switch to realize data transmission between the ECU and the switch. Therefore, after the above-mentioned sensor data is encapsulated by the MCU, the encapsulated data packet includes not only the sensor data, but also the protocol headers corresponding to the above-mentioned layers. For example, referring to FIG3 , the encapsulated data packet may include a MAC header, an IP header, a UDP / Transmission Control Protocol (TCP) header, an application layer protocol header, sensor data and a cyclic redundancy check 32 (Cyclic Redundancy Check 32). 32, CRC32) check data, etc., and thus, in order to transmit the above-mentioned sensor data, the ECU needs to transmit an encapsulated data packet including the sensor data and more other data, so that the sensor data accounts for a small proportion in the encapsulated data packet, and therefore the bandwidth utilization rate of the ECU for data transmission is low; and when the ECU is transmitting data, delays are generated in the processes of the MCU obtaining the data to be transmitted from the sensor, the MCU encapsulating the sensor data, the encapsulated data packet being transmitted in the switch, and the central processing unit performing parsing. Therefore, the transmission delay of the ECU for data transmission is relatively large.
[0006] Summary of the Invention
[0007] In view of this, embodiments of the present application provide a data transmission method, a chip, and a storage medium to at least partially solve the above-mentioned problems.
[0008] According to the first aspect of an embodiment of the present application, a data transmission method is provided, which is applied to a target node, and the method includes: obtaining a first data packet transmitted at the physical layer; based on a physical transmission medium used to connect a first interface of the target node and a second interface of a downstream node, sending the first data packet to the physical layer of the downstream node through the physical layer of the target node.
[0009] In a possible implementation, obtaining the first data packet transmitted at the physical layer includes: obtaining data to be transmitted, and encapsulating the data to be transmitted to obtain the first data packet.
[0010] In one possible implementation, obtaining the first data packet transmitted at the physical layer includes: based on the physical transmission medium used to connect the third interface of the target node and the fourth interface of the upstream node, receiving the second data packet transmitted at the physical layer from the physical layer of the upstream node through the physical layer of the target node; and obtaining the first data packet based on the second data packet.
[0011] In a possible implementation manner, the physical layer of the target node sends the first data packet to the physical layer of the downstream node in real-time streaming.
[0012] In one possible implementation, the first data packet includes multiple data fields, and the multiple data fields are divided into multiple time slices in time, so that the data fields arranged earlier in the multiple data fields are processed and transmitted by the target node first in time.
[0013] In one possible implementation, obtaining the first data packet based on the second data packet includes: performing at least one of the following processing on the second data packet to obtain the first data packet: i. If the second data packet includes target data, reading the target data from the second data packet, wherein the target data includes data whose destination node is the target node or public data of the transmission system where the target node is located; ii. If the data to be transmitted is obtained, writing at least part of the data to be transmitted into the second data packet; iii. If the second data packet does not include data whose destination node is the target node, and the target node does not obtain the data to be transmitted, determining the second data packet as the first data packet.
[0014] In a possible implementation, the first data packet is obtained by the target node performing real-time streaming processing on the second data packet.
[0015] In one possible implementation, the second data packet includes at least one data field, and the data field identified as idle in the second data packet is an idle field; if the second data packet includes target data, the target data is read from the second data packet, including: if the second data packet includes a first data field for loading the target data, the target data loaded in the first data field is obtained, and the first data field where the target data is located is determined as an idle field; if the data to be transmitted is obtained, at least part of the data to be transmitted is written into the second data packet, including: if the data to be transmitted is obtained, at least part of the data to be transmitted is loaded into the idle field or the second data field in the second data packet, wherein the second data field is a data field in which the priority of the data loaded in the second data packet is lower than the priority of the data to be transmitted.
[0016] In one possible implementation, if data to be transmitted is obtained, at least part of the data to be transmitted is written into the idle field or the second data field in the second data packet, including: if multiple data to be transmitted are obtained, at least part of each data to be transmitted is loaded into the idle field or the second data field in descending order of priority of the multiple data to be transmitted.
[0017] In one possible implementation, the method further includes: if the second data packet includes multiple first data fields, after obtaining the target data loaded in the multiple first data fields, processing the target data loaded in each first data field in order of priority from high to low.
[0018] In a possible implementation, the method further includes: if the retention time of the data to be transmitted in the target node is greater than a preset time threshold, and the priority of the data to be transmitted is lower than the second highest priority, then the priority of the data to be transmitted is increased.
[0019] In one possible implementation, the sequentially loading at least part of each of the data to be transmitted into the idle field or the second data field includes: for each of the data to be transmitted, if the data amount of the data to be transmitted is greater than the capacity of the data field, splitting the data to be transmitted into at least two sub-data, and loading the at least two sub-data into the idle field or the second data field respectively; if the data amount of the data to be transmitted is less than or equal to the capacity of the data field, loading the data to be transmitted into the idle field or the second data field.
[0020] In a possible implementation manner, the data to be transmitted is data acquired by the physical layer of the target node from an external device connected to the target node or a local module included in the target node.
[0021] In one possible implementation, processing is performed according to the target data loaded in each first data field, including: reading and writing an external device connected to the target node or a local module included in the target node according to the target data loaded in each first data field.
[0022] In one possible implementation, the first data packet includes at least one data field, the data field includes a data sub-block and a sub-block header, the data sub-block is used to load the main data, the sub-block header is used to load the attribute information of the main data, and the attribute information of the main data includes the data type information of the main data and the data length of the main data.
[0023] In one possible implementation, the attribute information of the main data also includes at least one or more of the idle information of the data field where the main data is located, the data transmission direction of the target node, the source node information of the main data, the destination node information of the main data, the priority information of the main data, and the serial number information of the main data.
[0024] In a possible implementation, the first data packet includes a common header, and the common header carries a preamble code corresponding to the first data packet and used for physical layer protocol identification.
[0025] In one possible implementation, the target node, the downstream node, and the upstream node are applied to a transmission system, the transmission system including a main node and multiple sub-nodes, the main node and the multiple sub-nodes are connected in sequence to form a link; the link is a ring topology, or the link is a linear topology and the first sub-node and the second sub-node are respectively located at the two ends of the link, or the link is a linear topology and the main node and the third sub-node are respectively located at the two ends of the link; the target node is any of the sub-nodes, and the upstream node and the downstream node are respectively two nodes adjacent to the target node in the link.
[0026] According to the second aspect of an embodiment of the present application, a chip is provided, comprising: a processor and a memory, wherein the processor and the memory communicate with each other; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the above-mentioned first aspect.
[0027] According to a third aspect of the embodiments of the present application, a computer storage medium is provided, on which a computer program is stored, and the program is used by a processor to execute the method of the first aspect.
[0028] According to the data transmission scheme provided by the embodiment of the present application, the target node can obtain the first data packet transmitted at the physical layer, and transmit the first data packet to the physical layer of the downstream node through the physical layer of the target node. Thus, the transmission of the first data packet is carried out at the physical layer. Compared with the data packet encapsulation of the multi-layer protocol through the MCU, the first data packet does not include multiple protocol headers, and thus the data to be transmitted in the first data packet accounts for a large proportion, thereby improving the bandwidth utilization rate of the target node for data transmission; and, since the first data packet is directly transmitted to the downstream node through the physical layer of the target node, it does not need to be transmitted through a switch, nor does it need to be more complexly encapsulated by the MCU of the target node, and furthermore, it does not need to be more complexly parsed at the downstream node, thus reducing the transmission delay of the target node for data transmission, enabling the target node to send data to the downstream node in real time, and improving transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0030] FIG1 is a schematic diagram of a vehicle-mounted networking system of the background technology of this application;
[0031] FIG2 is a schematic diagram of each layer of a network model of the background technology of this application;
[0032] FIG3 is a schematic diagram of packaged data of the background technology of this application;
[0033] FIG4 is a flow chart of a data transmission method according to an embodiment of the present application;
[0034] FIG5 is a schematic diagram of a target node connection method according to an embodiment of the present application;
[0035] FIG6 is a schematic diagram of a first data packet according to an embodiment of the present application;
[0036] FIG7 is a schematic diagram of a transmission system according to an embodiment of the present application;
[0037] FIG8 is a schematic diagram of a transmission system according to another embodiment of the present application;
[0038] FIG9 is a schematic diagram of a transmission system according to another embodiment of the present application;
[0039] FIG10 is a schematic block diagram of a chip according to an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field should fall within the scope of protection of the embodiments of the present application.
[0041] At present, as shown in Figure 1, a simplified schematic diagram of an example of an in-vehicle networking system in the relevant technology is shown. The specific process of ECU data transmission can be as follows: after the MCU included in the ECU obtains the sensor data to be transmitted from an external device such as a sensor, the MCU can encapsulate the sensor data to obtain an encapsulated data packet, and then the Ethernet physical layer chip included in the ECU sends the encapsulated data packet to the Ethernet switch connected to the ECU. The Ethernet switch forwards the encapsulated data packet to the central processing unit, so that the central processing unit can parse the encapsulated data packet to obtain the sensor data.
[0042] However, data transmitted in accordance with standard Ethernet typically undergoes multi-layer protocol processing. For example, referring to FIG2 , taking the application layer protocol as the CoAP protocol, data from external devices must be processed by the physical layer, MAC layer, IP layer, UDP layer, and CoAP layer in the standard network model before being sent to the switch to achieve data transmission between the ECU and the switch. Therefore, after the above-mentioned sensor data is encapsulated by the MCU, the encapsulated data packet includes not only the sensor data but also the protocol headers corresponding to each of the above layers. For example, referring to FIG3 , the encapsulated data packet may include a MAC header, an IP header, a UDP / TCP header, an application layer protocol header, sensor data, and CRC32 checksum data. Furthermore, in order to transmit the above-mentioned sensor data, the ECU needs to transmit an encapsulated data packet including the sensor data and a relatively large amount of other data. As a result, the sensor data accounts for a relatively small proportion of the encapsulated data packet, resulting in low bandwidth utilization for ECU data transmission. Furthermore, when the ECU transmits data, delays are generated during the processes of the MCU obtaining the data to be transmitted from the sensor, the MCU encapsulating the sensor data, the encapsulated data packet being transmitted in the switch, and the central processing unit parsing the data. Therefore, the transmission delay of the ECU data transmission is relatively large. For example, a typical transmission latency is comprised of the following: the latency for the MCU to receive data from external devices, such as sensor data (approximately 1µs), the latency for the MCU to encapsulate the sensor data into a data packet (in this example, a standard Ethernet data packet) (approximately 10µs), the latency for the data packet to travel between two switches (approximately 500µs), and the latency for the central processing unit to parse the data packet and obtain the sensor data (approximately 5µs). Such significant transmission latency makes it increasingly difficult to meet the demands of today's in-vehicle networking systems.
[0043] To address the above issues, the present invention provides a data transmission method. It should be noted that the technical solution of the present invention is not limited to the networking system applied in vehicle scenarios, but can also be applied in other scenarios.
[0044] Data transmission method
[0045] The data transmission method is described in detail below through multiple embodiments.
[0046] The data transmission method is applied to a target node. For example, the data transmission method can be applied to the target node, and the target node performs data transmission with a downstream node connected thereto through the data transmission method.
[0047] In a possible implementation, the target node is, for example, a chip, which is used for physical layer-based transmission.
[0048] FIG4 is a flow chart of a data transmission method according to an embodiment of the present application. As shown in FIG4 , the data transmission method includes the following steps:
[0049] Step 401: Acquire a first data packet transmitted at the physical layer.
[0050] Among them, the physical layer is the lowest layer in network communication. The first data packet is generated by the target node or obtained by the target node after processing the received data packet. The embodiment of the present application does not limit this; the first data packet is obtained by reading and writing data of the data packet encapsulated in the physical layer. If the first data packet is generated by the target node, the data packet encapsulated in the physical layer is encapsulated in the physical layer of the target node. If the first data packet is obtained by the target node after processing the received data packet, the data packet encapsulated in the physical layer is encapsulated in the physical layer of other nodes. The other nodes are nodes used to generate the data packet encapsulated in the physical layer.
[0051] In a specific implementation, the target node may obtain the first data packet through its physical layer.
[0052] Step 402: Based on the physical transmission medium used to connect the first interface of the target node and the second interface of the downstream node, send the first data packet to the physical layer of the downstream node through the physical layer of the target node.
[0053] In a specific embodiment, the physical layer of the target node can send the first data packet to the physical layer of the downstream node through a first interface, a physical transmission medium for connecting the first interface and the second interface, and a second interface, wherein the physical transmission medium is, for example, a coaxial cable or a twisted pair, and the twisted pair can be a shielded twisted pair or an unshielded twisted pair. For example, as shown in FIG5 , the target node is a target chip for transmission based on the physical layer, the first interface is set on the target chip, the downstream node is a downstream chip for transmission based on the physical layer, and the second interface is set on the downstream chip. Based on this, the target chip sends the first data packet to the downstream chip through the first interface, the physical transmission medium for connecting the first interface and the second interface, and the second interface, so as to realize that the physical layer of the target node sends the first data packet to the physical layer of the downstream node. The first interface and the second interface are both used to transmit physical layer data.
[0054] In one embodiment of the present application, a target node can obtain a first data packet transmitted at the physical layer, and transmit the first data packet to the physical layer of a downstream node through the physical layer of the target node. Thus, the transmission of the first data packet is performed at the physical layer. Compared with the data packet encapsulation of multi-layer protocols through the MCU, the first data packet does not include multiple protocol headers, and thus the data to be transmitted in the first data packet accounts for a large proportion, thereby improving the bandwidth utilization rate of the target node for data transmission; and, since the first data packet is directly transmitted to the downstream node through the physical layer of the target node, it does not need to be transmitted through a switch, nor does it need to be more complexly encapsulated through the MCU of the target node, and further, it does not need to be more complexly parsed at the downstream node, thus reducing the transmission delay of the target node for data transmission, enabling the target node to send data to the downstream node in real time, thereby improving transmission efficiency.
[0055] Corresponding to the first data packet being generated by the target node and the first data packet being obtained by the target node after processing the received data packet, there are at least two implementations of step 401 as follows:
[0056] In a possible implementation, step 401 includes the following specific processing: obtaining data to be transmitted, and encapsulating the data to be transmitted to obtain a first data packet.
[0057] The first data packet is generated by the target node. During the process of the target node acquiring the first data packet, the physical layer of the target node may acquire the data to be transmitted and encapsulate the data to obtain the first data packet.
[0058] In one embodiment of the present application, when the target node generates a first data packet, it can directly encapsulate the data to be transmitted through its physical layer without the need for more complex encapsulation through the MCU of the target node. This can shorten the encapsulation time of the first data packet, thereby reducing the transmission delay of the data transmission of the target node and improving the transmission efficiency.
[0059] In another possible implementation, step 401 includes the following specific processing:
[0060] receiving, through the physical layer of the target node, a second data packet transmitted at the physical layer from the physical layer of the upstream node based on a physical transmission medium for connecting the third interface of the target node and the fourth interface of the upstream node;
[0061] The first data packet is obtained according to the second data packet.
[0062] In one specific embodiment, the physical layer of the target node can receive the second data packet sent by the physical layer of the upstream node through the third interface, the physical transmission medium for connecting the third interface and the fourth interface, and the fourth interface. For example, as shown in FIG5 , the target node is a target chip for physical layer-based transmission, the third interface is provided on the target chip, and the upstream node is an upstream chip for physical layer-based transmission, and the fourth interface is provided on the upstream chip. Based on this, the target chip receives the second data packet from the upstream chip through the third interface, the physical transmission medium for connecting the third interface and the fourth interface, and the fourth interface, so as to enable the physical layer of the target node to receive the second data packet from the physical layer of the upstream node.
[0063] In one embodiment of the present application, the physical layer of the target node receives the second data packet sent by the physical layer of the upstream node through a physical transmission medium, and obtains the first data packet based on the second data packet. As a result, the data packet transmission between the upstream node and the target node is directly transmitted based on the physical layer, without the need for more complex post-encapsulation forwarding processing by the MCU of the upstream node, nor the need for more complex decapsulation processing by the target node, which can shorten the transmission time of the second data packet. Therefore, the transmission delay of data transmission between the upstream node and the target node can be reduced and the transmission efficiency can be improved. It should be understood that the process of obtaining the first data packet based on the second data packet does not require re-decapsulation and encapsulation of the data packet, and only operations such as reading and writing the second data packet are performed to obtain the first data packet.
[0064] In one possible implementation, the physical layer of the destination node transmits the first data packet to the physical layer of the downstream node in real-time streaming. Real-time streaming and processing of the data packet means that the destination node processes the data packet immediately upon arrival at the destination node, rather than waiting until the entire data packet is completely received before processing or transmitting the data packet.
[0065] In one embodiment of the present application, the target node implements data transmission and processing in real-time streaming. Therefore, compared with the switch-based transmission or other software-based or wireless transmission data packets in the related art, which need to wait until all the data of the data packet is completely received before transmission or processing, the first data packet sent by the target node can almost be processed in real time by the physical layer of the downstream node, that is, the downstream node processes and transmits immediately after obtaining a part of the data in the first data packet, thereby further reducing the data transmission delay and ensuring that the data in the first data packet can be transmitted and processed in real time.
[0066] In a possible implementation, the first data packet includes multiple data fields, which are divided into multiple time slices in time, so that the data fields arranged earlier in the multiple data fields are processed and transmitted by the target node first in time.
[0067] In the first data packet, the time corresponding to the time slice of the data field arranged earlier in the order is earlier than the time corresponding to the time slice of the data field arranged later in the order.
[0068] For example, Figure 6 is a schematic diagram of the first data packet of an embodiment of the present application. As shown in Figure 6, the first data packet includes data field 1, data field 2 and data field 3. The time corresponding to the time slice of data field 1 is before the time corresponding to the time slice of data field 2, and the time corresponding to the time slice of data field 3 is after the time corresponding to the time slice of data field 2. After receiving the first data packet, the target node can read and write data field 1, data field 2 and data field 3 in sequence, instead of receiving all the data loaded in data field 1, data field 2 and data field 3 before performing data processing, so as to achieve that the data fields with earlier arrangement order in the first data packet are processed and transmitted earlier by the target node in time.
[0069] In one embodiment of the present application, by adopting a scheme in which each data field in the first data packet has a corresponding time slice, the target node can, after receiving the first data packet, perform data processing such as reading and writing on each data field in the first data packet in sequence according to the order of arrangement of the data fields in the first data packet from front to back, so that the data fields with an earlier arrangement order in the first data packet are processed and transmitted by the target node earlier in time, so that the data fields in the first data packet are processed and transmitted immediately after being obtained, thereby reducing the delay in data transmission and ensuring that the data in the first data packet can be transmitted and processed in real time as much as possible.
[0070] In a possible implementation, obtaining the first data packet according to the second data packet includes the following processing:
[0071] Performing at least one of the following processes on the second data packet through the physical layer of the target node to obtain the first data packet:
[0072] i. If the second data packet includes target data, read the target data from the second data packet, wherein the target data includes data whose destination node is the target node or public data of the transmission system where the target node is located.
[0073] ii. If the data to be transmitted is obtained, at least part of the data to be transmitted is written into the second data packet.
[0074] iii. If the second data packet does not include data whose destination node is the target node, and the target node has not obtained the data to be transmitted, the second data packet is determined to be the first data packet.
[0075] The data type of each data loaded in the data packet can be any one of multiple data types, and the multiple data types can be local interconnect network (LIN) bus data, pulse width modulation (PWM) data, integrated circuit bus (I2C) data, serial peripheral interface (SPI) bus data, quad serial peripheral interface (QSPI) bus data, general-purpose input / output port (GPIO) data, Ethernet data, controller area network (CAN) bus data, media independent interface (MII) and various extensions and derivative versions of media independent interface data, universal asynchronous receiver / transmitter (UART) data, single edge nibble transmission protocol (SENT) bus data, peripheral sensor interface 5 (PSI5) protocol data, integrated circuit built-in audio bus (ICA) data, etc. Sound (I2S) data, time-division multiplexing (TDM) data, analog microphone (AMIC) data, digital microphone (DMIC) data, analog-to-digital converter (ADC) data, etc.
[0076] Based on this, the public data may be the public data that each node needs to obtain, such as but not limited to audio data, etc., which is not limited in the embodiments of the present application.
[0077] In one embodiment of the present application, when the target node obtains the first data packet based on the second data packet, it can obtain data from the second data packet, write the input data to the second data packet, or directly use the second data packet as the first data packet. Therefore, compared to realizing data transmission by decapsulating and repackaging data in the MCU, the target node can realize data transmission of the target node more simply and quickly by reading and writing the second data packet, thereby improving data transmission efficiency.
[0078] In one possible implementation, the physical layer of each embodiment of the present application includes an Ethernet physical layer or a private physical layer carried by low voltage differential signaling (LVDS) transmission technology. It should be understood that the embodiments of the present application do not limit the physical layer of various aspects of the present application.
[0079] In one possible implementation, the first data packet is obtained by the target node performing real-time streaming processing on the second data packet. Thus, the target node implements data transmission and processing in real-time streaming. Compared with the switch-based transmission or other software-based or wireless transmission data packets in the related technology, it is necessary to wait for all the data of the data packet to be completely received before transmission or processing. The target node can process the data in the second data packet almost in real time, that is, immediately process and transmit after obtaining a part of the data in the second data packet, thereby further reducing the data transmission delay and ensuring that the data in the second data packet can be transmitted and processed in real time.
[0080] In a possible implementation, the second data packet includes at least one data field, and the data field in the second data packet that is marked as being in an idle state is an idle field. Based on this:
[0081] If the second data packet includes the target data, the target data is read from the second data packet, including the following processing:
[0082] If the second data packet includes a first data field for loading target data, the target data loaded in the first data field is acquired, and the first data field where the target data is located is determined as an idle field.
[0083] Optionally, if the target data is public data, after obtaining the public data loaded in the first data field, the first data field where the public data is located may not be determined as an idle field, that is, the target node only reads the first data field and does not change the original data in the first data field.
[0084] If the data to be transmitted is obtained, at least part of the data to be transmitted is written into the second data packet, including the following processing:
[0085] If data to be transmitted is obtained, at least part of the data to be transmitted is loaded into an idle field or a second data field in the second data packet, wherein the second data field is a data field in which the priority of the data loaded in the second data packet is lower than the priority of the data to be transmitted.
[0086] When getting data from the second packet:
[0087] In a specific embodiment, after the target node obtains the target data loaded in the first data field of the second data packet, the first data field corresponding to the target data with the destination node being the target node may be determined as an idle field.
[0088] When writing data to the second packet:
[0089] In a specific embodiment, after the destination node obtains the data to be transmitted to be written into the second data packet, the data to be transmitted may be loaded into a free field in the second data packet.
[0090] In another specific embodiment, after the target node obtains the data to be transmitted to be written into the second data packet, it can determine whether there is a data field in the second data packet whose priority is lower than the priority of the data to be transmitted. If so, the data loaded in the data field is used as the data to be transmitted, and the data to be transmitted is loaded into the data field; otherwise, the data to be transmitted is loaded into the idle field.
[0091] In one embodiment of the present application, after obtaining target data, the destination node may determine the first data field corresponding to the target data of the destination node as an idle field. After obtaining the data to be transmitted, the destination node may load the data to be transmitted into the idle field or into a data field where the priority of the loaded data is lower than the priority of the data to be transmitted. Thus, determining the first data field corresponding to the target data of the destination node as an idle field can facilitate loading more data into the second data packet, thereby allowing more valid data to be loaded into the first data packet, thereby improving the efficiency of data transmission.
[0092] In addition, when loading the data to be transmitted into the second data packet, the data to be transmitted can be used to replace the data in the data field whose priority of the loaded data is lower than that of the data to be transmitted, thereby ensuring as much as possible that the data with higher priority is loaded into the first data packet first, so that when the target node transmits data based on the first data packet, the transmission delay of data with higher real-time requirements is reduced.
[0093] Optionally, after the target node obtains the data to be transmitted to be written into the second data packet, if it is confirmed that there is a data field in the second data packet whose priority is lower than the priority of the data to be transmitted, and the priority of the data loaded in the data field is lower than the target priority, then the priority of the data loaded in the data field is increased, for example, the priority of the data loaded in the data field is increased by one level or increased to a sub-target priority, etc. The target priority is the highest priority or the second-highest priority, etc., and this embodiment of the present application does not limit this. In this way, the possibility of data with lower priority remaining at the target node for too long can be reduced, thereby improving data transmission efficiency.
[0094] Among them, for example, the priority of data in the embodiment of the present application can be, in order from high to low, the highest priority, timeout priority, high priority and low priority. The above-mentioned second highest priority is the timeout priority. The embodiment of the present application does not limit the specific setting of the data priority.
[0095] In a possible implementation, if the data to be transmitted is obtained, writing at least part of the data to be transmitted into the idle field or the second data field in the second data packet includes the following processing:
[0096] If multiple data to be transmitted are acquired, at least part of each data to be transmitted is loaded into the idle field or the second data field in descending order of priority of the multiple data to be transmitted.
[0097] In one embodiment of the present application, if a destination node acquires multiple data items to be transmitted, at least a portion of each data item is written into a second data packet in descending order of priority. Thus, by setting data priorities, the destination node prioritizes writing higher-priority data items into the second data packet. This allows the first data packet to be loaded with higher-priority data sub-blocks, thereby improving the transmission efficiency of data with high real-time requirements when the destination node is transmitting data.
[0098] In a possible implementation, the data transmission method further includes the following processing:
[0099] If the second data packet includes multiple first data fields, after obtaining the target data loaded in the multiple first data fields, the target data loaded in each first data field is processed in descending order of priority.
[0100] In one embodiment of the present application, the target node can process the target data in the second data packet obtained by the target node in descending order of priority. Thus, the target node can prioritize processing the higher-priority data obtained from the second data packet, thereby improving the transmission efficiency of the target node for data with high real-time requirements during data transmission.
[0101] In a possible implementation, the data transmission method further includes:
[0102] If the retention time of the data to be transmitted at the target node is greater than a preset time threshold, and the priority of the data to be transmitted is lower than the second highest priority, the priority of the data to be transmitted is increased. The time threshold can be set according to actual needs and is not limited in the embodiments of the present application.
[0103] The priorities based on the data sub-blocks can be, in descending order, the highest priority, the timeout priority, the high priority, and the low priority. The second highest priority is the timeout priority:
[0104] In a specific embodiment, if the priority of the data to be transmitted is lower than the timeout priority, then when the retention time of the data to be transmitted at the target node is greater than a preset time threshold, the priority of the data to be transmitted can be raised by one level, and the retention time of the data to be transmitted at the target node can be recalculated. After the retention time of the data to be transmitted at the target node is again greater than the preset time threshold, the priority of the data to be transmitted can be raised by one level again... until the data to be transmitted is written into the second data packet, or the priority of the data to be transmitted reaches the timeout priority.
[0105] In another specific embodiment, if the priority of the data to be transmitted is lower than the timeout priority, then when the retention time of the data to be transmitted in the target node is greater than a preset time threshold, the priority of the data to be transmitted can be raised to the timeout priority.
[0106] In one embodiment of the present application, for data to be transmitted with a priority lower than the next highest priority, if the duration of the data sub-block to be written on the target node exceeds a preset duration threshold, the priority of the data to be transmitted is increased. This reduces the possibility that the data to be transmitted will not be written to the second data packet for too long due to factors such as a lack of free fields in the second data packet or a low priority of the data to be transmitted. This further reduces the possibility that the data to be transmitted will remain on the target node for too long, thereby improving the data transmission efficiency of the target node.
[0107] In a possible implementation, sequentially loading at least part of each to-be-transmitted data into the idle field or the second data field includes the following processing:
[0108] For each data to be transmitted, if the data amount of the data to be transmitted is greater than the capacity of the data field, the data to be transmitted is split into at least two sub-data, and the at least two sub-data are loaded into the idle field or the second data field respectively; if the data amount of the data to be transmitted is less than or equal to the capacity of the data field, the data to be transmitted is loaded into the idle field or the second data field.
[0109] In one embodiment of the present application, whether to split the data to be transmitted can be determined based on the relationship between the capacity of the data field and the size of the data to be transmitted. Thus, when the amount of data to be transmitted is large, the data to be transmitted can be split so as to be loaded into multiple data fields of the second data packet, thereby improving the applicability of data transmission.
[0110] In a possible implementation, the data to be transmitted is data acquired by a physical layer of the target node from an external device connected to the target node or a local module included in the target node.
[0111] In one embodiment of the present application, the data to be transmitted obtained by the target node is obtained directly through the physical layer, thereby eliminating the need for encapsulation or decapsulation operations, thereby reducing the transmission delay of the target node in transmitting data.
[0112] In a possible implementation, the processing according to the target data loaded in each first data field includes the following processing:
[0113] The external device connected to the target node or the local module included in the target node is read and written according to the target data loaded in each first data field.
[0114] Among them, if the target node is connected to an external device, the external device of the target node can be a Local Interconnect Network (LIN) bus external device, a Pulse Width Modulation (PWM) driver device, an Inter-Integrated Circuit (I2C) bus external device, a Serial Peripheral Interface (SPI) bus external device, a Quad Serial Peripheral Interface (QSPI) bus external device, a General-purpose Input / Output (GPIO) port external device, an Ethernet external device, a Controller Area Network (CAN) bus external device, a Media Independent Interface (MII) and various extensions and derivative versions of the Media Independent Interface external device, a Universal Asynchronous Receiver / Transmitter (UART) external device, a Single Edge Nibble Transmission (SENT) bus external device, a Peripheral Sensor Interface 5 (PSI) external device. 5, PSI5) protocol external device, integrated circuit internal sound bus (Inter-IC Sound, I2S) external device, time-division multiplexing (Time-Division Multiplexing, TDM) external device, analog microphone (AMIC) external device, digital microphone (DMIC) external device, analog-to-digital converter (ADC) external device. At least one of the following:
[0115] The local module included in the target node may be a register set inside the target node, which is not limited in the embodiment of the present application.
[0116] In one embodiment of the present application, the target node can read and write data from an external device connected to the target node and / or a local module included in the target node based on the target data obtained from the second data packet. Thus, when the target node reads and writes data from an external device connected to the target node and / or a local module included in the target node, it can directly use the obtained target data without performing encapsulation or decapsulation operations, thereby reducing the transmission delay of data transmission by the target node.
[0117] Corresponding to the first data packet being generated by the target node and the first data packet being obtained by the target node after processing the received second data packet, the target node and the downstream node have at least the following two application scenarios:
[0118] In one possible implementation, the first data packet is generated by a target node. The target node and the downstream node may be applied to a transmission system. The transmission system includes a master node and multiple sub-nodes. The master node and the multiple sub-nodes are sequentially connected to form a link. Based on this:
[0119] If the link is a ring topology, the target node is the master node, and the downstream node is any child node adjacent to the master node;
[0120] If the link has a linear topology and the first and second subnodes are located at the two ends of the link respectively, then the target node is the main node and the downstream node is any subnode adjacent to the main node, or the target node is the first subnode and the downstream node is a subnode adjacent to the first subnode, or the target node is the second subnode and the downstream node is a subnode adjacent to the second subnode;
[0121] If the link is a linear topology, and the master node and the third sub-node are located at both ends of the link respectively, then the target node is the master node and the downstream node is a sub-node adjacent to the master node, or the target node is the third sub-node and the downstream node is a sub-node adjacent to the third sub-node.
[0122] In another possible implementation, the first data packet is obtained by processing the received second data packet by the destination node. The destination node and the downstream node are applied to a transmission system. The transmission system includes a master node and multiple sub-nodes. The master node and the multiple sub-nodes are sequentially connected to form a link. Based on this:
[0123] The link is a ring topology, or the link is a linear topology and the first sub-node and the second sub-node are located at two ends of the link respectively, or the link is a linear topology and the master node and the third sub-node are located at two ends of the link respectively;
[0124] The target node is any child node, and the upstream node and downstream node are two nodes adjacent to the target node in the link.
[0125] For example, when the link is a ring topology, the structure of the transmission system can be as shown in Figure 7; when the link is a linear topology, and the first sub-node and the second sub-node are respectively located at the two ends of the link, the structure of the transmission system can be as shown in Figure 8, and the first sub-node in Figure 8 can be sub-node D and the second sub-node can be sub-node C; when the link is a linear topology, and the main node and the third sub-node are respectively located at the two ends of the link, the structure of the transmission system can be as shown in Figure 9, and the third sub-node in Figure 9 is sub-node A.
[0126] In Figures 7-9, subnode A, subnode B, subnode C, subnode D, subnode E, subnode F and subnode G are all subnodes, and at least some of the subnodes are connected to at least one external device. For example, subnode E is connected to external device e1, external device e2 and external device e3.
[0127] It should be noted that the embodiment of the present application does not limit the number of sub-nodes and the number of external devices connected to the sub-nodes, and in order to make the schematic diagram as concise and clear as possible, the schematic diagram of the transmission system in the embodiment of the present application only illustrates the external devices connected to the sub-node E, namely, external device e1, external device e2 and external device e3. The external devices of sub-node A, sub-node B, sub-node C, sub-node D, sub-node F and sub-node G are not illustrated in Figures 7-9.
[0128] In one embodiment of the present application, by setting the above-mentioned transmission system applied by the target node, downstream node and upstream node, compared with using multiple subsystems corresponding to different types of buses to transmit multiple types of data, the transmission system can realize mixed transmission of multiple types of data through the link, so that the wiring of the transmission system is relatively simple and the weight of the wire harness is relatively small, which is convenient for the assembly and maintenance of the transmission system. In addition, different nodes in the transmission system transmit data through the physical layer, eliminating the MCU, and the transmission system does not need to use a switch, saving costs.
[0129] Alternatively, a link in a linear topology can be obtained by disconnecting any two adjacent nodes in a ring topology. For example, the link in Figure 8 can be obtained by disconnecting subnodes C and D when subnode C fails in the link in Figure 7. The link in Figure 9 can be obtained by disconnecting the master node and subnode A when subnode A fails in the link in Figure 7.
[0130] Optionally, the master node in the transmission system can periodically send and receive data packets in the link to avoid conflicts in the data transmitted within the link as much as possible, and can also minimize the delay of data transmission within the link to meet the more stringent delay requirements of audio data.
[0131] In one possible implementation, the first data packet includes at least one data field, and the data type of the data loaded in each data field is any one of the above-mentioned multiple data types. Therefore, the data types of different data sub-blocks in the first data packet can be the same or different, and the target node can realize mixed transmission of data corresponding to different data types through the first data packet. Compared with using nodes corresponding to different data types for data transmission in order to transmit data of multiple data types, the setting of the first data packet can enable the target node to transmit data of more data types, and thus the transmission system composed of the target nodes can be simpler and less costly.
[0132] In one possible implementation, the data field includes a data sub-block and a sub-block header. The data sub-block is used to load the main data, and the sub-block header is used to load the attribute information of the main data. The attribute information of the main data includes the data type information of the main data and the data length of the main data.
[0133] In one possible implementation, the attribute information of the main data also includes at least one or more of the idle information of the data field where the main data is located, the data transmission direction of the target node, the source node information of the main data, the destination node information of the main data, the priority information of the main data, and the serial number information of the main data.
[0134] The following is a specific example using the attribute information of the main data loaded in the first data packet as an example:
[0135] The data type information may be an identifier of an interface corresponding to the main body data in the source node corresponding to the main body data. The identifier may have a data size of 5 bits. Each interface in the source node corresponding to each main body data has a corresponding data type. The data type corresponding to the same interface is single, and the data types corresponding to any two different interfaces may be the same or different.
[0136] The data length may be 8 bits.
[0137] The idle information data size of the data field where the main data is located may be 1 bit, and the idle information may be used to identify whether the data field is in an idle state;
[0138] The data transmission direction of the target node may be the direction in which the target node transmits the first data packet within the transmission system used by the target node. Typically, when the target node is the master node, the attribute information of the subject data in the first data packet generated by the target node includes the data transmission direction. Otherwise, the attribute information of the data sub-block in the first data packet typically does not include the data transmission direction.
[0139] The source node information may be a source node identifier. If the source node is the child node or the master node, the data size of the source node identifier may be 5 bits. If the source node is the child node or a branch node connected to the master node, the data size of the source node identifier may be 3 bits.
[0140] The destination node information may be a destination node identifier. If the destination node is the child node or the main node, the data size of the destination node identifier may be 5 bits. If the destination node is the child node or a branch node connected to the main node, the data size of the destination node identifier may be 3 bits.
[0141] The priority information is used to indicate the priority of the corresponding main body data, and its data size may be 2 bits;
[0142] The above-mentioned sequence number information can be a sequence number identifier with a data volume of 2 bits. In particular, since the priority corresponding to the main data is the highest priority, the first data packet can also include an alternative field for the data field where the main data is located, so that when the destination node corresponding to the main data processes the main data, if an error occurs in the main data, it is processed according to the main data in the alternative field, thereby reducing the bit error rate of the highest priority data and improving the data transmission reliability of the highest priority data. The alternative field is exactly the same as the main data loaded in the data field, but the sequence number information in the attribute information of the two is different, so that the two are distinguished by their sequence number information; the number of alternative fields of any data field with alternative fields can be 1, 2 or 3, etc. The embodiment of the present application does not limit the number of alternative fields of the data field with alternative fields. The number of data field intervals between a data field and its adjacent alternative field, and between two adjacent alternative fields of the same data field can be set to 0, 1 or 2, etc. The embodiment of the present application does not limit this.
[0143] It should be noted that the above-mentioned data type information and data length are usually essential information in the attribute information of the corresponding main data. The other information included in the attribute information of the above-mentioned main data is usually related to the application scenario and / or transmission system form of the first data packet, and the embodiments of the present application do not limit this.
[0144] The attribute information of the main data loaded in the second data packet is the same as the attribute information of the main data loaded in the first data packet, and will not be repeated in this embodiment of the application.
[0145] Based on this, when writing the data to be transmitted into the data field in the second data packet, the data to be transmitted is used as the main data, and the attribute information of the main data is generated, so that the data to be transmitted is loaded into the data sub-block of the data field as the main data, and the attribute information of the main data is loaded into the sub-block header of the data field; when reading the target data from the data field in the second data packet, the data loaded in the data field where the main data of the target data is located in the second data packet is obtained.
[0146] In one embodiment of the present application, the sub-block header is used to carry attribute information of the main data. This relatively comprehensive attribute information of the main data enables more accurate retrieval of the main data from the first or second data packets. It also enables the target node to more accurately process the main data, thereby reducing the bit error rate of data transmission. Furthermore, the first data packet can also carry data sub-blocks of different data types through the carried attribute information.
[0147] In a possible implementation, the data sub-block is further used to load a check bit, and the check bit is used to verify the main data loaded in the data sub-block.
[0148] For example, the main data in any data sub-block is multiple first values, the check bit included in the data sub-block is a second value, and the check bit is used to determine whether the sum of the corresponding main data is the check bit, so that the destination node of the main data can determine the correctness of the main data. Then, in the destination node of the main data, if it is determined that the sum of the above multiple first values is the second value, the main data is correct; otherwise, the main data is incorrect.
[0149] In one embodiment of the present application, the data sub-block is also used to install a check bit for verifying the main data, which can reduce the possibility of the target node processing erroneous main data and improve the reliability of data transmission by the target node.
[0150] Furthermore, according to the actual application scenario, the master node may specify the specific format of the data loaded in the data field. For example, if it is data for local access data, the data may include read and write instructions, address and data to be transmitted, etc.; for example, if it is SPI data, the data may include address, data length and data for interacting with external devices, etc.
[0151] In a possible implementation, as shown in FIG3 , the first data packet and the second data packet respectively further include a common header, and the common header carries a preamble code corresponding to the first data packet for physical layer protocol identification.
[0152] In a possible implementation, the public header may also carry at least one or more of system information of the transmission system where the target node is located and data type information of at least part of the main data in the data packet where the public header is located.
[0153] The following is a specific example using the public header included in the first data packet as an example:
[0154] The preamble may be a preamble for PHY physical coding sublayer (PCS) protocol identification;
[0155] The system information of the transmission system where the above-mentioned target node is located may include the shape identifier and data transmission direction identifier of the above-mentioned link, and the data volume of the shape identifier and the data transmission direction identifier can both be 1 bit; in a specific example, if the above-mentioned link is a ring topology, the shape identifier is 0, if the above-mentioned link is a linear topology, the shape identifier is 1, if the above-mentioned link is a ring topology and the first data packet is transmitted in the clockwise direction of the link, the data transmission direction identifier is 0, if the above-mentioned link is a ring topology and the first data packet is transmitted in the counterclockwise direction of the link, the data transmission direction identifier is 1, if the above-mentioned link is a linear topology, the first child node and the second child node are respectively located at the two ends of the link, and the first data packet is transmitted between any two nodes on the first sub-link, then the data transmission direction identifier is 1, if the above-mentioned link is a linear topology, the first child node and the second child node are respectively located at the two ends of the link, and the first data packet is transmitted between any two nodes on the second sub-link, then the data transmission direction identifier is 0. The first sub-link consists of the main node, the sub-node between the main node and the first sub-node, and the first sub-node; the second sub-link consists of the main node, the sub-node between the main node and the second sub-node, and the second sub-node.
[0156] The data type information of at least part of the main data in the data packet where the common header is located may include a first identifier, a second identifier, a third identifier, a fourth identifier and a fifth identifier, wherein the first identifier is used to identify whether the first data packet is loaded with main data of a data type of audio data, and its data amount may be 1 bit; the second identifier is used to identify the transmission direction of the main data of a data type of audio data loaded in the first data packet in the above-mentioned link, and its data amount may be 1 bit; the third identifier is used to identify the data length of the main data of a data type of audio data in the first data packet, and its data amount may be 5 bits; the fourth identifier is used to identify whether there is an Ethernet packet with the same transmission path on the transmission path corresponding to the first data packet in the above-mentioned link, so as to ensure that only a single Ethernet packet can be transmitted on the same transmission path as much as possible; the fifth identifier is used to indicate whether the main data of a data type of GPIO data in the first data packet needs to be expanded, and is used to identify the processing instruction information when the destination node of the main data of a data type of GPIO data in the first data packet processes the main data according to the main data.
[0157] It should be noted that the above-mentioned preamble code is usually essential information in the corresponding common header, and the other information loaded in the above-mentioned common header is usually related to the application scenario and / or transmission system form of the first data packet, and the embodiments of the present application do not limit this.
[0158] The public header in the second data packet is the same as the public header in the first data packet, and will not be repeated in this embodiment of the application.
[0159] In one embodiment of the present application, the information loaded in the public header is relatively comprehensive, which can enable the main data to be obtained more accurately from the first data packet or the second data packet, and can also enable the target node to process the main data more accurately, thereby reducing the bit error rate of data transmission.
[0160] chip
[0161] FIG10 is a schematic block diagram of a chip provided in an embodiment of the present application. The specific embodiments of the present application do not limit the specific implementation of the chip. As shown in FIG10 , the chip may include: a processor (processor) 1002 and a memory (memory) 1006. Among them:
[0162] The processor 1002 and the memory 1006 are in communication with each other.
[0163] The processor 1002 is configured to execute the program 1010 , and specifically may execute the relevant steps in any of the aforementioned data transmission method embodiments.
[0164] Specifically, the program 1010 may include program codes, which include computer operation instructions.
[0165] The processor 1002 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0166] RISC-V is an open-source instruction set architecture based on the principles of the Reduced Instruction Set (RISC). It can be applied to various fields, including microcontrollers and FPGA chips. Specifically, it has applications in areas such as IoT security, industrial control, mobile phones, and personal computers. Designed with small size, high speed, and low power consumption in mind, it is particularly suitable for modern computing devices such as warehouse-scale cloud computers, high-end mobile phones, and tiny embedded systems. With the rise of the artificial intelligence (AI) Internet of Things (AIoT), the RISC-V instruction set architecture has also received increasing attention and support, and is expected to become the next generation of widely used CPU architecture.
[0167] The computer operation instructions in the embodiments of the present application may be computer operation instructions based on the RISC-V instruction set architecture. Correspondingly, the processor 1002 may be designed based on the RISC-V instruction set. Specifically, the chip provided in the embodiments of the present application may be a chip designed using the RISC-V instruction set. The chip may execute executable code based on the configured instructions, thereby implementing the data transmission method in the above embodiments.
[0168] The memory 1006 is used to store the program 1010. The memory 1006 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0169] The program 1010 may be specifically configured to enable the processor 1002 to execute the data transmission method in any of the aforementioned embodiments.
[0170] The specific implementation of each step in program 1010 can refer to the corresponding description of the corresponding steps and units in any of the aforementioned data transmission method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding process descriptions in the aforementioned method embodiments, and will not be repeated here.
[0171] Through the chip of the embodiment of the present application, the first data packet transmitted at the physical layer can be obtained, and the first data packet can be transmitted to the physical layer of the downstream node through the physical layer of the target node. Thus, the transmission of the first data packet is carried out at the physical layer. Compared with the data packet encapsulation of the multi-layer protocol through the MCU, the first data packet does not include multiple protocol headers, and thus the data to be transmitted in the first data packet accounts for a large proportion, thereby improving the bandwidth utilization rate of the target node for data transmission; and, since the first data packet is directly transmitted to the downstream node through the physical layer of the target node, it does not need to be transmitted through a switch, nor does it need to be more complexly encapsulated by the MCU of the target node, and furthermore, it does not need to be more complexly parsed at the downstream node, so the transmission delay of the target node for data transmission can be reduced, and the target node can send data to the downstream node in real time, thereby improving transmission efficiency.
[0172] Computer storage media
[0173] This application also provides a computer-readable storage medium storing instructions for causing a machine to execute the data transmission method described herein. Specifically, a system or device equipped with a storage medium can be provided, wherein the storage medium stores software program code that implements the functions of any of the above-described embodiments, and a computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.
[0174] In this case, the program code read from the storage medium itself can realize the function of any one of the above embodiments, so the program code and the storage medium storing the program code constitute part of this application.
[0175] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code can be downloaded from a server computer via a communication network.
[0176] It should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0177] Those skilled in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for specific applications, but such implementation should not be considered to be beyond the scope of the embodiments of this application.
[0178] The above implementation methods are only used to illustrate the embodiments of the present application, and are not intended to limit the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application should be defined by the claims.
Claims
1. A data transmission method, characterized in that: Applied to a target node, the method comprises: Obtaining a first data packet transmitted at the physical layer; Based on a physical transmission medium used to connect the first interface of the target node and the second interface of the downstream node, the first data packet is sent to the physical layer of the downstream node through the physical layer of the target node.
2. The method according to claim 1, characterized in that The obtaining of a first data packet transmitted at the physical layer comprises: The data to be transmitted is obtained, and the data to be transmitted is encapsulated to obtain the first data packet.
3. The method according to claim 1, characterized in that The obtaining of a first data packet transmitted at the physical layer comprises: Based on a physical transmission medium for connecting a third interface of the target node and a fourth interface of the upstream node, receiving a second data packet transmitted at the physical layer from the physical layer of the upstream node through the physical layer of the target node; The first data packet is obtained according to the second data packet.
4. The method according to any one of claims 1 to 3, characterized in that The physical layer of the target node sends the first data packet to the physical layer of the downstream node in real-time streaming.
5. The method according to claim 4, characterized in that The first data packet includes a plurality of data fields, and the plurality of data fields are divided into a plurality of time slices in time, so that a data field arranged earlier in the plurality of data fields is processed and transmitted by the target node first in time.
6. The method according to claim 3, characterized in that The step of obtaining the first data packet according to the second data packet includes: Perform at least one of the following processing on the second data packet to obtain the first data packet: i. If the second data packet includes target data, reading the target data from the second data packet, wherein the target data includes data whose destination node is the target node or public data of a transmission system where the target node is located; ii. if data to be transmitted is obtained, writing at least part of the data to be transmitted into the second data packet; iii. If the second data packet does not include data that the destination node is the target node, and the target node has not acquired the data to be transmitted, the second data packet is determined as the first data packet.
7. The method according to claim 6, characterized in that The first data packet is obtained by the target node performing real-time streaming processing on the second data packet.
8. The method according to claim 6, characterized in that The second data packet includes at least one data field, and the data field in the second data packet marked as being in an idle state is an idle field; If the second data packet includes target data, reading the target data from the second data packet comprises: If the second data packet includes a first data field for loading the target data, acquiring the target data loaded in the first data field, and determining the first data field where the target data is located as an idle field; If the data to be transmitted is obtained, writing at least part of the data to be transmitted into the second data packet comprises: If the data to be transmitted is obtained, at least part of the data to be transmitted is loaded into the idle word in the second data packet. segment or a second data field, wherein the second data field is a data field in which the priority of the data loaded in the second data packet is lower than the priority of the data to be transmitted.
9. The method according to claim 8, characterized in that If the data to be transmitted is obtained, writing at least part of the data to be transmitted into the idle field or the second data field in the second data packet comprises: If a plurality of the data to be transmitted are acquired, at least a portion of each of the data to be transmitted is loaded into the idle field or the second data field in order of priority from high to low.
10. The method according to claim 8, characterized in that The method further comprises: If the second data packet includes multiple first data fields, after obtaining the target data loaded in the multiple first data fields, the target data loaded in each first data field is processed in order of priority from high to low.
11. The method according to claim 9 or 10, characterized in that: The method further comprises: If the retention time of the data to be transmitted in the target node is greater than a preset time threshold, and the priority of the data to be transmitted is lower than the second highest priority, the priority of the data to be transmitted is increased.
12. The method according to claim 9, characterized in that The step of sequentially loading at least part of each of the data to be transmitted into the idle field or the second data field comprises: For each of the data to be transmitted, if the data amount of the data to be transmitted is greater than the capacity of the data field, the data to be transmitted is split into at least two sub-data, and the at least two sub-data are loaded into the idle field or the second data field respectively; if the data amount of the data to be transmitted is less than or equal to the capacity of the data field, the data to be transmitted is loaded into the idle field or the second data field.
13. The method according to claim 2 or 6, characterized in that: The data to be transmitted is data acquired by the physical layer of the target node from an external device connected to the target node or a local module included in the target node.
14. The method according to claim 10, characterized in that Processing according to the target data loaded in each of the first data fields includes: The external device connected to the target node or the local module included in the target node is read and written according to the target data loaded in each of the first data fields.
15. The method according to claim 1, characterized in that The first data packet includes at least one data field, and the data field includes a data sub-block and a sub-block header. The data sub-block is used to load main data, and the sub-block header is used to load attribute information of the main data. The attribute information of the main data includes data type information of the main data and data length of the main data.
16. The method according to claim 15, characterized in that The attribute information of the main data also includes at least one or more of the idle information of the data field where the main data is located, the data transmission direction of the target node, the source node information of the main data, the destination node information of the main data, the priority information of the main data, and the sequence number information of the main data.
17. The method according to claim 1, characterized in that The first data packet includes a common header, and the common header is loaded with a preamble code corresponding to the first data packet and used for physical layer protocol identification.
18. The method according to claim 3, characterized in that The target node, the downstream node and the upstream node are applied to a transmission system, the transmission system includes a master node and a plurality of sub-nodes, the master node and the plurality of sub-nodes are sequentially connected to form a link; The link is a ring topology, or the link is a linear topology and the first sub-node and the second sub-node are respectively located at two ends of the link, or the link is a linear topology and the master node and the third sub-node are respectively located at two ends of the link; The target node is any of the child nodes, and the upstream node and the downstream node are respectively two nodes adjacent to the target node in the link.
19. A chip, comprising: A processor and a memory, the processor and the memory communicating with each other; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the data transmission method according to any one of claims 1 to 18.
20. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the data transmission method according to any one of claims 1 to 18 is implemented.
Citation Information
Patent Citations
Data forwarding method, chip, and electronic device
WO2025043406A1
Networking data transmission method, chip, and communication system
WO2025137884A1
Data transmission method and device, electronic equipment and storage medium
CN111385064A
Data transmission method and device, computer equipment and storage medium
CN114205871A
Transmission delay management method, electronic equipment and storage medium
CN115884229A
Cited By
Data transmission method, and chip and storage medium
WO2025044552A1