The application discloses a
data balancing method and device, equipment and storage medium, and relates to the technical field of computers. The method comprises the following steps: performing hash
processing on first samples and second samples in a
data set, and mapping the first samples and the second samples into first hash buckets and second hash buckets; determining second samples matched with the first samples in the first hash buckets from second hash buckets adjacent to first hash buckets in the first hash buckets; searching in adjacent hash buckets in a counterfactual search process, reducing a search range, reducing a search amount, and improving search efficiency. Then, based on a feature relationship between the first samples and the second samples, third samples in the second samples are processed to obtain fourth samples. The labels of the fourth samples are consistent with the labels of the first samples, and
data balancing is realized. Since the time required by the search process is shortened, the efficiency of
data balancing is improved.