In order to make up for the high demand of supervised information in supervised learning, a self-supervised learning method based on minimal prior knowledge was proposed. Firstly, the unlabeled data were clustered on the basis of the prior knowledge of data, or the initial labels were generated for unlabeled data based on center distances of labeled data. Secondly, the data were selected randomly after labeling, and the machine learning method was selected to build sub-models. Thirdly, the weight and error of each data extraction were calculated to obtain average error of the data as the data label degree for each dataset, and set an iteration threshold based on the initial data label degree. Finally, the termination condition was determined on the basis of comparing the data-label degree and the threshold during the iteration process. Experimental results on 10 UCI public datasets show that compared with unsupervised learning algorithms such as K-means, supervised learning methods such as Support Vector Machine (SVM) and mainstream self-supervised learning methods such as TabNet (Tabular Network), the proposed method achieves high classification accuracy on unbalanced datasets without using labels or on balanced datasets using limited labels.