End users create IoT automation rules via trigger action programming, but their expressions are often fragmented, capturing device operations rather than high level intents. This gap leads to missing conditions, logical conflicts, and overlooked safety constraints, risking hazardous behaviors. To address this, we propose an intent driven requirements completion approach that reframes rule completion as a dual process: reconstructing intent from fragmented rules, then regenerating rules from that intent, with safety embedded throughout. We introduce a Bidirectional Requirements Traceability Tree, a three layer model linking rules, intents, and quality concerns, and design a multiagent framework that combines LLM reasoning with structured traceability. This enables completions that are both functionally complete and inherently safe, while remaining traceable and explainable. Evaluation shows our method significantly outperforms the baselines, improving the rule completion rate by 43% and reducing logical conflicts by over 21%. By grounding completion in intent understanding, we shift the paradigm from user to system responsibility, and from functional correctness to holistic trustworthiness.
翻译:终端用户通过触发-动作编程创建物联网自动化规则,但其表达往往具有碎片化特征,仅描述设备操作而非高层次意图。这一差距导致条件缺失、逻辑冲突及安全约束被忽视,可能引发危险行为。针对此问题,我们提出一种意图驱动的需求补充方法,将规则补充重构为双重过程:从碎片化规则中重建意图,再基于该意图重新生成规则,并将安全性贯穿始终。我们引入双向需求追溯树(Bidirectional Requirements Traceability Tree)这一三层模型,用于关联规则、意图与质量关注点,并设计融合大语言模型推理与结构化可追溯性的多智能体框架。该方法能够在保持可追溯性与可解释性的同时,实现功能完备且内嵌安全的规则补充。评估表明,本方法显著优于基线模型,规则补充率提升43%,逻辑冲突减少超过21%。通过将补充机制建立在意图理解之上,我们实现了从用户责任到系统责任、从功能正确性到整体可信性的范式转变。