Background
An N4 interface of a Control plane of the 5G mobile network is based on a UDP/IP protocol, and an application layer adopts a Packet Forwarding Control Protocol (PFCP) which is defined in 3GPP TS 29.244. The N4 interface transfers PFCP request and response messages between SMFs and UPFs, including the establishment, modification, release and reporting of PFCP sessions.
The N4 interface is between the SMF and the UPF, and is an interface between the 5G core network control plane and the forwarding plane. Compared with the CUPS realized by the 4G core network, the CUPS realized by the 5G core network is more thorough, thereby bringing greater flexibility and higher efficiency to the 5G network. The opening of the N4 interface is a key step for finally realizing the CUPS separation.
The N4 interface is opened, and the 5G enabling industry application has many benefits: on one hand, the user can customize the network capacity required by the user to the operator, which is very important for the application of the vertical industry; on the other hand, the 5G trend distributed network can be supported, and the framework of cloud computing and edge computing is further matched, so that the design of 5G + cloud + AI is supported by the network bottom layer technology.
As shown in fig. 1, the UPF creates user session information by receiving a PFCP message of the SMF network element, the UPF network element itself has a primary and secondary protection mechanism (i.e., a primary UPF fails, a secondary UPF takes over the primary UPF function, and the primary UPF and the secondary UPF synchronize user session information in real time), and once the primary UPF fails, the secondary UPF takes over the primary UPF function to become the primary UPF in time, and performs service on the user session information synchronized from the primary UPF.
However, the primary and secondary synchronization of the primary and secondary UPFs requires time and the primary and secondary synchronization may be incomplete, so that the primary and secondary switching is performed, and at this time, the user session information on the switched UPF and the user session information on the SMF may be inconsistent, which may result in that some users may not be served normally.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The invention mainly aims to provide a 5G-based SMF session detection method, a terminal and a computer-readable storage medium, and aims to solve the problem that user session information on a UPF (user session information) and user session information on an SMF (simple user interface) are possibly inconsistent after a main UPF and a standby UPF are subjected to main-standby switching in the prior art.
In order to achieve the above object, the present invention provides a 5G-based SMF session detection method, where the 5G-based SMF session detection method includes the following steps:
after the original main UPF and the original standby UPF are subjected to main-standby switching, the original standby UPF is upgraded to a new main UPF, and the new main UPF carries Recovery Time Stamp Recovery Time to the SMF through a report message;
after receiving the report, the SMF judges that the original main UPF has a fault by judging that the report Time Stamp is carried, the original standby UPF is upgraded to a new main UPF, and the fault is recovered;
the SMF issues a modify message aiming at all session information in a new main UPF, wherein the modify message carries all data information of a user;
after receiving the modify message sent by the SMF, the new main UPF judges whether a session exists in the new main UPF;
if yes, the new main UPF replies a modify response to the SMF successfully;
and if the session is not abnormal, the new main UPF replies a modify response failure to the SMF, and the SMF judges that the session is abnormal in the new main UPF after receiving the modify response failure.
Optionally, in the method for detecting a 5G-based SMF session, all data information of a user is session information sent by the SMF to the original primary UPF.
In addition, to achieve the above object, the present invention further provides a terminal, wherein the terminal includes: a memory, a processor and a 5G-based SMF session detection program stored on the memory and executable on the processor, the 5G-based SMF session detection program when executed by the processor implementing the steps of the 5G-based SMF session detection method as described above.
Furthermore, to achieve the above object, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a 5G-based SMF session detection program, and the 5G-based SMF session detection program, when executed by a processor, implements the steps of the 5G-based SMF session detection method as described above.
In the invention, after the original main UPF and the original standby UPF are subjected to main-standby switching, the original standby UPF is upgraded to a new main UPF, and the new main UPF carries Recovery Time Stamp Recovery Time to the SMF through a report message; after receiving the report, the SMF judges that the original main UPF has a fault by judging that the report Time Stamp is carried, the original standby UPF is upgraded to a new main UPF, and the fault is recovered; the SMF issues a modify message aiming at all session information in a new main UPF, wherein the modify message carries all data information of a user; after receiving the modify message sent by the SMF, the new main UPF judges whether a session exists in the new main UPF; if yes, the new main UPF replies a modify response to the SMF successfully; and if the session is not abnormal, the new main UPF replies a modify response failure to the SMF, and the SMF judges that the session is abnormal in the new main UPF after receiving the modify response failure. After the original main UPF and the original standby UPF are switched, the SMF can timely find the problem of incomplete UPF information by carrying out session detection on the new main UPF, thereby achieving the purpose of quickly detecting the user service fault.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 2, the method for detecting a 5G-based SMF session according to the preferred embodiment of the present invention includes the following steps:
step S10, after the primary and standby switching is performed on the original primary UPF and the original standby UPF, the original standby UPF is upgraded to a new primary UPF, and the new primary UPF carries Recovery Time Stamp to the SMF through a report message.
Step S20, after receiving the report, the SMF determines that the original primary UPF has a failure by determining that the Recovery Time Stamp is carried, and the original backup UPF is upgraded to a new primary UPF and the failure is recovered.
Step S30, the SMF issues a modify message for all session information in the new primary UPF, where the modify message carries all data information of the user.
Step S40, after receiving the modify message sent by the SMF, the new master UPF determines whether a session exists in the new master UPF.
And step S50, if the answer is yes, the new main UPF replies a modify response to the SMF.
And step S60, if the answer does not exist, the new primary UPF replies a modify response failure to the SMF, and after the SMF receives the modify response failure, the SMF judges that the session is abnormal in the new primary UPF.
Specifically, as shown in fig. 3, after the primary and standby upsets are performed on the original primary and standby UPFs, the original standby UPF is upgraded to a new primary UPF, and then a report path of report (report information) is sent to the SMF. After receiving the report information sent by the new primary UPF, the SMF considers that the original primary UPF has a failure and the original backup UPF has been upgraded to the new primary UPF, and then determines that the UPF has a failure recovery (the original primary UPF and the original backup UPF are switched, the original primary UPF has failed, and the original backup UPF is upgraded to the new primary UPF, which indicates that the failure has recovered).
The SMF sends a Modify message to all session information (PDU session information) under the new main UPF, carries all data information of the user (the session information sent to the original main UPF), the new main UPF receives the Modify message sent by the SMF, and if the session exists in the new main UPF, the new main UPF replies a Modify response to the SMF successfully. If the session does not exist in the new primary UPF, the new primary UPF replies a modify failure response to the SMF, and the SMF receives the modify failure response and the error code 65 (the session does not exist), and then the SMF considers that the session is abnormal in the new primary UPF, and the SMF can normally and timely detect the abnormal session of the new primary UPF.
Further, as shown in fig. 4, based on the above SMF session detection method based on 5G, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Fig. 4 shows only some of the components of the terminal, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
The memory 20 may in some embodiments be an internal storage unit of the terminal, such as a hard disk or a memory of the terminal. The memory 20 may also be an external storage device of the terminal in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal. Further, the memory 20 may also include both an internal storage unit and an external storage device of the terminal. The memory 20 is used for storing application software installed in the terminal and various types of data, such as program codes of the installation terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In an embodiment, the memory 20 stores a 5G-based SMF session detection program 40, and the 5G-based SMF session detection program 40 is executable by the processor 10, so as to implement the 5G-based SMF session detection method in the present application.
The processor 10 may be, in some embodiments, a Central Processing Unit (CPU), a microprocessor or other data Processing chip, and is configured to run program codes stored in the memory 20 or process data, such as executing the 5G-based SMF session detection method.
The display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch panel, or the like in some embodiments. The display 30 is used for displaying information at the terminal and for displaying a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
In one embodiment, the following steps are implemented when the processor 10 executes the 5G-based SMF session detection program 40 in the memory 20:
after the original main UPF and the original standby UPF are subjected to main-standby switching, the original standby UPF is upgraded to a new main UPF, and the new main UPF carries Recovery Time Stamp Recovery Time to the SMF through a report message;
after receiving the report, the SMF judges that the original main UPF has a fault by judging that the report Time Stamp is carried, the original standby UPF is upgraded to a new main UPF, and the fault is recovered;
the SMF issues a modify message aiming at all session information in a new main UPF, wherein the modify message carries all data information of a user;
after receiving the modify message sent by the SMF, the new main UPF judges whether a session exists in the new main UPF;
if yes, the new main UPF replies a modify response to the SMF successfully;
and if the session is not abnormal, the new main UPF replies a modify response failure to the SMF, and the SMF judges that the session is abnormal in the new main UPF after receiving the modify response failure.
Wherein, the session information is PDU session information.
Wherein, all the data information of the user is the session information sent by the SMF to the original main UPF.
The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a 5G-based SMF session detection program, and the 5G-based SMF session detection program, when executed by a processor, implements the steps of the 5G-based SMF session detection method as described above.
In summary, the present invention provides a 5G-based SMF session detection method and a terminal, where the method includes: after the original main UPF and the original standby UPF are subjected to main-standby switching, the original standby UPF is upgraded to a new main UPF, and the new main UPF carries Recovery Time Stamp Recovery Time to the SMF through a report message; after receiving the report, the SMF judges that the original main UPF has a fault by judging that the report Time Stamp is carried, the original standby UPF is upgraded to a new main UPF, and the fault is recovered; the SMF issues a modify message aiming at all session information in a new main UPF, wherein the modify message carries all data information of a user; after receiving the modify message sent by the SMF, the new main UPF judges whether a session exists in the new main UPF; if yes, the new main UPF replies a modify response to the SMF successfully; and if the session is not abnormal, the new main UPF replies a modify response failure to the SMF, and the SMF judges that the session is abnormal in the new main UPF after receiving the modify response failure. After the original main UPF and the original standby UPF are switched, the SMF can timely find the problem of incomplete UPF information by carrying out session detection on the new main UPF, thereby achieving the purpose of quickly detecting the user service fault.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the methods described above. The computer readable storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.