The invention provides an image classification method based on prompt incremental aggregation of an energy field and a
distance space, and the method comprises the steps: obtaining a
data set of a field
reinforcement learning scene, and the
data set comprises the data of at least one field; training is carried out through a
data set, and during training, the data of the current field and the frozen CLIP model are utilized to optimize the personalized prompt model of the field through minimizing a
loss function; during reasoning, a to-be-classified image is coded through the CLIP model to obtain a
feature vector, the distance between the
feature vector and each field is calculated, for each field, the personalized prompt model of the field is fused with the CLIP model to generate energy and
prediction probability of the to-be-classified image, a distance factor and an
energy factor are determined based on the distance and the energy, and the
prediction probability of the to-be-classified image is calculated. And combining the distance factor and the
energy factor to obtain
a domain weight, calculating a weighted sum of prediction probabilities by using the domain weight, and generating a classification mixing probability. By adopting the scheme, the cross-domain increment
adaptation capability of the model is improved.