In massive open online course (MOOC) discussion board, students' learning experience, reflecting implicit cognitive and affective states, is related to their learning outcomes and course's completion rates. The majority of researches about learning experience identification in MOOCs depend on post-hoc questionnaires, which may encounter issues such as personal biases, hazy memories, or time constraints, and distribution difficulty in MOOCs. Moreover, learning experience is influenced by students' interactions during learning but their relationship has not been thoroughly explored. This study aimed to address these issues. Firstly, it proposed an artificial intelligence-based text analysis approach for automatically identifying patterns of learning experiences from the large-scale students' posts in MOOC discussion board. It had performance advantage in terms of accuracy when compared with the other competing approaches. Secondly, this study defined students' interactive roles from both social relations and interaction behaviors in MOOC discussion board, and analyzed learning experiences corresponding to the different interactive roles. For students with high participation and low influence in interactions, flow and boredom were prone to happen, while for students with low participation and high influence in interactions, anxiety and apathy were easy to generate. Finally, this study revealed the effect of learning experience on learning achievement with respect to interactive role. For students with high participation characteristics, their learning achievements were less affected by learning experience, while for students less active in interaction, flow was related with good learning achievements. In summary, this study had significant methodological implications for automated learning experience identification. Moreover, this study revealed importance of interactive role in describing the interplay between learning experience and learning achievement, and provided suggestions for the improvement of MOOCs.