1. A network access method, comprising:obtaining a network service identifier of a requested network service;
obtaining access information based on the network service identifier, wherein the access information comprises a network slice identifier and a network slice type identifier that correspond to the network service identifier;
determining, based on the network slice type identifier, an access mode corresponding to a network slice type; and
accessing, based on the access mode corresponding to the network slice type, a network slice corresponding to the network slice identifier.