Data packet transmission method and apparatus, and terminal device

By introducing a hardware accelerator in the terminal device to process network packets of the USB controller, the impact of USB interrupts on the performance and power consumption of the main controller is resolved, communication speed and battery life are improved, and user experience is enhanced.

WO2025251568A1PCT designated stage Publication Date: 2025-12-11XIAMEN UNISOC TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/137496
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-07
Filing Date
2024-12-06
Publication Date
2025-12-11

AI Technical Summary

Technical Problem

Numerous USB interrupts impact the performance and power consumption of the main controller, leading to decreased communication performance, overheating of terminal devices, and shortened battery life.

Method used

By introducing a hardware accelerator in the terminal device to process network data packets received and sent by the USB controller, USB receive and send interruptions are reduced or eliminated. The hardware accelerator is used to parse and encapsulate network data packets, avoiding context switching of the main controller.

Benefits of technology

Reduce or eliminate the impact of USB interrupts on the performance and power consumption of the main controller, improve user experience, increase communication speed and battery life of terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024137496_11122025_PF_FP_ABST
    Figure CN2024137496_11122025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a data packet transmission method and apparatus, and a terminal device. The terminal device comprises a main controller, a hardware accelerator, a USB controller and a wireless communication module. The data packet transmission method, which is applied to the main controller in the terminal device, comprises: in response to connecting to an external device by means of a USB interface, sending a first start instruction to a hardware accelerator, wherein the first start instruction is used for instructing the hardware accelerator to parse and encapsulate a network data packet received by a USB controller, and transmit the encapsulated network data packet by means of a wireless communication module. The USB controller receives the network data packet sent by the external device, and the hardware accelerator processes the network data packet, such that a communication link no longer triggers USB receive interrupts, and thus the impact of a large number of USB receive interrupts on the performance and power consumption of the main controller can be eliminated, thereby improving the usage experience of a user for a terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Data packet transmission method and device, and terminal device

[0001] The present application claims priority from Chinese patent application CN2024107408994 with a filing date of 7 June 2024. The present application incorporates the entire text of the aforementioned Chinese patent application. TECHNICAL FIELD

[0002] The present application relates to the field of communication technology, in particular to a data packet transmission method and device, and terminal device. BACKGROUND

[0003] Currently, a smart phone has the function of providing a PC (Personal Computer) with access to the Internet through a USB line. The connection and communication mode between devices is shown in FIG. 1. The smart phone connects with an operator base station through wireless communication technology (such as 5G, 4G, etc.) to access the Internet, and at the same time the smart phone can share the access to the Internet capability with a PC and other devices that do not have the capability of accessing the Internet through a USB line, so that the PC and other devices have the capability of accessing the Internet. Among them, the smart phone acts as a bridge to build the interaction between the PC and the operator base station. The smart phone obtains network data packets from the operator base station through wireless communication technology, and then transmits them to the PC through the USB line. Similarly, the smart phone obtains network data packets from the PC through the USB line, and then transmits them to the operator base station through wireless communication technology. In the process of network data packet uplink and downlink, data format conversion and physical communication mode change are involved.

[0004] As shown in FIG. 2, the network packet communication link inside the chip 10 is generally composed of a wireless communication module, a main controller (such as a CPU) and a USB controller. Among them, the main controller acts as an intermediate bridge between the wireless communication module and the USB controller, responsible for the operations such as analysis, re-encapsulation and flow transfer of network packets. When the smart phone enables the USB function, it will register the USB receiving interrupt in the kernel and wait for the USB receiving interrupt to be triggered, and register the USB sending interrupt and wait for data sending (sending idle). The smart phone will generate USB receiving interrupt and USB sending interrupt in the interaction process with the PC. Specifically, the PC generates USB receiving interrupt when sending data to the Internet, and the PC generates USB sending interrupt when receiving Internet data. Each interrupt will cause the kernel to trigger context switching, stop the task being executed and switch to USB receiving interrupt or USB sending interrupt to execute the task, forming CPU resource consumption. In the process of network communication with small bandwidth, the frequency of interrupt triggering is not high, the number of interrupts is small, and its impact on CPU performance is small. However, with the rapid growth of communication bandwidth, large bandwidth network communication leads to frequent USB interrupts, and a large number of USB interrupts will seriously affect the CPU performance, thereby affecting the communication performance, making the communication rate much lower than the peak value, and at the same time, it will cause the CPU power consumption to rise, leading to serious heating of the smart phone and decrease of the endurance time, affecting the user experience. SUMMARY

[0005] The technical problem to be solved by the present application is to overcome the defects in the prior art that a large number of USB interrupts affect the performance and power consumption of the main controller, and to provide a data packet transmission method and device and a terminal device.

[0006] The present application solves the above technical problems by the following technical solutions:

[0007] The first aspect of the present application provides a data packet transmission method applied to a main controller in a terminal device, wherein the terminal device further comprises a hardware accelerator, a USB controller and a wireless communication module, and the data packet transmission method comprises the following steps:

[0008] In response to connecting with an external device through a USB interface, a first start instruction is sent to the hardware accelerator; wherein the first start instruction is used to instruct the hardware accelerator to analyze and encapsulate network packets received by the USB controller, and to transmit the encapsulated network packets through the wireless communication module.

[0009] Optionally, the hardware accelerator comprises a register module, a storage module and a state machine, and before the first start instruction is sent to the hardware accelerator, the following steps are further included:

[0010] configuring the register module according to the USB controller;

[0011] loading an instruction set set according to the USB controller into the storage module; wherein the state machine is configured to execute instructions in the instruction set.

[0012] Optionally, the data packet transmission method further comprises the following steps: in response to the connection with the external device being disconnected, sending a first stop instruction to the hardware accelerator; wherein the first stop instruction is configured to instruct the hardware accelerator to stop running.

[0013] Optionally, before the USB controller sends the second start instruction, the method further comprises the following steps:

[0014] initializing the USB controller;

[0015] configuring a port in the USB controller for communication with the hardware accelerator.

[0016] Optionally, the data packet transmission method further comprises the following steps: in response to the connection with the external device being disconnected, sending a first stop instruction to the hardware accelerator; wherein the first stop instruction is configured to instruct the hardware accelerator to stop running.

[0017] Optionally, the data packet transmission method further comprises the following steps: in response to the connection with the external device being disconnected, sending a first clean-up instruction to the hardware accelerator; wherein the first clean-up instruction is configured to instruct the cleaning of data in the register module and the storage.

[0018] Optionally, the data packet transmission method further comprises the following steps: in response to the connection with the external device being disconnected, sending a second stop instruction to the USB controller; wherein the second stop instruction is configured to instruct the USB controller to stop running.

[0019] Optionally, the data packet transmission method further comprises the following steps: in response to the connection with the external device being disconnected, sending a second clean-up instruction to the USB controller; wherein the second clean-up instruction is configured to instruct the cleaning of resources in the USB controller.

[0020] A second aspect of the present application provides a data packet transmission method applied to a hardware accelerator in a terminal device, the terminal device further comprising a main controller, a USB controller and a wireless communication module, the data packet transmission method comprising the following steps:

[0021] in response to a first start instruction sent by the main controller, detecting whether the USB controller receives a network data packet;

[0022] reading the network data packet from the USB controller in response to detecting that the USB controller receives the network data packet;

[0023] parsing and packaging the network data packet;

[0024] transmitting the packaged network data packet through the wireless communication module.

[0025] Optionally, the detecting whether the USB controller receives the network data packet specifically comprises:

[0026] if the data read from the target register of the USB controller is consistent with the locally pre-stored data, detecting that the USB controller receives the network data packet, otherwise, detecting that the USB controller does not receive the network data packet.

[0027] A third aspect of the present application provides a data packet transmission method applied to a terminal device, wherein the terminal device comprises a hardware accelerator, a main controller, a USB controller and a wireless communication module; the data packet transmission method comprises the following steps:

[0028] the main controller sends a first start instruction to the hardware accelerator in response to connecting with an external device through a USB interface;

[0029] the hardware accelerator detects whether the USB controller receives a network data packet in response to the first start instruction, reads the network data packet from the USB controller in the case of detecting that the USB controller receives the network data packet, parses and packages the network data packet, and transmits the packaged network data packet through the wireless communication module.

[0030] A fourth aspect of the present application provides a data packet transmission device applied to a main controller in a terminal device, wherein the terminal device further comprises a hardware accelerator, a USB controller and a wireless communication module, and the data packet transmission device comprises:

[0031] a first start module, configured to send a first start instruction to the hardware accelerator in response to connecting with an external device through a USB interface; wherein the first start instruction is used to instruct the hardware accelerator to parse and package a network data packet received by the USB controller, and to transmit the packaged network data packet through the wireless communication module.

[0032] Optionally, the hardware accelerator comprises a register module, a storage module and a state machine, and the data packet transmission device further comprises a first configuration module, configured to configure the register module according to the USB controller before sending a first start instruction to the hardware accelerator, and load an instruction set set according to the USB controller into the storage module; wherein the state machine is configured to execute instructions in the instruction set.

[0033] Optionally, the data packet transmission device further comprises a second start module, configured to send a second start instruction to the USB controller in response to connecting with an external device through a USB interface; wherein the second start instruction is configured to instruct the USB controller to be recognized by the external device.

[0034] Optionally, the data packet transmission device further comprises a second configuration module, configured to initialize the USB controller and configure a port in the USB controller for communication with the hardware accelerator before the USB controller sends the second start instruction.

[0035] Optionally, the data packet transmission device further comprises a first stop module, configured to send a first stop instruction to the hardware accelerator in response to disconnection with the external device; wherein the first stop instruction is configured to instruct the hardware accelerator to stop running.

[0036] Optionally, the data packet transmission device further comprises a first cleaning module, configured to send a first cleaning instruction to the hardware accelerator in response to disconnection with the external device; wherein the first cleaning instruction is configured to instruct to clean data in the register module and the storage module.

[0037] Optionally, the data packet transmission device further comprises a second stop module, configured to send a second stop instruction to the USB controller in response to disconnection with the external device; wherein the second stop instruction is configured to instruct the USB controller to stop running.

[0038] Optionally, the data packet transmission device further comprises a second cleaning module, configured to send a second cleaning instruction to the USB controller in response to disconnection with the external device; wherein the second cleaning instruction is configured to instruct to clean resources in the USB controller.

[0039] A fifth aspect of the present application provides a data packet transmission device applied to a hardware accelerator in a terminal device, wherein the terminal device further comprises a main controller, a USB controller and a wireless communication module, and the data packet transmission device comprises:

[0040] a detection module, configured to detect whether the USB controller receives a network data packet in response to a first start instruction sent by the host controller;

[0041] a reading module, configured to read the network data packet from the USB controller in response to detection that the USB controller receives the network data packet;

[0042] a processing module, configured to parse and encapsulate the network data packet;

[0043] a transmission module, configured to transmit the encapsulated network data packet through the wireless communication module.

[0044] Optionally, the detection module is specifically configured to detect that the USB controller receives the network data packet in a case where data read from a target register of the USB controller is consistent with locally pre-stored data, and otherwise, detect that the USB controller does not receive the network data packet.

[0045] A sixth aspect of the present application provides a data packet transmission device, comprising a hardware accelerator, a host controller, a USB controller and a wireless communication module:

[0046] The host controller is configured to send a first start instruction to the hardware accelerator in response to connection with an external device through a USB interface.

[0047] The hardware accelerator is configured to detect whether the USB controller receives a network data packet in response to the first start instruction, read the network data packet from the USB controller in a case where it is detected that the USB controller receives the network data packet, parse and encapsulate the network data packet, and transmit the encapsulated network data packet through the wireless communication module.

[0048] Optionally, the hardware accelerator comprises a register module, a storage module and a state machine, and the host controller is further configured to configure the register module according to the USB controller before sending the first start instruction to the hardware accelerator, and load an instruction set set according to the USB controller into the storage module; wherein the state machine is configured to execute instructions in the instruction set.

[0049] Optionally, the host controller is further configured to send a second start instruction to the USB controller in response to connection with the external device through the USB interface; wherein the second start instruction is used to instruct the USB controller to allow being identified by the external device.

[0050] Optionally, the main controller is further configured to initialize the USB controller and configure a port in the USB controller for communication with the hardware accelerator before the USB controller sends the second start instruction.

[0051] Optionally, the main controller is further configured to send a first stop instruction to the hardware accelerator in response to disconnection with the external device; wherein the first stop instruction is used to instruct the hardware accelerator to stop running.

[0052] Optionally, the main controller is further configured to send a first clean-up instruction to the hardware accelerator in response to disconnection with the external device; wherein the first clean-up instruction is used to instruct to clean up data in the register module and the memory.

[0053] Optionally, the main controller is further configured to send a second stop instruction to the USB controller in response to disconnection with the external device; wherein the second stop instruction is used to instruct the USB controller to stop running.

[0054] Optionally, the main controller is further configured to send a second clean-up instruction to the USB controller in response to disconnection with the external device; wherein the second clean-up instruction is used to instruct to clean up resources in the USB controller.

[0055] Optionally, the hardware accelerator is specifically configured to detect that the USB controller receives a network packet when data read from the target register of the USB controller is consistent with locally pre-stored data, and otherwise, detect that the USB controller does not receive a network packet.

[0056] The seventh aspect of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the data packet transmission method of the first aspect or the second aspect when executing the computer program.

[0057] The eighth aspect of the present application provides a chip applied to a terminal device, and the chip is used to execute the data packet transmission method of the first aspect or the second aspect.

[0058] The ninth aspect of the present application provides a chip module applied to a terminal device, comprising a chip, and the chip is used to execute the data packet transmission method of the first aspect or the second aspect.

[0059] The tenth aspect of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the data packet transmission method of the first aspect or the second aspect.

[0060] An eleventh aspect of the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the data packet transmission method according to the first aspect or the second aspect.

[0061] On the basis of common general knowledge in the art, the optional conditions described above can be combined in any manner, thereby obtaining various preferred embodiments of the present application.

[0062] The positive progress effect of the present application is that the USB controller receives the network data packet sent by the external device, and the hardware accelerator processes the network data packet. The communication link will no longer trigger the USB receive interrupt, so it will not cause the host controller to perform context switching. The influence of a large number of USB receive interrupts on the performance and power consumption of the host controller can be eliminated, thereby improving the user experience of using the terminal device. BRIEF DESCRIPTION OF DRAWINGS

[0063] FIG. 1 is a schematic diagram of the connection and communication between a smart phone and a PC in the prior art.

[0064] FIG. 2 is a schematic diagram of the connection between a chip and an external device in the prior art.

[0065] FIG. 3 is a schematic diagram of the connection between a terminal device and an external device according to an embodiment of the present application.

[0066] FIG. 4 is a schematic diagram of the structure of a hardware accelerator according to an embodiment of the present application.

[0067] FIG. 5 is a flowchart of a method for connecting a terminal device and an external device according to an embodiment of the present application.

[0068] FIG. 6 is a flowchart of a method for disconnecting a terminal device and an external device according to an embodiment of the present application.

[0069] FIG. 7 is a flowchart of a data packet transmission method according to an embodiment of the present application.

[0070] FIG. 8 is a flowchart of a data packet transmission method according to an embodiment of the present application.

[0071] FIG. 9 is a schematic diagram of the structure of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION

[0072] The present application will be further described by way of examples without limiting the present application to the described examples.

[0073] The terminal device in the embodiments of the present application can refer to various forms of user equipment (User Equipment, UE for short), access terminal, user unit, user station, mobile station (Mobile Station, MS for short), mobile terminal (Mobile Terminal, MT for short), remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent or user equipment. The terminal device can also be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP for short) phone, a Wireless Local Loop (WLL for short) station, a Personal Digital Assistant (PDA for short), a handheld device with wireless communication function, a computer with wireless transceiver function, a Virtual Reality (VR for short) terminal device, an Augmented Reality (AR for short) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a 5G network, or a terminal device in a future evolved Public Land Mobile Network (PLMN for short) and the like. The embodiments of the present application do not limit this.

[0074] The data packet transmission method provided by the embodiments of the present application can realize USB function, also known as USB shared connection, allowing users to share the network of the terminal device to external devices through the USB data line. The external device can be a PC, a notebook computer, etc. It should be noted that when the data packet transmission method provided by the embodiments of the present application realizes the USB function, it is not necessary to register the USB receiving interrupt and the USB sending interrupt in the kernel.

[0075] The data packet transmission method provided by the embodiments of the present application can be executed by a data packet transmission device, which can be realized by software and / or hardware. The data packet transmission device can include part or all of the terminal device, and specifically can be a separate chip, a chip module or a terminal device, or a chip or a chip module integrated in the terminal device.

[0076] As to each module / unit included in the data packet transmission apparatus described in the embodiments of the present application, it can be a software module / unit, or a hardware module / unit, or partially a software module / unit and partially a hardware module / unit. For example, as to each apparatus / product applied to or integrated in a chip, each module / unit included therein can be realized in the form of hardware such as a circuit, or at least part of the modules / units can be realized in the form of a software program running on a processor integrated in the chip, and the remaining part of the modules / units can be realized in the form of hardware such as a circuit; as to each apparatus / product applied to or integrated in a chip module, each module / unit included therein can be realized in the form of hardware such as a circuit, and different modules / units can be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the chip module, or at least part of the modules / units can be realized in the form of a software program running on a processor integrated in the chip module, and the remaining part of the modules / units can be realized in the form of hardware such as a circuit; as to each apparatus / product applied to or integrated in a terminal device, each module / unit included therein can be realized in the form of hardware such as a circuit, and different modules / units can be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the terminal device, or at least part of the modules / units can be realized in the form of a software program running on a processor integrated in the terminal device, and the remaining part of the modules / units can be realized in the form of hardware such as a circuit.

[0077] Embodiment 1

[0078] The data packet transmission method provided in the embodiments can be executed by a data packet transmission apparatus, which can be implemented in the form of software and / or hardware, and can include part or all of a host controller in a terminal device. As shown in FIG. 3, the terminal device 20 includes a host controller, a hardware accelerator, a USB controller and a wireless communication module, wherein the host controller is in communication connection with the hardware accelerator, the USB controller and the wireless communication module respectively, and the hardware accelerator is in communication connection with the USB controller and the wireless communication module respectively.

[0079] The data packet transmission method provided in the embodiments will be described below with the host controller in the terminal device as the execution subject. The data packet transmission method provided in the embodiments can include the following step S11.

[0080] In step S11, a first start instruction is sent to the hardware accelerator in response to the connection with the external device through the USB interface, wherein the first start instruction is used to instruct the hardware accelerator to parse and package the network data packet received by the USB controller, and to transmit the packaged network data packet through the wireless communication module.

[0081] Specifically, the USB controller in the terminal device can establish a connection with the external device through the USB interface. In a specific implementation, the hardware accelerator can transmit the encapsulated network packet to the base station through the wireless communication module. The above-mentioned parsing operation can be a RNDIS (Remote Network Driver Interface Specification) protocol parsing, and the part about the RNDIS protocol in the network packet is removed. The above-mentioned encapsulation operation can be encapsulating the parsed network packet according to the wireless communication protocol (i.e., the protocol corresponding to the wireless communication module).

[0082] In this embodiment, the network packet sent by the external device is received through the USB controller, and the hardware accelerator processes the uplink network packet. The communication link no longer triggers the USB reception interrupt, so the host controller does not perform context switching, and the impact of a large number of USB reception interrupts on the performance and power consumption of the host controller can be eliminated, thereby improving the user experience of using the terminal device.

[0083] In an optional implementation, the first start instruction is further used to instruct the hardware accelerator to parse and encapsulate the network packet received by the wireless communication module, and to transmit the encapsulated network packet through the USB controller.

[0084] In a specific implementation, the hardware accelerator can transmit the encapsulated network packet to the external device through the USB controller. The above-mentioned parsing operation can be a wireless communication protocol (i.e., the protocol corresponding to the wireless communication module) parsing, and the part about the wireless communication protocol in the network packet is removed. The above-mentioned encapsulation operation can be encapsulating the parsed network packet according to the RNDIS protocol.

[0085] In this embodiment, the network packet sent by the base station is received through the wireless communication module, and the hardware accelerator processes the downlink network packet. The communication link no longer triggers the USB transmission interrupt, so the host controller does not perform context switching, and the impact of a large number of USB transmission interrupts on the performance and power consumption of the host controller can be eliminated, thereby improving the user experience of using the terminal device.

[0086] In an optional implementation, as shown in FIG. 4, the above-mentioned hardware accelerator includes a register module, a storage module and a state machine. In this embodiment, before the first start instruction is sent to the hardware accelerator in step S11, the following steps S101-S102 are further included:

[0087] In step S101, the USB controller is configured according to the register module.

[0088] In the implementation of step S101, the address of a register in the USB controller requiring hardware accelerator operation can be written into the register module, and the data address requiring hardware accelerator operation can also be written into the register module.

[0089] Step S102, loading the instruction set set according to the USB controller into the storage module; wherein the state machine is used to execute the instructions in the instruction set.

[0090] The register module includes a plurality of registers, each of which is used to store data information, and can specifically store initialization configuration data information such as the address of a register in the USB controller, and can also store temporary data information such as the return value of a register in the USB controller obtained by the state machine according to the instructions.

[0091] The storage module is a readable and writable memory area, which can specifically be a RAM (Random Access Memory), a Cache (Cache Memory), a Flash memory, etc.

[0092] In the implementation, different instruction sets are set according to different USB controllers, wherein the number of instructions in the instruction set, the execution order of the instructions, the execution content of the instructions, the length of the instructions, etc. can be flexibly set. The execution content of the instructions usually includes reading, writing, data saving, data comparison, etc. In one specific example, the length of each register is 64 bits, and the length of each instruction is fixed to 8 bytes.

[0093] Taking the USB controller as a DWC3 controller (a USB 3.x controller) as an example, an instruction set including the following instructions is set:

[0094] Write the value of Reg1 into DEPCMDPAR0(1);

[0095] Write the value of Reg2 into DEPCMDPAR1(1);

[0096] Write Reg3 into DEPCMDPAR2(1);

[0097] Write the value of Reg4 into DEPCMD(1);

[0098] Read the value of DEPCMD(1) and write it into Reg0;

[0099] Determine whether the data in Reg0 is equal to the pre-stored data in Reg5, if not, continue to read the value of DEPCMD(1); if yes, read the value of GEVNTCOUNT(1) and put it into Reg0.

[0100] Wherein, Reg0, Reg1, Reg 2, Reg 3, Reg4, Reg5 are registers in register modules of the hardware accelerator, DEPCMDPAR0, DEPCMDPAR1, DEPCMDPAR2, DEPCMD, GEVNTCOUNT are registers in the DWC3 controller. In this example, the state machine executes corresponding tasks by reading instructions in the instruction set in sequence. After reading the last instruction, if the returned result is yes, it means that the DWC3 controller receives a network data packet, and the subsequent state machine can parse, encapsulate and transmit the network data packet corresponding to the value of GEVNTCOUNT(1).

[0101] In an optional embodiment, the data packet transmission method further comprises a step S12 of sending a second start instruction to the USB controller in response to connecting with the external device through the USB interface; wherein the second start instruction is used to instruct the USB controller to be recognized by the external device. In this embodiment, the USB controller being recognized by the external device means that the external device is allowed to enumerate the terminal device where the USB controller is located, i.e. starting the USB controller. At this time, the external device can send a network data packet to the USB controller, and the external device is equivalent to a USB host, and the terminal device where the USB controller is located is equivalent to a USB slave.

[0102] It should be noted that the execution order of the above steps S12 and S11 is not limited, and the above steps S12 and S11 can be executed simultaneously, or the above step S11 can be executed first and then the above step S12, or the above step S12 can be executed first and then the above step S11.

[0103] In an optional embodiment, before the USB controller sends the second start instruction in the above step S12, the following steps S201-S202 are further included:

[0104] Step S201, initializing the USB controller. Specifically, the data in the global register, port and event of the USB controller which need memory resources can be initialized.

[0105] Step S202, configuring the port in the USB controller for communication with the hardware accelerator. After configuring the port, the hardware accelerator communicates data with the USB controller through the port.

[0106] In an optional embodiment, in order to reduce the power consumption of the hardware accelerator, the data packet transmission method further comprises step S13: sending a first stop instruction to the hardware accelerator in response to disconnection of the connection with the external device; wherein the first stop instruction is used to instruct the hardware accelerator to stop running. In this embodiment, the running of the hardware accelerator is stopped after the USB connection between the terminal device and the external device is disconnected, specifically, the running of the state machine is stopped, and the state machine is restored to the initial state.

[0107] In an optional embodiment, the data packet transmission method further comprises step S14: sending a first cleaning instruction to the hardware accelerator in response to disconnection of the connection with the external device; wherein the first cleaning instruction is used to instruct cleaning of data in the register module and the memory. In this embodiment, the data in the hardware accelerator is cleaned after the USB connection between the terminal device and the external device is disconnected, including the data stored in the register module and the memory.

[0108] In an optional embodiment, in order to reduce the power consumption of the USB controller, the data packet transmission method further comprises step S15: sending a second stop instruction to the USB controller in response to disconnection of the connection with the external device; wherein the second stop instruction is used to instruct the USB controller to stop running. In a specific implementation, the resources affecting the stop of the USB controller also need to be cleaned in advance, for example, the value of GEVNTCOUNT(1) is set to 0, and all ports are prohibited from data transmission. In this embodiment, the running of the USB controller is stopped after the USB connection between the terminal device and the external device is disconnected.

[0109] In an optional embodiment, the data packet transmission method further comprises step S16: sending a second cleaning instruction to the USB controller in response to disconnection of the connection with the external device; wherein the second cleaning instruction is used to instruct cleaning of resources in the USB controller. In this embodiment, the resources in the USB controller are cleaned after the USB connection between the terminal device and the external device is disconnected, which can specifically include releasing resources occupying memory such as events, cleaning data in the register, etc.

[0110] It should be noted that after the USB connection between the terminal device and the external device is disconnected, if the data in the hardware accelerator is not cleaned, the above steps S101 and S102 are executed once and do not need to be repeatedly executed. After the USB connection between the terminal device and the external device is disconnected, if the resources in the USB controller are not cleaned, the above steps S201 and S202 are executed once and do not need to be repeatedly executed.

[0111] Figure 5 is a flow chart illustrating a method for connecting a terminal device with an external device. As shown in Figure 5, in response to the terminal device being connected with the external device through the USB interface, a register module in the hardware accelerator is configured and a set of instructions is loaded into a storage module in the hardware accelerator, and the hardware accelerator is started by sending a first start instruction. In response to the terminal device being connected with the external device through the USB interface, the USB controller is initialized and port configured, and the USB controller is started by sending a second start instruction.

[0112] Figure 6 is a flow chart illustrating a method for disconnecting a terminal device from an external device. As shown in Figure 6, in response to the terminal device being disconnected from the external device, a first stop instruction and a first clean-up instruction are sent to the hardware accelerator to stop the operation of the hardware accelerator and clean up data in the hardware accelerator. In response to the terminal device being disconnected from the external device, a second stop instruction and a second clean-up instruction are sent to the USB controller to stop the operation of the USB controller and clean up resources in the USB controller.

[0113] The embodiment also provides a data packet transmission apparatus applied to a main controller in a terminal device, the terminal device further comprising a hardware accelerator, a USB controller and a wireless communication module, the data packet transmission apparatus comprising a first start module configured to send a first start instruction to the hardware accelerator in response to being connected with an external device through a USB interface; wherein the first start instruction is configured to instruct the hardware accelerator to analyze and package network data packets received by the USB controller, and transmit the packaged network data packets through the wireless communication module.

[0114] In an optional implementation, the hardware accelerator comprises a register module, a storage module and a state machine, and the data packet transmission apparatus further comprises a first configuration module configured to configure the register module according to the USB controller and load a set of instructions set according to the USB controller into the storage module before sending the first start instruction to the hardware accelerator; wherein the state machine is configured to execute instructions in the set of instructions.

[0115] In an optional implementation, the data packet transmission apparatus further comprises a second start module configured to send a second start instruction to the USB controller in response to being connected with an external device through a USB interface; wherein the second start instruction is configured to instruct the USB controller to be recognized by the external device.

[0116] In an optional implementation, the data packet transmission apparatus further comprises a second configuration module, configured to initialize the USB controller and configure a port in the USB controller for communication with the hardware accelerator before the USB controller sends the second start instruction.

[0117] In an optional implementation, the data packet transmission apparatus further comprises a first stop module, configured to send a first stop instruction to the hardware accelerator in response to disconnection with the external device; wherein the first stop instruction is used to instruct the hardware accelerator to stop running.

[0118] In an optional implementation, the data packet transmission apparatus further comprises a first clean-up module, configured to send a first clean-up instruction to the hardware accelerator in response to disconnection with the external device; wherein the first clean-up instruction is used to instruct clean-up of data in the register module and the memory.

[0119] In an optional implementation, the data packet transmission apparatus further comprises a second stop module, configured to send a second stop instruction to the USB controller in response to disconnection with the external device; wherein the second stop instruction is used to instruct the USB controller to stop running.

[0120] In an optional implementation, the data packet transmission apparatus further comprises a second clean-up module, configured to send a second clean-up instruction to the USB controller in response to disconnection with the external device; wherein the second clean-up instruction is used to instruct clean-up of resources in the USB controller.

[0121] Embodiment 2

[0122] FIG. 7 is a flowchart of the data packet transmission method provided in the embodiment. The data packet transmission method provided in the embodiment can be executed by a data packet transmission apparatus, which can be implemented in software and / or hardware, and can include part or all of a hardware accelerator in a terminal device. As shown in FIG. 3, the terminal device 20 includes a main controller, a hardware accelerator, a USB controller and a wireless communication module, wherein the main controller is in communication connection with the hardware accelerator, the USB controller and the wireless communication module respectively, and the hardware accelerator is in communication connection with the USB controller and the wireless communication module respectively. It should be noted that the main controller is used to execute the data packet transmission method in Embodiment 1.

[0123] The data packet transmission method provided in the embodiment will be described below with the hardware accelerator in a terminal device as the execution subject. As shown in FIG. 7, the data packet transmission method provided in the embodiment can include the following steps S21-S24:

[0124] Step S21, in response to the first start instruction sent by the main controller, detecting whether the USB controller receives a network packet. Wherein, the main controller sends the first start instruction to the hardware accelerator in response to connecting with the external device through the USB interface.

[0125] Step S22, in response to detecting that the USB controller receives a network packet, reading the network packet from the USB controller.

[0126] Step S23, parsing and packaging the network packet. Wherein, the parsing operation can be RNDIS protocol parsing, removing the part about RNDIS protocol in the network packet. The packaging operation can be packaging the parsed network packet according to the wireless communication protocol (i.e. the protocol corresponding to the wireless communication module).

[0127] Step S24, transmitting the packaged network packet through the wireless communication module. In a specific implementation, the hardware accelerator can transmit the packaged network packet to the base station through the wireless communication module.

[0128] In this embodiment, the USB controller receives the network packet sent by the external device, and the main controller starts the hardware accelerator to process the network packet by the hardware accelerator. The communication link will no longer trigger the USB receive interrupt, so it will not cause the main controller to perform context switching, which can eliminate the impact of a large number of USB receive interrupts on the performance and power consumption of the main controller, thereby improving the user experience of using the terminal device.

[0129] In an optional implementation, in response to the first start instruction sent by the main controller, the hardware accelerator parses and packages the network packet received by the wireless communication module, and transmits the packaged network packet through the USB controller. In a specific implementation, the hardware accelerator can transmit the packaged network packet to the external device through the USB controller. The above-mentioned parsing operation can be wireless communication protocol (i.e. the protocol corresponding to the wireless communication module) parsing, removing the part about the wireless communication protocol in the network packet, and the above-mentioned packaging operation can be packaging the parsed network packet according to the RNDIS protocol.

[0130] In the embodiment, the network data packet transmitted by the base station is received by the wireless communication module, and the main controller starts the hardware accelerator, and the hardware accelerator processes the downlink network data packet. The communication link will no longer trigger the USB sending interrupt, so the main controller will not perform context switching, the influence of a large number of USB sending interrupts on the performance and power consumption of the main controller can be eliminated, and the user experience of using the terminal device can be improved.

[0131] In an optional embodiment, the step S21 specifically includes: if the data read from the target register of the USB controller is consistent with the locally pre-stored data, it is detected that the USB controller receives the network data packet, otherwise, it is detected that the USB controller does not receive the network data packet.

[0132] In a specific implementation, the hardware accelerator can include a register module, a storage module and a state machine. Before the main controller sends the first start instruction to the hardware accelerator, the register module can be configured according to the USB controller, and the instruction set set according to the USB controller can be loaded into the storage module; wherein the state machine is used to execute the instructions in the instruction set.

[0133] The main controller can write the address of the register of the USB controller which needs to be operated by the hardware accelerator into the register module, and can also write the data address which needs to be operated by the hardware accelerator into the register module. The register module includes a plurality of registers, each register is used to store data information, and can store initialization configuration data information such as the address of the register in the USB controller, and can also store temporary data information such as the return value of the register in the USB controller obtained by the state machine according to the instructions. The storage module is a readable and writable memory area, which can be RAM (Random Access Memory), Cache (Cache Memory), Flash memory, etc.

[0134] In a specific implementation, different instruction sets can be set according to different USB controllers, and the number of instructions in the instruction set, the execution order of the instructions, the execution content of the instructions, the length of the instructions, etc. can be flexibly set. The execution content of the instructions usually includes reading, writing, data saving, data comparison, etc. In a specific example, the length of each register is 64 bits, and the length of each instruction is fixed to 8 bytes.

[0135] Taking the DWC3 controller (a USB 3.x controller) as an example, the instruction set including the following instructions is set:

[0136] The value of Reg1 is written into DEPCMDPAR0 (1);

[0137] write the value of Reg2 into DEPCMDPAR1(1);

[0138] write Reg3 into DEPCMDPAR2(1);

[0139] write the value of Reg4 into DEPCMD(1);

[0140] read the value of DEPCMD(1) and write it into Reg0;

[0141] determine whether the data in Reg0 is equal to the pre-stored data in Reg5, if not, continue to read the value of DEPCMD(1); if yes, read the value of GEVNTCOUNT(1) and put it into Reg0.

[0142] wherein Reg0, Reg1, Reg2, Reg3, Reg4, Reg5 are registers in the register module of the hardware accelerator, and DEPCMDPAR0, DEPCMDPAR1, DEPCMDPAR2, DEPCMD, GEVNTCOUNT are registers in the DWC3 controller. In this example, the state machine executes corresponding tasks by reading instructions in the instruction set in sequence. After reading the last instruction, if the returned result is yes, it means that the DWC3 controller receives a network data packet, and the subsequent state machine can parse, encapsulate and transmit the value of GEVNTCOUNT(1) (i.e. the network data packet).

[0143] The embodiment also provides a data packet transmission device applied to a hardware accelerator in a terminal device, which comprises a detection module, a reading module, a processing module and a transmission module. The detection module is configured to detect whether the USB controller receives a network data packet in response to a first start instruction sent by the host controller. The reading module is configured to read the network data packet from the USB controller in response to detecting that the USB controller receives the network data packet. The processing module is configured to parse and encapsulate the network data packet. The transmission module is configured to transmit the encapsulated network data packet through the wireless communication module.

[0144] In an optional implementation, the detection module is specifically configured to detect that the USB controller receives a network data packet in the case that the data read from the target register of the USB controller is consistent with the locally pre-stored data, and otherwise, detect that the USB controller does not receive a network data packet.

[0145] Embodiment 3

[0146] The data packet transmission method provided in the embodiment is applied to a terminal device, as shown in FIG. 3, the terminal device 20 comprises a main controller, a hardware accelerator, a USB controller and a wireless communication module, wherein the main controller is in communication connection with the hardware accelerator, the USB controller and the wireless communication module respectively, and the hardware accelerator is in communication connection with the USB controller and the wireless communication module respectively.

[0147] As shown in FIG. 8, the data packet transmission method provided in the embodiment can comprise the following steps S31-S32:

[0148] In step S31, the main controller sends a first start instruction to the hardware accelerator in response to the connection with the external device through the USB interface. Specifically, the USB controller in the terminal device can establish a connection with the external device through the USB interface.

[0149] In step S32, the hardware accelerator detects whether the USB controller receives a network data packet in response to the first start instruction, reads the network data packet from the USB controller in the case that the USB controller receives the network data packet, and performs analysis and encapsulation on the network data packet, and transmits the encapsulated network data packet through the wireless communication module.

[0150] In a specific implementation, the hardware accelerator can transmit the encapsulated network data packet to a base station through the wireless communication module. The analysis operation can be specifically RNDIS protocol analysis, and the part about the RNDIS protocol in the network data packet is removed. The encapsulation operation can be specifically encapsulating the analyzed network data packet according to the wireless communication protocol (i.e., the protocol corresponding to the wireless communication module).

[0151] In the embodiment, the network data packet sent by the external device is received through the USB controller, and the main controller starts the hardware accelerator, and the hardware accelerator processes the uplink network data packet. The communication link will no longer trigger the USB reception interrupt, so the main controller will not perform context switching, and the influence of a large number of USB reception interrupts on the performance and power consumption of the main controller can be eliminated, thereby improving the user experience of using the terminal device.

[0152] In an optional implementation, in response to the first start instruction sent by the main controller, the hardware accelerator parses and encapsulates the network data packet received by the wireless communication module, and transmits the encapsulated network data packet through the USB controller. In a specific implementation, the hardware accelerator can transmit the encapsulated network data packet to the external device through the USB controller. The parsing operation can be specifically wireless communication protocol (i.e., the protocol corresponding to the wireless communication module) parsing, and removing the part of the network data packet related to the wireless communication protocol. The encapsulation operation can be specifically encapsulating the parsed network data packet according to the RNDIS protocol.

[0153] In the embodiment, the network data packet sent by the base station is received by the wireless communication module, and after the main controller starts the hardware accelerator, the hardware accelerator processes the downlink network data packet. The communication link no longer triggers the USB sending interrupt, so the main controller does not perform context switching, and the influence of a large number of USB sending interrupts on the performance and power consumption of the main controller can be eliminated, thereby improving the user experience of using the terminal device.

[0154] It should be noted that the steps performed by the main controller and the hardware accelerator in the embodiment and the corresponding effects can refer to the above-mentioned embodiments 1 and 2.

[0155] The embodiment also provides a data packet transmission device, which includes a hardware accelerator, a main controller, a USB controller, and a wireless communication module. The main controller is configured to send a first start instruction to the hardware accelerator in response to being connected to an external device through a USB interface. The hardware accelerator is configured to detect whether the USB controller receives a network data packet in response to the first start instruction, read the network data packet from the USB controller in the case that the USB controller receives the network data packet, parse and encapsulate the network data packet, and transmit the encapsulated network data packet through the wireless communication module.

[0156] In an optional implementation, the hardware accelerator includes a register module, a storage module, and a state machine. The main controller is further configured to configure the register module according to the USB controller before sending the first start instruction to the hardware accelerator, and load an instruction set set according to the USB controller into the storage module. The state machine is configured to execute instructions in the instruction set.

[0157] In an optional implementation, the main controller is further configured to send a second start instruction to the USB controller in response to the connection with the external device via the USB interface; wherein the second start instruction is used to instruct the USB controller to be recognized by the external device.

[0158] In an optional implementation, the main controller is further configured to initialize the USB controller and configure a port in the USB controller for communication with the hardware accelerator before the USB controller sends the second start instruction.

[0159] In an optional implementation, the main controller is further configured to send a first stop instruction to the hardware accelerator in response to the disconnection with the external device; wherein the first stop instruction is used to instruct the hardware accelerator to stop running.

[0160] In an optional implementation, the main controller is further configured to send a first clean-up instruction to the hardware accelerator in response to the disconnection with the external device; wherein the first clean-up instruction is used to instruct to clean up the data in the register module and the memory.

[0161] In an optional implementation, the main controller is further configured to send a second stop instruction to the USB controller in response to the disconnection with the external device; wherein the second stop instruction is used to instruct the USB controller to stop running.

[0162] In an optional implementation, the main controller is further configured to send a second clean-up instruction to the USB controller in response to the disconnection with the external device; wherein the second clean-up instruction is used to instruct to clean up the resources in the USB controller.

[0163] In an optional implementation, the hardware accelerator is specifically configured to detect that the USB controller receives a network data packet in a case that the data read from the target register of the USB controller is consistent with the locally pre-stored data, and otherwise, detect that the USB controller does not receive a network data packet.

[0164] Embodiment 4

[0165] FIG. 9 is a structural schematic diagram of a terminal device provided in the embodiment. The terminal device includes at least one processor and a memory connected with the at least one processor in communication. The memory stores a computer program that can be run by the at least one processor. The computer program is executed by the at least one processor, so that the at least one processor can perform the data packet transmission method in embodiment 1 or 2. In one example, the processor is the above-mentioned main controller, and can perform the data packet transmission method in embodiment 1. In another example, the processor is the above-mentioned hardware accelerator, and can perform the data packet transmission method in embodiment 2. The terminal device 3 shown in FIG. 9 is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present disclosure.

[0166] The components of the terminal device 3 can include, but are not limited to, the above-mentioned at least one processor 4, the above-mentioned at least one memory 5, a bus 6 connecting different system components including the memory 5 and the processor 4.

[0167] The bus 6 includes a data bus, an address bus and a control bus.

[0168] The memory 5 can include a volatile memory, such as a random access memory (RAM) 51 and / or a cache memory 52, and can further include a non-volatile memory, such as a read-only memory (ROM) 53.

[0169] The memory 5 can further include a program / utility 55 having a set (at least one) of program modules 54, including but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or a combination can include implementation of a network environment.

[0170] The processor 4 performs various function applications and data processing, such as the above-mentioned data packet transmission method, by running the computer program stored in the memory 5.

[0171] The terminal device 3 can also communicate with one or more external devices 7 (such as a keyboard, a pointing device, etc.). Such communication can be carried out through an input / output (I / O) interface 8. Furthermore, the terminal device 3 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 9. As shown in FIG. 9, the network adapter 9 communicates with other modules of the terminal device 3 through the bus 6. It should be understood that although not shown in FIG. 9, other hardware and / or software modules can be used in combination with the terminal device 3, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (Redundant Array of Independent Disks) systems, tape drives, and data backup storage systems, etc.

[0172] It should be noted that although several units / modules or sub-units / modules of the terminal device are mentioned in the above detailed description, such division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into units / modules embodied by multiple units / modules.

[0173] Embodiment 5

[0174] The embodiment provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the data packet transmission method in the embodiment 1 or 2.

[0175] More specifically, the computer readable storage medium can include, but is not limited to, a portable disc, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0176] In possible implementation manners, the present application can also be implemented in the form of a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps of the data packet transmission method in the embodiment 1 or 2.

[0177] The computer program for implementing the present disclosure can be written in any combination of one or more programming languages, and can be executed completely on a terminal device, partially on a terminal device, as an independent software package, partially on a terminal device and partially on a remote device, or completely on a remote device.

[0178] Although the specific embodiments of the present application are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present application is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of the present application, and such changes and modifications all fall within the protection scope of the present application.

Claims

1. A method of data packet transmission, characterized by, The application relates to a data packet transmission method applied to a terminal device, wherein the terminal device further comprises a main controller, a hardware accelerator, a USB controller and a wireless communication module. In response to connection with an external device through a USB interface, a first starting instruction is sent to the hardware accelerator; wherein the first starting instruction is used for instructing the hardware accelerator to analyze and package network data packets received by the USB controller and to transmit the packaged network data packets through the wireless communication module.

2. The data packet transmission method of claim 1, wherein, Before the first starting instruction is sent to the hardware accelerator, the following steps are further included: The USB controller is used for configuring the register module; An instruction set set by the USB controller is loaded into the storage module; wherein the state machine is used for executing instructions in the instruction set.

3. The data packet transmission method of claim 1, wherein, The data packet transmission method further includes the following steps: In response to disconnection with the external device, a first stopping instruction is sent to the hardware accelerator; wherein the first stopping instruction is used for instructing the hardware accelerator to stop running.

4. The data packet transmission method of claim 3, wherein, The data packet transmission method further includes the following steps: In response to disconnection with the external device, a first cleaning instruction is sent to the hardware accelerator; wherein the first cleaning instruction is used for instructing data in the register module and the storage module to be cleaned. The data packet transmission method further includes the following steps:

5. The data packet transmission method of claim 1, wherein, In response to disconnection with the external device, a second stopping instruction is sent to the USB controller; wherein the second stopping instruction is used for instructing the USB controller to stop running. The data packet transmission method further includes the following steps:

6. The data packet transmission method of claim 2, wherein, In response to disconnection with the external device, a second cleaning instruction is sent to the USB controller; wherein the second cleaning instruction is used for instructing resources in the USB controller to be cleaned. The application relates to a data packet transmission method applied to a terminal device, wherein the terminal device further comprises a main controller, a hardware accelerator, a USB controller and a wireless communication module.

7. The data packet transmission method of claim 3, wherein, In response to the first starting instruction sent by the main controller, whether the USB controller receives network data packets is detected; In response to detection that the USB controller receives network data packets, the network data packets are read from the USB controller; 8. The data packet transmission method of claim 4, wherein, The network data packets are analyzed and packaged; The packaged network data packets are transmitted through the wireless communication module.

9. A method of packet transmission, characterized by, ​ ​ ​ ​ ​ 10. The data packet transmission method of claim 9, wherein, The detecting whether the USB controller receives a network data packet specifically comprises: If the data read from the target register of the USB controller is consistent with the locally pre-stored data, it is detected that the USB controller receives a network data packet, otherwise, it is detected that the USB controller does not receive a network data packet.

11. A method of packet transmission, characterized by, The data packet transmission method applied to a terminal device, the terminal device comprising a hardware accelerator, a main controller, a USB controller and a wireless communication module, comprises the following steps: The main controller sends a first start instruction to the hardware accelerator in response to connecting with an external device through a USB interface; The hardware accelerator detects whether the USB controller receives a network data packet in response to the first start instruction, reads the network data packet from the USB controller if it is detected that the USB controller receives a network data packet, and parses and encapsulates the network data packet, and transmits the encapsulated network data packet through the wireless communication module.

12. A data packet transmission apparatus, characterized by comprising: The data packet transmission device applied to a main controller in a terminal device, the terminal device further comprising a hardware accelerator, a USB controller and a wireless communication module, comprises: A first start module for sending a first start instruction to the hardware accelerator in response to connecting with an external device through a USB interface, wherein the first start instruction is used to instruct the hardware accelerator to parse and encapsulate a network data packet received by the USB controller, and transmit the encapsulated network data packet through the wireless communication module.

13. A data packet transmission apparatus, characterized by comprising: The data packet transmission device applied to a hardware accelerator in a terminal device, the terminal device further comprising a main controller, a USB controller and a wireless communication module, comprises: A detection module for detecting whether the USB controller receives a network data packet in response to the first start instruction sent by the main controller; A reading module for reading the network data packet from the USB controller in response to detecting that the USB controller receives a network data packet; A processing module for parsing and encapsulating the network data packet; A transmission module for transmitting the encapsulated network data packet through the wireless communication module.

14. A data packet transmission apparatus, characterized by comprising: The terminal device comprises a hardware accelerator, a main controller, a USB controller and a wireless communication module: The main controller is configured to send a first start instruction to the hardware accelerator in response to connecting with an external device through a USB interface; The hardware accelerator is configured to detect whether the USB controller receives a network data packet in response to the first start instruction, and read the network data packet from the USB controller if it is detected that the USB controller receives a network data packet, and parse and encapsulate the network data packet, and transmit the encapsulated network data packet through the wireless communication module.

15. A terminal device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the data packet transmission method according to any one of claims 1-10 when executing the computer program.

16. A chip applied to a terminal device, characterized by comprising: The chip is configured to execute the data packet transmission method according to any one of claims 1-10.

17. A chip module applied to a terminal device, characterized by comprising: a chip module according to any one of claims 1 to 16; and a terminal device main body. comprising a chip for performing the data packet transmission method according to any one of claims 1-10.

18. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, which when executed by a processor, implements the steps of the data packet transmission method according to any one of claims 1-10.

19. A computer program product comprising a computer program, characterized in that, The computer program, which when executed by a processor, implements the steps of the data packet transmission method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Intelligent device without application processor

    CN103678244A

  • USB network card, data transmission method and device and readable storage medium

    CN116232779A

  • Data packet transmission method and apparatus, and terminal device

    CN118574109A

  • Hardware accelerator and data transmission system and method using the same

    TW200823671A