Based on the basic characteristics of sample accounts involved in gambling and fraud, this paper constructs a risk identification model for gambling and fraud in bank personal settlement accounts through machine learning algorithms, uses the model to accurately identify suspected fraudulent accounts, and analyzes risks through key features of gambling and fraud. The rules of account behavior provide decision support for the establishment of anti-fraud models. The model proposed in this paper can enhance the recognition accuracy and predictability based on the collision rules, and effectively avoid the problem of blocking normal accounts by mistake.