A method for mobile communication packet data processing, and an electronic device

By introducing a parallel processing method into the PDCP layer, and utilizing the main thread and worker threads to process data packets in parallel, the high throughput latency problem caused by serial processing in the PDCP layer is solved, achieving low latency and efficient data processing.

CN117793795BActive Publication Date: 2026-11-20NANJING INFORMATION HIGH-SPEED RAILWAY RES INST OF SCI AND TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311831464.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2026-11-20
Estimated Expiration
2043-12-27

AI Technical Summary

Technical Problem

The serial processing method of the PDCP layer in the 4G and 5G protocol stacks results in large service latency in high-throughput scenarios, which cannot meet the low-latency requirements.

Method used

A parallel processing approach is adopted, which involves creating a PDCP main thread and multiple worker threads, and utilizing lock-free circular queues and CPU affinity settings to achieve parallel processing and distribution of data packets. This includes data encryption, integrity protection, and header compression being executed in parallel in different threads.

Benefits of technology

It effectively reduced overall business latency, ensured the consistency of the processed data packet order, and improved the efficiency and throughput of packet data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117793795B_ABST
    Figure CN117793795B_ABST
Patent Text Reader

Abstract

The application relates to the field of mobile communication, in particular to a mobile communication packet data processing method and electronic equipment. The method comprises the following steps: creating a PDCP main thread and a worker thread; the PDCP main thread reads a to-be-processed data packet from a data source layer; the PDCP main thread pre-processes the to-be-processed data packet to obtain control information; the PDCP main thread applies for allocating a new memory block; the PDCP main thread sends the control information, the memory address of the to-be-processed data packet and the address of the new memory block to the worker thread, and simultaneously transmits the address of the new memory block to a data receiving layer; the PDCP main thread continuously executes the above operation on the to-be-processed data packet in sequence; and the worker thread processes the to-be-processed data packet and writes the processed data packet into the corresponding new memory block. The application can effectively reduce the overall service delay while ensuring that the processed data packet is continuous.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile communications, and more specifically to a method and electronic device for processing mobile communication packet data. Background Technology

[0002] The 4G and 5G protocol stacks mainly include the RRC layer, PDCP layer, RLC layer, MAC layer, and PHY layer. The PCDP layer is responsible for encryption / decryption, header compression / decompression, and integrity protection of control plane and data plane data. Traditionally, the PDCP layer service module performs encryption / decryption, header compression / decompression, and integrity protection processing on each data packet sequentially according to the encryption / decryption algorithm, header compression configuration, and integrity protection configuration. This serial processing method can meet service requirements when the service throughput is low, but it leads to significant latency when the service throughput is high. Summary of the Invention

[0003] To address the issue of significant service latency caused by the serial encryption / decryption, header compression / decompression, and integrity protection processing of packet data at the PCDP layer, this invention proposes a method for parallel processing of mobile communication packet data. This method enables the simultaneous parallel processing of multiple data packets at the PCDP layer, effectively resolving the issue of high service latency in high-throughput scenarios.

[0004] A method for processing mobile communication packet data, used to execute PDCP layer service content and process uplink or downlink service data, includes the following steps:

[0005] S1: Create a PDCP main thread and one or more worker threads;

[0006] S2: The PDCP main thread reads a data packet to be processed from the data source layer. When processing uplink business data, the data source layer is the RLC layer; when processing downlink business data, the data source layer is the core network.

[0007] The PDCP main thread preprocesses the data packets to be processed to obtain control information, which is the dependency information required when processing the data packets to be processed.

[0008] The PDCP main thread requests and allocates a new memory block, which is used to store the processed data packets.

[0009] S3: The PDCP main thread sends control information, the address of the data packet to be processed, and the address of the new memory block to the worker thread. At the same time, the PDCP main thread passes the address of the new memory block to the data receiving layer through a lock-free circular queue. When processing uplink service data, the data receiving layer is the core network; when processing downlink service data, the data receiving layer is the RLC layer.

[0010] S4: The PDCP main thread continuously repeats steps S2-S3, performing the operations in steps S2-S3 sequentially on the data packets to be processed.

[0011] S5: The worker thread processes the corresponding data packets to be processed according to the received control information, obtains the processed data packets, and writes the processed data packets into the corresponding new memory block.

[0012] Furthermore, in step S1, the number of worker threads created can be a static or dynamic value. When the number of worker threads is a dynamic value, the basis for dynamic adjustment includes business throughput.

[0013] Furthermore, both the PDCP main thread and worker thread are configured with CPU affinity.

[0014] Furthermore, the modules used in the preprocessing in step S2 include the NGU-GTPU module, the SDAP module, the F1U module, and the F1-GTPU module.

[0015] Furthermore, the CPU affinity is set to a CPU hard affinity setting.

[0016] Furthermore, the PDCP main thread and each worker thread exchange data through a corresponding lock-free circular queue.

[0017] Furthermore, the lock-free circular queues between the PDCP main thread and each worker thread are all lock-free circular queues based on CAS technology.

[0018] The present invention also provides an electronic device,

[0019] include:

[0020] Memory, used to store computer programs;

[0021] When a processor executes a program stored in memory, it implements the above method steps.

[0022] Beneficial effects:

[0023] 1. In this invention, the PDCP main thread reads one data packet to be processed at a time in sequence, allocates a corresponding new memory block, and then passes the address of this new memory block to the data receiving layer through a lock-free circular queue. The specific processing of the data packets to be processed is distributed to worker threads for processing. This design allows multiple data packets to be processed in parallel, effectively reducing overall business latency, while ensuring that the order of the processed data packets received by the data receiving layer is consistent with the order of the corresponding data packets to be processed, that is, the processed data packets are continuous, which is the core inventive point of this invention.

[0024] 2. In this invention, by using the PDCP main thread and worker threads, the packet data can be distributed to different worker threads for parallel processing. Furthermore, this method can also place different data processing stages and functions of the same data packet, such as data encryption, integrity protection, and header compression and decompression, into different worker threads for parallel processing. This not only enables parallel processing at the granularity of packet data packets, but also enables data processing at the granularity of packet data packet functions, which can significantly improve the efficiency of packet data processing.

[0025] 3. In this invention, the CPU affinity setting adopts a hard CPU affinity setting method, which sets the PDCP main thread and worker...

[0026] Binding each thread to an isolated CPU core can improve the thread cache hit rate, reduce the impact of soft interrupts on the PDCP main thread and worker threads, reduce thread task context switching, and improve the efficiency of data processing for each thread group.

[0027] 4. In this invention, the PDCP main thread and each worker thread transmit data through a corresponding lock-free circular queue, which can improve the efficiency of inter-thread communication compared with traditional inter-thread communication methods. Attached Figure Description

[0028] Figure 1 This is a flowchart illustrating the specific process of processing downlink business data according to the present invention in this embodiment. Detailed Implementation

[0029] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0030] A method for processing mobile communication packet data, used to execute PDCP layer service content and process uplink or downlink service data, specifically includes the following steps:

[0031] S1: Create a PDCP main thread and one or more worker threads. The number of worker threads can be a static or dynamic value. When the number of worker threads is dynamic, the dynamic adjustment is based on factors including business throughput. Both the PDCP main thread and worker threads are configured with CPU affinity. CPU affinity configuration is divided into hard affinity configuration and soft affinity configuration. In this invention, hard affinity configuration is preferred. The method for configuring CPU affinity for threads is prior art and will not be described in detail here.

[0032] S2: The PDCP main thread reads a data packet to be processed from the data source layer. When processing uplink business data, the data source layer is the RLC layer; when processing downlink business data, the data source layer is the core network.

[0033] The PDCP main thread preprocesses the data packets to be processed to obtain control information, which is the dependency information required when processing the data packets. The modules used for preprocessing include the NGU-GTPU module, SDAP module, F1U module, and F1-GTPU module. Specifically, the NGU-GTPU module is responsible for parsing the GTPU and NGU protocol headers; SDAP is responsible for associating and mapping the DRB bearer; the PDCP module, F1U module, and F1-GTPU module are responsible for generating and providing information such as PDCP SN, F1U sequence number, and TEID.

[0034] The PDCP main thread requests and allocates a new memory block, which is used to store the processed data packets.

[0035] S3: The PDCP main thread sends control information, the address of the data packet to be processed, and the address of the new memory block to the worker thread. At the same time, the PDCP main thread passes the address of the new memory block to the data receiving layer through a lock-free circular queue. When processing uplink business data, the data receiving layer is the core network; when processing downlink business data, the data receiving layer is the RLC layer.

[0036] S4: The PDCP main thread continuously repeats steps S2-S3, performing the operations in steps S2-S3 sequentially on the data packets to be processed.

[0037] S5: The worker thread processes the corresponding data packets according to the received control information, obtains the processed data packets, and writes the processed data packets into the corresponding new memory block. The PDCP main thread and each worker thread exchange data through corresponding lock-free circular queues. The lock-free circular queues between the PDCP main thread and each worker thread are lock-free circular queues based on CAS technology. The processing content of the worker thread mainly includes time-consuming operations such as PDCP header compression, encryption process, and integrity protection.

[0038] The following is combined with Figure 1 This describes a more specific implementation, specifically the downlink data processing procedure of the 5G CUUP network element PDCP:

[0039] S1: Create a PDCP main thread and two worker threads, namely worker1 and worker2. Both the PDCP main thread and the two worker threads have CPU affinity settings, specifically hard affinity settings, and occupy three CPU cores.

[0040] S2: The PDCP main thread obtains the address Addr1 of a data packet to be processed from the core network;

[0041] The PDCP main thread preprocesses the data packets to be processed to obtain control information. The modules used for preprocessing include the NGU-GTPU module, SDAP module, F1U module, and F1-GTPU module. The control information includes rlcMode, sn size, Sn, and other information.

[0042] The PDCP main thread requests and allocates a new memory block, the address of which is NewAddr1;

[0043] S3: The PDCP main thread sends control information, the address of the data packet to be processed (Addr1), and the address of the new memory block (NewAddr1) to worker1; at the same time, the PDCP main thread passes the address of the new memory block (NewAddr1) to the RLC layer through a lock-free circular queue.

[0044] S4: The PDCP main thread repeatedly executes steps S2-S3. The address of the data packet to be processed read for the second time is Addr2, and the address of the new memory block to be allocated for the second time is New Addr2. The PDCP main thread sends the control information, the address of the data packet to be processed (Addr2), and the address of the new memory block (New Addr2) to worker2.

[0045] S5: worker1 and worker2 process their respective data packets based on the data they receive, and write their processed data packets into new memory blocks at addresses NewAddr1 and NewAddr2, respectively.

[0046] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for processing mobile communication packet data, used to execute PDCP layer service content, and process uplink or downlink service data, characterized in that... Includes the following steps: S1: Create a PDCP main thread and one or more worker threads; S2: The PDCP main thread reads a data packet to be processed from the data source layer. When processing uplink business data, the data source layer is the RLC layer; when processing downlink business data, the data source layer is the core network. The PDCP main thread preprocesses the data packets to be processed to obtain control information, which is the dependency information required when processing the data packets to be processed. The PDCP main thread requests and allocates a new memory block, which is used to store the processed data packets. S3: The PDCP main thread sends control information, the address of the data packet to be processed, and the address of the new memory block to the worker thread. At the same time, the PDCP main thread passes the address of the new memory block to the data receiving layer through a lock-free circular queue. When processing uplink service data, the data receiving layer is the core network; when processing downlink service data, the data receiving layer is the RLC layer. S4: The PDCP main thread continuously repeats steps S2-S3, performing the operations in steps S2-S3 sequentially on the data packets to be processed. S5: The worker thread processes the corresponding data packets to be processed according to the received control information, obtains the processed data packets, and writes the processed data packets into the corresponding new memory block.

2. The method for processing mobile communication packet data according to claim 1, characterized in that... In step S1, the number of worker threads created can be a static or dynamic value. When the number of worker threads is a dynamic value, the dynamic adjustment is based on business throughput.

3. The method for processing mobile communication packet data according to claim 1, characterized in that... Both the PDCP main thread and worker thread have CPU affinity settings configured.

4. The method for processing mobile communication packet data according to claim 1, characterized in that... The modules used in the preprocessing in step S2 include the NGU-GTPU module, the SDAP module, the F1U module, and the F1-GTPU module.

5. A method for processing mobile communication packet data according to claim 3, characterized in that... The CPU affinity is set to the CPU hardware affinity setting.

6. The method for processing mobile communication packet data according to claim 1, characterized in that... The PDCP main thread and each worker thread exchange data through a corresponding lock-free circular queue.

7. A method for processing mobile communication packet data according to claim 6, characterized in that... The lock-free circular queues between the PDCP main thread and each worker thread are all lock-free circular queues based on CAS technology.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Satellite communication system, data caching method thereof and computer readable storage medium

    CN114385352A

  • Containerized router with virtual networking

    CN117061425A