Data transmission method and apparatus
Patent Information
- Application Number
- CN202611115700.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]然而,由于数据链路是从通信模组中modem模组直接到host中无线广域网(wireless wide area network,WWAN)网卡,不经过eAP模组,因此eAP模组无法通网
Smart Images

Figure CN122933595A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to data transmission methods and apparatus. Background Technology
[0002] The host connects to the communication module via a high-speed peripheral component interconnect express (PCIe) bus, enabling the host to access the network and transmit data through the communication module. The communication module includes an embedded access point (eAP) module and a modem module. The eAP module processes dialing commands from the host and sends them to the modem module for Packet Data Protocol (PDP) activation. The eAP module is also used for firmware over-the-air (FOTA) upgrades and running built-in network applications. The modem module is used for modulation / demodulation and data transmission / reception.
[0003] However, since the data link runs directly from the modem module in the communication module to the wireless wide area network (WWAN) card in the host, bypassing the eAP module, the eAP module cannot connect to the network. Therefore, firmware upgrade packages and application data packets cannot be transmitted to the eAP module. Thus, how the eAP module and the network transmit data becomes a problem. Summary of the Invention
[0004] This application provides a data transmission method and apparatus, enabling the eAP module to transmit data with a network.
[0005] Firstly, embodiments of this application provide a data transmission method. The method includes: The communication module sends the first data packet through the first network card, which is set in the eAP module of the communication module; The host sends the second data packet through the second network card. The second data packet is obtained by changing the source address of the first data packet from the Internet Protocol (IP) address of the first network card to the IP address of the WWAN network card. The second network card is configured in the host, and the WWAN network card is configured in the host. The host sends a second data packet to the data network card in the modem module of the communication module through the WWAN network card. The data network card is used to transmit the second data packet to the network.
[0006] In this method, the host forwards data packets from the first network card in the eAP module to the data link between the WWAN network card and the data network card through the second network card, which facilitates the data network card to transmit the data packets to the network, thereby realizing data transmission between the eAP module and the network.
[0007] In this method, the source address of the first data packet is changed from the IP address of the first network card to the IP address of the WWAN network card, which is beneficial for network identification and processing.
[0008] In this method, the host can directly transmit data with the network through the data link between the WWAN network card and the data network card, thereby improving data transmission efficiency.
[0009] In one optional implementation, the communication module sends a third data packet from the network to the WWAN network card via the data network card; the host sends a fourth data packet via the WWAN network card, the fourth data packet being obtained by changing the destination address of the third data packet from the IP address of the WWAN network card to the IP address of the first network card; the host sends the fourth data packet to the first network card via the second network card.
[0010] In this embodiment, the first network card in the eAP module can receive data packets from the network through the data link between the WWAN network card and the data network card, as well as the forwarding of the second network card, thereby realizing data transmission between the eAP module and the network.
[0011] In one optional implementation, the IP address of the first network card and the IP address of the second network card belong to the same network segment.
[0012] In this embodiment, the IP address of the first network card and the IP address of the second network card belong to the same network segment, which is beneficial for direct communication between the first network card and the second network card.
[0013] In one alternative implementation, the host enables routing forwarding and executes the step of sending the second data packet through the second network card.
[0014] In this implementation, the host can forward the second data packet to the WWAN network card through the second network card based on the routing forwarding function, so that the data packet from the first network card in the eAP module can be transmitted to the network through the data link between the WWAN network card and the data network card.
[0015] Secondly, embodiments of this application provide a data transmission method, which can be applied to a communication module. The method includes: The communication module sends the first data packet to the host's second network card through the first network card; The first network interface card (NIC) is configured in the eAP module of the communication module; the second NIC is used to send a second data packet to the host's WWAN NIC. The second data packet is obtained by changing the source address of the first data packet from the IP address of the first NIC to the IP address of the WWAN NIC; the WWAN NIC is used to send the second data packet to the data NIC in the modem module of the communication module; the data NIC is used to transmit the second data packet to the network.
[0016] In this method, the communication module sends data packets through the first network card, which allows the host to receive data packets from the first network card in the eAP module through the second network card and forward the data packets to the data link between the WWAN network card and the data network card. Thus, the data network card transmits the data packets to the network, realizing data transmission between the eAP module and the network.
[0017] In this method, the source address of the first data packet is changed from the IP address of the first network card to the IP address of the WWAN network card, which is beneficial for network identification and processing.
[0018] In one optional implementation, the communication module further performs the following steps: The communication module receives a fourth data packet from the second network card through the first network card; The fourth data packet is obtained by changing the destination address of the third data packet from the network from the IP address of the WWAN network card to the IP address of the first network card.
[0019] In this embodiment, the first network interface card in the eAP module can receive data packets from the network through the forwarding of the second network interface card, thereby realizing data transmission between the eAP module and the network.
[0020] Thirdly, embodiments of this application provide a data transmission method applicable to a host. The method includes: The host receives the first data packet from the first network card through the second network card. The first network card is configured in the eAP module of the communication module, and the second network card is configured in the host. The host sends the second data packet through the second network card. The second data packet is obtained by changing the source address of the first data packet from the IP address of the first network card to the IP address of the WWAN network card. The WWAN network card is configured in the host. The host sends a second data packet to the data network card in the modem module of the communication module through the WWAN network card. The data network card is used to transmit the second data packet to the network.
[0021] In this method, the host forwards data packets from the first network card in the eAP module to the data link between the WWAN network card and the data network card through the second network card, which facilitates the data network card to transmit the data packets to the network, thereby realizing data transmission between the eAP module and the network.
[0022] In this method, the source address of the first data packet is changed from the IP address of the first network card to the IP address of the WWAN network card, which is beneficial for network identification and processing.
[0023] In this method, the host can directly transmit data with the network through the data link between the WWAN network card and the data network card, thereby improving data transmission efficiency.
[0024] In an alternative implementation, the host further performs the following steps: The host receives third-party data packets from the network via the WWAN network card from the data network card; The host sends the fourth data packet through the WWAN network card. The fourth data packet is obtained by changing the destination address of the third data packet from the IP address of the WWAN network card to the IP address of the first network card. The host sends a fourth data packet to the first network card through the second network card.
[0025] In this implementation, the host, based on the data link between the WWAN network card and the data network card, as well as the second network card, sends data packets from the network back to the first network card in the eAP module, thereby realizing data transmission between the eAP module and the network.
[0026] Fourthly, this application provides a communication device that includes units or modules for performing the embodiments described in the second or third aspect.
[0027] In one embodiment, the communication device is used to perform the implementation described in the second aspect: sending a first data packet to a second network card of the host via a first network card; the first network card is configured in the eAP module of the communication module; the second network card is used to send a second data packet to the host's WWAN network card, the second data packet being obtained by changing the source address of the first data packet from the IP address of the first network card to the IP address of the WWAN network card; the WWAN network card is used to send the second data packet to the data network card in the modem module of the communication module; the data network card is used to transmit the second data packet to the network.
[0028] In this embodiment, other optional implementations of the communication device and their beneficial effects can be found in the relevant content of the second aspect above, and will not be repeated here.
[0029] In another embodiment, the communication device is used to perform the implementation described in the third aspect: receiving a first data packet from a first network card via a second network card, the first network card being configured in the eAP module of the communication module, and the second network card being configured in the host; sending a second data packet via the second network card, the second data packet being obtained by changing the source address of the first data packet from the IP address of the first network card to the IP address of the WWAN network card, the WWAN network card being configured in the host; and sending the second data packet via the WWAN network card to the data network card in the modem module of the communication module, the data network card being used to transmit the second data packet to the network.
[0030] In this embodiment, other optional implementations of the communication device and their beneficial effects can be found in the relevant content of the third aspect above, and will not be repeated here.
[0031] Fifthly, this application also provides a computer device, the computer device comprising: a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the method as described in the second or third aspect.
[0032] In a sixth aspect, this application also provides a computer storage medium storing a computer program that, when executed by a processor, implements the method described in the second or third aspect.
[0033] In a seventh aspect, this application also provides a computer program product containing instructions that, when executed on a communication device, implement the method described in the second or third aspect. Attached Figure Description
[0034] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0035] Figure 1 This is a schematic diagram of the architecture of a data transmission system; Figure 2 This is a schematic diagram of a data link; Figure 3 This is a schematic diagram of another type of data link; Figure 4 A schematic diagram of a data link provided for an embodiment of this application; Figure 5A flowchart illustrating a data transmission method provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a communication module provided in an embodiment of this application; Figure 7 This application provides a schematic diagram of the structure of a host. Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application.
[0036] The realization of the objectives, functional features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0038] It should be understood that the terms "comprising" or "including" indicate the presence of the stated features, steps, operations, elements, components, items, types, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, types, and / or groups. The terms "or," "and / or," and "comprising at least one of the following," as used in this application, can be interpreted as inclusive, or mean any one or any combination thereof. For example, "comprising at least one of the following: A, B, C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C," and similarly, "A, B, or C" or "A, B, and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C." Exceptions to this definition only occur when the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0039] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0040] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0041] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0042] Figure 1 This is a schematic diagram of the architecture of a data transmission system. Figure 1 The data transmission system shown includes a host and a communication module. The host is the upper-level device or master control device served by the communication module, and the host is connected to the communication module via a PCIe bus. The communication module includes an eAP module and a modem module. The eAP module can be used to implement remote FOTA upgrades and run built-in network service applications, while the modem module is used for modulation and demodulation, as well as data transmission and reception.
[0043] PCIe is a high-speed serial computer expansion bus standard, featuring high-speed serial point-to-point dual-channel high-bandwidth transmission. Each connected device has its own dedicated channel bandwidth and does not share the bus bandwidth. The main advantage of PCIe is its ability to provide reliable end-to-end transmission and high data transfer rates.
[0044] The host can access the network through the communication module: the host sends a dialing command to the eAP module through the PCIe attention (AT) channel; the eAP module processes the received dialing command based on the dialing management process and sends the processed dialing command to the modem module; the modem module initiates a packet data protocol (PDP) activation request based on the processed dialing command and accesses the network.
[0045] The host accesses the network through a communication module. This data transmission system includes, but is not limited to, the following two data links: (1) The data link goes from the modem module to the eAP module and then to the host. Figure 2 This is a schematic diagram of a data link. Figure 2 In the data link shown, the eAP module shares the network with the host via the dynamic host configuration protocol (DHCP). The eAP module is also used to manage information such as IP addresses.
[0046] like Figure 2 As shown, the data link passes through the modem module's data network card, the eAP module's kernel, and the host's WWAN network card in sequence. This means that data packets transmitted between the host and the network need to be processed by the eAP module's kernel, resulting in a low data transmission rate.
[0047] (2) The data link goes directly from the modem module to the host. Figure 3 This is a schematic diagram of another type of data link. Figure 3 In the data link shown, the host-side driver and the modem module driver exchange data via a PCIe physical link based on a configured protocol. Data transmission is implemented using shared memory technology and PCIe interrupts. In this data link, the modem module manages information such as IP addresses.
[0048] like Figure 3 As shown, the data link passes sequentially through the modem module's data network card and the host's WWAN network card. Without the eAP module, the eAP module cannot transmit data to the network. Therefore, firmware upgrade packages and application data packages cannot be transmitted to the eAP module either.
[0049] It is evident that achieving data interaction between the eAP module and the network while increasing data transmission rates is a challenge.
[0050] The following describes the terms related to the embodiments of this application.
[0051] (1) Dialing command The dialing command is an instruction used to trigger the communication module to establish a dialing connection. After executing the command, the communication module can establish a data connection with the network and obtain network parameters such as the IP address, gateway, and domain name system (DNS) assigned by the network, providing a communication foundation for data exchange.
[0052] (2) Dialing management process The dial-up management process is a daemon running on the eAP module. It manages the lifecycle of dial-up connections, including automatic dialing, link status monitoring, abnormal reconnection, and connection termination, to ensure the stability of network connections.
[0053] (3) Data network card The data network interface card (NIC) is located in the modem module and serves as the network interface for data interaction with the external network. On one hand, the data NIC receives data sent from the network side and forwards it to the communication module or to the host side. On the other hand, the data NIC transmits data to be sent to the network side, thereby achieving bidirectional data transmission and reception.
[0054] (4) WWAN network card The WWAN network interface card (NIC) is configured in the host and is used to transmit data between the host and the network. During data transmission, the WWAN NIC can directly transmit data from the host side to the network side via the data NIC; alternatively, the WWAN NIC can send data to the kernel of the eAP module, the eAP module's kernel processes the data, and then sends the processed data back to the data NIC, which then transmits it to the network side.
[0055] (5) eAP module kernel The kernel of the eAP module is the core component of the eAP module, used for resource management and process scheduling, and supports various network and data forwarding functions of the eAP module.
[0056] (6) Remote FOTA upgrade Remote FOTA refers to the technology of upgrading device firmware over the air by downloading upgrade packages from a remote server via wireless methods such as cellular networks or wireless fidelity (Wi-Fi) based on file transfer protocol (FTP), secure file transfer protocol (FTPS), hypertext transfer protocol (HTTP), or secure hypertext transfer protocol (HTTPS).
[0057] To solve the above problems, Figure 4 This is a schematic diagram of a data link provided in an embodiment of this application. Figure 4As shown, the communication module transmits data packets to the host's second network card through the first network card of the eAP module. The second network card forwards the data packets to the data link between the WWAN network card and the data network card, and the data network card transmits them to the network side. Correspondingly, data packets from the network are transmitted to the eAP module through the data link between the WWAN network card and the data network card and the second network card, thereby realizing data transmission between the eAP module and the network.
[0058] Figure 5 This is a flowchart illustrating a data transmission method provided in an embodiment of this application, using the interaction between a communication module and a host as an example. The method includes, but is not limited to: S101. The communication module sends the first data packet through the first network card, which is set in the eAP module of the communication module; correspondingly, the host receives the first data packet through the second network card.
[0059] The first network interface card (NIC) is a raw (RAW) NIC that is started by the communication module. A RAW NIC refers to a network interface that operates in raw IP mode, directly carrying the transmission and reception of raw IP data packets (including IP headers and data payloads).
[0060] Optionally, the first data packet includes the eAP module's internet access requirements.
[0061] In one optional implementation, before executing S101, the communication module configures the IP address of the first network interface card (NIC) using the network interface configuration (ifconfig) command. In this method, configuring the IP address for the first NIC by the communication module helps provide a network addressing identifier for the first NIC, ensuring the transmission and reception of data packets.
[0062] For example, the communication module configures the IP address of the first network interface card (NIC) using the `ifconfig` command "ifconfig raw_ap 192.168.0.98". Here, "ifconfig" is the command name; "raw_ap" represents the first NIC; and "192.168.0.98" represents the IP address of the first NIC in an Internet Protocol version 4 (IPv4) network.
[0063] Optionally, for Internet Protocol version 6 (IPv6) networks, the communication module can configure the IPv6 address for the first network interface card (NIC) using the `ip` command. For example, the communication module can configure the IPv6 address for the first NIC using the command `ip -6 addr add2001:db8:1::2 / 64 dev raw_ap`. Here, "ip" is the command name; "-6" indicates that the operation operates on the IPv6 protocol stack; "addr" is an abbreviation for "address," indicating that the object being operated on is an IP address; "2001:db8:1::2" represents the IPv6 address of the first NIC; " / 64" is the prefix length, indicating that the first 64 bits of the IP address are the network segment identifier; "dev" is an abbreviation for "device," indicating the target network device; and "raw_ap" represents the first NIC.
[0064] In one optional implementation, before executing S101, the communication module configures the default route of the eAP module through a route command. The default route of the eAP module is used to instruct the data packets of the eAP module to be transmitted through the first network interface card.
[0065] For example, for an IPv4 network, the communication module configures the default route for the eAP module using the route command "route -A inet add defaultraw_ap". Here, "route" is the command name; "-A inet" indicates that an IPv4 address type route is configured; "add" means to add; "default" means default; and "raw_ap" is the first network interface card (NIC).
[0066] For example, in an IPv6 network, the communication module configures the default route for the eAP module using the route command "route -A inet6 add defaultraw_ap". Here, "route" is the command name; "-A inet6" indicates that an IPv6 address type route is configured; "add" means to add; "default" means default; and "raw_ap" is the first network interface card (NIC).
[0067] In one optional implementation, before the communication module executes S201, the communication module receives a dialing command from the host through the PCIe AT channel; the eAP module in the communication module processes the dialing command based on the dialing management process to obtain the processed dialing command; the eAP module in the communication module sends the processed dialing command to the modem module; the modem module activates the PDP based on the processed dialing command, and then accesses the network; the modem module receives and manages network parameters from the network, including the network-assigned IP address and / or DNS.
[0068] Optionally, after the modem module in the communication module is connected to the network, it establishes a data link with the host's WWAN network card through the data network card.
[0069] S102.host sends the second data packet through the second network card. The second data packet is obtained by changing the source address of the first data packet from the IP address of the first network card to the IP address of the WWAN network card. The second network card is configured in the host, and the WWAN network card is configured in the host. Correspondingly, the host receives the second data packet through the WWAN network card.
[0070] The second network interface card (NIC) is a RAW NIC that is started by the host. For example, the host can start the second NIC using the ifconfig command "ifconfig raw_host up". Here, "ifconfig" is the command name; "raw_host" represents the second NIC; and "up" means to enable or start.
[0071] In one optional implementation, before executing S102, the host configures the IP address of the second network interface card (NIC) using the ifconfig command. In this method, configuring the IP address for the second NIC by the host helps provide a network addressing identifier for the second NIC, ensuring the transmission and reception of data packets.
[0072] For example, the communication module configures the IP address of the second network interface card (NIC) using the `ifconfig` command "ifconfig raw_host 192.168.0.1". Here, "ifconfig" is the command name; "raw_host" represents the second NIC; and "192.168.0.1" represents the IP address of the second NIC in an IPv4 network.
[0073] Optionally, for IPv6 networks, the communication module can configure the IPv6 address for the second network interface card (NIC) using the `ip` command. For example, the communication module can configure the IPv6 address for the second NIC using the `ip -6 addr add 2001:db8:1::1 / 64 dev raw_host` command. Here, "ip" is the command name; "-6" indicates that the operation applies to the IPv6 protocol stack; "addr" is an abbreviation for "address," indicating that the object being operated on is an IP address; "2001:db8:1::1" represents the IPv6 address of the second NIC; " / 64" is the prefix length, indicating that the first 64 bits of the IP address are the network segment identifier; "dev" is an abbreviation for "device," indicating the target network device; and "raw_host" represents the second NIC.
[0074] Optionally, the IP addresses of the first and second network cards belong to the same network segment. In this method, since the host and the communication module are physically connected via the PCIe bus, and the IP addresses of the first and second network cards belong to the same network segment, it is beneficial for the first and second network cards to communicate directly within the same subnet.
[0075] In one optional implementation, before executing S102, the host configures data forwarding rules using the iptables command. These rules instruct the source address of packets from the first network interface card (NIC) to be translated into the IP address of the WWAN NIC. This approach facilitates network identification and processing of packets from the first NIC.
[0076] For example, a host configures data forwarding rules using the iptables command "iptables -t nat -A POSTROUTING -s192.168.0.98 -o xxx -j MASQUERADE". Here, "iptables" is the command name; "-t nat" indicates the address change table; "-A POSTROUTING" means the network interface card (NIC) appends rules before sending packets; "-s192.168.0.98" indicates the source address is "192.168.0.98"; "-o xxx" represents the NIC name; and "-j MASQUERADE" indicates performing address change.
[0077] For example, in an IPv6 network, a host configures data forwarding rules using the ip6tables command "ip6tables -t nat -APOSTROUTING -s 2001:db8:1::2 -o xxx -j MASQUERADE". Here, "ip6tables" is the command name; "-t nat" indicates the address change table; "-A POSTROUTING" means the network interface card (NIC) appends rules before sending packets; "-s 2001:db8:1::2" indicates the source address is "2001:db8:1::2"; "-o xxx" represents the NIC name; and "-j MASQUERADE" indicates performing address change.
[0078] In one optional implementation, the host enables the routing forwarding function and executes S102. In this method, the host's routing forwarding function is enabled, and the host has the ability to forward data packets, which is beneficial for forwarding data packets from the first network card in the eAP module to the network.
[0079] For example, a host enables route forwarding using the command "sysctl -w net.ipv4.ip_forward=1". Here, "sysctl" is the command name; "-w" indicates write mode; "net.ipv4.ip_forward" represents the IPv4 packet forwarding switch; and "=1" indicates that it is enabled.
[0080] For example, in an IPv6 network, a host enables routing forwarding using the command "sysctl net.ipv6.conf.all.forwarding=1". Here, "sysctl" is the command name; "net.ipv6.conf.all.forwarding" represents the IPv6 packet forwarding switch; and "=1" indicates that it is enabled.
[0081] S103.host sends a second data packet to the data network card in the modem module of the communication module through the WWAN network card. The data network card is used to transmit the second data packet to the network. Correspondingly, the communication module receives the second data packet through the data network card.
[0082] As can be seen, in S103, the second data packet is transmitted to the network via the data link between the WWAN network card and the data network card, thereby realizing data transmission between the eAP module and the network.
[0083] In one optional implementation, the steps required for the eAP module to receive data packets from the network are as follows: the communication module sends a third data packet from the network to the WWAN network card via the data network card; the host sends a fourth data packet via the WWAN network card, the fourth data packet being obtained by changing the destination address of the third data packet from the IP address of the WWAN to the IP address of the first network card; the host sends the fourth data packet to the first network card via the second network card. In this method, the first network card in the eAP module can receive data packets from the network through the data link between the WWAN network card and the data network card, as well as the forwarding by the second network card, thus realizing data transmission between the eAP module and the network.
[0084] Optionally, the third data package may include firmware upgrade packages and / or application data packages.
[0085] In one optional implementation, before the host sends the fourth data packet to the first network interface card (NIC) via the second NIC, the host configures its routing using the `route` command. The host's routing is used to instruct data packets destined for the first address range to be transmitted through the second NIC. For example, the host configures its routing using the `route add -net 192.168.0.0netmask 255.255.255.0 raw_host` command. Here, "route" is the command name; "add" indicates adding; "-net 192.168.0.0" represents the network segment; "netmask 255.255.255.0" represents the subnet mask "255.255.255.0"; and "raw_host" represents the second NIC. Therefore, based on the network segment "192.168.0.0" and subnet mask "255.255.255.0" in the route command, the host determines the first address range as "192.168.0.0 to 192.168.0.255". Data packets with a destination address of "192.168.0.0 to 192.168.0.255" are transmitted through the second network card.
[0086] As can be seen, in this embodiment of the application, the host forwards the data packets from the first network card in the eAP module to the data link between the WWAN network card and the data network card through the second network card, so that the data network card transmits the data packets to the network, thereby realizing data transmission between the eAP module and the network.
[0087] Furthermore, in this embodiment of the application, the first network card in the eAP module can receive data packets from the network through the data link between the WWAN network card and the data network card, as well as the forwarding of the second network card, thereby realizing data transmission between the eAP module and the network.
[0088] Furthermore, in this embodiment, the data link between the WWAN network card and the data network card facilitates direct data transmission between the host and the network without the need for processing by the eAP module kernel, thereby improving data transmission efficiency.
[0089] Figure 6 This is a schematic diagram of a communication module provided in an embodiment of this application. The communication module includes at least a first network interface card (NIC) 610 and a data NIC 620. The first NIC 610 is disposed in the eAP module of the communication module, and the data NIC 620 is disposed in the modem module of the communication module.
[0090] The first network interface card 610 is used to send the first data packet to the second network interface card of the host; the second network interface card is used to send the second data packet to the host's WWAN network interface card, and the second data packet is obtained by changing the source address of the first data packet from the IP address of the first network interface card to the IP address of the WWAN network interface card; the WWAN network interface card is used to send the second data packet to the data network interface card 620 in the modem module of the communication module; The data network card 620 is used to transmit the second data packet to the network.
[0091] Optionally, the first network interface card 610 is also used to receive a fourth data packet from the second network interface card; the fourth data packet is obtained by changing the destination address of the third data packet from the network from the IP address of the WWAN network interface card to the IP address of the first network interface card.
[0092] Figure 7 This is a schematic diagram of a host structure provided in an embodiment of this application. The host includes at least a second network interface card 710 and a WWAN network interface card 720.
[0093] The second network interface card 710 is used to receive the first data packet from the first network interface card, which is set in the eAP module of the communication module. The second network card 710 is also used to send a second data packet, which is obtained by changing the source address of the first data packet from the IP address of the first network card to the IP address of the WWAN network card 720; The WWAN NIC 720 is used to send a second data packet to the data NIC in the modem module of the communication module. The data NIC is used to transmit the second data packet to the network.
[0094] Optionally, the WWAN NIC 720 is also used to receive third data packets from the network from the data NIC; The WWAN network card 720 is also used to send a fourth data packet, which is obtained by changing the destination address of the third data packet from the IP address of the WWAN network card 720 to the IP address of the first network card. The second network card 710 is also used to send a fourth data packet to the first network card.
[0095] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device includes at least a processor 810, a user interface 820, and a memory 830, which are interconnected. The memory 830 is used to store computer programs, which include program instructions, and the processor 810 is used to execute the program instructions.
[0096] The memory 830 may include volatile memory, such as random-access memory (RAM); the memory 830 may also include non-volatile memory, such as flash memory, solid-state drive (SSD), etc.; the memory 830 may also include a combination of the above types of memory.
[0097] The processor 810 may be a central processing unit (CPU). The processor 810 may further include hardware chips. These hardware chips may be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), etc. The PLDs may be field-programmable gate arrays (FPGAs), generic array logic (GALs), etc.
[0098] In an optional implementation, memory 830 is also used to store program instructions. Processor 810 can invoke program instructions: processor 810 is configured to invoke program instructions to execute the relevant content of the above method embodiments, which will not be repeated here.
[0099] The embodiments of this application and the method embodiments shown above are based on the same concept and have the same technical effects. For the specific principles, please refer to the description of the embodiments shown above, which will not be repeated here.
[0100] This application also provides a computer-readable storage medium storing a detection program, which, when executed by a processor, implements the steps of a data transmission method described in the above embodiments.
[0101] The embodiments of the mobile terminal and computer-readable storage medium provided in this application include all the technical features of the above-described data transmission method embodiments. The extended and explanatory content of the specification is basically the same as the embodiments of the above-described method, and will not be repeated here.
[0102] This application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to perform the methods described in the various possible implementations above.
[0103] This application also provides a chip, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device with the chip installed performs the methods described in the various possible implementations above.
[0104] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0105] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.
[0106] The units in the device of this application embodiment can be merged, divided, and deleted according to actual needs.
[0107] In this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions are generally described in detail only when they appear for the first time. When they appear again, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions that are not described in detail later can be referred to their previous relevant detailed descriptions.
[0108] In this application, the descriptions of the various embodiments have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0109] The technical features of the present application can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.
[0110] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the methods of each embodiment of this application.
[0111] 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. A 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 flow or function according to the embodiments of this application is 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, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, storage disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid-state drives (SSDs)).
[0112] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A data transmission method, characterized in that, The method includes: The communication module sends a first data packet through a first network interface card (NIC), wherein the first NIC is located in the embedded access point module of the communication module. The host sends a second data packet through a second network card. The second data packet is obtained by changing the source address of the first data packet from the Internet Protocol address of the first network card to the Internet Protocol address of the wireless wide area network card. The second network card is installed in the host. The wireless wide area network card is installed in the host. The host sends the second data packet to the data network card in the baseband module of the communication module through the wireless wide area network card, and the data network card is used to transmit the second data packet to the network.
2. The method according to claim 1, characterized in that, The method further includes: The communication module sends a third data packet from the network to the wireless wide area network card through the data network card; The host sends a fourth data packet through the wireless wide area network card. The fourth data packet is obtained by changing the destination address of the third data packet from the Internet Protocol address of the wireless wide area network card to the Internet Protocol address of the first network card. The host sends the fourth data packet to the first network card through the second network card.
3. The method according to claim 1 or 2, characterized in that, The Internet Protocol address of the first network card and the Internet Protocol address of the second network card belong to the same network segment.
4. The method according to claim 3, characterized in that, The method further includes: The host enables the routing forwarding function and executes the step of sending the second data packet through the second network card.
5. A data transmission method, characterized in that, Applied to a communication module, the method includes: The first data packet is sent from the first network card to the second network card of the host. The first network interface card (NIC) is installed in the embedded access point module of the communication module; the second NIC is used to send a second data packet to the wireless wide area network (WAN) NIC of the host, wherein the second data packet is obtained by changing the source address of the first data packet from the Internet Protocol (IP) address of the first NIC to the IP address of the WAN NIC; the WAN NIC is used to send the second data packet to the data NIC in the baseband module of the communication module; the data NIC is used to transmit the second data packet to the network.
6. The method according to claim 5, characterized in that, The method further includes: The first network card receives a fourth data packet from the second network card; The fourth data packet is obtained by changing the destination address of the third data packet from the network from the Internet Protocol address of the wireless wide area network card to the Internet Protocol address of the first network card.
7. A data transmission method, characterized in that, Applied to a host, the method includes: The first data packet is received from the first network card through the second network card, wherein the first network card is set in the embedded access point module in the communication module, and the second network card is set in the host. The second data packet is sent through the second network card. The second data packet is obtained by changing the source address of the first data packet from the Internet Protocol address of the first network card to the Internet Protocol address of the wireless wide area network card. The wireless wide area network card is installed in the host. The second data packet is sent from the wireless wide area network card to the data network card in the baseband module of the communication module, and the data network card is used to transmit the second data packet to the network.
8. The method according to claim 7, characterized in that, The method further includes: The wireless wide area network card receives a third data packet from the data network card. The fourth data packet is sent through the wireless wide area network card. The fourth data packet is obtained by changing the destination address of the third data packet from the Internet Protocol address of the wireless wide area network card to the Internet Protocol address of the first network card. The fourth data packet is sent from the second network card to the first network card.
9. A communication device, characterized in that, The communication device includes a unit or module for performing the method as described in any one of claims 5 to 8.
10. A computer device, characterized in that, The computer device includes: a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the method as described in any one of claims 5 to 8.