Local network accessing method and apparatus
A local network accessing method and apparatus are provided. The local network accessing method comprises sending a trigger message to a terminal, the trigger message is for triggering the terminal to establish a session, receiving a first message from the terminal, the first message requesting to establish a first session, and the first session is for the terminal to access a target local network, determining a target network access identifier based on the first message, the target network access identifier indicating the target local network, determining a first session management function network element based on the target network access identifier, and sending the target network access identifier to the first session management function network element, the target network access identifier is for the first session management function network element to determine a target user plane function network element.
1 . A local network accessing method, comprising:
sending a trigger message to a terminal, the trigger message being for triggering the terminal to establish a session;
receiving a first message from the terminal, the first message requesting to establish a first session for the terminal to access a target local network, the first message comprising session attribute information;
determining a target network access identifier based on the session attribute information in the first message and a correspondence between the network access identifier and the session attribute, the target network access identifier indicating the target local network, wherein the correspondence between the network access identifier and the session attribute is stored during a second session, the second session is established before establishing the first session, and the network access identifier in the correspondence is determined in a process of establishing the second session;
determining a first session management function network element based on the target network access identifier; and
sending the target network access identifier to the first session management function network element, the target network access identifier is for the first session management function network element to determine a target user plane function network element.
2 . The local network accessing method according to claim 1 , wherein the method further comprises:
deleting the target network access identifier in a process of establishing the first session.
3 . The local network accessing method according to claim 2 , wherein the first message comprises a session identifier of a second session, the second session is for the terminal to access a central network, and the method further comprises:
obtaining at least one session identifier of the second session and at least one network access identifier of at least one local network corresponding to the at least one session identifier of the second session; and
the determining the target network access identifier based on the first message comprises:
determining, based on the session identifier of the second session, the target network access identifier corresponding to the session identifier of the second session.
4 . The local network accessing method according to claim 3 , wherein the obtaining the at least one session identifier of the second session and the at least one network access identifier of the at least one local network corresponding to the second session identifier of the at least one session comprises:
receiving, from a second session management function network element, the second session identifier of the at least one session and the at least one network access identifier of the at least one local network corresponding to the at least one session identifier of the second session, wherein the second session management function network element is for the terminal to establish the second session.
5 . The local network accessing method according to claim 2 , wherein the method further comprises:
receiving a first request, wherein the first request comprises the target network access identifier;
determining a session identifier of a target session corresponding to the target network access identifier; and
sending a first response to a first network element, wherein the first response comprises the session identifier of the target session, or sending second information to a second network element, wherein the second information comprises the session identifier of the target session.
6 . The local network accessing method according to claim 5 , wherein before the determining the session identifier of the target session corresponding to the target network access identifier, the method further comprises:
obtaining a correspondence between the target network access identifier and the session identifier of the target session.
7 . An apparatus, comprising:
a memory storing instructions; and
at least one processor in communication with the memory, the at least one processor configured, upon execution of the instructions, to perform the following steps:
send a trigger message to a terminal, the trigger message triggering the terminal to establish a session;
receive a first message from the terminal, the first message requesting to establish a first session for the terminal to access a target local network, the first message comprising session attribute information;
determine a target network access identifier based on the session attribute information in the first message, the target network access identifier indicating the target local network, wherein the correspondence between the network access identifier and the session attribute is stored during a second session, the second session is established before establishing the first session, and the network access identifier in the correspondence is determined in a process of establishing the second session;
determine a first session management function network element based on the target network access identifier; and
send the target network access identifier to the first session management function network element, the target network access identifier is for the first session management function network element to determine a target user plane function network element.
8 . The apparatus according to claim 7 wherein the instructions further cause the processor to:
delete the target network access identifier in a process of establishing the first session.
9 . The apparatus according to claim 8 , wherein the first message comprises a session identifier of a second session, the second session is for the terminal to access a central network, and the instructions further cause the processor to:
obtain at least one session identifier of the second session and at least one network access identifier of at least one local network corresponding to the at least one session identifier of the second session; and
determine, based on the session identifier of the second session, the target network access identifier corresponding to the session identifier of the second session.
10 . The apparatus according to claim 9 , wherein the instructions further cause the processor to:
receive, from a second session management function network element, the at least one session identifier of the second session and the at least one network access identifier of the at least one local network corresponding to the at least one session identifier of the second session, wherein the second session management function network element is for the terminal to establish the second session.
11 . The apparatus according to claim 8 , wherein the instructions further cause the processor to:
receive a first request, wherein the first request comprises the target network access identifier;
determine a session identifier of a target session corresponding to the target network access identifier; and
send a first response to a first network element, wherein the first response comprises the session identifier of the target session, or send second information to a second network element, wherein the second information comprises the session identifier of the target session.
12 . The apparatus according to claim 11 , wherein the instructions further cause the processor to, before the determining the session identifier of the target session corresponding to the target network access identifier:
obtain a correspondence between the target network access identifier and the session identifier of the target session.
13 . A local network accessing method, comprising:
sending, by an access and mobility management function, a trigger message to a terminal, the trigger message triggering the terminal to establish a session;
receiving, by the access and mobility management function, a first message from the terminal, the first message requesting to establish a first session for the terminal to access a target local network, the first message comprising session attribute information;
determining, by the access and mobility management function, a target network access identifier based on the session attribute information in the first message and a correspondence between the network access identifier and the session attribute, the target network access identifier indicating the target local network, wherein the correspondence between the network access identifier and the session attribute is stored during a second session, the second session is established before establishing the first session, and the network access identifier in the correspondence is determined in a process of establishing the second session;
determining, by the access and mobility management function, a first session management function network element based on the target network access identifier;
sending, by the access and mobility management function to the first session management function network element, the target network access identifier, the target network access identifier is for the first session management function network element to determine a target user plane function network element; and
receiving, by the first session management function network element, the target network access identifier.
14 . The method according to claim 13 , wherein the method further comprises:
deleting, by the access and mobility management function, the target network access identifier in a process of establishing the first session.