The invention relates to a text translation method and
system based on granular ball clustering. The method comprises the following steps: regularly acquiring a text
data set by adopting a crawler technology and preprocessing the text
data set; performing word segmentation
processing on the obtained text data by utilizing a word segmentation tool, and updating a word
bank by utilizing words obtained by the word segmentation
processing; on the basis of a pre-trained large
language model, coding words in the word
bank to obtain word vector representation of the words; according to the word vector representation of the words in the word
bank, adaptively generating a
synonym set of the words in the word bank by using a granular ball clustering
algorithm; using synonyms of words in the training text to replace the words to generate adversarial samples of the training text; constructing a
training set according to the training text and the adversarial sample, and training a text translation model based on a large
language model based on the constructed
training set; and translating the to-be-translated text through the trained text translation model. According to the invention, the accuracy and reliability of translation can be improved.