A network slicing method, comprising: obtaining metadata information of each of multiple traffic flows, wherein the metadata information of the traffic flow is used to indicate a flow feature of the traffic flow; determining a classification policy according to metadata information of the multiple traffic flows, wherein the classification policy comprises a classification criterion of at least one traffic flow type, each traffic flow type includes a description that is of a flow feature of the traffic flow and that is made from multiple metadata dimensions and the classification criterion comprises for each of the multiple metadata dimensions a description of a range or a value of metadata of the traffic flow type; determining a network slicing policy according to the classification policy, wherein the network slicing policy is used to divide a network into at least one network slice, the network slicing policy comprises a mapping relationship between a traffic flow type and a network slice and a slice weight of the network slice, and the slice weight indicates a ratio of a resource of the network slice to a resource of the network, wherein the determining a network slicing policy according to the classification policy comprises determining according to the quantity of types and the classification criterion of each type of traffic flow a quantity of network slices into which the network is divided and a traffic flow type that is corresponding to each network slice; and determining a resource node policy according to the network slicing policy, wherein the resource node policy comprises a mapping relationship between at least one resource node in the network and the at least one network slice and a resource weight of each resource node, and the resource weight of the resource node indicates a ratio of a resource of each of network slices corresponding to the resource node to a resource of the resource node; wherein the metadata information of the traffic flow comprises at least the following information: packet burstiness in the traffic flow, an average packet length in the traffic flow, and a total duration of the traffic flow. obtaining metadata information of each of multiple traffic flows, wherein the metadata information of the traffic flow is used to indicate a flow feature of the traffic flow; determining a classification policy according to metadata information of the multiple traffic flows, wherein the classification policy comprises a classification criterion of at least one traffic flow type, each traffic flow type includes a description that is of a flow feature of the traffic flow and that is made from multiple metadata dimensions and the classification criterion comprises for each of the multiple metadata dimensions a description of a range or a value of metadata of the traffic flow type; determining a network slicing policy according to the classification policy, wherein the network slicing policy is used to divide a network into at least one network slice, the network slicing policy comprises a mapping relationship between a traffic flow type and a network slice and a slice weight of the network slice, and the slice weight indicates a ratio of a resource of the network slice to a resource of the network, wherein the determining a network slicing policy according to the classification policy comprises determining according to the quantity of types and the classification criterion of each type of traffic flow a quantity of network slices into which the network is divided and a traffic flow type that is corresponding to each network slice; and determining a resource node policy according to the network slicing policy, wherein the resource node policy comprises a mapping relationship between at least one resource node in the network and the at least one network slice and a resource weight of each resource node, and the resource weight of the resource node indicates a ratio of a resource of each of network slices corresponding to the resource node to a resource of the resource node; wherein the metadata information of the traffic flow comprises at least the following information: packet burstiness in the traffic flow, an average packet length in the traffic flow, and a total duration of the traffic flow.