Abstract & Overview
Welfare subsidy transaction monitoring faces significant challenges in detecting abnormal patterns that may indicate fraudulent behavior. This paper presents a novel hybrid rule-based aggregation system designed for real-time anomaly detection in welfare subsidy transactions. The proposed system addresses limitations of traditional query-intensive approaches by implementing a hybrid architecture combining in-memory caching with optimized database aggregation. The system efficiently evaluates daily (₩500,000) and monthly (₩3,000,000) transaction thresholds using composite keys while incorporating contextual business rules including age-time constraints, restricted hour violations, and regional mismatch detection. Implemented with FastAPI backend and SQL-based data management, the system achieves sub-second response times compared to traditional 30-day batch processing cycles. Performance evaluation demonstrates significant improvements in computational efficiency through o(1)cache lookup operations and elimination of redundant SQL executions. The lightweight alternative to machine learning-based solutions provides government agencies with a transparent, auditable framework for welfare fraud prevention while maintaining regulatory compliance requirements.