CN115665042B - Data processing method, device, user plane functional entity and storage medium - Google Patents

Data processing method, device, user plane functional entity and storage medium Download PDF

Info

Publication number
CN115665042B
CN115665042B CN202211587770.1A CN202211587770A CN115665042B CN 115665042 B CN115665042 B CN 115665042B CN 202211587770 A CN202211587770 A CN 202211587770A CN 115665042 B CN115665042 B CN 115665042B
Authority
CN
China
Prior art keywords
target
message
address
service processing
thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211587770.1A
Other languages
Chinese (zh)
Other versions
CN115665042A (en
Inventor
徐卓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ailing Network Co ltd
Original Assignee
Shenzhen Ailing Network Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Ailing Network Co ltd filed Critical Shenzhen Ailing Network Co ltd
Priority to CN202211587770.1A priority Critical patent/CN115665042B/en
Publication of CN115665042A publication Critical patent/CN115665042A/en
Application granted granted Critical
Publication of CN115665042B publication Critical patent/CN115665042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a data processing method, a data processing device, a user plane functional entity and a storage medium, and relates to the technical field of communication. The data processing method comprises the following steps: extracting target session data matched with the session type of the original session from the original session data by adopting a control thread, and sending the target session data to a service processing thread corresponding to the session type; determining a service processing thread corresponding to the target message by adopting a message distribution thread, and sending the target message to the service processing thread corresponding to the target message; and matching the target session data with the address in the target message by adopting a service processing thread, acquiring the destination address of the target message and sending the target message. Target session data matched with the session type is extracted from the original session data by adopting the control thread, the session type and the service processing thread corresponding to the target message are used for matching the target session data with the address in the target message and distributing the target message, and the processing efficiency is improved.

Description

Data processing method, device, user plane functional entity and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data processing method and apparatus, a user plane functional entity, and a storage medium.
Background
In the age of rapid development of information technology, various kinds of software are increasing, and some software generally uses a rtc (run to completion) design model to store one piece of PDU (protocol data unit) session data based on a signaling flow.
In the related art, a piece of PDU session data is stored, different threads perform searching based on original session data when receiving and sending a message, and then perform corresponding processing on the message.
However, in the related art, different threads all use original session data, so that resource competition exists, and the message forwarding efficiency is reduced.
Disclosure of Invention
The present invention aims to provide a data processing method, an apparatus and a user plane functional entity for solving the above-mentioned deficiencies in the prior art, so that in the related art, different threads all use original session data, so that there is resource competition and the problem of reducing the forwarding efficiency of a packet.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a data processing method, applied to a user plane functional entity, including:
adopting a control thread, extracting target session data matched with the session type of an original session from original session data, and sending the target session data to a service processing thread corresponding to the session type, wherein the target session data comprises: a destination address;
determining a service processing thread corresponding to a target message by adopting a message distribution thread, and sending the target message to the service processing thread corresponding to the target message;
and matching the target session data with the address in the target message by adopting the service processing thread, acquiring the destination address of the target message and sending the target message.
Optionally, the determining, by using a packet distribution thread, a service processing thread corresponding to the target packet includes:
determining a service processing thread corresponding to the target message according to the inner-layer source IP address of the target message by adopting the message distribution thread;
the matching, by using the service processing thread, the target session data and the address in the target packet, obtaining the destination address of the target packet, and sending the target packet, includes:
matching an inner layer source IP address of the target message with the target session data by adopting the service processing thread to obtain a target IP address of the target message;
and sending the target message according to the destination IP address of the target message by adopting the service processing thread.
Optionally, the sending, by using the service processing thread, the target packet according to the destination IP address of the target packet includes:
judging whether the destination IP address of the target message is a wireless side address or not by adopting the service processing thread;
if the destination IP address of the target message is a wireless side address, sending the target message to a service processing thread corresponding to the destination IP address so that the service processing thread corresponding to the destination IP address sends the target message to the destination IP address through a wireless communication interface;
and if the destination IP address of the target message is a wired side address, the service processing thread is adopted to send the target message to the destination IP address through a wired communication interface.
Optionally, the determining, by using a message distribution thread, a service processing thread corresponding to the target message includes:
determining a service processing thread corresponding to the target message according to the target IP address of the target message by adopting the message distribution thread;
the matching, by using the service processing thread, the target session data and the address in the target packet, acquiring a destination address of the target packet, and sending the target packet includes:
matching the target IP address of the target message and the target session data by adopting the service processing thread to obtain a matching result;
and if the matching result indicates that the target IP address of the target message is the same as the target address in the target session data, sending the target message to the target IP address through an N6 interface.
Optionally, the method further includes:
if the information to be sent on the message distribution thread triggers a preset event, sending message data corresponding to the preset event to the control thread by adopting the message distribution thread;
and constructing a message according to the message data by adopting the control thread, and sending the constructed message to a Session Management Function (SMF) entity.
Optionally, before the constructing a packet according to the message data by using the control thread, the method further includes:
and if the information to be sent on the service processing thread triggers a preset event, sending message data corresponding to the preset event to the control thread by adopting the service processing thread.
Optionally, the sending the constructed packet to the SMF entity includes:
and sending the constructed message to a Session Management Function (SMF) entity by adopting the control thread and adopting a corresponding communication interface according to the type of the constructed message.
In a second aspect, an embodiment of the present invention further provides a data processing apparatus, applied to a user plane functional entity, including:
an extracting module, configured to extract, by using a control thread, target session data that is matched with a session type of an original session from original session data, and send the target session data to a service processing thread corresponding to the session type, where the target session data includes: a destination address;
the determining module is used for determining a service processing thread corresponding to a target message by adopting a message distribution thread and sending the target message to the service processing thread corresponding to the target message;
and the matching module is used for matching the target session data with the address in the target message by adopting the service processing thread, acquiring the destination address of the target message and sending the target message.
Optionally, the determining module is specifically configured to determine, by using the packet distribution thread, a service processing thread corresponding to the target packet according to an inner-layer source IP address of the target packet;
the matching module is specifically configured to match an inner-layer source IP address of the target packet with the target session data by using the service processing thread to obtain a destination IP address of the target packet; and sending the target message according to the destination IP address of the target message by adopting the service processing thread.
Optionally, the matching module is specifically configured to determine, by using the service processing thread, whether a destination IP address of the target packet is a wireless side address; if the destination IP address of the target message is a wireless side address, sending the target message to a service processing thread corresponding to the destination IP address, so that the service processing thread corresponding to the destination IP address sends the target message to the destination IP address through an N3 interface; and if the destination IP address of the target message is the wired side address, the service processing thread is adopted to send the target message to the destination IP address through an N6 interface.
Optionally, the target packet belongs to downlink traffic, and the determining module is specifically configured to determine, by using the packet distribution thread, a service processing thread corresponding to the target packet according to a destination IP address of the target packet;
the matching module is specifically configured to match the target IP address of the target packet and the target session data by using the service processing thread to obtain a matching result; and if the matching result indicates that the target IP address of the target message is the same as the target address in the target session data, sending the target message to the target IP address through an N6 interface.
Optionally, the apparatus further comprises:
a first sending module, configured to send, by using the message distribution thread, message data corresponding to a preset event to the control thread if a preset event is triggered by information to be sent on the message distribution thread;
and the construction module is used for constructing a message according to the message data by adopting the control thread and sending the constructed message to a Session Management Function (SMF) entity.
Optionally, the apparatus further comprises:
and the second sending module is used for sending the message data corresponding to the preset event to the control thread by adopting the service processing thread if the information to be sent on the service processing thread triggers the preset event.
Optionally, the building module is specifically configured to send the built packet to a session management function SMF entity by using the control thread and using a corresponding communication interface according to the type of the built packet.
In a third aspect, an embodiment of the present invention further provides a user plane function entity, including: a receiver, a transmitter, a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor cooperates with the receiver and the transmitter when executing the computer program to implement the data processing method of any one of the first aspect.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the storage medium, and when the computer program is read and executed, the data processing method according to any one of the above first aspects is implemented.
The invention has the beneficial effects that: the embodiment of the invention provides a data processing method, which is applied to a user plane functional entity and comprises the following steps: adopting a control thread, extracting target session data matched with the session type of the original session from the original session data, and sending the target session data to a service processing thread corresponding to the session type, wherein the target session data comprises: a destination address; determining a service processing thread corresponding to the target message by adopting a message distribution thread, and sending the target message to the service processing thread corresponding to the target message; and matching the target session data with the address in the target message by adopting a service processing thread, acquiring the destination address of the target message and sending the target message. When the target message is matched, original session data is not needed, the control thread is adopted to extract target session data matched with the session type from the original session data, the session type and the service processing thread corresponding to the target message are adopted to match the target session data with the address in the target message and distribute the target message, and the processing efficiency of the target message can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a first flowchart illustrating a data processing method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart diagram of a data processing method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a data processing method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a data processing method according to a fourth embodiment of the present invention;
fig. 5 is a fifth flowchart illustrating a data processing method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a user plane functional entity according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and in the claims, and in the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
In the related art, a copy of PDU session data is stored, different threads perform searching based on original session data when receiving and transmitting a message, and then perform corresponding processing on the message. However, in the related art, different threads all use original session data, so that resource contention exists, and the forwarding efficiency of the packet is reduced.
In order to solve the above technical problems in the related art, an embodiment of the present application provides a data processing method, which sends target session data to a service processing thread corresponding to a session type, where the target session data is data extracted from original session data and matched with the session type; the target message is sent to the service processing thread corresponding to the target message, the service processing thread is matched with the target session data and the address in the target message to obtain the destination address of the target message and send the target message, and when the service processing thread is matched with the destination address of the target message, the session type and the service processing thread corresponding to the target message are used for processing without using original session data, so that the processing efficiency of the target message can be improved.
In addition, in the related art, original session data is used by different threads, and the processing capability of a program is usually improved by increasing the number of CPU cores, but original session data is read and written by multiple cores, and locking is usually required to ensure data security, and meanwhile, locking also consumes a part of resources, which causes the forwarding efficiency of a packet to be low. In the embodiment of the application, the session type and the service processing thread corresponding to the target message are adopted, the target message is processed according to the extracted target meeting data, and for the processing of different target messages, the processing is not required to be based on original session data and locking operation is not required, so that the processing efficiency of the target message is further improved.
The terms referred to in the embodiments of the present application will be explained below.
5G: fifth generation mobile communication technology.
Pipeline model: in view of the industrial pipeline model, the program function is decomposed into a plurality of independent stages, different stages are allocated to different CPU (Central Processing Unit) cores for Processing, and data is transmitted between the CPU cores through queues. By matching the number of CPU cores in different types of stages, the best concurrency efficiency can be achieved.
rtc model: an application program generally has a plurality of different logic functions, and the plurality of logic functions are processed from beginning to end on one CPU core. The number of CPU cores can be increased to improve the processing capacity of a program, but the same data resource is read and written by multiple cores, locking is needed to ensure data security, and a part of system resources are consumed by locking.
And (4) UPF: a User Plane Function (User Plane Function) is an important component of a 3GPP (3 rd Generation Partnership Project) 5G core network system architecture, and is mainly responsible for routing and forwarding related functions of User Plane packets in a 5G core network.
SMF: session Management Function (Session Management Function) is an important component of the 3gpp 5G core network system architecture, and is responsible for Session Management related functions, including creating, updating, and deleting PDU sessions, and managing the Session environment with the UPF.
UP2CP: UP is UPF, CP is SMF, UP2CP is connected through N4 interface.
N4: the N4 interface in the 5G network is an interface between the SMF and the UPF, and carries data transfer functions of a control plane and a forwarding plane. The interface is divided into two sub-type interfaces of GTP-C and GTP-U according to functions.
N3: the N3 interface in a 5G network is the interface between the radio network (RAN) and the UPF, which carries the user plane data transfer function between the user plane from RAN to UPF.
N6: the N6 interface in the 5G network is an interface between the UPF and the wired network, and carries a user plane data transfer function from the UPF to the wired network.
A data processing method provided in the embodiments of the present application is explained below. The data processing method provided by the embodiment of the application is applied to a user plane function entity, namely a UPF entity.
Fig. 1 is a first schematic flow chart of a data processing method according to an embodiment of the present invention, as shown in fig. 1, the method may include:
s101, extracting target session data matched with the session type of the original session from the original session data by adopting a control thread, and sending the target session data to a service processing thread corresponding to the session type.
The target session data may include: the destination address.
In some embodiments, a control thread is employed to extract target session data from the raw session data that matches session types of the raw session, where each session type has corresponding target session data, i.e., different session types have different target session data extracted from the raw session data.
Optionally, if the session type is IPv4 (Internet Protocol Version 4, fourth Version of Internet communication Protocol), extracting partial data required for IPv4 message matching as target session data, if the session type is IPv6 (Internet Protocol Version 6, sixth Version of Internet communication Protocol), extracting partial data required for IPv6 message matching as target session data, and if the session type is IPv4+ IPv6, extracting partial data required for IPv4 message matching and partial data required for IPv6 message matching as target session data.
It should be noted that the original PDU session data refers to PDU session data on the UPF, and the original PDU session data may include: IP (Internet Protocol) address information, device network information, terminal hardware information, packet detection rules, forwarding behavior rules, usage reporting rules, qoS (Quality of Service) execution rules, buffering behavior rules, and the like.
In practical applications, the number of control threads is one.
S102, determining a service processing thread corresponding to the target message by adopting a message distribution thread, and sending the target message to the service processing thread corresponding to the target message.
In some embodiments, a message distribution thread is adopted, a service processing thread corresponding to a target message is determined from at least one preset service processing thread according to a preset mapping relation, and then the target message is sent to the service processing thread.
It should be noted that the preset mapping relationship is used to represent a mapping relationship between the preset packet information and the preset service processing thread.
In practical applications, the number of the message distribution threads is at least one.
S103, matching the target session data with the address in the target message by adopting a service processing thread, acquiring the destination address of the target message and sending the target message.
The number of the business processing threads can also be at least one. The target session data and the target packet received by different service processing threads may be different. That is, there are multiple different sets of target session data, and the target session data and the address in the target packet are matched, so that there is no need to frequently use the original session data, and moreover, matching efficiency can be improved by adopting multiple service processing threads to perform matching respectively.
In the embodiment of the application, each service processing thread receives corresponding target session data and a target message, and matches the received target session data with the address in the target message to obtain the destination address of the target message, and sends the target message according to the destination address of the target message.
To sum up, an embodiment of the present invention provides a data processing method applied to a user plane function entity, including: adopting a control thread, extracting target session data matched with the session type of the original session from the original session data, and sending the target session data to a service processing thread corresponding to the session type, wherein the target session data comprises: a destination address; determining a service processing thread corresponding to the target message by adopting a message distribution thread, and sending the target message to the service processing thread corresponding to the target message; and matching the target session data with the address in the target message by adopting a service processing thread, acquiring the destination address of the target message and sending the target message. When the target message is matched, original session data is not needed, the control thread is adopted to extract the target session data matched with the session type from the original session data, the session type and the service processing thread corresponding to the target message are adopted to match the address in the target session data and the target message and distribute the target message, and the processing efficiency of the target message can be improved.
It should be noted that the control thread is responsible for processing signaling plane interaction, and copies and stores part of key data matched with a session, i.e., target session data, on the service processing thread, so that the signaling plane (control thread) and the user plane (service processing thread) are separated, the processing of the user plane (service processing thread) does not need to access original session data, the change of the original session data does not affect the real-time processing of the user plane (service processing thread), and the effect of the signaling change on the user plane is minimized.
In the embodiment of the application, the extracted target session data is sent to the service processing thread, if the control thread modifies the original session data, the modified related data can be synchronized to the corresponding service processing thread, the purpose that the modification and matching logic of the session data uses different data (target session data) without locking is achieved, and the forwarding performance can be effectively improved under the condition of no locking.
In addition, the number of control threads, message distribution threads and service processing threads can be flexibly configured, the software performance is optimized through different collocation debugging, and the software forwarding performance is linearly increased along with the increase of the number of CPU cores.
Fig. 2 is a second flowchart of a data processing method according to an embodiment of the present invention, where in this embodiment, a target packet belongs to an uplink flow.
As shown in fig. 2, the process of determining the service processing thread corresponding to the target packet by using the packet distribution thread in S102 may include:
s201, determining a service processing thread corresponding to the target message according to the inner-layer source IP address of the target message by adopting a message distribution thread.
Wherein, the inner layer source IP address of the uplink flow is the terminal address. It should be noted that the terminal referred to in the embodiment of the present application may be a terminal supporting 5G.
In some embodiments, a message distribution thread is adopted, a target message is obtained by receiving a packet from an N3 port of a network card, an inner layer source IP address of the target message is obtained, hash calculation is performed according to the inner layer source IP address of the target message, and a service processing thread corresponding to the target message is determined.
In this embodiment of the application, after the execution is completed, the S201 sends the target packet to the service processing thread corresponding to the target packet by using the packet distribution thread.
The process of matching the target session data with the address in the target packet, acquiring the destination address of the target packet, and sending the target packet by using the service processing thread in S103 may include:
s202, matching an inner layer source IP address of the target message with the target session data by adopting a service processing thread to obtain a target IP address of the target message.
In some embodiments, a service processing thread is adopted to match an inner layer source IP address of a target message with target session data to obtain a matching result; if the matching result indicates matching, the matching result carries the destination IP address of the target message; and if the matching result indicates that the target message is not matched, adopting a service processing thread to discard the target message.
S203, the service processing thread is adopted to send the target message according to the target IP address of the target message.
In the embodiment of the application, a service processing thread is adopted, and the target message is sent from the N3 interface or the N6 interface according to the destination IP address of the target message.
Optionally, fig. 3 is a third schematic flow chart of a data processing method according to an embodiment of the present invention, as shown in fig. 3, a process of sending a target packet according to a destination IP address of the target packet by using a service processing thread in S203 may include:
s301, adopting a service processing thread to judge whether the destination IP address of the target message is the wireless side address.
The method comprises the steps of adopting a service processing thread, and determining whether a target IP address of a target message is a wireless side address by judging whether the target IP address of the target message is in a wireless network.
S302, if the destination IP address of the target message is the wireless side address, the target message is sent to the service processing thread corresponding to the destination IP address, so that the service processing thread corresponding to the destination IP address sends the target message to the destination IP address through the N3 interface.
In some embodiments, if the destination IP address of the target packet is a wireless side address, a service processing thread is adopted to send the target packet to a service processing thread corresponding to the destination IP address; the service processing thread corresponding to the destination IP address may receive the target packet.
Correspondingly, the service processing thread corresponding to the destination IP address may also store corresponding target session data, match the target session data with the address in the target packet by using the service processing thread corresponding to the destination IP address, and send the target packet to the destination IP address through the N3 interface if the matching is successful.
In practical application, the N3 interface may be an N3 interface, and the service processing thread corresponding to the destination IP address is used to send the target packet to the destination IP address through the N3 interface.
And S303, if the destination IP address of the target message is the wired side address, the target message is sent to the destination IP address through the N6 interface by adopting a service processing thread.
Fig. 4 is a fourth schematic flow chart of the data processing method according to the embodiment of the present invention, where in this embodiment, optionally, the target packet belongs to downlink traffic.
As shown in fig. 4, the process of determining the service processing thread corresponding to the target packet by using the packet distribution thread in S102 may include:
s401, determining a service processing thread corresponding to the target message according to the target IP address of the target message by adopting a message distribution thread.
Wherein, the destination IP address of the downlink flow is the terminal address.
In some embodiments, a message distribution thread is adopted to receive a packet from an N6 port of a network card to obtain a target message, a destination IP address in the target message is obtained, hash calculation is performed according to the destination IP address of the target message, and a service processing thread corresponding to the target message is determined.
In this embodiment of the present application, after the execution is completed, the foregoing S201 uses a message distribution thread to send the target message to the service processing thread corresponding to the target message.
In the step S103, matching the target session data with the address in the target packet by using the service processing thread, acquiring the destination address of the target packet, and sending the target packet, includes:
s402, matching the target IP address of the target message and the target session data by adopting a service processing thread to obtain a matching result.
In the embodiment of the application, a service processing thread is adopted to match the target IP address of the target message with the target session data to obtain a matching result; if the matching result indicates matching, executing the following process of S403; if the matching result indicates that the messages are not matched, adopting a service processing thread to discard the target message.
And S403, if the matching result indicates that the destination IP address of the target message is the same as the destination address in the target session data, sending the target message to the destination IP address through the N6 interface.
In summary, the inner-layer source IP address of the uplink traffic is the terminal address, the destination IP address of the downlink traffic is the terminal address, and the two terminal addresses are the same, so that the uplink traffic and the downlink traffic can be distributed to the same service processing thread for processing, so that the uplink traffic and the downlink traffic can share one target session data; in addition, the unified processing of the terminal data is facilitated, for example, statistics or application layer services are facilitated.
It should be noted that, when a message to be sent is to be sent to a terminal, a service processing thread may be used for processing, and the foregoing implementation process may be specifically referred to. When the information to be sent is to be sent to the SMF, the interaction with the SMF is realized by controlling the thread transfer, which may specifically refer to the following implementation process. This further embodies the characteristics of session data separation of the signaling plane and the user plane in the embodiment of the present application.
Optionally, fig. 5 is a schematic flowchart of a fifth flow chart of a data processing method provided in an embodiment of the present invention, as shown in fig. 5, the method may further include:
s501, if the information to be sent on the message distribution thread triggers a preset event, the message distribution thread is adopted to send message data corresponding to the preset event to the control thread.
The preset event may be a UP2CP event. The UP2CP event may include: and uploading the message or uploading the message content.
For example, the UP2CP event may include: session report message or IPv6 RS (route request) message.
In some embodiments, if the information to be sent on the message distribution thread triggers the UP2CP event, the message distribution thread is used to construct message data according to the relevant information of the UP2CP event, and then the message distribution thread is used to send the message data corresponding to the preset event to the control thread, and the control thread can receive the message data.
And S502, constructing a message according to the message data by adopting a control thread, and sending the constructed message to a Session Management Function (SMF) entity.
In the embodiment of the application, a control thread is adopted to carry out validity verification on message data according to original session data to obtain a verification result; if the verification result indicates validity, a control thread is adopted to construct a message according to the message data, and the constructed message is sent to a Session Management Function (SMF) entity; and if the verification result indicates invalidity, discarding the message data.
Optionally, before the control thread is used and the message is constructed according to the message data, the method further includes:
and if the information to be sent on the service processing thread triggers a preset event, sending message data corresponding to the preset event to the control thread by adopting the service processing thread.
In some embodiments, if the information to be sent on the service processing thread triggers the UP2CP event, and the service processing thread constructs message data according to the relevant information of the UP2CP event, the service processing thread is used to send the message data corresponding to the preset event to the control thread, and the control thread may receive the message data.
Then, the control thread may perform the process of S502 described above, which is not described herein again.
Optionally, the process of sending the constructed packet to the SMF entity in S502 may include:
and sending the constructed message to a Session Management Function (SMF) entity by adopting a control thread and adopting a corresponding communication interface according to the type of the constructed message.
In some embodiments, if the type of the constructed packet is message uploading, the corresponding communication interface may be an N4 GTP-C interface; and sending the constructed message, namely the message, to the SMF entity through the N4 GTP-C interface by adopting a control thread.
In other embodiments, if the type of the constructed packet is a packet, the corresponding communication interface may be an N4 GTP-U interface, and the constructed packet, that is, the packet content, is sent to the SMF entity through the N4 GTP-U interface by using a control thread.
In summary, embodiments of the present invention provide a data processing method, when matching a target packet, original session data is not needed, a control thread is used to extract target session data matching a session type from the original session data, and a service processing thread corresponding to the session type and the target packet is used to match the target session data and an address in the target packet for processing, so as to improve the processing efficiency of the target packet; the extracted target session data is sent to the service processing thread, if the control thread modifies the original session data, the modified related data can be synchronized to the corresponding service processing thread, the purpose that the modification and matching logic of the session data uses different data (target session data) without locking is achieved, and the forwarding performance can be effectively improved under the condition of no locking.
In addition, in the embodiment of the present application, the conventional packet processing logic may be split, different threads are used for packet reception and service processing, and the packet reception thread, that is, a packet distribution thread, may distribute a packet to a service processing thread, so that uplink and downlink traffic are processed in one service processing thread. The method and the device realize the lock-free design of the whole flow of the UP2CP and the flow uplink and downlink by the splitting and the recombination of the service logic and the message interaction among threads, and effectively improve the forwarding efficiency.
In the following, a data processing apparatus, a user plane functional entity, a storage medium, and the like for executing the data processing method provided by the present application are described, and for specific implementation processes and technical effects thereof, reference is made to relevant contents of the data processing method, which will not be described in detail below.
Fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, and as shown in fig. 6, the apparatus may include:
an extracting module 601, configured to extract, by using a control thread, target session data matched with a session type of an original session from original session data, and send the target session data to a service processing thread corresponding to the session type, where the target session data includes: a destination address;
a determining module 602, configured to determine, by using a packet distribution thread, a service processing thread corresponding to a target packet, and send the target packet to the service processing thread corresponding to the target packet;
a matching module 603, configured to match, by using the service processing thread, the target session data and the address in the target packet, obtain a destination address of the target packet, and send the target packet.
Optionally, the determining module 602 is specifically configured to determine, by using the packet distribution thread, a service processing thread corresponding to the target packet according to an inner-layer source IP address of the target packet;
the matching module 603 is specifically configured to match, by using the service processing thread, the inner-layer source IP address of the target packet with the target session data to obtain the destination IP address of the target packet; and sending the target message according to the destination IP address of the target message by adopting the service processing thread.
Optionally, the matching module 603 is specifically configured to determine, by using the service processing thread, whether a destination IP address of the target packet is a wireless side address; if the destination IP address of the target message is a wireless side address, sending the target message to a service processing thread corresponding to the destination IP address, so that the service processing thread corresponding to the destination IP address sends the target message to the destination IP address through an N3 interface; and if the destination IP address of the target message is the wired side address, the service processing thread is adopted to send the target message to the destination IP address through an N6 interface.
Optionally, the target packet belongs to downlink traffic, and the determining module 602 is specifically configured to determine, by using the packet distribution thread, a service processing thread corresponding to the target packet according to a destination IP address of the target packet;
the matching module 603 is specifically configured to match the target IP address of the target packet and the target session data by using the service processing thread to obtain a matching result; and if the matching result indicates that the target IP address of the target message is the same as the target address in the target session data, sending the target message to the target IP address through an N6 interface.
Optionally, the apparatus further comprises:
a first sending module, configured to send, by using the message distribution thread, message data corresponding to a preset event to the control thread if a preset event is triggered by information to be sent on the message distribution thread;
and the construction module is used for constructing a message according to the message data by adopting the control thread and sending the constructed message to a Session Management Function (SMF) entity.
Optionally, the apparatus further comprises:
and the second sending module is used for sending the message data corresponding to the preset event to the control thread by adopting the service processing thread if the information to be sent on the service processing thread triggers the preset event.
Optionally, the constructing module is specifically configured to send the constructed packet to a session management function SMF entity by using the control thread and using a corresponding communication interface according to the type of the constructed packet.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. As another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 7 is a schematic structural diagram of a user plane functional entity according to an embodiment of the present invention, and as shown in fig. 7, the apparatus includes: a receiver 701, a transmitter 702, a memory 703 and a processor 704, wherein the memory 703 stores a computer program executable by the processor 704, and the processor 704 cooperates with the receiver 701 and the transmitter 702 to implement the data processing method when executing the computer program.
Optionally, the invention also provides a program product, for example a computer-readable storage medium, comprising a program which, when being executed by a processor, is adapted to carry out the above-mentioned method embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or in the form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer-readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A data processing method is applied to a user plane functional entity, and comprises the following steps:
adopting a control thread, extracting target session data matched with the session type of an original session from original session data, and sending the target session data to a service processing thread corresponding to the session type, wherein the target session data comprises: a destination address;
determining a service processing thread corresponding to a target message by adopting a message distribution thread, and sending the target message to the service processing thread corresponding to the target message;
and matching the target session data with the address in the target message by adopting the service processing thread, acquiring the destination address of the target message and sending the target message.
2. The method according to claim 1, wherein the target packet belongs to an uplink traffic, and the determining, by using the packet distribution thread, the service processing thread corresponding to the target packet comprises:
determining a service processing thread corresponding to the target message by adopting the message distribution thread according to the inner layer source IP address of the target message;
the matching, by using the service processing thread, the target session data and the address in the target packet, obtaining the destination address of the target packet, and sending the target packet, includes:
matching an inner layer source IP address of the target message with the target session data by adopting the service processing thread to obtain a target IP address of the target message;
and sending the target message according to the destination IP address of the target message by adopting the service processing thread.
3. The method according to claim 2, wherein said sending the target packet according to the destination IP address of the target packet by using the service processing thread comprises:
judging whether the destination IP address of the target message is a wireless side address or not by adopting the service processing thread;
if the destination IP address of the target message is a wireless side address, sending the target message to a service processing thread corresponding to the destination IP address, so that the service processing thread corresponding to the destination IP address sends the target message to the destination IP address through an N3 interface;
and if the destination IP address of the target message is the wired side address, the service processing thread is adopted to send the target message to the destination IP address through an N6 interface.
4. The method according to claim 1, wherein the target packet belongs to a downlink traffic, and the determining, by using the packet distribution thread, the service processing thread corresponding to the target packet comprises:
determining a service processing thread corresponding to the target message according to the target IP address of the target message by adopting the message distribution thread;
the matching, by using the service processing thread, the target session data and the address in the target packet, obtaining the destination address of the target packet, and sending the target packet, includes:
matching the target IP address of the target message and the target session data by adopting the service processing thread to obtain a matching result;
and if the matching result indicates that the target IP address of the target message is the same as the target address in the target session data, sending the target message to the target IP address through an N6 interface.
5. The method of claim 1, further comprising:
if the information to be sent on the message distribution thread triggers a preset event, sending message data corresponding to the preset event to the control thread by adopting the message distribution thread;
and constructing a message according to the message data by adopting the control thread, and sending the constructed message to a Session Management Function (SMF) entity.
6. The method of claim 5, wherein prior to said constructing a packet from said message data using said control thread, said method further comprises:
and if the information to be sent on the service processing thread triggers a preset event, sending message data corresponding to the preset event to the control thread by adopting the service processing thread.
7. The method according to claim 5, wherein the sending the constructed packet to a Session Management Function (SMF) entity comprises:
and sending the constructed message to a Session Management Function (SMF) entity by adopting the control thread and adopting a corresponding communication interface according to the type of the constructed message.
8. A data processing apparatus, applied to a user plane function entity, comprising:
an extracting module, configured to extract, by using a control thread, target session data that is matched with a session type of an original session from original session data, and send the target session data to a service processing thread corresponding to the session type, where the target session data includes: a destination address;
the determining module is used for determining a service processing thread corresponding to a target message by adopting a message distribution thread and sending the target message to the service processing thread corresponding to the target message;
and the matching module is used for matching the target session data with the address in the target message by adopting the service processing thread, acquiring the destination address of the target message and sending the target message.
9. A user plane functional entity, comprising: receiver, transmitter, memory storing a computer program executable by said processor, and a processor implementing the data processing method of any of the preceding claims 1 to 7 in cooperation with said receiver and said transmitter when executing said computer program.
10. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when read and executed, implements the data processing method of any of the preceding claims 1-7.
CN202211587770.1A 2022-12-12 2022-12-12 Data processing method, device, user plane functional entity and storage medium Active CN115665042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211587770.1A CN115665042B (en) 2022-12-12 2022-12-12 Data processing method, device, user plane functional entity and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211587770.1A CN115665042B (en) 2022-12-12 2022-12-12 Data processing method, device, user plane functional entity and storage medium

Publications (2)

Publication Number Publication Date
CN115665042A CN115665042A (en) 2023-01-31
CN115665042B true CN115665042B (en) 2023-02-28

Family

ID=85019778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211587770.1A Active CN115665042B (en) 2022-12-12 2022-12-12 Data processing method, device, user plane functional entity and storage medium

Country Status (1)

Country Link
CN (1) CN115665042B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111556058A (en) * 2020-04-29 2020-08-18 杭州迪普信息技术有限公司 Session processing method and device
CN111901446A (en) * 2019-05-05 2020-11-06 华为技术有限公司 Method and equipment for allocating and acquiring IP address
CN113472690A (en) * 2021-06-29 2021-10-01 中国农业银行股份有限公司 Service message processing method and device
WO2022151206A1 (en) * 2021-01-14 2022-07-21 华为技术有限公司 Communication method and network device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901446A (en) * 2019-05-05 2020-11-06 华为技术有限公司 Method and equipment for allocating and acquiring IP address
CN111556058A (en) * 2020-04-29 2020-08-18 杭州迪普信息技术有限公司 Session processing method and device
WO2022151206A1 (en) * 2021-01-14 2022-07-21 华为技术有限公司 Communication method and network device
CN113472690A (en) * 2021-06-29 2021-10-01 中国农业银行股份有限公司 Service message processing method and device

Also Published As

Publication number Publication date
CN115665042A (en) 2023-01-31

Similar Documents

Publication Publication Date Title
US11411897B2 (en) Communication method and communication apparatus for message queue telemetry transport
CN102769603B (en) The method of a kind of data transmission, system and equipment
US10951395B2 (en) Data fetching in data exchange networks
JP2023520851A (en) Blockchain message processing method, apparatus, computer device and computer program
WO2019029320A1 (en) Configuration management method, apparatus and device
US20230042747A1 (en) Message Processing Method and Device, Storage Medium, and Electronic Device
CN109547519B (en) Reverse proxy method, apparatus and computer readable storage medium
CN109525518B (en) IP message network address conversion method and device based on FPGA
WO2017032152A1 (en) Method for writing data into storage device and storage device
WO2023221452A1 (en) Packet processing system and method, device, and storage medium
CN107483628B (en) DPDK-based one-way proxy method and system
WO2024037366A1 (en) Forwarding rule issuing method, and intelligent network interface card and storage medium
CN108460044B (en) Data processing method and device
US20230336368A1 (en) Block chain-based data processing method and related apparatus
CN115665042B (en) Data processing method, device, user plane functional entity and storage medium
WO2017032110A1 (en) Application message processing system and method, and application device
US20110282926A1 (en) Relay apparatus, recording medium storing a relay program, and a relay method
CN114449051B (en) Data packet transmission method and communication equipment
CN102594611B (en) Trap session chain table updating method for webmaster agent
CN112612670B (en) Session information statistical method, device, exchange equipment and storage medium
Chang et al. A Probabilistic Spray‐and‐Wait Routing Algorithm Based on Node Interest Preference in Delay Tolerant Networks
CN109688204B (en) File downloading method, node and terminal based on NDN (named data networking)
WO2020220986A1 (en) Packet processing method, device, and apparatus
JP2007221522A (en) Polling device, terminal device, polling method and program
CN115914380A (en) Communication delay optimization method of cloud computing resource manager based on ZLib compression algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant