An uplink data transmission method, performed by a terminal device, receiving configuration information from a network device, wherein the configuration information comprises a sounding reference signal, SRS, resource set, a value of a usage parameter of the SRS resource set is configured as a codebook, the SRS resource set comprises N SRS resources, and N is an integer greater than 0; receiving downlink control information from the network device and jointly determining, by using a spatial rank index, SRI, field and a transmitted precoding matrix indicator, TPMI, field in the downlink control information, M SRS resources used for uplink data transmission, wherein M is an integer greater than or equal to 1 and less than or equal to N, wherein the jointly determining M SRS resources used for uplink data transmission comprises: if a quantity of antenna ports corresponding to a precoding matrix indicated by the TPMI field is equal to a sum of quantities of antenna ports of the N SRS resources, determining that M is equal to N, and the M SRS resources used to send the uplink data are the N SRS resources; and if the quantity of antenna ports corresponding to the precoding matrix indicated by the TPMI field is less than the sum of quantities of antenna ports of the N SRS resources, determining that M is less than N and determining the M SRS resources by using the SRI field; and sending uplink data by using the M SRS resources. receiving configuration information from a network device, wherein the configuration information comprises a sounding reference signal, SRS, resource set, a value of a usage parameter of the SRS resource set is configured as a codebook, the SRS resource set comprises N SRS resources, and N is an integer greater than 0; receiving downlink control information from the network device and jointly determining, by using a spatial rank index, SRI, field and a transmitted precoding matrix indicator, TPMI, field in the downlink control information, M SRS resources used for uplink data transmission, wherein M is an integer greater than or equal to 1 and less than or equal to N, wherein the jointly determining M SRS resources used for uplink data transmission comprises: if a quantity of antenna ports corresponding to a precoding matrix indicated by the TPMI field is equal to a sum of quantities of antenna ports of the N SRS resources, determining that M is equal to N, and the M SRS resources used to send the uplink data are the N SRS resources; and if the quantity of antenna ports corresponding to the precoding matrix indicated by the TPMI field is less than the sum of quantities of antenna ports of the N SRS resources, determining that M is less than N and determining the M SRS resources by using the SRI field; and sending uplink data by using the M SRS resources. if a quantity of antenna ports corresponding to a precoding matrix indicated by the TPMI field is equal to a sum of quantities of antenna ports of the N SRS resources, determining that M is equal to N, and the M SRS resources used to send the uplink data are the N SRS resources; and if the quantity of antenna ports corresponding to the precoding matrix indicated by the TPMI field is less than the sum of quantities of antenna ports of the N SRS resources, determining that M is less than N and determining the M SRS resources by using the SRI field; and sending uplink data by using the M SRS resources.