第五代行動通訊技術(5th generation mobile networks, 5G)中提出了三大應用場景，其中一個為大規模機器型通訊(Massive Machine Type Communications, mMTC)，其應用於萬物聯網的場景之下，為了實現此一場景，有人提出了免許可(grant-free)的機制與稀疏碼多工存取的多工方式，在預先定義好的資源上給多個使用者進行傳送，以提升資源使用效率。 在上行免許可稀疏碼多工存取的場景下，用戶設備將根據mapping rule選取CTU(Contention transmission Unit)進行傳送，而當多個UE選取相同CTU進行上傳時便會發生碰撞。為了降低碰撞率並提升傳輸效率，本篇論文提出了兩階段CTU分配方式(Two-stage CTU Allocation, TCA)，期望可以透過此一方式確認用戶設備真的有資料要傳送再讓UE獨占CTU。另外，本論文也嘗試結合TCA與機器學習來分配資源，希望能夠進一步改善傳輸的效率。 根據本論文之模擬結果，印證了TCA在各項數據結果都有不錯的成績，尤其在較大的流量負載下更能夠明顯看出其有較佳的表現，而TCA結合機器學習的方式相較於TCA僅適用於UE數量較少之場景下，且其改善幅度有限。 ;There are three main uses cases for 5th generation mobile networks (5G), one of the cases is Massive Machine Type Communications (mMTC), which is applied to Internet of Things. To implement this scenario, someone has proposed the grant-free transmission and Sparse Code Multiple Access (SCMA), that means users can transmit data over the predefined resource to improve the resource usage. In uplink grant-free SCMA transmission, UE has to choose CTU to uplink data according to mapping rule. The CTU would collided when more than two UEs choose the same CTU to uplink data. To reduce collision rate and improve transmission efficiency, this thesis proposed Two-stage CTU Allocation method (TCA), which intend to make UEs own dedicated CTU only when the UEs has data to transmit. Hoping to have better results, this thesis also attempts to combine TCA with machine learning for resource allocation. According to the simulation of this thesis, TCA has good performance in several aspects, and it can have better performance in situation with higher traffic load. However, the improvement of resource allocation by using TCA with machine learning is suitable for scenarios with lower number of UEs and its improvement is limited.