你是一个智能家居安全分析 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]

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

## 设备事件日志
[2026-07-24T00:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T01:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T01:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2290
[2026-07-24T01:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2319
[2026-07-24T01:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2317
[2026-07-24T01:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2322
[2026-07-24T02:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T02:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2332
[2026-07-24T02:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T02:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2350
[2026-07-24T03:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T03:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2367
[2026-07-24T03:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2374
[2026-07-24T03:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2375
[2026-07-24T03:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2395
[2026-07-24T04:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2400
[2026-07-24T04:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T04:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T04:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2410
[2026-07-24T04:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2405
[2026-07-24T04:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2417
[2026-07-24T04:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2403
[2026-07-24T04:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2426
[2026-07-24T04:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T04:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2417
[2026-07-24T04:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2428
[2026-07-24T04:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2434
[2026-07-24T04:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2433
[2026-07-24T04:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2427
[2026-07-24T05:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2437
[2026-07-24T05:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T05:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2451
[2026-07-24T05:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2437
[2026-07-24T05:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-07-24T05:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2454
[2026-07-24T05:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T05:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2462
[2026-07-24T05:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2461
[2026-07-24T05:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2475
[2026-07-24T05:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2463
[2026-07-24T06:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T06:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T06:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2479
[2026-07-24T06:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2480
[2026-07-24T06:11:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T06:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2484
[2026-07-24T06:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2479
[2026-07-24T06:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-07-24T06:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-07-24T06:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T06:31:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T06:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2486
[2026-07-24T06:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-07-24T06:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-07-24T06:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-07-24T06:51:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T06:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2506
[2026-07-24T06:55:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T07:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-24T07:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T07:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-07-24T07:05:00] living_room_light_1 | OnOff.OnOff = True
[2026-07-24T07:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-07-24T07:10:00] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T07:10:30] kitchen_window_contact | BooleanState.StateValue = False
[2026-07-24T07:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-07-24T07:19:02] kitchen_light | OnOff.OnOff = False
[2026-07-24T07:19:19] front_door_contact | BooleanState.StateValue = False
[2026-07-24T07:19:20] front_door_lock | DoorLock.LockState = 1
[2026-07-24T07:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-24T07:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-07-24T07:29:20] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T07:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-07-24T07:31:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T07:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-24T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-24T07:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-07-24T07:51:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T07:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-24T08:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-24T08:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T08:04:20] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T08:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-24T08:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-24T08:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-24T08:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-24T08:24:20] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T08:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-07-24T08:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-24T08:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T08:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-24T08:36:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T08:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-24T08:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-24T08:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-24T08:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-24T08:56:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T09:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-24T09:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T09:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-07-24T09:09:20] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T09:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-24T09:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-24T09:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-24T09:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-24T09:29:20] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T09:31:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T09:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-24T09:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-07-24T09:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-24T09:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-24T09:51:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T09:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-24T10:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T10:04:20] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-24T10:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-24T10:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-07-24T10:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-24T10:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-24T10:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-24T10:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-24T10:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-24T11:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-24T11:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-24T11:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539

## 任务
根据以下传感器与设备记录，评估目标设备当前工作状态是否正常。如异常，请给出故障判断依据。

请按以下 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": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本是起床链路的短时活动；异常样本是长时间单点持续 Occupied。"
  ],
  "key_evidence": [
    "正常样本是起床链路的短时活动；异常样本是长时间单点持续 Occupied。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "fire_risk",
  "threat_description": "检测到厨房温度异常升高且伴随窗户开启，存在严重的火灾风险或设备过热隐患。",
  "reasoning": [
    "推理步骤 1: 分析时间线发现，从 07:10 开始，厨房温度传感器读数急剧上升，从 2523 (约 22°C) 持续攀升至 10:40 的 2544 (约 22.1°C)，虽然数值本身看似正常（Matter 协议中摄氏度通常需除以 10），但相对于凌晨 01:00 的 2290 (22.9°C)，全天呈现非自然的缓慢爬升趋势，且峰值出现在上午时段。",
    "推理步骤 2: 关键异常点在于 07:10:30 厨房窗户接触传感器状态变为 False (Open)。在家庭无人或仅有少量人员活动（如主卧有人）的情况下，厨房窗户无故打开通常意味着通风异常或外部入侵尝试，结合高温读数，极有可能是外部热源进入或内部设备故障导致热量积聚无法散发。",
    "推理步骤 3: 对比其他房间，次卧和主卧温度也同步出现上升趋势（从 24xx 升至 25xx），表明整个房屋环境温度正在累积升高。考虑到厨房是火灾高发区，且烟雾报警器日志未提及触发（可能尚未达到阈值或传感器未覆盖该特定热点），这种‘高温 + 开窗’的组合模式高度符合早期火灾特征或严重电气/燃气泄漏导致的过热风险。",
    "推理步骤 4: 尽管入户门在 07:19 被解锁并随后有人进入（entrance_occupancy=1），但这发生在高温持续上升之后，不能解释为何厨房会在无人长时间停留期间温度异常升高。最合理的推断是厨房内部发生了不可见的燃烧过程或设备故障，导致温度异常。"
  ],
  "key_evidence": [
    "2026-07-24T07:10:30 kitchen_window_contact 状态变为 False (Open)，表示厨房窗户被打开。",
    "2026-07-24T07:20:00 至 2026-07-24T10:40:00 期间，kitchen_temp_sensor 读数持续异常偏高并呈上升趋势（2523 -> 2544）。",
    "全房多区域温度同步缓慢爬升，显示环境热积累异常。"
  ],
  "recommended_actions": [
    "立即通知住户前往厨房检查是否有明火、烟雾或异味。",
    "建议手动关闭厨房窗户以阻断可能的外部气流干扰，并检查灶具及电器是否处于异常工作状态。",
    "若确认无明火但温度持续异常，建议联系专业维修人员排查电路或燃气泄漏问题。",
    "检查烟雾报警器功能是否正常，必要时进行更换或校准。"
  ]
}
```


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

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

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

## 家庭环境信息
家庭布局: 两室一厅 (2BR)
- 重点房间 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]
- 房间 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]

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

## 设备事件日志
[2026-07-20T07:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-07-20T07:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T07:03:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T07:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-07-20T07:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-07-20T07:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2502
[2026-07-20T07:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-07-20T07:22:04] kitchen_light | OnOff.OnOff = False
[2026-07-20T07:22:25] front_door_contact | BooleanState.StateValue = False
[2026-07-20T07:22:27] front_door_lock | DoorLock.LockState = 1
[2026-07-20T07:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-07-20T07:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-07-20T07:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-20T07:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T07:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-07-20T07:37:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T07:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-20T07:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-07-20T07:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-07-20T07:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-20T07:57:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-20T08:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T08:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-20T08:08:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-20T08:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-20T08:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-20T08:28:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-20T08:32:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-20T08:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-20T08:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-20T08:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-20T08:52:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T08:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-20T09:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-20T09:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T09:03:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-20T09:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-20T09:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-20T09:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-20T09:23:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-20T09:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T09:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-20T09:37:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T09:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-20T09:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-20T09:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-20T09:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-20T09:57:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T10:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-20T10:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T10:00:00] balcony_laundry_washer | OperationalState.OperationalState = 1
[2026-07-20T10:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-20T10:08:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T10:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-20T10:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-20T10:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-20T10:20:00] balcony_laundry_washer | OperationalState.CountdownTime = 2400
[2026-07-20T10:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-07-20T10:28:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T10:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-20T10:32:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T10:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-07-20T10:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-20T10:40:00] balcony_laundry_washer | OperationalState.CountdownTime = 1200
[2026-07-20T10:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-07-20T10:52:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T11:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-20T11:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T11:00:00] balcony_laundry_washer | OperationalState.OperationalState = 0
[2026-07-20T11:03:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T11:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-20T11:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-20T11:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-20T11:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-20T11:23:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T11:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-20T11:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T11:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-20T11:37:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T11:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-20T11:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-20T11:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-07-20T11:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-20T11:57:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T12:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-20T12:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T12:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-07-20T12:08:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T12:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-20T12:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-07-20T12:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-07-20T12:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-20T12:28:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T12:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-07-20T12:32:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T12:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-07-20T12:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-07-20T12:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-20T12:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-07-20T12:52:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T12:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-07-20T13:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-07-20T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T13:03:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T13:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2500
[2026-07-20T13:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-07-20T13:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-07-20T13:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2495
[2026-07-20T13:23:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T13:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2484
[2026-07-20T13:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2486
[2026-07-20T13:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-20T13:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2487
[2026-07-20T13:37:26] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-20T13:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2480
[2026-07-20T13:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2485

## 任务
请结合下面的 Matter 设备日志，判断是否存在设备健康问题，并说明可能的故障类型。

请按以下 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": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本倒计时递减并停止；异常样本数值长时间固定。"
  ],
  "key_evidence": [
    "正常样本倒计时递减并停止；异常样本数值长时间固定。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "厨房温度传感器在设备运行期间出现长时间数据丢失（None），随后数值异常跳变，表明传感器可能故障或通信中断。",
  "reasoning": [
    "推理步骤 1: 日志显示在 2026-07-20T07:25:00 时，厨房温度传感器 (kitchen_temp_sensor) 报告了 'MeasuredValue = None'，这通常表示传感器未读取到有效数据、通信超时或硬件故障。",
    "推理步骤 2: 尽管在 30 秒后（07:30:00）传感器恢复了读数，但随后的数值（如 08:10:00 的 2541, 09:10:00 的 2555）相对于周围环境和其他房间的温度出现了不合理的剧烈波动和持续高位，不符合正常热力学变化规律。",
    "推理步骤 3: 结合上下文，虽然洗衣机在阳台运行，但厨房作为重点监控区域，其核心安全传感器（烟雾/温度）的数据完整性至关重要。这种间歇性掉线加数值漂移的模式是典型的传感器故障特征，而非正常的烹饪升温过程（因为未见灶具开启记录且时间跨度大）。"
  ],
  "key_evidence": [
    "[2026-07-20T07:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None",
    "[2026-07-20T09:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555 (对比其他房间温度明显偏高且不稳定)"
  ],
  "recommended_actions": [
    "立即检查厨房温度传感器的物理连接及供电状态。",
    "尝试重启厨房温度传感器设备以排除临时通信故障。",
    "若问题 persists，建议更换传感器以确保火灾预警系统的可靠性。"
  ]
}
```


你是一个智能家居安全分析 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]

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

## 设备事件日志
[2026-07-09T00:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2262
[2026-07-09T07:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-07-09T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-09T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-09T08:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-09T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-09T08:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T08:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-09T09:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-09T09:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-09T10:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-09T10:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T10:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2559
[2026-07-09T10:08:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T10:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-09T10:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-09T10:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-09T10:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-09T10:26:39] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T10:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T10:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-09T10:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-09T10:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-09T10:48:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T10:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-09T10:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-09T11:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-09T11:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T11:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-07-09T11:08:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T11:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-09T11:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-09T11:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-09T11:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-09T11:26:39] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T11:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-09T11:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T11:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-09T11:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-09T11:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-09T11:48:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T11:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-09T11:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-09T12:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-09T12:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T12:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-07-09T12:08:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T12:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-07-09T12:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-07-09T12:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-09T12:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-07-09T12:26:39] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T12:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-09T12:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T12:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-07-09T12:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-07-09T12:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-07-09T12:48:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T12:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-07-09T12:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-07-09T13:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-07-09T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T13:00:00] living_room_ac | OnOff.OnOff = True
[2026-07-09T13:08:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T13:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2506
[2026-07-09T13:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-07-09T13:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2840
[2026-07-09T13:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-07-09T13:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-07-09T13:26:39] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T13:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2495
[2026-07-09T13:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T13:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-07-09T13:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2720
[2026-07-09T13:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2476
[2026-07-09T13:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2474
[2026-07-09T13:48:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T13:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2482
[2026-07-09T13:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2484
[2026-07-09T13:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2610
[2026-07-09T14:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2470
[2026-07-09T14:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T14:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2462
[2026-07-09T14:08:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T14:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2471
[2026-07-09T14:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2464
[2026-07-09T14:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2468
[2026-07-09T14:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2464
[2026-07-09T14:26:39] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T14:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2450
[2026-07-09T14:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T14:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2452
[2026-07-09T14:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2448
[2026-07-09T14:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-07-09T14:48:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T14:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2453
[2026-07-09T14:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2441
[2026-07-09T15:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2445
[2026-07-09T15:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T15:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2440
[2026-07-09T15:08:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T15:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2425
[2026-07-09T15:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2436
[2026-07-09T15:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2419
[2026-07-09T15:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2414
[2026-07-09T15:26:39] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T15:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2422
[2026-07-09T15:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T15:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2411
[2026-07-09T15:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2412
[2026-07-09T15:48:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T15:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2414
[2026-07-09T15:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2403
[2026-07-09T16:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2390
[2026-07-09T16:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T16:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2389
[2026-07-09T16:08:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T16:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2404
[2026-07-09T16:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2394
[2026-07-09T16:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2385
[2026-07-09T16:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2387
[2026-07-09T16:26:39] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T16:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2386
[2026-07-09T16:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T16:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2373
[2026-07-09T16:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2379
[2026-07-09T16:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2377
[2026-07-09T16:48:25] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T16:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2375
[2026-07-09T16:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2357
[2026-07-09T17:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2352
[2026-07-09T17:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2348
[2026-07-09T17:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2342
[2026-07-09T18:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-09T18:01:27] living_room_ac | OnOff.OnOff = True
[2026-07-09T18:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2324

## 任务
请结合下面的 Matter 设备日志，判断是否存在设备健康问题，并说明可能的故障类型。

请按以下 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": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本空调开启后温度逐步下降；异常样本持续不降反升。"
  ],
  "key_evidence": [
    "正常样本空调开启后温度逐步下降；异常样本持续不降反升。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "客厅温度传感器在空调开启后出现严重的数据跳变和逻辑矛盾，显示设备可能故障或受到干扰。",
  "reasoning": [
    "推理步骤 1: 日志显示在 2026-07-09T13:00:00 时，living_room_ac 状态变为 True（开启），随后温度读数从正常的约 25°C (2498 mK) 开始异常波动。",
    "推理步骤 2: 在 13:15:00，温度读数突然飙升至 2840 (28.4°C)，而在仅 10 分钟后的 13:25:00 又骤降至 2490 (24.9°C)。这种在短时间内剧烈且无物理依据的升降不符合热力学规律，表明传感器读数不可靠。",
    "推理步骤 3: 尽管空调已开启且后续读数逐渐下降至正常范围（如 18:10 时为 23.24°C），但中间出现的极端数值（28.4°C）与周围房间（厨房、次卧等）稳定的温度趋势不一致，排除了环境温度突变的可能性，确认为传感器本身的硬件故障或通信数据错误。"
  ],
  "key_evidence": [
    "2026-07-09T13:00:00 living_room_ac OnOff.OnOff = True (空调开启)",
    "2026-07-09T13:15:00 living_room_temp_sensor MeasuredValue = 2840 (异常高温读数)",
    "2026-07-09T13:25:00 living_room_temp_sensor MeasuredValue = 2490 (瞬间恢复正常)"
  ],
  "recommended_actions": [
    "立即检查并重新校准客厅温度传感器，或将其从 Matter 网络中移除并更换新设备。",
    "暂时依赖其他房间的温度传感器或手动温度计监控客厅实际温度，直到故障设备被修复。",
    "检查传感器供电及连接线路，排除因电压不稳导致的信号跳变。"
  ]
}
```


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

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

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

## 家庭环境信息
家庭布局: 两室一厅 (2BR)
- 重点房间 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]
- 房间 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]

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

## 设备事件日志
[2026-07-28T07:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-28T07:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-28T07:01:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T07:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-28T07:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-28T07:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-07-28T07:17:30] kitchen_window_contact | BooleanState.StateValue = False
[2026-07-28T07:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-07-28T07:22:08] master_bedroom_light | OnOff.OnOff = False
[2026-07-28T07:22:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-07-28T07:26:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T07:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-07-28T07:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-28T07:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-07-28T07:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-28T07:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-28T07:47:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T07:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-28T07:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-07-28T08:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-28T08:01:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T08:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-28T08:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-28T08:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-28T08:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-28T08:21:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T08:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-28T08:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-28T08:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-28T08:32:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T08:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-28T08:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-28T08:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-28T08:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-28T08:52:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T08:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-28T09:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-28T09:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-28T09:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-28T09:06:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T09:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-28T09:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-28T09:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-28T09:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-28T09:26:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T09:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-28T09:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-28T09:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-28T09:37:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T09:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-28T09:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-28T09:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-28T09:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-28T09:57:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T10:00:00] balcony_laundry_washer | OperationalState.OperationalState = 1
[2026-07-28T10:01:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T10:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-28T10:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-28T10:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-28T10:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-28T10:20:00] balcony_laundry_washer | OperationalState.CountdownTime = 2400
[2026-07-28T10:21:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T10:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-07-28T10:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-28T10:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-28T10:32:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T10:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-07-28T10:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-28T10:40:00] balcony_laundry_washer | OperationalState.CountdownTime = 1200
[2026-07-28T10:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-28T10:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-28T10:52:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T10:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-28T11:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-28T11:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-28T11:00:00] balcony_laundry_washer | OperationalState.OperationalState = 0
[2026-07-28T11:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-28T11:06:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T11:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-07-28T11:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-28T11:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-28T11:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-28T11:26:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T11:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-28T11:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-28T11:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-28T11:37:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T11:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-28T11:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-28T11:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-28T11:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-28T11:57:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T12:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-28T12:01:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T12:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-07-28T12:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-07-28T12:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-07-28T12:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-07-28T12:21:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T12:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-28T12:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-28T12:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-28T12:32:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T12:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-07-28T12:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-28T12:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2506
[2026-07-28T12:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2500
[2026-07-28T12:52:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T12:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2500
[2026-07-28T13:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-07-28T13:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-28T13:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-07-28T13:06:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T13:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-07-28T13:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-07-28T13:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2485
[2026-07-28T13:26:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T13:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2499
[2026-07-28T13:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-28T13:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2484
[2026-07-28T13:37:22] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-28T13:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2492
[2026-07-28T13:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2477

## 任务
根据以下传感器与设备记录，评估目标设备当前工作状态是否正常。如异常，请给出故障判断依据。

请按以下 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": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "洗衣机按预期正常完成洗涤程序，无异常状态或安全威胁。",
  "reasoning": [
    "1. 设备启动与运行：日志显示在 10:00:00，阳台洗衣机（balcony_laundry_washer）的 OperationalState 变为 1（运行中），表明用户启动了洗衣程序。",
    "2. 倒计时逻辑验证：在 10:20:00，CountdownTime 为 2400秒（40分钟）；在 10:40:00，CountdownTime 为 1200秒（20分钟）。时间间隔20分钟，倒计时减少20分钟，符合线性递减规律，证明设备正在正常运行且剩余时间计算准确。",
    "3. 任务完成确认：在 11:00:00，OperationalState 变为 0（空闲/停止），此时距离启动刚好过去1小时，符合典型洗衣机程序的时长范围。",
    "4. 环境背景分析：在此期间（10:00-11:00），主卧 occupancy 传感器持续检测到有人（值为1），入户门传感器也间歇性触发（可能为家庭成员活动或宠物），未发现入侵迹象。温度数据波动属于正常室内热惯性变化，无火灾或极端环境风险。"
  ],
  "key_evidence": [
    "[2026-07-28T10:00:00] balcony_laundry_washer | OperationalState.OperationalState = 1 (开始运行)",
    "[2026-07-28T10:20:00] balcony_laundry_washer | OperationalState.CountdownTime = 2400 (剩余40分钟)",
    "[2026-07-28T10:40:00] balcony_laundry_washer | OperationalState.CountdownTime = 1200 (剩余20分钟)",
    "[2026-07-28T11:00:00] balcony_laundry_washer | OperationalState.OperationalState = 0 (运行结束)"
  ],
  "recommended_actions": [
    "无需采取任何行动，设备工作正常。"
  ]
}
```

{
  "is_anomaly": true,
  "confidence": "medium",
  "threat_type": "intrusion",
  "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]

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

## 设备事件日志
[2026-07-04T00:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-07-04T08:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-07-04T08:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-04T08:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-04T09:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-04T09:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T09:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-07-04T10:02:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T10:02:11] living_room_window | WindowCovering.CurrentPositionLiftPercent100ths = 0
[2026-07-04T10:22:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T10:42:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T11:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-04T11:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T11:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-04T11:07:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T11:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-04T11:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-04T11:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-04T11:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-04T11:27:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T11:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-04T11:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-04T11:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-04T11:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-04T11:47:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T11:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-04T11:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-07-04T12:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-04T12:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T12:03:27] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T12:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-04T12:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-04T12:12:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T12:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2788
[2026-07-04T12:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-04T12:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-04T12:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-04T12:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T12:33:27] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T12:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2921
[2026-07-04T12:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-07-04T12:41:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-07-04T12:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-07-04T12:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-07-04T12:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-07-04T12:57:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T13:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2736
[2026-07-04T13:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2501
[2026-07-04T13:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2497
[2026-07-04T13:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-07-04T13:17:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T13:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2584
[2026-07-04T13:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-04T13:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2492
[2026-07-04T13:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T13:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-07-04T13:37:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T13:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2484
[2026-07-04T13:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2477
[2026-07-04T13:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2485
[2026-07-04T13:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2477
[2026-07-04T13:57:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T14:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2464
[2026-07-04T14:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2430
[2026-07-04T14:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2479
[2026-07-04T14:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-04T14:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2477
[2026-07-04T14:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2470
[2026-07-04T14:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2462
[2026-07-04T14:17:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T14:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2463
[2026-07-04T14:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2456
[2026-07-04T14:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2464
[2026-07-04T14:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T14:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2463
[2026-07-04T14:37:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T14:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2451
[2026-07-04T14:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2440
[2026-07-04T14:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2437
[2026-07-04T14:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2438
[2026-07-04T14:57:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T15:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2430
[2026-07-04T15:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2433
[2026-07-04T15:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2422
[2026-07-04T15:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2439
[2026-07-04T15:17:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T15:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2434
[2026-07-04T15:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2430
[2026-07-04T15:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2419
[2026-07-04T15:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T15:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2426
[2026-07-04T15:37:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T15:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2405
[2026-07-04T15:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2403
[2026-07-04T15:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2414
[2026-07-04T15:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2412
[2026-07-04T15:57:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T16:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2406
[2026-07-04T16:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2405
[2026-07-04T16:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2384
[2026-07-04T16:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2385
[2026-07-04T16:17:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T16:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2395
[2026-07-04T16:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2383
[2026-07-04T16:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2391
[2026-07-04T16:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-04T16:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2383
[2026-07-04T16:37:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T16:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2377
[2026-07-04T16:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2371
[2026-07-04T16:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2360
[2026-07-04T16:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2369
[2026-07-04T16:57:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-04T17:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2370
[2026-07-04T17:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2355
[2026-07-04T17:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2350
[2026-07-04T17:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2359
[2026-07-04T17:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2351
[2026-07-04T17:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2350
[2026-07-04T17:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2329
[2026-07-04T17:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2323
[2026-07-04T18:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2331
[2026-07-04T18:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2327
[2026-07-04T18:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2317
[2026-07-04T18:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2305
[2026-07-04T18:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2300
[2026-07-04T19:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2287
[2026-07-04T19:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2282

## 任务
请结合下面的 Matter 设备日志，判断是否存在设备健康问题，并说明可能的故障类型。

请按以下 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": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本是小幅波动；异常样本出现不可能的极端跳变。"
  ],
  "key_evidence": [
    "正常样本是小幅波动；异常样本出现不可能的极端跳变。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "厨房温度传感器在正常烹饪过程中出现数据丢失（None）及剧烈跳变，表明设备存在严重的硬件故障或通信中断风险。",
  "reasoning": [
    "推理步骤 1: 分析日志发现，厨房温度传感器 (kitchen_temp_sensor) 在 2026-07-04T12:41:00 报告了 'MeasuredValue = None'。在 Matter 协议中，这通常表示传感器无法读取数值、内部电路断开或通信链路完全中断，而非正常的温度波动。",
    "推理步骤 2: 结合上下文，该异常发生在中午时段（12:35 时温度为 29.21°C，随后下降），且紧接着在 13:00 和 13:20 出现了极不合理的温度读数（27.36°C 和 25.84°C），随后才逐渐恢复正常趋势。这种‘无值 - 乱码 - 恢复’的模式是典型的传感器失效特征。",
    "推理步骤 3: 虽然其他房间（客厅、主卧等）的温度变化符合昼夜节律和人员活动逻辑，但厨房作为高风险区域，其核心安全传感器（烟雾报警器虽未报错，但温感缺失）的持续故障可能导致火灾预警延迟或失效，构成实质性安全隐患。"
  ],
  "key_evidence": [
    "[2026-07-04T12:41:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None",
    "[2026-07-04T12:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2921 (异常高值)",
    "[2026-07-04T13:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2736 (异常高值)"
  ],
  "recommended_actions": [
    "立即检查厨房温度传感器的物理连接状态，确认是否松动或电源中断。",
    "尝试重启厨房区域的 Matter 网关或重置该传感器以排除临时通信故障。",
    "若重启无效，需更换新的温度传感器，并在此期间人工留意厨房用火安全。"
  ]
}
```


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

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

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

## 家庭环境信息
家庭布局: 两室一厅 (2BR)
- 重点房间 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]
- 房间 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]

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

## 设备事件日志
[2026-07-02T07:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2499
[2026-07-02T07:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T07:03:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T07:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-07-02T07:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-07-02T07:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-07-02T07:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-07-02T07:23:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-07-02T07:27:10] kitchen_light | OnOff.OnOff = False
[2026-07-02T07:27:34] front_door_contact | BooleanState.StateValue = False
[2026-07-02T07:27:40] front_door_lock | DoorLock.LockState = 1
[2026-07-02T07:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-02T07:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T07:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-07-02T07:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-07-02T07:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-07-02T07:48:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T07:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-02T07:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-07-02T08:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-02T08:02:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T08:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-02T08:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-07-02T08:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-02T08:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-02T08:22:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T08:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-02T08:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-02T08:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T08:33:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T08:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-02T08:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-02T08:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-02T08:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-02T08:53:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T08:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-02T09:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-07-02T09:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T09:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-02T09:07:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T09:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-02T09:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-02T09:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-07-02T09:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-02T09:27:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T09:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-02T09:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T09:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-02T09:38:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T09:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-02T09:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-02T09:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-02T09:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-02T09:58:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T10:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-02T10:00:00] balcony_laundry_washer | OperationalState.OperationalState = 1
[2026-07-02T10:02:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T10:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-02T10:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-02T10:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-02T10:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-02T10:20:00] balcony_laundry_washer | OperationalState.CountdownTime = 2400
[2026-07-02T10:22:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T10:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2559
[2026-07-02T10:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-02T10:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T10:33:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T10:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-02T10:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-02T10:40:00] balcony_laundry_washer | OperationalState.CountdownTime = 1200
[2026-07-02T10:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-02T10:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-02T10:53:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T10:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-02T11:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-02T11:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T11:00:00] balcony_laundry_washer | OperationalState.OperationalState = 0
[2026-07-02T11:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-02T11:07:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T11:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-02T11:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-02T11:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-02T11:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-02T11:27:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T11:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-02T11:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T11:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-07-02T11:38:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T11:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-02T11:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-02T11:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-02T11:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-02T11:58:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T12:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-07-02T12:02:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T12:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-02T12:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-02T12:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-07-02T12:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-02T12:22:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T12:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-07-02T12:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T12:33:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T12:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-07-02T12:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-07-02T12:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-07-02T12:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-07-02T12:53:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T12:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-07-02T13:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-07-02T13:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T13:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2497
[2026-07-02T13:07:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T13:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2505
[2026-07-02T13:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-02T13:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-02T13:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2483
[2026-07-02T13:27:35] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T13:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2501
[2026-07-02T13:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-02T13:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2480
[2026-07-02T13:38:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-02T13:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-07-02T13:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2492

## 任务
根据以下传感器与设备记录，评估目标设备当前工作状态是否正常。如异常，请给出故障判断依据。

请按以下 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": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "洗衣机按预期完成工作周期，状态从运行(1)变为空闲(0)，并伴随倒计时归零，属于正常行为。",
  "reasoning": [
    "1. 识别关键事件：日志显示在 2026-07-02T10:00:00，阳台洗衣机 (balcony_laundry_washer) 的 OperationalState 变为 1（通常表示运行中或启动）。",
    "2. 验证设备逻辑：随后在 10:20 和 10:40，设备报告了 CountdownTime 分别为 2400秒（40分钟）和 1200秒（20分钟），这表明设备正在执行一个预设的洗涤程序，且剩余时间在合理递减。",
    "3. 确认任务完成：在 11:00:00，OperationalState 变为 0（通常表示空闲或停止），这与之前的倒计时逻辑一致（假设程序时长约为1小时，从10:00到11:00正好一小时，或者中间有暂停/中断后的重新计算，但总体流程符合家电工作规律）。",
    "4. 排除异常：没有发现漏水传感器报警、门锁异常开启或其他安全相关设备的联动异常。洗衣机的状态变化是孤立的且符合其功能定义，未构成安全威胁。"
  ],
  "key_evidence": [
    "[2026-07-02T10:00:00] balcony_laundry_washer | OperationalState.OperationalState = 1",
    "[2026-07-02T10:20:00] balcony_laundry_washer | OperationalState.CountdownTime = 2400",
    "[2026-07-02T11:00:00] balcony_laundry_washer | OperationalState.OperationalState = 0"
  ],
  "recommended_actions": [
    "无需采取任何行动，设备运行正常。"
  ]
}
```

{
  "is_anomaly": true,
  "confidence": "medium",
  "threat_type": "intrusion",
  "threat_description": "这些变化表明存在安全异常。",
  "reasoning": [
    "推理步骤1: 我把本可由正常模式解释的事件误判成了异常。"
  ],
  "key_evidence": [
    "正常样本倒计时递减并停止；异常样本数值长时间固定。"
  ],
  "recommended_actions": [
    "建议立即检查并触发安全响应。"
  ]
}