The invention discloses a real-time topic tweet classification method and device based on small samples, and the method comprises the steps: S1, obtaining original tweet sample data, and marking the data; s2, dividing the original tweet data marked with the data into a
training set and a
verification set, and performing preprocessing; s3, establishing a
word embedding model, inputting the preprocessed
training set data into the model for training, and converting the
labeled data into word vector representation; s4, establishing a classifier model, transmitting the
training set data into the classifier model, and performing pre-training by taking a
mask language modeling task as a target task; s5, obtaining tweet data containing each target topic specific keyword on each large
social network site through a
web crawler, and performing incremental training on the model; s6, inputting the
verification set data into the text classifier to obtain a final topic tweet
classification result; s7, repeatedly executing the incremental training process in the step S5 in real time by taking day as a unit; the problem that a traditional text classification method depends on large-scale marked data is solved.