為因應物聯網需求，第三代合作夥伴計畫(3rd Generation Partnership Project, 3GPP)於Release 13中以Long Term Evolution (LTE)為基礎提出了窄頻物聯網(Narrowband Internet of Thing, NB-IoT)技術，其修改並簡化了LTE規格使其更符合物聯網裝置需求並可與現行系統並存，而在Release 14中更開放非錨載波(non-anchor carrier)支援隨機存取(Random Access)功能，如此可舒緩原UE只能透過錨載波進行隨機存取而造成網路壅塞之問題。 而原先非錨載波上行用於Narrowband Physical Uplink Shared Channel (NPUSCH)資料傳輸，當調度其支援於Narrowband Physical Random Access Channel (NPRACH)隨機存取將壓縮可傳輸之資源量，而當隨機存取資源不足將造成網路壅塞使UE無法建立radio resource control (RRC)連線上傳資料，因此eNB端如何配置非錨載波支援隨機存取而不造成資源浪費，使資源有效利用為一討論議題。 本論文提出Prediction based Random Access Resource Allocation scheme (PRARA)透過強化學習預測所需開放之資源，並以碰撞子載波(subcarrier)個數預測及動態開放二次競爭之資源，在資源許可的情況下有效使用資源並提升隨機存取之效能。 ;3rd Generation Partnership Project (3GPP) proposed NarrowBand Internet of Things (NB-IoT) based on Long Term Evolution (LTE) for IoT application in Release 13. It modifies and simplifies the LTE specification to let it be compatible with IoT devices and can coexist with existing LTE systems. In Release 14, the random access procedure can be supported in non-anchor carriers, which alleviate the problem that network congestion may occurs if UE can only random access via anchor carrier. The non-anchor carriers in uplink are used for data transmission. However, if eNB schedules non-anchor carrier for Narrowband Physical Random Access Channel (NPRACH) then it also compresses the Narrowband Physical Uplink Shared Channel (NPUSCH) resource. When NPRACH resource is insufficient, which leads to network congestion, UEs might not be able to complete radio resource control (RRC) connection. So how to configure non-anchor carriers to support random access procedure without causing waste of resources is an importance issue. In this thesis, we propose a Prediction based Random Access Resource Allocation scheme (PRARA), which firstly predicts the number of required resources based on reinforcement learning, and secondly, dynamically allocates the number of secondary contention resources according to the number of collided subcarriers. We aim to increase the performance and resource efficiency of random access in condition of limited resource.