A communication method, comprising: receiving (S401, S501, S601, S701), by a session management function, SMF, network element, a first message from a terminal device, wherein the first message is used to request to establish or update a protocol data unit, PDU, session, the first message comprises first indication information, and the first indication information is indication information used to indicate that the terminal device supports a quick User Data Protocol, UDP, internet connection, QUIC, capability, or indication information used to indicate that the terminal device supports a multi-path quick UDP internet connection, MP-QUIC, capability; determining (S402, S502, S602, S702), by the SMF network element, whether a traffic flow in the PDU session is to be transmitted by using a QUIC method or an MP-QUIC method; and sending (S405, S505, S605, S705), by the SMF network element, a second message to the terminal device, wherein the second message is used to indicate that the PDU session is successfully established or updated, the second message comprises second indication information, and the second indication information is used to indicate that the traffic flow in the PDU session is to be transmitted by using the QUIC method, or is used to indicate that the traffic flow in the PDU session is to be transmitted by using the MP-QUIC method; wherein the second indication information comprises a QUIC function parameter or an MP-QUIC function parameter, and the method further comprises: obtaining, by the SMF network element, the QUIC function parameter or the MP-QUIC function parameter; characterized in that the QUIC function parameter or the MP-QUIC function parameter comprises a security parameter, and the security parameter includes a non-encryption indication. receiving (S401, S501, S601, S701), by a session management function, SMF, network element, a first message from a terminal device, wherein the first message is used to request to establish or update a protocol data unit, PDU, session, the first message comprises first indication information, and the first indication information is indication information used to indicate that the terminal device supports a quick User Data Protocol, UDP, internet connection, QUIC, capability, or indication information used to indicate that the terminal device supports a multi-path quick UDP internet connection, MP-QUIC, capability; determining (S402, S502, S602, S702), by the SMF network element, whether a traffic flow in the PDU session is to be transmitted by using a QUIC method or an MP-QUIC method; and sending (S405, S505, S605, S705), by the SMF network element, a second message to the terminal device, wherein the second message is used to indicate that the PDU session is successfully established or updated, the second message comprises second indication information, and the second indication information is used to indicate that the traffic flow in the PDU session is to be transmitted by using the QUIC method, or is used to indicate that the traffic flow in the PDU session is to be transmitted by using the MP-QUIC method; wherein the second indication information comprises a QUIC function parameter or an MP-QUIC function parameter, and the method further comprises: obtaining, by the SMF network element, the QUIC function parameter or the MP-QUIC function parameter; characterized in that the QUIC function parameter or the MP-QUIC function parameter comprises a security parameter, and the security parameter includes a non-encryption indication.