A network function, NF, service discovery method, comprising: after establishing a communication connection to an NF, obtaining (S102), by a network function repository function, NRF, a digital certificate of the NF in a transport layer security, TLS, protocol or datagram transport layer security, DTLS, protocol two-way authentication process, wherein the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF; receiving (S103), by the NRF, a query request that is for querying an address of a target service and that is sent by the NF, wherein the query request carries a complete domain name of the target service, the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, when another NF in which the target service queried by the NF is located belongs to the same slice as the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the other NF when the other NF belongs to a different slice than the NF, and the management domain name of the NF or the other NF comprises a respective network slice identifier and an identifier of a network to which a network slice belongs; and performing (S104), by the NRF, verification based on the service name of the target service, a digital certificate of the other NF, and the digital certificate of the NF, and sending the address of the target service to the NF when the verification succeeds. after establishing a communication connection to an NF, obtaining (S102), by a network function repository function, NRF, a digital certificate of the NF in a transport layer security, TLS, protocol or datagram transport layer security, DTLS, protocol two-way authentication process, wherein the digital certificate of the NF carries a service name of the NF, a service name list on which the NF relies, and a service name list that relies on the NF; receiving (S103), by the NRF, a query request that is for querying an address of a target service and that is sent by the NF, wherein the query request carries a complete domain name of the target service, the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the NF, when another NF in which the target service queried by the NF is located belongs to the same slice as the NF, or the complete domain name of the target service is a domain name formed by a service name of the target service and a management domain name of the other NF when the other NF belongs to a different slice than the NF, and the management domain name of the NF or the other NF comprises a respective network slice identifier and an identifier of a network to which a network slice belongs; and performing (S104), by the NRF, verification based on the service name of the target service, a digital certificate of the other NF, and the digital certificate of the NF, and sending the address of the target service to the NF when the verification succeeds. <EOS>