With the rapid growth of online learning communities in China, understanding how community embeddedness influences learners' collaborative learning abilities has become increasingly important. This study examines the role of relational embeddedness in shaping users' collaborative learning and explores the moderating effects of institutional incentives and infrastructure quality. Using data from the Gitee platform, the findings show that stronger relational embeddedness enhances collaborative learning by increasing trust, interaction frequency, and knowledge sharing. Moreover, institutional incentives, such as reward systems and structured participation mechanisms, further encourage active engagement, while well-developed infrastructure, including user-friendly interfaces and stable platforms, facilitates smoother collaboration. These results suggest that improving community engagement, strengthening institutional support, and enhancing technical infrastructure can significantly boost the effectiveness of online learning. This study contributes to the theoretical understanding of online learning communities and offers practical insights for platform developers and policymakers aiming to optimize online education environments in China.