信息网络安全 ›› 2026, Vol. 26 ›› Issue (10): 1581-1594.doi: 10.3969/j.issn.1671-1122.2026.10.006
收稿日期:2026-03-02
出版日期:2026-10-10
发布日期:2026-11-06
通讯作者:
杜晔
E-mail:ydu@bjtu.edu.cn
作者简介:吴润方(1995—),女,山东,博士研究生,主要研究方向为软件模型检测、形式化验证|杜晔(1978—),男,黑龙江,教授,博士,主要研究方向为云安全、空天地一体化网络安全、网络防御、漏洞检测|唐宇(1998—),男,河北,博士研究生,主要研究方向为群智能优化算法、软件缺陷预测|孔同(1993—),男,山东,高级工程师,博士,主要研究方向为云安全、智能信息安全
基金资助:
Wu Runfang1, Du Ye1,2(
), Tang Yu1, Kong Tong3
Received:2026-03-02
Online:2026-10-10
Published:2026-11-06
Contact:
Du Ye
E-mail:ydu@bjtu.edu.cn
摘要:
现阶段传统需求建模依赖人工,效率低下且易出现语义鸿沟,大语言模型(LLM)生成统一建模语言模型的代码质量不稳定。为解决上述问题,文章结合结构化需求建模描述与状态图质量维度函数,提出一种面向LLM生成状态图的质量评估框架。结构化需求建模描述由系统概览、模式层次、状态定义、转移逻辑和安全约束5个核心组件组成,旨在将自然语言需求转换为供LLM生成状态图使用的结构化语义输入。状态图质量维度函数则构建涵盖可执行性、语法质量、语义质量及实用质量4个维度的状态图形式化评估体系。该框架突破了现有研究在行为模型质量评估中依赖单一指标、缺少系统化验证机制的局限,基于100份跨领域需求文档,采用GPT-4.0与DeepSeek-R1进行生成与评估实验。实验结果表明,GPT-4.0、DeepSeek-R1生成状态图的平均语义覆盖率分别为82%、91%,验证了LLM在需求驱动建模中的应用潜力,并揭示两个模型在质量指标上的差异与优势,为LLM生成模型的质量评估及实际场景中的模型选择与优化提供系统方法与参考。
中图分类号:
吴润方, 杜晔, 唐宇, 孔同. 面向LLM生成状态图的质量评估框架构建与实例研究[J]. 信息网络安全, 2026, 26(10): 1581-1594.
Wu Runfang, Du Ye, Tang Yu, Kong Tong. Construction and empirical study of a quality assessment framework for statecharts generated by LLM[J]. Netinfo Security, 2026, 26(10): 1581-1594.
表2
可理解性评分标准
| 分值 | 描述 |
|---|---|
| 5 | 状态层次结构分明,逻辑关系高度清晰;命名完全符合领域术语标准;布局规整,无冗余交叉线,确保信息完整且易于理解 |
| 4 | 整体结构清晰,仅个别局部需额外阅读才能完全理解;命名基本遵循领域惯例,较少出现不直观的术语;布局合理,交叉线较少,对理解影响较小 |
| 3 | 总体可理解,但需要一定UML知识基础;命名尚可接受,但有改进空间;布局一般,存在一定复杂性或紊乱情况,影响阅读效率 |
| 2 | 可理解性较差,需要较强的专业背景才能理解主要内容;命名不规范或存在歧义;布局较紊乱,对阅读和理解造成明显影响 |
| 1 | 难以理解,逻辑关系不清晰,命名错误或无意义,布局高度混乱,无法有效传递信息 |
表3
SQDF评价框架中各指标的权重配置
| 质量维度 | 权重 | 依据 | 有效性 | 敏感性 |
|---|---|---|---|---|
| 0.20 | UML生命周期、层次结构和可维护性 | 全体一致 | 低 | |
| 0.40 | UML核心逻辑 | 全体一致 | 中 | |
| 0.20 | ISO/IEC 25010软件质量模型 | 基本一致 | 低 | |
| β | 0.20 | 可追溯性 | 全体一致 | 中 |
| 0.25 | 用户体验 | 全体一致 | 低 | |
| 0.20 | 用户体验、实用性 | 条件一致 (随场景调整) | 高 | |
| 0.40 | 正确性 | 全体一致 | 高 |
表8
LLM生成状态图的多维质量评估结果
| 质量 维度 | 零假设 | F值 | p值 | 效应量 (η2) | Cohen’s d | 显著性 (α = 0.01) | 结论 |
|---|---|---|---|---|---|---|---|
| 不同LLM在可执行性上无差异 | 20.25 | 小于0.001 | 0.092 | 0.640 | 显著 | 拒绝 零假设 | |
| 不同LLM在语法质量上无差异 | 26.13 | 小于0.001 | 0.116 | 0.730 | 显著 | 拒绝 零假设 | |
| 不同LLM在语义质量上无差异 | 49.85 | 小于0.001 | 0.201 | 1.000 | 显著 | 拒绝 零假设 | |
| 不同LLM在实用质量上无差异 | 5.71 | 0.018 | 0.028 | 0.340 | 不显著 | 接受 零假设 | |
| Comp | 不同LLM在可理解性上无差异 | 17.23 | 小于0.001 | 0.080 | 0.590 | 显著 | 拒绝 零假设 |
| [1] | Kruchten P. The rational unified process: an introduction[M]. Boston: Addison-Wesley Professional, 2004. |
| [2] | Latella D, Majzik I, Massink M. Towards a formal operational semantics of UML statechart diagrams[C]// Formal Methods for Open Object-Based Distributed Systems (FMOODS 1999). Heidelberg: Springer, 1999: 331-347. |
| [3] | Bates A, Vavricka R, Carleton S, et al. Unified modeling language code generation from diagram images using multimodal large language models[EB/OL]. (2025-06-01)[2026-02-17]. https://www.sciencedirect.com/science/article/pii/S266682702500043X. |
| [4] | Calamo M, Mecella M, Snoeck M. Assessing the suitability of large language models in generating UML class diagrams as conceptual models[C]// Business Process Modeling, Development and Support (BPMDS 2025). Heidelberg: Springer, 2025: 211-226. |
| [5] | Rolland C, Proix C. A natural language approach for requirements engineering[C]// International Conference on Advanced Information Systems Engineering (CAiSE 1992). Heidelberg: Springer, 1992: 257-277. |
| [6] | Mich L, Giuliani M P. From natural language to object oriented requirements: an annotated bibliography[EB/OL]. (1995-07-01)[2026-02-17]. https://www.researchgate.net/publication/264081630_From_Natural_Language_to_Object_Oriented_requirements_An_annotated_bibliography. |
| [7] | Guizzardi G. Ontological foundations for structural conceptual models[EB/OL]. (2005-01-01)[2026-02-17]. https://www.researchgate.net/publication/215697579_Ontological_Foundations_for_Structural_Conceptual_Models. |
| [8] | Kahya H, Saeki M. Ontology based requirements analysis:lightweight semantic processing approach[C]//The 5th International Conference on Quality Software (QSIC’05). New York: IEEE, 2005: 223-230. |
| [9] | Alaswad F, Poovammal E, Aljaddouh B, et al. Software requirements to UML class diagrams using machine learning and rule-based approach[C]// Intelligent Systems in Computing and Communication. Heidelberg: Springer, 2025: 86-101. |
| [10] | Meng Yang, Ban A. Automated UML class diagram generation from textual requirements using NLP techniques[J]. International Journal on Informatics Visualization, 2024, 8(3): 1905-1915. |
| [11] | Babaalla Z, Jakimi A, Oualla M, et al. Towards an automatic extracting UML class diagram from system’s textual specification[C]// The 7th International Conference on Networking, Intelligent Systems and Security. New York: ACM, 2024: 1-5. |
| [12] | Hao Yilun, Zhang Yang, Fan Chuchu. Planning anything with rigor: general-purpose zero-shot planning with LLM-based formalized programming[EB/OL]. (2024-10-17)[2026-02-17]. https://arxiv.org/abs/2410.12112. |
| [13] | De B D, Garaccione G, Coppola R, et al. Evaluating large language models in exercises of UML class diagram modeling[C]// The 18th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement. New York: ACM, 2024: 393-399. |
| [14] |
Camara J, Troya J, Burgueno L, et al. On the assessment of generative AI in modeling tasks: an experience report with ChatGPT and UML[J]. Software and Systems Modeling, 2023, 22(3): 781-793.
doi: 10.1007/s10270-023-01105-5 |
| [15] | Wang Beian, Wang Chong, Liang Peng, et al. How LLMS aid in UML modeling:an exploratory study with novice analysts[C]//2024 IEEE International Conference on Software Services Engineering (SSE). New York: IEEE, 2024: 249-257. |
| [16] | Roques P. UML in practice: the art of modeling software systems demonstrated through worked examples and solutions[M]. Chichester: John Wiley & Sons, 2004. |
| [17] |
Harel D. Statecharts: a visual formalism for complex systems[J]. Science of Computer Programming, 1987, 8(3): 231-274.
doi: 10.1016/0167-6423(87)90035-9 URL |
| [18] | Rumbaugh J, Blaha M, Premerlani W, et al. Object-oriented modeling and design[M]. London: Prentice-Hall, 1991. |
| [19] | Fowler M. UML distilled: a brief guide to the standard object modeling language[M]. Boston: Addison-Wesley Professional, 2004. |
| [20] | ISO/IEC 25002: 2024 Systems and software engineering-systems and software quality requirements and evaluation (SQuaRE)- system and software quality models: ISO/IEC 25010: 2011[S]. Geneva: ISO, 2024. |
| [21] | Shneiderman B. Software psychology: human factors in computer and information systems[M]. Cambridge: Winthrop, 1980. |
| [1] | 顾兆军, 李丽, 隋翯. 基于大语言模型的SQL注入漏洞检测载荷生成方法[J]. 信息网络安全, 2026, 26(2): 274-290. |
| [2] | 张学旺, 卢荟, 谢昊飞. 基于节点中心性和大模型的漏洞检测数据增强方法[J]. 信息网络安全, 2025, 25(4): 550-563. |
| [3] | 张玉磊, 骆广萍, 王欢, 刘祥震. 5G网络下可证安全的TPKC-CLPKC异构混合签密方案[J]. 信息网络安全, 2019, 19(5): 30-37. |
| [4] | 王卯宁, 段美姣. 基于Merkle哈希树结构的区块链第二原像攻击[J]. 信息网络安全, 2018, 18(1): 38-44. |
| [5] | 周洲;彭长根;杨玉龙. 基于口令的密钥协商协议的改进与设计[J]. , 2014, 14(1): 0-0. |
| [6] | 郑园;蒋天发. 一种基于3G网络端到端加密的新型密钥管理方案研究[J]. , 2011, 11(5): 0-0. |
| [7] | 周立;蒋天发. 一种新的不含随机预言模型的公钥加密方案[J]. , 2009, 9(4): 0-0. |
| 阅读次数 | ||||||
|
全文 |
|
|||||
|
摘要 |
|
|||||