Data transmission method, apparatus and system

By setting up a fast forwarding channel and optimizing CPU core utilization in the AP, the problem of low data transmission efficiency in AP+Modem architecture CPE devices is solved, achieving more efficient data transmission.

CN115884308BActive Publication Date: 2025-12-12HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111137908.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-27
Publication Date
2025-12-12
Estimated Expiration
2041-09-27

AI Technical Summary

Technical Problem

CPE devices using an AP+Modem architecture suffer from low data transmission efficiency and excessive CPU resource consumption during data transmission due to the lack of a hardware-level channel between the AP and Modem.

Method used

In the AP, a fast forwarding channel is set up to transmit data directly based on the forwarding rules of data frames through forwarding table entries, reducing kernel protocol stack processing. Combined with balanced utilization of CPU cores and compression and decompression of data frames, the data transmission path is optimized.

Benefits of technology

It improves data transmission efficiency, reduces CPU resource consumption, and enhances CPU resource utilization and data transmission speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115884308B_ABST
    Figure CN115884308B_ABST
Patent Text Reader

Abstract

The application provides a data transmission method, device and system. The data transmission method of the application is applied to a client terminal device including a modem and an application processor. The method comprises: obtaining a data frame by the application processor; when a forwarding rule corresponding to a data flow where the data frame is located exists in a forwarding table entry of the application processor, sending the data frame by the application processor based on the forwarding rule corresponding to the data frame. The forwarding rule comprises routing information and / or network address translation information. The forwarding table entry is used for recording the correspondence between a data flow and a forwarding rule. The application can improve the utilization rate of the central processing unit resource of the client terminal device and the data transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of communication, and in particular, to a data transmission method, device and system. BACKGROUND

[0002] With the development of wireless communication technology, a terminal device can access a network device and perform data transmission with the network device through a high-performance customer premise equipment (CPE). The architecture adopted by the current CPE includes a system on chip (SoC) architecture and an application processor (AP) + modem architecture.

[0003] The CPE adopting the SoC architecture includes an SoC chip, and the SoC chip has a hardware layer channel. When performing data transmission, the CPE can directly accelerate the transmission of data through the hardware layer channel of the SoC chip, thereby meeting the high-performance forwarding requirement. However, the CPE adopting the AP + modem architecture includes two independent chips, namely, an AP and a modem. Since the two chips do not have a hardware layer channel, the data transmission between the modem and the AP needs to be performed through a dual-machine communication driver and a protocol stack of the AP.

[0004] The CPE adopting the AP + modem architecture has low data transmission efficiency through the dual-machine communication driver and the protocol stack of the AP. SUMMARY

[0005] The present application provides a data transmission method, device and system, which improves the utilization rate of CPU resources and the data transmission efficiency.

[0006] In a first aspect, the present application provides a data transmission method, which is applied to a customer premise equipment (CPE) including a modem and an application processor (AP), and the method includes: acquiring a data frame through the AP; and when a forwarding rule corresponding to a data flow in which the data frame is located exists in a forwarding table item of the AP, sending the data frame based on the forwarding rule corresponding to the data frame through the AP, wherein the forwarding rule includes routing information and / or network address translation (NAT) information, and the forwarding table item is used to record the correspondence between a data flow and a forwarding rule.

[0007] In the method, the data frame corresponding to the forwarding rule of the data flow where the data frame is located in the forwarding table item does not need to go through the cumbersome processing of the kernel protocol stack, but is directly modified based on the forwarding rule corresponding to the data frame, and a destination interface function is called to send the data frame to the destination interface, thereby simplifying and shortening the data transmission path, reducing the CPU resource of the AP occupied by the packet receiving software interrupt, and improving the data transmission efficiency.

[0008] The data frame obtained by the AP can come from a Modem or a terminal device connected to the AP. The forwarding table item can store the correspondence between the five-tuple information of the data flow and the forwarding rule. The AP can extract the five-tuple information of the data frame, and query whether the corresponding forwarding rule exists in the forwarding table item according to the extracted five-tuple information. The forwarding rule is used to indicate the processing of the data frame by the kernel protocol stack of the AP when forwarding the data frame, that is, the fields of the data frame modified by the kernel protocol stack when forwarding the data frame and the modified contents. The routing information is used to indicate the route passed through in the process of forwarding the data frame to the destination device, and the network address translation information is used to indicate the network address translation needed in the process of forwarding the data frame to the destination device.

[0009] For example, the fast forwarding channel can modify the data frame according to the forwarding rule, obtain the data frame after routing and network address translation, and add the modified data frame to the forwarding queue of the fast forwarding channel.

[0010] In a possible implementation, the method further includes: when the forwarding rule corresponding to the data flow where the data frame is located does not exist in the forwarding table item, performing forwarding processing on the data frame by the kernel protocol stack of the AP, the forwarding processing including marking the forwarding rule; adding the correspondence between the data flow where the data frame is located and the forwarding rule in the forwarding table item based on the forwarding rule marked in the data frame by the AP.

[0011] Optionally, the kernel protocol stack stores a marking function (for example, a hook function) corresponding to the fast forwarding identifier, and the marking function is used to mark the forwarding rule. Further, the forwarding rule can further include a forwarding direction. The AP can parse the data frame after the forwarding processing of the kernel protocol stack, determine the structure of the data frame after the forwarding processing, and compare the structure of the data frame after the forwarding processing with the structure of the data frame before the forwarding processing to obtain the forwarding rule marked in the data frame. Then, the correspondence between the data flow where the data frame is located and the forwarding rule is added in the forwarding table item, for example, the correspondence between the five-tuple information of the data flow where the data frame is located and the forwarding rule can be added.

[0012] When the forwarding rule corresponding to the data flow where the data frame is located exists in the forwarding table entry of the AP, it can be further determined whether the data frame satisfies the first fast forwarding condition. When the data frame satisfies the first fast forwarding condition, the data frame is sent by the AP based on the forwarding rule corresponding to the data frame. The first fast forwarding condition can include that the traffic of the data flow where the data frame is located is greater than a second traffic threshold and / or the data frame does not belong to the first n packets in the data flow, n>1.

[0013] In a possible implementation, the first fast forwarding condition includes that the traffic of the data flow where the data frame is located is greater than a second traffic threshold, and the sending of the data frame by the AP based on the forwarding rule corresponding to the data frame when the forwarding rule corresponding to the data flow where the data frame is located exists in the forwarding table entry of the AP includes: when the forwarding rule corresponding to the data flow where the data frame is located exists in the forwarding table entry and the traffic of the data flow where the data frame is located is greater than a traffic threshold, the data frame is sent based on the forwarding rule corresponding to the data frame.

[0014] Optionally, for each forwarded data frame of the data flow where the data frame is located, a query time stamp of whether the forwarding rule corresponding to the forwarded data frame exists in the forwarding table entry can be determined. Then the traffic of the data flow where the data frame is located is determined according to the query time stamp of the data frame and the query time stamp of the forwarded data frame. Or for the first data frame of the forwarded data frame, an output time stamp of the kernel protocol stack outputting the first data frame can be determined. For the non-first data frame of the forwarded data frame, a query time stamp of whether the forwarding rule corresponding to the forwarded data frame exists in the forwarding table entry can be determined. Then the traffic of the data flow where the data frame is located is determined according to the query time stamp of the data frame, and the output time stamp and the query time stamp of the forwarded data frame.

[0015] In a possible implementation, the first fast forwarding condition includes that the data frame does not belong to the first n packets in the data flow where the data frame is located, and the sending of the data frame by the AP based on the forwarding rule corresponding to the data frame when the forwarding rule corresponding to the data flow where the data frame is located exists in the forwarding table entry of the AP includes: when the forwarding rule corresponding to the data flow where the data frame is located exists in the forwarding table entry and the data frame does not belong to the first n packets in the data flow where the data frame is located, the data frame is sent based on the forwarding rule corresponding to the data frame, n>1.

[0016] In a possible implementation, the method is applied to a central processing unit (CPU) of the AP, the CPU includes a plurality of CPU cores, each of the plurality of CPU cores corresponds to at least one data flow identifier; the data frame is obtained by the AP, including: the data frame is obtained by the CPU core corresponding to the data flow identifier of the data frame; when the forwarding rule corresponding to the data flow in which the data frame is located exists in the forwarding table item of the AP, the data frame is sent by the AP based on the forwarding rule corresponding to the data frame, including: when the forwarding rule corresponding to the data flow in which the data frame is located exists in the forwarding table item, the data frame is sent by the CPU core corresponding to the data flow identifier of the data frame based on the forwarding rule corresponding to the data frame.

[0017] In a possible implementation, the method is applied to a central processing unit (CPU) of the AP, the CPU includes a plurality of CPU cores, each of the plurality of CPU cores corresponds to at least one data flow identifier; when the forwarding rule corresponding to the data flow in which the data frame is located does not exist in the forwarding table item, the data frame is forwarded by the kernel protocol stack of the AP, including: when the forwarding rule corresponding to the data flow in which the data frame is located does not exist in the forwarding table item, the data frame is forwarded by the CPU core corresponding to the data flow identifier of the data frame through the kernel protocol stack of the AP.

[0018] In the uplink transmission process, the data frame is sent by the terminal device connected to the AP, and the terminal device connected to the AP can be a single queue or a multi-queue. The single-queue terminal device can register only one packet reception hard interrupt in the AP, and each packet reception hard interrupt corresponds to one queue. The multi-queue terminal device can register a plurality of packet reception hard interrupts in the AP, and each packet reception hard interrupt corresponds to one queue.

[0019] Optionally, for the single-queue terminal device, the registered packet reception hard interrupt can be unbound from the packet reception soft interrupt, and then a plurality of queues are determined. For example, after the AP triggers the packet reception hard interrupt to receive the first data frame of any data flow sent by the terminal device, the queue and the CPU core corresponding to any data flow identifier (for example, five-tuple information) are determined according to a hash algorithm. Then, a hash table can be established according to the queue and the CPU core corresponding to any data flow identifier, and the hash table represents the correspondence between any data flow identifier, queue and CPU core. After the AP triggers the packet reception hard interrupt to receive the subsequent data frame of any data flow, the subsequent data frame is placed in the queue corresponding to the data flow identifier, and the packet reception soft interrupt is triggered by the CPU core corresponding to the data flow identifier to perform forwarding processing on the subsequent data frame.

[0020] For a multi-queue terminal device, a queue corresponding to each packet reception hard interrupt can be bound to a CPU core and a hash table indicating the correspondence between any data stream identifier, packet reception hard interrupt, queue and CPU core can be established. The AP determines the corresponding packet reception hard interrupt, queue and CPU core of any data stream identifier through the hash table. The CPU core corresponding to any data stream identifier sent by the terminal device triggers the corresponding packet reception hard interrupt to receive the data frame of any data stream, and places the data frame in the corresponding queue. Then the CPU core corresponding to any data stream identifier triggers the packet reception soft interrupt to process the forwarding of the data frame.

[0021] The data frames of different data stream identifiers can be subjected to subsequent forwarding processing by multiple CPU cores, which reduces the CPU resources occupied by the packet reception soft interrupt of the AP, effectively reduces the probability of the occurrence of the case that a certain CPU core is occupied to the full and other CPU cores are still in an idle state, improves the utilization rate of CPU resources, realizes the balanced utilization of multiple CPU cores, and thus improves the data transmission efficiency.

[0022] In a possible implementation, when the data frame obtained by the AP is from a Modem, the method further includes: combining multiple data frames by the Modem to obtain a packet; sending the packet to the AP by the Modem; and disassembling the packet by the AP to obtain multiple data frames.

[0023] The AP triggers a packet reception hard interrupt once to receive a packet (i.e., multiple data frames), and does not need to trigger a packet reception hard interrupt once for each data frame, which reduces the number of times of triggering the packet reception hard interrupt, thereby reducing the CPU resources of the AP occupied by the packet reception hard interrupt and improving the data transmission efficiency.

[0024] In a possible implementation, before combining multiple data frames by the Modem to obtain a packet, the method further includes: compressing multiple data frames by the Modem respectively; and after disassembling the packet by the AP to obtain multiple data frames, the method further includes: decompressing the obtained multiple data frames by the AP respectively. The compression processing of the data frame can reduce the size of the data frame, thereby improving the data transmission efficiency.

[0025] In a possible implementation, the combining multiple data frames by the Modem includes: obtaining a packet message format, the packet message format including a packet length and / or an offset; adding a packet message in the data frame based on the packet message format; and the disassembling the packet by the AP includes: obtaining the packet message format; determining the packet message of the data frame in the packet based on the packet message format; and disassembling the data frame from the packet by using the packet message of the data frame.

[0026] In a second aspect, the present application provides a data transmission apparatus, comprising: one or more processors; a memory for storing one or more computer programs or instructions; when the one or more computer programs or instructions are executed by the one or more processors, the one or more processors implement the method in any one of the first aspect.

[0027] In a third aspect, the present application provides a chip system, comprising: a processor and an interface; the processor is configured to or configured to implement the method in any one of the first aspect by the interface.

[0028] In a fourth aspect, the present application provides a computer readable storage medium, comprising computer programs or instructions, when the computer programs or instructions are executed on a computer, the computer executes the method in any one of the first aspect.

[0029] In a fifth aspect, the present application provides a computer program product, the computer program product comprising computer program code, when the computer program code is executed on a computer, the computer executes the method in any one of the first aspect.

[0030] In a sixth aspect, the present application provides a data transmission system, the data transmission system comprising a network device, a terminal device and the data transmission apparatus in the second aspect, the data transmission apparatus and the network device and the terminal device are both established with a communication connection, and the network device or the terminal device is configured to send data frames to the data transmission apparatus. BRIEF DESCRIPTION OF DRAWINGS

[0031] Figure 1 A structural schematic diagram of a data transmission system provided by an embodiment of the present application;

[0032] Figure 2 A schematic diagram of a fast forwarding channel provided by an embodiment of the present application;

[0033] Figure 3 A flowchart of a data transmission method provided by an embodiment of the present application;

[0034] Figure 4A format diagram of a data frame provided for an embodiment of the present application is shown in FIG. 1.

[0035] Figure 5 A transmission process diagram of a data frame transmitted by a single-queue terminal device provided for an embodiment of the present application is shown in FIG. 2.

[0036] Figure 6 A transmission process diagram of a data frame transmitted by a multi-queue terminal device provided for an embodiment of the present application is shown in FIG. 3.

[0037] Figure 7 A flow diagram of another data transmission method provided for an embodiment of the present application is shown in FIG. 4.

[0038] Figure 8 A data transmission process diagram provided for an embodiment of the present application is shown in FIG. 5.

[0039] Figure 9 A diagram of a data frame in a data transmission process provided for an embodiment of the present application is shown in FIG. 6.

[0040] Figure 10 A block diagram of a data transmission device provided for an embodiment of the present application is shown in FIG. 7.

[0041] Figure 11 A structure diagram of an electronic device provided for an embodiment of the present application is shown in FIG. 8.

[0042] Figure 12 A structure diagram of another data transmission device provided for an embodiment of the present application is shown in FIG. 9. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0044] The term “and / or” in the present document is only used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone.

[0045] The terms “first” and “second” and the like in the specification and claims of the embodiments of the present application are used to distinguish different objects, and are not used to describe a specific order of the objects. For example, the first range and the second range are used to distinguish different ranges, and are not used to describe a specific order of the ranges.

[0046] In the embodiments of the present application, the words "in an example", "for example" or "for example" are used to represent an example, illustration or description. Any embodiment or design scheme described as "in an example", "for example" or "for example" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the use of "in an example", "for example" or "for example" and the like is intended to present the relevant concept in a specific manner.

[0047] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "at least one" is one or more, and the meaning of "a plurality of" is two or more. For example, a plurality of processing units refers to two or more processing units; a plurality of systems refers to two or more systems.

[0048] With the development of wireless communication technologies such as the fifth generation mobile communication technology (5th Generation Mobile Communication Technology, 5G) and the sixth generation wireless fidelity (Wireless Fidelity, WIFI6) technology, the peak value of 5G new radio (New Radio, NR) single user can reach 1.6 gigabit per second (Gbps), and the peak value of WIFI6 single stream on the terminal device side (i.e. the user side) can reach 1.2 Gbps. The terminal device can access the network device through a high-performance CPE and perform data transmission with the network device to realize the use of scenes with high bandwidth and latency requirements (such as high-definition live broadcast, game battle and high-definition video).

[0049] The network device can include a base station. The terminal device can include an access terminal, a terminal unit, a terminal station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a wireless communication device, a terminal agent, and a terminal apparatus. The access terminal can include a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a handheld device with wireless communication function, a computing device, other processing devices connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a 5G network, or a terminal device in an evolved Public Land Mobile Network (PLMN). The base station can include a base station in a 4th generation mobile communication technology (4G) system and a base station in a 5G system. The base station in the 4G system can include an Evolutional NodeB (eNB) in a long term evolution (LTE) communication system and a radio controller in a cloud radio access network (CRAN) communication system. The base station in the 5G communication system can include a base station in a new radio (NR) communication system and a network device, a wearable device, and a vehicle-mounted device in a PLMN communication system.

[0050] The CPE is used to interact with the network device and the terminal device, and forwards the received data frames sent by the network device or the terminal device. The data frames can be represented by a socket buffer (SKB) structure. The transmission process of the data frames can be divided into uplink transmission and downlink transmission according to the transmission direction. The uplink transmission refers to the transmission of the data frames from the terminal device to the base station through the CPE, and the downlink transmission refers to the transmission of the data frames from the base station to the terminal device through the CPE.

[0051] The current CPE architecture includes a SoC architecture and an AP+Modem architecture. The CPE using the SoC architecture includes a SoC chip, and the CPE using the AP+Modem architecture includes two independent chips of AP and Modem.

[0052] For the CPE with the SoC architecture, the SoC chip includes two virtual partitions of C core and A core, the C core is connected with the network device and is used for parsing the 3rd Generation Partnership Project (3GPP) protocol, and the A core is connected with the terminal device and is used for parsing the network protocol. When data transmission is performed, the CPE can directly transmit data through the hardware layer channel of the SoC chip, so as to meet the high-performance forwarding requirement.

[0053] However, for the CPE with the AP+Modem architecture, since the AP and the Modem are two independent chips, the data cannot be transmitted between the AP and the Modem through the hardware layer channel, so that the data transmission efficiency of the CPE with the AP+Modem architecture is low.

[0054] When the CPE with the AP+Modem architecture performs data transmission, taking the downlink transmission as an example, the Modem transmits the data frame to the AP through the double-machine communication driver. The AP triggers the packet reception hardware interrupt to receive the data frame, and stores the received data frame into a queue corresponding to the packet reception hardware interrupt. The packet reception hardware interrupt can be an Interrupt ReQuest (irq). Then, the AP triggers the packet reception software interrupt, and transmits the data frame in the queue to the destination interface through the Kernel Protocol Stack, and then to the terminal device.

[0055] When the number of data frames is large during the data transmission, the packet reception hardware interrupt is also high. For example, the CPU of the AP triggers the packet reception hardware interrupt once for each data frame received by the AP, so that the CPU of the AP receives the data frame. The high packet reception hardware interrupt occupies more CPU resources of the AP, so as to affect the data transmission efficiency. Moreover, after the AP triggers the packet reception software interrupt, the data frame in the queue is transmitted to the destination terminal device through the Kernel Protocol Stack. The processing process of the data frame by the Kernel Protocol Stack is complicated, and the data transmission path is long, so that the high packet reception software interrupt occupies more CPU resources of the AP, which also affects the data transmission efficiency.

[0056] Embodiments of the present application provide a data transmission system, and the CPE in the data transmission system adopts the AP+Modem architecture. Please refer to Figure 1 , Figure 1 A structure schematic diagram of the data transmission system provided by the embodiments of the present application is shown in Figure 1As shown, the data transmission system 10 includes a base station 101, a terminal device 102, and a CPE 103 establishing a communication connection with the base station and the terminal device. The CPE 103 includes a Modem connected with the base station 101 and an AP connected with the terminal device 102. The AP is connected to the terminal device 102 through multiple interfaces, Figure 1 Taking a WIFI interface and a network interface as an example, the WIFI interface is a WIFI AP interface, and the network interface is a Gigabit Ethernet (GE) interface.

[0057] The Modem and the AP can establish a communication connection through a device connected with a dual-machine communication interface, which can include a peripheral component interconnect express (PCIE) device and a Universal Serial Bus (USB) and the like.

[0058] The Modem includes two virtual partitions of a C core and an A core. The C core is connected with the base station 101, and the A core is connected with the AP connected with the terminal device 102. The Modem has a hardware layer channel, through which the C core and the A core can transmit data frames. The C core, the A core, and the AP each run a kernel protocol stack. The C core runs a 3GPP kernel protocol stack for parsing a 3GPP protocol. The A core and the AP each run a Linux network kernel protocol stack for parsing a network protocol. The 3GPP kernel protocol stack can include an Air Protocol Stack, and the Linux network kernel protocol stack can include a Transmission Control Protocol networking Stack (TCP networking Stack) and an Internet Protocol networking Stack (IP networking Stack).

[0059] The A core and the AP each run at least one driver program for driving an interface, which can include a dual-machine communication interface and various device interfaces, such as a WIFI AP interface and a GE interface. Accordingly, the driver program includes a dual-machine driver program (such as an RMNET Driver) for driving the dual-machine communication interface and driver programs for driving the device interfaces, such as a WIFI Driver for driving the WIFI AP interface and an Ethernet (ETH) Driver for driving the GE interface. Figure 1The diagram shows the RMNET Driver running on the A core, as well as the RMNET Driver, WIFI Driver, and ETH Driver running on the AP. The ETH Driver drives the GE interface via Gigabit Media Access Control (GMAC).

[0060] In this application embodiment, the process of transmitting data frames through the dual-machine driver and the process of the AP transmitting data frames through the kernel protocol stack during the entire data transmission process can be improved to enhance data transmission efficiency. The following describes the data transmission process provided in this application using several embodiments as examples.

[0061] Example 1: Improve the process of AP transmitting data frames through the kernel protocol stack.

[0062] This application provides a data transmission method in which a fast forwarding channel is newly set up in the access point (AP). The AP forwards data frames through this fast forwarding channel, which can be regarded as a virtual device. Please refer to... Figure 2 , Figure 2 This is a schematic diagram of a fast forwarding channel provided in an embodiment of this application. Figure 2 The diagram shows the fast forwarding channel, kernel protocol stack, and Netdevice (a data structure used to describe the attribute information of terminal devices connected to the AP).

[0063] like Figure 2 As shown, the fast forwarding channel may include an acceleration rule learning module 201, a forwarding table entry module 202, an L2 layer parsing module 203, an L3 layer parsing module 204, an L4 layer parsing module 205, an entry aging module 206, a kernel synchronization module 207, a kernel registration module 208, and a state machine module 209. Among these, L2 layer is the Media Access Control (MAC) layer, L3 layer is the Internet Protocol (IP) layer, and L4 layer is either the TCP layer or the User Datagram Protocol (UDP) layer.

[0064] The kernel includes the Netfilter framework (a type of firewall), which can be managed by the iptables service. The Netfilter framework places hooks at several points throughout the network flow, and each hook has a corresponding processing function to handle the network traffic. Figure 2Four detection points in the kernel protocol stack are shown, including an IP forwarding (denoted as IP_FORWARD, IP_FWD) detection point 210, an IP post-routing (denoted as IP_POST_ROUTING) detection point 211, a device detection point (netdevice_hook) 212, and a connection detection point (Netfilter_Conntrack_hook, nfct_hook) 213.

[0065] The Netdevice includes a driver packet receiving module 215 and a driver packet sending module 216. The driver packet receiving module 215 can be used for ETH, WIFI, or USB driver packet receiving, and the driver packet sending module 216 is correspondingly used for ETH, WIFI, or USB driver packet sending.

[0066] The driver packet receiving module 215 is in communication connection with the acceleration rule learning module 201. The acceleration rule learning module 201, the L2 layer analysis module 203, the L3 layer analysis module 204, and the L4 layer analysis module 205, and the forwarding table item module 202 are sequentially in communication connection. The forwarding table item module 202, the table item aging module 206, and the kernel synchronization module 207 are all in communication connection with the kernel protocol stack.

[0067] The data transmission method provided by the embodiment of the application will be described below. The data transmission method can be applied to the data transmission system shown in the structure. Please refer to Figure 2 the structure shown in the figure. Figure 3 , Figure 3 A flowchart of a data transmission method provided by the embodiment of the application is shown. The method can be applied to the CPE in the data transmission system described above. The method can include the following processes:

[0068] 301. Obtain a data frame through an AP.

[0069] The data frame can come from a Modem or a terminal device connected to the AP. For example, the AP can trigger a packet receiving hard interrupt through the driver packet receiving module 215 shown in the figure to receive a data frame, so as to obtain the data frame. Figure 2

[0070] 302. Query whether there is a forwarding rule corresponding to the data frame in a forwarding table item through the AP. The forwarding rule includes routing information and / or network address translation information.

[0071] The forwarding table item can be located in the cache space of the AP. When there is a forwarding rule corresponding to the data frame in the forwarding table item of the AP, process 303 is executed; when there is no forwarding rule corresponding to the data frame in the forwarding table item, processes 304 and 305 are executed.

[0072] ​The forwarding table item is used to record the correspondence between the data flow and the forwarding rule. The AP can query whether the forwarding rule corresponding to the data flow where the data frame is located exists in the forwarding table item. Optionally, the forwarding table item can store the correspondence between the five-tuple information of the data flow and the forwarding rule. The AP can extract the five-tuple information of the data frame, and query whether the corresponding forwarding rule exists in the forwarding table item according to the extracted five-tuple information.

[0073] The forwarding rule is used to represent the processing performed by the kernel protocol stack of the AP on the data frame when forwarding the data frame, that is, to represent the fields of the data frame modified by the kernel protocol stack when forwarding the data frame and the modified contents. The routing information in the forwarding rule is used to indicate the route passed through in the process of forwarding the data frame to the destination device, and the network address translation (NAT) information is used to indicate the NAT conversion required in the process of forwarding the data frame to the destination device. The query process can be performed by the forwarding table item module 202 shown in the figure, and the forwarding table item can be stored in the forwarding table item module 202. Further, the forwarding rule can also include a forwarding direction. Figure 2

[0074] Before querying whether the forwarding rule corresponding to the data frame exists in the forwarding table item, the data frame can be parsed first to determine the structure of the data frame. The process can be performed by the acceleration rule learning module 201 shown in the figure. Figure 2

[0075] Then it can be determined whether the fast forwarding channel is opened. The opening and closing of the fast forwarding channel can be managed by the state machine module 209 shown in the figure. Optionally, if the transmission of the data flow where the current data frame is located is disconnected and / or the traffic of the data flow is less than a first traffic threshold, the state machine module 209 can close the fast forwarding channel. Closing the fast forwarding channel when it is not needed to use the fast forwarding channel to forward the data frame can effectively avoid the occupation of CPU resources by the fast forwarding channel in the idle state. The state machine module 209 can include a switch identifier (for example, a switch field) for indicating the opening and closing of the fast forwarding channel, and the opening of the fast forwarding channel can be determined by the switch identifier. Figure 2

[0076] It should be noted that when the data frame is the first data frame of the data flow, the forwarding rule corresponding to the data frame does not exist in the forwarding table item. At this time, the process 302 can be executed; or the process 302 can not be executed, and the subsequent processes 304 and 305 can be directly executed.

[0077] ​​​When the data frame is not the first data frame of the data flow to which the data frame belongs, the traffic of the data flow to which the data frame belongs can be determined. In one implementation, the process 302 is performed for the first data frame of the forwarded data frames of the data flow to which the data frame belongs, i.e., whether the forwarding rule corresponding to the data frame exists in the forwarding table entry is queried for each of the forwarded data frames. At this time, for each of the forwarded data frames of the data flow to which the data frame belongs, the query time stamp of whether the forwarding rule corresponding to the data frame exists in the forwarding table entry can be determined. Then, the traffic of the data flow to which the data frame belongs is determined according to the query time stamp of the data frame and the query time stamp of the forwarded data frame.

[0078] In another implementation, the process 302 is not performed for the first data frame of the forwarded data frames of the data flow to which the data frame belongs, i.e., whether the forwarding rule corresponding to the data frame exists in the forwarding table entry is not queried for the first data frame. At this time, for the first data frame of the forwarded data frames, the output time stamp of the kernel protocol stack outputting the first data frame can be determined. For the non-first data frame of the forwarded data frames, the query time stamp of whether the forwarding rule corresponding to the data frame exists in the forwarding table entry can be determined. Then, the traffic of the data flow to which the data frame belongs is determined according to the query time stamp of the data frame, and the output time stamp and the query time stamp of the forwarded data frame.

[0079] Further, when the fast forwarding channel is opened, the data frame can also be screened to determine whether the data frame is a valid Ethernet frame. When the data frame is a valid Ethernet frame, whether the forwarding rule corresponding to the data frame exists in the forwarding table entry is queried. When the data frame is a non-valid Ethernet frame, the data frame is discarded.

[0080] The screening process can be performed by the L3 layer analysis module 203, the L3 layer analysis module 204 and the L4 layer analysis module 205 shown in FIG. 2. Figure 2 The L2 layer analysis module 203 is configured to analyze the MAC layer protocol header of the data frame, to screen out multicast frames, broadcast frames, all-0 frames and the like, and to specially identify Point-to-Point Protocol (PPP) sessions for forwarding Ethernet frames. The L3 layer analysis module 204 is configured to analyze the IP layer protocol header of the data frame, to further filter multicast frames, broadcast frames, loopback frames and data frames with a Time To Live (TTL) field value less than 1. The L4 layer analysis module 205 is configured to analyze the transport layer protocol header of the data frame, to screen out handshake frames, and to forward TCP termination frames.

[0081] 303. The AP sends the data frame based on the forwarding rule corresponding to the data frame.

[0082] Optionally, if the forwarding table entry contains a forwarding rule corresponding to the data stream containing the data frame, it can be further determined whether the data frame meets the first fast forwarding condition. When the data frame meets the first fast forwarding condition, the data frame is sent by the AP based on the forwarding rule corresponding to the data frame. The first fast forwarding condition may include: the traffic of the data stream containing the data frame is greater than a second traffic threshold and / or the data frame does not belong to the first n packets in the data stream, where n > 1. Figure 2 The state machine module 209 shown can determine the first fast forwarding condition and whether the data frame meets the first fast forwarding condition. The process of determining the traffic of the data stream to which the data frame belongs can be referred to process 302, and will not be described in detail here in this embodiment.

[0083] When the forwarding table entry contains a forwarding rule corresponding to the data stream containing the data frame, and the data frame meets the first fast forwarding condition, the fast forwarding channel sends the data frame based on the forwarding rule corresponding to the data frame. For example, the fast forwarding channel can modify the data frame according to the forwarding rule to obtain a data frame that has undergone routing and NAT translation, and add the modified data frame to the forwarding queue of the fast forwarding channel. The data frame contains a field indicating the destination device, which can be a device (device, dev) field. The destination interface can be determined based on the field indicating the destination device, and the data frame is sent to the destination interface. The fast forwarding channel stores the interface functions of all devices that have established communication connections with the AP. The destination interface can be determined based on the field indicating the destination device, and then the destination interface function can be called to send the data frame to the destination interface.

[0084] 304. The data frames are forwarded through the kernel protocol stack of the AP. The forwarding process includes marking the forwarding rules corresponding to the data stream in which the data frame is located.

[0085] like Figure 2 As shown, each detection point in the kernel protocol stack forwards the data frame and then outputs the forwarded data frame to the kernel protocol stack. Optionally, when there is no forwarding rule corresponding to the data stream where the data frame is located in the forwarding table entry, it can be further determined whether the data frame meets the second fast forwarding condition, that is, whether the data frame can be forwarded through the fast forwarding channel. When the data frame meets the second fast forwarding condition, a fast forwarding identifier is added to the data frame, or the fast forwarding identifier already added to the data frame indicates that the data frame meets the second fast forwarding condition, and the data frame is forwarded through the kernel protocol stack of the AP; when the data frame does not meet the second fast forwarding condition, the data frame is directly forwarded through the kernel protocol stack of the AP. The second fast forwarding condition may include: the traffic of the data stream where the data frame is located is greater than the third traffic threshold and / or the data stream is not disconnected. The process of determining the traffic of the data stream where the data frame is located can be referred to process 302, which will not be described in detail in this embodiment.

[0086] The kernel protocol stack stores a marking function (e.g., a hook function) corresponding to the fast forwarding identifier, which is used to mark the forwarding rule. When the fast forwarding identifier exists in the data frame or the fast forwarding identifier indicates that the data frame meets the second fast forwarding condition, the marking function can mark the forwarding rule in the transmitted data frame.

[0087] As shown in FIG. 2, the marking function can be registered in an IP forwarding detection point 210 and an IP post-routing detection point 211 in the kernel protocol stack. The IP forwarding detection point 210 is used to mark the routing information, and the IP post-routing detection point 211 is used to mark the NAT conversion information. The process of registering the marking function can be performed by a kernel registration module 208. Figure 2 Further, the forwarding rule can further include a forwarding direction, and the IP forwarding detection point 210 is further used to mark the forwarding direction.

[0088] As described in the foregoing process 302, the opening or closing of the fast forwarding channel can be managed by a state machine module 209 as shown in FIG. 2. It should be noted that if the data frame meets the second fast forwarding condition, other data frames in the same data stream as the data frame can be sent through the fast forwarding channel, and therefore the state machine module 209 needs to control the fast forwarding channel to be in an open state to transmit the other data frames received subsequently. If the current data frame does not meet the second fast forwarding condition, other data frames in the same data stream as the data frame cannot be sent through the fast forwarding channel, and therefore the state machine module 209 can control the fast forwarding channel to be in a closed state, thereby effectively avoiding the occupation of CPU resources by the fast forwarding channel in the idle state.

[0089] Figure 2 It should be noted that for the process 303, when the forwarding table item exists the forwarding rule corresponding to the data stream where the data frame is located and the data frame does not meet the first fast forwarding condition, the data frame can be forwarded by the kernel protocol stack of the AP. This process can refer to the process 304, and the embodiments of the present application will not be repeated here.

[0090] It should be noted that for the process 303, when the forwarding table item exists the forwarding rule corresponding to the data stream where the data frame is located and the data frame does not meet the first fast forwarding condition, the data frame can be forwarded by the kernel protocol stack of the AP. This process can refer to the process 304, and the embodiments of the present application will not be repeated here.

[0091] 305、Adding, by the AP, a correspondence between the data stream where the data frame is located and the forwarding rule in the forwarding table item based on the forwarding rule marked in the data frame.

[0092] ​The AP can parse the data frame after the kernel protocol stack forwarding processing, determine the structure of the data frame after the forwarding processing, and compare the structure of the data frame after the forwarding processing with the structure of the data frame determined in process 302 to obtain the forwarding rule marked in the data frame. Then, the correspondence between the data flow in which the data frame is located and the forwarding rule is added in the forwarding table entry, for example, the correspondence between the five-tuple information of the data flow in which the data frame is located and the forwarding rule can be added. The process of determining the forwarding rule can be performed by the accelerated rule learning module 201 shown in Figure 2 The process of adding the correspondence between the data flow in which the data frame is located and the forwarding rule can be performed by the forwarding table entry module 202 shown in Figure 2

[0093] It should be noted that there are data frames that can be forwarded through the fast forwarding channel and data frames that cannot be forwarded through the fast forwarding channel in the data frame after the kernel protocol stack forwarding processing. For the data frames that cannot be forwarded through the fast forwarding channel, there is no need to obtain their forwarding rules and no need to add the correspondence between the data flow in which they are located and the forwarding rule in the forwarding table entry. As known from the foregoing process 304, the data frames that can be forwarded through the fast forwarding channel are added with the fast forwarding identifier or the fast forwarding identifier indicates that the data frame meets the second fast forwarding condition, and whether it is necessary to obtain the forwarding rule of the data frame and add the correspondence between the data flow in which the data frame is located and the forwarding rule can be determined according to the fast forwarding identifier. For example, when the data frame is added with the fast forwarding identifier or the fast forwarding identifier added in the data frame indicates that the data frame meets the second fast forwarding condition, the forwarding rule marked in the data frame can be obtained, and the correspondence between the data flow in which the data frame is located and the obtained forwarding rule can be added in the forwarding table entry.

[0094] For the data frame output by the kernel protocol stack, the fast forwarding channel can generate a fast forwarding node instance (a kind of virtual channel). The data frame after the forwarding processing has a field (for example, the dev field) for indicating the destination device, and the fast forwarding channel can determine the destination interface according to the field for indicating the destination device, and then call the destination interface function through the fast forwarding node instance to send the data frame to the destination interface.

[0095] The table entry aging module 206 in the fast forwarding channel is used to determine the data flow that is disconnected in the AP, and then the forwarding table entry module 202 can delete the forwarding rule corresponding to the data flow that is disconnected in the forwarding table entry. Or delete the forwarding rule corresponding to the data flow that is disconnected in the forwarding table entry to reduce the unnecessary forwarding rule occupying the memory space of the forwarding table entry.

[0096] ​In the embodiment of the present application, the netdevice_hook 212 in the kernel protocol stack can register a device change notification event, which is used to monitor the connection state of all devices connected to the AP. The nfct_hook 213 can register a connection tracking table deletion notification event, which is used to monitor the transmission of all data flows forwarded by the AP. The table entry aging module 206 can have a communication connection with the kernel protocol stack, and determine the disconnected data flow according to the netdevice_hook 212 and the nfct_hook 213.

[0097] For example, the table entry aging module 206 can determine the disconnected device according to the device change notification event, and then determine the data flow whose destination device is the disconnected device as the disconnected data flow. The table entry aging module 206 can also have a timing function. If it is determined through the timing function and the connection tracking table deletion notification event that the flow of any data flow is zero within a time range exceeding a time threshold, the any data flow is determined as the disconnected data flow.

[0098] In the embodiment of the present application, for data frames that are not transmitted through the kernel protocol stack, the kernel also needs to obtain the transmission situation of the data frames, and record the connection tracking (Conntrack) of the data frames transmitted through the fast forwarding channel. The kernel synchronization module 207 in the fast forwarding channel has a communication connection with the kernel, and the kernel synchronization module 207 can synchronize the communication with the kernel and send the transmission situation of the data frames in the fast forwarding channel to the kernel, so as to ensure that the kernel records the connection tracking of the data frames transmitted through the fast forwarding channel.

[0099] The AP includes a plurality of CPU cores, and when the data transmission processes shown in the processes 301 to 305 are uplink transmission, the processes 301 to 305 can be executed by the CPU cores. Alternatively, each CPU core corresponds to at least one data flow identifier, and any CPU core is used to execute the foregoing processes for the data frames with the corresponding data flow identifier. For example, the process 301 can obtain the data frames for the CPU core corresponding to the data flow identifier of the data frames. The process 303 can send the data frames based on the forwarding rule corresponding to the data frames for the CPU core corresponding to the data flow identifier of the data frames, and perform the forwarding processing on the data frames. The process 304 can perform the forwarding processing on the data frames through the kernel protocol stack of the AP for the CPU core corresponding to the data flow identifier of the data frames.

[0100] In the uplink transmission process, the data frames are sent by the terminal device connected to the AP, and the terminal device connected to the AP can be a single queue or a multi-queue. The single-queue terminal device can only register one packet reception hard interrupt in the AP, and each packet reception hard interrupt corresponds to one queue. Therefore, for multiple data streams sent by the single-queue terminal device, the AP can trigger a packet reception hard interrupt to receive the multiple data streams, and place the multiple data streams in the one queue. The multi-queue terminal device can register multiple packet reception hard interrupts in the AP, and each packet reception hard interrupt corresponds to one queue. Therefore, for multiple data streams sent by the multi-queue terminal device, the AP can trigger multiple packet reception hard interrupts to receive the multiple data streams, and place the multiple data streams in the multiple queues corresponding to the multiple packet reception hard interrupts.

[0101] Optionally, for the single-queue terminal device, the registered packet reception hard interrupt can be unbound from the packet reception soft interrupt, and then multiple queues are determined. For example, the registered packet reception hard interrupt can be unbound from the packet reception soft interrupt through a standard management procedure (SMP), which is a kind of symmetric multiprocessing system.

[0102] After the AP triggers the packet reception hard interrupt to receive the first data frame of any data stream sent by the terminal device, the queue and the CPU core corresponding to the identifier of any data stream (for example, five-tuple information) are determined according to a hash algorithm. Then, the first data frame is placed in the queue corresponding to the identifier of any data stream, and the packet reception soft interrupt is triggered by the CPU core corresponding to the identifier of any data stream to perform forwarding processing on the first data frame. The forwarding processing process can refer to the foregoing process, and details are not described herein. For example, the queue and the CPU core corresponding to the identifier of any data stream can be determined through a receive packet steering (RPS) patch.

[0103] Then, a hash table can be established according to the queue and the CPU core corresponding to the identifier of any data stream, which represents the correspondence between the identifier of any data stream, the queue and the CPU core. After the AP triggers the packet reception hard interrupt to receive the subsequent data frame of any data stream, the subsequent data frame is placed in the queue corresponding to the identifier of any data stream, and the packet reception soft interrupt is triggered by the CPU core corresponding to the identifier of any data stream to perform forwarding processing on the subsequent data frame.

[0104] The five-tuple information can include a source IP (src_IP), a source port (src_port), a destination IP (dest_IP), a destination port (dest_port) and a protocol type (proto). For example, please refer to Figure 4 , Figure 4A format diagram of a data frame provided by an embodiment of the present application is shown in FIG. 1. The data frame includes an L2 header field, an IP header field, a TCP / UDP header field, a data payload field, and an L2 trailer field. The src_IP, dest_IP, and proto in the five-tuple information are located in the IP header field, and the src_port and dest_port are located in the TCP / UDP header field.

[0105] Please refer to Figure 5 , Figure 5 A transmission process diagram of a data frame sent by a single-queue terminal device provided by an embodiment of the present application is shown in FIG. 2. Figure 5 Take the rmnet driver, four queues queue0 to queue3, and a received data frame as a non-first data frame in a data flow as an example for description. As shown in FIG. 2, the rmnet driver triggers a packet reception hard interrupt to receive a data frame sent by a terminal device, determines that the data frame corresponds to the queue0 and the CPU core 0 through a hash table, and places the data frame in the queue0. The CPU core 0 sends the data frame based on a forwarding rule corresponding to the data frame or performs forwarding processing on the data frame through a kernel protocol stack of the AP, and then calls a destination interface function to send the data frame to the destination interface. Figure 5

[0106] Optionally, for a multi-queue terminal device, the queue corresponding to each packet reception hard interrupt can be bound to a CPU core and a hash table is established, which indicates the correspondence between any data flow identifier, packet reception hard interrupt, queue, and CPU core. The AP determines the packet reception hard interrupt, queue, and CPU core corresponding to any data flow identifier through the hash table. The CPU core corresponding to any data flow identifier triggers a corresponding packet reception hard interrupt to receive a data frame of the data flow, and places the data frame in the corresponding queue. Then, the CPU core corresponding to the data flow identifier triggers a packet reception soft interrupt to perform forwarding processing on the data frame. The process can be referred to the foregoing description, and an embodiment of the present application will not be described here.

[0107] Please refer to Figure 6 , Figure 6 A transmission process diagram of a data frame sent by a multi-queue terminal device provided by an embodiment of the present application is shown in FIG. 3. Figure 6 Take the rmnet driver, four queues queue0 to queue3, four packet reception hard interrupts irq0 to 3, and four CPU cores 0 to 3 as an example for description. As shown in FIG. 3, the rmnet driver triggers a packet reception hard interrupt to receive a data frame sent by a terminal device, determines that the data frame corresponds to the queue0 and the CPU core 0 through a hash table, and places the data frame in the queue0. The CPU core 0 sends the data frame based on a forwarding rule corresponding to the data frame or performs forwarding processing on the data frame through a kernel protocol stack of the AP, and then calls a destination interface function to send the data frame to the destination interface. Figure 6 ​As shown, the AP determines, through the hash table, that the queue corresponding to the data frame sent by the terminal device is queue0, the packet reception hard interrupt corresponding to the data frame is irq0, and the CPU core corresponding to the data frame is CPU core 0. The rnmetdriver triggers irq0 to receive the data frame, places the data frame in queue0, and the CPU core 0 sends the data frame based on the forwarding rule corresponding to the data frame or performs forwarding processing on the data frame through the kernel protocol stack of the AP, and then calls the destination interface function to send the data frame to the destination interface.

[0108] To sum up, the data transmission method provided by the embodiments of the present application acquires the data frame through the AP, queries whether the forwarding rule corresponding to the data frame exists in the forwarding table item through the AP, the forwarding rule includes routing information and / or network address translation information, sends the data frame based on the forwarding rule corresponding to the data frame when the forwarding rule corresponding to the data flow where the data frame is located exists in the forwarding table item stored by the AP; when the forwarding rule corresponding to the data flow where the data frame is located does not exist in the forwarding table item stored by the AP, performs forwarding processing on the data frame through the kernel protocol stack of the AP, and adds the correspondence between the data flow where the data frame is located and the forwarding rule in the forwarding table item based on the forwarding rule marked in the data frame through the AP. In this data transmission process, the data frame for which the forwarding rule corresponding to the data flow where the data frame is located exists in the forwarding table item does not need to go through the cumbersome processing of the kernel protocol stack, but is directly modified based on the forwarding rule corresponding to the data frame, and the destination interface function is called to send the data frame to the destination interface, which simplifies and shortens the data transmission path, reduces the CPU resources occupied by the packet reception soft interrupt of the AP, and thus improves the data transmission efficiency.

[0109] In addition, each CPU core corresponds to at least one data flow identifier, and for the data frame sent by the terminal device, the CPU core corresponding to the data flow identifier of the data frame acquires the data frame, sends the data frame based on the forwarding rule corresponding to the data frame, performs forwarding processing on the data frame, and performs forwarding processing on the data frame through the kernel protocol stack of the AP. This allows data frames with different data flow identifiers to be subjected to subsequent forwarding processing by multiple CPU cores, reduces the CPU resources occupied by the packet reception soft interrupt of the AP, effectively reduces the probability of the occurrence of a situation in which a certain CPU core is occupied to the full and other CPU cores are still in an idle state, improves the utilization rate of CPU resources, realizes balanced utilization of multiple CPU cores, and thus improves the data transmission efficiency.

[0110] The sequence of the method provided by the embodiments of the present application can be adjusted appropriately, and the process can be increased or decreased according to the situation. For example, when the data frame is the first data frame of the data stream, the processes 302 and 303 can not be executed, and the processes 304 and 305 can be directly executed. Any person skilled in the art can easily think of the changed method within the technical range disclosed by the present application, which should be covered by the protection scope of the present application, and the embodiments of the present application do not limit this.

[0111] Embodiment two: improvement on the process of transmitting data frames by the dual-machine driver.

[0112] The embodiments of the present application provide a data transmission method, please refer to Figure 7 , Figure 7 The flowchart of another data transmission method provided by the embodiments of the present application is shown, and the method can be applied to the CPE in the data transmission system. The method can include the following processes:

[0113] 401. Compressing each data frame by the Modem.

[0114] The data frames are sent by the network device connected to the Modem, and the Modem can compress each data frame by using the compression algorithm. The compression of the data frame can reduce the size of the data frame, thereby improving the data transmission efficiency.

[0115] 402. Combining the data frames by the Modem to obtain a packet.

[0116] It should be noted that in the processes 401 and 402, the Modem can first compress each data frame and then combine the data frames. The Modem can add the packet message of each data frame in the multiple data frames to combine the multiple data frames.

[0117] The Modem can obtain the interactive instruction parameter and the packet message format, and then combine the compressed data frames according to the interactive instruction parameter and the packet message format. The interactive instruction parameter and the packet message format can be determined by the upper application of the Modem and sent to the hardware layer channel of the Modem.

[0118] The interactive instruction parameter is used to control the combination process, which can include at least one of the following: a packet capacity, a packet length, a combination time slot, a combination identifier, and real device information. The Modem can combine the data frames based on the interactive instruction parameter. The packet capacity is used to indicate the maximum capacity of the packet, which is related to the memory of the Modem system, for example, it can be 32 kilobytes (KB) or 64 KB, etc. The packet length is used to indicate the maximum packet length of the packet. The combination time slot represents the maximum time length of the combined data frame. The combination identifier is used to indicate whether the Modem combines the data frame. The real device information is used to indicate the source device that sends the data frame and the destination device that receives the data frame, for example, it can be the identity document (ID) of the source device and the destination device.

[0119] The packet message format is used to indicate the format of the packet message added in each data frame, which is used to indicate the information indicated by each field carried in the packet message. The Modem can add a packet header in each data frame according to the determined packet message format, and fill the information of each field in the packet header to add the packet message in the data frame, so as to realize the combination of the data frame. Optionally, the packet message format can include a packet length (pkt_len) and / or an offset. Further, the packet message format can also include a protocol header length (pad_len).

[0120] The packet capacity, the packet length, and the combination time slot in the interactive instruction parameter are used to indicate the combination end condition. The combination end condition corresponding to the packet capacity is that the capacity of the current data frame and the sum of the capacities of all the combined data frames are greater than the packet capacity. The combination end condition corresponding to the packet length is that the packet length of the current data frame and the sum of the packet lengths of all the combined data frames are greater than the packet length. The combination end condition corresponding to the combination time slot is that the interval between the current time and the time when the first data frame is combined is greater than the combination time slot. The combination process is described below with the three parameters as examples.

[0121] For example, the interactive instruction parameter includes the packet length. Please refer to Figure 8 , Figure 8 A data transmission process diagram provided by the embodiment of the application is shown in FIG. 1. The Modem first receives the interactive instruction parameter and acquires the packet message format, Figure 8 For example, the interactive instruction parameter includes the packet length, and the packet message format includes the packet length, the offset, and the packet length. As shown in FIG. 2, the Modem receives the interactive instruction parameter and acquires the packet message format, Figure 8As shown, the Modem determines whether the packet length of the current data frame and the sum of the packet lengths of all the combined data frames is greater than the packet length. When the sum of the packet lengths is greater than the packet length, the process of combining data frames is ended, and all the combined data frames are taken as one packet. When the sum of the packet lengths is less than or equal to the packet length, a packet header is added in the one data frame according to the packet message format, and the packet length, offset and protocol header length are filled in the corresponding fields to add the packet message in the one data frame, and the combination of the data frame is completed. The next data frame is taken as the current data frame to re-perform the foregoing combination process until the packet length of the current data frame and the sum of the packet lengths of all the combined data frames is greater than the packet length.

[0122] Figure 8 In the process shown, the Modem determines whether the packet length of the current data frame and the sum of the packet lengths of all the combined data frames is greater than the packet length before combining the current data frame. In another example, the Modem can determine whether the packet length of the current data frame and the sum of the packet lengths of all the combined data frames is greater than the packet length after combining the current data frame. The embodiments of the present application do not limit this.

[0123] Taking the packet capacity as an example, the Modem determines whether the capacity of the current data frame and the sum of the capacities of all the combined data frames is greater than the packet capacity in the combination process. Other processes can refer to the foregoing combination process, and the embodiments of the present application do not make redundant description here.

[0124] Taking the combination time slot as an example, the Modem determines whether the time interval between the current time and the time of combining the first data frame is greater than the combination time slot in the combination process. Other processes can refer to the foregoing combination process, and the embodiments of the present application do not make redundant description here.

[0125] For the case that the interactive instruction parameters include at least two parameters of the packet length, the packet capacity and the combination time slot, the combination process can be ended when any parameter corresponding combination end condition is met, or the combination process is ended when all parameter corresponding combination end conditions are met, and the embodiments of the present application do not limit this.

[0126] Further, the Modem can also perform the operation of replacing real device information and mapping virtual devices when adding the packet message in the current data frame.

[0127] 403. The Modem sends the packet to the AP.

[0128] The CPE can send the packet to the AP through the hardware layer channel and the dual-computer communication driver. The AP triggers the packet receiving hard interrupt to receive the packet, and stores the received packet into the queue corresponding to the packet receiving hard interrupt.

[0129] 404、the AP disassembles the packet to obtain a plurality of data frames.

[0130] The AP can trigger the packet receiving soft interrupt to disassemble the packet to obtain a plurality of data frames. The packet includes a plurality of combined data frames arranged in sequence. The AP can disassemble each combined data frame from the packet in sequence according to the arrangement order of the combined data frames in the packet to obtain a plurality of data frames.

[0131] The AP can obtain a packet message format, which can be sent by the Modem. Then, for each data frame, the AP can parse the packet header of each combined data frame in the packet based on the packet message format when disassembling to determine the packet message. Then, the corresponding combined data frame is disassembled from the packet by using the packet message of each combined data frame. For example, the AP can obtain an initial SKB according to the fields included in the packet message and determine the fields carried in the data frame, and then add part or all of the fields in the data frame to the initial SKB to obtain the data frame. Alternatively, at least one of the following fields in the data frame can be added to the initial SKB: a field for indicating the packet length, a field for indicating the device information, and a field for indicating the protocol type.

[0132] For example, taking the case that the packet message includes fields for indicating the packet length and the offset as an example, please continue to refer to the foregoing Figure 8 After the AP disassembles the current combined data frame from the packet to obtain the current data frame, the AP determines whether there is a next combined data frame according to the offset indicated by the packet message of the current data frame. When there is no next combined data frame, the disassembly process is ended. When there is a next combined data frame, the next combined data frame is obtained by offsetting according to the offset of the current data frame. The next combined data frame is taken as the current combined data frame, and the packet message of the current combined data frame is obtained. The initial SKB is obtained according to the packet length indicated by the packet message of the current combined data frame, and the fields carried in the data frame are added to the initial SKB to obtain the current data frame. Then, the foregoing process is repeated for the current data frame until there is no next combined data frame.

[0133] For example, if the offset indicated by the packet message of the current data frame is 0, it is determined that there is no next combined data frame. If the offset indicated by the packet message of the current data frame is not 0, it is determined that there is a next combined data frame.

[0134] 405、the AP disassembles the packet to obtain a plurality of data frames.

[0135] Alternatively, the AP can perform decompression processing on the plurality of data frames according to the decompression algorithm.

[0136] For example, refer to Figure 9 , Figure 9 A schematic diagram of data frames in a data transmission process provided by an embodiment of the present application is shown in FIG. 4. Figure 9 For example, four data frames (including data frames 1 to 4) are taken as an example for illustration. As shown in FIG. 4, the Modem combines the four data frames 1 to 4 into one packet and sends the packet to the AP, and the AP disassembles the packet to obtain the data frames 1 to 4. Figure 9

[0137] In the process of transmitting data frames through the dual-machine communication driver, the number of times of triggering the packet receiving hard interrupt by the AP is related to the number of times of transmitting the data frames. In general, the AP triggers the packet receiving hard interrupt once for each data frame. However, in the embodiment of the present application, the AP triggers the packet receiving hard interrupt once for each packet (i.e. multiple data frames), thereby reducing the number of times of triggering the packet receiving hard interrupt, and thus reducing the CPU resources of the AP occupied by the packet receiving hard interrupt and improving the data transmission efficiency.

[0138] Further, the AP can forward the multiple data frames after decompression to the destination device. The foregoing processes 401 to 405 are described by taking one data transmission process between the Modem and the AP as an example, and each data transmission process can refer to the foregoing embodiments, which will not be described herein again.

[0139] In summary, the data transmission method provided by the embodiment of the present application combines multiple data frames by the Modem to obtain one packet, sends the packet to the AP, disassembles the packet by the AP to obtain multiple data frames, and triggers the packet receiving hard interrupt once for each packet (i.e. multiple data frames) by the AP, without triggering the packet receiving hard interrupt once for each data frame, thereby reducing the number of times of triggering the packet receiving hard interrupt, reducing the CPU resources of the AP occupied by the packet receiving hard interrupt, and improving the data transmission efficiency.

[0140] In addition, before combining the multiple data frames by the Modem, the multiple data frames can be compressed respectively, and correspondingly, the multiple data frames can be decompressed respectively by the AP after disassembling the packet by the AP. The compression processing can reduce the data size of the multiple data frames, thereby further improving the data transmission efficiency.

[0141] The sequence of the method provided by the embodiment of the present application can be adjusted appropriately, and the processes can be increased or decreased accordingly. For example, the foregoing processes 401 and 405 can not be executed. Any person skilled in the art can easily think of the changed method within the technical range disclosed by the present application, which should be covered in the protection scope of the present application, and the embodiment of the present application does not limit this.

[0142] ​It should be noted that the embodiment two can be combined with the embodiment one, for example, the data frame acquired by the AP in the process 301 can come from the Modem, at this time the data frame acquired by the AP in the process 301 is the multiple data frames obtained by the process 404 disassembling, or is the multiple data frames after the decompression processing in the process 405.

[0143] The data transmission method provided by the embodiments of the present application is mainly introduced from the perspective of interaction between devices. It can be understood that each device includes a hardware structure and / or a software module corresponding to each function in order to achieve the above functions. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments disclosed in the present application, the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0144] The embodiments of the present application can divide the functional modules of the device according to the above method examples, for example, each functional module can be divided according to each function, or two or more functions can be integrated in one processing module. The above integrated module can be realized in the form of hardware or software functional module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical function division. There can be another division way in actual implementation.

[0145] Figure 10A block diagram of a data transmission apparatus provided in an embodiment of the present application, in the case of dividing various functional modules according to various functions, the data transmission apparatus 500 can include a transceiver module 501 and a processing module 502. Exemplarily, the data transmission apparatus can be a CPE, or a chip or other combination device, component, etc. having the above-mentioned data transmission apparatus function therein. When the data transmission apparatus is a CPE, the transceiver module 501 can be a transceiver, which can include an antenna and a radio frequency circuit, etc.; the processing module 502 can be a processor (or, processing circuit), for example, a baseband processor, which can include one or more CPUs. When the data transmission apparatus is a device or component having the above-mentioned function, the transceiver module 501 can be a radio frequency unit; the processing module 502 can be a processor (or, processing circuit), for example, a baseband processor. When the data transmission apparatus 500 is a chip system, the transceiver module 501 can be an input / output interface of a chip (for example, a baseband chip); the processing module 502 can be a processor (or, processing circuit) of the chip system, which can include one or more central processing units. It should be understood that the transceiver module 501 in the embodiment of the present application can be implemented by a transceiver or a transceiver-related circuit component; the processing module 502 can be implemented by a processor or a processor-related circuit component (or, processing circuit).

[0146] For example, when the data transmission apparatus 500 is a CPE or a chip or functional unit of a CPE, the transceiver module 501 can be configured to perform all the transceiving operations in the embodiments shown in Figure 3 or Figure 7 , and / or other processes for supporting the technologies described herein; the processing module 502 can be configured to perform all the operations in the embodiments shown in Figure 3 or Figure 7 , other than the transceiving operations, and / or other processes for supporting the technologies described herein.

[0147] The transceiver module 501 can include a sending module and / or a receiving module, which are respectively configured to perform the sending and receiving operations in the embodiments shown in Figure 3 or Figure 7 , and the data transmission apparatus includes:

[0148] a transceiver module, configured to acquire a data frame through an AP;

[0149] The transceiver module is further configured to, when there is a forwarding rule corresponding to a data flow in which the data frame is located in a forwarding table item of the AP, send the data frame based on the forwarding rule corresponding to the data frame through the AP, the forwarding rule including routing information and / or network address translation information, and the forwarding table item is used to record the correspondence between a data flow and a forwarding rule.

[0150] According to the above scheme, the data transmission device further comprises:

[0151] The processing module is configured to perform forwarding processing on the data frame by a kernel protocol stack of the AP when the forwarding rule corresponding to the data flow in which the data frame is located does not exist in the forwarding table item, and the forwarding processing comprises marking the forwarding rule.

[0152] The processing module is further configured to add, by the AP, a correspondence between the data flow in which the data frame is located and the forwarding rule in the forwarding table item based on the forwarding rule marked in the data frame.

[0153] According to the above scheme, the transceiver module is specifically configured to transmit the data frame based on the forwarding rule corresponding to the data frame when the forwarding rule corresponding to the data flow in which the data frame is located exists in the forwarding table item and the traffic of the data flow in which the data frame is located is greater than the traffic threshold.

[0154] According to the above scheme, the transceiver module is specifically configured to transmit the data frame based on the forwarding rule corresponding to the data frame when the forwarding rule corresponding to the data flow in which the data frame is located exists in the forwarding table item and the data frame does not belong to the first n packets in the data flow, n>1.

[0155] According to the above scheme, the method is applied to a CPU of the AP, the CPU comprises a plurality of CPU cores, and each CPU core of the plurality of CPU cores corresponds to at least one data flow identifier; and the transceiver module is specifically configured to acquire the data frame by a CPU core corresponding to a data flow identifier of the data frame; and when the forwarding rule corresponding to the data flow in which the data frame is located exists in the forwarding table item, transmit the data frame based on the forwarding rule corresponding to the data frame by the CPU core corresponding to the data flow identifier of the data frame.

[0156] According to the above scheme, the method is applied to a CPU of the AP, the CPU comprises a plurality of CPU cores, and each CPU core of the plurality of CPU cores corresponds to at least one data flow identifier; and the processing module is specifically configured to perform forwarding processing on the data frame by a kernel protocol stack of the AP when the forwarding rule corresponding to the data flow in which the data frame is located does not exist in the forwarding table item.

[0157] According to the above scheme, when the data frame acquired by the AP is from a Modem, the processing module is further configured to combine a plurality of the data frames by the Modem to obtain a packet; the transceiver module is further configured to transmit the packet to the AP by the Modem; and the processing module is further configured to disassemble the packet by the AP to obtain a plurality of the data frames.

[0158] In combination with the above solution, the processing module is further configured to perform compression processing on the data frames respectively by using the Modem; and perform decompression processing on the data frames respectively by using the AP.

[0159] In combination with the above solution, the processing module is specifically configured to obtain a packet message format, the packet message format including a packet length and / or an offset; and add a packet message in the data frame based on the packet message format. The processing module is specifically configured to obtain the packet message format; determine the packet message of the data frame in the packet based on the packet message format; and disassemble the data frame from the packet by using the packet message of the data frame.

[0160] Figure 11 A structural schematic diagram of an electronic device is provided in the embodiments of the present application. The electronic device 600 can be a CPE or a chip or a functional module in the CPE. As shown in the figure, the electronic device 600 includes a processor 601, a transceiver 602 and a communication line 603. Figure 11

[0161] The processor 601 is configured to perform any step in the method embodiments as shown in the figures, and when performing data transmission such as obtaining a data frame, the transceiver 602 and the communication line 603 can be selectively called to complete the corresponding operation. Figure 3 Figure 7

[0162] Further, the electronic device 600 can further include a memory 604. The processor 601, the memory 604 and the transceiver 602 can be connected through the communication line 603.

[0163] The processor 601 can be a CPU, a general processor network processor (NP), a digital signal processing (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD) or any combination thereof. The processor 601 can also be other devices with processing functions, such as a circuit, a device or a software module, without limitation.

[0164] The transceiver 602 is configured to communicate with other devices or other communication networks, which can be an Ethernet, a radio access network (RAN), a wireless local area network (WLAN) and the like. The transceiver 602 can be a module, a circuit, a transceiver or any device capable of communication.​​​

[0165] The transceiver 602 is mainly used for data transmission and reception, and can include a transmitter and a receiver for data transmission and reception, respectively. Operations other than data transmission and reception are implemented by the processor, such as information processing, calculation, and the like.

[0166] The communication line 603 is used to transmit information between the components included in the electronic device 600.

[0167] In one design, the processor can be regarded as a logic circuit, and the transceiver can be regarded as an interface circuit.

[0168] The memory 604 is used to store instructions. The instructions can be a computer program.

[0169] The memory 604 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of RAM can be used, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DRRAM). The memory 304 can also be a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, and the like. It should be noted that the memory of the system and method described herein is intended to include, but not be limited to, these and any other suitable types of memory.

[0170] It should be noted that the memory 604 can exist independently of the processor 601, or it can be integrated with the processor 601. The memory 604 can be used to store instructions, program code, or some data, etc. The memory 604 can be located inside or outside the electronic device 600, without limitation. The processor 601 is used to execute the instructions stored in the memory 604 to implement the methods provided in the above embodiments of this application.

[0171] In one example, processor 601 may include one or more CPUs, for example Figure 11 CPU0 and CPU1 in the CPU.

[0172] As an optional implementation, the electronic device 600 includes multiple processors, for example, besides Figure 11 In addition to processor 601, it may also include processor 607.

[0173] As an optional implementation, the electronic device 600 also includes an output device 605 and an input device 606. For example, the input device 606 is a device such as a keyboard, mouse, microphone, or joystick, and the output device 605 is a device such as a display screen or speaker.

[0174] It should be noted that electronic device 600 can be a relay device, a chip system, or something else. Figure 11 Devices with similar structures. The chip system can be composed of chips or include chips and other discrete components. Actions, terminology, etc., involved in the various embodiments of this application can be referenced interchangeably without limitation. The message names or parameter names in the messages used for interaction between devices in the embodiments of this application are merely examples; other names can be used in specific implementations without limitation. Furthermore, Figure 11 The structural composition shown does not constitute a limitation on the electronic device 600, except... Figure 11 In addition to the components shown, the electronic device 600 may include more than Figure 11 This may indicate more or fewer components, or a combination of certain components, or a different arrangement of components.

[0175] The processor and transceiver described in the present application can be implemented on an integrated circuit (IC), an analog IC, a radio frequency integrated circuit, a mixed signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), nMetal-oxide-semiconductor (NMOS), positive channel metal oxide semiconductor (PMOS), Bipolar Junction Transistor (BJT), BiCMOS, silicon germanium (SiGe), gallium arsenide (GaAs), etc.

[0176] As another implementation manner, Figure 10 The transceiver module 501 in the data transmission apparatus 500 can be replaced by a transceiver 602, which can integrate the functions of the transceiver module 501; the processing module 502 can be replaced by a processor 607, which can integrate the functions of the processing module 502. Further, Figure 11 The data transmission apparatus 500 can also include a memory (not shown in the figure). When the transceiver module 501 is replaced by the transceiver 602, and the processing module 502 is replaced by the processor 607, the data transmission apparatus 500 related to the embodiments of the present application can be an electronic device 600 as shown in the figure. Figure 10 Figure 11

[0177] Figure 12 Another structure of a data transmission apparatus provided by the embodiments of the present application is shown in the figure. The data transmission apparatus can be applied to the scenarios shown in the method embodiments. For ease of illustration, Figure 12 Only the main components of the data transmission apparatus are shown, including a processor, a memory, a control circuit, and an input and output device. The processor is mainly used for processing communication protocols and communication data, executing software programs, and processing data of the software programs. The memory is mainly used for storing software programs and data. The control circuit is mainly used for power supply and transmission of various electrical signals. The input and output device is mainly used for receiving user input data and outputting data to the user.

[0178] ​​When the data transmission device is a CPE, the control circuit is a mainboard, the memory includes a hard disk, a RAM, a ROM and other media with storage functions, the processor can include a baseband processor and a central processing unit, the baseband processor is mainly used for processing a communication protocol and communication data, the central processing unit is mainly used for controlling the whole CPE, executing a software program, processing data of the software program, and the input and output device includes a display screen, a keyboard and a mouse and the like; the control circuit can further include or be connected with a transceiver circuit or a transceiver, such as a network interface, for transmitting or receiving data or signals, such as data transmission and communication with other devices. Further, an antenna can also be included for the transceiving of wireless signals, for data / signal transmission with other devices.

[0179] According to the method provided in the embodiments of the present application, the present application also provides a computer program product, which comprises computer program codes, and when the computer program codes are run on a computer, the computer is caused to execute the method according to any of the embodiments of the present application.

[0180] The embodiments of the present application also provide a computer readable storage medium. All or part of the processes of the above method embodiments can be executed by a computer or an information processing device to control relevant hardware to complete the computer program or instructions, which can be stored in the computer readable storage medium. When executed, the computer program or the set of instructions can include the processes of the above method embodiments. The computer readable storage medium can be an internal storage unit of the CPE, such as a hard disk or a memory of the CPE. The computer readable storage medium can also be an external storage device of the CPE, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card and the like. Further, the computer readable storage medium can include both the internal storage unit and the external storage device of the CPE. The computer readable storage medium is used to store the computer program or instructions and other programs and data required by the CPE. The computer readable storage medium can also be used to temporarily store data that has been output or will be output.

[0181] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0182] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0183] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0184] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0185] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.

[0186] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of software products. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, and various program code storage media.

[0187] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A data transmission method, characterized by, The method is applied to a customer terminal equipment (CPE) including a modem (Modem) and an application processor (AP), and the method comprises: acquiring a data frame by the AP; when a forwarding rule corresponding to a data flow in which the data frame is located exists in a forwarding table item of the AP, transmitting the data frame based on the forwarding rule corresponding to the data frame by the AP, the forwarding rule comprising routing information and / or network address translation (NAT) information, and the forwarding table item being used to record a correspondence between a data flow and a forwarding rule; when the forwarding rule corresponding to the data flow in which the data frame is located does not exist in the forwarding table item, determining whether the data frame satisfies a second fast forwarding condition, the second fast forwarding condition comprising that traffic of the data flow in which the data frame is located is greater than a third traffic threshold and / or the data flow in which the data frame is located is not disconnected; when the data frame satisfies the second fast forwarding condition, adding a fast forwarding identifier in the data frame or modifying a fast forwarding identifier already added in the data frame, so that the fast forwarding identifier added indicates that the data frame satisfies the second fast forwarding condition, performing forwarding processing on the data frame by a kernel protocol stack of the AP, and controlling a fast forwarding channel to be in an open state, the fast forwarding channel being a channel arranged in the AP; when the data frame does not satisfy the second fast forwarding condition, performing forwarding processing on the data frame by the kernel protocol stack of the AP, and controlling the fast forwarding channel to be in a closed state; the forwarding processing comprises marking the forwarding rule, and adding a correspondence between the data flow in which the data frame is located and the forwarding rule in the forwarding table item based on the forwarding rule marked in the data frame by the AP.

2. The method of claim 1, wherein, when the forwarding rule corresponding to the data flow in which the data frame is located exists in the forwarding table item of the AP, transmitting the data frame based on the forwarding rule corresponding to the data frame by the AP, the forwarding rule comprising routing information and / or network address translation (NAT) information, and the forwarding table item being used to record a correspondence between a data flow and a forwarding rule; when the forwarding rule corresponding to the data flow in which the data frame is located exists in the forwarding table item and traffic of the data flow in which the data frame is located is greater than a traffic threshold, transmitting the data frame based on the forwarding rule corresponding to the data frame.

3. The method according to claim 1 or 2, characterized in that, when the forwarding rule corresponding to the data flow in which the data frame is located exists in the forwarding table item of the AP, transmitting the data frame based on the forwarding rule corresponding to the data frame by the AP, the forwarding rule comprising routing information and / or network address translation (NAT) information, and the forwarding table item being used to record a correspondence between a data flow and a forwarding rule; when the forwarding rule corresponding to the data flow in which the data frame is located exists in the forwarding table item and the data frame does not belong to the first n packets in the data flow, transmitting the data frame based on the forwarding rule corresponding to the data frame, n>1.

4. The method according to claim 1 or 2, characterized in that, The method is applied to a central processing unit (CPU) of the AP, the CPU comprising a plurality of CPU cores, and each CPU core of the plurality of CPU cores corresponds to at least one data flow identifier; acquiring the data frame by a CPU core corresponding to a data flow identifier of the data frame. ​ The method is applied to a central processing unit (CPU) of the AP, the CPU includes a plurality of CPU cores, each of the plurality of CPU cores corresponds to at least one data flow identifier; The method is applied to a central processing unit (CPU) of the AP, the CPU includes a plurality of CPU cores, each of the plurality of CPU cores corresponds to at least one data flow identifier; 5. The method of claim 1, wherein, The method is applied to a central processing unit (CPU) of the AP, the CPU includes a plurality of CPU cores, each of the plurality of CPU cores corresponds to at least one data flow identifier; The method is applied to a central processing unit (CPU) of the AP, the CPU includes a plurality of CPU cores, each of the plurality of CPU cores corresponds to at least one data flow identifier; When the data frame obtained by the AP is from a Modem, the method further includes:

6. The method of any one of claims 1, 2, 5, wherein, Combining a plurality of data frames by the Modem to obtain a packet; Sending the packet to the AP by the Modem; Disassembling the packet by the AP to obtain a plurality of data frames. Before combining a plurality of data frames by the Modem to obtain a packet, the method further includes:

7. The method of claim 6, wherein, Compressing a plurality of data frames by the Modem respectively; After disassembling the packet by the AP to obtain a plurality of data frames, the method further includes: Decompressing a plurality of data frames obtained by the AP respectively. The method of combining a plurality of data frames by the Modem includes:

8. The method of claim 6, wherein, Obtaining a packet message format, the packet message format includes a packet length and / or an offset; Adding a packet message in the data frame based on the packet message format; The method of disassembling the packet by the AP includes: Obtaining the packet message format; Determining the packet message of the data frame in the packet based on the packet message format; Disassembling the data frame from the packet by using the packet message of the data frame. It includes:

9. A data transmission apparatus, characterized by comprising: One or more processors; Memory for storing one or more computer programs or instructions; When the one or more computer programs or instructions are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 8. It includes:

10. A chip system, characterized by A processor and an interface; The processor is configured to or configured to implement the method of any one of claims 1 to 8 through the interface. It includes computer programs or instructions, which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 8.

11. A computer readable storage medium, characterized in that, ​ 12. A data transmission system, characterized by The data transmission system comprises a network device, a terminal device and the data transmission device as claimed in claim 9, the data transmission device is in communication connection with the network device and the terminal device, and the network device or the terminal device is used for sending a data frame to the data transmission device.

Citation Information

Patent Citations

  • Electronic device and METHOD AND APPARATUS FOR COMMUNICATION

    CN108494890A