计算机科学 ›› 2024, Vol. 51 ›› Issue (12): 63-70.doi: 10.11896/jsjkx.240900093

• 计算机软件 • 上一篇    下一篇

汽车验证电控系统中的测试用例自动生成方法

李占旗1,3,4, 吴新维2, 张蕾1, 刘全周1, 谢辉3, 熊德意2   

  1. 1 中汽研(天津)汽车工程研究院有限公司 天津 300300
    2 天津大学智能与计算学部 天津 300350
    3 天津大学机械工程学院 天津 300354
    4 中国汽车技术研究中心有限公司 天津 300300
  • 收稿日期:2024-09-13 修回日期:2024-11-07 出版日期:2024-12-15 发布日期:2024-12-10
  • 通讯作者: 熊德意(dyxiong@tju.edu.cn)
  • 作者简介:(lizhanqi@catarc.ac.cn)
  • 基金资助:
    国家重点研发计划(2021YFB3202204)

Automatic Test Case Generation Method for Automotive Electronic Control System Verification

LI Zhanqi1,3,4, WU Xinwei2, ZHANG Lei1, LIU Quanzhou1, XIE Hui3, XIONG Deyi2   

  1. 1 CATARC (Tianjin) Automotive Engineering Research Institute Co., Ltd., Tianjin 300300, China
    2 College of Intelligence and Computing, Tianjin University, Tianjin 300350, China
    3 School of Mechanical Engineering, Tianjin University, Tianjin 300354, China
    4 China Automotive Technology and Research Center Co., Ltd., Tianjin 300300, China
  • Received:2024-09-13 Revised:2024-11-07 Online:2024-12-15 Published:2024-12-10
  • About author:LI Zhanqi,born in 1985,postgraduate,senior engineer.His main research interests include simulation development and system validation of automotive electronic control systems.
    XIONG Deyi,born in 1979,Ph.D,professor,Ph.D supervisor,is a member of CCF(No.57174S).His main research interests include natural language processing,large language model and AI alignment.
  • Supported by:
    National Key Research and Development Program of China(2021YFB3202204).

摘要: 随着“软件定义汽车”的发展,汽车软件功能的复杂性和快速开发需求对电控系统验证提出了更高的要求。当前,电控系统软件功能的测试流程图开发主要依赖人工方式,效率低且存在人为因素影响。文中详细描述了汽车验证电控系统中的测试用例自动生成任务及其面临的挑战,并提出了一种基于大语言模型(LLM)的自动生成测试流程图方法,以提高开发效率并减少人力成本。该方法包括构建领域任务数据集和选择合适场景的大模型应用路线。在实验中探讨了基于传统语言模型微调和大语言模型API适配两种技术路线的优劣,并通过实验验证了不同的大模型API在测试用例生成任务上的表现,以及提示工程技术对大模型API的提升效果。提出了一种高效的自动生成汽车测试流程图的方法,展示了大语言模型在提升汽车软件测试效率中的潜力。

关键词: 汽车领域应用, 大语言模型, 提示工程

Abstract: With the development of “software-defined vehicles”,the complexity of automotive software functions and the demand for rapid development have imposed higher requirements on the verification of electronic control systems.Currently,the development of test flow charts for electronic control system software functions mainly relies on manual methods,which are inefficient and susceptible to human factors.This paper details the task and challenges of automatic test case generation in automotive electronic control system verification and proposes an automatic test flow chart generation method based on large language models(LLM) to improve development efficiency and reduce labor costs.The method includes constructing domain task datasets and selecting appropriate LLM application routes.The study explores the advantages and disadvantages of two technical routes:traditional language model fine-tuning and LLM API adaptation.Experiments validate the performance of different LLM APIs in test case generation tasks and the effectiveness of prompt engineering techniques in enhancing LLM API performance.In summary,this paper proposes an efficient method for automatically generating automotive test flow charts,demonstrating the potential of LLMs in improving the efficiency of automotive software testing.

Key words: Automotive applications, Large language models, Prompt engineering

中图分类号: 

  • TP391
[1]LI Y J,LI X P,ZHANG W G.Survey on vision-based 3D object detection methods[J].Computer Engineering and Applications,2020,56(1):11-24.
[2]PEEBLES P Z.Probability,random variable,and random signal principles[M].4th ed.New York:McGraw Hill,2001:100-110.
[3]WEINSTEIN L,SWERTZ M N.Pathogenic properties of invading microorganism[M]//Pathologic Physiology:Mechanisms of Disease.Philadephia:Saunders,1974:745-772.
[4]MONREALE A,PINELLI F,TRASARTI R,et al.WhereNext:a location predictor on trajectory pattern mining[C]//Procee-dings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining,Paris,Jun 28-Jul 1,2009.New York:ACM,2009:637-646.
[5]LUO W,WANG H F.Evaluating Large Language Models:A Survey of Research Progress.[J]Journal of Chinese Information Processing.2024,38(1):1-23.
[6]MORZY M.Prediction of moving object location based on frequent trajectories[C]//Proceedings of the 21st International Symposium on Computer and Information Sciences,Istanbul,Nov.1-3,2006.Berlin,Heidelberg:Springer,2006:583-592.
[7]WANG L.Research of fuzzy clustering algorithm for incomplete data based on the improved ACO with interval supervision[D].Shenyang:Liaoning University,2016.
[8]Online Computer Library Center,Inc.History of OCLC[EB/OL].(2000-01-08)[2019-12-23].http://www.oclc.org/about/history/default.htm.
[9]ZHANG F X,YU X R,HE W F,et al.Face recognition with improved loss function and multiple-norm[J].Computer Enginee-ring and Applications,2020,54(6):114-120.
[10]SUTSKEVER I,VINYALS O,LE Q V.Sequence to sequence learning with neural networks[J].arXiv:1409.3215,2014.
[11]RADFORD A,WU J,CHILD R,et al.Language models are unsupervised multitask learners[J].OpenAI blog,2019,1(8):9.
[12]HU E J,SHEN Y,WALLIS P,et al.Lora:Low-rank adaptation of large language models[J].arXiv:2106.09685,2021.
[13]LIU H Q.In the Era of Software-defined Vehicles,AUTOSAR is Helping to Transform China’s Automotive Industry[J].Transport Energy Conservation & Environmental Protection,2024,20(3):74-77.
[14]WEI J,WANG X,SCHUURMANS D,et al.Chain-of-thoughtprompting elicits reasoning in large language models[J].Advances in Neural Information Processing Systems,2022,35:24824-24837.
[15]LIN C Y.Rouge:A package for automatic evaluation of summaries[C]//Text Summarization Branches Out.2004:74-81.
[16]PAPINENI K,ROUKOS S,WARD T,et al.Bleu:a method for automatic evaluation of machine translation[C]//Proceedings of the 40th annual meeting of the Association for Computational Linguistics.2002:311-318.
[17]LEWIS M.Bart:Denoising sequence-to-sequence pre-training for natural language generation,translation,and comprehension[J].arXiv:1910.13461,2019.
[18]BAI J,BAI S,CHU Y,et al.Qwen technical report[J].arXiv:2309.16609,2023.
[19]MENG X,DAI D,LUO W,et al.Periodiclora:Breaking the low-rank bottleneck in lora optimization[J].arXiv:2402.16141,2024.
[20]BIDERMAN D,ORTIZ J G,PORTES J,et al.Lora learns less and forgets less[J].arXiv:2405.09673,2024.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!