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

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

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

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

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

## 设备事件日志
[2026-08-01T00:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-08-01T00:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T00:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2277
[2026-08-01T00:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2276
[2026-08-01T00:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2177
[2026-08-01T00:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2278
[2026-08-01T00:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T00:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2191
[2026-08-01T00:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2292
[2026-08-01T00:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2296
[2026-08-01T00:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2187
[2026-08-01T01:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2284
[2026-08-01T01:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T01:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2293
[2026-08-01T01:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2193
[2026-08-01T01:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2301
[2026-08-01T01:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2310
[2026-08-01T01:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2213
[2026-08-01T01:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T01:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2304
[2026-08-01T01:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2216
[2026-08-01T01:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2316
[2026-08-01T02:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2332
[2026-08-01T02:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T02:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2333
[2026-08-01T02:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2333
[2026-08-01T02:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2227
[2026-08-01T02:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2334
[2026-08-01T02:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T02:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2237
[2026-08-01T02:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2340
[2026-08-01T02:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2358
[2026-08-01T02:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2267
[2026-08-01T03:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2367
[2026-08-01T03:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T03:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2359
[2026-08-01T03:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-08-01T03:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2372
[2026-08-01T03:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2371
[2026-08-01T03:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2283
[2026-08-01T03:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T03:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2390
[2026-08-01T03:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2296
[2026-08-01T03:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2402
[2026-08-01T04:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2404
[2026-08-01T04:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T04:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2398
[2026-08-01T04:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2415
[2026-08-01T04:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2319
[2026-08-01T04:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2425
[2026-08-01T04:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T04:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2428
[2026-08-01T04:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2438
[2026-08-01T04:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2344
[2026-08-01T05:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-08-01T05:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T05:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2445
[2026-08-01T05:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2352
[2026-08-01T05:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2439
[2026-08-01T05:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-08-01T05:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2349
[2026-08-01T05:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T05:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2473
[2026-08-01T05:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2375
[2026-08-01T05:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2470
[2026-08-01T06:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2466
[2026-08-01T06:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T06:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2485
[2026-08-01T06:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-08-01T06:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2393
[2026-08-01T06:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-08-01T06:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T06:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2394
[2026-08-01T06:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2497
[2026-08-01T06:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-08-01T06:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2400
[2026-08-01T07:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-08-01T07:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T07:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2505
[2026-08-01T07:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2407
[2026-08-01T07:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2502
[2026-08-01T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-08-01T07:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2410
[2026-08-01T07:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-08-01T07:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2432
[2026-08-01T07:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-08-01T08:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-01T08:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T08:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-08-01T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-08-01T08:20:12] bedroom_window | WindowCovering.CurrentPositionLiftPercent100ths = 0
[2026-08-01T08:25:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T08:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T08:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2448
[2026-08-01T08:40:00] bathroom_light | OnOff.OnOff = True
[2026-08-01T08:45:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T08:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-01T08:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2451
[2026-08-01T09:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-01T09:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-01T09:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2448
[2026-08-01T09:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-01T09:15:00] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T09:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-01T09:20:33] kitchen_cook_surface | OnOff.OnOff = True
[2026-08-01T09:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2456
[2026-08-01T09:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-08-01T09:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-08-01T09:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-01T09:48:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T09:48:21] living_room_window | WindowCovering.CurrentPositionLiftPercent100ths = 0
[2026-08-01T09:50:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T09:55:30] kitchen_window_contact | BooleanState.StateValue = False
[2026-08-01T10:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-08-01T10:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-08-01T10:10:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T10:18:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T10:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-08-01T10:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T10:38:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T10:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-01T10:50:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T10:58:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-08-01T11:10:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:18:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-08-01T11:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:38:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-01T11:50:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:58:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530

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

请按以下 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": "sensor_stuck",
  "threat_description": "运动传感器持续报 Occupied",
  "reasoning": [
    "推理步骤1: 同一传感器跨长时间持续 Occupied",
    "推理步骤2: 缺少合理的人体移动链路",
    "推理步骤3: 更像卡死而非真实活动"
  ],
  "key_evidence": [
    "同一传感器跨长时间持续 Occupied",
    "缺少合理的人体移动链路",
    "更像卡死而非真实活动"
  ],
  "recommended_actions": [
    "判断为占用传感器卡死，建议检修或重置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "fire_risk",
  "threat_description": "厨房温度持续异常升高，且伴随灶具开启事件，存在严重的火灾风险。",
  "reasoning": [
    "推理步骤 1: 分析厨房温度传感器数据，发现从凌晨 00:05 (22.77°C) 开始，温度呈现持续单调上升趋势，至上午 09:48 达到峰值 25.53°C (原始值 2553)，期间无下降或波动，这不符合正常家庭环境的热力学规律（通常会有昼夜温差或人员活动导致的短暂变化）。",
    "推理步骤 2: 结合时间线分析，在 09:20:33 检测到厨房灶具 (cook_surface) 被开启 (OnOff = True)。正常情况下，烹饪产生的热量应在烹饪结束后随时间逐渐消散，但日志显示在灶具开启后，厨房温度并未回落，反而继续攀升并维持在极高水平。",
    "推理步骤 3: 对比其他房间，卧室和客厅的温度虽然也较高，但厨房作为热源区域，其温度远超正常室温范围（约 25-26°C），且与灶具开启行为的时间关联性极强，强烈暗示灶具可能处于故障状态（如干烧、温控失效）或发生了未察觉的明火/过热情况。"
  ],
  "key_evidence": [
    "厨房温度从 00:05 到 09:48 持续上升，最高达 25.53°C (2553 mK)，且无降温迹象。",
    "09:20:33 记录到厨房灶具开启事件，随后温度持续高位运行，未出现预期的冷却过程。",
    "厨房温度显著高于卧室和客厅同期温度，表明存在局部极端热源。"
  ],
  "recommended_actions": [
    "立即通过 Matter 协议远程关闭厨房灶具电源，防止火势蔓延。",
    "触发厨房烟雾报警器检查状态，确认是否已报警或需要人工干预。",
    "通知住户立即前往厨房检查现场情况，若发现明火或异常高温，立即撤离并拨打火警电话。",
    "建议维修人员上门检修厨房灶具温控系统。"
  ]
}
```


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

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

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

## 家庭环境信息
家庭布局: 三室两厅 (3BR)
- 重点房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 dining_room: 餐厅灯[dimmable_light], 餐厅运动传感器[occupancy_sensor]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_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]

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

## 设备事件日志
[2026-07-09T07:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2497
[2026-07-09T07:00:00] dining_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T07:02:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T07:05:00] master_bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T07:09:39] kitchen_cook_surface | OnOff.OnOff = True
[2026-07-09T07:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-09T07:17:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-07-09T07:18:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-07-09T07:21:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T07:25:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-09T07:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-07-09T07:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T07:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-07-09T07:37:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T07:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-07-09T07:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-07-09T07:50:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-07-09T07:50:20] front_door_lock | Event: LockOperation(LockOperationType=1, OperationSource=Manual)
[2026-07-09T07:50:28] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-07-09T07:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-09T07:56:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T08:00:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-09T08:05:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-09T08:07:08] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T08:10:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-09T08:16:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T08:20:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-09T08:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-07-09T08:30:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T08:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-09T08:37:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T08:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-07-09T08:42:08] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T08:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-09T08:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-09T09:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-09T09:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T09:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-09T09:06:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T09:10:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-09T09:12:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T09:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-09T09:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-09T09:27:08] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T09:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T09:35:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T09:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-09T09:41:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T09:45:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-09T09:47:08] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T09:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-09T09:57:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T10:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-07-09T10:00:00] balcony_laundry_washer | OperationalState.OperationalState = 1
[2026-07-09T10:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-09T10:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2559
[2026-07-09T10:10:43] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T10:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-09T10:17:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T10:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-09T10:20:00] balcony_laundry_washer | OperationalState.CountdownTime = 2400
[2026-07-09T10:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-09T10:26:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T10:30:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-09T10:35:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-07-09T10:37:08] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T10:40:00] balcony_laundry_washer | OperationalState.CountdownTime = 2400
[2026-07-09T10:40:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T10:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-09T10:46:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T10:50:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-09T11:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-09T11:00:00] balcony_laundry_washer | OperationalState.CountdownTime = 2400
[2026-07-09T11:00:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T11:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-09T11:07:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T11:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-09T11:12:08] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T11:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-09T11:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-09T11:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-09T11:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T11:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-09T11:36:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T11:40:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-07-09T11:42:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T11:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-07-09T11:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-09T11:55:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2521
[2026-07-09T11:57:08] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T12:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T12:05:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T12:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-09T12:11:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T12:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-07-09T12:17:08] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T12:27:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T12:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-07-09T12:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-07-09T12:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-07-09T12:40:43] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-09T12:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-07-09T12:47:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T12:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-07-09T12:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-07-09T12:56:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T13:00:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-09T13:05:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-07-09T13:07:08] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T13:10:23] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T13:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2492
[2026-07-09T13:16:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-09T13:20:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2502
[2026-07-09T13:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2481

## 任务
请结合下面的 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 中说明为什么这些事件是正常的。

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "厨房温度传感器出现数据异常（初始为None，随后数值剧烈波动且偏高），可能存在硬件故障或通信干扰。",
  "reasoning": [
    "1. 观察日志发现，2026-07-09T07:18:00时，kitchen_temp_sensor报告 TemperatureMeasurement.MeasuredValue = None，这通常表示传感器暂时失去连接、电池耗尽或读数失败。",
    "2. 随后在07:40:00恢复读数2521 (25.21°C)，但在10:00:00突然跳变至2558 (25.58°C)，并在10:05:00回落至2556 (25.56°C)。虽然这些数值仍在合理范围内，但结合之前的'None'状态，显示出数据的不稳定性。",
    "3. 对比同一时间段其他房间的温度传感器（如living_room在10:10为25.59°C，kids_room在10:35为25.57°C），厨房的读数趋势与其他区域基本一致，说明并非环境突变导致的真实高温，而是传感器自身的数据上报存在间歇性丢失和可能的校准漂移或通信错误。",
    "4. 考虑到重点设备是洗衣机，且洗衣机在10:00启动，虽然洗衣机运行会产生热量，但厨房温度传感器在10:00之前已经出现了不稳定的迹象（从None恢复到正常值的过程），且10:00时的25.58°C并未显著高于客厅的25.59°C，因此排除因洗衣机导致的环境过热风险，更倾向于传感器本身的信号质量问题。"
  ],
  "key_evidence": [
    "[2026-07-09T07:18:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None",
    "[2026-07-09T10:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558",
    "[2026-07-09T10:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556"
  ],
  "recommended_actions": [
    "检查厨房温度传感器的电池电量，必要时进行更换。",
    "确认厨房温度传感器与网关/Zigbee/Thread网络的信号强度，排除因距离过远或干扰导致的丢包现象。",
    "如果问题持续，尝试重置该传感器或联系厂商进行固件升级/硬件检测。"
  ]
}
```

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "系统运行正常，未发现设备故障、安全威胁或异常行为模式。",
  "reasoning": [
    "温度传感器数据合理：所有房间的温度传感器（如 living_room_temp_sensor, kitchen_temp_sensor）读数均在 24.9°C 至 25.6°C 之间（原始值约 2497-2558），符合夏季室内正常环境温度范围，且随时间有自然的波动趋势，无漂移或卡死现象。",
    " occupancy 逻辑一致：运动传感器报告的人员分布与家庭作息逻辑相符（例如早晨主卧和厨房有人，随后儿童房有人，中午客厅无人等），没有出现人员出现在不可能区域或长时间静止不动的异常情况。",
    " 关键设备状态正常：入户门锁在 07:50 执行了正常的上锁/解锁操作；阳台洗衣机在 10:00 启动并在后续多次更新倒计时（2400 秒，即 40 分钟），表明其控制回路工作正常，未出现 actuator_stuck 或 sensor_malfunction。",
    " 无安全警报触发：烟雾报警器、漏水传感器等安全设备在日志中未报告任何报警事件，结合正常的温湿度数据，排除了 fire_risk 和 water_leak 风险。"
  ],
  "key_evidence": [
    "kitchen_cook_surface 在 07:09 开启后于 07:17 关闭，间隔仅 8 分钟，属于正常的烹饪行为，非 unattended_cooking。",
    "balcony_laundry_washer 从 10:00 开始持续报告 CountdownTime = 2400，显示设备正在按计划运行，未停滞。",
    "所有 temperature_sensor 读数稳定且在合理范围内，无 sensor_drift 特征。"
  ],
  "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_ac, living_room_temp_sensor
- 已选事件数: 136

## 设备事件日志
[2026-08-24T00:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-08-24T07:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-08-24T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-08-24T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-08-24T08:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-08-24T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-24T08:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T08:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-08-24T09:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-24T09:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-24T09:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-08-24T10:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-08-24T10:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T10:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-24T10:05:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T10:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-08-24T10:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-08-24T10:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-24T10:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-24T10:25:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T10:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-24T10:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T10:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-08-24T10:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-24T10:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-24T10:45:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T10:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-24T11:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-24T11:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T11:05:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T11:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-24T11:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-24T11:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-24T11:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-08-24T11:25:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T11:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-24T11:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T11:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-24T11:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-24T11:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-08-24T11:45:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T11:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-08-24T11:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-08-24T12:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-24T12:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T12:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-24T12:05:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T12:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-24T12:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-08-24T12:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2518
[2026-08-24T12:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-08-24T12:25:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T12:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-08-24T12:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T12:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-08-24T12:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2506
[2026-08-24T12:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2506
[2026-08-24T12:45:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T12:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-08-24T12:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-08-24T13:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-08-24T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T13:00:00] living_room_ac | OnOff.OnOff = True
[2026-08-24T13:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2502
[2026-08-24T13:05:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T13:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2505
[2026-08-24T13:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-08-24T13:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2920
[2026-08-24T13:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-08-24T13:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2484
[2026-08-24T13:25:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T13:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2485
[2026-08-24T13:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T13:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2495
[2026-08-24T13:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2940
[2026-08-24T13:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2486
[2026-08-24T13:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2477
[2026-08-24T13:45:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T13:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-08-24T13:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2487
[2026-08-24T13:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2960
[2026-08-24T14:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2472
[2026-08-24T14:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T14:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2463
[2026-08-24T14:05:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T14:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2479
[2026-08-24T14:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2460
[2026-08-24T14:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2460
[2026-08-24T14:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2465
[2026-08-24T14:25:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T14:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2461
[2026-08-24T14:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T14:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2455
[2026-08-24T14:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2442
[2026-08-24T14:45:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T14:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2442
[2026-08-24T14:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2439
[2026-08-24T15:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2436
[2026-08-24T15:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T15:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2434
[2026-08-24T15:05:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T15:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2436
[2026-08-24T15:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2428
[2026-08-24T15:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2431
[2026-08-24T15:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2413
[2026-08-24T15:25:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T15:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2424
[2026-08-24T15:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T15:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2426
[2026-08-24T15:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2419
[2026-08-24T15:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2416
[2026-08-24T15:45:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T15:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2409
[2026-08-24T15:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2400
[2026-08-24T16:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2407
[2026-08-24T16:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T16:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2394
[2026-08-24T16:05:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T16:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2391
[2026-08-24T16:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2383
[2026-08-24T16:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2379
[2026-08-24T16:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2377
[2026-08-24T16:25:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T16:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2390
[2026-08-24T16:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-24T16:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2369
[2026-08-24T16:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2364
[2026-08-24T16:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2366
[2026-08-24T16:45:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-24T16:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2373
[2026-08-24T16:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2367
[2026-08-24T17:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2353
[2026-08-24T17:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2341
[2026-08-24T18:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2327
[2026-08-24T18:07:24] living_room_light_1 | OnOff.OnOff = True
[2026-08-24T18:12:20] living_room_occupancy | OccupancySensing.Occupancy = 1

## 任务
请结合下面的 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 中说明为什么这些事件是正常的。

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "客厅温度传感器出现间歇性读数异常（跳变至29°C+），与其他房间及空调运行状态不符，疑似传感器故障或数据上报错误。",
  "reasoning": [
    "1. 分析温度趋势：从07:00到13:00，客厅温度在25.0°C-25.6°C之间波动，符合夏季室内正常室温范围。其他房间（厨房、主卧、次卧）温度也集中在24.0°C-25.5°C左右，环境一致性良好。",
    "2. 识别异常点：在13:15、13:35和13:55，客厅温度传感器突然报告29.2°C、29.4°C和29.6°C的数值。这些数值显著高于同一时间段内其他所有传感器的读数（约低4-5度），且与刚开启的空调（13:00开启）旨在降温的逻辑相悖。",
    "3. 排除外部因素：虽然13:00开启了空调，但随后温度读数并未如预期般下降，反而在13:25降至24.84°C后，又在13:35再次飙升至29.4°C。这种剧烈的、非线性的波动（短时间内大幅升高又降低）不符合热力学自然变化规律，也不像是阳光直射导致的缓慢升温（通常会有更平滑的曲线）。",
    "4. 结合 occupancy 状态：13:00时 occupancy 为 0（无人），13:12 左右 entrance_occupancy 为 1（有人在家门口），但客厅 occupancy 直到 18:12 才变为 1。这意味着在温度异常期间，客厅可能无人或人员活动未触发传感器，进一步降低了“人体热源导致局部高温”的可能性（人体散热不足以在短时间内将室温推高4度并维持高位波动）。"
  ],
  "key_evidence": [
    "[2026-08-24T13:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2920 (29.2°C)",
    "[2026-08-24T13:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2940 (29.4°C)",
    "[2026-08-24T13:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2960 (29.6°C)",
    "同期其他房间温度均低于25.5°C (e.g., kitchen: 2505, master_bedroom: 2503)"
  ],
  "recommended_actions": [
    "检查客厅温度传感器的物理安装位置，确认是否靠近发热源（如灯具、电器）或被遮挡。",
    "尝试重启该温度传感器或重新配网，以排除临时通信或固件错误。",
    "如果问题持续，建议更换客厅温度传感器硬件。"
  ]
}
```

{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "空调运行但温度不下降",
  "reasoning": [
    "推理步骤1: 日志中出现了不存在的额外报警事件。"
  ],
  "key_evidence": [
    "我假设看到了一个未在日志中出现的 critical 告警。"
  ],
  "recommended_actions": [
    "判断为空调侧制冷失效或相关传感异常，建议检修。"
  ]
}


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

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

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

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

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

## 设备事件日志
[2026-07-11T00:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2270
[2026-07-11T07:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-07-11T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-07-11T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-07-11T08:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-11T08:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-11T08:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-11T08:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-11T09:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-07-11T09:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-11T09:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-11T10:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-11T10:00:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T10:14:15] living_room_ac | Thermostat.SystemMode = 3
[2026-07-11T10:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-11T10:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2454
[2026-07-11T10:24:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T10:25:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T10:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-11T10:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2451
[2026-07-11T10:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-07-11T10:44:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T10:45:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T10:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-11T10:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-11T11:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2673
[2026-07-11T11:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2439
[2026-07-11T11:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-11T11:19:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T11:20:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T11:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2431
[2026-07-11T11:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-11T11:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2929
[2026-07-11T11:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2441
[2026-07-11T11:46:30] kitchen_cook_surface | OnOff.OnOff = True
[2026-07-11T11:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2423
[2026-07-11T11:54:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T11:55:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T12:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2774
[2026-07-11T12:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2426
[2026-07-11T12:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-11T12:14:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T12:15:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T12:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2597
[2026-07-11T12:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-11T12:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2511
[2026-07-11T12:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2416
[2026-07-11T12:44:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T12:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2403
[2026-07-11T12:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-07-11T12:52:55] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-11T12:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-07-11T13:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2404
[2026-07-11T13:00:00] living_room_ac | OnOff.OnOff = True
[2026-07-11T13:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2504
[2026-07-11T13:09:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T13:10:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T13:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-07-11T13:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2920
[2026-07-11T13:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2489
[2026-07-11T13:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2397
[2026-07-11T13:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2940
[2026-07-11T13:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2483
[2026-07-11T13:44:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T13:45:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T13:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-07-11T13:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2473
[2026-07-11T13:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2960
[2026-07-11T14:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2477
[2026-07-11T14:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2367
[2026-07-11T14:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2459
[2026-07-11T14:19:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T14:20:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T14:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2365
[2026-07-11T14:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2460
[2026-07-11T14:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2446
[2026-07-11T14:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2352
[2026-07-11T14:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2453
[2026-07-11T14:52:55] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-11T14:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2445
[2026-07-11T15:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2332
[2026-07-11T15:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2427
[2026-07-11T15:09:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T15:10:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T15:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2432
[2026-07-11T15:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2321
[2026-07-11T15:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2423
[2026-07-11T15:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2314
[2026-07-11T15:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2415
[2026-07-11T15:44:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T15:45:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T15:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2410
[2026-07-11T15:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2396
[2026-07-11T16:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2387
[2026-07-11T16:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2292
[2026-07-11T16:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2382
[2026-07-11T16:19:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T16:20:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T16:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2374
[2026-07-11T16:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2374
[2026-07-11T16:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2262
[2026-07-11T16:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2376
[2026-07-11T16:52:55] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-11T16:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2356
[2026-07-11T17:04:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T17:24:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T17:44:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T18:04:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T18:24:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T18:44:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-11T19:04: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 中说明为什么这些事件是正常的。

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "客厅温度传感器出现间歇性极高数值读数（约29-30°C），与同一时间段内其他房间及空调运行状态不符，疑似传感器故障或数据异常。",
  "reasoning": [
    "1. 观察客厅温度传感器(living_room_temp_sensor)的数据序列：在13:15、13:35和13:55分别记录到2920、2940、2960的测量值（对应29.2°C-29.6°C）。",
    "2. 对比环境背景：在同一时间段（13:00-14:00），厨房温度传感器读数在2489-2508之间波动，卧室温度传感器在2397-2404之间波动，且客厅空调在13:00开启制冷（OnOff=True），通常会将室温维持在舒适区间（如24-26°C）。",
    "3. 分析异常模式：客厅温度在短时间内从正常的~25°C骤升至~29.5°C，随后在13:40又迅速回落至2483（24.8°C），并在后续时间稳定在正常范围（23-24°C左右）。这种剧烈的、非线性的、且与其他空间热环境完全脱节的尖峰读数，不符合物理热惯性规律。",
    "4. 排除人为因素：虽然11:46厨房灶具开启，但那是前一小时的事件，且主要影响厨房。客厅空调正在运行，若真达到29.5°C，空调应持续高负荷运转，但后续数据显示温度迅速恢复正常，说明之前的“高温”并非真实环境温度。",
    "5. 结论：该现象符合传感器硬件故障、校准漂移或通信数据包错误导致的`sensor_malfunction`特征。"
  ],
  "key_evidence": [
    "[2026-07-11T13:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2920 (异常高)",
    "[2026-07-11T13:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2940 (异常高)",
    "[2026-07-11T13:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2960 (异常高)",
    "[2026-07-11T13:00:00] living_room_ac | OnOff.OnOff = True (空调正在制冷，理应降温而非升温)",
    "[2026-07-11T13:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2483 (迅速恢复正常)"
  ],
  "recommended_actions": [
    "检查客厅温度传感器的电池电量及安装位置，确保无遮挡或靠近热源。",
    "尝试重启或重新配对该Matter温度传感器，以排除临时软件/通信故障。",
    "若问题持续，建议更换客厅温度传感器硬件。"
  ]
}
```

{
  "is_anomaly": true,
  "confidence": "low",
  "threat_type": "intrusion",
  "threat_description": "存在异常，但原因更可能属于其他类别。",
  "reasoning": [
    "推理步骤1: 日志里有异常，但我把它归因为另一类威胁。"
  ],
  "key_evidence": [
    "空调已开启"
  ],
  "recommended_actions": [
    "建议按该错误类别处理。"
  ]
}


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

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

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

## 家庭环境信息
家庭布局: 三室两厅 (3BR)
- 重点房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 dining_room: 餐厅灯[dimmable_light], 餐厅运动传感器[occupancy_sensor]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_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]

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

## 设备事件日志
[2026-07-10T07:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-07-10T07:00:00] dining_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-10T07:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-07-10T07:09:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T07:13:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T07:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-07-10T07:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-07-10T07:23:09] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T07:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-10T07:30:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-07-10T07:30:03] kitchen_light | OnOff.OnOff = False
[2026-07-10T07:30:20] front_door_contact | BooleanState.StateValue = False
[2026-07-10T07:33:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T07:35:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-10T07:39:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T07:40:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T07:50:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-10T08:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-10T08:00:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T08:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-10T08:08:09] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T08:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-10T08:14:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T08:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-10T08:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-10T08:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-07-10T08:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-10T08:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-10T08:38:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T08:40:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-07-10T08:43:35] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-10T08:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-07-10T08:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-10T08:59:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T09:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-10T09:05:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T09:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-10T09:13:09] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T09:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-10T09:19:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T09:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-10T09:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-10T09:33:09] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T09:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-10T09:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-07-10T09:43:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T09:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-07-10T09:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-10T09:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-10T10:00:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2560
[2026-07-10T10:00:00] balcony_laundry_washer | OperationalState.OperationalState = 1
[2026-07-10T10:03:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T10:05:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-07-10T10:09:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T10:10:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T10:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-10T10:20:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-10T10:20:00] balcony_laundry_washer | OperationalState.CountdownTime = 2400
[2026-07-10T10:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-10T10:30:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T10:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-10T10:38:09] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T10:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-10T10:40:00] balcony_laundry_washer | OperationalState.CountdownTime = 2400
[2026-07-10T10:44:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T10:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-07-10T11:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-10T11:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-10T11:00:00] balcony_laundry_washer | OperationalState.CountdownTime = 2400
[2026-07-10T11:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-10T11:08:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T11:10:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-10T11:13:35] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-10T11:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-10T11:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-10T11:25:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-07-10T11:29:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T11:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-10T11:35:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T11:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-07-10T11:43:09] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T11:45:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-10T11:49:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T11:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-10T12:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-10T12:03:09] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T12:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-07-10T12:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2534
[2026-07-10T12:13:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T12:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2524
[2026-07-10T12:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-10T12:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-07-10T12:30:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-07-10T12:33:00] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T12:35:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-10T12:39:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T12:40:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T12:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2506
[2026-07-10T12:50:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-07-10T13:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-07-10T13:00:21] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T13:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-10T13:08:09] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T13:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-07-10T13:14:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-10T13:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-07-10T13:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2494
[2026-07-10T13:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2486
[2026-07-10T13:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0

## 任务
请结合下面的 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": true,
  "confidence": "medium",
  "threat_type": "sensor_malfunction",
  "threat_description": "洗衣机运行但倒计时不减少",
  "reasoning": [
    "推理步骤1: 运行状态为 Running",
    "推理步骤2: 倒计时连续多个采样点不变",
    "推理步骤3: 与正常过程矛盾"
  ],
  "key_evidence": [
    "运行状态为 Running",
    "倒计时连续多个采样点不变",
    "与正常过程矛盾"
  ],
  "recommended_actions": [
    "标记为运行状态/计时链路异常，建议检查洗衣机控制模块。"
  ]
}

```json
{
  "is_anomaly": false,
  "confidence": "high",
  "threat_type": "none",
  "threat_description": "系统运行正常，未发现安全威胁或设备故障迹象。",
  "reasoning": [
    "入户门锁状态正常：日志中仅出现一次 'front_door_contact' 变为 False（开门），随后在 07:40、08:00、09:05 等多个时间点检测到 'entrance_occupancy' 为 1，表明有人正常进出并进入玄关区域，无异常滞留或非法入侵迹象。",
    "温度传感器数据合理：所有房间的温度传感器读数（如 living_room_temp_sensor 从 25.08°C 到 25.57°C）均在夏季正常波动范围内，且随时间推移呈现符合空调调节逻辑的下降趋势（下午时段），无传感器漂移或卡死现象。",
    "洗衣机状态符合预期：阳台洗衣机 (balcony_laundry_washer) 在 10:00 启动，并在后续多次报告 CountdownTime = 2400（40 分钟倒计时），这是正常的洗涤周期行为，未出现设备卡死或异常停机。",
    " occupancy 模式符合生活习惯：各房间人员分布（master_bedroom, kids_room, dining_room 等）与白天活动时间吻合，无长时间无人却开启高能耗设备或异常聚集的情况。"
  ],
  "key_evidence": [
    "front_door_contact StateValue=False 后紧跟 entrance_occupancy=1 序列，证实为合法出入。",
    "balcony_laundry_washer OperationalState 和 CountdownTime 持续更新，显示设备工作正常。",
    "temperature_sensor 数值稳定且在物理合理范围内，无突变或极端值。"
  ],
  "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_ac, living_room_temp_sensor
- 已选事件数: 133

## 设备事件日志
[2026-07-19T00:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2278
[2026-07-19T07:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T07:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2522
[2026-07-19T07:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-07-19T07:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2528
[2026-07-19T07:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-19T08:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-19T08:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-07-19T08:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T08:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-07-19T09:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-07-19T09:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-19T09:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-07-19T09:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-19T09:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-19T10:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2556
[2026-07-19T10:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T10:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T10:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2559
[2026-07-19T10:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-19T10:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-07-19T10:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2558
[2026-07-19T10:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-07-19T10:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-07-19T10:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2555
[2026-07-19T10:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-19T10:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T10:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T10:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-19T10:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-19T10:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-19T10:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-07-19T11:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-07-19T11:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2554
[2026-07-19T11:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T11:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2552
[2026-07-19T11:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-07-19T11:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-19T11:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-19T11:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-07-19T11:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-07-19T11:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-19T11:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-19T11:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T11:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T11:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2527
[2026-07-19T11:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-07-19T11:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-19T11:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-07-19T11:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-07-19T12:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-19T12:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T12:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T12:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-07-19T12:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-19T12:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-07-19T12:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-07-19T12:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2514
[2026-07-19T12:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-07-19T12:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-07-19T12:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2515
[2026-07-19T12:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T12:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-07-19T12:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-07-19T12:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2520
[2026-07-19T12:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2505
[2026-07-19T12:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-07-19T12:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2510
[2026-07-19T12:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2509
[2026-07-19T13:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T13:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T13:00:00] living_room_ac | OnOff.OnOff = True
[2026-07-19T13:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2494
[2026-07-19T13:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-07-19T13:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2491
[2026-07-19T13:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2508
[2026-07-19T13:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2920
[2026-07-19T13:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2505
[2026-07-19T13:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2498
[2026-07-19T13:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2502
[2026-07-19T13:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2490
[2026-07-19T13:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T13:30:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T13:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2480
[2026-07-19T13:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2940
[2026-07-19T13:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2488
[2026-07-19T13:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2484
[2026-07-19T13:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2487
[2026-07-19T13:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2470
[2026-07-19T13:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2474
[2026-07-19T13:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2960
[2026-07-19T14:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2471
[2026-07-19T14:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2467
[2026-07-19T14:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T14:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2473
[2026-07-19T14:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2465
[2026-07-19T14:10:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2461
[2026-07-19T14:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2459
[2026-07-19T14:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2455
[2026-07-19T14:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2458
[2026-07-19T14:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2464
[2026-07-19T14:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T14:30:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T14:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2441
[2026-07-19T14:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2460
[2026-07-19T14:45:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2446
[2026-07-19T14:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2452
[2026-07-19T14:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-07-19T14:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-07-19T15:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2434
[2026-07-19T15:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T15:00:00] entrance_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T15:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2444
[2026-07-19T15:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2433
[2026-07-19T15:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2425
[2026-07-19T15:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2423
[2026-07-19T15:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2427
[2026-07-19T15:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2430
[2026-07-19T15:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2428
[2026-07-19T15:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2419
[2026-07-19T15:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T15:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2411
[2026-07-19T15:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2412
[2026-07-19T15:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2404
[2026-07-19T15:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2418
[2026-07-19T15:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2406
[2026-07-19T15:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2404
[2026-07-19T15:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2408
[2026-07-19T16:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2399
[2026-07-19T16:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T16:00:00] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T16:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2387
[2026-07-19T16:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2401

## 任务
请结合下面的 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 中说明为什么这些事件是正常的。

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "sensor_malfunction",
  "threat_description": "客厅温度传感器出现间歇性读数异常（尖峰），同时空调开启后室内整体温度呈现非正常的持续下降趋势，表明传感器可能存在故障或数据上报错误。",
  "reasoning": [
    "1. 识别异常数据点：在 2026-07-19T13:15、13:35 和 13:55，客厅温度传感器报告的数值分别为 2920、2940 和 2960（对应约 29.2°C - 29.6°C）。然而，同一时间段内，主卧、次卧和厨房的温度传感器读数均在 24.5°C - 25.0°C 之间波动且平稳。这种局部房间与其他所有房间显著不同的高温读数，且无其他设备（如烟雾报警器）报警，极大概率是传感器自身故障或单次通信错误导致的“脏数据”。",
    "2. 分析环境趋势异常：从 13:00 客厅空调开启（OnOff=True）开始，尽管存在上述异常高温读数干扰，但观察其他正常工作的传感器（如主卧、厨房），其温度从约 25.0°C 持续缓慢下降至 16:10 的 23.87°C - 24.01°C。在一个封闭的两室一厅环境中，如果没有外部冷源介入，室温在几小时内自然下降近 2°C 是不符合热力学常识的（通常白天室外温度高于室内，除非空调强力制冷且房屋保温极好，但下降斜率过于平滑且持续，结合传感器故障背景，更倾向于系统记录错误或传感器漂移）。",
    "3. 综合判断：虽然空调开启解释了降温的可能性，但客厅传感器本身的多次剧烈跳变（从 ~25°C 跳到 ~29°C 再回到 ~24°C）是典型的硬件故障或固件Bug特征。这种不可靠的数据会导致智能家居自动化逻辑（如温控策略）失效，属于设备健康问题。"
  ],
  "key_evidence": [
    "living_room_temp_sensor 在 13:15, 13:35, 13:55 分别报告 2920, 2940, 2960，而同期其他房间温度稳定在 2400-2500 左右。",
    "living_room_ac 在 13:00 开启 OnOff=True。",
    "全屋其他温度传感器（master_bedroom, kitchen, second_bedroom）显示温度从 ~25°C 持续线性下降至 ~24°C，与客厅传感器的异常波动形成对比。"
  ],
  "recommended_actions": [
    "检查并重启客厅温度传感器，确认是否为临时通信干扰。",
    "若异常持续，建议更换客厅温度传感器硬件。",
    "校准或重新配置空调的温控逻辑，避免依赖单一可能故障的传感器进行自动调节。"
  ]
}
```

{
  "is_anomaly": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "这些变化仍可视为正常波动。",
  "reasoning": [
    "推理步骤1: 没有看到必须报警的直接证据。"
  ],
  "key_evidence": [
    "设备状态变化幅度看起来仍在可接受范围内。"
  ],
  "recommended_actions": [
    "保持观察即可。"
  ]
}