Aim: From the perspective of doctor-patient communication, this research used multiple methods combined natural language processing (NLP), a cross-sectional survey and an online experiment to investigated how risk perception influenced people's vaccination intention. Methods: In Study 1, we used Python to crawl 335,045 comments about COVID-19 vaccine published in a social media platform Sina Weibo (equivalent of Twitter in China) from 31 December 2020 to 31 December 2021. Text analysis and sentiment analysis was used to examine how vaccination intention, as measured by linguistic features from the LIWC dictionary, changed with individuals' perceptions of pandemic risk. In Study 2, we adopted a cross-sectional questionnaire survey to further test the relation of risk perception, vaccination intention, trust in physicians, and perceived medical recommendations in a Chinese sample (n n = 386). In Study 3, we conducted an online experiment where we recruited 127 participants with high trust in physicians and 127 participants with low trust, and subsequently randomly allocated them into one of three conditions: control, rational recommendation, or perceptual recommendation. Results: Text and sentiment analysis revealed that the use of negative words towards COVID-19 vaccine had a significant decrease at high (vs. low) risk perception level time (Study 1). Trust in physicians mediated the effect of risk perception on vaccination intention and this effect was reinforced for participants with low (vs. high) level of perceived medical recommendation (Study 2), especially for the rational (vs. perceptual) recommendation condition (Study 3). Conclusion: Risk perception increased vaccination intention through the mediating effect of trust in physicians and the moderating effect of perceived medical recommendations. Rational (vs. perceptual) recommendation is more effective in increasing intention to get vaccinated in people with low trust in physicians.