A data packet transmission method, apparatus, electronic device and storage medium
By defining a data structure in the Cat1 application and finding the target node within it to transmit data packets, the problem of TFT matching delay increasing with the number of packet filters was solved, resulting in faster data transmission and improved product competitiveness.
Patent Information
- Application Number
- CN202211242359.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-11
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-10-11
AI Technical Summary
When matching TFTs on EPS carriers, the increase in the number of packet filters leads to a decrease in data transmission rate. Especially in Cat1 applications where high transmission rate is required, existing technologies have failed to effectively solve the problem that the delay during TFT matching increases with the increase in the number of packet filters.
By pre-defining a data structure containing the identification information and service standard nodes of the data packets, the target node can be directly searched in the data structure and the data packets can be transmitted according to its service standard, avoiding TFT matching every time. When the target node is not found, TFT matching is used to update the data structure, thus controlling the real-time performance of node information.
Without violating the 3GPP protocol, the TFT matching latency is significantly reduced and kept within a small range, thereby improving the product competitiveness of the data packet transmission method, especially in Cat1 applications where latency is reduced by more than 50%.
Smart Images

Figure CN115801903B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and particularly to a data packet transmission method, apparatus, electronic device, and storage medium. Background Technology
[0002] A TFT (Traffic Flow Template, also known as a packet filter set) is a collection of packet filters associated with an EPS (Evolved Packet System) bearer. It is divided into Uplink TFTs (UL TFTs) and Downlink TFTs (DL TFTs). UL TFTs are a set of uplink packet filters, and DL TFTs are a set of downlink packet filters. Each dedicated bearer is associated with one TFT.
[0003] The UE (User Equipment) maps uplink data to the bearer associated with the TFT for transmission via the UL TFT, while the P-GW maps downlink data to the bearer associated with the TFT for transmission via the DL TFT. When a UE requests a PDN (Public Data Network) connection, the network side allocates bearers to the PDN. When a packet filter is assigned to the PDN, the UE needs to maintain a TFT table for that PDN. If the PDN is assigned a large number of packet filters, the TFT table will grow larger. If uplink data arrives at this time, each packet filter in the TFT needs to be traversed according to the priority of the packet filters until a matching packet filter is found. This has a significant impact on the data transmission rate. The more packet filters there are, the longer the average TFT matching time will be, affecting the data transmission rate. Compared to NB-IoT (Narrow Band Internet of Things), Cat1 has higher requirements for data transmission rate. Summary of the Invention
[0004] The purpose of this invention is to provide a data packet transmission method, apparatus, electronic device, and storage medium, which, without violating the 3GPP protocol, ensures that the latency of TFT matching does not increase with the increase of the number of packet filters, thereby significantly improving the competitiveness of products using this data packet transmission method.
[0005] To address the aforementioned technical problems, embodiments of the present invention provide a data packet transmission method, comprising: pre-defining a data structure, wherein the data structure contains at least one node, and each node includes identification information of a data packet and a corresponding service standard; upon detecting a data packet to be transmitted, traversing the nodes in the data structure, and searching for a target node in the data structure that meets preset conditions, wherein the preset conditions include: the identification information of the data packet in the node is the same as the identification information of the data packet to be transmitted; and, if the target node is found, transmitting the data packet to be transmitted according to the service standard corresponding to the target node.
[0006] Embodiments of the present invention also provide a data packet transmission device, comprising: a definition module for pre-defining a data structure, wherein the data structure contains at least one node, and each node includes identification information of a data packet and a corresponding service standard; a search module for traversing the nodes in the data structure and searching for a target node in the data structure that meets preset conditions when a data packet to be transmitted is detected, wherein the preset conditions include: the data packet identification information in the node is the same as the identification information of the data packet to be transmitted; and a transmission module for transmitting the data packet to be transmitted according to the service standard corresponding to the target node when the target node is found.
[0007] Embodiments of the present invention also provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described data packet transmission method.
[0008] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described data packet transmission method.
[0009] In this embodiment of the invention, the data packet transmission method maintains a data structure in which each node contains the identifier information of the data packet and the corresponding service standard. When transmitting a data packet, the service standard corresponding to the data packet to be transmitted can be directly searched in the data structure based on the identifier information, without needing to perform matching in the TFT every time. This embodiment of the invention can more quickly obtain the service standard that the data packet to be transmitted should use. This embodiment of the invention, without violating the 3GPP (3rd Generation Partnership Project) protocol, ensures that the TFT matching latency does not increase with the number of packet filters, and can be kept within a small range, significantly improving the competitiveness of products using this data packet transmission method.
[0010] In addition, the corresponding service standards include: the QoS corresponding to the bearer allocated by the network side; before traversing the nodes in the data structure, counting the number of packet filters; if the number of packet filters is zero, the QoS corresponding to the default bearer is used to transmit the data packet to be transmitted. When the number of packet filters is zero, it means that no dedicated bearer has been allocated by the network side, and the data packets are all transmitted by the QoS corresponding to the default bearer; at this time, the number of packet filters can be counted, and when the number of packet filters is zero, the QoS corresponding to the default bearer can be used directly to transmit the data packet to be transmitted; this avoids the process of decoding the data packet to be transmitted, thus saving data packet transmission time. The purpose of this process is to decode the data packet to be transmitted to obtain identification information, and then compare or perform TFT matching between the identification information of the data packet to be transmitted and the data packet identification information in the data structure node.
[0011] Furthermore, if the target node is not found, a corresponding service standard is matched for the data packet to be transmitted via TFT; the data packet is transmitted according to the matched service standard; and the identification information of the data packet to be transmitted and the matched service standard are added as the target node to the data structure. When there is no node information corresponding to the identification information of the current data packet to be transmitted in the data structure, a corresponding service standard can be matched for the current data packet to be transmitted via TFT, and the data packet can be transmitted according to the matched service standard. The identification information of the current data packet to be transmitted and the matched service standard are added as the target node information to the data structure to update the nodes in the data structure in real time, facilitating the search for the corresponding service standard in the data structure when transmitting data packets with the same identification information in the future.
[0012] Furthermore, adding the identification information of the data packet to be transmitted and the corresponding service standard obtained through matching as the target node to the data structure includes: using the identification information of the data packet to be transmitted and the corresponding service standard obtained through matching as the target node; adding the target node to the beginning of the data structure and extending other nodes in the data structure sequentially; and deleting the node at the end of the data structure when the data structure exceeds a preset length. Adding a node containing new information to the beginning of the data structure allows for faster matching of nodes containing this identification information when transmitting data packets with the same identification information in the next transmission. Simultaneously, setting a preset length for the data structure allows the time for traversing the data structure to be controlled within a relatively ideal range, maintaining the real-time nature of the node information in the data structure.
[0013] Furthermore, the preset length is adjusted based on the number of services in the actual application scenario. The preset length of the data structure, that is, the number of nodes in the data structure, can be adjusted according to the amount of services used by the terminal devices in the actual application scenario; when the number of services used by the terminal devices in the actual application scenario is usually large, the number of nodes in the data structure can be increased, and vice versa. Adjusting the number of nodes in the data structure can adapt to changes in the actual application scenario and improve the applicability of the product.
[0014] In addition, after transmitting the data packet to be transmitted according to the service standard corresponding to the target node, the method further includes: moving the target node to the beginning of the data structure. During data transmission, when the identification information of the most recently transmitted data packet is the same as that of a data packet from a previous transmission, moving the node used in the most recent transmission to the beginning of the data structure during each data transmission allows the corresponding service standard to be found earlier in the next traversal, saving data transmission latency.
[0015] In addition, each node in the data structure also includes: a timestamp; after moving or adding the target node to the beginning of the data structure, the timestamp of the first node of the data structure is updated; during the traversal of the nodes in the data structure, the difference between the current timestamp and the timestamp of the currently traversed node in the data structure is obtained; if the difference is greater than a preset threshold, and the identification information of the data packet in the currently traversed node is different from the identification information of the data packet to be transmitted, the traversed node in the data structure is deleted. By adding timestamps to the node information of the data structure, node information that has not been used within a preset threshold time can be identified, that is, nodes that have not been used for a long time can be identified. After a node is identified as having not been used for a long time, this node is deleted, and only the nodes storing the identification information of recently transmitted data packets are retained, so as to maintain the real-time nature of the node information in the data structure, reduce the number of traversal searches in the data structure before transmitting data packets, and reduce data transmission latency. Attached Figure Description
[0016] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0017] Figure 1 This is a diagram illustrating the development and application of Internet of Things (IoT) technology.
[0018] Figure 2 This is a diagram of the air interface control plane protocol stack architecture;
[0019] Figure 3 This is a flowchart of a data transmission method according to an embodiment of the present invention;
[0020] Figure 4 This is a default bearer context activation interaction graph in one embodiment of the present invention;
[0021] Figure 5 This is a dedicated bearer context activation interaction graph in one embodiment of the present invention;
[0022] Figure 6 This is a TFT cell format diagram according to one embodiment of the present invention;
[0023] Figure 7 This is a diagram of the packet filter list format according to one embodiment of the present invention;
[0024] Figure 8 This is a diagram showing the relationship between the carrier and the filter in one embodiment of the present invention;
[0025] Figure 9 This is a schematic diagram of the data packet transmission device according to another embodiment of the present invention;
[0026] Figure 10 This is a schematic diagram of the structure of an electronic device according to another embodiment of the present invention. Detailed Implementation
[0027] LTE-Cat (LTE UE-Category, full name of Cat.X; LTE, Long Term Evolution, refers to 4G LTE networks; UE refers to User Equipment; Category translates to grade) defines the transmission rate levels that user equipment can support in a 4G LTE network, and can also be considered a technical standard for 4G network speed. According to the 3GPPrease (3rd Generation Partnership Project) definition, UE-Category is divided into 10 grades; the higher the grade, the higher the speed of the user terminal equipment. LTE-Cat affects the upper limit of 4G LTE uplink and downlink network speeds; simply put, it represents the maximum upload and download speeds that a user equipment can achieve.
[0028] The technical standards for 4G networks are shown in the table below:
[0029] UE Category Maximum download speed (Mbps) Maximum upload speed (Mbps) Cat.1 10 5 Cat.2 50 25 Cat.3 100 50 Cat.4 150 50 Cat.5 300 75 Cat.6 300 50 Cat.7 300 150 Cat.8 1200 600
[0030] Cat.1 is based on existing LTE networks and can fully reuse existing LTE resources without requiring additional investment. Moreover, Cat.1 chips and modules are more mature and very inexpensive, enabling economies of scale to be achieved in a short period of time.
[0031] With the accelerated decommissioning of 2G / 3G networks, operators are actively guiding industry users to adopt NB-IoT and Cat.1 terminal modules, which is one of the reasons for the increasing popularity of Cat.1. It offers better network coverage, faster speeds, and lower latency than NB-IoT, while also boasting lower costs and lower power consumption than Cat.4.
[0032] Cat.1 targets the broad IoT market, enabling lower-power, lower-cost IoT devices to connect to LTE networks. Support for lower categories is crucial for IoT applications such as wearables, smart homes, and smart meters.
[0033] 1. Development of Cat.1
[0034] Cat.1 was defined in 3GPP Release 8 as early as 2009. However, the development of Cat.1 was lukewarm and sat on the sidelines for ten years. In early 2020, it suddenly became popular and ushered in a golden age of development.
[0035] With the continuous development of the Internet of Things (IoT), the demand for low- and medium-speed business applications has been greatly activated, such as wearable devices, POS (point-of-sale) services, the sharing economy, and logistics tracking. These scenarios place higher demands on real-time performance, transmission speed, and latency. Against this backdrop, Cat.1, keeping pace with the times, has made a high-profile "second debut" after a decade.
[0036] The rapid development of Cat.1 after its resurgence is inseparable from the combined support from three aspects: policy, network, and market.
[0037] At the policy level, in May 2020, the General Office of the Ministry of Industry and Information Technology issued the "Notice on Deepening the Comprehensive Development of Mobile Internet of Things," which clearly stated that NB-IoT and Cat.1 should work together to take over 2G / 3G IoT connections to improve spectrum utilization efficiency. While ensuring the network service level of existing IoT terminals, it also guided new IoT terminals to no longer use 2G / 3G networks, and promoted the migration of existing 2G / 3G IoT services to NB-IoT / 4G (including Cat.1) / 5G networks.
[0038] At the network level, on the one hand, the three major domestic operators have reached a consensus that the retirement of 2G networks is inevitable; on the other hand, LTE networks and low-to-medium speed IoT applications are mutually reinforcing each other. Under these dual effects, the development of LTE (Cat.1) networks is progressing rapidly. It is understood that in 2021, the total number of mobile communication base stations nationwide reached 9.96 million, of which 5.9 million were 4G base stations, accounting for nearly 60%. From the current development perspective, this LTE network has achieved full coverage and is sufficiently mature, and the LTE network will exist for a long time, which makes the promotion of the Cat.1 industry very smooth, without requiring further investment in infrastructure.
[0039] At the market level, edge-side costs continue to decline. Cost is an unavoidable topic across all fields and industries. Taking Cat.1 modules as an example, initially they were mainly based on Qualcomm chips, costing over 100 yuan. Until 2019, after ASR and Unisoc released their chip products, the module cost dropped to 60-70 yuan, and currently, the market price of Cat.1 modules is generally between 40-50 yuan. In the future, with the entry of new chip players, the cost of Cat.1 modules can be further reduced.
[0040] The retirement of 2G networks is an irreversible trend, and the market will be filled by NB-IoT and Cat.1 after the retirement.
[0041] In terms of NB-IoT, it is mainly used in application scenarios with low data rate, low power consumption and high cost requirements. Typical application areas include smart meter reading, smart smoke detectors, smart manhole covers and smart parking.
[0042] Cat.1 devices, due to their good mobility, voice call capabilities, and high transmission speeds, will have a wider range of applications, such as POS machines, GPS trackers, children's watches, two-wheeled (electric) vehicles, in-vehicle T-Boxes (Telematics Boxes), and video surveillance. Figure 1 The diagram shown illustrates the development and application of Internet of Things (IoT) technology.
[0043] In summary, strong policy support, comprehensive LTE network coverage and direct migration capabilities, and market demand for low-priced terminals have propelled the development of the Cat.1 industry onto a fast track.
[0044] 2. Main characteristics of Cat.1 technology
[0045] (1) LTE Cat.1 network capabilities
[0046] Transmission rate: Under LTE network, the terminal can achieve a maximum downlink peak rate of 10Mbps and an uplink peak rate of 5Mbps, as detailed below:
[0047] In LTE Cat.1 FDD (Frequency Division Duplexing) mode, the terminal can achieve a downlink peak rate of over 9Mbps and an uplink peak rate of over 4.5Mbps.
[0048] LTE Cat.1 in TD-LTE mode:
[0049] When the network uses UL:2 / DL:2 and special subframes are configured in a 10:2:2 ratio, the terminal should achieve a measured downlink peak rate of at least 5 Mbps and a measured uplink peak rate of at least 1.7 Mbps.
[0050] When the network uses UL:1 / DL:3 and special subframes are configured in a 10:2:2 ratio, the terminal should achieve a measured downlink peak rate of at least 7 Mbps and a measured uplink peak rate of at least 0.8 Mbps.
[0051] (2) Characteristics of LTE Cat.1 wireless air interface
[0052] The air interface channels supported by LTE Cat.1 are shown in the table below:
[0053]
[0054] The system bandwidths supported by LTE Cat.1 are shown in the table below:
[0055]
[0056] The operating frequency bands for LTE Cat.1 are shown in the table below:
[0057]
[0058] LTE Cat.1 also supports downlink OFDMA (Orthogonal Frequency Division Multiple Access) and uplink SC-FDMA (Single-carrier Frequency-Division Multiple Access) transmission, supports 15kHz subcarrier spacing, Normal CP (Normal Cyclic Prefix), and Extended CP (Extended Cyclic Prefix).
[0059] (3) Other advantages of LTE Cat.1
[0060] Extensive coverage: Expanding coverage of indoor and underground or semi-underground locations (such as underground pipes, basements or other remote areas).
[0061] Enhanced security and reliability: LTE-M (Long Term Evolution-Machine-to-Machine) network is secure and reliable, operates on licensed spectrum, and comes with carrier-grade security.
[0062] Long battery life: The LTE-M system is very power-efficient, improving battery life by 10 times, and requires no external power source.
[0063] Low cost: Lower module and call costs make it easy to produce and expand IoT devices that support LTE-M.
[0064] Future development: LTE-M is a standard set by 3GPP, therefore it has all the reliability and continuity of 4G networks and subsequent 5G.
[0065] Wide range of applications: LTE-M has very low latency (<100ms) and supports two-way communication, making it suitable for both stationary and mobile use cases.
[0066] 3. LTE Air Interface Control Plane Protocol Stack
[0067] LTE defines the air interface control plane protocol stack architecture, such as... Figure 2 As shown. Wherein:
[0068] (1) PHY (Physical): Provides reliable bit rate transmission between two physical entities and adapts to the transmission medium. In the wireless air interface, it adapts to the wireless environment; in the terrestrial interface, it adapts to transmission media such as E1, network cable, and fiber optic.
[0069] (2) MAC (Media Access Control): Responsible for handling HARQ (Hybrid Automatic Repeat Request) and uplink / downlink scheduling.
[0070] (3) RLC (Radio Link Control): At the transmitting end, it provides data packet segmentation and concatenation; at the receiving end, it provides three modes: transparent, acknowledged, and unacknowledged. The RLC layer also performs reordering and retransmission of RLC PDU (Protocol Data Unit).
[0071] (4) PDCP (Packet Data Convergence Protocol): ROHC (Robust Header Compression), AS (Access Stratum) security (including encryption and integrity verification), packet reordering and retransmission.
[0072] (5) RRC (Radio Resource Control): Supports the transmission of NAS (Non-access Stratum) signaling and also provides management of radio resources. It broadcasts system messages, such as MIB (Master Information Block), SIB1 (System Information Block), SIB2, etc.; establishes, re-establishes, reconfigures, and releases RRC connections; and establishes, modifies, and releases RB (Radio Bearer).
[0073] (6) NAS (Non-Access Layer): Provides mobility management and bearer management.
[0074] 4. The process of activating the carrier
[0075] Bearer activation is a function of the NAS sublayer ESM (EPS Session Management). It is divided into activating the default bearer and activating a dedicated bearer.
[0076] like Figure 4 As shown, the default bearer context activation procedure is to establish a default EPS bearer context between the UE and the EPC (Evolved Packet Core). This procedure is initiated by the network side as a response to the UE message---PDN connection request.
[0077] This process can be part of the attach procedure. The MME (Mobility Management Entity) sends the ACTIVATE DEFAULT EPS BEARER CONTEXT REQUEST and ATTACH ACCEPT messages to the UE. If the attach procedure fails, the UE should assume the default bearer activation procedure has also failed. In this procedure, the default bearer context has no allocated TFTs and uses a fully matched packet filter accordingly. The network side can allocate a TFT to the default bearer at any time after its establishment and modify the TFT packet filter of the default bearer at subsequent times.
[0078] like Figure 5 As shown, the dedicated bearer context activation procedure establishes a specific QoS (Quality of Service) and TFT EPS bearer context between the UE and EPC. This procedure is initiated by the network side, but can be requested or triggered by the UE through certain procedures, such as the UE request bearer resource allocation procedure or the UE request bearer resource modification procedure. This procedure can occur independently, or it can be part of the attach procedure or the default EPS bearer context activation procedure accompanying a separate PDN connection procedure. If the attach procedure fails or the default EPS bearer context activation procedure fails, the UE should assume that the dedicated EPS bearer activation procedure has also failed.
[0079] 5. TFT Classification
[0080] TFTs can be classified into the following 13 categories of filter media:
[0081] IPv4 remote address type (0x10): IPv4 remote address + subnet mask;
[0082] IPv4 local address type (0x11): IPv4 local address + subnet mask;
[0083] IPv6 remote address type (0x20): IPv6 remote address + subnet mask;
[0084] IPv6 remote address / prefix length type (0x21): IPv6 remote address + address prefix length;
[0085] IPv6 local address / prefix length type (0x23): IPv6 local address + address prefix length;
[0086] Protocol identifier / Next header type (0x30): Transport layer protocol ID, such as TCP, UDP;
[0087] Single local port type (0x40): Local port;
[0088] Local port range type (0x41): Local port range;
[0089] Single remote port type (0x50): Remote port;
[0090] Remote port range type(0x51): Remote port range;
[0091] Security parameter index type (0x60): SPI, only Protocol identifier / Nextheader type is ESP;
[0092] Type of service / Traffic class type(0x70):Tos;
[0093] Flow label type (0x80): Flow label, IPv6 only;
[0094] Each packet filter has a unique priority; the higher the priority, the earlier the packet is matched.
[0095] 6. TFT Allocation
[0096] Activating the default bearer request does not allocate a TFT; TFT allocation for the default bearer is handled by the modify bearer request. Because the modify bearer request is not mandatory, the default bearer may or may not be allocated a TFT. For a default bearer that is not allocated a TFT, all packets satisfy the filtering conditions.
[0097] Activating a proprietary bearer requires allocating TFTs, and the TFTs of a proprietary bearer can be modified by a modify bearer request. If a modify bearer request deletes all TFTs of a proprietary bearer, then that proprietary bearer should be deactivated.
[0098] Among them, the TFT cell format is as follows Figure 6 As shown, the TFT cell identifier is Traffic flow template IEI; the cell length is Length of traffic flow template IETFT; the TFT operation code includes adding, modifying, replacing, and deleting; whether it contains parameter lists is E bit; the number of packet filters is Number of packet filters; the packet filter list is Packet filter list; and the parameter list is Parameterslist.
[0099] When the TFT operation code is added, modified, or replaced, the purpose of allocating TFTs can be achieved. At this time, the packet filter list format is as follows: Figure 7 As shown: Packer filter direction; Packer filter identifier; Packer filter evaluation precedence; Length of Packet filter contents; Packet filter contents; Spare. Octet represents 8 bits.
[0100] 7. TFT Matching
[0101] When a UE requests a PDN connection, the network side allocates a default bearer. There is one and only one default bearer for that PDN. Simultaneously, the network side may allocate multiple dedicated bearers. Each dedicated bearer corresponds to one QoS and at least one packet filter, and each packet filter has a priority different from the other packet filters. The relationship between PDN, bearer, and packet filter is as follows: Figure 8 As shown.
[0102] When an uplink data packet needs to be sent, it is matched against the packet's identification information according to the priority of each packet filter. If the packet's identification information matches the rules of the packet filter, the data is mapped to the QoS of the bearer to which the packet filter belongs. If it does not match, it is matched against the next packet filter until a match is found. If all packet filters have been matched and no matching packet filter is found, the packet is mapped to the QoS of the default bearer.
[0103] On a certain device, 1000 data packets are randomly sent, and each data packet satisfies the rules of one of the packet filters. Calculate the TFT matching time for cases with 6, 12, 18, and 24 packet filters respectively. The statistics are as follows:
[0104] Packet filter quantity TFT matching time 6 0.1600us 12 0.2401us 18 0.3010us 24 0.3716us
[0105] Statistically, the more filter packs there are, the longer the average TFT matching time will be.
[0106] Since Cat1 has high requirements for data transmission rate, the present invention reduces data transmission latency through the following implementation method, so that the latency of TFT matching does not increase with the increase of the number of packet filters, and can be kept within a small range. In typical application scenarios, the latency can be reduced by more than 50%, which significantly improves the competitiveness of products using this data packet transmission method.
[0107] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details are presented in the various embodiments of the present invention to facilitate a better understanding of this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for ease of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with and referenced by each other without contradiction.
[0108] The first embodiment of the present invention relates to a data packet transmission method, which can be applied in data transmission devices, such as terminal devices.
[0109] In this embodiment, a data packet transmission method is provided, comprising: pre-defining a data structure, wherein the data structure contains at least one node, and each node includes identification information of a data packet and a corresponding service standard; upon detecting a data packet to be transmitted, traversing the nodes in the data structure, and searching for a target node in the data structure that meets preset conditions, wherein the preset conditions include: the identification information of the data packet in the node is the same as the identification information of the data packet to be transmitted; and, if the target node is found, transmitting the data packet to be transmitted according to the service standard corresponding to the target node. This embodiment of the present invention can, without violating the 3GPP protocol, ensure that the latency of TFT matching does not increase with the increase of the number of packet filters, and can be kept within a small range, significantly improving the competitiveness of products using this data packet transmission method.
[0110] The implementation details of the data packet transmission method in this embodiment are described below. The following content is only for the convenience of understanding and is not necessary for implementing this solution.
[0111] like Figure 3 As shown, in step S101, a data structure is predefined, which contains at least one node. Each node includes the identification information of the data packet and the corresponding service standard.
[0112] In one example, the data transmission device needs to predefine a data structure, which contains at least one node, and this data structure can be an array, a linked list, etc. When this data structure is a linked list, the information of each node in the linked list includes the identification information of the data packet and the corresponding service standard; when this data structure is an array, this array can be a multi-dimensional array.
[0113] In step S102, when a data packet to be transmitted is detected, the nodes in the data structure are traversed, and a target node that meets a preset condition is searched in the data structure. The preset condition includes: the identification information of the data packet in the node is the same as the identification information of the data packet to be transmitted.
[0114] In one example, when the data transmission device detects that a data packet needs to be transmitted, it extracts the identification information from the data packet and searches for the target node in the data structure based on the preset condition that the identification information of the data packet in the node is the same as the identification information of the data packet to be transmitted.
[0115] Furthermore, the aforementioned service standards include: the QoS corresponding to the bearer allocated by the network side.
[0116] In one example, before step S102, the number of data packet filters can be counted; if the number of data packet filters is zero, the data packet to be transmitted is transmitted using the QoS corresponding to the default bearer.
[0117] When the packet filter is zero, it means that no dedicated bearer has been allocated on the network side, and the packets are transmitted by the QoS corresponding to the default bearer. At this time, the number of packet filters can be counted, and when the number of packet filters is zero, the QoS corresponding to the default bearer can be used directly to transmit the packets to be transmitted. This avoids the process of decoding the packets to be transmitted. The purpose of this process is to decode the packets to be transmitted to obtain identification information, and then compare the identification information of the packets to be transmitted with the packet identification information in the data structure node or perform TFT matching.
[0118] In step S103, if the target node is found, the data packet to be transmitted is transmitted according to the service standard corresponding to the target node.
[0119] In one example, if the target node is found in the data structure, the data packet to be transmitted is transmitted according to the service standard corresponding to the identification information of the data packet stored in the target node.
[0120] Furthermore, the target node is moved to the beginning of the data structure.
[0121] In one example, during data transmission, the identification information of the most recently transmitted data packet is often the same as that of a data packet from one of the previous transmissions. By moving the node used in the most recently transmitted data packet to the beginning of the data structure during each data transmission, the corresponding service standard can be found earlier in the next traversal, saving data transmission latency.
[0122] Furthermore, if the target node is not found in the data structure, the TFT matches the corresponding service standard for the data packet to be transmitted based on the identification information of the data packet to be transmitted; and transmits the data packet to be transmitted according to the matched service standard; and adds the identification information of the data packet to be transmitted and the matched service standard as information in the target node to the data structure.
[0123] When there is no node information corresponding to the identifier information of the current data packet to be transmitted in the data structure, the corresponding service standard can be matched for the current data packet to be transmitted through TFT. Then, the data packet to be transmitted is transmitted according to the matched service standard. The identifier information of the current data packet to be transmitted and the matched service standard are added to the data structure as information in the target node, so as to update the nodes in the data structure in real time. This makes it convenient to find the service standard corresponding to the same identifier information in the data structure when transmitting data packets with the same identifier information in the next time.
[0124] In one example, the identification information of the data packet to be transmitted and the corresponding service standard obtained by matching are added as target nodes to the beginning of the data structure, and other nodes in the data structure are extended to the end; when the data structure exceeds the preset length, the node at the end of the data structure is deleted.
[0125] By adding nodes containing new information to the beginning of a data structure, the node containing this identification information can be matched more quickly in subsequent transmissions of data packets with the same identification information. Simultaneously, setting a preset length for the data structure allows the time required to traverse the data structure to be controlled within a relatively ideal range, maintaining the real-time nature of the node information within the data structure.
[0126] In one example, the preset length of the data structure can be adjusted according to the number of business operations in the actual application scenario.
[0127] Specifically, in real-world application scenarios, most UE services are relatively simple, rarely involving multiple simultaneous operations like using a computer (e.g., chatting, browsing the web, listening to music, etc.). In such cases, the packet identification information, such as the IP address, port number, and Tos values in the packet IP header, remains largely unchanged. During data transmission, when there's only one node in the data structure, this node contains the identification information and corresponding service standard of the previously transmitted packet. Therefore, each time data is transmitted, the identification information of the currently transmitted packet can be compared with that of the previously transmitted packet. If they match, it's directly mapped to the service standard corresponding to the previously transmitted packet; otherwise, a TFT matching process is performed. Since the packets are mostly identical, the TFT matching process can be skipped for most packets, requiring only a single comparison of the previously transmitted packet's identification information, reducing the time complexity from N to 1 (where N is the number of packet filters).
[0128] Specifically, in real-world application scenarios where the UE performs multiple services simultaneously, such as making a video call, video and voice data may follow two separate service streams, potentially leading to interleaved transmission of video and voice data. In this case, modifying the preset length of the data structure can prevent each data packet's identifier from differing from the previous one, thus avoiding the need for TFT matching in every data transmission. Considering that even in non-single-service scenarios, the number of concurrent services typically does not exceed five, the preset length of the data structure can be 5. This allows the storage of the identifiers and corresponding service standards for the five most recently used data packets. By setting the preset length of the data structure according to the application scenario, the real-time nature of the node information within the data structure is maintained, while the time required to traverse the data structure is kept within an ideal range, achieving the technical effect of reducing data transmission latency.
[0129] Specifically, in real-world application scenarios, during a single service handover by a UE, such as immediately starting to watch a video after finishing a phone call, the following situation can be avoided by moving the node used in the most recent data transmission to the beginning of the data structure: Because the saved data packet identification information and corresponding service standard are from the previous service flow data packet, the identification information of the data packet after the handover differs from the saved information; when transmitting the first data packet of the new service flow, TFT matching must be performed again and the new service flow's data packet identification information and corresponding service standard must be saved; when traversing the data structure, subsequent non-first data packets of the new service flow must first be compared with the saved old service flow's data packet identification information, and then compared with the new service flow's data packet identification information to achieve a successful comparison; in other words, each time, an invalid comparison with the old service flow's data packet identification information is required first.
[0130] In one example, the information of each node in the data structure can also include a timestamp; after moving or adding the target node to the beginning of the data structure, the timestamp of the beginning node of the data structure is updated to the current timestamp; during the traversal of the nodes in the data structure, the difference between the current timestamp and the timestamp of the node currently traversed in the data structure is obtained; if the difference is greater than a preset threshold, and the identification information of the data packet in the currently traversed node is different from the identification information of the data packet to be transmitted, the node in the traversed data structure is deleted.
[0131] By adding timestamps to the node information of a data structure, it is possible to identify nodes that have not been used within a preset threshold time, i.e., to identify nodes that have not been used for a long time. Once a node is identified as having not been used for a long time, it is deleted to maintain the real-time nature of the node information in the data structure, reduce the number of times the data structure is traversed and searched before transmitting data packets, and reduce data packet transmission latency.
[0132] In this embodiment, the data packet transmission method maintains a data structure in which each node contains the identifier of the data packet and the corresponding service standard. When transmitting a data packet, the service standard to be used by the data packet can be directly found in the data structure based on its identifier. The most recently used node is then moved to the beginning of the data structure. This allows for comparison of the current data packet identifier with the identifiers of the previous or most recent transmitted data packets, eliminating the need for matching within the packet filter (TFT). This enables faster retrieval of the service standard for the current data packet. Without violating the 3GPP protocol, the latency of TFT matching does not increase with the number of packet filters and remains within a small range, significantly enhancing the competitiveness of products using this data packet transmission method.
[0133] The steps described above are for clarity only. In practice, they can be combined into one step or some steps can be broken down into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.
[0134] Another embodiment of the present invention relates to a data packet transmission device, such as... Figure 9 As shown, it includes:
[0135] Define module 901, which is used to predefine a data structure. The data structure contains at least one node, and each node includes the identification information of the data packet and the corresponding service standard.
[0136] The lookup module 902 is used to traverse the nodes in the data structure when a data packet to be transmitted is detected, and to find the target node in the data structure that meets the preset conditions. The preset conditions include: the data packet identification information in the node is the same as the identification information of the data packet to be transmitted.
[0137] The transmission module 903 is used to transmit the data packet to be transmitted according to the service standard corresponding to the target node when the target node is found.
[0138] In this embodiment, by maintaining a data structure, each node in this data structure contains the identifier information of the data packet and the corresponding service standard. When transmitting a data packet, the service standard that the data packet to be transmitted should adopt can be directly found in the data structure based on the identifier information of the data packet. The most recently used node is moved to the head of the data structure, so that the identifier information of the current data packet is compared with the identifier information of the previous or recent data packets during data packet transmission, without matching in the TFT. This allows for a faster acquisition of the service standard that the current data packet should adopt. Without violating the 3GPP protocol, the latency of TFT matching does not increase with the number of packet filters, and can be kept within a small range, significantly improving the competitiveness of products using this data packet transmission device.
[0139] It is not difficult to see that this embodiment is a device embodiment corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the above method embodiment. The relevant technical details mentioned in the above method embodiment are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above method embodiment.
[0140] It is worth mentioning that all modules involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by this invention; however, this does not mean that other units are absent from this embodiment.
[0141] Another embodiment of the present invention relates to electronic devices, such as... Figure 10 As shown, it includes at least one processor 1001; and a memory 1002 communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the data packet transmission method as described above.
[0142] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.
[0143] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.
[0144] Another embodiment of the present invention relates to a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the above-described method embodiments.
[0145] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0146] Those skilled in the art will understand that the above embodiments are specific examples of implementing the present invention, and in practical applications, various changes in form and detail may be made without departing from the spirit and scope of the present invention.
Claims
1. A data packet transmission method, characterized in that, The method includes: A predefined data structure is provided, which contains at least one node. Each node includes the identification information of the data packet and the corresponding service standard. When a data packet to be transmitted is detected, the nodes in the data structure are traversed, and a target node that meets the preset conditions is found in the data structure. The preset conditions include: the identification information of the data packet in the node is the same as the identification information of the data packet to be transmitted. If the target node is found, the data packet to be transmitted is transmitted according to the service standard corresponding to the target node; The method further includes: If the target node is not found, the corresponding service standard is matched for the data packet to be transmitted via TFT. The data packet to be transmitted is transmitted according to the corresponding service standard obtained by matching. The identification information of the data packet to be transmitted and the corresponding service standard obtained by matching are added as target nodes to the data structure; The step of adding the identifier information of the data packet to be transmitted and the corresponding service standard obtained by matching as the target node to the data structure includes: The identification information of the data packet to be transmitted and the corresponding service standard obtained by matching are used as the target node; Add the target node to the beginning of the data structure, and move the other nodes in the data structure to the right; When the data structure exceeds the preset length, delete the node at the end of the data structure; Each node in the data structure also includes a timestamp; After moving or adding the target node to the beginning of the data structure, the timestamp of the node at the beginning of the data structure is updated. During the process of traversing the nodes in the data structure, the difference between the current timestamp and the timestamp of the currently traversed node in the data structure is obtained; If the difference is greater than a preset threshold, and the identification information of the data packet in the currently traversed node is different from the identification information of the data packet to be transmitted, then delete the node in the traversed data structure.
2. The method according to claim 1, characterized in that, The corresponding service standards include: QoS corresponding to the bearer allocated by the network side; Before traversing the nodes in the data structure, the number of statistical packet filters is counted. If the number of packet filters is zero, the packet to be transmitted is transmitted using the QoS corresponding to the default bearer.
3. The method according to claim 1, characterized in that, The preset length is adjusted according to the number of services required in the actual application scenario.
4. The method according to claim 1, characterized in that, After transmitting the data packet to be transmitted according to the service standard corresponding to the target node, the method further includes: Move the target node to the beginning of the data structure.
5. A data packet transmission device, characterized in that, The device includes: A definition module is used to predefine a data structure, wherein the data structure contains at least one node, and each node includes the identification information of the data packet and the corresponding service standard; The lookup module is used to traverse the nodes in the data structure when a data packet to be transmitted is detected, and to find a target node in the data structure that meets preset conditions. The preset conditions include: the data packet identification information in the node is the same as the identification information of the data packet to be transmitted. The transmission module is used to transmit the data packet to be transmitted according to the service standard corresponding to the target node when the target node is found; The transmission module is further used for: If the target node is not found, the corresponding service standard is matched for the data packet to be transmitted via TFT. The data packet to be transmitted is transmitted according to the corresponding service standard obtained by matching. The identification information of the data packet to be transmitted and the corresponding service standard obtained by matching are added as target nodes to the data structure; The step of adding the identifier information of the data packet to be transmitted and the corresponding service standard obtained by matching as the target node to the data structure includes: The identification information of the data packet to be transmitted and the corresponding service standard obtained by matching are used as the target node; Add the target node to the beginning of the data structure, and move the other nodes in the data structure to the right; When the data structure exceeds the preset length, delete the node at the end of the data structure; Each node in the data structure also includes a timestamp; After moving or adding the target node to the beginning of the data structure, the timestamp of the node at the beginning of the data structure is updated. During the process of traversing the nodes in the data structure, the difference between the current timestamp and the timestamp of the currently traversed node in the data structure is obtained; If the difference is greater than a preset threshold, and the identification information of the data packet in the currently traversed node is different from the identification information of the data packet to be transmitted, then delete the node in the traversed data structure.
6. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the data packet transmission method as described in any one of claims 1-4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the data packet transmission method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Transport stream template coupling method in LTE system and apparatus thereof
CN102325347A
Evolved packet system (EPS) transmission flow template (TFT) matching method
CN102546378A