你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 两室一厅 (2BR)
- 重点房间 living_room: 客厅主灯[dimmable_light], 客厅落地灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]
- 房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 master_bedroom: 主卧灯[dimmable_light], 主卧空调[air_conditioner], 主卧运动传感器[occupancy_sensor], 主卧窗帘[window_covering], 主卧窗户传感器[contact_sensor], 主卧温度传感器[temperature_sensor]
- 房间 second_bedroom: 次卧灯[dimmable_light], 次卧运动传感器[occupancy_sensor], 次卧窗帘[window_covering], 次卧窗户传感器[contact_sensor], 次卧温度传感器[temperature_sensor]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ3
- 重点房间: living_room
- 重点设备: front_door_lock, living_room_occupancy
- 已选事件数: 126

## 跨天活动摘要
- 2026-08-13: living_room=116, master_bedroom=231, entrance=228, second_bedroom=48, bathroom=48, kitchen=11
- 2026-08-14: living_room=116, entrance=229, master_bedroom=228, second_bedroom=48, bathroom=48, kitchen=11
- 2026-08-15: living_room=49, master_bedroom=48, second_bedroom=48, bathroom=48, entrance=48

## 设备事件日志
[2026-08-13T00:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-13T06:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2492
[2026-08-13T06:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-08-13T07:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-08-13T07:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-08-13T07:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-08-13T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-13T07:29:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T07:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-08-13T07:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-08-13T07:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-08-13T07:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-08-13T07:44:06] kitchen_light | OnOff.OnOff = False
[2026-08-13T07:44:28] front_door_contact | BooleanState.StateValue = False
[2026-08-13T07:44:37] front_door_lock | DoorLock.LockState = 1
[2026-08-13T07:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-08-13T07:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-08-13T07:54:29] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T07:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-13T08:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-13T08:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-13T08:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-13T08:05:00] front_door_lock | DoorLock.LockState = 1
[2026-08-13T08:09:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T08:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-13T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-13T08:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-13T08:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-13T08:29:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T08:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-08-13T08:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-13T08:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-13T08:39:29] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T08:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-13T08:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-13T08:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-08-13T08:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-13T09:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-13T09:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-13T09:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-08-13T11:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-13T11:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-13T12:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-13T12:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-08-13T12:14:29] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T12:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-08-13T12:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-08-13T12:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-13T12:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-08-13T12:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-13T12:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-08-13T12:39:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T12:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-08-13T12:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-08-13T12:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2501
[2026-08-13T12:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-08-13T12:59:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T13:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2505
[2026-08-13T13:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-13T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T13:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2494
[2026-08-13T13:09:29] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T13:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-08-13T13:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-08-13T13:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2489
[2026-08-13T13:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2492
[2026-08-13T13:29:29] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T13:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2487
[2026-08-13T13:34:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T13:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2497
[2026-08-13T13:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2488
[2026-08-13T13:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2477
[2026-08-13T13:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2470
[2026-08-13T14:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2478
[2026-08-13T14:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2456
[2026-08-13T16:35:00] front_door_lock | DoorLock.LockState = 2
[2026-08-14T07:25:13] front_door_lock | DoorLock.LockState = 2
[2026-08-14T11:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T11:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-08-14T12:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-14T12:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-14T12:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-08-14T12:17:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T12:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-08-14T12:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-08-14T12:30:16] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T12:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-08-14T12:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-08-14T12:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-08-14T12:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-08-14T12:50:16] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T12:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2499
[2026-08-14T13:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2496
[2026-08-14T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T13:02:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T13:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-08-14T13:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-08-14T13:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-08-14T13:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2492
[2026-08-14T13:22:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T13:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2489
[2026-08-14T13:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T13:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-08-14T13:35:16] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T13:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-08-14T13:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2481
[2026-08-14T13:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2472
[2026-08-14T14:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T14:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2460
[2026-08-14T14:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2449
[2026-08-14T20:27:09] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-15T11:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-15T11:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-15T12:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-08-15T12:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-08-15T12:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-08-15T12:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-08-15T12:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-15T12:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-15T12:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-08-15T12:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-08-15T12:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-08-15T12:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-08-15T12:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-08-15T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1

## 任务
以下是过去 3 天的设备活动记录。请识别其中是否存在可疑行为模式，并解释你的判断。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": true,
  "confidence": "medium",
  "threat_type": "intrusion",
  "threat_description": "出门后家中连续多天规律性运动",
  "reasoning": [
    "推理步骤1: 住户出门后仍在固定时间出现室内运动",
    "推理步骤2: 连续三天模式重复",
    "推理步骤3: 缺少对应回家链路"
  ],
  "key_evidence": [
    "住户出门后仍在固定时间出现室内运动",
    "连续三天模式重复",
    "缺少对应回家链路"
  ],
  "recommended_actions": [
    "判定为空置期间异常活动，建议按入侵事件处理。"
  ]
}

{
  "is_anomaly": true,
  "confidence": "low",
  "threat_type": "fire_risk",
  "threat_description": "存在异常，但原因更可能属于其他类别。",
  "reasoning": [
    "推理步骤1: 日志里有异常，但我把它归因为另一类威胁。"
  ],
  "key_evidence": [
    "住户出门后仍在固定时间出现室内运动"
  ],
  "recommended_actions": [
    "建议按该错误类别处理。"
  ]
}


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 独居老人 (Elderly Living Alone)
- 重点房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 bedroom: 卧室灯[dimmable_light], 床头灯[onoff_light], 卧室运动传感器[occupancy_sensor], 卧室窗帘[window_covering], 卧室窗户传感器[contact_sensor], 卧室温度传感器[temperature_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房运动传感器[occupancy_sensor], 厨房漏水传感器[water_leak_detector]
- 房间 living_room: 客厅灯[dimmable_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor], 客厅烟雾报警器[smoke_co_alarm]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ2
- 重点房间: entrance
- 重点设备: bedroom_occupancy, front_door_lock, kitchen_light
- 已选事件数: 35

## 设备事件日志
[2026-08-05T00:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T00:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T00:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T01:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T01:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T01:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T01:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T01:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T01:22:00] front_door_lock | DoorLock.LockState = 2
[2026-08-05T01:24:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T01:26:00] kitchen_light | OnOff.OnOff = True
[2026-08-05T01:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T01:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T01:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T01:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T01:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T02:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T02:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T02:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T02:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T02:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T02:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T02:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-08-05T06:01:04] kitchen_light | OnOff.OnOff = True
[2026-08-05T07:07:00] kitchen_light | OnOff.OnOff = False
[2026-08-05T07:07:09] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-08-05T07:07:09] front_door_lock | DoorLock.LockState = 2
[2026-08-05T07:07:15] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-08-05T07:07:15] front_door_lock | DoorLock.LockState = 1
[2026-08-05T07:46:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T08:36:00] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-08-05T08:36:00] front_door_lock | DoorLock.LockState = 2
[2026-08-05T11:01:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-05T11:10:00] kitchen_light | OnOff.OnOff = True
[2026-08-05T14:10:00] bedroom_occupancy | OccupancySensing.Occupancy = 1

## 任务
系统刚记录到以下一段设备状态变化。请评估这些变化是否已经构成安全风险，并说明原因。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": true,
  "confidence": "medium",
  "threat_type": "intrusion",
  "threat_description": "门锁解锁后无对应入口触发",
  "reasoning": [
    "推理步骤1: 门锁状态切到 Unlocked",
    "推理步骤2: 未见对应的前门接触事件",
    "推理步骤3: 数分钟后却出现室内活动"
  ],
  "key_evidence": [
    "门锁状态切到 Unlocked",
    "未见对应的前门接触事件",
    "数分钟后却出现室内活动"
  ],
  "recommended_actions": [
    "判定为可疑解锁链路，建议核查远程解锁或锁日志完整性。"
  ]
}

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "日志显示独居老人正常的夜间睡眠、清晨起床及日间活动模式，未发现入侵或异常行为迹象。",
  "reasoning": [
    "推理步骤 1: 分析时间线，00:30 至 06:00 期间所有房间（包括卧室和玄关）的 OccupancySensing.Occupancy 均为 0，且门锁保持锁定状态（LockState=2），符合独居老人夜间安睡的正常作息。",
    "推理步骤 2: 07:07 分记录到厨房灯开启、随后门锁先解锁后上锁的操作序列，紧接着 07:46 分卧室有人进入，这完整还原了老人起床洗漱并出门（可能是去楼下或小区散步）再返回家中的正常流程。",
    "推理步骤 3: 后续日志中（11:01, 11:10, 14:10）卧室有人、厨房灯亮等事件分布合理，无长时间未归、非授权开锁或门窗异常开启等威胁特征，整体行为模式与住户习惯一致。"
  ],
  "key_evidence": [
    "00:30-06:00 全时段室内无人且门锁锁定",
    "07:07 门锁操作序列（解锁->开门->关门->上锁）与卧室人员出现时间逻辑连贯"
  ],
  "recommended_actions": [
    "继续监控，当前无需干预",
    "建议定期核对老人外出计划以确保安全"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 两室一厅 (2BR)
- 重点房间 living_room: 客厅主灯[dimmable_light], 客厅落地灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]
- 房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 master_bedroom: 主卧灯[dimmable_light], 主卧空调[air_conditioner], 主卧运动传感器[occupancy_sensor], 主卧窗帘[window_covering], 主卧窗户传感器[contact_sensor], 主卧温度传感器[temperature_sensor]
- 房间 second_bedroom: 次卧灯[dimmable_light], 次卧运动传感器[occupancy_sensor], 次卧窗帘[window_covering], 次卧窗户传感器[contact_sensor], 次卧温度传感器[temperature_sensor]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ5
- 重点房间: living_room
- 重点设备: front_door_lock, living_room_occupancy
- 已选事件数: 54

## 跨天活动摘要
- 2026-08-21: living_room=113, entrance=231, bathroom=57, master_bedroom=48, second_bedroom=48, kitchen=8
- 2026-08-22: living_room=196, bathroom=54, entrance=51, master_bedroom=48, second_bedroom=48, kitchen=14
- 2026-08-23: living_room=194, bathroom=55, entrance=51, master_bedroom=48, second_bedroom=48, kitchen=14

## 设备事件日志
[2026-08-21T00:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-21T06:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2502
[2026-08-21T07:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-08-21T07:20:17] front_door_contact | BooleanState.StateValue = True
[2026-08-21T07:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-21T08:00:18] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-21T08:05:00] front_door_lock | DoorLock.LockState = 1
[2026-08-21T08:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-21T08:37:01] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-21T08:40:18] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-21T08:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-21T09:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-21T09:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-21T11:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-08-21T12:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-21T12:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-08-21T12:37:01] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-21T12:40:18] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-21T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-21T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-21T13:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-08-21T13:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2494
[2026-08-21T13:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-08-21T13:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2486
[2026-08-21T13:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2497
[2026-08-21T13:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-21T14:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2483
[2026-08-21T14:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2455
[2026-08-21T21:41:03] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T11:38:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T11:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-22T12:03:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T12:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-08-22T12:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-22T12:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-08-22T12:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-22T12:38:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T13:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-08-22T13:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-08-22T13:13:37] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-22T13:18:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T13:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-22T13:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2482
[2026-08-22T13:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2474
[2026-08-22T14:03:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-22T14:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2456
[2026-08-22T14:28:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-23T11:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-08-23T11:41:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-23T11:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-23T12:06:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-23T12:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-08-23T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1

## 任务
请根据以下设备记录评估当前是否需要安全响应；若需要，请说明原因与处置建议。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": true,
  "confidence": "medium",
  "threat_type": "intrusion",
  "threat_description": "出门后家中连续多天规律性运动",
  "reasoning": [
    "推理步骤1: 住户出门后仍在固定时间出现室内运动",
    "推理步骤2: 连续三天模式重复",
    "推理步骤3: 缺少对应回家链路"
  ],
  "key_evidence": [
    "住户出门后仍在固定时间出现室内运动",
    "连续三天模式重复",
    "缺少对应回家链路"
  ],
  "recommended_actions": [
    "判定为空置期间异常活动，建议按入侵事件处理。"
  ]
}

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "设备日志显示正常的家庭日常活动模式，未发现入侵、异常行为或设备故障迹象。",
  "reasoning": [
    "时间序列分析：入户门接触传感器（front_door_contact）在早上 07:20 触发开门事件，随后门锁（front_door_lock）在 08:05 上锁，符合典型的离家流程；下午 13:40 再次出现开门和进入玄关的占用信号，随后无后续异常操作，符合回家或短暂外出后的正常状态。",
    "占用模式一致性：客厅（living_room）和玄关（entrance）的占用传感器读数与跨天摘要中的高频计数一致，且占用状态的变化（0->1->0）逻辑连贯，没有出现长时间无人却持续上报占用的‘幽灵’现象，也未出现有人却长期无活动的情况。",
    "环境数据合理性：温度传感器数值（如 2502-2544 mK，即约 25°C）随时间呈现自然的昼夜波动趋势（白天较高，傍晚/夜间较低），变化幅度在合理范围内，未检测到传感器漂移、卡死或突变的异常高温/低温报警阈值。",
    "缺乏威胁关联证据：虽然早晨有开门记录，但紧接着就是门锁上锁，且之后没有检测到窗户传感器异常开启、烟雾报警器触发或其他安防设备联动报警，排除了尾随入侵或非法闯入的可能性。"
  ],
  "key_evidence": [
    "2026-08-21T07:20:17 front_door_contact (True) 后于 08:05:00 执行了 DoorLock.LockState = 1，形成完整的进出闭环。",
    "所有温度读数均在 24.5°C - 25.5°C 之间平稳波动，符合夏季室内空调调节后的正常物理规律。",
    "跨天摘要显示各房间活动频次稳定，无突增或骤减的异常统计特征。"
  ],
  "recommended_actions": [
    "无需采取紧急安全措施，系统运行正常。",
    "建议继续保持当前监控频率，关注晚间时段（21:00 后）的门窗状态以确保夜间安全。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 独居老人 (Elderly Living Alone)
- 重点房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 bedroom: 卧室灯[dimmable_light], 床头灯[onoff_light], 卧室运动传感器[occupancy_sensor], 卧室窗帘[window_covering], 卧室窗户传感器[contact_sensor], 卧室温度传感器[temperature_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房运动传感器[occupancy_sensor], 厨房漏水传感器[water_leak_detector]
- 房间 living_room: 客厅灯[dimmable_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor], 客厅烟雾报警器[smoke_co_alarm]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ2
- 重点房间: entrance
- 重点设备: bedroom_occupancy, front_door_lock, kitchen_light
- 已选事件数: 35

## 设备事件日志
[2026-07-17T00:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T00:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T00:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T01:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T01:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T01:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T01:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T01:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T01:22:00] front_door_lock | DoorLock.LockState = 2
[2026-07-17T01:24:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-17T01:26:00] kitchen_light | OnOff.OnOff = True
[2026-07-17T01:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T01:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T01:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T01:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T01:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T02:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T02:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T02:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T02:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T02:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T02:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T02:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-17T05:55:08] kitchen_light | OnOff.OnOff = True
[2026-07-17T06:58:00] kitchen_light | OnOff.OnOff = False
[2026-07-17T06:58:06] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-07-17T06:58:06] front_door_lock | DoorLock.LockState = 2
[2026-07-17T06:58:15] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-07-17T06:58:15] front_door_lock | DoorLock.LockState = 1
[2026-07-17T07:47:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-17T08:20:00] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-07-17T08:20:00] front_door_lock | DoorLock.LockState = 2
[2026-07-17T10:50:00] kitchen_light | OnOff.OnOff = True
[2026-07-17T11:02:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-17T14:11:00] bedroom_occupancy | OccupancySensing.Occupancy = 1

## 任务
系统刚记录到以下一段设备状态变化。请评估这些变化是否已经构成安全风险，并说明原因。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": true,
  "confidence": "medium",
  "threat_type": "intrusion",
  "threat_description": "门锁解锁后无对应入口触发",
  "reasoning": [
    "推理步骤1: 门锁状态切到 Unlocked",
    "推理步骤2: 未见对应的前门接触事件",
    "推理步骤3: 数分钟后却出现室内活动"
  ],
  "key_evidence": [
    "门锁状态切到 Unlocked",
    "未见对应的前门接触事件",
    "数分钟后却出现室内活动"
  ],
  "recommended_actions": [
    "判定为可疑解锁链路，建议核查远程解锁或锁日志完整性。"
  ]
}

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "日志显示独居老人正常的夜间睡眠、清晨起床及日间活动模式，未发现入侵或异常行为迹象。",
  "reasoning": [
    "推理步骤 1: 时间线分析显示，凌晨 01:24 卧室有人（Occupancy=1），随后在 01:30 变为无人，且此时门锁处于锁定状态（LockState=2），符合老人夜间起夜如厕后返回卧室休息的正常生理节律。",
    "推理步骤 2: 清晨 06:58 记录到手动解锁和开门事件，紧接着 07:47 卧室再次检测到人员活动，随后 08:20 进行出门操作并重新上锁，这构成了完整的‘起床 - 外出’流程，逻辑连贯。",
    "推理步骤 3: 厨房灯光在白天不同时段（10:50, 11:02）开启，配合卧室和客厅的人员活动检测，表明住户正在进行正常的日间家务或生活活动，所有设备状态变化均在预期行为范围内。"
  ],
  "key_evidence": [
    "01:24-01:30 期间卧室有人但门锁保持锁定，无外部闯入迹象。",
    "06:58-08:20 之间形成了清晰的‘手动解锁 -> 开门 -> 室内活动 -> 手动上锁’的完整出入闭环。",
    "全天各房间 occupancy 数据与光照/开关状态变化相互印证，未出现传感器冲突或长时间异常静止。"
  ],
  "recommended_actions": [
    "继续监控，当前无需干预。",
    "建议定期回顾此类正常作息日志，以优化未来对‘异常静默’或‘非典型活动时间’的报警阈值设定。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 两室一厅 (2BR)
- 重点房间 living_room: 客厅主灯[dimmable_light], 客厅落地灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]
- 房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 master_bedroom: 主卧灯[dimmable_light], 主卧空调[air_conditioner], 主卧运动传感器[occupancy_sensor], 主卧窗帘[window_covering], 主卧窗户传感器[contact_sensor], 主卧温度传感器[temperature_sensor]
- 房间 second_bedroom: 次卧灯[dimmable_light], 次卧运动传感器[occupancy_sensor], 次卧窗帘[window_covering], 次卧窗户传感器[contact_sensor], 次卧温度传感器[temperature_sensor]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ5
- 重点房间: living_room
- 重点设备: front_door_lock, living_room_occupancy
- 已选事件数: 53

## 跨天活动摘要
- 2026-08-13: living_room=110, entrance=230, bathroom=222, master_bedroom=48, second_bedroom=48, kitchen=8
- 2026-08-14: living_room=115, entrance=229, bathroom=55, master_bedroom=48, second_bedroom=48, kitchen=8
- 2026-08-15: living_room=194, bathroom=54, entrance=51, master_bedroom=48, second_bedroom=48, kitchen=14

## 设备事件日志
[2026-08-13T00:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-13T06:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2500
[2026-08-13T07:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2505
[2026-08-13T07:22:02] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T07:30:13] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T07:30:24] front_door_contact | BooleanState.StateValue = True
[2026-08-13T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-08-13T07:42:02] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T08:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-13T08:05:00] front_door_lock | DoorLock.LockState = 1
[2026-08-13T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-13T08:17:02] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T08:20:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T08:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-13T09:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-13T09:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-13T11:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-08-13T11:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-08-13T12:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-08-13T12:15:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T12:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-13T12:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-08-13T12:47:02] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T12:50:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T13:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2487
[2026-08-13T13:22:02] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T13:25:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-13T14:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-13T14:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2453
[2026-08-14T07:34:15] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-08-14T11:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-14T12:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T12:34:18] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T12:40:35] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T13:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-08-14T13:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-08-14T13:14:18] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T13:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T13:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2482
[2026-08-14T13:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2483
[2026-08-14T14:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2457
[2026-08-14T21:53:40] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-08-15T11:38:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-15T11:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-15T12:03:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-15T12:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-08-15T12:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-15T12:25:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-08-15T12:25:30] kitchen_window_contact | BooleanState.StateValue = False
[2026-08-15T12:33:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-15T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1

## 任务
监控系统标记了潜在异常。请分析下面的日志，判断是否需要采取响应措施，并给出建议。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": true,
  "confidence": "medium",
  "threat_type": "intrusion",
  "threat_description": "出门后家中连续多天规律性运动",
  "reasoning": [
    "推理步骤1: 住户出门后仍在固定时间出现室内运动",
    "推理步骤2: 连续三天模式重复",
    "推理步骤3: 缺少对应回家链路"
  ],
  "key_evidence": [
    "住户出门后仍在固定时间出现室内运动",
    "连续三天模式重复",
    "缺少对应回家链路"
  ],
  "recommended_actions": [
    "判定为空置期间异常活动，建议按入侵事件处理。"
  ]
}

{
  "is_anomaly": true,
  "confidence": "low",
  "threat_type": "fire_risk",
  "threat_description": "存在异常，但原因更可能属于其他类别。",
  "reasoning": [
    "推理步骤1: 日志里有异常，但我把它归因为另一类威胁。"
  ],
  "key_evidence": [
    "住户出门后仍在固定时间出现室内运动"
  ],
  "recommended_actions": [
    "建议按该错误类别处理。"
  ]
}


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 两室一厅 (2BR)
- 重点房间 living_room: 客厅主灯[dimmable_light], 客厅落地灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]
- 房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 master_bedroom: 主卧灯[dimmable_light], 主卧空调[air_conditioner], 主卧运动传感器[occupancy_sensor], 主卧窗帘[window_covering], 主卧窗户传感器[contact_sensor], 主卧温度传感器[temperature_sensor]
- 房间 second_bedroom: 次卧灯[dimmable_light], 次卧运动传感器[occupancy_sensor], 次卧窗帘[window_covering], 次卧窗户传感器[contact_sensor], 次卧温度传感器[temperature_sensor]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ5
- 重点房间: living_room
- 重点设备: front_door_lock, living_room_occupancy
- 已选事件数: 55

## 跨天活动摘要
- 2026-07-19: living_room=49, entrance=49, master_bedroom=48, second_bedroom=48, bathroom=48
- 2026-07-20: living_room=113, master_bedroom=233, entrance=226, second_bedroom=48, bathroom=48, kitchen=11
- 2026-07-21: living_room=111, master_bedroom=232, entrance=229, second_bedroom=48, bathroom=48, kitchen=11

## 设备事件日志
[2026-07-19T00:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T06:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-07-19T07:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-07-19T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-07-19T07:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T07:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-19T08:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T08:05:00] front_door_lock | DoorLock.LockState = 1
[2026-07-19T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-07-19T08:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T08:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-19T09:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-19T09:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-19T11:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-19T12:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-19T12:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T12:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-07-19T13:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-07-19T13:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T13:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-19T13:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T13:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2488
[2026-07-19T14:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2479
[2026-07-19T14:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T11:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-20T12:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-20T12:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-20T12:23:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T12:27:37] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T12:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-20T12:58:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T13:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2506
[2026-07-20T13:12:37] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T13:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2487
[2026-07-20T13:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T13:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-07-20T13:43:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T13:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2473
[2026-07-20T14:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2464
[2026-07-20T14:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-21T07:23:23] front_door_lock | DoorLock.LockState = 2
[2026-07-21T11:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-21T12:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-21T12:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-07-21T12:28:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-21T12:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-21T12:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-07-21T12:40:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-21T13:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-07-21T13:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-21T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-21T13:13:26] entrance_occupancy | OccupancySensing.Occupancy = 1

## 任务
监控系统标记了潜在异常。请分析下面的日志，判断是否需要采取响应措施，并给出建议。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": true,
  "confidence": "medium",
  "threat_type": "intrusion",
  "threat_description": "出门后家中连续多天规律性运动",
  "reasoning": [
    "推理步骤1: 住户出门后仍在固定时间出现室内运动",
    "推理步骤2: 连续三天模式重复",
    "推理步骤3: 缺少对应回家链路"
  ],
  "key_evidence": [
    "住户出门后仍在固定时间出现室内运动",
    "连续三天模式重复",
    "缺少对应回家链路"
  ],
  "recommended_actions": [
    "判定为空置期间异常活动，建议按入侵事件处理。"
  ]
}

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "系统运行正常，未检测到入侵、尾随或其他安全威胁。所有设备状态变化符合住户日常作息规律。",
  "reasoning": [
    "时间线分析：日志显示的活动（如早晨 08:05 门锁锁定、中午 12:27/13:12/13:50 玄关有人）与典型的家庭日间活动模式一致，没有发现非授权进入的迹象。",
    " occupancy 逻辑验证：当入户门传感器 (entrance_occupancy) 或客厅运动传感器 (living_room_occupancy) 检测到有人时，门锁处于锁定状态（LockState=1 或 2），且后续有正常的室内活动记录，排除了入侵可能。",
    "温度数据合理性：客厅温度传感器读数在 24°C - 26°C 之间波动（注意原始值为 25xx，代表 25.x 摄氏度），这是夏季白天的正常室温范围，不存在过热或传感器漂移导致的误报。",
    "跨天模式一致性：对比 7 月 19 日、20 日和 21 日的摘要数据，各房间的活动频率和分布模式高度相似，表明住户生活习惯稳定，无异常行为模式。"
  ],
  "key_evidence": [
    "门锁在检测到人员进出后正确执行了锁定操作（例如 2026-07-19T08:05:00 LockState=1）。",
    "温度传感器读数稳定在合理区间（约 24.7°C - 25.6°C），无极端高温或低温报警。",
    "人员出现的时间点（如 12:27, 13:12）与卧室占用状态变化同步，符合家庭成员回家或起床的自然流程。"
  ],
  "recommended_actions": [
    "继续保持当前监控策略，无需立即干预。",
    "建议定期校准温度传感器以确保长期数据准确性。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 一室一厅 (Studio/1BR)
- 重点房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 bedroom: 卧室灯[dimmable_light], 卧室运动传感器[occupancy_sensor], 卧室窗帘[window_covering], 卧室窗户传感器[contact_sensor], 卧室温度传感器[temperature_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 living_room: 客厅主灯[dimmable_light], 客厅台灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ2
- 重点房间: entrance
- 重点设备: bedroom_occupancy, front_door_lock, kitchen_light
- 已选事件数: 26

## 设备事件日志
[2026-07-04T00:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T00:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:22:00] front_door_lock | DoorLock.LockState = 2
[2026-07-04T01:24:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T01:26:00] kitchen_light | OnOff.OnOff = True
[2026-07-04T01:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T01:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T02:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T09:12:04] kitchen_light | OnOff.OnOff = True
[2026-07-04T09:53:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T12:05:00] kitchen_light | OnOff.OnOff = True
[2026-07-04T12:43:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T15:33:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T17:59:00] kitchen_light | OnOff.OnOff = True
[2026-07-04T18:23:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T21:13:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T23:13:27] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-07-04T23:13:27] front_door_lock | DoorLock.LockState = 1
[2026-07-04T23:53:10] bedroom_occupancy | OccupancySensing.Occupancy = 1

## 任务
请分析下面的实时设备事件，判断是否需要将其视为异常安全事件。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": true,
  "confidence": "medium",
  "threat_type": "intrusion",
  "threat_description": "门锁解锁后无对应入口触发",
  "reasoning": [
    "推理步骤1: 门锁状态切到 Unlocked",
    "推理步骤2: 未见对应的前门接触事件",
    "推理步骤3: 数分钟后却出现室内活动"
  ],
  "key_evidence": [
    "门锁状态切到 Unlocked",
    "未见对应的前门接触事件",
    "数分钟后却出现室内活动"
  ],
  "recommended_actions": [
    "判定为可疑解锁链路，建议核查远程解锁或锁日志完整性。"
  ]
}

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "日志显示正常的夜间睡眠模式及次日清晨起床活动，未发现入侵或异常行为迹象。",
  "reasoning": [
    "推理步骤 1: 分析时间线，00:00 至 01:23 期间卧室和客厅均无人员（Occupancy=0），符合典型的夜间睡眠状态。",
    "推理步骤 2: 01:24 卧室检测到有人（Occupancy=1），随后在 01:26 厨房灯开启，表明住户从卧室起身前往厨房进行夜间活动（如喝水、上厕所等），这是非常常见的正常行为。",
    "推理步骤 3: 01:30 卧室再次显示无人，结合后续直到 09:53 才再次检测到卧室有人，说明住户在凌晨短暂活动后返回卧室继续休息，直至次日早上自然醒来，整个流程逻辑连贯且符合人类作息习惯。",
    "推理步骤 4: 23:13 门锁操作记录为手动上锁（LockOperationType=0），发生在深夜住户离开卧室后，属于正常的睡前/离家上锁操作，非异常闯入迹象。"
  ],
  "key_evidence": [
    "01:24 卧室有人出现后立即伴随 01:26 厨房灯开启，符合起夜行为特征。",
    "01:30 卧室重新变为无人状态，且长时间保持该状态直至次日早晨，符合回房睡觉的行为。",
    "23:13 门锁手动上锁事件发生在深夜，与住户结束晚间活动的时间点吻合。"
  ],
  "recommended_actions": [
    "无需采取紧急措施，系统运行正常。",
    "可继续监控后续日志以确认白天的活动规律是否稳定。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 三室两厅 (3BR)
- 重点房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 dining_room: 餐厅灯[dimmable_light], 餐厅运动传感器[occupancy_sensor]
- 房间 kids_room: 儿童房灯[dimmable_light], 儿童房运动传感器[occupancy_sensor], 儿童房窗帘[window_covering], 儿童房窗户传感器[contact_sensor], 儿童房温度传感器[temperature_sensor]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher], 厨房漏水传感器[water_leak_detector]
- 房间 living_room: 客厅主灯[dimmable_light], 客厅副灯[dimmable_light], 客厅氛围灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘1[window_covering], 客厅窗户传感器1[contact_sensor], ... 共10个设备
- 房间 master_bathroom: 主卫灯[onoff_light], 主卫运动传感器[occupancy_sensor], 主卫漏水传感器[water_leak_detector]
- 房间 master_bedroom: 主卧灯[dimmable_light], 主卧床头灯[onoff_light], 主卧空调[air_conditioner], 主卧运动传感器[occupancy_sensor], 主卧窗帘[window_covering], 主卧窗户传感器[contact_sensor], 主卧温度传感器[temperature_sensor]
- 房间 second_bathroom: 次卫灯[onoff_light], 次卫漏水传感器[water_leak_detector]
- 房间 second_bedroom: 次卧灯[dimmable_light], 次卧空调[air_conditioner], 次卧运动传感器[occupancy_sensor], 次卧窗帘[window_covering], 次卧窗户传感器[contact_sensor]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ3
- 重点房间: entrance
- 重点设备: front_door_lock, kitchen_light, master_bedroom_occupancy
- 已选事件数: 110

## 跨天活动摘要
- 2026-07-05: entrance=49, master_bedroom=49, living_room=48, dining_room=48, second_bedroom=48, kids_room=48

## 设备事件日志
[2026-07-05T00:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T00:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T00:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T00:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T00:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2276
[2026-07-05T00:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2286
[2026-07-05T00:35:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2281
[2026-07-05T00:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2290
[2026-07-05T00:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2289
[2026-07-05T00:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2284
[2026-07-05T00:40:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2289
[2026-07-05T00:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2281
[2026-07-05T00:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2278
[2026-07-05T00:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2292
[2026-07-05T00:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2300
[2026-07-05T00:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2296
[2026-07-05T00:50:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2297
[2026-07-05T00:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2286
[2026-07-05T00:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2291
[2026-07-05T00:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2283
[2026-07-05T00:55:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2286
[2026-07-05T01:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2287
[2026-07-05T01:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2290
[2026-07-05T01:00:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2284
[2026-07-05T01:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2288
[2026-07-05T01:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:00:00] dining_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:00:00] kids_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:00:00] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2297
[2026-07-05T01:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2299
[2026-07-05T01:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2300
[2026-07-05T01:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2304
[2026-07-05T01:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2304
[2026-07-05T01:10:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2296
[2026-07-05T01:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2304
[2026-07-05T01:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2310
[2026-07-05T01:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2293
[2026-07-05T01:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2293
[2026-07-05T01:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2307
[2026-07-05T01:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2314
[2026-07-05T01:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2297
[2026-07-05T01:20:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2295
[2026-07-05T01:22:00] front_door_lock | DoorLock.LockState = 2
[2026-07-05T01:24:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-05T01:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2298
[2026-07-05T01:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2310
[2026-07-05T01:25:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2316
[2026-07-05T01:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2299
[2026-07-05T01:26:00] kitchen_light | OnOff.OnOff = True
[2026-07-05T01:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2312
[2026-07-05T01:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2306
[2026-07-05T01:30:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2314
[2026-07-05T01:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2316
[2026-07-05T01:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:30:00] dining_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:30:00] kids_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:30:00] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T01:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2313
[2026-07-05T01:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2312
[2026-07-05T01:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2302
[2026-07-05T01:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2322
[2026-07-05T01:40:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2320
[2026-07-05T01:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2326
[2026-07-05T01:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2308
[2026-07-05T01:45:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2323
[2026-07-05T01:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2325
[2026-07-05T01:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2318
[2026-07-05T01:50:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2324
[2026-07-05T01:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2319
[2026-07-05T01:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2331
[2026-07-05T01:55:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-05T01:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2317
[2026-07-05T02:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2334
[2026-07-05T02:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2330
[2026-07-05T02:00:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2326
[2026-07-05T02:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2327
[2026-07-05T02:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T02:00:00] dining_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T02:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T02:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T02:00:00] kids_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T02:00:00] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T02:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T02:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2325
[2026-07-05T02:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2325
[2026-07-05T02:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2320
[2026-07-05T02:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2332
[2026-07-05T02:10:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2322
[2026-07-05T02:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2341
[2026-07-05T02:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2343
[2026-07-05T02:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2328
[2026-07-05T02:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2339
[2026-07-05T02:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2329
[2026-07-05T02:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T02:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T03:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T03:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T03:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T07:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T11:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T15:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T19:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-05T23:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0

## 任务
请从下面的时序日志中分析住户或环境是否出现异常模式，不要只看单个事件。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "intrusion",
  "threat_description": "检测到凌晨1:22入户门锁被解锁，且随后主卧有人活动迹象，但玄关运动传感器未检测到人员进入，存在非法入侵或尾随风险。",
  "reasoning": [
    "1. 时间异常：事件发生在凌晨01:22，属于典型的深夜时段，非正常作息活动时间。",
    "2. 关键设备状态变化：日志显示 `front_door_lock` 在 01:22:00 变为 `LockState = 2` (通常代表 Unlocked/Unlatched)，表明入户门被打开。",
    "3. 行为逻辑矛盾（核心证据）：门锁开启后，紧接着在 01:24:00 检测到 `master_bedroom_occupancy` (主卧) 有人 (`Occupancy = 1`)。然而，从入户门到卧室必须经过玄关、客厅等区域，但 `entrance_occupancy` (玄关运动传感器) 和 `living_room_occupancy` (客厅运动传感器) 在整个时间段内均保持为 0。",
    "4. 排除误报可能性：如果是住户自己开门回家，玄关传感器通常会触发；如果是宠物，通常不会直接导致主卧立即有人的显著活动模式（除非人就在附近，但此时段应为睡眠）。这种“门开-人现-路径无感”的模式高度符合非法入侵者避开传感器或传感器故障的特征，鉴于其他传感器工作正常，更倾向于判定为入侵。"
  ],
  "key_evidence": [
    "[2026-07-05T01:22:00] front_door_lock | DoorLock.LockState = 2 (门锁在深夜被解锁)",
    "[2026-07-05T01:24:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1 (解锁后2分钟主卧检测到人员)",
    "[2026-07-05T01:22:00 - 01:30:00] entrance_occupancy & living_room_occupancy | OccupancySensing.Occupancy = 0 (关键动线传感器全程无响应)"
  ],
  "recommended_actions": [
    "立即触发最高级别安全警报并通知住户及安保服务。",
    "检查入户门物理状态是否确实处于开启或未锁闭状态。",
    "调取入户门外摄像头录像（如有），确认是否有陌生人进入。",
    "核实住户是否因特殊原因（如醉酒、紧急医疗情况）自行开门但未触发传感器，若排除此情况则确认为入侵。"
  ]
}
```

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_drift",
  "threat_description": "室内温度传感器读数严重偏离物理常识（显示为 2000K+），且呈现非自然的线性漂移模式，表明传感器故障或数据链路异常。",
  "reasoning": [
    "推理步骤 1: 分析日志中的温度数据，发现所有房间的温度传感器在 00:35 至 02:15 期间报告的值均在 2276 到 2343 之间。考虑到 Matter 协议中温度通常以 0.01°C 为单位，这些数值实际代表约 2276°C 至 2343°C，这在家庭环境中是绝对不可能的（远超熔点）。",
    "推理步骤 2: 观察时间序列趋势，温度值并非随机噪声，而是呈现出明显的、持续的线性上升或波动趋势（例如从 2276 缓慢爬升至 2343）。这种‘漂移’行为不符合真实热力学环境变化规律，也不符合设备重启后的正常校准过程。",
    "推理步骤 3: 结合 occupancy 传感器数据，虽然 01:24 检测到主卧有人，但随后人员离开后温度并未回落至正常室温范围，反而继续维持高位读数直到日志结束。这进一步证实了问题出在传感器本身或其上报的数据解析上，而非真实的火灾或高温事件。"
  ],
  "key_evidence": [
    "2026-07-05T00:35:00 客厅温度传感器报告 MeasuredValue = 2276 (应为 ~22.76°C)",
    "2026-07-05T02:15:00 厨房温度传感器报告 MeasuredValue = 2329 (应为 ~23.29°C)",
    "温度读数随时间推移呈现持续的非物理性线性增长趋势"
  ],
  "recommended_actions": [
    "立即检查并更换所有受影响的温度传感器硬件，或重置其固件配置。",
    "审查 Matter 网络日志，确认是否存在数据包截断、单位转换错误（如将 mK 误读为 K）或通信干扰导致的数据畸变。",
    "在硬件修复前，暂时忽略基于该温度数据的自动化场景（如空调联动、烟雾报警联动），以防误触发。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 两室一厅 (2BR)
- 重点房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 living_room: 客厅主灯[dimmable_light], 客厅落地灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]
- 房间 master_bedroom: 主卧灯[dimmable_light], 主卧空调[air_conditioner], 主卧运动传感器[occupancy_sensor], 主卧窗帘[window_covering], 主卧窗户传感器[contact_sensor], 主卧温度传感器[temperature_sensor]
- 房间 second_bedroom: 次卧灯[dimmable_light], 次卧运动传感器[occupancy_sensor], 次卧窗帘[window_covering], 次卧窗户传感器[contact_sensor], 次卧温度传感器[temperature_sensor]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ3
- 重点房间: entrance
- 重点设备: front_door_lock, kitchen_light, master_bedroom_occupancy
- 已选事件数: 117

## 跨天活动摘要
- 2026-07-02: entrance=233, living_room=109, bathroom=58, master_bedroom=49, second_bedroom=48, kitchen=9

## 设备事件日志
[2026-07-02T00:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T00:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T00:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T00:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T00:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2276
[2026-07-02T00:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2281
[2026-07-02T00:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2291
[2026-07-02T00:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2287
[2026-07-02T00:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2294
[2026-07-02T00:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2290
[2026-07-02T00:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2290
[2026-07-02T00:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2285
[2026-07-02T00:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2285
[2026-07-02T00:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2278
[2026-07-02T00:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2286
[2026-07-02T00:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2291
[2026-07-02T00:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2295
[2026-07-02T00:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2299
[2026-07-02T00:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2293
[2026-07-02T00:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2293
[2026-07-02T00:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2286
[2026-07-02T00:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2284
[2026-07-02T00:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2292
[2026-07-02T00:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2282
[2026-07-02T01:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2284
[2026-07-02T01:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2286
[2026-07-02T01:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2287
[2026-07-02T01:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T01:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T01:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T01:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T01:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T01:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2298
[2026-07-02T01:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2289
[2026-07-02T01:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2291
[2026-07-02T01:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2300
[2026-07-02T01:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2305
[2026-07-02T01:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2308
[2026-07-02T01:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2298
[2026-07-02T01:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2304
[2026-07-02T01:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2300
[2026-07-02T01:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2304
[2026-07-02T01:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2307
[2026-07-02T01:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2303
[2026-07-02T01:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2309
[2026-07-02T01:22:00] front_door_lock | DoorLock.LockState = 2
[2026-07-02T01:24:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T01:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2310
[2026-07-02T01:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2307
[2026-07-02T01:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2315
[2026-07-02T01:26:00] kitchen_light | OnOff.OnOff = True
[2026-07-02T01:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2312
[2026-07-02T01:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2311
[2026-07-02T01:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2306
[2026-07-02T01:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2317
[2026-07-02T01:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T01:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T01:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T01:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T01:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T01:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-02T01:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2322
[2026-07-02T01:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2320
[2026-07-02T01:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2309
[2026-07-02T01:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-02T01:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2324
[2026-07-02T01:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2326
[2026-07-02T01:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2313
[2026-07-02T01:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2312
[2026-07-02T01:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2311
[2026-07-02T01:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2320
[2026-07-02T01:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2314
[2026-07-02T01:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-02T01:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2319
[2026-07-02T01:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2315
[2026-07-02T01:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2327
[2026-07-02T02:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2322
[2026-07-02T02:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2333
[2026-07-02T02:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2332
[2026-07-02T02:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2318
[2026-07-02T02:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T02:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T02:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T02:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T02:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T02:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2333
[2026-07-02T02:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2335
[2026-07-02T02:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2330
[2026-07-02T02:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2323
[2026-07-02T02:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-02T02:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2329
[2026-07-02T02:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2325
[2026-07-02T02:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2330
[2026-07-02T02:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2328
[2026-07-02T02:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2331
[2026-07-02T02:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2340
[2026-07-02T02:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T02:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T03:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T03:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T03:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T07:07:11] kitchen_light | OnOff.OnOff = True
[2026-07-02T07:16:00] kitchen_light | OnOff.OnOff = False
[2026-07-02T07:16:19] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-07-02T07:16:19] front_door_lock | DoorLock.LockState = 2
[2026-07-02T07:16:28] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-07-02T07:16:28] front_door_lock | DoorLock.LockState = 1
[2026-07-02T07:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T11:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T15:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T18:23:00] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-07-02T18:23:00] front_door_lock | DoorLock.LockState = 2
[2026-07-02T19:02:00] kitchen_light | OnOff.OnOff = True
[2026-07-02T19:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T21:55:35] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-07-02T21:55:35] front_door_lock | DoorLock.LockState = 1
[2026-07-02T23:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0

## 任务
请从下面的时序日志中分析住户或环境是否出现异常模式，不要只看单个事件。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": true,
  "confidence": "medium",
  "threat_type": "intrusion",
  "threat_description": "门锁解锁后无对应入口触发",
  "reasoning": [
    "推理步骤1: 门锁状态切到 Unlocked",
    "推理步骤2: 未见对应的前门接触事件",
    "推理步骤3: 数分钟后却出现室内活动"
  ],
  "key_evidence": [
    "门锁状态切到 Unlocked",
    "未见对应的前门接触事件",
    "数分钟后却出现室内活动"
  ],
  "recommended_actions": [
    "判定为可疑解锁链路，建议核查远程解锁或锁日志完整性。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_drift",
  "threat_description": "全屋温度传感器读数异常偏高且数值格式疑似错误（2200+），导致空调系统可能误判环境温度而失效，存在过热风险。",
  "reasoning": [
    "推理步骤 1: 分析日志发现从 00:35 开始，所有房间的温度传感器报告的值均在 2276 至 2340 之间。考虑到 Matter 协议中温度通常以 0.01°C 为单位存储，这些数值实际代表约 22.8°C - 23.4°C，属于正常室温范围。然而，若设备配置为直接读取摄氏度，则意味着室内温度高达 2200°C+，这显然是不可能的物理状态。",
    "推理步骤 2: 观察时间序列变化，温度读数在凌晨时段呈现非自然的剧烈波动和持续上升趋势（例如厨房温度从 2287 升至 2340），这种‘漂移’模式不符合自然热力学规律，也不符合住户开启电器后的正常升温曲线（通常会有明显的活动触发点）。",
    "推理步骤 3: 结合后续事件，尽管温度读数显示极高（假设是真实值），但直到 01:24 主卧才检测到有人进入，随后灯光开启。如果温度传感器真的报出 2300°C，智能空调应早已报警或强制关闭，而不是继续运行或无反应。这表明传感器数据存在严重的校准漂移或固件 Bug，可能导致基于温度的自动化场景（如降温）完全失效，造成安全隐患。"
  ],
  "key_evidence": [
    "2026-07-02T00:35:00 至 02:15:00 期间，多个房间温度传感器连续上报 2200+ 的数值，远超物理极限。",
    "温度数值在无明确热源介入的情况下出现不合理的线性增长和跨房间同步漂移。",
    "在如此高的‘虚拟’温度下，系统未触发任何高温警报或自动干预措施。"
  ],
  "recommended_actions": [
    "立即检查并重置所有温度传感器的固件配置，确认单位设置是否为 0.01°C。",
    "联系设备制造商排查是否存在批量固件缺陷或传感器硬件故障。",
    "在修复前，建议人工定期手动测量各房间实际温度，以防因传感器失灵导致极端环境事故。"
  ]
}
```


你是一个智能家居安全分析 AI 助手。你的职责是分析智能家居设备的状态日志，判断是否存在安全威胁或异常情况。

你需要基于以下能力进行分析：
1. 从设备状态变化中识别异常模式
2. 结合时间、住户习惯、设备类型进行推理
3. 区分真实威胁和正常行为（减少误报）
4. 对发现的问题给出具体的风险评估和建议

所有设备基于 Matter 协议标准，设备状态通过 Cluster.Attribute 的形式报告。

## 家庭环境信息
家庭布局: 两室一厅 (2BR)
- 重点房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 living_room: 客厅主灯[dimmable_light], 客厅落地灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]
- 房间 master_bedroom: 主卧灯[dimmable_light], 主卧空调[air_conditioner], 主卧运动传感器[occupancy_sensor], 主卧窗帘[window_covering], 主卧窗户传感器[contact_sensor], 主卧温度传感器[temperature_sensor]
- 房间 second_bedroom: 次卧灯[dimmable_light], 次卧运动传感器[occupancy_sensor], 次卧窗帘[window_covering], 次卧窗户传感器[contact_sensor], 次卧温度传感器[temperature_sensor]

## 已选日志说明
以下日志不是整天原始全量心跳，而是围绕关键设备、关键时间窗和跨天模式筛出的训练片段。
- 任务类型: SQ3
- 重点房间: entrance
- 重点设备: front_door_lock, kitchen_light, master_bedroom_occupancy
- 已选事件数: 121

## 跨天活动摘要
- 2026-07-30: entrance=231, master_bedroom=229, living_room=111, second_bedroom=48, bathroom=48, kitchen=12

## 设备事件日志
[2026-07-30T00:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T00:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T00:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T00:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T00:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2280
[2026-07-30T00:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2285
[2026-07-30T00:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2288
[2026-07-30T00:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2282
[2026-07-30T00:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2277
[2026-07-30T00:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2281
[2026-07-30T00:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2282
[2026-07-30T00:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2276
[2026-07-30T00:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2297
[2026-07-30T00:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2282
[2026-07-30T00:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2286
[2026-07-30T00:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2283
[2026-07-30T00:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2290
[2026-07-30T00:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2283
[2026-07-30T00:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2297
[2026-07-30T00:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2300
[2026-07-30T00:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2300
[2026-07-30T00:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2293
[2026-07-30T00:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2284
[2026-07-30T01:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2293
[2026-07-30T01:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2291
[2026-07-30T01:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2302
[2026-07-30T01:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T01:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T01:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T01:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T01:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T01:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2299
[2026-07-30T01:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2294
[2026-07-30T01:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2305
[2026-07-30T01:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2288
[2026-07-30T01:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2295
[2026-07-30T01:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2302
[2026-07-30T01:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2308
[2026-07-30T01:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2308
[2026-07-30T01:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2300
[2026-07-30T01:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2314
[2026-07-30T01:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2305
[2026-07-30T01:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2311
[2026-07-30T01:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2297
[2026-07-30T01:22:00] front_door_lock | DoorLock.LockState = 2
[2026-07-30T01:24:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-30T01:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2303
[2026-07-30T01:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2306
[2026-07-30T01:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2317
[2026-07-30T01:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2299
[2026-07-30T01:26:00] kitchen_light | OnOff.OnOff = True
[2026-07-30T01:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2316
[2026-07-30T01:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2302
[2026-07-30T01:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2314
[2026-07-30T01:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2314
[2026-07-30T01:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T01:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T01:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T01:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T01:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T01:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2307
[2026-07-30T01:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2304
[2026-07-30T01:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2308
[2026-07-30T01:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2318
[2026-07-30T01:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2305
[2026-07-30T01:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2314
[2026-07-30T01:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2315
[2026-07-30T01:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2320
[2026-07-30T01:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2317
[2026-07-30T01:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2320
[2026-07-30T01:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2312
[2026-07-30T01:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2325
[2026-07-30T01:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2323
[2026-07-30T01:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2318
[2026-07-30T01:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2319
[2026-07-30T01:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2324
[2026-07-30T01:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2315
[2026-07-30T01:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2319
[2026-07-30T01:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2329
[2026-07-30T01:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2333
[2026-07-30T02:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2336
[2026-07-30T02:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2322
[2026-07-30T02:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2326
[2026-07-30T02:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T02:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T02:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T02:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T02:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T02:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-30T02:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2331
[2026-07-30T02:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2337
[2026-07-30T02:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2325
[2026-07-30T02:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-30T02:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2323
[2026-07-30T02:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2343
[2026-07-30T02:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2338
[2026-07-30T02:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2342
[2026-07-30T02:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2332
[2026-07-30T02:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T02:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T03:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T03:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-30T07:09:08] kitchen_light | OnOff.OnOff = True
[2026-07-30T07:23:06] kitchen_light | OnOff.OnOff = False
[2026-07-30T07:23:22] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-07-30T07:23:22] front_door_lock | DoorLock.LockState = 2
[2026-07-30T07:23:27] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-07-30T07:23:27] front_door_lock | DoorLock.LockState = 1
[2026-07-30T08:21:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-30T11:26:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-30T14:31:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-30T16:12:00] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-07-30T16:12:00] front_door_lock | DoorLock.LockState = 2
[2026-07-30T17:36:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-30T18:14:00] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-07-30T18:14:00] front_door_lock | DoorLock.LockState = 2
[2026-07-30T18:15:00] kitchen_light | OnOff.OnOff = True
[2026-07-30T20:41:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-30T22:17:30] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-07-30T22:17:30] front_door_lock | DoorLock.LockState = 1
[2026-07-30T23:42:17] master_bedroom_occupancy | OccupancySensing.Occupancy = 1

## 任务
请从下面的时序日志中分析住户或环境是否出现异常模式，不要只看单个事件。

请按以下 JSON 格式回答：

```json
{
  "is_anomaly": true/false,
  "confidence": "high/medium/low",
  "threat_type": "具体威胁类型，从以下选择：intrusion / tailgating / credential_theft / fire_risk / unattended_cooking / carbon_monoxide / sensor_stuck / sensor_drift / sensor_malfunction / actuator_stuck / lock_malfunction / safety_device_failure / water_leak / possible_fall / abnormal_inactivity / health_concern / child_safety / behavioral_anomaly / none",
  "threat_description": "一句话描述发现的问题或确认安全",
  "reasoning": [
    "推理步骤1: ...",
    "推理步骤2: ...",
    "推理步骤3: ..."
  ],
  "key_evidence": [
    "关键证据1",
    "关键证据2"
  ],
  "recommended_actions": [
    "建议措施1",
    "建议措施2"
  ]
}
```

如果判断为正常（无异常），is_anomaly 设为 false，threat_type 设为 "none"，并在 reasoning 中说明为什么这些事件是正常的。

{
  "is_anomaly": true,
  "confidence": "medium",
  "threat_type": "intrusion",
  "threat_description": "门锁解锁后无对应入口触发",
  "reasoning": [
    "推理步骤1: 门锁状态切到 Unlocked",
    "推理步骤2: 未见对应的前门接触事件",
    "推理步骤3: 数分钟后却出现室内活动"
  ],
  "key_evidence": [
    "门锁状态切到 Unlocked",
    "未见对应的前门接触事件",
    "数分钟后却出现室内活动"
  ],
  "recommended_actions": [
    "判定为可疑解锁链路，建议核查远程解锁或锁日志完整性。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_drift",
  "threat_description": "厨房温度传感器读数严重偏离物理常识（显示为 200°C+），且与其他房间温差异常，极可能是传感器故障或漂移导致误报火灾风险。",
  "reasoning": [
    "推理步骤 1: 分析日志发现从 00:35 开始，厨房温度传感器 (kitchen_temp_sensor) 的 MeasuredValue 持续在 2280-2333 之间波动。",
    "推理步骤 2: 结合 Matter 协议标准及家庭环境常识，该数值若代表摄氏度则远超任何室内场景（包括火灾）；若代表毫开尔文 (mK)，则换算后约为 2.28°C，与同时段其他房间（约 2.28°C）一致但过低，不符合夏季夜间室温特征。考虑到其他房间温度也在 2270-2340 区间，最合理的解释是传感器发生了严重的数值漂移或校准错误，将正常的 ~23°C 错误上报为 ~2300°C (或单位混淆导致的巨大偏差)。",
    "推理步骤 3: 尽管入户门锁操作和人员活动正常，但厨房烟雾报警器 (smoke_co_alarm) 未触发可能是因为其阈值设定较高或尚未收到联动指令，然而如此离谱的温度读数本身就是一个高危信号，可能导致用户恐慌或掩盖真实的火灾隐患（如果传感器损坏导致无法检测真实高温）。这种跨天持续存在的异常数据模式属于典型的 sensor_drift。",
    "关键证据：[\"2026-07-30T00:35:00 至 02:15:00 期间 kitchen_temp_sensor 读数稳定在 2280-2333 范围\", \"同一时间段内其他房间温度传感器读数也出现类似量级的异常高值（如 second_bedroom 达到 2342），表明可能是系统级校准问题或特定传感器批次故障\"]
  ],
  "key_evidence": [
    "kitchen_temp_sensor 在凌晨时段持续报告 2280-2333 的异常数值",
    "multiple temperature sensors across rooms showing similar unrealistic high values simultaneously"
  ],
  "recommended_actions": [
    "立即检查并更换厨房及受影响的温度传感器设备",
    "手动复核厨房实际环境温度以排除真实过热风险",
    "重置智能家居系统的温度校准参数或联系 Matter 网关管理员进行固件更新/诊断"
  ]
}
```