A resource allocation method, comprising: determining, by a network device, a quality of service, QoS, attribute of a first terminal device; and allocating a transmission resource to the first terminal device according to the QoS attribute, wherein the transmission resource is configured to be used by the first terminal device to send data to a second terminal device, wherein the QoS attribute comprises a data transmission rate and a reliability requirement of the first terminal device; wherein determining, by the network device, the quality of service, QoS, attribute of the first terminal device comprises: receiving, by the network device, QoS, attribute information sent by the first terminal device or a core-network network element; and determining the QoS attribute of the first terminal device according to the QoS attribute information, characterized in that the QoS attribute information comprises the data transmission rate and a packet loss rate of the first terminal device, and wherein the data transmission rate comprises three data transmission rates; the reliability requirement is quantized by using the packet loss rate; the packet loss rate comprises three packet loss rates; there are 9 combinations for the three data transmission rates and the three packet loss rates; an index is defined for each of the nine combinations, a mapping relationship between the nine combinations and nine different indexes is established; the network device determines that the QoS attribute information comprises a target index, the target index is any one of the nine indexes; and a combination of the data transmission rate and the packet loss rate corresponding to the target index is determined as the QoS attribute of the first terminal device. determining, by a network device, a quality of service, QoS, attribute of a first terminal device; and allocating a transmission resource to the first terminal device according to the QoS attribute, wherein the transmission resource is configured to be used by the first terminal device to send data to a second terminal device, wherein the QoS attribute comprises a data transmission rate and a reliability requirement of the first terminal device; wherein determining, by the network device, the quality of service, QoS, attribute of the first terminal device comprises: receiving, by the network device, QoS, attribute information sent by the first terminal device or a core-network network element; and determining the QoS attribute of the first terminal device according to the QoS attribute information, characterized in that the QoS attribute information comprises the data transmission rate and a packet loss rate of the first terminal device, and wherein the data transmission rate comprises three data transmission rates; the reliability requirement is quantized by using the packet loss rate; the packet loss rate comprises three packet loss rates; there are 9 combinations for the three data transmission rates and the three packet loss rates; an index is defined for each of the nine combinations, a mapping relationship between the nine combinations and nine different indexes is established; the network device determines that the QoS attribute information comprises a target index, the target index is any one of the nine indexes; and a combination of the data transmission rate and the packet loss rate corresponding to the target index is determined as the QoS attribute of the first terminal device. receiving, by the network device, QoS, attribute information sent by the first terminal device or a core-network network element; and determining the QoS attribute of the first terminal device according to the QoS attribute information, characterized in that the QoS attribute information comprises the data transmission rate and a packet loss rate of the first terminal device, and wherein the data transmission rate comprises three data transmission rates; the reliability requirement is quantized by using the packet loss rate; the packet loss rate comprises three packet loss rates; there are 9 combinations for the three data transmission rates and the three packet loss rates; an index is defined for each of the nine combinations, a mapping relationship between the nine combinations and nine different indexes is established; the network device determines that the QoS attribute information comprises a target index, the target index is any one of the nine indexes; and a combination of the data transmission rate and the packet loss rate corresponding to the target index is determined as the QoS attribute of the first terminal device.