With the rapid development of the economy, the market regulatory department is facing a situation where the number of consumer complaints has increased significantly. But with its limited manpower, it is difficult for traditional manual managements to handle and predict such events efficiently. In this paper, the K-Means algorithm of cluster analysis is applied to the analysis of consumer complaints, and the characteristics and rules of consumer complaints are quickly extracted. Taking consumer complaint data as an example, based on the K-Means algorithm, this paper conducts cluster analysis for the goods or services involved, the complaint address and the infringement, and finds that the number of clusters close to the square root of the sample number can obtain better clustering effect, and the complaint address as the clustering feature can reveal the geographical aggregation characteristics of the complaint events, and the infringement as the clustering feature can detect some exceedingly events. The research results show that artificial intelligence can be used to quickly detect the hotspots and key points of consumer complaint incidents, and its application can not only provide strong technical support for consumer rights protection institutions, thereby improving regulatory efficiency, but also enable consumer rights protection institutions to provide consumers with consumption early warning and formulate more targeted consumer rights protection measures.