RÉSUMÉ
Objective: To study and create the algorithm for the diversity (AD) of extensible markup language (XML) tree map, and provide a new tool for the identification of Artemisiae Annuae Herba. Method: According to the literature research, the key information of Artemisiae Annuae Herba was selected from the macroscopic, mesoscopic and microscopic information, etc. Based on the key information, the relevant upper standards of domestic and foreign professional fields were cited to assign the unique identification independent of language for each data element, and the coding rules of relevant data elements were established. The digital coding technology was applied to the flexible structure editor, and the tree map was created, which could be returned as the 5th version of hypertext markup language (HTML5) or XML format. Based on the diversity related algorithms, the authors innovatively developed the AD of XML tree map of Artemisiae Annuae Herba, which took into account both of topology and semantics, and the expression model of related mathematical functions of Artemisiae Annuae Herba was established. By comparing the calculation results with the reality, the algorithm model was debugged continuously until the convergence of the core-culvert algorithm model. Result: Through the research on AD, the diversity between two XML tree maps could be calculated, and the discrimination or identification model of Artemisiae Annuae Herba also could be finally optimized and established. After calculation and analysis of the tested tree maps, the effective rate of the model was 100%. Conclusion: In this study, the establishment of the AD of XML tree map can effectively assist in the identification of Artemisiae Annuae Herba, which provides certain technical support and theoretical guidance for the research on intelligent application of traditional Chinese medicine.