Lendbuzz OA 面试真题解析:Bank Transaction Analysis System

19次阅读
没有评论

System Design Question: Bank Transaction Analysis System

Problem Statement

You are designing a system that pulls user bank transactions from external financial institutions and analyzes them based on predefined rules. The system should allow users to connect their bank accounts, fetch transaction data, and apply custom rules for categorization, fraud detection, and spending analysis.

Key Requirements:

  • Bank Account Integration
  • Users should be able to connect multiple bank accounts via third-party APIs.
  • The system should do an initial pull whenever a new user is added to the system.
  • The system should periodically fetch the latest transactions.
  • Transaction Storage & Processing
  • Store fetched transactions in a database.
  • Ensure efficient retrieval and processing of large amounts of transaction data.
  • Rule-Based Analysis
  • Apply predefined rules to classify transactions (e.g., “If a transaction is > $2000 and international, flag as high-risk”).
  • Rules should be configurable and scalable.
  • Notifications & Reporting
  • If a transaction violates a rule, trigger an alert.
  • Scalability & Performance
  • The system should be able to handle a growing number of users and transactions.

这道题本质上是一个银行交易分析系统设计题,重点不是单点算法,而是如何把外部银行账户接入、交易拉取、规则引擎和告警链路串起来。通常可以按“账户接入层、交易采集层、存储层、规则计算层、通知层”来拆解:先通过第三方 API 连接多个账户,并支持新用户首次全量拉取和后续定时增量同步;交易数据落库后,再用可配置的规则引擎对交易进行分类、风控和消费分析,例如金额过大且为国际交易时触发高风险标记;命中规则后通过消息队列或告警服务发送通知。面试中要特别强调可扩展性、幂等处理、增量同步、分页 / 批处理以及规则配置化,这些都是高并发金融数据系统的关键点。

正文完
 0