An optimized initial center of K-means algorithm(PKM) is proposed, which select the k furthest distance data in the high-density area as the initial cluster centers. Experiments show that the algorithm not only has a weak dependence on the initial data, but also has fast convergence and high clustering quality. To obtain effective cluster and accurate cluster, we combine the optimized K-means algorithm(PKM) and genetic algorithm into a hybrid algorithm (PGKM). It can not only improve compactness and separation of the algorithm but also automatically search for the best cluster number k, then cluster after optimizing the k-centers. The optimal cluster is not obtained until terminal conditions are met after continuously iterating. Experiments show that the algorithm has good cluster quality and overall performance.