A method for transmitting D2D data, comprising: determining, by a D2D data transmitter, a state of each transmission occasion in a transmission window in a same way as a D2D data receiver, wherein the transmission window is equally divided into a plurality of transmission occasions, and the state of a transmission occasion comprises a data transmission state and a silent state; and transmitting, by the D2D data transmitter, D2D data to the D2D data receiver on each transmission occasion with the data transmission state in the transmission window; wherein the method further comprises: transmitting, by the D2D data transmitter, identifier information to the D2D data receiver; wherein the identifier information is initialized identifier information of a scrambling sequence for transmitting the D2D data in the transmission window; and/or the identifier information is initialized identifier information of a Demodulation Reference Signal, DMRS sequence for transmitting the D2D data in the transmission window; and/or the identifier information determines the state of each transmission occasion in the transmission window; wherein the identifier information which is the initialized identifier information of the scrambling sequence for transmitting the D2D data in the transmission window, the identifier information which is the initialized identifier information of the DMRS sequence for transmitting the D2D data in the transmission window, and/or the identifier information determining the state of the each transmission occasion are or are not the same identifier information; and when there is different identifier information, transmitting, by the D2D data transmitter, the identifier information to the D2D data receiver comprises: transmitting, by the D2D data transmitter, the different identifier information respectively to the D2D data receiver. determining, by a D2D data transmitter, a state of each transmission occasion in a transmission window in a same way as a D2D data receiver, wherein the transmission window is equally divided into a plurality of transmission occasions, and the state of a transmission occasion comprises a data transmission state and a silent state; and transmitting, by the D2D data transmitter, D2D data to the D2D data receiver on each transmission occasion with the data transmission state in the transmission window; wherein the method further comprises: transmitting, by the D2D data transmitter, identifier information to the D2D data receiver; wherein the identifier information is initialized identifier information of a scrambling sequence for transmitting the D2D data in the transmission window; and/or the identifier information is initialized identifier information of a Demodulation Reference Signal, DMRS sequence for transmitting the D2D data in the transmission window; and/or transmitting, by the D2D data transmitter, identifier information to the D2D data receiver; wherein the identifier information is initialized identifier information of a scrambling sequence for transmitting the D2D data in the transmission window; and/or the identifier information is initialized identifier information of a Demodulation Reference Signal, DMRS sequence for transmitting the D2D data in the transmission window; and/or the identifier information determines the state of each transmission occasion in the transmission window; wherein the identifier information which is the initialized identifier information of the scrambling sequence for transmitting the D2D data in the transmission window, the identifier information which is the initialized identifier information of the DMRS sequence for transmitting the D2D data in the transmission window, and/or the identifier information determining the state of the each transmission occasion are or are not the same identifier information; and when there is different identifier information, transmitting, by the D2D data transmitter, the identifier information to the D2D data receiver comprises: transmitting, by the D2D data transmitter, the different identifier information respectively to the D2D data receiver.