12345678910111213141516171819 |
- """
- @author: zsc
- @time: 2024/11/18
- @desc: 行为分析
- """
- class AnomalyDetector:
- def __init__(self, behavior_data):
- self.behavior_data = behavior_data
- def detect(self):
-
- anomalies = []
- for user, actions in self.behavior_data.items():
- if '结果-支用成功' in actions and actions['结果-支用成功'] > 5:
- anomalies.append(user)
- return anomalies
|