CN-121996606-A - Data transmission method, device, computer equipment, chip and chip module
Abstract
The application relates to a data transmission method, a data transmission device, computer equipment, a chip and a chip module, which relate to the technical field of computers and can effectively improve the network sharing quality of the computer equipment. The computer equipment comprises a baseband chip, a target chip provided with virtual network equipment, wherein the virtual network equipment is connected with a kernel space and a user space, the method comprises the steps of acquiring a first data packet from the kernel space based on the virtual network equipment, acquiring the first data packet after the data provided by a first application program in the user space are packaged, transmitting the first data packet to a second application program in the user space based on the virtual network equipment, calling a preset communication interface by the second application program, and sending the first data packet from the target chip to the baseband chip so as to carry out network transmission on the first data packet through the baseband chip.
Inventors
- YANG XIAMENG
Assignees
- 展讯半导体(成都)有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260204
Claims (10)
- 1. The data transmission method is characterized by being applied to computer equipment, wherein the computer equipment comprises a baseband chip and a target chip provided with virtual network equipment, and the virtual network equipment is connected with a kernel space and a user space; The method comprises the following steps: acquiring a first data packet from the kernel space based on the virtual network equipment, wherein the first data packet is obtained by packaging data provided by a first application program in the user space; And based on the virtual network equipment, transmitting the first data packet to a second application program in the user space, calling a preset communication interface by the second application program, and sending the first data packet from the target chip to the baseband chip so as to carry out network transmission on the first data packet through the baseband chip.
- 2. The method of claim 1, wherein the pre-set communication interface comprises a serial peripheral interface of the target chip; the second application program invokes a preset communication interface to send the first data packet from the target chip to a baseband chip, including: Encapsulating the first data packet by the second application program based on a serial multiplexing protocol to obtain an encapsulated first data packet; And transmitting the packaged first data packet from the target chip to a baseband chip based on the serial peripheral interface and a virtual serial port corresponding to the packaged first data packet.
- 3. The method of claim 1, wherein the obtaining, based on the virtual network device, the first data packet from the kernel space comprises: packaging data provided by the first application program in the user space through a network protocol stack in the kernel space to obtain a first data packet; And acquiring the first data packet from the network protocol stack based on the driver corresponding to the virtual network device.
- 4. The method of claim 3, wherein the transmitting the first data packet to the second application in the user space based on the virtual network device comprises: determining a device file corresponding to the virtual network device according to a file descriptor corresponding to the virtual network device, which is obtained in advance; the first data package is read from the device file by the second application in the user space.
- 5. The method according to any one of claims 1 to 4, further comprising, after said transmitting said first data packet from said target chip to a baseband chip: Receiving a second data packet sent by the baseband chip to the target chip through the preset communication interface, and writing the second data packet into a device file corresponding to the virtual network device; the network protocol stack in the kernel space is used for reading the second data packet from the device file, and obtaining network data for the first application program according to the analysis result of the second data packet.
- 6. A data transmission method, applied to a base station, the method comprising: Receiving a first data packet sent by computer equipment; Wherein the first data packet is data transmission by the computer device by the data transmission method according to any one of claims 1 to 5.
- 7. The data transmission device is characterized by being applied to computer equipment, wherein the computer equipment comprises a baseband chip and a target chip provided with virtual network equipment, the virtual network equipment is connected with a kernel space and a user space, and the device comprises: The data packet acquisition module is used for acquiring a first data packet from the kernel space based on the virtual network equipment, wherein the first data packet is obtained by packaging data provided by a first application program in the user space; And the data transmission module is used for transmitting the first data packet to a second application program in the user space based on the virtual network equipment, calling a preset communication interface by the second application program, and sending the first data packet from the target chip to the baseband chip so as to carry out network transmission on the first data packet through the baseband chip.
- 8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 or the steps of the method of claim 6 when the computer program is executed.
- 9. A chip comprising a processor and a communication interface, the processor being configured to cause the chip to perform the steps of the method of any one of claims 1 to 5.
- 10. The utility model provides a chip module, its characterized in that includes communication module, power module, storage module and chip, wherein: the power supply module is used for providing electric energy for the chip module; the storage module is used for storing data and instructions; the communication module is used for carrying out internal communication of the chip module or carrying out communication between the chip module and external equipment; The chip being for performing the steps of the method of any one of claims 1 to 5.
Description
Data transmission method, device, computer equipment, chip and chip module Technical Field The present application relates to the field of computer technology, and in particular, to a data transmission method, apparatus, computer device, chip module, computer readable storage medium, and computer program product. Background With the development of the internet of things, everything interconnection becomes a trend, and more devices can obtain the capability of connecting to a network through network sharing. In the related art, network sharing is mainly implemented by a wireless transmission manner, for example, network sharing between devices may be implemented by Wi-Fi (mobile hotspot), bluetooth, universal serial bus (Universal Serial Bus, USB) or the like. However, when the data transmission is performed by the shared network in the above manner, the data transmission quality is easily interfered by the surrounding environment of the device, and there is a problem that the network sharing quality needs to be improved. Disclosure of Invention In view of the foregoing, it is desirable to provide a data transmission method, apparatus, computer device, computer readable storage medium, and computer program product. In a first aspect, the present application provides a data transmission method applied to a computer device, where the computer device includes a baseband chip, and further includes a target chip deployed with a virtual network device, where the virtual network device connects a kernel space and a user space, and the method includes: acquiring a first data packet from the kernel space based on the virtual network equipment, wherein the first data packet is obtained by packaging data provided by a first application program in the user space; And based on the virtual network equipment, transmitting the first data packet to a second application program in the user space, calling a preset communication interface by the second application program, and sending the first data packet from the target chip to the baseband chip so as to carry out network transmission on the first data packet through the baseband chip. In one embodiment, the preset communication interface includes a serial peripheral interface of the target chip; the second application program invokes a preset communication interface to send the first data packet from the target chip to a baseband chip, including: Encapsulating the first data packet by the second application program based on a serial multiplexing protocol to obtain an encapsulated first data packet; And transmitting the packaged first data packet from the target chip to a baseband chip based on the serial peripheral interface and a virtual serial port corresponding to the packaged first data packet. In one embodiment, the obtaining, based on the virtual network device, the first data packet from the kernel space includes: packaging data provided by the first application program in the user space through a network protocol stack in the kernel space to obtain a first data packet; And acquiring the first data packet from the network protocol stack based on the driver corresponding to the virtual network device. In one embodiment, the transmitting the first data packet to the second application program in the user space based on the virtual network device includes: determining a device file corresponding to the virtual network device according to a file descriptor corresponding to the virtual network device, which is obtained in advance; the first data package is read from the device file by the second application in the user space. In one embodiment, after the sending the first data packet from the target chip to the baseband chip, the method further includes: Receiving a second data packet sent by the baseband chip to the target chip through the preset communication interface, and writing the second data packet into a device file corresponding to the virtual network device; the network protocol stack in the kernel space is used for reading the second data packet from the device file, and obtaining network data for the first application program according to the analysis result of the second data packet. In a second aspect, there is also provided a data transmission method applied to a base station, the method including: Receiving a first data packet sent by computer equipment; wherein the first data packet is data transmission by the computer device through the data transmission method. In a third aspect, there is also provided a data transmission apparatus applied to a computer device, where the computer device includes a baseband chip, and further includes a target chip deployed with a virtual network device, where the virtual network device connects a kernel space and a user space, and the apparatus includes: The data packet acquisition module is used for acquiring a first data packet from the kernel space based on the virtual network equipment, wherein the first data packet