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

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

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

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

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

## 跨天活动摘要
- 2026-07-13: kitchen=242, bedroom=242, entrance=230, living_room=208, bathroom=60

## 设备事件日志
[2026-07-13T19:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2285
[2026-07-13T19:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2289
[2026-07-13T19:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2280
[2026-07-13T19:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2283
[2026-07-13T19:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2285
[2026-07-13T19:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2273
[2026-07-13T19:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2276
[2026-07-13T19:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2271
[2026-07-13T19:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2265
[2026-07-13T19:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2268
[2026-07-13T20:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2277
[2026-07-13T20:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:03:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2160
[2026-07-13T20:05:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:06:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2170
[2026-07-13T20:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-07-13T20:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-07-13T20:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2162
[2026-07-13T20:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2266
[2026-07-13T20:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-07-13T20:25:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:28:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2161
[2026-07-13T20:30:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:31:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:35:00] living_room_light | OnOff.OnOff = False
[2026-07-13T20:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2171
[2026-07-13T20:35:03] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2262
[2026-07-13T20:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-07-13T20:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-07-13T20:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2249
[2026-07-13T20:45:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-07-13T20:51:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:52:08] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T20:52:12] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-07-13T20:52:14] bedroom_light | OnOff.OnOff = True
[2026-07-13T20:52:23] bedroom_light | OnOff.OnOff = False
[2026-07-13T20:53:02] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T20:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2165
[2026-07-13T21:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2248
[2026-07-13T21:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2262
[2026-07-13T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35
[2026-07-13T21:03:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T21:05:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T21:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2246
[2026-07-13T21:11:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T21:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2144
[2026-07-13T21:17:08] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T21:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-07-13T21:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2252
[2026-07-13T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48
[2026-07-13T21:23:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T21:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-07-13T21:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2160
[2026-07-13T21:30:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T21:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2249
[2026-07-13T21:36:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T21:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2148
[2026-07-13T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59
[2026-07-13T21:42:08] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T21:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2247
[2026-07-13T21:48:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T21:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2142
[2026-07-13T21:50:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T21:53:02] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-13T21:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2158
[2026-07-13T22:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2242
[2026-07-13T22:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-07-13T22:01:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T22:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2156
[2026-07-13T22:07:08] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T22:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2250
[2026-07-13T22:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-07-13T22:13:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T22:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2144
[2026-07-13T22:15:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T22:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2257
[2026-07-13T22:21:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T22:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-07-13T22:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2148
[2026-07-13T22:32:08] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T22:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-07-13T22:38:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T22:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2157
[2026-07-13T22:40:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T23:00:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-07-13T23:20:00] kitchen_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": "carbon_monoxide",
  "threat_description": "厨房一氧化碳浓度持续上升，存在潜在的一氧化碳中毒或燃气泄漏风险。",
  "reasoning": [
    "1. 识别关键异常数据：日志显示厨房烟雾报警器（kitchen_smoke_alarm）在21:00至21:40期间，CarbonMonoxideConcentrationMeasurement.MeasuredValue从35 ppm逐步上升至59 ppm。",
    "2. 分析趋势与背景：该数值呈现明显的单调递增趋势（35 -> 48 -> 59），且正值晚餐后时段（20:00-23:00厨房 occupancy 持续为1，表明有人活动）。对于独居老人家庭，这种缓慢上升的CO浓度通常源于燃烧不充分（如燃气灶具故障、通风不良）。",
    "3. 排除误报可能：虽然温度传感器读数在2260-2280之间波动（对应约22.6-22.8°C），属于正常室温范围，未出现火灾导致的高温飙升，因此更倾向于是一氧化碳积聚而非明火火灾初期。同时，没有检测到漏水或入侵迹象。",
    "4. 风险评估：59 ppm虽未达到立即致命的极高浓度，但已远超安全标准（通常建议低于9 ppm或根据OSHA标准随时间变化），且仍在上升，若不及时干预可能导致老人健康受损甚至昏迷。"
  ],
  "key_evidence": [
    "[2026-07-13T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35",
    "[2026-07-13T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48",
    "[2026-07-13T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59",
    "厨房区域在20:00-23:00期间持续有人员活动（occupancy=1），确认非设备静默漂移，而是环境中有源释放。"
  ],
  "recommended_actions": [
    "立即触发最高级别警报，通知紧急联系人或急救服务。",
    "自动执行安全预案：打开厨房及全屋窗户/排风扇进行强制通风，关闭厨房灶具电源/气源（如果支持联动控制）。",
    "提醒住户立即离开厨房并前往空气新鲜处，检查是否有身体不适症状。",
    "事后需专业人员检修厨房灶具及排烟系统，确保无燃气泄漏或燃烧器堵塞问题。"
  ]
}
```

{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "carbon_monoxide",
  "threat_description": "CO 指标缓慢上升但未触发报警",
  "reasoning": [
    "推理步骤1: 日志中出现了不存在的额外报警事件。"
  ],
  "key_evidence": [
    "我假设看到了一个未在日志中出现的 critical 告警。"
  ],
  "recommended_actions": [
    "判为潜在 CO 风险，建议通风并检查燃气与排烟。"
  ]
}


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

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

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

## 家庭环境信息
家庭布局: 三室两厅 (3BR)
- 重点房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher], 厨房漏水传感器[water_leak_detector]
- 房间 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]
- 房间 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]

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

## 跨天活动摘要
- 2026-08-14: kitchen=14, kids_room=229, entrance=229, master_bedroom=228, dining_room=219, living_room=115

## 设备事件日志
[2026-08-14T19:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2285
[2026-08-14T19:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2284
[2026-08-14T19:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2280
[2026-08-14T19:23:30] kitchen_window_contact | BooleanState.StateValue = False
[2026-08-14T19:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2287
[2026-08-14T19:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2276
[2026-08-14T19:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2270
[2026-08-14T19:52:00] kitchen_dishwasher | OnOff.OnOff = True
[2026-08-14T19:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2273
[2026-08-14T20:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-08-14T20:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2271
[2026-08-14T20:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T20:01:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:03:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-08-14T20:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2274
[2026-08-14T20:06:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:07:20] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T20:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-14T20:13:02] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2273
[2026-08-14T20:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2274
[2026-08-14T20:15:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2275
[2026-08-14T20:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2257
[2026-08-14T20:25:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2273
[2026-08-14T20:26:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:28:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-08-14T20:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2267
[2026-08-14T20:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T20:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-14T20:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-14T20:36:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:37:20] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T20:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-14T20:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2269
[2026-08-14T20:43:02] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-08-14T20:45:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2248
[2026-08-14T20:45:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:46:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:48:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2254
[2026-08-14T20:54:00] kids_room_light | OnOff.OnOff = False
[2026-08-14T20:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-08-14T20:55:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2246
[2026-08-14T21:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2250
[2026-08-14T21:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35
[2026-08-14T21:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-14T21:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-08-14T21:06:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:07:20] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T21:08:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2248
[2026-08-14T21:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2249
[2026-08-14T21:13:02] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-08-14T21:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-08-14T21:15:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:16:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2246
[2026-08-14T21:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-08-14T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48
[2026-08-14T21:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2242
[2026-08-14T21:25:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2242
[2026-08-14T21:28:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2244
[2026-08-14T21:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T21:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-08-14T21:36:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:37:20] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T21:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2243
[2026-08-14T21:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2245
[2026-08-14T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59
[2026-08-14T21:43:02] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-08-14T21:45:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-14T21:45:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:46:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:48:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2246
[2026-08-14T21:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-08-14T21:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2257
[2026-08-14T22:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2244
[2026-08-14T22:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2241
[2026-08-14T22:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T22:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2247
[2026-08-14T22:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2246
[2026-08-14T22:06:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T22:07:20] master_bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T22:08:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T22:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-08-14T22:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2257
[2026-08-14T22:13:02] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T22:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2243
[2026-08-14T22:15:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T22:16:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T22:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-14T22:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2247
[2026-08-14T22:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2243
[2026-08-14T22:25:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2254

## 任务
你将看到一组跨设备日志。请做综合安全分析，而不是单点判断。

请按以下 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": "carbon_monoxide",
  "threat_description": "厨房一氧化碳浓度呈现持续上升趋势，存在潜在的一氧化碳泄漏或燃烧不充分风险。",
  "reasoning": [
    "1. 识别关键异常数据：日志显示厨房烟雾报警器（kitchen_smoke_alarm）在21:00、21:20和21:40分别报告了一氧化碳浓度为35、48和59（单位通常为ppm）。",
    "2. 分析趋势模式：CO浓度在40分钟内从35ppm上升至59ppm，呈现出明显的单调递增趋势。这种持续上升而非波动的模式通常指示有持续的污染源（如燃气泄漏、通风不良导致的燃烧废气积聚）。",
    "3. 结合环境背景：虽然此时段厨房窗户传感器显示为False（关闭），且洗碗机已开启，但CO浓度的快速累积表明室内通风不足或存在未察觉的燃气/燃料泄漏。尽管数值尚未达到立即致死的极高阈值，但59ppm已超过许多安全标准建议的长期暴露限值（通常24小时平均低于9-35ppm），且仍在快速上升，具有发展为火灾或中毒风险的潜力。",
    "4. 排除误报：温度传感器读数正常波动（约22-23摄氏度），无剧烈升温迹象，排除了高温导致传感器漂移的可能；同时没有检测到明火报警（smoke alarm通常区分烟和CO，此处明确为CO测量值），因此判定为真实的气体威胁而非设备故障。"
  ],
  "key_evidence": [
    "[2026-08-14T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35",
    "[2026-08-14T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48",
    "[2026-08-14T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59"
  ],
  "recommended_actions": [
    "立即触发高分贝声光警报通知住户撤离或检查厨房。",
    "自动联动控制厨房窗户传感器对应的执行器（如有）或通知用户手动打开窗户进行强制通风。",
    "建议用户检查燃气灶具、热水器等燃烧设备的密封性及排气扇工作状态。"
  ]
}
```

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


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

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

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

## 家庭环境信息
家庭布局: 三室两厅 (3BR)
- 重点房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher], 厨房漏水传感器[water_leak_detector]
- 房间 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]
- 房间 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]

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

## 跨天活动摘要
- 2026-08-26: kitchen=14, kids_room=232, entrance=230, master_bedroom=227, dining_room=222, living_room=113

## 设备事件日志
[2026-08-26T19:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2292
[2026-08-26T19:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2287
[2026-08-26T19:20:00] kitchen_dishwasher | OnOff.OnOff = True
[2026-08-26T19:20:05] kitchen_dishwasher | OperationalState.OperationalState = 1
[2026-08-26T19:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2273
[2026-08-26T19:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2271
[2026-08-26T19:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2267
[2026-08-26T20:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2273
[2026-08-26T20:00:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2274
[2026-08-26T20:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:02:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:02:10] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-08-26T20:05:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2270
[2026-08-26T20:07:07] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:09:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-08-26T20:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-08-26T20:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2265
[2026-08-26T20:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-08-26T20:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2270
[2026-08-26T20:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-08-26T20:22:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:22:10] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-08-26T20:25:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2269
[2026-08-26T20:25:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-08-26T20:30:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-26T20:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2268
[2026-08-26T20:35:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2265
[2026-08-26T20:37:07] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:39:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-08-26T20:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-26T20:42:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:42:10] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:43:03] kids_room_window | WindowCovering.CurrentPositionLiftPercent100ths = 10000
[2026-08-26T20:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-08-26T20:45:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-08-26T20:45:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T20:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-08-26T20:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-08-26T20:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-26T20:55:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-08-26T21:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-08-26T21:00:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2262
[2026-08-26T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35
[2026-08-26T21:02:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:02:10] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-08-26T21:05:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-26T21:05:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:07:07] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:09:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2244
[2026-08-26T21:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-26T21:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-08-26T21:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-08-26T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48
[2026-08-26T21:22:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:22:10] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2257
[2026-08-26T21:25:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2252
[2026-08-26T21:30:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-08-26T21:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-08-26T21:35:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2241
[2026-08-26T21:37:07] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:39:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-08-26T21:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2244
[2026-08-26T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59
[2026-08-26T21:42:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:42:10] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-08-26T21:45:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2245
[2026-08-26T21:45:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T21:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-08-26T21:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2252
[2026-08-26T21:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2250
[2026-08-26T21:55:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2248
[2026-08-26T22:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2242
[2026-08-26T22:00:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2243
[2026-08-26T22:02:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T22:02:10] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T22:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-08-26T22:05:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2241
[2026-08-26T22:05:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T22:07:07] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T22:09:09] kids_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T22:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-08-26T22:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2244
[2026-08-26T22:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-08-26T22:15:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2252
[2026-08-26T22:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2254
[2026-08-26T22:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2252
[2026-08-26T22:22:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T22:22:10] dining_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-26T22:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2243
[2026-08-26T22:25:00] kids_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-08-26T22:25:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 1

## 任务
请综合以下多个设备与环境状态，评估家庭整体安全状况，指出任何潜在风险。

请按以下 JSON 格式回答：

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

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

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "carbon_monoxide",
  "threat_description": "厨房烟雾报警器检测到一氧化碳浓度持续上升，存在潜在的一氧化碳泄漏或燃烧不充分风险。",
  "reasoning": [
    "1. 识别关键异常数据：日志显示在20:00至22:25期间，`kitchen_smoke_alarm`（实际为CO传感器）的 `CarbonMonoxideConcentrationMeasurement.MeasuredValue` 从35 ppm逐步上升至48 ppm，最后达到59 ppm。",
    "2. 分析趋势与背景：该数值呈现明显的单调递增趋势（35 -> 48 -> 59），且正值晚餐后时段（洗碗机在19:20启动，通常伴随烹饪活动）。虽然59 ppm尚未达到立即致命的极高浓度，但持续上升的趋势表明源头未消除或通风不足。",
    "3. 排除误报可能：同一时间段内，其他房间的温度传感器读数正常波动，无剧烈变化；运动传感器显示家中有人活动（entrance, dining_room, living_room等均有Occupancy=1），排除了设备故障导致的静默误报或无人时的异常。结合洗碗机运行和可能的燃气灶使用，最合理的解释是燃气燃烧产生的一氧化碳积聚。"
  ],
  "key_evidence": [
    "[2026-08-26T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35",
    "[2026-08-26T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48",
    "[2026-08-26T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59"
  ],
  "recommended_actions": [
    "立即检查厨房燃气灶、烤箱或其他燃气设备的燃烧状态，确保火焰呈蓝色而非黄色。",
    "打开厨房窗户或开启排气扇进行强制通风，并观察CO浓度是否下降。",
    "如果浓度继续上升或出现头痛、恶心等症状，请立即撤离房屋并联系燃气公司或紧急服务部门。"
  ]
}
```

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


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

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

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

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

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

## 跨天活动摘要
- 2026-08-27: kitchen=242, bedroom=240, entrance=231, living_room=209, bathroom=59

## 设备事件日志
[2026-08-27T19:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2302
[2026-08-27T19:02:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T19:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2289
[2026-08-27T19:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2284
[2026-08-27T19:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2285
[2026-08-27T19:22:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T19:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2281
[2026-08-27T19:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2275
[2026-08-27T19:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-08-27T19:42:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T19:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2267
[2026-08-27T19:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2266
[2026-08-27T20:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2266
[2026-08-27T20:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2177
[2026-08-27T20:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2273
[2026-08-27T20:01:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:02:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:02:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:04:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-27T20:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2172
[2026-08-27T20:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2277
[2026-08-27T20:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2267
[2026-08-27T20:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2163
[2026-08-27T20:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2269
[2026-08-27T20:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2269
[2026-08-27T20:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2165
[2026-08-27T20:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2257
[2026-08-27T20:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-08-27T20:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2155
[2026-08-27T20:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-08-27T20:21:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:22:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:22:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:24:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-08-27T20:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2265
[2026-08-27T20:26:18] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-27T20:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-08-27T20:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2154
[2026-08-27T20:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2266
[2026-08-27T20:34:00] living_room_light | OnOff.OnOff = False
[2026-08-27T20:34:09] bathroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:34:09] bathroom_light | OnOff.OnOff = True
[2026-08-27T20:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2167
[2026-08-27T20:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-08-27T20:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-08-27T20:41:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:42:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:42:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:44:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T20:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2254
[2026-08-27T20:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2150
[2026-08-27T20:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-08-27T20:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2159
[2026-08-27T20:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-27T20:53:00] bathroom_light | OnOff.OnOff = False
[2026-08-27T20:53:10] front_door_contact | BooleanState.StateValue = True
[2026-08-27T20:53:11] front_door_lock | Event: LockOperation(LockOperationType=0, OperationSource=Manual)
[2026-08-27T20:53:11] front_door_lock | DoorLock.LockState = 1
[2026-08-27T20:53:14] bedroom_light | OnOff.OnOff = True
[2026-08-27T20:53:19] bedroom_window | WindowCovering.CurrentPositionLiftPercent100ths = 10000
[2026-08-27T20:53:25] bedroom_light | OnOff.OnOff = False
[2026-08-27T20:53:55] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-27T20:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2252
[2026-08-27T20:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-27T21:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2265
[2026-08-27T21:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2164
[2026-08-27T21:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-08-27T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35
[2026-08-27T21:01:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T21:02:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T21:02:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T21:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2163
[2026-08-27T21:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-08-27T21:08:07] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T21:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2246
[2026-08-27T21:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2252
[2026-08-27T21:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-08-27T21:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2144
[2026-08-27T21:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-08-27T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48
[2026-08-27T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59

## 任务
请综合以下多个设备与环境状态，评估家庭整体安全状况，指出任何潜在风险。

请按以下 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": "carbon_monoxide",
  "threat_description": "厨房一氧化碳浓度呈现持续上升趋势，存在潜在的一氧化碳中毒或燃气泄漏风险。",
  "reasoning": [
    "1. 监测到关键指标异常：日志显示厨房烟雾/一氧化碳报警器（kitchen_smoke_alarm）的 `CarbonMonoxideConcentrationMeasurement.MeasuredValue` 在21:00至21:40期间从35 ppm上升至59 ppm。",
    "2. 趋势分析：虽然当前数值可能未触发最高级别的紧急警报（通常CO报警阈值较高，如70-100+ ppm，具体取决于设备设定），但数分钟内浓度显著上升表明存在持续的CO释放源。",
    "3. 排除误报：同一时间段内，厨房温度传感器读数稳定且正常（约22.5°C - 22.6°C），没有伴随高温或火灾迹象；同时厨房运动传感器显示有人活动，排除了传感器故障导致的静止误报，但也意味着人员可能处于暴露环境中而未察觉。",
    "4. 结合场景：独居老人在厨房活动，若使用燃气灶具，CO升高极可能是燃烧不充分或通风不良导致，属于高危安全隐患。"
  ],
  "key_evidence": [
    "[2026-08-27T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35",
    "[2026-08-27T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48",
    "[2026-08-27T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59"
  ],
  "recommended_actions": [
    "立即触发高分贝声光报警并通知紧急联系人或急救服务。",
    "强制打开厨房窗户和排气扇进行通风，关闭燃气总阀。",
    "检查燃气灶具、连接软管及排烟系统是否存在故障或堵塞。",
    "建议老人暂时离开厨房区域，直至空气质量检测恢复正常。"
  ]
}
```

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


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

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

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

## 家庭环境信息
家庭布局: 两室一厅 (2BR)
- 重点房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 balcony: 阳台灯[onoff_light], 阳台门传感器[contact_sensor], 洗衣机[laundry_washer]
- 房间 bathroom: 卫生间灯[onoff_light], 卫生间运动传感器[occupancy_sensor], 卫生间漏水传感器[water_leak_detector]
- 房间 entrance: 入户门锁[door_lock], 入户门传感器[contact_sensor], 玄关灯[onoff_light], 玄关运动传感器[occupancy_sensor]
- 房间 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]

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

## 跨天活动摘要
- 2026-08-14: kitchen=11, entrance=228, living_room=108, bathroom=56, master_bedroom=48, second_bedroom=48

## 设备事件日志
[2026-08-14T19:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-14T19:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2500
[2026-08-14T19:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2447
[2026-08-14T19:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2407
[2026-08-14T19:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2366
[2026-08-14T19:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2332
[2026-08-14T19:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-08-14T19:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2276
[2026-08-14T19:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2285
[2026-08-14T19:43:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-08-14T19:43:30] kitchen_window_contact | BooleanState.StateValue = False
[2026-08-14T19:44:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-08-14T19:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2278
[2026-08-14T19:48:00] kitchen_dishwasher | OnOff.OnOff = True
[2026-08-14T19:48:05] kitchen_dishwasher | OperationalState.OperationalState = 1
[2026-08-14T19:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2275
[2026-08-14T19:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2268
[2026-08-14T20:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2273
[2026-08-14T20:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2269
[2026-08-14T20:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-08-14T20:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-08-14T20:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T20:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T20:03:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:04:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2278
[2026-08-14T20:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-08-14T20:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2275
[2026-08-14T20:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2267
[2026-08-14T20:10:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2257
[2026-08-14T20:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-08-14T20:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-08-14T20:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-08-14T20:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-08-14T20:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-08-14T20:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-14T20:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2271
[2026-08-14T20:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2270
[2026-08-14T20:23:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:24:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2271
[2026-08-14T20:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-08-14T20:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-14T20:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-08-14T20:28:07] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T20:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2270
[2026-08-14T20:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-08-14T20:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2271
[2026-08-14T20:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T20:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T20:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-14T20:35:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-08-14T20:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-14T20:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2252
[2026-08-14T20:40:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2262
[2026-08-14T20:40:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-08-14T20:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-08-14T20:43:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:44:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T20:45:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-08-14T20:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2267
[2026-08-14T20:50:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-08-14T20:50:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-14T20:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-08-14T20:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-14T20:55:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-08-14T20:55:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2249
[2026-08-14T20:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2248
[2026-08-14T20:58:07] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T21:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2262
[2026-08-14T21:00:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2254
[2026-08-14T21:00:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-08-14T21:00:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T21:00:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35
[2026-08-14T21:03:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:04:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2247
[2026-08-14T21:05:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2248
[2026-08-14T21:05:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2254
[2026-08-14T21:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-08-14T21:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-08-14T21:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-14T21:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2252
[2026-08-14T21:15:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-08-14T21:15:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2244
[2026-08-14T21:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2244
[2026-08-14T21:20:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2244
[2026-08-14T21:20:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2243
[2026-08-14T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48
[2026-08-14T21:23:06] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:24:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-14T21:25:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-08-14T21:25:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2250
[2026-08-14T21:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-08-14T21:28:07] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T21:30:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2262
[2026-08-14T21:30:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-08-14T21:30:00] second_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-08-14T21:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-08-14T21:30:00] master_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T21:30:00] second_bedroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-14T21:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-08-14T21:35:00] master_bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2257
[2026-08-14T21:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2252
[2026-08-14T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59

## 任务
请综合以下多个设备与环境状态，评估家庭整体安全状况，指出任何潜在风险。

请按以下 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": "carbon_monoxide",
  "threat_description": "厨房一氧化碳浓度持续上升，存在潜在的燃气泄漏或燃烧不充分风险。",
  "reasoning": [
    "1. 识别关键异常数据：日志显示厨房烟雾报警器（kitchen_smoke_alarm）在21:00、21:20和21:40分别报告了一氧化碳浓度为35、48和59（单位通常为ppm）。这是一个明显的上升趋势。",
    "2. 排除误报与正常烹饪干扰：虽然19:43有灶具关闭记录，但CO浓度的显著升高发生在21:00之后，此时距离最后已知的烹饪活动已有超过1.5小时，且期间没有新的点火事件。通常烹饪产生的CO会在短时间内消散，持续上升表明存在持续的泄漏源或通风不良导致的积聚。",
    "3. 结合环境背景：同一时间段内，厨房温度传感器读数在22-23摄氏度之间波动，属于正常室温范围，排除了高温导致传感器故障的可能性。同时，客厅和卧室 occupancy 传感器显示有人在家（living_room_occupancy=1），说明住户处于潜在危险环境中。",
    "4. 风险评估：一氧化碳是无色无味的气体，高浓度可导致中毒甚至死亡。浓度从35升至59 ppm虽未立即达到致死水平（通常>100-200 ppm需紧急撤离），但上升趋势表明情况正在恶化，必须立即干预。"
  ],
  "key_evidence": [
    "[2026-08-14T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35",
    "[2026-08-14T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48",
    "[2026-08-14T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59"
  ],
  "recommended_actions": [
    "立即触发最高级别警报，通知住户厨房可能存在一氧化碳泄漏。",
    "建议住户立即打开所有门窗进行通风，并关闭燃气总阀。",
    "检查燃气灶具、热水器等燃气设备是否正常工作或存在泄漏点。",
    "如果浓度继续上升或住户感到不适，应立即疏散并联系急救服务。"
  ]
}
```

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


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

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

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

## 家庭环境信息
家庭布局: 一室一厅 (Studio/1BR)
- 重点房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 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]
- 房间 living_room: 客厅主灯[dimmable_light], 客厅台灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]

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

## 跨天活动摘要
- 2026-07-19: kitchen=17, bedroom=207, living_room=196, bathroom=54, entrance=3

## 设备事件日志
[2026-07-19T19:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2303
[2026-07-19T19:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2299
[2026-07-19T19:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2283
[2026-07-19T19:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2293
[2026-07-19T19:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2276
[2026-07-19T19:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2280
[2026-07-19T19:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2271
[2026-07-19T19:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2279
[2026-07-19T19:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2278
[2026-07-19T19:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2265
[2026-07-19T20:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2265
[2026-07-19T20:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2171
[2026-07-19T20:01:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T20:02:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T20:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2269
[2026-07-19T20:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2167
[2026-07-19T20:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2266
[2026-07-19T20:06:48] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T20:10:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-07-19T20:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2174
[2026-07-19T20:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2264
[2026-07-19T20:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-07-19T20:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2176
[2026-07-19T20:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2272
[2026-07-19T20:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-07-19T20:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2175
[2026-07-19T20:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-07-19T20:21:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T20:22:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T20:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-07-19T20:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2166
[2026-07-19T20:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2267
[2026-07-19T20:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2169
[2026-07-19T20:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2271
[2026-07-19T20:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2269
[2026-07-19T20:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2156
[2026-07-19T20:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2265
[2026-07-19T20:36:48] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T20:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2267
[2026-07-19T20:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2150
[2026-07-19T20:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2254
[2026-07-19T20:41:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T20:42:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T20:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2262
[2026-07-19T20:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2155
[2026-07-19T20:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-07-19T20:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-07-19T20:50:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2160
[2026-07-19T20:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2263
[2026-07-19T20:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2257
[2026-07-19T20:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2158
[2026-07-19T21:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2246
[2026-07-19T21:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2154
[2026-07-19T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35
[2026-07-19T21:01:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T21:02:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T21:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-07-19T21:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2257
[2026-07-19T21:06:48] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T21:10:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2149
[2026-07-19T21:15:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2250
[2026-07-19T21:15:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2147
[2026-07-19T21:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2245
[2026-07-19T21:20:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2254
[2026-07-19T21:20:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2150
[2026-07-19T21:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2248
[2026-07-19T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48
[2026-07-19T21:21:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T21:22:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T21:25:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-07-19T21:25:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2159
[2026-07-19T21:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2259
[2026-07-19T21:30:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2158
[2026-07-19T21:35:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2249
[2026-07-19T21:35:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2161
[2026-07-19T21:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2258
[2026-07-19T21:36:48] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-07-19T21:40:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2261
[2026-07-19T21:40:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2144
[2026-07-19T21:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2247
[2026-07-19T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59
[2026-07-19T21:41:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T21:42:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T21:45:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2251
[2026-07-19T21:45:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2151
[2026-07-19T21:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2242
[2026-07-19T21:50:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2260
[2026-07-19T21:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2256
[2026-07-19T21:55:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2244
[2026-07-19T21:55:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2148
[2026-07-19T21:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2253
[2026-07-19T22:00:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2245
[2026-07-19T22:00:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2150
[2026-07-19T22:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2246
[2026-07-19T22:01:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T22:02:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-07-19T22:05:00] living_room_temp_sensor | TemperatureMeasurement.MeasuredValue = 2246
[2026-07-19T22:05:00] bedroom_temp_sensor | TemperatureMeasurement.MeasuredValue = 2145
[2026-07-19T22:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2255
[2026-07-19T22:06:48] bathroom_occupancy | OccupancySensing.Occupancy = 0

## 任务
你将看到一组跨设备日志。请做综合安全分析，而不是单点判断。

请按以下 JSON 格式回答：

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

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

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "carbon_monoxide",
  "threat_description": "厨房一氧化碳浓度呈现持续上升趋势，存在潜在的燃烧不充分或通风不良风险。",
  "reasoning": [
    "1. 识别关键异常数据：日志显示厨房烟雾报警器（kitchen_smoke_alarm）在21:00、21:20和21:40分别报告了一氧化碳浓度为35、48和59（单位通常为ppm）。",
    "2. 分析趋势模式：CO浓度在40分钟内从35 ppm上升至59 ppm，呈现出明显的单调递增趋势。这种持续上升而非随机波动的模式通常指示有持续的污染源（如燃气泄漏、燃烧设备故障或通风不畅导致的积聚）。",
    "3. 排除误报与正常行为：虽然数值尚未达到立即致命的极高阈值（通常>100-200 ppm会触发紧急警报），但59 ppm已接近OSHA允许的8小时暴露限值（50 ppm）且远超一般室内背景值。结合重点房间为厨房且有灶具，这极可能是烹饪过程中产生的废气积聚或设备隐患。",
    "4. 综合环境状态：此时段客厅和卧室有人活动（Occupancy=1），说明住户处于家中，若不及时干预可能导致健康受损。"
  ],
  "key_evidence": [
    "[2026-07-19T21:00:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 35",
    "[2026-07-19T21:20:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 48",
    "[2026-07-19T21:40:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 59"
  ],
  "recommended_actions": [
    "立即检查厨房燃气灶具或烤箱是否正常工作，确认是否有火焰熄灭或燃烧不充分的情况。",
    "打开厨房窗户或启动排风扇加强通风，降低室内一氧化碳浓度。",
    "若浓度继续上升或出现头痛、恶心等症状，请立即撤离并联系专业人员检修燃气设备。"
  ]
}
```

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


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

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

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

## 家庭环境信息
家庭布局: 一室一厅 (Studio/1BR)
- 重点房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 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]
- 房间 living_room: 客厅主灯[dimmable_light], 客厅台灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]

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

## 跨天活动摘要
- 2026-08-01: kitchen=17, bedroom=208, living_room=194, bathroom=56, entrance=3

## 设备事件日志
[2026-08-01T09:23:40] kitchen_cook_surface | OnOff.OnOff = True
[2026-08-01T09:25:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-08-01T10:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2539
[2026-08-01T10:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-01T10:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-01T10:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-01T10:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-01T10:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-08-01T11:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-08-01T11:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2547
[2026-08-01T11:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2533
[2026-08-01T11:15:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:18:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-08-01T11:24:34] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T11:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-08-01T11:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-01T11:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2537
[2026-08-01T11:35:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:38:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-01T11:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2540
[2026-08-01T11:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-01T11:54:34] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T11:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-08-01T11:55:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T11:58:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2602
[2026-08-01T12:00:00] kitchen_cook_surface | OnOff.OnOff = True
[2026-08-01T12:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2658
[2026-08-01T12:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2717
[2026-08-01T12:10:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 18
[2026-08-01T12:12:00] kitchen_light | OnOff.OnOff = True
[2026-08-01T12:12:30] kitchen_cook_surface | OnOff.OnOff = True
[2026-08-01T12:13:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-08-01T12:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2774
[2026-08-01T12:15:00] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:18:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-01T12:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2848
[2026-08-01T12:24:34] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-01T12:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2903
[2026-08-01T12:25:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 10
[2026-08-01T12:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2917
[2026-08-01T12:32:00] kitchen_cook_surface | OnOff.OnOff = False

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

请按以下 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": "fire_risk",
  "threat_description": "厨房灶具开启期间，温度传感器读数异常飙升且伴随一氧化碳浓度波动，存在严重火灾风险。",
  "reasoning": [
    "推理步骤 1: 在 2026-08-01T12:00:00 时，厨房灶具 (kitchen_cook_surface) 被开启，随后温度传感器读数开始急剧上升。",
    "推理步骤 2: 从 12:00 到 12:30，厨房温度从正常的约 25°C (2539 mK) 飙升至接近 30°C (2917 mK)，升温速率极快，远超正常烹饪时的环境温升，表明可能存在设备故障或燃烧失控。",
    "推理步骤 3: 在此期间，烟雾报警器报告了非零的一氧化碳浓度 (18 ppm 和 10 ppm)，虽然数值未达报警阈值，但结合极高的温度读数，强烈暗示有不完全燃烧或电气/燃气泄漏引发的火灾隐患。",
    "推理步骤 4: 尽管用户在 12:32:00 关闭了灶具，但在高温持续存在的状态下操作，且温度传感器在 12:13:00 曾短暂返回 None (可能因过热保护或通信中断)，系统必须假设危险状态直到人工确认安全。"
  ],
  "key_evidence": [
    "12:00:00 - 12:30:00 期间厨房温度从 ~25°C 激增至 ~30°C (2917 mK)。",
    "12:10:00 和 12:25:00 烟雾报警器检测到一氧化碳浓度分别为 18 ppm 和 10 ppm。",
    "12:13:00 温度传感器数据丢失 (None)，可能是传感器因极端高温而进入保护模式或损坏。"
  ],
  "recommended_actions": [
    "立即通知住户前往厨房检查，确认是否有明火、焦糊味或燃气泄漏。",
    "建议住户暂时不要使用厨房，并联系专业维修人员检查灶具和温度传感器。",
    "如果检测到明显烟雾或异味，应立即撤离并拨打紧急电话。"
  ]
}
```


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

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

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

## 家庭环境信息
家庭布局: 一室一厅 (Studio/1BR)
- 重点房间 kitchen: 厨房灯[onoff_light], 厨房灶具[cook_surface], 厨房烟雾报警器[smoke_co_alarm], 厨房温度传感器[temperature_sensor], 厨房窗户传感器[contact_sensor], 洗碗机[dishwasher]
- 房间 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]
- 房间 living_room: 客厅主灯[dimmable_light], 客厅台灯[onoff_light], 客厅空调[air_conditioner], 客厅温度传感器[temperature_sensor], 客厅运动传感器[occupancy_sensor], 客厅窗帘[window_covering], 客厅窗户传感器[contact_sensor]

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

## 跨天活动摘要
- 2026-08-27: kitchen=11, bedroom=217, living_room=113, bathroom=56, entrance=14

## 设备事件日志
[2026-08-27T10:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2541
[2026-08-27T10:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2557
[2026-08-27T10:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-27T10:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2553
[2026-08-27T10:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2549
[2026-08-27T11:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2538
[2026-08-27T11:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-08-27T11:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-27T11:15:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2550
[2026-08-27T11:16:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T11:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-27T11:21:30] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-27T11:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-27T11:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-27T11:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-27T11:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2543
[2026-08-27T11:36:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T11:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2532
[2026-08-27T11:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2536
[2026-08-27T11:51:30] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-27T11:56:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T12:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2529
[2026-08-27T12:00:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-27T12:00:00] kitchen_cook_surface | OnOff.OnOff = True
[2026-08-27T12:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2531
[2026-08-27T12:10:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 18
[2026-08-27T12:16:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T12:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2512
[2026-08-27T12:21:30] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-27T12:25:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2526
[2026-08-27T12:25:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 10
[2026-08-27T12:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-08-27T12:30:00] living_room_occupancy | OccupancySensing.Occupancy = 0
[2026-08-27T12:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2517
[2026-08-27T12:36:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-27T12:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2516
[2026-08-27T12:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2503
[2026-08-27T12:51:30] bathroom_occupancy | OccupancySensing.Occupancy = 0

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

请按以下 JSON 格式回答：

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

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

{
  "is_anomaly": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本是短暂低幅波动并回落；异常样本是缓慢连续上升。"
  ],
  "key_evidence": [
    "正常样本是短暂低幅波动并回落；异常样本是缓慢连续上升。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "unattended_cooking",
  "threat_description": "检测到厨房灶具在无人看管的情况下开启，且伴随一氧化碳浓度异常波动，存在严重火灾及中毒风险。",
  "reasoning": [
    "推理步骤 1: 时间线分析显示，在 2026-08-27T12:00:00 时，厨房灶具 (kitchen_cook_surface) 被开启 (OnOff=True)。",
    "推理步骤 2: 与此同时及随后短时间内，卧室、客厅和卫生间的运动传感器均报告无人员活动 (Occupancy=0)，表明厨房内可能没有人在场监管烹饪过程。",
    "推理步骤 3: 更关键的是，在灶具开启后不久 (12:10:00)，厨房烟雾报警器检测到的二氧化碳/一氧化碳浓度 (CarbonMonoxideConcentrationMeasurement) 出现异常读数 (18 ppm)，随后在 12:25:00 又降至 10 ppm。这种非零的读数（通常背景值应接近 0）结合无人看管的加热设备，强烈暗示发生了燃气泄漏或燃烧不充分，构成了未受监管的烹饪事故隐患。"
  ],
  "key_evidence": [
    "2026-08-27T12:00:00 kitchen_cook_surface OnOff = True",
    "同期 bedroom_occupancy, living_room_occupancy, bathroom_occupancy 均为 0 (无人看管)",
    "2026-08-27T12:10:00 kitchen_smoke_alarm CarbonMonoxideConcentrationMeasurement = 18 (异常读数)"
  ],
  "recommended_actions": [
    "立即远程关闭厨房灶具电源/气源，防止火势扩大或气体积聚。",
    "强制触发厨房烟雾报警器和通风系统，并通知住户回家检查。",
    "建议住户检查燃气灶具是否漏气，必要时联系专业人员检修。"
  ]
}
```


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

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

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

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

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

## 跨天活动摘要
- 2026-08-19: kitchen=243, bedroom=241, entrance=230, living_room=209, bathroom=60

## 设备事件日志
[2026-08-19T05:54:34] kitchen_cook_surface | OnOff.OnOff = True
[2026-08-19T10:30:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2546
[2026-08-19T10:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2544
[2026-08-19T10:40:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2551
[2026-08-19T10:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2542
[2026-08-19T11:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-19T11:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2548
[2026-08-19T11:07:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T11:08:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = None
[2026-08-19T11:17:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T11:19:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T11:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2545
[2026-08-19T11:24:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T11:25:57] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-19T11:27:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T11:34:00] kitchen_cook_surface | OnOff.OnOff = False
[2026-08-19T11:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2530
[2026-08-19T11:42:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T11:44:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T11:45:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2525
[2026-08-19T11:47:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T11:49:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T11:55:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2535
[2026-08-19T12:00:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2523
[2026-08-19T12:00:00] kitchen_cook_surface | OnOff.OnOff = True
[2026-08-19T12:07:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T12:09:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T12:10:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2519
[2026-08-19T12:10:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 18
[2026-08-19T12:12:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T12:14:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T12:20:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2513
[2026-08-19T12:25:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 10
[2026-08-19T12:25:57] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-19T12:32:00] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T12:34:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T12:35:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2506
[2026-08-19T12:37:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T12:44:10] living_room_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T12:50:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2501
[2026-08-19T12:53:10] bedroom_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T12:55:57] bathroom_occupancy | OccupancySensing.Occupancy = 0
[2026-08-19T13:02:00] kitchen_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T13:04:03] entrance_occupancy | OccupancySensing.Occupancy = 1
[2026-08-19T13:05:00] kitchen_temp_sensor | TemperatureMeasurement.MeasuredValue = 2507
[2026-08-19T13:09:10] living_room_occupancy | OccupancySensing.Occupancy = 1

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

请按以下 JSON 格式回答：

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

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

{
  "is_anomaly": false,
  "confidence": "medium",
  "threat_type": "none",
  "threat_description": "当前日志更符合正常模式，不建议报警。",
  "reasoning": [
    "推理步骤1: 正常样本是短暂低幅波动并回落；异常样本是缓慢连续上升。"
  ],
  "key_evidence": [
    "正常样本是短暂低幅波动并回落；异常样本是缓慢连续上升。"
  ],
  "recommended_actions": [
    "继续监测，无需立即处置。"
  ]
}

```json
{
  "is_anomaly": true,
  "confidence": "high",
  "threat_type": "carbon_monoxide",
  "threat_description": "厨房检测到一氧化碳浓度异常升高，且发生在独居老人烹饪期间，存在严重健康威胁。",
  "reasoning": [
    "推理步骤 1: 日志显示在 2026-08-19T12:00:00 时，厨房灶具 (kitchen_cook_surface) 被开启，随后在 T12:10:00 厨房运动传感器确认有人在场，符合正常烹饪场景。",
    "推理步骤 2: 关键异常点出现在 T12:10:00，厨房烟雾报警器报告一氧化碳浓度 (CarbonMonoxideConcentrationMeasurement.MeasuredValue) 为 18 ppm。虽然该数值在某些标准下可能未达立即报警阈值，但对于独居老人而言，任何非零读数都代表潜在泄漏风险，且后续数值波动（先升至 18，后降至 10）表明气体源持续存在或排放不稳定。",
    "推理步骤 3: 考虑到住户为独居老人，对危险气体的感知和反应能力可能较弱，且一氧化碳无色无味，必须将其视为最高优先级的安全事件进行干预，不能仅因数值较低而忽略。"
  ],
  "key_evidence": [
    "[2026-08-19T12:10:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 18",
    "[2026-08-19T12:25:00] kitchen_smoke_alarm | CarbonMonoxideConcentrationMeasurement.MeasuredValue = 10",
    "[2026-08-19T12:00:00] kitchen_cook_surface | OnOff.OnOff = True"
  ],
  "recommended_actions": [
    "立即通过 Matter 协议远程关闭厨房灶具 (kitchen_cook_surface)，切断气源/火源。",
    "向住户发送紧急语音警报或短信通知，告知可能存在一氧化碳泄漏，要求立即撤离厨房并打开门窗通风。",
    "若无法联系到住户或浓度持续上升，建议系统自动触发家庭紧急联系人通知机制。"
  ]
}
```