With reference to the second aspect, in a seventh possible implementation of the second aspect, the sending, by the first UE, data to at least one second UE according to the preset parameter by using Z resources of S resources includes randomly determining, by the first UE, the Z resources from the S resources, determining whether the quantity c of conflicts of the first UE is less than a threshold C0, whether the conflict time w of the first UE is less than a threshold W0, or whether the service priority Q of the first UE or the priority of the UE is lower than a threshold Q0, and if the quantity c of conflicts of the first UE is less than the threshold C0, the conflict time w of the first UE is less than the threshold W0, or the service priority Q of the first UE or the priority of the UE is lower than the threshold Q0, determining a transmit probability P according to the preset parameter, and sending the data to the at least one second UE on the Z resources according to the transmit probability P, or if the quantity c of conflicts of the first UE is not less than the threshold C0, the conflict time w of the first UE is not less than the threshold W0, or the service priority Q of the first UE or the priority of the UE is not lower than the threshold Q0, sending the data to the at least one second UE on the Z resources.