Arrhythmia is one of the major causes of cardiac risk events, so the study and analysis of this cause can reduce the lethality of cardiac risk events. In this paper, based on the K-Means algorithm and hierarchical analysis method, a specific research and analysis of cardiac risk events is carried out. In this paper, the K-Means algorithm is used to establish the data classification model of abnormal heart beats, the Euclidean distance is chosen as the method of data similarity calculation, and the arrhythmia is classified through the analysis of the number of clusters, and through the deviation of the coordinates of the center point of the clusters, the corresponding objects are re-divided according to the minimum distance until the coordinates of the center point of the clusters are no longer shifted. The final field variability analysis was derived and solved for the frequency and percentage of classification for each category. Then, based on the comprehensive analysis of the classification results and the characteristics of each type of arrhythmia in sinus arrhythmia, five categories were derived: sinus arrhythmia, sinus bradycardia, sinus tachycardia, sinus conduction block, and sinus arrest. Further, this study used hierarchical analysis to establish an evaluation model to evaluate the risk level of each arrhythmia category, and the higher the score, the higher the risk level. A pairwise comparison matrix was constructed by comparing each category, and the weight vector and eigenvalues of each category were calculated, resulting in a ranking of the risk level of each arrhythmia category from highest to lowest: sinus arrest, sinus block, sinus tachycardia, sinus bradycardia, and sinus arrhythmia. This methodology enables healthcare organizations to more accurately assess arrhythmia categories and their corresponding risk levels, which provides an important reference for medical decision-making and contributes to more timely and effective interventions and treatments, thus improving patients' survival rates and quality of life.