Although metaphor has long been recognized as a rhetorical pattern, it is in fact more of a cognitive device and a way of thinking that plays an indispensable role in enriching the form and connotation of language. The study extracts the characteristics of characters’ costumes in the novel text by utilizing the CRF method, and applies the Jieba participle and deactivation lexicon to clean the text with data. TF-IDF algorithm, graph theory and social network analysis, LDA topic modeling and sentiment analysis are used to construct a multi-level data mining method. Taking the Ming Dynasty novel Jin Ping Mei as the research object, high-frequency feature words are extracted from the text of the novel, the relationship network of the core characters of the novel is analyzed, and the LDA theme model is constructed to comprehensively excavate the metaphorical themes of the novel’s costumes, and four themes are found: the costumes of the noble women of the powerful families, the daily costumes of the women of the city, the costumes of the male government officials and businessmen, and the costumes of the festivals and special occasions, so as to achieve the visualization of the costume metaphors and the depth of interpretation. We realized the visualization and in-depth interpretation of clothing metaphors.