This application is a national stage of International Application No. PCT/CN2019/077674, filed on Mar. 11, 2019, which claims priority to Chinese Patent Application No. 201810205683.2, filed on Mar. 13, 2018. Both of the aforementioned applications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

The present invention relates to the communications field, and in particular, to a protocol data unit (PDU) session establishment method and apparatus.

BACKGROUND

A 5G (5th generation mobile communication) core network supports two different access types: 3GPP (3rd Generation Partnership Project) access and non-3GPP access. When UE (user equipment) is switched from a packet data network (PDN) connection established in an EPS (evolved packet system) to a PDU (protocol data unit) session of a 5GS (5th Generation mobile communication system, 5th generation mobile communication system), the UE first registers with a 5GC (5th generation core network) via an access network, and then establishes a PDU session in a 5GC via the access network after registration succeeds.

Currently, a solution for switching UE from an EPS to a 5GS includes: The UE accesses a 5GC in a 3GPP manner by default. When the UE moves to a non-3GPP access network of a 5GS, the UE does not initiate a registration procedure or a PDU session establishment procedure via the non-3GPP access network even if the PDN connection supports access in a non-3GPP manner. However, the UE performs the registration procedure and the PDU session establishment procedure after moving to a 3GPP access network of a 5GS. This increases latency for the UE to access the 5GS.

SUMMARY

To resolve the technical problem, embodiments of the present invention provide a PDU session establishment method and apparatus. When a PDN connection established in an EPS is switched to a PDU session in a 5GS, access is performed based on an access type supported by the PDN connection, to reduce an access failure probability.

According to a first aspect, this application provides a PDU session establishment method, including: receiving, by a terminal device in a process of establishing a PDN connection in a first system, an access type that is sent by a core network device, where the PDN connection is established in a core network of the first system; and establishing, by the terminal device, a PDU session associated with the PDN connection in a second system via an access network indicated by the access type.

The first system and the second system each include two parts: an access network and a core network. This application relates to a scenario in which the PDN connection established in the core network of the first system is switched to the PDU session in the core network of the second system. An access type of the PDN connection indicates a type of an access network supported during registration and PDU session establishment. When the terminal device moves from the access network of the first system to the access network of the second system, the terminal device needs to determine whether a type of the access network of the second system matches an access type carried in a PCO message. If the type of the access network of the second system matches the access type carried in the PCO message, the terminal device can register with and establish the PDU session in the core network of the second system via a current access network.

In a possible design, the core network device includes a PGW-C(PDN gateway−control)+an SMF.(session management function)

In a possible design, the first system includes an EPS, and the second system includes a 5GS.

In a possible design, the access type includes 3GPP access and non-3GPP access.

In a possible design, the registering, by the terminal device, with the core network of the second system and establishing a PDU session associated with the PDN connection via an access network indicated by the access type includes:

registering, by the terminal device, with a core network of a 5GS via a 3GPP access network, and after registration succeeds, establishing, by the terminal device in the core network of the 5GS via the 3GPP access network, the PDU session associated with the PDN connection;

registering, by the terminal device, with a core network of a 5GS via a non-3GPP access network, and after registration succeeds, establishing, by the terminal device, the PDU session in the core network of the 5GS via the non-3GPP access network; or

registering, by the terminal device, with a core network of a 5GS via a 3GPP access network and a non-3GPP access network, and after registration succeeds, establishing, by the terminal device, the PDU session in the core network of the 5GS via the 3GPP access network and the non-3GPP access network.

In a possible design, after successfully establishing the PDU session, the terminal device obtains a URSP (UE route selection policy) rule of an application and a parameter of the PDU session. If the parameter of the PDU session matches the URSP rule of the application, the terminal device binds the application to the PDU session.

Alternatively, if the parameter of the PDU session does not match the URSP rule of the application, the terminal device skips binding the application to the PDU session, or releases the PDU session.

In implementation of this embodiment of the present invention, when the terminal device needs to be switched from the PDN connection of the first system to the PDU session of the second system, the terminal device performs registration and PDU session establishment based on the access type supported by the to-be-switched PDU session, to avoid a case in which when the terminal device does not know the access type of the PDU session, the terminal device does not perform registration and PDU session establishment when the terminal device is switched to an access network supported by a PDU session, to reduce a PDU session establishment latency, or avoid a case in which when the terminal device does not know the access type of the PDU session, for the PDU session is established in the 5GS, switching cannot be performed between the 3GPP access and the non-3GPP access.

According to a second aspect, this application provides a PDU session establishment apparatus, including:

a receiving unit, configured to receive: in a process of establishing a PDN connection in a first system, an access type that is sent by a core network device and that corresponds to the PDN connection in a second system; and

a processing unit, configured to: when the terminal device moves to the second system, establish a PDU session in the second system via an access network indicated by the access type, where the PDU session is associated with the PDN connection.

In a possible design, that a processing unit is configured to receive, in a process of establishing a PDN connection in a first system, an access type that is sent by a core network device and that corresponds to the PDN connection in a second system includes:

receiving a protocol configuration option PCO sent by the core network device, where the PCO carries the access type supported by the PDN connection in the second system.

In a possible design, the core network device includes a PGW-C+an SMF.

In a possible design, the access type includes 3GPP access and non-3GPP access.

In a possible design, the processing unit is further configured to:

register with the second system via the access network indicated by the access type.

In a possible design, that the processing unit registers with the second system via the access network indicated by the access type includes: registering with the second system via a 3GPP access network;

registering with the second system via a non-3GPP access network; or

registering with the second system via both a 3GPP access network and a non-3GPP access network.

In a possible design, the processing unit is further configured to:

determine to use a terminal device route selection policy (URSP) rule corresponding to an application of the PDU session; and

when a parameter of the PDU session does not match the URSP rule of the application, skip binding the application to the PDU session or release the PDU session.

Another aspect of this application provides an apparatus. The apparatus has functions of implementing behaviors of the terminal device in the possible implementation methods of the first aspect. The function may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or the software includes one or more units corresponding to the foregoing functions.

Another aspect of this application provides an apparatus. The apparatus includes a memory and a processor. The memory stores a group of program code, and the processor is configured to invoke the program code stored in the memory, to perform the first aspect and the possible implementations of the first aspect.

Another aspect of this application provides a computer-readable storage medium. The computer-readable storage medium stores an instruction, and when the instruction is run on a computer, the computer is enabled to perform the method according to the foregoing aspects.

Another aspect of this application provides a computer program product including an instruction, and when the computer program product runs on a computer, the computer is enabled to perform the method according to the foregoing aspects.

