A method for allocating resource, the method comprising: determining, by an eNB, whether there are available resources in a shared transmission resource pool by UEs in a first mode and UEs in a second mode, wherein transmission resources of the UEs in the first mode are allocated by the eNB, and transmission resources of the UEs in the second mode are selected by the UEs in the second mode from the shared transmission resource pool; and when the eNB determines that there are available resources in the shared transmission resource pool, allocating, by the eNB, transmission resources for one or more of the UEs in the first mode based on the available resources; wherein determining, by the eNB, whether there are available resources in the shared transmission resource pool shared by the UEs in the first mode and the UEs in the second mode comprises: receiving, by the eNB, resource state information sent by one or more external devices, wherein the resource state information characterizes states of transmission resources in the shared transmission resource pool by the UEs in the first mode and the UEs in the second mode; and determining, by the eNB, whether there are available resources in the shared transmission resource pool, according to the resource state information and information about the transmission resources which have been allocated by the eNB; wherein the external devices at least comprise the UEs in the first mode, and/or the UEs in the second mode; wherein the resource state information comprises: resource state information characterizing the states of the transmission resources at a sub-channel level; and/or resource state information characterizing the states of the transmission resources at a sub-channel set level; and/or resource state information characterizing the states of the transmission resources at a sub-frame level. determining, by an eNB, whether there are available resources in a shared transmission resource pool by UEs in a first mode and UEs in a second mode, wherein transmission resources of the UEs in the first mode are allocated by the eNB, and transmission resources of the UEs in the second mode are selected by the UEs in the second mode from the shared transmission resource pool; and when the eNB determines that there are available resources in the shared transmission resource pool, allocating, by the eNB, transmission resources for one or more of the UEs in the first mode based on the available resources; wherein determining, by the eNB, whether there are available resources in the shared transmission resource pool shared by the UEs in the first mode and the UEs in the second mode comprises: receiving, by the eNB, resource state information sent by one or more external devices, wherein the resource state information characterizes states of transmission resources in the shared transmission resource pool by the UEs in the first mode and the UEs in the second mode; and determining, by the eNB, whether there are available resources in the shared transmission resource pool, according to the resource state information and information about the transmission resources which have been allocated by the eNB; wherein the external devices at least comprise the UEs in the first mode, and/or the UEs in the second mode; receiving, by the eNB, resource state information sent by one or more external devices, wherein the resource state information characterizes states of transmission resources in the shared transmission resource pool by the UEs in the first mode and the UEs in the second mode; and determining, by the eNB, whether there are available resources in the shared transmission resource pool, according to the resource state information and information about the transmission resources which have been allocated by the eNB; wherein the external devices at least comprise the UEs in the first mode, and/or the UEs in the second mode; wherein the resource state information comprises: resource state information characterizing the states of the transmission resources at a sub-channel level; and/or resource state information characterizing the states of the transmission resources at a sub-channel set level; and/or resource state information characterizing the states of the transmission resources at a sub-frame level. resource state information characterizing the states of the transmission resources at a sub-channel level; and/or resource state information characterizing the states of the transmission resources at a sub-channel set level; and/or resource state information characterizing the states of the transmission resources at a sub-frame level.