Background: Diabetes has become a global public health priority resulting in significant workforce losses and health care expenditures. Therefore, research on diabetes vulnerability has become imperative. Current methods for studying disease vulnerability mainly use qualitative research methods represented by Thematic Analysis (TCA), which has the disadvantage of being staff-intensive for long periods of time. Natural Language Processing (NLP) could achieve efficient results in information mining tasks, but we didn't find many studies talking about NLP in non-infectious chronic diseases.Methods: In this study, hyperparameters were adjusted to obtain more cost-effective model applicable to The Cities Changing Diabetes’ vulnerability data by comparing Bidirectional Encoder Representation from Transformers (BERT) and Enhanced Language Representation with Informative Entities (ERNIE) in terms of test accuracy, completion time and evaluation metrics on classification.Results: The results showed that BERT took less time for the same hyperparameter cases, and the test accuracy of ERNIE was slightly better than that of BERT. We further adjusted the Batch size of ERNIE as we found that ERNIE with the splitting ratio of 8:1:1 and Batch size of 64 had the better efficiency with the test accuracy was 97.67%, the completion time was 12min36s and Macro-F1 score was 0.9734.Conclusions: In this study, BERT overwhelmed ERNIE in terms of completion speed with the same hyperparameters. ERNIE showed higher accuracy, especially the ideal performance at the split ratio of 8:1:1 after enhancing the Batch size. From the point of view, we pursue a model with high accuracy and fast processing speed, which means that we can obtain the highest accuracy in the shortest time. It could be selected according to the actual situation in the application process.