Data transmission method, data transmission device and embedded device

By employing aggregation transmission in data transmission between embedded devices and cellular devices, multiple data packets are aggregated into a larger data packet for transmission, thus solving the problem of insufficient network throughput and achieving a significant improvement in network throughput.

CN120416177BActive Publication Date: 2026-05-29QUECTEL TELECOM TECH CHANGZHOU CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QUECTEL TELECOM TECH CHANGZHOU CO LTD
Filing Date
2025-07-01
Publication Date
2026-05-29

Smart Images

  • Figure CN120416177B_ABST
    Figure CN120416177B_ABST
Patent Text Reader

Abstract

Provided are a data transmission method, a data transmission device and an embedded device, wherein the method is applied to the embedded device, the embedded device is connected with a local area network (LAN) device and a cellular device, and is used for enabling the LAN device to access a cellular network provided by the cellular device, the method comprising: receiving a downlink aggregated data packet sent by the cellular device; and / or sending an uplink aggregated data packet to the cellular device; wherein the downlink aggregated data packet is formed by aggregation of multiple downlink data packets, and the uplink aggregated data packet is formed by aggregation of multiple uplink data packets. In this application, the data packet transmission between the embedded device and the cellular device adopts an aggregated transmission mode. For example, multiple uplink data packets are aggregated to form an uplink aggregated data packet for transmission; for another example, multiple downlink data packets are aggregated to form a downlink aggregated data packet for transmission. In this way, the throughput of the network is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and more specifically, to a data transmission method, a data transmission apparatus, and an embedded device. Background Technology

[0002] With the development of network technology, in some networking schemes, embedded devices (such as the IPQ5018) can act as routers, connecting personal computers (PCs) and other devices within a local area network (LAN) to cellular devices (such as 4G or 5G modules). The cellular devices can connect to the embedded devices via the Remote Network Driver Interface Specification (RNDIS) to serve as wide area network (WAN) interfaces, while PCs and other devices can connect to the LAN interfaces of the embedded devices via network cables, thus enabling them to access the WAN. However, the network throughput in this networking scheme often falls short of expectations. Summary of the Invention

[0003] This application provides a data transmission method, a data transmission apparatus, and an embedded device to improve the throughput of a network system.

[0004] In a first aspect, a data transmission method is provided, the method being applied to an embedded device, the embedded device being connected to a LAN device and a cellular device, for enabling the LAN device to access a cellular network provided by the cellular device, the method comprising: receiving a downlink aggregated data packet sent by the cellular device; and / or sending an uplink aggregated data packet to the cellular device; wherein the downlink aggregated data packet is formed by aggregating multiple downlink data packets, and the uplink aggregated data packet is formed by aggregating multiple uplink data packets.

[0005] In some implementations, the maximum number of bytes in the downlink aggregated data packet is greater than 2KB and less than or equal to 16KB.

[0006] In some implementations, the method further includes sending downlink aggregation parameters to the cellular device, the downlink aggregation parameters including the maximum number of bytes of the downlink aggregated data packet.

[0007] In some implementations, sending uplink aggregated data packets to the cellular device includes: sending uplink aggregated data packets to the cellular device based on configured uplink aggregation parameters; wherein the uplink aggregation parameters include one or more of the following parameters: unit aggregation time of the uplink aggregated data packets, maximum time interval between two adjacent uplink data packets, maximum number of bytes in the uplink aggregated data packets, maximum number of data packets in the uplink aggregated data packets, and parameters for indicating that the uplink data packets should be sent immediately.

[0008] In some implementations, the uplink aggregation parameters are configured based on one or more of the following parameters sent by the cellular device: the maximum number of packets in the uplink aggregated data packets that the cellular device expects to receive, the maximum number of bytes in the uplink aggregated data packets that the cellular device expects to receive, and the byte alignment parameters of the uplink aggregated data packets that the cellular device expects to receive.

[0009] In some implementations, before sending the uplink aggregation data packet to the cellular device, the method further includes: when the uplink data packet arrives, determining whether a buffer area already exists, the buffer area being used to buffer the uplink data packet to be aggregated; if the buffer area already exists, filling the buffer area with the uplink data packet to use the uplink data packet as the uplink data packet to be aggregated.

[0010] In some implementations, filling the uplink data packet into the cache area includes: filling the uplink data packet into the cache area when the uplink data packet meets the following conditions: the size of the multiple data packets to be aggregated cached in the cache area after the uplink data packet is filled into the cache area does not exceed the maximum number of bytes of the configured uplink aggregated data packet; and / or, the number of multiple data packets to be aggregated cached in the cache area after the uplink data packet is filled into the cache area does not exceed the maximum number of data packets in the configured uplink aggregated data packet; and / or, the uplink data packet does not need to be sent immediately.

[0011] In some implementations, the method further includes: requesting the cache area if the cache area does not exist, and filling the cache area with the uplink data packets.

[0012] In some implementations, filling the uplink data packet into the buffer area includes: filling the uplink data packet into the buffer area when the uplink data packet meets the following conditions: the time interval between the uplink data packet and the previous uplink data packet is less than the configured maximum time interval between two adjacent uplink data packets; and / or, the uplink data packet does not need to be sent immediately.

[0013] In some implementations, sending the uplink aggregated data packet to the cellular device includes: sending the uplink aggregated data packet to the cellular device when the aggregation time of the uplink aggregated data packet reaches the configured unit aggregation time of the uplink aggregated data packet.

[0014] In some implementations, the embedded device includes a LAN port, a USB interface, and a first network interface. The LAN port is used to connect to the LAN device, the USB interface is used to connect to the cellular device, and the first network interface is a network interface created based on RNDIS when the USB interface is inserted into the cellular device.

[0015] In some implementations, the embedded device further includes an NSS module and a second network interface, wherein the first network interface is used to receive and send Ethernet type data packets through the CPU in the embedded device, and the second network interface is used to receive and send IP type data packets through the NSS module.

[0016] In some implementations, the second network interface is used to process IP-type uplink data packets into Ethernet-type uplink data packets and send the Ethernet-type uplink data packets to the first network interface; the first network interface is used to encapsulate the Ethernet-type uplink data packets into uplink RNDIS messages and transmit the uplink RNDIS messages to the USB interface.

[0017] In some implementations, processing IP-type uplink data packets into Ethernet-type uplink data packets includes adding the MAC address of the second network interface and / or the MAC address of the cellular device to the IP-type uplink data packets.

[0018] In some implementations, the first network interface is used to decapsulate the downlink RNDIS message sent by the USB interface into an Ethernet-type downlink data packet, process the Ethernet-type downlink data packet into an IP-type data packet, and transmit the IP-type data packet to the second network interface.

[0019] In some implementations, processing the Ethernet-type downlink data packet into an IP-type data packet includes removing the MAC address of the second network interface and / or the MAC address of the cellular device from the Ethernet-type downlink data packet.

[0020] In some implementations, the MAC address of the cellular device is carried in a first message sent by the cellular device. The first message is a response message to a second message sent by the second network interface. The second message is used to request the cellular device to allocate an IP address to the second network interface, and the second message carries the MAC address of the second network interface.

[0021] In some implementations, the second network interface is configured with one or more of the following capabilities: recognizing Address Resolution Protocol (ARP) messages sent by the cellular device; recognizing Neighborhood Request (NS) messages sent by the cellular device; sending an ARP reply message in response to the ARP message; and sending a Neighborhood Notification (NA) message in response to the NS message.

[0022] In some implementations, the second network interface is adapted to the IPv4 and / or IPv6 protocols, including DHCPv6 and / or SLAAC scenarios.

[0023] In a second aspect, a data transmission apparatus is provided, which is applied to an embedded device connected to a LAN device and a cellular device, for enabling the LAN device to access the cellular network provided by the cellular device. The apparatus includes: a transceiver unit, for receiving downlink aggregated data packets sent by the cellular device and / or sending uplink aggregated data packets to the cellular device; wherein the downlink aggregated data packets are formed by aggregating multiple downlink data packets, and the uplink aggregated data packets are formed by aggregating multiple uplink data packets.

[0024] In some implementations, the maximum number of bytes in the downlink aggregated data packet is greater than 2KB and less than or equal to 16KB.

[0025] In some implementations, the transceiver unit is specifically used to: send downlink aggregation parameters to the cellular device, the downlink aggregation parameters including the maximum number of bytes in the downlink aggregated data packet.

[0026] In some implementations, the transceiver unit is further configured to: send uplink aggregated data packets to the cellular device based on configured uplink aggregation parameters; wherein the uplink aggregation parameters include one or more of the following parameters: unit aggregation time of the uplink aggregated data packets, maximum time interval between two adjacent uplink data packets, maximum number of bytes in the uplink aggregated data packets, maximum number of data packets in the uplink aggregated data packets, and parameters for instructing the uplink data packets to be sent immediately.

[0027] In some implementations, the uplink aggregation parameters are configured based on one or more of the following parameters sent by the cellular device: the maximum number of packets in the uplink aggregated data packets that the cellular device expects to receive, the maximum number of bytes in the uplink aggregated data packets that the cellular device expects to receive, and the byte alignment parameters of the uplink aggregated data packets that the cellular device expects to receive.

[0028] In some implementations, before sending the uplink aggregation data packet to the cellular device, the apparatus further includes a processing unit for: determining, when the uplink data packet arrives, whether a buffer area already exists, the buffer area being used to buffer the uplink data packet to be aggregated; and if the buffer area already exists, filling the buffer area with the uplink data packet so as to use the uplink data packet as the uplink data packet to be aggregated.

[0029] In some implementations, filling the uplink data packet into the cache area includes: filling the uplink data packet into the cache area when the uplink data packet meets the following conditions: the size of the multiple data packets to be aggregated cached in the cache area after the uplink data packet is filled into the cache area does not exceed the maximum number of bytes of the configured uplink aggregated data packet; and / or, the number of multiple data packets to be aggregated cached in the cache area after the uplink data packet is filled into the cache area does not exceed the maximum number of data packets in the configured uplink aggregated data packet; and / or, the uplink data packet does not need to be sent immediately.

[0030] In some implementations, the processing unit is further configured to: request the cache area if the cache area does not exist, and fill the cache area with the uplink data packet.

[0031] In some implementations, filling the uplink data packet into the buffer area includes: filling the uplink data packet into the buffer area when the uplink data packet meets the following conditions: the time interval between the uplink data packet and the previous uplink data packet is less than the configured maximum time interval between two adjacent uplink data packets; and / or, the uplink data packet does not need to be sent immediately.

[0032] In some implementations, sending the uplink aggregated data packet to the cellular device includes: sending the uplink aggregated data packet to the cellular device when the aggregation time of the uplink aggregated data packet reaches the configured unit aggregation time of the uplink aggregated data packet.

[0033] In some implementations, the embedded device includes a LAN port, a USB interface, and a first network interface. The LAN port is used to connect to the LAN device, the USB interface is used to connect to the cellular device, and the first network interface is a network interface created based on RNDIS when the USB interface is inserted into the cellular device.

[0034] In some implementations, the embedded device further includes an NSS module and a second network interface, wherein the first network interface is used to receive and send Ethernet type data packets through the CPU in the embedded device, and the second network interface is used to receive and send IP type data packets through the NSS module.

[0035] In some implementations, the second network interface is used to process IP-type uplink data packets into Ethernet-type uplink data packets and send the Ethernet-type uplink data packets to the first network interface; the first network interface is used to encapsulate the Ethernet-type uplink data packets into uplink RNDIS messages and transmit the uplink RNDIS messages to the USB interface.

[0036] In some implementations, processing IP-type uplink data packets into Ethernet-type uplink data packets includes adding the MAC address of the second network interface and / or the MAC address of the cellular device to the IP-type uplink data packets.

[0037] In some implementations, the first network interface is used to decapsulate the downlink RNDIS message sent by the USB interface into an Ethernet-type downlink data packet, process the Ethernet-type downlink data packet into an IP-type data packet, and transmit the IP-type data packet to the second network interface.

[0038] In some implementations, processing the Ethernet-type downlink data packet into an IP-type data packet includes removing the MAC address of the second network interface and / or the MAC address of the cellular device from the Ethernet-type downlink data packet.

[0039] In some implementations, the MAC address of the cellular device is carried in a first message sent by the cellular device. The first message is a response message to a second message sent by the second network interface. The second message is used to request the cellular device to allocate an IP address to the second network interface, and the second message carries the MAC address of the second network interface.

[0040] In some implementations, the second network interface is configured with one or more of the following capabilities: recognizing Address Resolution Protocol (ARP) messages sent by the cellular device; recognizing Neighborhood Request (NS) messages sent by the cellular device; sending an ARP reply message in response to the ARP message; and sending a Neighborhood Notification (NA) message in response to the NS message.

[0041] In some implementations, the second network interface is adapted to the IPv4 and / or IPv6 protocols, including DHCPv6 and / or SLAAC scenarios.

[0042] Thirdly, an embedded device is provided, which is connected to a LAN device and a cellular device to enable the LAN device to access the cellular network provided by the cellular device. The device includes: a LAN port for connecting to the LAN device; a USB interface for connecting to the cellular device; a CPU; an NSS module; a first network interface, which is a network interface created based on RNDIS when the USB interface is inserted into the cellular device, for receiving and sending Ethernet type data packets through the CPU; and a second network interface for receiving and sending data packets through the NSS module.

[0043] The technical solution of this application embodiment is applied to an embedded device, which is connected to a LAN device and a cellular device, enabling the LAN device to access the cellular network provided by the cellular device. The data packet transmission between the embedded device and the cellular device can employ an aggregation transmission method. For example, multiple uplink data packets can be aggregated into an uplink aggregated data packet for transmission; or multiple downlink data packets can be aggregated into a downlink aggregated data packet for transmission. This can improve network throughput. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the network architecture applicable to the embodiments of this application.

[0045] Figure 2 This is a schematic flowchart of the data transmission method provided in the embodiments of this application.

[0046] Figure 3 This is a schematic flowchart illustrating the transmission of uplink aggregated data packets provided in an embodiment of this application.

[0047] Figure 4 This is a schematic diagram of the structure of an embedded device with an NSS module provided in an embodiment of this application.

[0048] Figure 5 This is a schematic diagram of the data transmission device provided in the embodiments of this application. Detailed Implementation

[0049] The technical solution of this application will now be described with reference to the accompanying drawings. For ease of understanding, the following will first be described in conjunction with... Figure 1 This application describes the communication terms and processes that may be involved in the embodiments of this application.

[0050] Figure 1 This is a schematic diagram of the network architecture applicable to the embodiments of this application. For example... Figure 1 As shown, the network includes a cellular device (or cellular module) 110, an embedded device 120, and a LAN device 130. The cellular device 110 provides the cellular network; for example, it may include a 4G or 5G cellular device. The embedded device 120 is, for example, an embedded platform (also known as the IPQ5018 embedded platform) developed based on the dedicated hardware IPQ5018 chip. The embedded device 120 may have peripheral interfaces, such as a USB interface. Where the embedded device 120 supports the RNDIS driver and the cellular device 110 supports RNDIS dialing, the cellular module can be plugged into the embedded device 120 via the USB interface. The embedded device 120 loads and creates an Ethernet-type network interface (denoted as ethX) based on the RNDIS protocol, and ethX can be set as the WAN interface. The LAN device 130 can be connected to the LAN interface (e.g., a 1GHz and / or 2.5GHz port) of the embedded device 120 via a network cable. The embedded device 120 performs routing, and internet access is achieved through the WAN interface. LAN devices 130 include, but are not limited to, terminal devices such as PCs. Here, the WAN interface can be functionally considered as a virtual network card, for example.

[0051] based on Figure 1 The network architecture shown tests throughput when data is transmitted between LAN device 130 and cellular device 110 using over-the-air (OTA) technology. For example, a testing tool (e.g., Speedtest software) is used on LAN device 130 to test throughput, and the test results show an uplink throughput of 100 Mbps and a downlink throughput of 100 Mbps. However, such test results are no longer sufficient to meet the ever-increasing demands for network performance.

[0052] Therefore, this application proposes a data transmission method applied to an embedded device connected to a LAN device and a cellular device, enabling the LAN device to access the cellular network provided by the cellular device. The data packet transmission between the embedded device and the cellular device can employ aggregation transmission. For example, multiple uplink data packets can be aggregated into an uplink aggregated data packet for transmission; or multiple downlink data packets can be aggregated into a downlink aggregated data packet for transmission. This can improve network throughput.

[0053] The following, combined with Figures 2 to 5 The technical solutions of the embodiments of this application will be described in detail below.

[0054] Figure 2 This is a schematic flowchart illustrating the data transmission method provided in an embodiment of this application. Figure 2 The method 200 shown is applied to an embedded device, which may be, for example, an embedded device. Figure 1 The embedded device 120 shown is connected to a LAN device and a cellular device to enable the LAN device to access the cellular network provided by the cellular device. The LAN device may be, for example, a... Figure 1 The LAN device 130 shown includes, but is not limited to, terminal devices such as PCs. The cellular device may be, for example, a... Figure 1 The cellular device 110 shown is, for example, a 4G or 5G cellular device. Data is transmitted between the embedded device and the cellular device based on the RNDIS protocol; therefore, the data transmitted between the embedded device and the cellular device will also be referred to as RNDIS data (or RNDIS packets, RNDIS messages, etc.). Data is transmitted between the embedded device and the LAN device based on the IP protocol; therefore, the data transmitted between the embedded device and the LAN device can be referred to as IP data (or IP packets). The embedded device can also be referred to as the master device or main control device.

[0055] like Figure 2 As shown, method 200 may include step 210 and / or step 220.

[0056] In step 210, downlink aggregated data packets sent by the cellular device are received.

[0057] In step 220, an uplink aggregated data packet is sent to the cellular device.

[0058] In step 210, the downlink aggregated data packet is formed by aggregating multiple downlink data packets; in step 220, the uplink aggregated data packet is formed by aggregating multiple uplink data packets. Here, "uplink" refers to data transmission from an embedded device (or LAN device) to a cellular device, and "downlink" refers to data transmission from a cellular device to an embedded device (or LAN device).

[0059] In other words, a downlink aggregated data packet is a single downlink data packet (or downlink transmission unit) formed by aggregating multiple downlink data packets, and an uplink aggregated data packet is a single uplink data packet (or uplink transmission unit) formed by aggregating multiple uplink data packets.

[0060] As an example, multiple uplink data packets can be aggregated to form a single uplink data packet, known as an uplink aggregated data packet. By encapsulating this uplink aggregated data packet (e.g., adding a header), an uplink transmission unit can be obtained. In other words, multiple uplink data packets can share a single header through aggregation, thereby saving bit overhead and reducing the number of interactions (e.g., reducing the number of acknowledgment message transmissions).

[0061] For example, multiple downlink data packets can be aggregated to form a single downlink data packet, known as a downlink aggregated data packet. By encapsulating this downlink aggregated data packet (e.g., adding a header), a downlink transmission unit can be obtained. In other words, multiple downlink data packets can share a single header through aggregation, thereby saving bit overhead and reducing the number of interactions (e.g., reducing the number of acknowledgment message transmissions).

[0062] Multiple data packets are aggregated into a single data packet. For example, multiple smaller data packets are constructed into a larger aggregate data packet (also called an aggregate packet) based on specific rules, and submitted to the USB interface through a single interrupt. This reduces the number of interrupts, improves CPU utilization, and thus increases network throughput.

[0063] The following sections provide a detailed description of downlink aggregation transmission and uplink aggregation transmission, respectively.

[0064] Downlink aggregation transmission

[0065] Downlink aggregation transmission between embedded devices and cellular devices is based on downlink aggregation parameters (e.g., the maximum number of bytes in a downlink aggregation packet). The appropriateness of these downlink aggregation parameter settings directly affects the throughput improvement that aggregation transmission can bring. Downlink aggregation parameters may include, for example, the maximum number of bytes in a downlink aggregation packet (denoted as MaxTransferSize), which indicates the maximum size (in bytes) of any single bus data transmission that the embedded device expects to receive from the cellular device. Typically, each bus data transmission can accommodate a single remote NDIS message. However, embodiments of this application allow the cellular device to bundle multiple remote NDIS messages containing data packets into a single aggregated transmission.

[0066] When downlink aggregation parameters are configured improperly, for example, if the maximum size of the downlink aggregated data packet is set to 2KB, this capacity can only accommodate one standard maximum transmission unit (MTU) data packet. If the size of the data packet to be transmitted exceeds this size, the CPU needs to continuously respond to interrupts to move the data, which not only increases the CPU load but also reduces the overall network operating efficiency, causing a large amount of CPU resources to be consumed in data moving and affecting the execution of other tasks. Alternatively, even if downlink aggregation transmission is added, if the downlink aggregation parameters are configured improperly, for example, if the maximum size of the downlink aggregated data packet is set to 2KB, since the size of an IP data packet is typically 1500 bytes, it can only accommodate a maximum of one RNDIS data packet, meaning that the configured downlink aggregation function does not perform its intended function.

[0067] Therefore, in some implementations, the downlink aggregation parameters can be reasonably adjusted based on data transmission requirements and the downlink aggregation parameters supported by the RNDIS protocol. For example, the maximum number of bytes in the downlink aggregated data packet can be set to greater than 2KB and less than or equal to 16KB. Specifically, a USB request block (URB) ring buffer can be added to the embedded device as a temporary storage area for data packets, providing buffer space when the embedded device receives data packets. When the cellular device recognizes the increased receive buffer of the embedded device through the USB communication protocol, it can aggregate multiple data packets into an aggregated data packet when sending data packets to the embedded device. Taking a setting of 16KB as an example, the cellular device can send 10 MTU-sized RNDIS data packets at a time. This means that the size of the data packet sent by the cellular device at one time is significantly increased, and the number of times the embedded device receives and processes data is reduced accordingly. Therefore, the number of CPU interrupts is reduced, effectively reducing the CPU load.

[0068] In some implementations, downlink aggregation parameters can be sent from the embedded device to the cellular device. For example, the maximum number of bytes in the downlink aggregation packet can be carried in a remote NDIS initialization message (REMOTE_NDIS_INITIALIZE_MSG) sent by the embedded device.

[0069] The REMOTE_NDIS_INITIALIZE_MSG message is a message type defined in the RNDIS protocol, used to initialize the network connection between the embedded device and a remote NDIS device (e.g., a cellular device). Accordingly, after receiving the REMOTE_NDIS_INITIALIZE_MSG message from the embedded device, the cellular device can, in response to the embedded device, send a Remote NDIS Initialization Complete (REMOTE_NDIS_INITIALIZE_CMPLT) message to the embedded device. The maximum number of bytes in the downlink aggregated data packet can be sent to the cellular device as a parameter in the REMOTE_NDIS_INITIALIZE_MSG message. After obtaining the downlink aggregation parameters sent by the embedded device, the cellular device can send downlink aggregated data packets to the embedded device based on these parameters.

[0070] After adopting the downlink aggregation transmission scheme provided in this application embodiment, a similar throughput test as described above was conducted. The test results show that the downlink throughput increased from 100Mbps to 600Mbps. It is evident that the downlink aggregation transmission scheme provided in this application embodiment can effectively improve the throughput of the network system.

[0071] Uplink aggregation transmission

[0072] In order to realize the function of uplink aggregation transmission, this application embodiment designs uplink aggregation parameters and corresponding uplink aggregation transmission process.

[0073] First, the uplink aggregation parameters involved in the embodiments of this application are described.

[0074] In some implementations, uplink aggregation parameters may include one or more of the following parameters: unit aggregation time of uplink aggregated data packets, maximum time interval between two adjacent uplink data packets, maximum number of bytes in uplink aggregated data packets, maximum number of data packets in uplink aggregated data packets, and parameters used to indicate that uplink data packets should be sent immediately.

[0075] The unit aggregation time (denoted as agg_time_limit) for uplink aggregated data packets refers to, for example, the maximum duration for an embedded device to perform data packet aggregation operations. For instance, if the first data packet arrives at time T0, the embedded device will aggregate the data packets from time T0 to time T1 to form an uplink aggregated data packet and send it to the cellular device at time T1. The time period between time T0 and time T1 is the unit aggregation time. As an example, unit aggregation time = 1000000L = 1ms.

[0076] The maximum time interval between two adjacent uplink data packets (denoted as `agg_bypass_time`) is used to determine the packet arrival rate. If the interval between the current data packet and its predecessor is greater than the maximum time interval between two adjacent uplink data packets, the embedded device will not trigger uplink aggregation transmission. If the interval between the current data packet and its predecessor is less than or equal to the maximum time interval between two adjacent uplink data packets, the embedded device can trigger uplink aggregation transmission. In other words, the transmission time of data packets is categorized. For example, data packets with short intervals (e.g., set to 1 / 10 of the threshold time) are considered frequently sent data packets and can be aggregated together for transmission.

[0077] The maximum number of bytes for an uplink aggregated data packet (denoted as ul_data_aggregation_max_size) is used to limit the total length of the uplink aggregated data packet. For example, when the maximum number of bytes for an uplink aggregated data packet is set to 16KB, the maximum number of bytes allowed for an uplink aggregated data packet sent by an embedded device must not exceed 16KB.

[0078] The maximum number of datagrams in an uplink aggregate (denoted as ul_data_aggregation_max_datagrams) indicates the maximum number of individual datagrams contained in an uplink aggregate. For example, if the maximum number of datagrams in an uplink aggregate is set to N, then each uplink aggregate consists of at most N datagrams.

[0079] The parameter used to indicate that uplink data packets should be sent immediately can also be called the aggregation skip function (denoted as rmnet_usb_tx_agg_skip). It indicates that the current data packet does not need to be aggregated and should be transmitted immediately. For example, if the current data packet is an IPPROTO_ICMP message or a message marked th->psh in TCP, it means that the data packet needs to be sent immediately. In this case, the embedded device does not perform aggregation transmission on the data packet, but transmits it immediately as a single data packet.

[0080] Before performing uplink aggregation transmission, the embedded device needs to configure uplink aggregation parameters, such as the unit aggregation time of the uplink aggregation data packet, the maximum time interval between two adjacent uplink data packets, the maximum number of bytes in the uplink aggregation data packet, and the maximum number of data packets in the uplink aggregation data packet. Then, in step 220, the embedded device sends the uplink aggregation data packet to the cellular device based on the configured uplink aggregation parameters. It can be understood that the uplink aggregation transmission process in step 220 refers, for example, to the aggregation transmission of uplink data packets within a unit aggregation time (e.g., equal to the value of agg_time_limit) based on predetermined rules, for a predetermined number (e.g., equal to the value of ul_data_aggregation_max_datagrams) and a predetermined total length (e.g., equal to the value of ul_data_aggregation_max_size).

[0081] The uplink aggregation parameters can be configured based on one or more of the following parameters sent by the cellular device: the maximum number of packets in the uplink aggregated data packets that the cellular device expects to receive, the maximum number of bytes in the uplink aggregated data packets that the cellular device expects to receive, and the byte alignment parameter of the uplink aggregated data packets that the cellular device expects to receive. These parameters are related to the uplink aggregated data packets that the cellular device expects to receive. In other words, when the embedded device sends uplink aggregated data packets to the cellular device, it will consider the needs of the cellular device to ensure that the uplink aggregated transmission data packets can be successfully received by the cellular device. Parameters such as the maximum number of packets in the uplink aggregated data packets that the cellular device expects to receive (denoted as MaxPacketsPerMessage), the maximum number of bytes in the uplink aggregated data packets that the cellular device expects to receive (denoted as MaxTransferSize), and the byte alignment parameter of the uplink aggregated data packets that the cellular device expects to receive (denoted as PacketAlignmentFactor) can, for example, be carried in the REMOTE_NDIS_INITIALIZE_CMPLT message sent by the cellular device. Embedded devices can configure parameters such as the maximum number of data packets and the maximum number of bytes in the uplink aggregated data packets actually sent, based on the maximum number of data packets in the uplink aggregated data packets that the cellular device expects to receive.

[0082] For example, the REMOTE_NDIS_INITIALIZE_CMPLT message carries the parameter MaxPacketsPerMessage, which indicates the maximum number of remote NDIS packets that the cellular device can handle in a single transmission. When transmitting uplink aggregated packets, the embedded device sets the value of the parameter ul_data_aggregation_max_datagrams to be less than or equal to the value of the parameter MaxPacketsPerMessage to prevent the cellular device from being unable to process the uplink aggregated packet due to its limited capabilities.

[0083] For example, the REMOTE_NDIS_INITIALIZE_CMPLT message carries the parameter MaxTransferSize, which indicates the maximum size (e.g., in bytes) of any single bus data transfer that the cellular device expects to receive from the embedded device. When transmitting uplink aggregated packets, the embedded device sets the value of the aforementioned parameter ul_data_aggregation_max_size to be less than or equal to the value of the parameter MaxTransferSize. Of course, the value of the parameter ul_data_aggregation_max_size cannot exceed the capabilities of the embedded device; for example, it cannot exceed the maximum number of bytes (e.g., 16K) of aggregated packets supported by the RNDIS protocol.

[0084] In addition, the byte alignment parameter of the uplink aggregated data packet is used to indicate the byte alignment that the cellular device expects for each remote NDIS message as part of a multi-message transmission. This parameter is indicated, for example, by powers of 2. For instance, a setting of 3 indicates 8-byte alignment; and a setting of the maximum value of 7 indicates 128-byte alignment.

[0085] In some implementations, before sending uplink aggregation packets to the cellular device, the embedded device can determine whether a buffer region (denoted as agg_skb) already exists when the uplink packets arrive. This buffer region is used to cache the uplink packets to be aggregated.

[0086] First, if the buffer area already exists, the uplink data packet is filled (or stored) into the buffer area to serve as the uplink data packet to be aggregated. For example, the currently arriving uplink data packet can be filled into the buffer area when some or all of the following conditions are met: 1) After the uplink data packet is filled into the buffer area, the size of the multiple data packets to be aggregated in the buffer area does not exceed the maximum number of bytes of the configured uplink aggregated data packet. In this way, after the embedded device aggregates the uplink data packets stored in the buffer area, the total length of the resulting uplink aggregated data packet can meet the limit of the maximum number of bytes of the configured uplink aggregated data packet; 2) After the uplink data packet is filled into the buffer area, the number of multiple data packets to be aggregated in the buffer area does not exceed the maximum number of data packets in the configured uplink aggregated data packet. In this way, after the embedded device aggregates the uplink data packets stored in the buffer area, the number of uplink data packets included in the resulting uplink aggregated data packet will not exceed the limit of the maximum number of data packets in the configured uplink aggregated data packet; 3) The uplink data packet does not need to be sent immediately, that is, the uplink data packet is an uplink data packet that can be aggregated and transmitted.

[0087] Secondly, if a buffer area does not exist, a buffer area can be requested to cache uplink data packets to be aggregated, and the uplink data packets can be filled into this buffer area. When an uplink data packet arrives, if a buffer area for storing the uplink data packets to be aggregated has not yet been established, it indicates that this uplink data packet may be the first uplink data packet to arrive. Therefore, the embedded device can request a new buffer area and fill the first uplink data packet into this buffer area, and then perform aggregate transmission together after waiting for subsequent data packets to arrive. For example, uplink data packets can be filled into the buffer area when some or all of the following conditions are met: 1) The time interval between the uplink data packet and the previous uplink data packet is less than the configured maximum time interval between two adjacent uplink data packets. In this case, it indicates that the packet arrival speed of the uplink data packet is appropriate. Generally, if the packet arrival speed is slow, there is no need to use aggregate transmission to avoid unnecessary transmission delays caused by long waiting times for data packets; 2) The uplink data packet does not need to be sent immediately, that is, the uplink data packet is an uplink data packet that can be aggregated.

[0088] Optionally, in step 220, an uplink aggregated data packet is sent to the cellular device when the aggregation time of the uplink aggregated data packet reaches the configured unit aggregation time of the uplink aggregated data packet. Specifically, the transmission of the uplink aggregated data packet can be triggered when the number of uplink data packets to be aggregated stored in the buffer area reaches the maximum number of data packets in the configured uplink aggregated data packet, the total length of the uplink data packets to be aggregated does not exceed the maximum number of bytes in the configured uplink aggregated data packet, and the aggregation time of the uplink aggregated data packet has reached the configured unit aggregation time of the uplink aggregated data packet (e.g., 1ms).

[0089] The following, combined with Figure 3 The process of transmitting uplink aggregated data packets based on configured uplink aggregation parameters.

[0090] like Figure 3 As shown, in step 301, the uplink aggregation parameters are obtained.

[0091] For example, after powering on, the embedded device obtains relevant parameters of the uplink aggregated data packets that the cellular device expects to receive from the REMOTE_NDIS_INITIALIZE_CMPLT message sent by the cellular device, such as MaxPacketsPerMessage and MaxTransferSize. Based on these received parameters, the embedded device sets the parameters it actually uses to transmit the uplink data packets, such as configuring ul_data_aggregation_max_datagrams and ul_data_aggregation_max_size. The parameter configuration process is detailed in subsequent steps 302, 305, 306, and 307.

[0092] In step 302, it is determined whether the maximum number of packets in the uplink aggregated data packets that the cellular device expects to receive (i.e., MaxPacketsPerMessage) is greater than 1. A MaxPacketsPerMessage greater than 1 indicates that the device has the capability to receive uplink aggregated data packets, and the embedded device can subsequently send uplink data packets to the cellular device using uplink aggregated transmission. Otherwise, it may indicate that the cellular device does not have or has not enabled the capability to receive uplink aggregated data packets, or that the cellular device currently does not wish to receive uplink aggregated data packets. In this case, steps 303 and 304 are executed.

[0093] In step 303, it is determined whether a data packet has arrived. If a data packet has arrived, step 304 is executed; otherwise, the process continues in step 303, waiting for a data packet.

[0094] In step 304, a single uplink data packet (e.g., a single RNDIS data packet) is sent.

[0095] In step 305, it is determined whether the maximum number of bytes (i.e., MaxTransferSize) of the uplink aggregated data packets that the cellular device expects to receive exceeds 16K. If the value of MaxTransferSize exceeds 16K, step 307 is executed; if the value of MaxTransferSize does not exceed 16K, step 306 is executed.

[0096] In step 306, the maximum number of bytes in the uplink aggregated data packet (i.e., ul_data_aggregation_max_size) is set to equal MaxTransferSize, that is, ul_data_aggregation_max_size=MaxTransferSize is set.

[0097] In step 307, ul_data_aggregation_max_size is set to 16K.

[0098] In step 308, it is determined whether an uplink data packet has arrived. If an uplink data packet has arrived, step 309 is executed; otherwise, the process continues in step 308, waiting for an uplink data packet.

[0099] In step 309, it is determined whether the buffer (i.e., agg_skb) used to cache the uplink data packets to be aggregated already exists. If agg_skb already exists, steps 310 to 313 are executed, meaning the currently arriving uplink data packet is not the first data packet in the uplink aggregated data packet; if agg_skb does not exist, steps 309 to 317 are executed, meaning the currently arriving uplink data packet is the first uplink data packet in the uplink aggregated data packet.

[0100] First, steps 310 to 313 will be described.

[0101] In step 310, it is determined whether filling the current uplink data packet into agg_skb will cause an overflow.

[0102] Specifically, after filling the current uplink data packets into agg_skb, if the total number of bytes of the uplink data packets to be aggregated cached in agg_skb exceeds the ul_data_aggregation_max_size configured in step 306 or step 307, it is considered to overflow, and step 319 is executed; otherwise, it is considered not to overflow, and step 311 is executed.

[0103] In step 311, it is determined whether the number of uplink data packets to be aggregated exceeds the maximum number of data packets in the uplink aggregation data packets (i.e., ul_data_aggregation_max_datagrams). Here, ul_data_aggregation_max_datagrams can be configured, for example, to be equal to MaxPacketsPerMessage.

[0104] In step 312, the uplink data packet is filled into agg_skb.

[0105] In step 313, it is determined whether the uplink data packet needs to be sent immediately. If it needs to be sent immediately, proceed to step 319; otherwise, proceed to step 318.

[0106] Next, steps 314 to 317 will be described.

[0107] In step 314, it is determined whether the uplink data packet meets the requirement of the maximum time interval (i.e., agg_bypass_time) between two adjacent uplink data packets. Specifically, if the time interval between the uplink data packet and its predecessor exceeds agg_bypass_time, then step 304 is executed; if the time interval between the uplink data packet and its predecessor does not exceed agg_bypass_time, then step 315 is executed.

[0108] In step 315, it is determined whether the uplink data packet needs to be sent immediately. If it needs to be sent immediately, proceed to step 304; otherwise, proceed to step 316.

[0109] In step 316, an agg_skb is allocated, and the size of the allocated agg_skb is equal to the ul_data_aggregation_max_size configured in step 306 or 307. Simultaneously, since this uplink data packet is the first data packet in the uplink aggregation data packet, the number of uplink data packets to be aggregated stored in the agg_skb can be recorded at this point, along with the aggregation time.

[0110] In step 317, the uplink data packet is populated into agg_skb.

[0111] Then, continue with steps 318 to 320.

[0112] In step 318, it is determined whether the elapsed aggregation time has reached the unit aggregation time (i.e., agg_time_limit). If the aggregation time has not reached agg_time_limit, then step 320 is executed; if the aggregation time has reached agg_time_limit, then step 319 is executed.

[0113] In step 319, aggregated uplink packets (e.g., aggregated RNDIS packets) are sent.

[0114] In step 320, it is determined whether a data packet has arrived.

[0115] It should be noted that, Figure 3 The order of the steps shown is merely an example. In practical applications, the order of some steps can be adjusted according to requirements. For example, the order of steps 310 and 311 can be swapped, the order of steps 314 and 315 can be swapped, and so on. Furthermore, Figure 3 Some steps described in the document may be omitted, and this application does not limit this.

[0116] In summary, similar throughput tests were conducted on the uplink aggregation transmission scheme provided in this application embodiment, and the test results show that the uplink throughput increased from 100Mbps to 600Mbps. Therefore, the uplink aggregation transmission scheme provided in this application embodiment can also effectively improve the throughput of the network system.

[0117] Adapting to network subsystem (NSS) hardware acceleration

[0118] As mentioned earlier, packet transmission between embedded devices (e.g., IPQ5018) and cellular devices is based on RNDIS. However, current embedded devices do not support NSS hardware acceleration, where NSS typically acts as a coprocessor for the CPU to provide high-speed data processing and reduce system load. Because NSS can separate heavy network data processing tasks from the CPU and perform them efficiently on its own, it helps improve the overall system efficiency and stability.

[0119] Therefore, this application proposes adding NSS hardware acceleration functionality to embedded devices. Furthermore, to implement NSS hardware acceleration in embedded devices, this application also provides corresponding data processing and transmission methods. It should be noted that the NSS hardware acceleration, as well as the previously described uplink aggregation transmission and downlink aggregation transmission schemes, can be implemented in combination or individually, and this application does not limit this.

[0120] The following, combined with Figure 4 This application describes in detail an embedded device 400 with an added NSS module provided in an embodiment. The embedded device 400 is connected to a LAN device 600 and a cellular device 500, enabling the LAN device 600 to access the cellular network provided by the cellular device 500. The embedded device 400 may include, for example, the IPQ5018 embedded platform.

[0121] like Figure 4As shown, the embedded device 400 includes a LAN port 406, a USB interface 401, a CPU 404, and a first network interface 402. The LAN port 406 is used to connect to a LAN device 600, the USB interface 401 is used to connect to a cellular device 500, and the first network interface 402 is a network interface created based on RNDIS when the USB interface 401 is inserted into the cellular device 500. It is used to receive and send Ethernet data packets (hereinafter referred to as Ethernet packets) via the CPU. Optionally, to implement NSS hardware acceleration, the embedded device 400 also includes an NSS module 405 and a second network interface 403 formed for the NSS module 405. The second network interface 403 is used to receive and send data packets through the NSS module 405. The NSS module 405 typically supports the transmission of IP data packets (hereinafter referred to as IP packets).

[0122] After adding an NSS module 405 and creating a corresponding second network interface 403 within the embedded device 400, the data transmission path within the embedded device 400 may include:

[0123] 1) For downlink transmission:

[0124] Path 1: Cellular module 500 → USB interface 401 → First network interface 402 → CPU 404 → LAN port 406 → LAN device 600;

[0125] Path 2: Cellular module 500 → USB interface 401 → First network interface 402 → Second network interface 403 → NSS module 405 → LAN port 406 → LAN device 600.

[0126] 2) For uplink transmission:

[0127] Path 1: LAN device 600 → LAN port 406 → CPU 404 → First network interface 402 → USB interface 401 → Cellular module 500;

[0128] Path 2: LAN device 600 → LAN port 406 → NSS module 405 → Second network interface 403 → First network interface 402 → USB interface 401 → Cellular module 500.

[0129] Figure 4 Taking downlink transmission as an example, path 1 is as follows: Figure 4 The dashed lines in the diagram indicate the path used for transmitting CPU data (e.g., for CPU data patches); path 2 is as follows... Figure 4 The solid lines in the diagram are used to transmit NSS data (e.g., for NSS data patches).

[0130] The first network interface 402 is an Ethernet interface (e.g., ethX); the second network interface 403 is an IP interface (or RAW IP interface) (e.g., ethX1). Specifically, based on the RNDIS driver, when the cellular device 500 is plugged into the embedded device 400 via the USB interface 401, an Ethernet interface is created. In this embodiment, if the NSS module 405 in the embedded device 400 provides interface functions, an IP interface can also be created in the RNDIS driver and registered with the NSS module 405. Then, data packets can be sent and / or received using the send and / or receive functions provided by the NSS module 405. Without the addition of the NSS module 405 and the second network interface 403, the first network interface 402 serves as the internal WAN interface of the embedded device 400. With the addition of the NSS module 405 and the second network interface 403, for example, the second network interface 403 can be used as the internal WAN interface of the embedded device 400.

[0131] In this embodiment of the application, the second network interface 403 can also be regarded as an auxiliary interface of the first network interface 402, or, from a functional point of view, the first network interface 402 and the second network interface 403 can be regarded as the same virtual network card.

[0132] To meet the format requirements of NSS hardware acceleration, the format of data packets needs to be converted during the transmission of uplink and downlink data packets; that is, the conversion between Ethernet data packets and IP data packets. The following describes the conversion between Ethernet data packets and IP data packets in detail.

[0133] First, the transmission process of uplink data packets is described.

[0134] In some implementations, the second network interface 403 is used to process IP-type uplink data packets into Ethernet-type uplink data packets and send the Ethernet-type uplink data packets to the first network interface 402. Correspondingly, the first network interface 402 is used to encapsulate the Ethernet-type uplink data packets into uplink RNDIS messages and transmit the uplink RNDIS messages to the USB interface 401. That is, the second network interface 403 can construct Ethernet data packets from uplink IP data packets in the RNDIS driver and send them to the first network interface 402; after receiving the Ethernet data packets sent by the second network interface 403, the first network interface 402 encapsulates the Ethernet data packets into uplink RNDIS messages, thereby sending the uplink RNDIS messages to the cellular device 500 through the USB interface 401.

[0135] For example, when processing an IP-type uplink data packet into an Ethernet-type uplink data packet, the second network interface 403 can add its own MAC address and / or the MAC address of the cellular device 500 to the IP-type uplink data packet, thereby constructing the IP-type uplink data packet into an Ethernet-type uplink data packet. The MAC address of the second network interface 403 can, for example, be used as the source address of the data packet, and the MAC address of the cellular device 500 can, for example, be used as the destination address.

[0136] Secondly, the transmission process of downlink data packets is described.

[0137] In some implementations, the first network interface 402 is used to decapsulate the downlink RNDIS message sent by the USB interface 401 into an Ethernet-type downlink data packet, process the Ethernet-type downlink data packet into an IP-type downlink data packet, and transmit the IP-type downlink data packet to the second network interface 403. In other words, the first network interface 402 can de-aggregate the downlink RNDIS data packet into an IP data packet and send the IP data packet to the second network interface 403, which then forwards the IP data packet to the LAN port 406 via the NSS module 405.

[0138] For example, when processing an Ethernet-type downlink data packet into an IP-type downlink data packet, the first network interface 402 can remove the MAC address of the second network interface 403 and / or the MAC address of the cellular device 500 from the Ethernet-type downlink data packet, thereby constructing the Ethernet-type downlink data packet into an IP-type downlink data packet.

[0139] The aforementioned second network interface 403 can be applied to a variety of protocols and / or scenarios. For example, the second network interface 403 can be applied to (or support) the IPv4 protocol and / or the IPv6 protocol. The IPv6 protocol includes the Dynamic Host Configuration Protocol (DHCP) version 6 scenario and / or the Stateless Address Automatic Configuration (SLAAC) scenario.

[0140] The MAC address of the aforementioned cellular device 500 can, for example, be carried in a first message sent by the cellular device 500. This first message is a response to the second message sent by the second network interface 403. The second message requests the cellular device 500 to allocate an IP address to the second network interface 403, and carries the MAC address of the second network interface 403. For example, for the IPv6 protocol, the second message includes a Solicit message, and the first message includes an Advertise message; for the IPv4 protocol, the second message is a DHCP Discovery message, and the first message is a DHCP Offer message. Since the second message requests the cellular device 500 to allocate an IP address to the second network interface 403, the second network interface 403 may not yet know which cellular device 500 will respond. Therefore, the second message may not need to carry the target address (i.e., the MAC address of the cellular device 500), but only the MAC address of the second network interface 403, which is formed when the second network interface 403 is created.

[0141] Cellular device 500 may trigger (e.g., periodically) discovery messages for discovering neighboring devices within the local area network, such as Address Resolution Protocol (ARP) messages and Neighbor Solicitation (NS) messages. To recognize these messages and respond accordingly, the second network interface 403 may optionally be configured with one or more of the following capabilities: the ability to recognize ARP messages sent by cellular device 500, the ability to recognize NS messages sent by cellular device 500, the ability to send ARP reply messages (denoted as ARPOP_REPLY) in response to ARP messages, and the ability to send Neighbor Advertisement (NA) messages in response to NS messages. ARP messages and ARP reply messages are message types supported by the IPv4 message protocol, while NS messages and NA messages are message types supported by the IPv6 message protocol.

[0142] After exchanging the first and second messages, both the embedded device 400 and the cellular device 500 obtain each other's MAC addresses, thus enabling them to establish a communication link. For example, during subsequent data transmission, the second network interface 403 can add its own MAC address and the cellular device 500's MAC address to the IP data packet, thereby constructing an Ethernet data packet from the IP data packet.

[0143] For example, when sending a DHCP discovery message for the IPv4 packet protocol, the second network interface 403 constructs an Ethernet packet by filling the IP packet with its own MAC address and sends it to the first network interface 402. When the cellular device 500 replies with a DHCP offer message, the first network interface 402 parses the Ethernet packet, obtains the MAC address of the cellular device 500, and saves it. This way, when the second network interface 403 sends an IP packet later, it can construct an Ethernet packet by adding the cellular device 500's MAC address. Through these steps, both the embedded device 400 and the cellular device 500 obtain each other's MAC addresses and can establish a communication link. Furthermore, for ARP messages subsequently sent by the cellular device 500, the second network interface 403 can recognize the ARP message and construct its own ARPOP_REPLY message to reply to the cellular device 500.

[0144] For example, in a DHCPv6 scenario, when the second network interface 403 sends a Solicit message, it constructs an Ethernet packet from the IP data packet by filling in its own MAC address and sends it to the first network interface 402. When the cellular device 500 replies with an Advertise message, the first network interface 402 parses the Ethernet packet and obtains the MAC address of the cellular device 500, saving it. This way, when the second network interface 403 subsequently sends an IP data packet, it can construct an Ethernet packet by adding the cellular device 500's MAC address. Through these steps, both the embedded device 400 and the cellular device 500 obtain each other's MAC addresses and can establish a communication link. Furthermore, when the cellular device 500 subsequently sends an NS message, the second network interface 403 can recognize the NS message and construct an NA message to reply to the cellular device 500.

[0145] For example, regarding the IPv6 message protocol, in a SLAAC scenario, the second network interface 403 obtains the MAC address of the cellular device 500 by parsing the NS message and saves it. This way, when the second network interface 403 subsequently sends IP packets, the first network interface 402 can construct an Ethernet packet by adding the MAC address of the cellular device 500. Furthermore, the second network interface 403 can construct an NA message itself and reply to the cellular device 500.

[0146] Thus, by adding the NSS module 405 to the embedded device and creating the second network interface 403, the function of adapting the RNDIS driver to NSS hardware acceleration is completed. This function can effectively reduce the CPU load in the embedded device, thereby improving network throughput.

[0147] like Figure 5 As shown in the figure, this application embodiment also provides a data transmission device 700, which can be applied in an embedded device. The embedded device is connected to a LAN device and a cellular device, and is used to enable the LAN device to access the cellular network provided by the cellular device. The device includes: a transceiver unit 710, used to receive downlink aggregated data packets sent by the cellular device, and / or send uplink aggregated data packets to the cellular device; wherein the downlink aggregated data packets are formed by aggregating multiple downlink data packets, and the uplink aggregated data packets are formed by aggregating multiple uplink data packets.

[0148] In some implementations, the maximum number of bytes in the downlink aggregated data packet is greater than 2KB and less than or equal to 16KB.

[0149] In some implementations, the transceiver unit 710 is specifically used to: send downlink aggregation parameters to the cellular device, the downlink aggregation parameters including the maximum number of bytes of the downlink aggregated data packet.

[0150] In some implementations, the transceiver unit 710 is further configured to: send uplink aggregated data packets to the cellular device based on configured uplink aggregation parameters; wherein the uplink aggregation parameters include one or more of the following parameters: unit aggregation time of the uplink aggregated data packets, maximum time interval between two adjacent uplink data packets, maximum number of bytes in the uplink aggregated data packets, maximum number of data packets in the uplink aggregated data packets, and parameters for instructing the uplink data packets to be sent immediately.

[0151] In some implementations, the uplink aggregation parameters are configured based on one or more of the following parameters sent by the cellular device: the maximum number of packets in the uplink aggregated data packets that the cellular device expects to receive, the maximum number of bytes in the uplink aggregated data packets that the cellular device expects to receive, and the byte alignment parameters of the uplink aggregated data packets that the cellular device expects to receive.

[0152] In some implementations, before sending the uplink aggregation data packet to the cellular device, the apparatus further includes a processing unit 720, configured to: determine whether a buffer area already exists when the uplink data packet arrives, the buffer area being used to buffer the uplink data packet to be aggregated; and if the buffer area already exists, fill the buffer area with the uplink data packet so as to use the uplink data packet as the uplink data packet to be aggregated.

[0153] In some implementations, filling the uplink data packet into the cache area includes: filling the uplink data packet into the cache area when the uplink data packet meets the following conditions: the size of the multiple data packets to be aggregated cached in the cache area after the uplink data packet is filled into the cache area does not exceed the maximum number of bytes of the configured uplink aggregated data packet; and / or, the number of multiple data packets to be aggregated cached in the cache area after the uplink data packet is filled into the cache area does not exceed the maximum number of data packets in the configured uplink aggregated data packet; and / or, the uplink data packet does not need to be sent immediately.

[0154] In some implementations, the processing unit 720 is further configured to: request the cache area if the cache area does not exist, and fill the uplink data packet into the cache area.

[0155] In some implementations, filling the uplink data packet into the buffer area includes: filling the uplink data packet into the buffer area when the uplink data packet meets the following conditions: the time interval between the uplink data packet and the previous uplink data packet is less than the configured maximum time interval between two adjacent uplink data packets; and / or, the uplink data packet does not need to be sent immediately.

[0156] In some implementations, sending the uplink aggregated data packet to the cellular device includes: sending the uplink aggregated data packet to the cellular device when the aggregation time of the uplink aggregated data packet reaches the configured unit aggregation time of the uplink aggregated data packet.

[0157] In some implementations, the embedded device includes a LAN port, a USB interface, and a first network interface. The LAN port is used to connect to the LAN device, the USB interface is used to connect to the cellular device, and the first network interface is a network interface created based on RNDIS when the USB interface is inserted into the cellular device.

[0158] In some implementations, the embedded device further includes an NSS module and a second network interface, wherein the first network interface is used to receive and send Ethernet type data packets through the CPU in the embedded device, and the second network interface is used to receive and send IP type data packets through the NSS module.

[0159] In some implementations, the second network interface is used to process IP-type uplink data packets into Ethernet-type uplink data packets and send the Ethernet-type uplink data packets to the first network interface; the first network interface is used to encapsulate the Ethernet-type uplink data packets into uplink RNDIS messages and transmit the uplink RNDIS messages to the USB interface.

[0160] In some implementations, processing IP-type uplink data packets into Ethernet-type uplink data packets includes adding the MAC address of the second network interface and / or the MAC address of the cellular device to the IP-type uplink data packets.

[0161] In some implementations, the first network interface is used to decapsulate the downlink RNDIS message sent by the USB interface into an Ethernet-type downlink data packet, process the Ethernet-type downlink data packet into an IP-type data packet, and transmit the IP-type data packet to the second network interface.

[0162] In some implementations, processing the Ethernet-type downlink data packet into an IP-type data packet includes removing the MAC address of the second network interface and / or the MAC address of the cellular device from the Ethernet-type downlink data packet.

[0163] In some implementations, the MAC address of the cellular device is carried in a first message sent by the cellular device. The first message is a response message to a second message sent by the second network interface. The second message is used to request the cellular device to allocate an IP address to the second network interface, and the second message carries the MAC address of the second network interface.

[0164] In some implementations, the second network interface is configured with one or more of the following capabilities: recognizing Address Resolution Protocol (ARP) messages sent by the cellular device; recognizing Neighborhood Request (NS) messages sent by the cellular device; sending an ARP reply message in response to the ARP message; and sending a Neighborhood Notification (NA) message in response to the NS message.

[0165] In some implementations, the second network interface is adapted to Internet Protocol version IPv4 and / or IPv6, wherein the IPv6 protocol includes Dynamic Host Configuration Protocol version DHCPv6 and / or Stateless Address Autoconfiguration (SLAAC) scenarios.

[0166] It should be noted that the terms "first," "second," "third," and "fourth," etc., in the specification, claims, and accompanying drawings are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0167] The term "and / or" in the embodiments of this application is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0168] In the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0169] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0170] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0171] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0172] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can read or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0173] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A data transmission method, characterized in that, An embedded device is used to connect to a local area network (LAN) device and a cellular device, enabling the LAN device to access the cellular network provided by the cellular device. The embedded device includes a LAN port, a Universal Serial Bus (USB) interface, and a first network interface. The LAN port is used to connect to the LAN device, the USB interface is used to connect to the cellular device, and the first network interface is a network interface created based on the Remote Network Driver Interface Protocol (RNDIS) when the USB interface is inserted into the cellular device. The method includes: Receive downlink aggregated data packets sent by the cellular device via the USB interface; and / or, Uplink aggregated data packets are sent to the cellular device via the USB interface; The downlink aggregated data packet is formed by aggregating multiple downlink data packets, and the uplink aggregated data packet is formed by aggregating multiple uplink data packets; The step of sending uplink aggregated data packets to the cellular device includes: Based on the configured uplink aggregation parameters, the uplink aggregated data packet is sent to the cellular device; The uplink aggregation parameters are determined based on the parameters of the uplink aggregated data packets that the cellular device expects to receive. The uplink aggregation parameters include one or more of the following parameters: the unit aggregation time of the uplink aggregated data packets, the maximum time interval between two adjacent uplink data packets, the maximum number of bytes in the uplink aggregated data packets, the maximum number of data packets in the uplink aggregated data packets, and parameters used to indicate that the uplink data packets should be sent immediately. The uplink aggregation parameters are configured based on one or more of the following parameters sent by the cellular device: the maximum number of data packets in the uplink aggregated data packets that the cellular device expects to receive, the maximum number of bytes in the uplink aggregated data packets that the cellular device expects to receive, and the byte alignment parameters of the uplink aggregated data packets that the cellular device expects to receive. The embedded device further includes an adaptive network subsystem (NSS) module and a second network interface. The first network interface is used to receive and send Ethernet type data packets through the central processing unit (CPU) in the embedded device, and the second network interface is used to receive and send Internet Protocol (IP) type data packets through the NSS module. The second network interface is used to process IP-type uplink data packets into Ethernet-type uplink data packets and send the Ethernet-type uplink data packets to the first network interface; the first network interface is used to encapsulate the Ethernet-type uplink data packets into uplink RNDIS messages and transmit the uplink RNDIS messages to the USB interface. The step of processing IP-type uplink data packets into Ethernet-type uplink data packets includes adding the MAC address of the second network interface and / or the MAC address of the cellular device to the IP-type uplink data packets. The first network interface is used to decapsulate the downlink RNDIS message sent by the USB interface into an Ethernet-type downlink data packet, process the Ethernet-type downlink data packet into an IP-type data packet, and transmit the IP-type data packet to the second network interface. The step of processing the Ethernet-type downlink data packet into an IP-type data packet includes removing the MAC address of the second network interface and / or the MAC address of the cellular device from the Ethernet-type downlink data packet.

2. The method according to claim 1, characterized in that, The maximum number of bytes in the downlink aggregated data packet is greater than 2K bytes and less than or equal to 16K bytes.

3. The method according to claim 2, characterized in that, The method further includes: Send downlink aggregation parameters to the cellular device, the downlink aggregation parameters including the maximum number of bytes of the downlink aggregated data packet.

4. The method according to any one of claims 1 to 3, characterized in that, Before sending the uplink aggregated data packet to the cellular device, the method further includes: When an uplink data packet arrives, it is determined whether a buffer area already exists. The buffer area is used to cache uplink data packets to be aggregated. If the cache area already exists, the uplink data packets are filled into the cache area to treat the uplink data packets as uplink data packets to be aggregated.

5. The method according to claim 4, characterized in that, The process of filling the uplink data packet into the buffer area includes: The uplink data packet is populated into the buffer area when the uplink data packet meets the following conditions: After the uplink data packets are filled into the buffer area, the size of the multiple data packets to be aggregated buffered in the buffer area does not exceed the configured maximum number of bytes for the uplink aggregated data packets; and / or, After the uplink data packets are filled into the cache area, the number of multiple data packets to be aggregated cached in the cache area does not exceed the maximum number of data packets in the configured uplink aggregation data packets; and / or, The uplink data packets do not need to be sent immediately.

6. The method according to claim 4, characterized in that, The method further includes: If the cache area does not exist, request the cache area and populate the uplink data packet into the cache area.

7. The method according to claim 6, characterized in that, The process of filling the uplink data packet into the buffer area includes: The uplink data packet is populated into the buffer area when the uplink data packet meets the following conditions: The time interval between the uplink data packet and the previous uplink data packet is less than the configured maximum time interval between two adjacent uplink data packets; and / or, The uplink data packets do not need to be sent immediately.

8. The method according to any one of claims 1 to 3, characterized in that, Sending uplink aggregated data packets to the cellular device includes: When the aggregation time of the uplink aggregated data packet reaches the configured unit aggregation time of the uplink aggregated data packet, the uplink aggregated data packet is sent to the cellular device.

9. The method according to any one of claims 1 to 3, characterized in that, The MAC address of the cellular device is carried in a first message sent by the cellular device. The first message is a response message to the second message sent by the second network interface. The second message is used to request the cellular device to allocate an IP address to the second network interface, and the second message carries the MAC address of the second network interface.

10. The method according to any one of claims 1 to 3, characterized in that, The second network interface is configured with one or more of the following capabilities: Identify the Address Resolution Protocol (ARP) messages sent by the cellular device; Identify the Nearby Device Request (NS) message sent by the cellular device; In response to the ARP message, an ARP reply message is sent; In response to an NS message, a nearby device notification NA message is sent.

11. The method according to any one of claims 1 to 3, characterized in that, The second network interface is applicable to Internet Protocol version IPv4 and / or IPv6, wherein the IPv6 protocol includes Dynamic Host Configuration Protocol version DHCPv6 and / or Stateless Address Autoconfiguration (SLAAC) scenarios.

12. A data transmission device, characterized in that, An embedded device is used to connect to a local area network (LAN) device and a cellular device, enabling the LAN device to access the cellular network provided by the cellular device. The embedded device includes a LAN port, a Universal Serial Bus (USB) interface, and a first network interface. The LAN port is used to connect to the LAN device, the USB interface is used to connect to the cellular device, and the first network interface is a network interface created based on the Remote Network Driver Interface Protocol (RNDIS) when the USB interface is inserted into the cellular device. The device includes: The transceiver unit is used to receive downlink aggregated data packets sent by the cellular device through the USB interface, and / or send uplink aggregated data packets to the cellular device. The downlink aggregated data packet is formed by aggregating multiple downlink data packets, and the uplink aggregated data packet is formed by aggregating multiple uplink data packets; Specifically, the transceiver unit is used for: Based on the configured uplink aggregation parameters, the uplink aggregated data packet is sent to the cellular device; The uplink aggregation parameters are determined based on the parameters of the uplink aggregated data packets that the cellular device expects to receive. The uplink aggregation parameters include one or more of the following parameters: the unit aggregation time of the uplink aggregated data packets, the maximum time interval between two adjacent uplink data packets, the maximum number of bytes in the uplink aggregated data packets, the maximum number of data packets in the uplink aggregated data packets, and parameters used to indicate that the uplink data packets should be sent immediately. The uplink aggregation parameters are configured based on one or more of the following parameters sent by the cellular device: the maximum number of data packets in the uplink aggregated data packets that the cellular device expects to receive, the maximum number of bytes in the uplink aggregated data packets that the cellular device expects to receive, and the byte alignment parameters of the uplink aggregated data packets that the cellular device expects to receive. The embedded device further includes an adaptive network subsystem (NSS) module and a second network interface. The first network interface is used to receive and send Ethernet type data packets through the central processing unit (CPU) in the embedded device, and the second network interface is used to receive and send Internet Protocol (IP) type data packets through the NSS module. The transceiver unit is further configured to: process IP-type uplink data packets into Ethernet-type uplink data packets through the second network interface, and send the Ethernet-type uplink data packets to the first network interface; encapsulate the Ethernet-type uplink data packets into uplink RNDIS messages through the first network interface, and transmit the uplink RNDIS messages to the USB interface; The step of processing IP-type uplink data packets into Ethernet-type uplink data packets includes adding the MAC address of the second network interface and / or the MAC address of the cellular device to the IP-type uplink data packets. The transceiver unit is further configured to: decapsulate the downlink RNDIS message sent by the USB interface into an Ethernet-type downlink data packet through the first network interface, process the Ethernet-type downlink data packet into an IP-type data packet, and transmit the IP-type data packet to the second network interface; The step of processing the Ethernet-type downlink data packet into an IP-type data packet includes removing the MAC address of the second network interface and / or the MAC address of the cellular device from the Ethernet-type downlink data packet.

13. An embedded device, characterized in that, The embedded device is connected to a local area network (LAN) device and a cellular device, enabling the LAN device to access the cellular network provided by the cellular device. The device includes: A LAN port, used to connect the LAN device; A Universal Serial Bus (USB) interface is provided for connecting the cellular device. Central Processing Unit (CPU); Adapted to the Network Subsystem (NSS) module; A first network interface, which is a network interface created based on the Remote Network Driver Interface Protocol (RNDIS) when the cellular device is plugged into the USB interface, is used to receive and send Ethernet type data packets through the CPU; and... A second network interface is used to receive and send data packets through the NSS module; The embedded device receives downlink aggregated data packets sent by the cellular device and / or sends uplink aggregated data packets to the cellular device via the USB interface. The uplink aggregated data packet is transmitted based on configured uplink aggregation parameters. The uplink aggregation parameters are determined based on the parameters of the uplink aggregated data packet that the cellular device expects to receive. The uplink aggregation parameters include one or more of the following parameters: the unit aggregation time of the uplink aggregated data packet, the maximum time interval between two adjacent uplink data packets, the maximum number of bytes in the uplink aggregated data packet, the maximum number of data packets in the uplink aggregated data packet, and parameters used to indicate that the uplink data packet should be sent immediately. The uplink aggregation parameters are configured based on one or more of the following parameters sent by the cellular device: the maximum number of data packets in the uplink aggregated data packets that the cellular device expects to receive, the maximum number of bytes in the uplink aggregated data packets that the cellular device expects to receive, and the byte alignment parameters of the uplink aggregated data packets that the cellular device expects to receive. The second network interface is used to process IP-type uplink data packets into Ethernet-type uplink data packets and send the Ethernet-type uplink data packets to the first network interface; the first network interface is used to encapsulate the Ethernet-type uplink data packets into uplink RNDIS messages and transmit the uplink RNDIS messages to the USB interface. The step of processing IP-type uplink data packets into Ethernet-type uplink data packets includes adding the MAC address of the second network interface and / or the MAC address of the cellular device to the IP-type uplink data packets. The first network interface is used to decapsulate the downlink RNDIS message sent by the USB interface into an Ethernet-type downlink data packet, process the Ethernet-type downlink data packet into an IP-type data packet, and transmit the IP-type data packet to the second network interface. The step of processing the Ethernet-type downlink data packet into an IP-type data packet includes removing the MAC address of the second network interface and / or the MAC address of the cellular device from the Ethernet-type downlink data packet.

Citation Information

Patent Citations

  • Data transmission method and data transmission device based on data card

    CN104518991A

  • Data transmission method and data transmission device

    CN106375233A

  • Message processing method and device, electronic equipment, chip system and storage medium

    CN116389378A