A method of inserting a Session Management Function, SMF, the method being applied for an Access and Mobility Management Function, AMF, entity and comprising: in a case that a User Equipment,UE, moves out of a service area of a first SMF entity currently serving a first Packet Data Unit,PDU, session of the UE, or in a case that selecting for the UE a SMF entity different from a first SMF entity currently serving a first Packet Data Unit PDU session of the UE is needed, querying, by using information relevant to the UE, a second SMF entity capable of serving the UE; and updating the first PDU session by using the second SMF entity, wherein in a case that the UE moves out of the service area of the first SMF entity currently serving the first PDU session of the UE, or in a case that selecting for the UE a SMF entity different from the first SMF entity currently serving the first PDU session of the UE is needed, querying, by using information relevant to the UE, the second SMF entity capable of serving the UE, comprises: determining that the UE moves out of the service area of the first SMF entity according to information of the service area of the first SMF entity provided by a Network Repository Function NRF entity; and querying, by using the information relevant to the UE, the second SMF entity capable of serving the UE; wherein determining that the UE moves out of the service area of the first SMF entity according to information of the service area of the first SMF entity provided by the NRF entity, comprises: obtaining and storing the information of the service area of the first SMF entity provided by the NRF entity; and determining, according to the information of the service area of the first SMF entity during a registration update process, a service request process, or a handover process of the UE, that the UE moves out of the service area of the first SMF entity. in a case that a User Equipment,UE, moves out of a service area of a first SMF entity currently serving a first Packet Data Unit,PDU, session of the UE, or in a case that selecting for the UE a SMF entity different from a first SMF entity currently serving a first Packet Data Unit PDU session of the UE is needed, querying, by using information relevant to the UE, a second SMF entity capable of serving the UE; and updating the first PDU session by using the second SMF entity, wherein in a case that the UE moves out of the service area of the first SMF entity currently serving the first PDU session of the UE, or in a case that selecting for the UE a SMF entity different from the first SMF entity currently serving the first PDU session of the UE is needed, querying, by using information relevant to the UE, the second SMF entity capable of serving the UE, comprises: determining that the UE moves out of the service area of the first SMF entity according to information of the service area of the first SMF entity provided by a Network Repository Function NRF entity; and querying, by using the information relevant to the UE, the second SMF entity capable of serving the UE; determining that the UE moves out of the service area of the first SMF entity according to information of the service area of the first SMF entity provided by a Network Repository Function NRF entity; and querying, by using the information relevant to the UE, the second SMF entity capable of serving the UE; wherein determining that the UE moves out of the service area of the first SMF entity according to information of the service area of the first SMF entity provided by the NRF entity, comprises: obtaining and storing the information of the service area of the first SMF entity provided by the NRF entity; and determining, according to the information of the service area of the first SMF entity during a registration update process, a service request process, or a handover process of the UE, that the UE moves out of the service area of the first SMF entity. obtaining and storing the information of the service area of the first SMF entity provided by the NRF entity; and determining, according to the information of the service area of the first SMF entity during a registration update process, a service request process, or a handover process of the UE, that the UE moves out of the service area of the first SMF entity.