Intelligent automobile virtual simulation test method based on large language model

The smart car virtual simulation testing method driven by a large language model solves the cumbersome and difficult process of smart car scene testing, realizes an automated and efficient testing process, and improves testing efficiency and accuracy.

CN118586281APending Publication Date: 2024-09-03JILIN UNIVERSITY
View PDF 0 Cites 19 Cited by

Patent Information

Application Number
CN202410727206.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing smart car scenario testing methods rely on expert experience, and the process is cumbersome and difficult, resulting in high testing costs and low efficiency.

Method used

Adopting a smart car virtual simulation test method based on a large language model, through the combination of data layer, model layer and simulation layer, design scenario data collection, annotation, fine-tuning training, and application of the large language model, and build a simulation layer model and language question and answer task chain Road to realize scenario generation and test evaluation.

Benefits of technology

It reduces the test difficulty, improves the test efficiency, improves the test accuracy and coverage, simplifies the test process, and realizes the automation and efficiency of smart car scenario testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118586281A
    Figure CN118586281A
Patent Text Reader

Abstract

The invention belongs to the technical field of automatic driving testing, and particularly relates to an intelligent automobile scene testing method based on a language model architecture. Comprising the following steps: step 1, collecting, labeling and sorting scene data; step 2, fine tuning training of the basic language model; 3, constructing a scene knowledge base and designing a call chain; 4, designing and constructing an analog simulation test tool chain; 5, generating a test report and establishing an evaluation tool chain; step 6, defining a test task and deconstructing elements; according to the method, the overall performance of the intelligent automobile can be improved, a solid technical foundation is laid for constructing a safer, more convenient and more comfortable future travel ecology, and the problems that the process is tedious and the difficulty is large in the existing intelligent automobile scene test field are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of automatic driving test, and specifically is a virtual simulation test method for intelligent vehicles based on a large language model. Background Art

[0002] In recent years, the global smart car industry has developed rapidly, and intelligence, networking, and electrification have become important directions for the industry's transformation and upgrading. With the rapid iteration of key technologies such as autonomous driving, vehicle networking, and smart cockpits, smart cars are gradually moving from concept to reality, profoundly changing people's travel methods. In this context, ensuring the safety, reliability, comfort, and efficient operation and maintenance capabilities of smart cars has become a core issue of concern to the industry. Compared with mileage-based testing methods, scenario-based testing methods can effectively improve test efficiency and reduce test time by parameterizing test scenarios, and have become an indispensable part of the smart car testing and evaluation system.

[0003] Large Language Models (LLMs), as a deep learning model with powerful language understanding and generation capabilities, have shown transformative potential in many fields. At present, the field of intelligent vehicle scenario testing mainly generates test scenarios based on expert experience. Testers actively design test cases, evaluation indicators, and write test reports. The process relies heavily on expert experience and has high testing costs and difficulties. Applying large language models to intelligent vehicle scenario testing can effectively simplify the testing process, reduce testing difficulty, and fully reflect the industry's demand for improving test efficiency, accuracy, and coverage.

[0004] Therefore, establishing a virtual simulation test method for smart cars based on a large language model architecture will help improve the overall performance of smart cars and lay a solid technical foundation for building a safer, more convenient and comfortable future travel ecosystem. In-depth exploration and practice of the application of large language models in smart car scenario testing has certain academic value and industrial significance. Summary of the invention

[0005] The present invention provides a virtual simulation test method for smart cars based on a large language model, which helps to improve the overall performance of smart cars, and also lays a solid technical foundation for building a safer, more convenient and comfortable future travel ecology, and solves the problems of cumbersome process and high difficulty in the existing smart car scenario testing field.

[0006] The technical solution of the present invention is described as follows in conjunction with the accompanying drawings:

[0007] A virtual simulation test method for an intelligent vehicle based on a large language model comprises the following steps:

[0008] Step 1: Design application architecture and collect, label and organize scenario data;

[0009] Design the overall method architecture and three application directions; collect scenario description text data related to smart car scenario testing and smart car technology, annotate the specific tasks and performance boundaries of the large model, and organize the texts needed to form the knowledge base;

[0010] Step 2: Fine-tune the basic large language model;

[0011] Select a pre-trained model and fine-tune it;

[0012] Step 3: Build the simulation layer model;

[0013] Design the simulation layer model, which specifically includes the simulation platform, evaluation tools, and report generation tools required for the test evaluation task, as well as the scenario generation tools required for the scenario generation task;

[0014] Step 4: Design of language question answering task link;

[0015] Import the annotated scene data into the knowledge base management system to form a structured and queryable knowledge resource;

[0016] Step 5: Design of scenario generation task link;

[0017] Design the scenario generation work chain and guide the specific scenario generation process through customized test scenario generation theory;

[0018] Step 6: Design of test and evaluation task links;

[0019] Design test and evaluation task links and integrate simulation platforms, evaluation systems, and report generation tools;

[0020] Step 7: Experiment and evaluate each task.

[0021] Design experimental and evaluation methods to evaluate the proposed architecture.

[0022] Furthermore, the specific method of step one is as follows:

[0023] 11) Definition Figure 1 The method architecture shown in the figure specifically includes four parts. The data layer is the data that needs to be collected and organized by this method. The model layer is the existing open source large language model, and this method fine-tunes and trains it and designs a knowledge base. The simulation layer is various test and evaluation tools designed by this method to repeatedly complete various tasks. The application layer is the three core tasks defined by this method.

[0024] 12) Collect scenario description text data of various smart car application scenarios, including scenario description documents, autonomous driving test reports, vehicle sensor data descriptions, fault case analysis, simulation software usage methods, road traffic regulations, smart car technology papers and patents;

[0025] 13) Structural annotation of scene description text, including annotation of scene type, traffic elements, traffic events, environmental conditions, and driving behavior attributes; classification marks are made for other texts;

[0026] 14) Organizing the annotated scene data into a structured knowledge base; the structured knowledge base includes scene templates, scene element library, fault library and regulation library.

[0027] Furthermore, the specific method of step 2 is as follows:

[0028] 21) Select a basic large language model architecture. This article chooses chatglm3-6b.

[0029] 22) Clean, segment, and standardize the collected scene description text data, organize them into question-answer pairs, and convert them into an input format that the model can accept;

[0030] 23) Start the model fine-tuning training process.

[0031] Furthermore, the specific method of step three is as follows:

[0032] 31) Build simulation test interface tools, such as Figure 4 As shown in the figure, carla is used as the core simulation platform to define the simulation scenario construction, test process initialization, scenario element setting, and simulation execution result export functions; the elements that can be constructed for the simulation scenario construction are: number of lanes n, lane width Lane width , lane id of the smart car, longitudinal speed V x , lateral velocity V y , the lateral offset from the lane length1 , the lateral distance D between the smart car and the traffic car later , longitudinal distance D long , the longitudinal velocity V of the traffic vehicle x2 , lateral velocity V y2 etc., using a large language model to convert test scenario-related elements into the above variable values, thereby directly generating test scenarios in carla;

[0033] 32) Design a test scenario generation management tool, integrate the scenario generation methods in the test evaluation field, and divide the scenario generation methods into two parts: single generation and cyclic generation; single generation includes random generation methods, combination test methods, traversal test methods, and Monte Carlo sampling methods; cyclic generation includes accelerated test methods based on various optimization search methods, and general algorithms such as genetic algorithms, particle swarm algorithms, and ant colony algorithms can be used;

[0034] 33) Design test result evaluation tools. Construct a smart car scenario test result evaluation system to evaluate the risk and comfort of smart cars, other traffic participants, and static obstacles during the test process; and design test result evaluation indicators.

[0035] Furthermore, the test result evaluation indicators are as follows:

[0036] Safety index ①: Collision time, the time when the main vehicle collides with the other vehicle under the premise that the current motion state remains unchanged during the test process; the calculation method is: the relative distance between the two vehicles at the current moment divided by the relative speed;

[0037] Safety index ②: Safety distance: the relative distance between the main vehicle and other vehicles during the test;

[0038] Safety indicator ③: Obstacle avoidance response time: When an obstacle or potential collision risk is detected ahead, the time interval from the main vehicle identifying it to taking obstacle avoidance action reflects the system's rapid response capability;

[0039] Safety indicator ④: Traffic rules compliance: Evaluate the vehicle's compliance with traffic signals, signs, and markings during the test to measure the system's compliance driving ability;

[0040] Comfort index ①: Maximum braking deceleration: the maximum braking deceleration triggered by the main vehicle during the test;

[0041] Comfort index ②: Root mean square value of acceleration, i.e. RMS: square the acceleration signal of the main vehicle during the test, take the average value, and then square it again.

[0042] 34) Design a test report module based on the report generation library python-docx in Python. Design a test report structure that includes a cover, table of contents, summary, background, test purpose, simulation software, test method, test scenario, test results, evaluation results, test conclusions and improvement suggestions, and appendix. Create detailed template texts for each of the above chapters, including titles, subtitles, paragraph guides, table templates, and chart templates; reserve placeholders for specific test data to be filled in by the large language model when generating the report. Write the tool in the Agent call format, and use LLM to fill in information, summaries, etc.

[0043] Furthermore, the specific method of step 4 is as follows:

[0044] 41) As shown in the figure, based on the open source Langchain architecture, the annotated scene data text is imported into the knowledge base management system to perform text segmentation, knowledge base vectorization, retrieval vectorization, and similarity matching to form a structured and queryable knowledge resource;

[0045] 42) Design a knowledge base access interface to enable the model to call required knowledge in real time during the reasoning process.

[0046] 43) In specific applications, the large model language parsing chain parses the task, calls the knowledge base to query the matching theoretical knowledge results, and then generates the dialogue text from the large model language parsing chain to feed back to the user;

[0047] Furthermore, the specific method of step five is as follows:

[0048] 51) For the test scenario generation task, it is necessary to extract the key information in the problem and call the knowledge base for query, parse the test scenario generation requirements into single-round generation or optimized generation, and select the corresponding scenario generation method and scenario evaluation criteria for each requirement. Obtain the test scenario element type, element value range, distribution form and discrete step length of the system under test.

[0049] 52) For single generation tasks, such as the combination test mentioned above, the large model language parsing chain parsing task calls the combination test function to generate batch scenarios, and then the large model language parsing chain generates dialogue text feedback to the user;

[0050] 53) For the cyclic generation task, the scenario generation process is deeply coupled with the simulation test and performance evaluation process. The large model language parsing chain parses the task, generates batch test scenarios based on the initial scenario space, simulates the simulation tool chain to perform simulation tests, and then switches to the performance evaluation tool chain to evaluate the effect of this batch of scenarios. The evaluation results are used to optimize the search algorithm to generate the next batch of test scenarios. The test scenarios are generated through the cyclic test process, and then the large model language parsing chain generates dialogue texts to feed back to the user;

[0051] Furthermore, the specific method of step six is ​​as follows:

[0052] 61) For the complete scenario testing task, the user's goal is to use the test case to test a smart car algorithm and generate a test report. The process design is: for a given system to be tested and test case, key information is extracted, and then transferred to the knowledge base query, a preliminary analysis of the system to be tested is performed, and whether the test case can be executed on the simulation platform is screened to remove elements that cannot be simulated.

[0053] 62) Input the values ​​of scene elements into the initialized simulation scene. The simulation tool chain builds the scene according to user instructions, executes the simulation test process, and outputs various kinematic information during the test process to realize automated testing and process data output, and realizes automated evaluation of results through evaluation tools.

[0054] 63) Based on the knowledge base call chain, the knowledge base is called to obtain the test report template and related scenario test evaluation theory. Based on the test report generation chain, the scenario test evaluation results are used for test report writing and exported to a word document. Finally, the large model language parsing chain generates a dialogue text to feed back to the user.

[0055] Furthermore, the specific method of step seven is as follows:

[0056] 71) For language problem applications, the experimental design is: use the same data that has not been fine-tuned and knowledge base construction to test the model; the data set specifically covers five parts: scenario theory, standards and regulations, systems to be tested, simulation software, and test processes, each of which provides 200 questions;

[0057] Based on the scoring method of the large language model, the questions, recommended answers, and the output of all models are provided to GPT3.5, Tongyi Qianwen, and Wenxin Yiyan, and the difficulty score and accuracy score of each question are required to be output. The calculation method is shown in formula (1) and formula (2):

[0058]

[0059] In the formula, H is the weighted result of the difficulty of this dimension; h i Score the difficulty; j is the scoring weight; 0.25 is used for Tongyi Qianwen and Wenxin Yiyan; 0.5 is used for GPT3.5; n is the number of questions in this dimension;

[0060]

[0061] Where S is the weighted result of the accuracy of this dimension; a i They are the answer accuracy scores given by the evaluation model;

[0062] 72) For the scene generation task, the following evaluation indicators are designed:

[0063] Knowledge indexing success rate, the success rate of successfully indexing the knowledge base to query the corresponding test items;

[0064] The success rate of factor design is the success rate of reasonably designing scenario factors and value ranges according to the characteristics of the system to be tested and the simulation platform;

[0065] The success rate of scene generation, the success rate of calling and executing the scene generation function according to different requirements;

[0066] Key scenario ratio: the ratio of key scenarios generated by different scenario generation algorithms to the total test scenarios;

[0067] 73) For the test evaluation task, the following indicators are designed:

[0068] Knowledge indexing success rate: the model successfully parses the system under test, calls the knowledge base for knowledge retrieval, and optimizes the success rate of test cases;

[0069] Simulation execution success rate, the success rate of successfully parsing the optimized test cases and calling CARLA for testing through the simulation agent;

[0070] Result evaluation success rate: the success rate of using the evaluation agent to perform performance evaluation on the test kinematic information derived from CARLA;

[0071] Report generation success rate, the success rate of generating test reports based on all data.

[0072] The beneficial effects of the present invention are:

[0073] 1) The present invention provides a method for intelligent vehicle scenario testing based on a language model architecture, which includes four parts: data layer, model layer, simulation layer and application layer. The data layer collects data related to intelligent vehicle scenario testing for model fine-tuning and knowledge base construction. The model layer includes a knowledge base model and a large language model. The simulation layer defines and expands the individual functions of each model, introduces intelligent agents related to simulation testing, and the application layer defines in detail the application points of the large model in scenario testing and provides solutions. This method can effectively integrate the large language model and intelligent vehicle scenario testing, reduce the difficulty of testing, and improve testing efficiency.

[0074] 2) The present invention provides a link integration solution for scenario generation, simulation, and evaluation system in scenario testing. Calling it based on a large language model can realize various scenario testing tasks, and other application links can be expanded on this basis in the future. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0076] Figure 1 It is a schematic diagram of the overall structure of the present invention;

[0077] Figure 2It is a schematic diagram of the process of the present invention;

[0078] Figure 3 A simulation test platform architecture designed for the present invention;

[0079] Figure 4 This is a schematic diagram of the scene construction form in the simulation software;

[0080] Figure 5 This is a schematic diagram of the scenario test evaluation system;

[0081] Figure 6 Apply the process for language question answering tasks;

[0082] Figure 7 Generate task application flow for the scenario;

[0083] Figure 8 Apply processes for test evaluation tasks;

[0084] Fig. 9 Generate results for scene optimization;

[0085] Fig.10 Evaluate the task results for the test. DETAILED DESCRIPTION

[0086] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0087] Embodiment 1

[0088] See also Figure 1 and Figure 2 , this embodiment provides a smart car scenario testing method based on a language model architecture, comprising the following steps:

[0089] Step 1: Collect, label and organize scene data;

[0090] Collect scenario description text data related to smart car scenario testing and smart car technology, annotate the specific tasks and performance boundaries of the large model, and organize the texts needed to form the knowledge base, as follows:

[0091] 11) Collect scenario description text data of various smart car application scenarios, including scenario description documents, autonomous driving test reports, vehicle sensor data descriptions, fault case analysis, simulation software usage, road traffic regulations, smart car technology papers and patents, etc.;

[0092] 12) Structural annotation of scene description text, including annotation of scene type, traffic elements, traffic events, environmental conditions, and attributes of driving behavior; classification marks are made for other texts;

[0093] Among them, traffic elements include vehicles, pedestrians, road facilities, etc.;

[0094] Environmental conditions include weather, time, light, etc.;

[0095] 13) Organizing the annotated scene data into a structured knowledge base; the structured knowledge base includes scene templates, scene element library, fault library and regulation library.

[0096] Step 2: Fine-tune the basic language model;

[0097] Select a pre-trained model and fine-tune it as follows:

[0098] 21) Select a basic language model architecture. You can choose from open source models such as chatglm3 and Tongyi Qianwen. This article chooses chatglm3-6b;

[0099] 22) Clean, segment, and standardize the collected text data, organize it into question-answer pairs, and convert it into an input format acceptable to the model;

[0100] 23) Start fine-tuning the large language model. You can use the P-tuning v2 mode officially provided by chatglm for fine-tuning.

[0101] Step 3: Build the simulation layer model.

[0102] 31) See Figure 3 , build simulation test interface tools, use carla as the core simulation platform, define simulation scenario construction, test process initialization, scenario element setting, and simulation execution result export functions; refer to Figure 4 The elements available for simulation scene construction are: number of lanes n, lane width Lane width , lane id of the smart car, longitudinal speed V x , lateral velocity V y , the lateral offset from the lane length1 , the lateral distance D between the smart car and the traffic car later , longitudinal distance D long , the longitudinal velocity V of the traffic vehicle x2 , lateral velocity V y2 etc., using a large language model to convert test scenario-related elements into the above variable values, thereby directly generating test scenarios in carla;

[0103] 32) Design a test scenario generation management tool to integrate scenario generation methods in the field of test evaluation, and divide scenario generation methods into two parts: single generation and cyclic generation; single generation includes random generation methods, combination test methods, traversal test methods, and Monte Carlo sampling methods; cyclic generation includes accelerated test methods based on various optimization search methods;

[0104] 33) See Figure 5 , design test result evaluation tools. Build an intelligent vehicle scenario test result evaluation system to evaluate the risk and comfort of intelligent vehicles, other traffic participants, and static obstacles during the test process; and design test result evaluation indicators.

[0105] Furthermore, the test result evaluation indicators are as follows:

[0106] Safety index ①: Collision time, the time when the main vehicle collides with the other vehicle under the premise that the current motion state remains unchanged during the test process; the calculation method is: the relative distance between the two vehicles at the current moment divided by the relative speed;

[0107] Safety index ②: Safety distance: the relative distance between the main vehicle and other vehicles during the test;

[0108] Safety indicator ③: Obstacle avoidance response time: When an obstacle or potential collision risk is detected ahead, the time interval from the main vehicle identifying it to taking obstacle avoidance action reflects the system's rapid response capability;

[0109] Safety indicator ④: Traffic rules compliance: Evaluate the vehicle's compliance with traffic signals, signs, and markings during the test to measure the system's compliance driving ability;

[0110] Comfort index ①: Maximum braking deceleration: the maximum braking deceleration triggered by the main vehicle during the test;

[0111] Comfort index ②: Acceleration root mean square value, or RMS: square the acceleration signal of the main vehicle during the test, take the average value, and then square it again;

[0112] 34) Design a test report module based on the report generation library python-docx in Python. Design a test report structure that includes a cover, table of contents, summary, background, test purpose, simulation software, test method, test scenario, test results, evaluation results, test conclusions and improvement suggestions, and appendix. Create detailed template texts for each of the above chapters, including titles, subtitles, paragraph guides, table templates, and chart templates; reserve placeholders for specific test data to be filled in by the large language model when generating the report. Write the tool in the Agent call format, and use LLM to fill in information, summaries, etc.

[0113] Step 4: Design of language question answering task link;

[0114] 41) See Figure 6 Based on the open source Langchain architecture, the annotated scene data text is imported into the knowledge base management system to perform text segmentation, knowledge base vectorization, retrieval vectorization, and similarity matching. A knowledge vector library is established based on Chroma, thereby forming a structured and queryable knowledge resource.

[0115] Among them, the knowledge base management system is the text import function provided in the Langchain architecture;

[0116] 42) Design a knowledge base access interface to enable the model to call required knowledge in real time during the reasoning process.

[0117] 43) The specific application process is shown in the figure. The large model language parsing chain parses the task, calls the knowledge base to query the matching theoretical knowledge results, and then the large model language parsing chain generates a dialogue text to feed back to the user;

[0118] Step 5: Design of scenario generation task link;

[0119] 51) See Figure 7 ,For the test scenario generation task, it is necessary to extract the key information in the question and call the knowledge base for query, ,parse the test scenario generation requirements into single round generation or ,optimization generation, and select the corresponding scenario generation method and ,scenario evaluation criteria for each requirement. ,Get the test scenario element type, element value range, distribution form and ,discrete step length of the system to be tested.

[0120] 52) For single generation tasks, such as the combination test mentioned above, the large model language parsing chain parsing task calls the combination test function to generate batch scenarios, and then the large model language parsing chain generates dialogue text feedback to the user;

[0121] 53) For the cyclic generation task, the scenario generation process is deeply coupled with the simulation test and performance evaluation process. The large model language parsing chain parses the task, generates batch test scenarios based on the initial scenario space, simulates the simulation tool chain to perform simulation tests, and then switches to the performance evaluation tool chain to evaluate the effect of this batch of scenarios. The evaluation results are used to optimize the search algorithm to generate the next batch of test scenarios. The test scenarios are generated through the cyclic test process, and then the large model language parsing chain generates dialogue texts to feed back to the user;

[0122] Step 6: Design of test and evaluation task links;

[0123] 61) See Figure 8,For the complete scenario testing task, the user’s goal is to use the test case to test a ,smart car algorithm and generate a test report. ,The process is designed as follows: for the given system to be tested and ,test case, key information is extracted, and then transferred to the ,knowledge base query, a preliminary analysis of the system to be conducted, and ,test cases are screened to see whether they can be executed on the simulation platform, and ,elements that cannot be simulated and tested.

[0124] 62) Input the values ​​of scene elements into the initialized simulation scene. The simulation tool chain builds the scene according to user instructions, executes the simulation test process, and outputs various kinematic information during the test process to realize automated testing and process data output, and realizes automated evaluation of results through evaluation tools.

[0125] 63) Based on the knowledge base call chain, the knowledge base is called to obtain the test report template and related scenario test evaluation theory. Based on the test report generation chain, the scenario test evaluation results are used for test report writing and exported to a word document. Finally, the large model language parsing chain generates a dialogue text to feed back to the user.

[0126] Step 7: Experiment and evaluate each task;

[0127] 71) For language problem applications, the experimental design is: use the same data that has not been fine-tuned and knowledge base construction to test the model; the data set includes five parts: scenario theory, standard regulations, system to be tested, simulation software, and test process, each part provides 200 questions;

[0128] Based on the scoring method of the large language model, the questions, recommended answers, and the output of all models are provided to GPT3.5, Tongyi Qianwen, and Wenxin Yiyan, and the difficulty score and accuracy score of each question are required to be output. The calculation method is shown in formula (1) and formula (2):

[0129]

[0130] In the formula, H is the weighted result of the difficulty of this dimension; h i Score the difficulty; j is the scoring weight; 0.25 is used for Tongyi Qianwen and Wenxin Yiyan; 0.5 is used for GPT3.5; n is the number of questions in this dimension;

[0131]

[0132] Where S is the weighted result of the accuracy of this dimension; a i They are the answer accuracy scores given by the evaluation model;

[0133] 72) For the scene generation task, the following evaluation indicators are designed:

[0134] Knowledge indexing success rate, the success rate of successfully indexing the knowledge base to query the corresponding test items;

[0135] The success rate of factor design is the success rate of reasonably designing scenario factors and value ranges according to the characteristics of the system to be tested and the simulation platform;

[0136] The success rate of scene generation, the success rate of calling and executing the scene generation function according to different requirements;

[0137] Key scenario ratio: the ratio of key scenarios generated by different scenario generation algorithms to the total test scenarios;

[0138] The following test task was designed: "Based on the knowledge base, find test scenarios for AEB algorithms based on lidar ranging that can be executed on a simulation platform, taking into account weather factors, ① generate test scenarios with a coverage of 1, and ② generate 100 critical scenarios."

[0139] Optimization generation results refer to Fig. 9 , the results are as follows:

[0140] Table 1 List of combined test scenarios

[0141]

[0142]

[0143] Table 2 Evaluation table of scene generation task results

[0144]

[0145] The success rate of scenario generation under different requirements is greater than 80%, indicating that the scenario generation process proposed in this paper can help generate test scenarios.

[0146] 73) For the test evaluation task, the following indicators are designed:

[0147] Knowledge indexing success rate: the model successfully parses the system under test, calls the knowledge base for knowledge retrieval, and optimizes the success rate of test cases;

[0148] Simulation execution success rate, the success rate of successfully parsing the optimized test cases and calling CARLA for testing through the simulation agent;

[0149] Result evaluation success rate: the success rate of using the evaluation agent to perform performance evaluation on the test kinematic information derived from CARLA;

[0150] Report generation success rate, the success rate of generating test reports based on all data.

[0151] The specific task is set as: "According to the specified test case input, complete the virtual simulation test of a built-in algorithm and generate a test report. Test two algorithms to be tested respectively, input 10 test cases for each algorithm, and require the model to complete the test and evaluation work and output the test report. Repeat 50 times, with different test case values ​​for each experiment, and each algorithm needs to be tested 500 times in total."

[0152] See also Fig.10 , the results are as follows:

[0153] Table 3 Test evaluation task result evaluation table

[0154]

[0155] The overall task has a success rate of over 85%, which shows that the test and evaluation application route of this article has certain significance.

[0156] Embodiment 2

[0157] See also Figure 1 ,This embodiment provides a smart car scenario testing system based on a language model architecture, including a data layer, a model layer, a simulation layer and an application layer;

[0158] The data layer is used to collect scenario description text data related to smart car scenario testing and smart car technology, including scenario description documents, autonomous driving test reports, vehicle sensor data descriptions, fault case analysis, simulation software usage methods, road traffic regulations, smart car technology papers and patents, etc.;

[0159] The model layer is used to establish a knowledge structure model, a large language model, and corresponding knowledge structuring, input semantic understanding, query knowledge depth, associate and match knowledge, and learn context;

[0160] The simulation layer is used to establish the test platform, evaluation tools, scenario generation tools, etc. required for simulation testing, and implement the test application of LLM through the agent;

[0161] The application layer specifically includes three parts: language question and answer, scenario generation, and test evaluation. It is used to answer questions about scenario theories, analyze the system to be tested, generate key scenarios, analyze the impact of factors, generate test reports, quarantine performance improvements, test simulations, and evaluate system performance.

[0162] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A smart car scenario testing method based on a language model architecture, characterized in that: The following steps are involved: Step 1: Collect, label and organize scene data; Collect scenario description text data related to smart car scenario testing and smart car technology, annotate the specific tasks and performance boundaries of large models, and organize the texts needed to form a knowledge base; Step 2: Fine-tune the basic language model; Select a pre-trained model and fine-tune it; Step 3: Scenario knowledge base construction and call chain design; Import the annotated scene data into the knowledge base management system to form a structured and queryable knowledge resource; Step 4: Design and build simulation test tool chain; Determine the required simulation software, test management tools, design the overall architecture of the tool chain, and clarify the data flow, control flow and interface specifications between components; Step 5: Test report generation and evaluation tool chain construction; Design the structure and content template of the test report, as well as the tool chain for generating report files; Step 6: Test task definition and element deconstruction; Define all smart car scenario test application points and provide practical links; Step 7: Conduct experiments and evaluation on each task.

2. The intelligent vehicle scenario testing method based on language model architecture according to claim 1 is characterized in that: The specific method of step one is as follows: 11) Collect scenario description text data of various smart car application scenarios, including scenario description documents, autonomous driving test reports, vehicle sensor data descriptions, fault case analysis, simulation software usage, road traffic regulations, smart car technology papers and patents; 12) Structural annotation of scene description text, including annotation of scene type, traffic elements, traffic events, environmental conditions, and driving behavior attributes; classification marks are made for other texts; 13) Organizing the annotated scene data into a structured knowledge base; the structured knowledge base includes scene templates, scene element library, fault library and regulation library.

3. The intelligent vehicle scenario testing method based on language model architecture according to claim 1 is characterized in that: The specific method of step 2 is as follows: 21) Select a basic language model architecture; 22) Clean, segment, and standardize the collected scene description text data and convert it into an input format acceptable to the model; 23) Start the model fine-tuning training process.

4. The intelligent vehicle scenario testing method based on language model architecture according to claim 1 is characterized in that: The specific method of step three is as follows: 31) Import the annotated scene data into the knowledge base management system to form a structured and searchable knowledge resource; 32) Design a knowledge base access interface to enable the model to call required knowledge in real time during the reasoning process.

5. The intelligent vehicle scenario testing method based on language model architecture according to claim 1 is characterized in that: The specific method of step 4 is as follows: 41) Plan the tool chain architecture, with carla as the core simulation platform, define the simulation scenario construction, test process initialization, scenario element setting, and simulation execution result export functions; the elements that can be constructed for simulation scenario construction include: number of lanes n, lane width Lane width , lane id of the smart car, longitudinal speed V x , lateral velocity V y , the lateral offset from the lane length1 , the lateral distance D between the smart car and the traffic car later , longitudinal distance D long , the longitudinal velocity V of the traffic vehicle x2 , lateral velocity V y2 , using the large language model to convert the test scenario related elements into the above variable values, so as to generate the test scenario directly in carla; 42) Design a test scenario generation management tool to integrate scenario generation methods in the field of test evaluation, and divide scenario generation methods into two parts: single generation and cyclic generation; single generation includes random generation methods, combination test methods, traversal test methods, and Monte Carlo sampling methods; cyclic generation includes accelerated test methods based on various optimization search methods; 43) Design and test the data flow, control flow and interface specifications between various components; the simulation tool chain builds scenarios according to user instructions, executes the simulation test process, and outputs various kinematic information during the test process.

6. The intelligent vehicle scenario testing method based on language model architecture according to claim 1 is characterized in that: The specific method of step five is as follows: 51) Design a test report structure including cover, table of contents, abstract, background, test purpose, simulation software, test method, test scenario, test results, evaluation results, test conclusion and improvement suggestions, and appendix, and create detailed template texts for each of the above chapters, including titles, subtitles, paragraph guides, table templates, and chart templates to ensure the standardization and consistency of the report content; reserve placeholders for the language model to fill in specific test data when generating the report; 52) Construct an evaluation system for intelligent vehicle scenario test results, evaluate the risk and comfort of intelligent vehicles and other traffic participants and static obstacles during the test process, and design test result evaluation indicators: 53) Design interfaces with the test tool chain, knowledge base, and data warehouse to obtain raw data, intermediate results, and knowledge information during the test process; and fill the information into the test report template through the word generation plug-in docxtpl and export it as a word document.

7. The intelligent vehicle scenario testing method based on language model architecture according to claim 6 is characterized in that: The test result evaluation indicators are as follows: Safety index ①: Collision time, the time when the main vehicle collides with the other vehicle under the premise that the current motion state remains unchanged during the test process; the calculation method is: the relative distance between the two vehicles at the current moment divided by the relative speed; Safety index ②: Safety distance: the relative distance between the main vehicle and other vehicles during the test; Safety indicator ③: Obstacle avoidance response time: When an obstacle or potential collision risk is detected ahead, the time interval from the main vehicle identifying it to taking obstacle avoidance action reflects the system's rapid response capability; Safety indicator ④: Traffic rules compliance: Evaluate the vehicle's compliance with traffic signals, signs, and markings during the test to measure the system's compliance driving ability; Comfort index ①: Maximum braking deceleration: the maximum braking deceleration triggered by the main vehicle during the test; Comfort index ②: Root mean square value of acceleration, i.e. RMS: square the acceleration signal of the main vehicle during the test, take the average value, and then square it again.

8. The intelligent vehicle scenario testing method based on language model architecture according to claim 1 is characterized in that: The specific method of step six is ​​as follows: 61) Divide the intelligent vehicle scenario testing tasks into scenario theory question and answer, system analysis, test scenario generation, test report generation, performance improvement suggestions, simulation test, and system performance evaluation; 62) According to steps 1 to 5, construct a large language model application link; 63) For each task, specify the link call rules.

9. The intelligent vehicle scenario testing method based on language model architecture according to claim 8, characterized in that: The large language model application chain includes ① a large model language parsing chain, which parses test tasks, exports keywords, decomposes steps and calls subsequent chains. The fine-tuned large model has these functions; ② a knowledge base call chain, which queries the internal knowledge base based on keywords; ③ a test scenario generation chain, which generates specified test scenarios based on test requirements; ④ a performance evaluation tool chain, which evaluates algorithm performance based on test results; ⑤ a simulation tool chain, which calls simulation software based on test requirements, builds scenarios and performs simulation tests; ⑥ a test report generation chain, which writes test reports based on test scenarios and simulation results and exports them to word format; The specific method of specifying the link call rule is as follows: For scenario theory question-answering tasks, the large model language parsing chain parses the task, calls the knowledge base to query the matching theoretical knowledge results, and then the large model language parsing chain generates dialogue text to feed back to the user; For the system under test analysis task, the large model language parsing chain parses the task, calls the knowledge base to query the matching system under test feature documents, and then the large model language parsing chain generates a dialogue text to feed back to the user; For the test scenario generation task, for a single generation task, the large model language parsing chain parses the task, calls the combined test function to generate batch scenarios, and then the large model language parsing chain generates dialogue texts to feed back to the user; for the cyclic generation task, the scenario generation process is deeply coupled with the simulation test and performance evaluation process. The large model language parsing chain parses the task, generates batch test scenarios according to the initial scenario space, and the simulation tool chain performs simulation tests, and then switches to the performance evaluation tool chain to evaluate the effect of this batch scenario. The evaluation results are used to optimize the search algorithm to generate the next batch of test scenarios, and the test scenarios are generated through the cyclic test process. Then, the large model language parsing chain generates dialogue texts to feed back to the user; For the test report generation task, the large model language parsing chain parses the task, calls the test report template library, fills the input test data into the test template, generates a word document, and then the large model language parsing chain generates a dialogue text to feed back to the user; For performance improvement suggestion tasks, the large model language parsing chain parses the task, calls the knowledge base based on the performance evaluation results, and then generates dialogue text feedback to the user by the large model language parsing chain; For the system performance evaluation task, the large model language parsing chain parses the task, analyzes the system performance defects in combination with the performance evaluation results, and then generates dialogue text feedback to the user by the large model language parsing chain; For the complete scenario test task, the user's purpose is to test a smart car algorithm and generate a test report. The process design is as follows: the large model language parsing chain parses the task, calls the knowledge base to query the matching theoretical knowledge results, and the test scenario generation chain performs scenario generation. If it is a single-time generated scenario, it is directly transferred to the performance evaluation tool chain; If the scenario is generated in a loop, after the performance evaluation, the optimization search tool of the test scenario generation chain is used again to generate batch scenarios in a loop. The knowledge base is called based on the knowledge base call chain to obtain the test report template and related scenario test evaluation theory. The scenario test evaluation results are used for test report writing and exported to a word document based on the test report generation chain. Finally, the large model language parsing chain generates dialogue text and feeds it back to the user.

10. The intelligent vehicle scenario testing method based on language model architecture according to claim 1, characterized in that: The specific method of step seven is as follows: 71) For language problem applications, the experimental design is: use the same data that has not been fine-tuned and knowledge base construction to test the model; the data set specifically covers five parts: scenario theory, standards and regulations, systems to be tested, simulation software, and test processes, each of which provides 200 questions; Based on the scoring method of the large language model, the questions, recommended answers, and the output of all models are provided to GPT3.5, Tongyi Qianwen, and Wenxin Yiyan, and the difficulty score and accuracy score of each question are required to be output. The calculation method is shown in formula (1) and formula (2): In the formula, H is the weighted result of the difficulty of this dimension; h i Score the difficulty; j is the scoring weight; 0.25 is used for Tongyi Qianwen and Wenxin Yiyan; 0.5 is used for GPT3.5; n is the number of questions in this dimension; Where S is the weighted result of the accuracy of this dimension; a i They are the answer accuracy scores given by the evaluation model; 72) For the scene generation task, the following evaluation indicators are designed: Knowledge indexing success rate, the success rate of successfully indexing the knowledge base to query the corresponding test items; The success rate of factor design is the success rate of reasonably designing scenario factors and value ranges according to the characteristics of the system to be tested and the simulation platform; The success rate of scene generation, the success rate of calling and executing the scene generation function according to different requirements; Key scenario ratio: the ratio of key scenarios generated by different scenario generation algorithms to the total test scenarios; 73) For the test evaluation task, the following indicators are designed: Knowledge indexing success rate: the model successfully parses the system under test, calls the knowledge base for knowledge retrieval, and optimizes the success rate of test cases; Simulation execution success rate, the success rate of successfully parsing the optimized test cases and calling CARLA for testing through the simulation agent; Result evaluation success rate: the success rate of using the evaluation agent to perform performance evaluation on the test kinematic information derived from CARLA; Report generation success rate, the success rate of generating test reports based on all data.

Citation Information

Cited By

  • Impact information generation method based on multivariate fusion

    CN118862695A

  • Intelligent decision-making system evaluation scene set construction method and device based on case constraint large model

    CN119337151A

  • A method and device for constructing an evaluation scenario set for an intelligent decision-making system based on a case-constrained large model

    CN119337151B

  • Power system adaptive evaluation system construction method based on LLM and analytic hierarchy process

    CN119337978A

  • Knowledge-operation mapping fine-tuning LLM-based power system calibration tuning agent

    CN119357321A