基于规范解析的AUTOSAR测试数据自动生成
DOI:
CSTR:
作者:
作者单位:

1.安徽大学物质科学与信息技术研究院 合肥 230000; 2.中国科学院合肥物质科学研究院 合肥 230031

作者简介:

通讯作者:

中图分类号:

TN409

基金项目:

国家自然科学基金(32427801)项目资助


Automatic generation of AUTOSAR test data based on specification
Author:
Affiliation:

1.Institutes of Physical Science and Information Technology, Anhui University, Hefei 230000, China; 2.Hefei Institutes of Physical Science, Chinese Academy of Sciences, Hefei 230031, China

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    汽车开放系统架构(AUTOSAR)标准是以文档形式呈现,规模庞大且有模糊性。验证车载软件的一致性测试需从文档中提取出配置,以保障车载软件合规性。在深入研究AUTOSAR规范文档的内容及一致性测试配置的前提下,提出了一种自动化生成配置数据的方法。首先,在图检索增强生成技术的基础之上集成MinerU,利用语义增强、文本优化、结构感知分块策略,构成领域实体-关系知识网络。其次,采用少样本思维链(Few-Shot CoT)提示词技术,引导大语言模型(LLM)从领域知识网络中提取测试场景及所需配置数据。最后,基于配置规范生成带属性的配置项树,通过广度优先搜索(BFS)和深度优先搜索(DFS)算法检查并补全配置数据,生成符合AUTOSAR标准的ARXML配置文件。在15个AUTOSAR基础软件模块实验中的8项指标上,对比传统生成配置数据的方法,结果显示所提方法在隐式依赖提取的F1分数达到97.51%,人工修正率降低至5%,测试场景生成数量提升3%。用本研究提出的方法生成的配置,不仅可以协助测试人员发现软件中难以定位的异常,而且显著提升隐式配置依赖项提取的完整性与配置文件生成的质量和效率。

    Abstract:

    The automotive open system architecture (AUTOSAR) standard is provided in the form of large-scale textual specifications that are extensive and inherently ambiguous. To verify the compliance of in-vehicle software, consistency testing requires the extraction of configuration information from these documents to ensure conformity with the standard. Based on an in-depth analysis of AUTOSAR specifications and consistency test configurations, this paper proposes an automated method for generating configuration data. First, MinerU is integrated into a graph-based retrieval-augmented generation framework to construct a domain-specific entity-relation knowledge network through semantic enhancement, text refinement and structure-aware chunking strategies. Second, a few-shot chain-of-thought (Few-Shot CoT) prompting technique is employed to guide a large language model (LLM) in extracting test scenarios and the required configuration data from the domain knowledge network. Finally, a configuration item tree with attributes is generated according to configuration rules, and breadth-first search (BFS) and depth-first search (DFS) algorithms are applied to validate and complete the configuration data, resulting in ARXML configuration files compliant with the AUTOSAR standard. Experimental results on 15 AUTOSAR basic software modules, evaluated using 8 metrics and compared with traditional configuration data generation methods, show that the proposed approach achieves an F1 score of 97.51% in implicit dependency extraction, reduces the manual correction rate to 5% and increases the number of generated test scenarios by 3%. The configurations generated by the proposed method not only assist testers in identifying hard-to-locate software anomalies but also significantly improve the completeness of implicit configuration dependency extraction as well as the quality and efficiency of configuration file generation.

    参考文献
    相似文献
    引证文献
引用本文

王辉,李超超,汪济州,徐封杰,方菱.基于规范解析的AUTOSAR测试数据自动生成[J].电子测量技术,2026,49(11):12-24

复制
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2026-09-03
  • 出版日期:
文章二维码

重要通知公告

①《电子测量技术》期刊收款账户变更公告