The invention discloses a harmful text content detection method and device,
electronic equipment and a storage medium, relates to the technical field of natural languages, and mainly aims to solve the problem of poor
text detection accuracy caused by missing detection and
false detection of harmful text content. The method comprises the steps of performing sensitive word matching on a to-be-detected text statement based on a first
data set, wherein the first
data set comprises a plurality of sensitive words; performing first detection on the text statement matched with the sensitive word based on a semantic detection model to obtain a first detection result, the semantic detection model being obtained by performing model training on a lightweight
natural language processing model based on a second
data set, statement samples in the second data set are statements including sensitive words and having harmless meanings; and performing second detection on the harmful statements in the first detection result based on a large
language model to obtain a second detection result, and generating a harmful text content detection result based on
verification information of the second detection result.