A traffic caching method and system based on microservices

Through a microservice-based traffic caching method, utilizing the cache microservice module and control plane module, the problems of limited hardware resources and insufficient state management in the UPF buffering function of the P4 switch are solved, efficient packet caching is achieved, and the stability and performance of the network system are improved.

CN119854879BActive Publication Date: 2025-09-23NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510023239.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-09-23
Estimated Expiration
2045-01-07

AI Technical Summary

Technical Problem

When implementing the UPF buffering function based on the existing P4 switch, the hardware resources are limited, the support for complex functions is insufficient, the state management mechanism is lacking, and debugging and optimization are difficult, making it difficult to meet the network traffic caching needs.

Method used

A microservice-based traffic caching method is adopted to cache data packets through the caching microservice module, and the control plane module is used to wake up the user device and dynamically adjust the caching rules to realize the caching function of UPF.

Benefits of technology

It implements a cache that does not occupy the switch memory space, making up for the P4 switch's lack of ability to cache data packets for a long time and improving the stability and performance of the network system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854879B_ABST
    Figure CN119854879B_ABST
Patent Text Reader

Abstract

The present invention discloses a traffic caching method and system based on microservices, including cache judgment, data packet processing, wake-up, transmission resumption and cache rule configuration steps. Cache judgment: When the UE enters an inactive state, the UPF detects the flag bit buffer in the FAR. If it is 1, the data packet needs to be cached. Data packet processing: The data packet to be cached is sent to the cache microservice, and the summary message is sent to the control plane, including parsing local_meta.fseid, generating a summary message containing local_meta.fseid and cache status, and sending it through a communication channel to trigger a paging program. Wake-up: The control plane triggers DDN to wake up the target UE based on the summary message. Transmission resumption: After the target UE becomes active, the UPF updates the forwarding table rules to resume transmission of the cached data packet. Cache rule configuration: The cache microservice rules are configured by the BAR, and the control plane dynamically adjusts them by sending update requests through PFCP signaling. The present invention does not need to occupy the memory space of the switch, and can make up for the functional gap of the P4 switch that lacks the ability to cache data packets for a long time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a traffic caching method and system based on microservices. Background Art

[0002] With the continuous development of communication technology, 5G networks, as a new generation of mobile communication technology, offer significant advantages in increasing data transmission speeds and reducing latency. In the 3GPP 5G core network system architecture, the User Plane Function (UPF) network element plays a crucial role, responsible for key functions such as data plane traffic forwarding, billing, and quality control.

[0003] The cache function is one of the basic functions that UPF must have. When the UE (user equipment) enters the idle state, the UPF cannot send data directly to the device. To prevent data loss, the UPF needs to temporarily cache the data and transmit the data to the UE after the UE becomes active again, thereby ensuring the timeliness of data transmission. In addition, with the development of battery optimization technology and the gradual depletion of radio spectrum resources, the time that devices are idle in the future is expected to be extended, making the buffering characteristics of the UPF increasingly important.

[0004] In the field of network function development, P4 switches are widely used for customized network function development due to their programmability. However, implementing UPF buffering functions using P4 switches faces many challenges:

[0005] Limited Hardware Resources: Currently available hardware P4 switches are primarily designed for data centers, and their hardware resources (such as TCAM and SRAM) are typically limited. This severely limits the number of flow table entries required for UPF implementation. This is particularly true in high-concurrency scenarios where multiple user sessions must be maintained simultaneously, significantly increasing the risk of hardware resource exhaustion and making it difficult to meet real-world application requirements.

[0006] Insufficient support for complex functions. The P4 language itself has certain limitations, including limited support for complex functions such as packet buffering and dynamic priority scheduling. While P4 can implement some buffering logic using registers and table entries, its flexibility and performance lag significantly behind those of purpose-built hardware buffers. This limitation can lead to data loss or excessive latency.

[0007] Lack of a Complete State Management Mechanism: The UPF maintains and manages user traffic state information (such as billing and QoS policies), but the P4 switch lacks native state management support. Complex state updates across multiple packets often rely on an external control plane, which increases communication overhead between the control and data planes.

[0008] Debugging and optimization are difficult. Implementing UPF and buffering functions requires direct mapping of P4 code to hardware implementation, making debugging and performance optimization extremely complex. In particular, improperly designed buffering mechanisms can lead to severe congestion and traffic imbalance, impacting the performance and stability of the entire network system.

[0009] In summary, the existing method of implementing UPF buffering function based on P4 switches has many defects and is difficult to meet the growing demand for network traffic caching. Therefore, a new microservice-based traffic caching method is needed to solve the above problems. Summary of the Invention

[0010] In view of the deficiencies of the prior art, the present invention discloses a traffic caching method and system based on microservices to solve the problems raised in the above background technology.

[0011] To achieve the above objectives, the present invention provides the following technical solution: a traffic caching method based on microservices, the method comprising the following steps:

[0012] Cache determination step: When the user equipment UE enters the inactive state, the user plane function UPF detects the value of the flag bit buffer in the forwarding action rule FAR of the downlink data packet. When the flag bit buffer is 1, it is determined that the data packet needs to be cached;

[0013] Data packet processing step: sending the data packet to be cached to the cache microservice through a specific port, and sending a summary message to the control plane at the same time, the summary message including the identification information local_meta.fseid of the data packet, wherein sending the summary message to the control plane specifically includes:

[0014] Parsing step: the user plane function UPF parses the local_meta.fseid identifier of the data packet;

[0015] Generating step: generating a summary message, wherein the summary message includes local_meta.fseid and the cache status of the data packet;

[0016] Sending step: sending the summary message to the control plane through the communication channel between the control plane and the control plane to trigger the paging procedure;

[0017] Wake-up step: the control plane triggers a downlink data notification DDN based on the summary message to wake up the target UE;

[0018] Resume transmission step: When the target UE resumes the active state, the user plane function UPF updates the forwarding table rules so that the data packets in the cache microservice resume transmission to the target UE;

[0019] Cache rule configuration step: The cache rules of the cache microservice are configured by the buffer action rule BAR, and the BAR includes the maximum number of cached data packets and the maximum cache duration parameters. The control plane sends a request to update the BAR to the cache microservice through PFCP signaling to dynamically adjust the cache rules.

[0020] Preferably, the forwarding action rule FAR further includes a flag bit notify, which is used to decide whether to notify the SMF.

[0021] Preferably, in the wake-up step, when the target UE is awakened, the SMF notifies the UPF through PFCP signaling that the target UE has been awakened and is ready to receive data, the UPF updates the corresponding forwarding table rules, and the control plane sends a new flow table to allow subsequent data packets to be forwarded to the target UE normally.

[0022] Preferably, in the wake-up step, after the target UE is woken up, the control plane notifies the buffer area through the PFCP session and sends the buffered data packet to the target UE.

[0023] Preferably, in the cache rule configuration step, when a request to modify BAR is received from SMF, the control plane parses the PFCP message, encapsulates the modified BAR parameters into new rules, and sends them to the cache microservice through the grpc session. The BAR parameters include the maximum number of data packets and the maximum cache time.

[0024] The present invention also provides a microservice-based traffic caching system, comprising:

[0025] The user plane function UPF module is used to detect the value of the flag bit buffer in the forwarding action rule FAR of the downlink data packet when the user equipment UE enters the inactive state. When the flag bit buffer is 1, it is determined that the data packet needs to be cached, and the data packet that needs to be cached is sent to the cache microservice through a specific port. The local_meta.fseid identifier of the data packet is parsed, and a summary message including the local_meta.fseid and the cache status of the data packet is generated and sent to the control plane. After the target UE resumes the active state, the forwarding table rule is updated to resume the transmission of the data packet in the cache microservice to the target UE;

[0026] The cache microservice module is used to receive and cache data packets from the UPF module. Its cache rules are configured by the buffer action rule BAR, which includes the maximum number of cached data packets and the maximum cache duration parameters. The cache rules are dynamically adjusted according to the request of the control plane.

[0027] The control plane module is used to trigger the downlink data notification DDN based on the received summary message, wake up the target UE, and send a request to update the BAR to the cache microservice through PFCP signaling. When the target UE is awakened, it notifies the UPF through PFCP signaling that the target UE has been awakened and is ready to receive data, and notifies the cache area through the PFCP session to send the cached data packet to the target UE.

[0028] Preferably, the forwarding action rule FAR further includes a flag bit notify, which is used to decide whether to notify the SMF.

[0029] Preferably, when the control plane module receives a request to modify BAR from SMF, it parses the PFCP message, encapsulates the modified BAR parameters into new rules, and sends them to the cache microservice through the grpc session. The BAR parameters include the maximum number of data packets and the maximum cache time.

[0030] Compared with existing technologies, this invention offers the following advantages: By introducing microservices, it can act as an external buffer, implementing the fundamental caching functionality of the UPF. When a UE is disconnected, data packets destined for that UE are temporarily buffered, and transmission resumes when the UE becomes active again. This approach eliminates the need for switch memory and addresses the lack of long-term data packet buffering capabilities in P4 switches. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0032] In the attached figure:

[0033] Figure 1 This is a schematic diagram of the internal flow of the UPF during normal processing;

[0034] Figure 2 This is a schematic diagram of the processing of downlink buffering service according to the present invention;

[0035] Figure 3 It is a schematic diagram of the processing of the UPF after the UE wakes up in the present invention. DETAILED DESCRIPTION

[0036] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0037] Example: Figure 1-Figure 3 As shown, a traffic caching method based on microservices includes the following steps:

[0038] Cache determination step: When the user equipment UE enters the inactive state, the user plane function UPF detects the value of the flag bit buffer in the forwarding action rule FAR of the downlink data packet. When the flag bit buffer is 1, it is determined that the data packet needs to be cached;

[0039] Data packet processing step: sending the data packet to be cached to the cache microservice through a specific port, and sending a summary message to the control plane at the same time, the summary message including the identification information local_meta.fseid of the data packet, wherein sending the summary message to the control plane specifically includes:

[0040] Parsing step: the user plane function UPF parses the local_meta.fseid identifier of the data packet;

[0041] Generating step: generating a summary message, wherein the summary message includes local_meta.fseid and the cache status of the data packet;

[0042] Sending step: sending the summary message to the control plane through the communication channel between the control plane and the control plane to trigger the paging procedure;

[0043] Wake-up step: the control plane triggers a downlink data notification DDN based on the summary message to wake up the target UE;

[0044] Resume transmission step: When the target UE resumes the active state, the user plane function UPF updates the forwarding table rules so that the data packets in the cache microservice resume transmission to the target UE;

[0045] Cache rule configuration step: The cache rules of the cache microservice are configured by the buffer action rule BAR, and the BAR includes the maximum number of cached data packets and the maximum cache duration parameters. The control plane sends a request to update the BAR to the cache microservice through PFCP signaling to dynamically adjust the cache rules.

[0046] Furthermore, the forwarding action rule FAR also includes a flag bit notify, which is used to decide whether to notify the SMF.

[0047] Furthermore, in the wake-up step, when the target UE is awakened, the SMF notifies the UPF through PFCP signaling that the target UE has been awakened and is ready to receive data. The UPF updates the corresponding forwarding table rules, and the control plane sends a new flow table to allow subsequent data packets to be forwarded to the target UE normally.

[0048] Furthermore, in the wake-up step, after the target UE is woken up, the control plane notifies the buffer area through the PFCP session and sends the buffered data packet to the target UE.

[0049] Furthermore, in the cache rule configuration step, when a request to modify BAR is received from SMF, the control plane parses the PFCP message, encapsulates the modified BAR parameters into new rules, and sends them to the cache microservice through the grpc session. The BAR parameters include the maximum number of data packets and the maximum cache time.

[0050] The present invention also provides a microservice-based traffic caching system, comprising:

[0051] The user plane function UPF module is used to detect the value of the flag bit buffer in the forwarding action rule FAR of the downlink data packet when the user equipment UE enters the inactive state. When the flag bit buffer is 1, it is determined that the data packet needs to be cached, and the data packet that needs to be cached is sent to the cache microservice through a specific port. The local_meta.fseid identifier of the data packet is parsed, and a summary message including the local_meta.fseid and the cache status of the data packet is generated and sent to the control plane. After the target UE resumes the active state, the forwarding table rule is updated to resume the transmission of the data packet in the cache microservice to the target UE;

[0052] The cache microservice module is used to receive and cache data packets from the UPF module. Its cache rules are configured by the buffer action rule BAR, which includes the maximum number of cached data packets and the maximum cache duration parameters. The cache rules are dynamically adjusted according to the request of the control plane.

[0053] The control plane module is used to trigger the downlink data notification DDN based on the received summary message, wake up the target UE, and send a request to update the BAR to the cache microservice through PFCP signaling. When the target UE is awakened, it notifies the UPF through PFCP signaling that the target UE has been awakened and is ready to receive data, and notifies the cache area through the PFCP session to send the cached data packet to the target UE.

[0054] Furthermore, the forwarding action rule FAR also includes a flag bit notify, which is used to decide whether to notify the SMF.

[0055] Furthermore, when the control plane module receives a request to modify BAR from SMF, it parses the PFCP message, encapsulates the modified BAR parameters into new rules, and sends them to the cache microservice through the grpc session. The BAR parameters include the maximum number of data packets and the maximum cache time.

[0056] The specific UPF forwarding process steps include the following:

[0057] Step 1: Match PDR table

[0058] When a packet arrives at the UPF, the first step is to match it against the Packet Detection Rule (PDR) table to determine which user or data flow the packet belongs to. After the PDR table matches, it returns an index for further lookup of the Forwarding Action Rule (FAR), counting, and other functions.

[0059] Step 2: Entrance Count

[0060] After the PDR matching is completed, the UPF needs to count the ingress traffic of the packets in order to generate a detailed traffic usage report. Each PDR entry is associated with a register that records the number of packets and the total number of bytes in the ingress direction;

[0061] Step 3: Match FAR table

[0062] After completing classification and ingress counting, the UPF uses the FAR (Forwarding Action Rule) table to determine how to handle the packet. The FAR table is the core of the data forwarding process. Its entries define a set of action rules that guide the UPF in performing actions such as forwarding, discarding, caching, and notifying the control plane on the packet.

[0063] Step 4: Execute the action in the FAR matching result

[0064] Execute the specified action on the packet based on the FAR matching result.

[0065] Processing of cached data packets:

[0066] When the data packet passes step 4 and performs the FAR matching operation, if buffer = 1, it is forwarded to the microservice and temporarily cached. At the same time, a summary message is sent to the control plane to notify the target UE that it is in idle state and needs to be woken up.

[0067] From the perspective of the P4 switch, the cache is treated as a base station, and packets are sent using the GTP protocol, similar to interactions with regular base stations. From an external perspective, the P4 switch, along with the cache and control plane, is treated as a complete UPF.

[0068] When the UE reconnects:

[0069] After receiving the SMF notification, the control plane simultaneously completes the following two operations: modifying the flow table parameters and setting the buffer parameter in the original FAR to 0. At the same time, FAR will notify the microservice through a grpc session that the cache needs to be released.

[0070] The microservice sends the corresponding data packet back to UPF.

[0071] Packets sent back to the P4 switch will skip the previous processing stages and proceed directly to the subsequent steps.

[0072] Step 5: Routing

[0073] Based on the destination IP address of the data packet, UPF needs to select the appropriate next-hop device and egress port.

[0074] Step 6: Queue Control

[0075] Differentiate traffic flows of different priorities, prioritizing high-priority traffic during network congestion. When packets enter a queue, they are assigned a priority based on their QoS level. When a queue is full, lower-priority packets may be dropped.

[0076] Step 7: Export Count

[0077] Statistics on egress packet traffic are combined with ingress counting to analyze network performance or traffic loss. Egress counting is implemented similarly to ingress counting, using registers to record the number of packets and total bytes. The UPF updates the statistical values ​​in the registers before sending packets on the egress port.

[0078] Step 8: Detect egress port and forward

[0079] In the final stage, the data packet is sent from the corresponding egress port based on the FAR matching result and routing table information.

[0080] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A traffic caching method based on microservices, characterized by: The method comprises the following steps: Cache determination step: When the user equipment UE enters the inactive state, the user plane function UPF detects the value of the flag bit buffer in the forwarding action rule FAR of the downlink data packet. When the flag bit buffer is 1, it is determined that the data packet needs to be cached; Data packet processing step: sending the data packet to be cached to the cache microservice through a specific port, and sending a summary message to the control plane at the same time, the summary message including the identification information local_meta.fseid of the data packet, wherein sending the summary message to the control plane specifically includes: Parsing step: the user plane function UPF parses the local_meta.fseid identifier of the data packet; Generating step: generating a summary message, wherein the summary message includes local_meta.fseid and the cache status of the data packet; Sending step: sending the summary message to the control plane through the communication channel between the control plane and the control plane to trigger the paging procedure; Wake-up step: the control plane triggers a downlink data notification DDN based on the summary message to wake up the target UE; Resume transmission step: When the target UE resumes the active state, the user plane function UPF updates the forwarding table rules so that the data packets in the cache microservice resume transmission to the target UE; Cache rule configuration step: The cache rules of the cache microservice are configured by the buffer action rule BAR, and the BAR includes the maximum number of cached data packets and the maximum cache duration parameters. The control plane sends a request to update the BAR to the cache microservice through PFCP signaling to dynamically adjust the cache rules.

2. The microservice-based traffic caching method according to claim 1, characterized in that: The forwarding action rule FAR also includes a flag bit notify, which is used to decide whether to notify the SMF.

3. The microservice-based traffic caching method according to claim 1, characterized in that: In the wake-up step, when the target UE is awakened, the SMF notifies the UPF through PFCP signaling that the target UE has been awakened and is ready to receive data. The UPF updates the corresponding forwarding table rules, and the control plane sends a new flow table to allow subsequent data packets to be forwarded to the target UE normally.

4. The microservice-based traffic caching method according to claim 1, wherein: In the wake-up step, after the target UE is woken up, the control plane notifies the buffer area through the PFCP session and sends the buffered data packet to the target UE.

5. The microservice-based traffic caching method according to claim 1, characterized in that: In the cache rule configuration step, when a request to modify BAR is received from SMF, the control plane parses the PFCP message, encapsulates the modified BAR parameters into new rules, and sends them to the cache microservice through the grpc session. The BAR parameters include the maximum number of data packets and the maximum cache time.

6. A traffic caching system based on microservices, characterized in that: include: The user plane function UPF module is used to detect the value of the flag bit buffer in the forwarding action rule FAR of the downlink data packet when the user equipment UE enters the inactive state. When the flag bit buffer is 1, it is determined that the data packet needs to be cached, and the data packet that needs to be cached is sent to the cache microservice through a specific port. The local_meta.fseid identifier of the data packet is parsed, and a summary message including the local_meta.fseid and the cache status of the data packet is generated and sent to the control plane. After the target UE resumes the active state, the forwarding table rule is updated to resume the transmission of the data packet in the cache microservice to the target UE; The cache microservice module is used to receive and cache data packets from the UPF module. Its cache rules are configured by the buffer action rule BAR, which includes the maximum number of cached data packets and the maximum cache duration parameters. The cache rules are dynamically adjusted according to the request of the control plane. The control plane module is used to trigger the downlink data notification DDN based on the received summary message, wake up the target UE, and send a request to update the BAR to the cache microservice through PFCP signaling. When the target UE is awakened, it notifies the UPF through PFCP signaling that the target UE has been awakened and is ready to receive data, and notifies the cache area through the PFCP session to send the cached data packet to the target UE.

7. The microservice-based traffic caching system according to claim 6, characterized in that: The forwarding action rule FAR also includes a flag bit notify, which is used to decide whether to notify the SMF.

8. The microservice-based traffic caching system according to claim 6, characterized in that: When the control plane module receives a request to modify BAR from SMF, it parses the PFCP message, encapsulates the modified BAR parameters into new rules, and sends them to the cache microservice through the grpc session. The BAR parameters include the maximum number of data packets and the maximum cache time.

Citation Information

Patent Citations

  • Cloud-oriented native user plane function micro-service system

    CN113852939A

  • Construction method of data distribution system, network equipment and storage medium

    CN117376922A