A computer program product comprising instructions which, when the program is executed by a computing device, cause the computing device to carry out the steps of: determining configuration information related to a resource allocation mode to be adopted by a User Equipment, UE, the resource allocation mode comprising one of a network scheduling mode and a UE autonomous selection mode ; and transmitting the configuration information to the UE , to enable the UE to select a resource allocation mode from one of the network scheduling mode and the UE autonomous selection mode, the configuration information comprising Quality of Service, QoS, information of a D2D service corresponding to each resource allocation mode; wherein the network scheduling mode is a mode in which the UE transmits a D2D signal on a resource indicated by the resource allocation information; and the UE autonomous selection mode is a mode in which the UE transmits the D2D signal on a resource selected by the UE initiatively from a resource pool, wherein the D2D service comprises a D2D discovery service and a D2D communication service; the determining the configuration information related to the resource allocation mode to be adopted by the UE further comprises: receiving support capability for the resource allocation mode and resource requirement information reported by the UE; and determining the configuration information related to the resource allocation mode to be adopted by the UE in accordance with the support capability reported by the UE. determining configuration information related to a resource allocation mode to be adopted by a User Equipment, UE, the resource allocation mode comprising one of a network scheduling mode and a UE autonomous selection mode ; and transmitting the configuration information to the UE , to enable the UE to select a resource allocation mode from one of the network scheduling mode and the UE autonomous selection mode, the configuration information comprising Quality of Service, QoS, information of a D2D service corresponding to each resource allocation mode; wherein the network scheduling mode is a mode in which the UE transmits a D2D signal on a resource indicated by the resource allocation information; and the UE autonomous selection mode is a mode in which the UE transmits the D2D signal on a resource selected by the UE initiatively from a resource pool, wherein the D2D service comprises a D2D discovery service and a D2D communication service; the determining the configuration information related to the resource allocation mode to be adopted by the UE further comprises: receiving support capability for the resource allocation mode and resource requirement information reported by the UE; and determining the configuration information related to the resource allocation mode to be adopted by the UE in accordance with the support capability reported by the UE. receiving support capability for the resource allocation mode and resource requirement information reported by the UE; and determining the configuration information related to the resource allocation mode to be adopted by the UE in accordance with the support capability reported by the UE. <EOS>