Based on the analysis of the shortcomings of the density-based clustering algorithm DBSCAN and its improved algorithm, an improved algorithm of DBSCAN based on self-variation of threshold value is proposed: AT_DBSCAN algorithm. The algorithm calculates the distribution characteristics of the shortest neighbor distance of each node in the data set, and then calculates the distribution of different densities in the data set according to the distribution characteristics, and finally determines the different radius thresholds of different density distribution data areas based on this. In this way, different radius thresholds ε can be used for data in different areas to accept DBSCAN algorithm clustering. On the whole, it basically solves the unreasonable clustering results caused by the unfavorable selection of the parameter value ε at the initial stage of the DBSCAN algorithm, and the unreasonable clustering of data with different density distributions. The experimental results show that the algorithm has a good clustering effect, and the algorithm first obtains the radius threshold ε without manual setting, which is of great significance.