To investigate the feasibility of constructing the risk index of Echinococcus infection based on the classification of echinococcosis lesions, so as to provide insights into the management of echinococcosis. The imaging data of echinococcosis cases were collected from epidemiological surveys of echinococcosis in China from 2012 to 2016, and the detection of incident echinococcosis cases was captured from the annual echinococcosis prevention and control reports across provinces (autonomous regions) and Xinjiang Production and Construction Corps in China from 2017 to 2022. After echinococcosis lesions were classified, a risk index of Echinococcus infection was constructed based on the principle of discrete distribution marginal probability and multi-group classification data tests. The correlation between the risk index of Echinococcus infection and the detection of incident echinococcosis cases was evaluated in the provinces (autonomous regions and corps) from 2017 to 2022, and the correlations between the short and medium-term risk indices and between the medium and long-term risk indices of Echinococcus infection were examined using a univariate linear regression model. A total of 4 014 echinococcosis cases in China from 2012 to 2016 were included in this study. The short-, medium- and long-term risk indices of E. granulosus infection varied in echinococcosis-endemic provinces (autonomous regions and corps) of China (χ2 = 4.12 to 708.65, all P values < 0.05), with high short- (0.058), medium- (0.137) and long-term risk indices (0.104) in Tibet Autonomous Region, and the short-, medium- and long-term risk indices of E. multilocularis infection varied in echinococcosis-endemic provinces (autonomous regions and corps) of China (χ2 = 6.74 to 122.60, all P values < 0.05), with a high short-term risk index in Sichuan Province (0.016) and high medium- (0.009) and long-term risk indices in Qinghai Province (0.018). There were no significant correlations between the risk index of E. granulosus infection and the detection of incident cystic echinococcosis cases during the study period (t = -0.518 to 2.265, all P values > 0.05), and strong correlations were found between the risk indices of E. multilocularis infection and the detection of incident alveolar echinococcosis cases (including mixed type) in 2018, 2020, 2021, 2022, during the period from 2017 through 2020, from 2017 through 2021, from 2017 through 2022 (all r values > 0.7, t = 2.521 to 3.692, all P values < 0.05). Linear regression models were established between the risk index of E. multilocular infection and the detection of alveolar echinococcosis cases (including mixed type), and the models were all statistically significant (b = 0.214 to 2.168, t = 2.458 to 3.692, F = 6.044 to 13.629, all P values < 0.05). The regression coefficients for the correlations between the medium- and short-term, and between the long- and medium-term risk indices of E. granulosus infection were 2.339 and 0.765, and the regression coefficients for the correlations between the medium- and short-term, and between the long- and medium-term risk indices of E. multilocular infection were 0.280 and 1.842, with statistical significance seen in both the regression coefficients and regression models (t = 16.479 to 197.304, F = 271.570 to 38 928.860, all P values < 0.05). The risk index of Echinococcus infection has been successfully established based on the classification of echinococcosis lesions, which may provide insights into the prevention and control, prediction, diagnosis and treatment, and classified management of echinococcosis.