A communication method for communication in a mobile communication network, such as a 5G network, comprising: establishing a connection between a user plane connection function, UCF, network element and a terminal device through a user plane; receiving, by the UCF, a first message from the terminal device, wherein the first message comprises first information and an identifier of the terminal device, and the first information is information that needs to be sent by the terminal device to a network function, NF; learning, by the UCF, of a first service type based on the first message; learning, by the UCF based on the first service type and the identifier of the terminal device, of a first NF that serves the terminal device; and sending, by the UCF, the first information to the first NF; wherein the learning, by the UCF, of a service type based on the first message comprises: determining, by the UCF, the first service type based on first service type information, wherein the first message carries the first service type information; or learning, by the UCF, of the first service type based on a first port number corresponding to a port over which the first message is received and a correspondence between a port number and a service type; and wherein the learning, by the UCF based on the first service type and the identifier of the terminal device, of a first NF that serves the terminal device comprises: querying, by the UCF, local information based on the first service type and the identifier of the terminal device, to determine the first NF, wherein the local information comprises a correspondence between a service type and a network function; or querying, by the UCF, the first NF from a unified data management, UDM, network element based on the first service type and the identifier of the terminal device. establishing a connection between a user plane connection function, UCF, network element and a terminal device through a user plane; receiving, by the UCF, a first message from the terminal device, wherein the first message comprises first information and an identifier of the terminal device, and the first information is information that needs to be sent by the terminal device to a network function, NF; learning, by the UCF, of a first service type based on the first message; learning, by the UCF based on the first service type and the identifier of the terminal device, of a first NF that serves the terminal device; and sending, by the UCF, the first information to the first NF; wherein the learning, by the UCF, of a service type based on the first message comprises: determining, by the UCF, the first service type based on first service type information, wherein the first message carries the first service type information; or learning, by the UCF, of the first service type based on a first port number corresponding to a port over which the first message is received and a correspondence between a port number and a service type; and wherein the learning, by the UCF based on the first service type and the identifier of the terminal device, of a first NF that serves the terminal device comprises: querying, by the UCF, local information based on the first service type and the identifier of the terminal device, to determine the first NF, wherein the local information comprises a correspondence between a service type and a network function; or querying, by the UCF, the first NF from a unified data management, UDM, network element based on the first service type and the identifier of the terminal device. determining, by the UCF, the first service type based on first service type information, wherein the first message carries the first service type information; or learning, by the UCF, of the first service type based on a first port number corresponding to a port over which the first message is received and a correspondence between a port number and a service type; and wherein the learning, by the UCF based on the first service type and the identifier of the terminal device, of a first NF that serves the terminal device comprises: querying, by the UCF, local information based on the first service type and the identifier of the terminal device, to determine the first NF, wherein the local information comprises a correspondence between a service type and a network function; or querying, by the UCF, the first NF from a unified data management, UDM, network element based on the first service type and the identifier of the terminal device. querying, by the UCF, local information based on the first service type and the identifier of the terminal device, to determine the first NF, wherein the local information comprises a correspondence between a service type and a network function; or querying, by the UCF, the first NF from a unified data management, UDM, network element based on the first service type and the identifier of the terminal device.