Traffic caching method and system based on micro service
Through the microservice-based traffic caching method, the user-side function UPF and cache microservices work together, the problem of limited hardware resources and insufficient support for complex functions in the P4 switch when implementing the UPF buffering function is solved, and efficient packet caching and recovery transmission is achieved.
Patent Information
- Application Number
- CN202510023239.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-01-07
AI Technical Summary
The existing UPF buffering function based on P4 switches has problems such as limited hardware resources, insufficient support for complex functions, lack of complete state management mechanisms and difficulty in debugging and optimization, and it is difficult to meet the growing demand for network traffic caching.
Using the microservice-based traffic caching method, the user-plane function UPF detects the flag buffer in the packet forwarding action rule, determines whether to cache the data packet, and sends the data packet to the cache microservice. The control plane coordinates with the cache microservices through PFCP signaling, and dynamically adjusts cache rules to realize the cache and recovery transmission of data packets.
It realizes packet cache that does not occupy the switch memory space, makes up for the functional gap in P4 switches' lack of ability to cache packets for a long time, and improves the efficiency and flexibility of network traffic caching.
Smart Images

Figure CN119854879A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a microservice-based traffic caching method and system. Background Art
[0002] With the continuous development of communication technology, 5G network, as a new generation of mobile communication technology, has significant advantages in improving data transmission rate and reducing latency. In the 3GPP 5G core network system architecture, the UPF (User Plane Function) network element plays a vital role, responsible for key functions such as forwarding, billing and quality control of data plane traffic.
[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, so as to ensure 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 in the idle state in the future is expected to be extended, which makes the buffering characteristics of the UPF more and more important.
[0004] In the field of network function development, P4 switches are widely used in customized network function development due to their programmability. However, when using P4 switches to implement UPF buffering functions, there are many challenges:
[0005] Limited hardware resources Currently available hardware P4 switches are mainly designed for data centers, and their hardware resources (such as TCAM, SRAM) are usually limited. This means that the number of flow table entries is strictly limited during the UPF implementation process. Especially in high-concurrency scenarios where multiple user session states need to be maintained at the same time, the risk of hardware resource exhaustion increases significantly, making it difficult to meet the needs of actual applications.
[0006] Insufficient support for complex functions The P4 language itself has certain limitations, and its support for complex functions (such as packet buffering and dynamic priority scheduling) is relatively limited. Although P4 can implement some buffering logic through registers and table entries, its flexibility and performance are far behind those of specially designed hardware buffers, which may lead to data loss or excessive delay.
[0007] Lack of complete state management mechanism UPF needs to maintain and manage the state information of user traffic (such as billing, QoS policy, etc.), but the P4 switch lacks complete state management support. For complex state update operations involving multiple data packets, it is often necessary to rely on an external control plane to complete, which undoubtedly increases the communication overhead between the control plane and the data plane.
[0008] Difficulty in debugging and optimization When implementing UPF and buffering functions, since P4 code needs to be directly mapped to hardware implementation, the debugging and performance optimization process becomes extremely complicated. In particular, improper buffering mechanism design is likely to cause serious congestion and traffic imbalance, affecting the performance and stability of the entire network system.
[0009] In summary, the existing method of implementing UPF buffering function based on P4 switch 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 in 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 object, 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 an 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, and 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, wherein the summary message includes 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 a cache status of a data packet;
[0016] Sending step: sending the summary message to the control plane through the communication channel between the control plane to trigger the paging procedure;
[0017] Wake-up step: the control plane triggers the 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 rule of the cache microservice is configured by a buffer action rule BAR, and the BAR includes a maximum number of cached data packets and a maximum cache duration parameter. The control plane sends a request to update the BAR to the cache microservice through PFCP signaling to dynamically adjust the cache rule.
[0020] Preferably, the forwarding action rule FAR also 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, when the target UE is awakened, the control plane notifies the cache area through the PFCP session to send the cached 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] A 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 an inactive state, and when the flag bit buffer is 1, determine that the data packet needs to be cached, send the data packet that needs to be cached to the cache microservice through a specific port, parse the local_meta.fseid identifier of the data packet, generate a summary message including the local_meta.fseid and the cache status of the data packet, and send it to the control plane, and after the target UE resumes the active state, update the forwarding table rules so that the data packet in the cache microservice resumes transmission to the target UE;
[0026] A cache microservice module is used to receive and cache data packets from the UPF module. Its cache rules are configured by a buffer action rule BAR, which includes a maximum number of cached data packets and a maximum cache duration parameter, and dynamically adjusts the cache rules 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, send a request to update the BAR to the cache microservice through PFCP signaling, and when the target UE is awakened, notify the UPF through PFCP signaling that the target UE has been awakened and is ready to receive data, and notify the cache area through the PFCP session to send the cached data packet to the target UE.
[0028] Preferably, the forwarding action rule FAR also 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 the prior art, the present invention has the following beneficial effects: By introducing microservices, the present invention can act as an external cache area to implement the basic cache function of UPF. When the UE is disconnected, the data packets sent to the UE are temporarily cached, and the transmission continues after the UE is restored. This method does not require the memory space of the switch, and can make up for the functional gap of the P4 switch's lack of ability to cache data packets for a long time. 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 picture:
[0033] Figure 1 This is a schematic diagram of the internal flow of UPF for normal processing;
[0034] Figure 2 It is a schematic diagram of the processing of downlink buffer service in the present invention;
[0035] Figure 3 It is a schematic diagram of the processing of UPF after UE wakes up in the present invention. DETAILED DESCRIPTION
[0036] The preferred embodiments of the present invention are described below in conjunction with 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 an 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, and 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, wherein the summary message includes 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 a cache status of a data packet;
[0042] Sending step: sending the summary message to the control plane through the communication channel between the control plane to trigger the paging procedure;
[0043] Wake-up step: the control plane triggers the 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 rule of the cache microservice is configured by a buffer action rule BAR, and the BAR includes a maximum number of cached data packets and a maximum cache duration parameter. The control plane sends a request to update the BAR to the cache microservice through PFCP signaling to dynamically adjust the cache rule.
[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, when the target UE is awakened, 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] A 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 an inactive state, and when the flag bit buffer is 1, determine that the data packet needs to be cached, send the data packet that needs to be cached to the cache microservice through a specific port, parse the local_meta.fseid identifier of the data packet, generate a summary message including the local_meta.fseid and the cache status of the data packet, and send it to the control plane, and after the target UE resumes the active state, update the forwarding table rules so that the data packet in the cache microservice resumes transmission to the target UE;
[0052] A cache microservice module is used to receive and cache data packets from the UPF module. Its cache rules are configured by a buffer action rule BAR, which includes a maximum number of cached data packets and a maximum cache duration parameter, and dynamically adjusts the cache rules 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, send a request to update the BAR to the cache microservice through PFCP signaling, and when the target UE is awakened, notify the UPF through PFCP signaling that the target UE has been awakened and is ready to receive data, and notify 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 PDR (Packet Detection Rule) table to determine which user or data stream the packet belongs to. After the PDR table match is completed, an index is returned for further lookup of FAR (Forwarding Action Rule), 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 the classification and ingress counting, UPF needs to use the FAR (Forwarding Action Rule) table to determine the subsequent processing of the data packet. The FAR table is the core of the data forwarding process. Its entries define a set of operation rules to guide UPF to perform actions such as forwarding, discarding, caching, and notifying the control plane on the data packet.
[0063] Step 4: Execute the actions in the FAR matching results
[0064] Based on the FAR matching result, the specified action is performed on the data packet.
[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 awakened.
[0067] From the perspective of the P4 switch, the cache is considered a base station and sends packets in the same way as ordinary base stations, that is, the GTP protocol. From an external perspective, the P4 switch, together with the buffer and control plane, is considered a complete UPF.
[0068] When the UE reconnects:
[0069] After receiving the SMF notification, the control plane completes the following two operations at the same time: modify the flow table parameters and set 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 of different priorities and prioritize high-priority traffic when the network is congested. When a packet enters a queue, it is assigned a priority based on the QoS level of the traffic. When the queue is full, low-priority packets may be discarded.
[0076] Step 7: Export Count
[0077] Statistics packet traffic in the egress direction, combined with ingress counting to analyze network performance or traffic loss. The implementation of egress counting is similar to ingress counting, using registers to record the number of packets and total bytes; before sending packets at the egress port, UPF updates the statistical value in the register.
[0078] Step 8: Detect egress port and forward
[0079] In the final stage, the data packet is sent from the corresponding egress port according to the FAR matching result and routing table information.
[0080] Finally, it should be noted that the above description is only a preferred example 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 can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A traffic caching method based on microservices, characterized in that: The method comprises the following steps: Cache determination step: When the user equipment UE enters an 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, and 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, wherein the summary message includes 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 a cache status of a data packet; Sending step: sending the summary message to the control plane through the communication channel between the control plane to trigger the paging procedure; Wake-up step: the control plane triggers the 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 rule of the cache microservice is configured by a buffer action rule BAR, and the BAR includes a maximum number of cached data packets and a maximum cache duration parameter. The control plane sends a request to update the BAR to the cache microservice through PFCP signaling to dynamically adjust the cache rule.
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, characterized in that: In the wake-up step, when the target UE is awakened, 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: A 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 an inactive state, and when the flag bit buffer is 1, determine that the data packet needs to be cached, send the data packet that needs to be cached to the cache microservice through a specific port, parse the local_meta.fseid identifier of the data packet, generate a summary message including the local_meta.fseid and the cache status of the data packet, and send it to the control plane, and after the target UE resumes the active state, update the forwarding table rules so that the data packet in the cache microservice resumes transmission to the target UE; A cache microservice module is used to receive and cache data packets from the UPF module. Its cache rules are configured by a buffer action rule BAR, which includes a maximum number of cached data packets and a maximum cache duration parameter, and dynamically adjusts the cache rules 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, send a request to update the BAR to the cache microservice through PFCP signaling, and when the target UE is awakened, notify the UPF through PFCP signaling that the target UE has been awakened and is ready to receive data, and notify 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
Signaling processing method and device, signaling interworking gateway and storage medium
CN116506902A
Construction method of data distribution system, network equipment and storage medium
CN117376922A
Data plane cache forwarding and control method based on programmable network
CN118382110A
Microservice data item storage and retrieval using generation-based cache
US20210279057A1
Cited By
UPF Buffer anti-congestion method based on service state awareness and dynamic quota adjustment
CN121586036A