This invention relates to the field of text classification technology, and more particularly to a text classification method, medium, and device. It dynamically determines the first parallel
inference quantity M using computational resources, achieving a balance between
computational resource utilization and
inference stability. By initiating multi-threaded parallel
inference, it generates M candidate output sequences containing a first intermediate
semantic representation and a first text
classification result, covering different inference logics of the model for the
target text. This approach balances result diversity and inference efficiency, reducing classification errors caused by single-sequence inference bias. Through compliance
verification and confidence assessment, it calculates a first
quality score to obtain the target
classification result. This not only filters sequences containing security risks or structural defects, ensuring the security of the classification process, but also distinguishes the reliability differences of the classification results, avoiding one-sided judgments that ignore reliability based solely on labels. In scenarios without real labels, it achieves
objective quality quantification, ensuring the accuracy of the text classification results.