A resource allocation method, comprising: receiving (S302, S402, S502, S602), by a second base station, resource configuration information of a first base station, wherein the resource configuration information of the first base station includes an uplink resource of the first base station and/or a downlink resource of the first base station; sending (S303, S403), by the second base station, a reference signal to user equipment, UE, wherein the reference signal is used to instruct the UE to send a setup request message; receiving (S304, S404), by the second base station, the setup request message after the first base station has notified the UE that the second base station supports D2D communication and the UE has determined, according to a measured signal received strength of the reference signal, that the UE meets a preset condition of performing D2D communication with the second base station, wherein the setup request message is directly sent by the UE to the second base station or is sent by the UE to the second base station using the first base station, and the setup request message is used to request the second base station to send the resource configuration information of the first base station to the UE; sending (S305, S405), by the second base station, the resource configuration information of the first base station to the UE, wherein the resource configuration information of the first base station is used to configure a resource for device-to-device, D2D, communication between the UE and the second base station; and performing, by the second base station with the UE, D2D communication, such that the uplink resource or the downlink resource of the first base station is reused. receiving (S302, S402, S502, S602), by a second base station, resource configuration information of a first base station, wherein the resource configuration information of the first base station includes an uplink resource of the first base station and/or a downlink resource of the first base station; sending (S303, S403), by the second base station, a reference signal to user equipment, UE, wherein the reference signal is used to instruct the UE to send a setup request message; receiving (S304, S404), by the second base station, the setup request message after the first base station has notified the UE that the second base station supports D2D communication and the UE has determined, according to a measured signal received strength of the reference signal, that the UE meets a preset condition of performing D2D communication with the second base station, wherein the setup request message is directly sent by the UE to the second base station or is sent by the UE to the second base station using the first base station, and the setup request message is used to request the second base station to send the resource configuration information of the first base station to the UE; sending (S305, S405), by the second base station, the resource configuration information of the first base station to the UE, wherein the resource configuration information of the first base station is used to configure a resource for device-to-device, D2D, communication between the UE and the second base station; and performing, by the second base station with the UE, D2D communication, such that the uplink resource or the downlink resource of the first base station is reused. <EOS>