Automatic driving cloud simulation platform test method and device

By constructing a knowledge source database and quantifying multi-source data, combined with retrieval-enhanced generation algorithms and artificial intelligence models, test case logic and code are automatically generated, solving the problems of low testing efficiency and insufficient accuracy of autonomous driving cloud simulation platforms, and realizing efficient and accurate intelligent testing.

CN121187943BActive Publication Date: 2026-06-19ZHEJIANG WUWEN ZHIXING TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG WUWEN ZHIXING TECHNOLOGY CO LTD
Filing Date
2025-09-04
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

The existing autonomous driving cloud simulation platform suffers from low efficiency in manually executing test cases, and the automated testing tools lack intelligent generation capabilities, resulting in low testing efficiency and insufficient accuracy.

Method used

By acquiring multi-source data to build a knowledge source database, using a pre-trained language model to vectorize knowledge fragments, and combining retrieval enhancement generation algorithms and artificial intelligence models, test case logic is automatically generated and test code templates are retrieved, thus realizing intelligent testing of the autonomous driving cloud simulation platform.

Benefits of technology

It improves the testing efficiency and accuracy of the autonomous driving cloud simulation platform, shortens the testing cycle, reduces labor costs, accurately locates defects, and enhances R&D efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121187943B_ABST
    Figure CN121187943B_ABST
Patent Text Reader

Abstract

This application provides a testing method and apparatus for an autonomous driving cloud simulation platform. The method includes: acquiring multi-source data from the autonomous driving cloud simulation platform; classifying and structurally extracting the multi-source data to obtain corresponding knowledge fragments and storing them in a knowledge source database; vectorizing the knowledge fragments according to their types using different language models to obtain document vector sets, code vector sets, and scene parameter vector sets; receiving test requirements described in natural language and quantizing them; performing vector retrieval in the document vector set and scene parameter vector set using a retrieval enhancement generation algorithm; inputting the retrieval results into an artificial intelligence model to understand the test scenario requirements; obtaining test case logic output by the model; retrieving test code templates from the code vector set based on the test case logic; and injecting input parameters into the test code templates to obtain test code for testing. This application can improve the efficiency and accuracy of testing autonomous driving cloud simulation platforms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, specifically to a testing method and apparatus for an autonomous driving cloud simulation platform. Background Technology

[0002] With the rapid development of autonomous driving technology, autonomous driving cloud simulation platforms are becoming increasingly important tools for the research, testing, and verification of autonomous driving systems. These platforms integrate cloud computing and web technologies, accessible via a browser, greatly overcoming the geographical and equipment limitations of traditional simulation platforms and improving the convenience and efficiency of research and development. However, existing technologies still face many challenges in the testing process of web-based autonomous driving cloud simulation platforms.

[0003] First, manually executing test cases is inefficient: Autonomous driving cloud simulation platforms are complex, encompassing multiple modules such as user management, scene management, and task management. Each module contains numerous detailed functionalities, such as user registration, login, permission settings, and scene creation, editing, saving, and loading. Manually executing test cases one by one consumes a significant amount of time and effort, severely slowing down the development process. For example, testing combinations of different scene parameters in the scene management module may take several days or even weeks.

[0004] Second, automated testing tools lack intelligent generation capabilities: While existing automated testing tools can reduce the testing burden, they often struggle to adapt to complex and ever-changing business scenarios. The business requirements of autonomous driving cloud simulation platforms are constantly evolving with technological advancements and feedback from real-world applications. For example, existing tools cannot automatically generate suitable test cases for newly added specific conditional task allocation rules in the task management module. Testers must manually write and adjust test scripts, which not only increases workload but also increases the risk of errors due to human negligence, reducing the accuracy and reliability of the tests.

[0005] Given the aforementioned limitations, there is an urgent need for a more intelligent and efficient testing method for autonomous driving cloud simulation platforms, which can improve the efficiency and accuracy of testing autonomous driving cloud simulation platforms. Summary of the Invention

[0006] To address the problems in the prior art, this application provides a testing method and apparatus for an autonomous driving cloud simulation platform, which can improve the efficiency and accuracy of testing autonomous driving cloud simulation platforms.

[0007] To solve at least one of the above problems, this application provides the following technical solution:

[0008] Firstly, this application provides a testing method for an autonomous driving cloud simulation platform, including:

[0009] Acquire multi-source data from an autonomous driving cloud simulation platform, including product documents and product code libraries. Classify the product documents by functional modules and extract the functional descriptions and parameter rules for each functional module. Extract key entities from the functional descriptions and label the relationships between entities to obtain text knowledge fragments. Perform syntax parsing and logic extraction on the product code library according to code type to determine the corresponding code knowledge fragments. Construct a knowledge source database based on the text knowledge fragments and the code knowledge fragments.

[0010] Multiple language models are pre-trained based on knowledge fragment types, and the knowledge fragments of the knowledge source database are vectorized according to the pre-trained language models to determine the corresponding vector database. The vector database includes a document vector set, a code vector set, and a scene parameter vector set.

[0011] After receiving test requirements described in natural language and vectorizing them, the system performs a similarity search on the test requirement vectors in the vector database according to the retrieval enhancement generation algorithm to determine the corresponding search results. The system then parses the search results according to a preset artificial intelligence model to determine the corresponding test case logic, wherein the test case logic includes functional test cases, performance test cases, and security test cases.

[0012] According to the test case logic, test code templates are retrieved from the vector database to determine the corresponding test code, so that the autonomous driving cloud simulation platform can perform tests based on the test code. The test code includes interface test code and UI test code.

[0013] Furthermore, the product documents are categorized by functional modules, and the functional descriptions and parameter rules of each module are extracted. Key entities are extracted from the functional descriptions, and the relationships between entities are labeled to obtain text knowledge fragments, including:

[0014] The product document is divided into modules according to functional modules using natural language processing technology. Semantic unit segmentation is performed on the text of each module to extract independent segments containing functional descriptions and parameter rules.

[0015] Based on dependency parsing and named entity recognition technology, key entities are extracted from the functional description and the relationships between entities are labeled to obtain text knowledge fragments. Metadata tags are added to the text knowledge fragments for retrieval optimization.

[0016] Furthermore, the step of performing syntax parsing and logical extraction on the product codebase according to code type to determine the corresponding code knowledge fragments includes:

[0017] The backend code is parsed by interface definition, business logic extraction, configuration parameter parsing and data structure parsing to determine the corresponding backend code knowledge fragments. These backend code knowledge fragments are used to support the understanding of business logic when generating test cases.

[0018] Perform API interface extraction, state management parsing, and environment configuration parsing operations on the front-end code to determine the corresponding front-end code knowledge fragments;

[0019] The simulation engine code is subjected to class and attribute parsing operations, method and business logic extraction operations, ProtoBuf definition parsing operations, and map data parsing operations to determine the corresponding simulation code knowledge fragments. These simulation code knowledge fragments are used to support the scenario parameters when generating test cases.

[0020] The automated test code is subjected to framework configuration parsing, authentication logic extraction, and test case parsing operations to determine the corresponding automated test code knowledge fragments. These automated test code knowledge fragments are used to support the reuse of the test framework when generating test cases.

[0021] Furthermore, the step of pre-training multiple language models based on knowledge fragment types, and vectorizing the knowledge fragments of the knowledge source database according to the pre-trained language models to determine the corresponding vector database, includes:

[0022] For the text knowledge fragments, a pre-trained Sentence-BERT model is used to perform semantic vectorization to determine the corresponding document vector set;

[0023] For the code knowledge fragments, a pre-trained CodeBERT model is used to perform joint syntactic and semantic vectorization to determine the corresponding code vector set;

[0024] For knowledge fragments containing scene parameters, structural vectorization is performed based on a custom feature extraction model to determine the corresponding scene parameter vector set;

[0025] The dimensions of the document vector set, the code vector set, and the scene parameter vector set are unified to 768 dimensions, and the consistency of vectors of the same type of fragments is verified by cosine similarity to determine the corresponding vector database.

[0026] Further, after receiving the test requirements described in natural language and vectorizing them, the process involves performing a similarity search on the test requirement vectors in the vector database according to a retrieval enhancement generation algorithm to determine the corresponding search results, including:

[0027] The vector database is pre-filtered based on the metadata tags of the test requirement vectors to determine the vector subset after pre-filtering.

[0028] Calculate the cosine similarity between the vector subset and the document vector set and the scene parameter vector set, and return the Top-K similar segments as the retrieval results. The retrieval results are used to understand the scene requirements.

[0029] Furthermore, the step of parsing the search results according to a preset artificial intelligence model to determine the corresponding test case logic includes:

[0030] Based on a pre-set artificial intelligence model, cross-modal semantic matching is performed on knowledge fragments in the search results to determine the corresponding semantic association results;

[0031] Based on the semantic association results, the test requirements are decomposed into atomic test tasks, and test case logic containing input parameters is generated. The test case logic includes functional test cases, performance test cases, and security test cases.

[0032] Further, the step of retrieving test code templates from the vector database according to the test case logic and determining the corresponding test code, so that the autonomous driving cloud simulation platform can perform tests according to the test code, includes:

[0033] Retrieve test code templates from the code vector set according to the test case logic;

[0034] The input parameters extracted from the test case logic are injected into the test code template according to preset syntax rules to determine the corresponding test code, so that the autonomous driving cloud simulation platform can perform tests based on the test code.

[0035] Secondly, this application provides a testing device for an autonomous driving cloud simulation platform, comprising:

[0036] The knowledge source database construction module is used to acquire multi-source data from the autonomous driving cloud simulation platform. The multi-source data includes product documents and product code libraries. The product documents are classified according to functional modules, and the functional descriptions and parameter rules of each functional module are extracted. Key entities are extracted from the functional descriptions and the relationships between entities are marked to obtain text knowledge fragments. The product code library is parsed and logically extracted according to code type to determine the corresponding code knowledge fragments. The knowledge source database is constructed based on the text knowledge fragments and the code knowledge fragments.

[0037] The vector database construction module is used to pre-train multiple language models based on knowledge fragment types, and vectorize the knowledge fragments of the knowledge source database according to the pre-trained language models to determine the corresponding vector database. The vector database includes a document vector set, a code vector set, and a scene parameter vector set.

[0038] The test case logic determination module is used to receive test requirements described in natural language, vectorize the test requirements, perform similarity retrieval on the test requirement vectors in the vector database according to the retrieval enhancement generation algorithm, determine the corresponding retrieval results, parse the retrieval results according to the preset artificial intelligence model, and determine the corresponding test case logic, wherein the test case logic includes functional test cases, performance test cases, and security test cases.

[0039] The test code generation module is used to retrieve test code templates from the vector database according to the test case logic, determine the corresponding test code, and enable the autonomous driving cloud simulation platform to perform tests based on the test code. The test code includes interface test code and UI test code.

[0040] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the autonomous driving cloud simulation platform testing method.

[0041] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned autonomous driving cloud simulation platform testing method.

[0042] Fifthly, this application provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the aforementioned autonomous driving cloud simulation platform testing method.

[0043] As can be seen from the above technical solution, this application provides a testing method and apparatus for an autonomous driving cloud simulation platform. It acquires multi-source data from the autonomous driving cloud simulation platform, classifies and structurally extracts the corresponding knowledge fragments from the multi-source data, and stores them in a knowledge source database. Based on the type of knowledge fragment, different language models are used to vectorize the knowledge fragments to obtain document vector sets, code vector sets, and scene parameter vector sets. The system receives test requirements described in natural language and quantizes them. Based on a retrieval enhancement generation algorithm, vector retrieval is performed in the document vector set and scene parameter vector set. The retrieval results are input into an artificial intelligence model to understand the test scenario requirements, resulting in test case logic output by the model. Based on this test case logic, test code templates are retrieved from the code vector set, and input parameters are injected into the test code templates to obtain test code for testing. This improves the efficiency and accuracy of testing the autonomous driving cloud simulation platform. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is one of the flowcharts illustrating the testing method for the autonomous driving cloud simulation platform in this application embodiment;

[0046] Figure 2 This is a structural diagram of the autonomous driving cloud simulation platform testing device in the embodiments of this application;

[0047] Figure 3 This is a schematic diagram of the structure of the electronic device in the embodiments of this application.

[0048] Figure label:

[0049] Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver storage unit 9144, antenna 9111, speaker 9131, microphone 9132. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0051] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.

[0052] Considering the current problems of low efficiency in manual test case generation and the lack of intelligent generation capabilities in automated testing tools for autonomous driving cloud simulation platforms, this application provides a testing method and apparatus for autonomous driving cloud simulation platforms. The method involves acquiring multi-source data from the autonomous driving cloud simulation platform, classifying and structurally extracting corresponding knowledge fragments from the data, and storing them in a knowledge source database. Based on the knowledge fragment type, different language models are used to vectorize the knowledge fragments into document vector sets, code vector sets, and scene parameter vector sets. The method receives test requirements described in natural language and quantifies them. A retrieval-enhanced generation algorithm is used to perform vector retrieval in the document vector sets and scene parameter vector sets. The retrieval results are input into an artificial intelligence model to understand the test scenario requirements, resulting in test case logic output by the model. Based on this test case logic, test code templates are retrieved from the code vector set, and the input parameters are injected into the test code templates to obtain test code for testing. This improves the efficiency and accuracy of testing autonomous driving cloud simulation platforms.

[0053] To improve the efficiency and accuracy of testing autonomous driving cloud simulation platforms, this application provides an embodiment of a testing method for autonomous driving cloud simulation platforms, see [link to embodiment]. Figure 1 The testing method for the autonomous driving cloud simulation platform specifically includes the following:

[0054] Step S101: Obtain multi-source data from the autonomous driving cloud simulation platform. The multi-source data includes product documents and product code libraries. Classify the product documents according to functional modules and extract the functional descriptions and parameter rules of each functional module. Extract key entities from the functional descriptions and mark the relationships between entities to obtain text knowledge fragments. Perform syntax parsing and logic extraction on the product code library according to code type to determine the corresponding code knowledge fragments. Construct a knowledge source database based on the text knowledge fragments and the code knowledge fragments.

[0055] Optionally, in this embodiment, the core of this step lies in constructing a structured and searchable knowledge source database to provide semantically complete knowledge support for subsequent intelligent testing. Through a "document-code dual-track processing" mechanism, the originally scattered and heterogeneous multi-source data is transformed into knowledge fragments in a unified format, and an explicit mapping between entity relationships and code logic is achieved.

[0056] Optionally, in this embodiment, the multi-source data input to the autonomous driving cloud simulation platform includes:

[0057] Autonomous driving cloud simulation platform product documentation: Text descriptions of functional modules such as use case management, resource management, indicator management, task management, and user management in the user manual;

[0058] Code repository: Front-end / back-end code for autonomous driving cloud simulation platform, simulation engine code, interface automation test code, and UI automation test code.

[0059] Optionally, in this embodiment, the document data is preprocessed and structured.

[0060] Specifically, product documentation is categorized by functional modules, such as use case management, resource management, indicator management, task management, and user management.

[0061] For each functional module, extract its functional description and parameter rules. For example, in the use case management module, the functional description may include "the use case set has a maximum of three levels, and only leaf nodes can add use cases," while the parameter rules involve the name, description, and directory of the use case.

[0062] Extract key entities from the functional description, such as "UE simulation use case," "main vehicle model," and "obstacle model," and label the relationships between these entities. For example, "UE simulation use case depends on the main vehicle model, obstacle model, and xodr format map."

[0063] Optionally, in this embodiment, the code database is preprocessed and structured.

[0064] Code databases are divided into four categories based on code function:

[0065] Backend service code (Go / Kratos framework), frontend interaction code (TypeScript / React), simulation engine code (Python / CARLA), and automated test code (Python / Pytest).

[0066] Based on the different types of code (e.g., Go, TypeScript, Python, etc.), the product codebase undergoes syntax parsing and logic extraction. This process involves analyzing the code structure, extracting key functions, variables, classes, and their call relationships. It avoids mixing code from different syntax systems and ensures that the parsing rules match the language characteristics.

[0067] By parsing and extracting, code is transformed into understandable knowledge fragments. For example, in Go backend code, key information such as service definitions, business logic, and database operations can be extracted.

[0068] Optionally, in this embodiment, the preprocessing also includes general preprocessing steps.

[0069] Specifically, the redundancy removal steps include: filtering common utility functions (such as logging logger.info and checking_not_empty for common parameters) and merging duplicate logic (such as keeping one standard template for the same login steps in different test cases).

[0070] Standardization steps: Convert all extracted information into a uniform format (such as structured text or JSON dictionary).

[0071] Textual knowledge fragments extracted from product documents and code knowledge fragments identified from the product codebase are integrated and standardized through general preprocessing steps to construct a knowledge source database. The final knowledge source database stores various knowledge and information of the platform in a structured form, which can penetrate documents and code, and automatically combine "textual rules + algorithm interfaces + historical test cases" to provide a solid foundation for subsequent intelligent testing.

[0072] By implementing step S101, the multi-source data of the autonomous driving cloud simulation platform can be effectively integrated and structured, providing rich knowledge support for subsequent intelligent testing. The establishment of the knowledge source database enables the AI ​​large model to more accurately understand testing requirements, generate test cases and test code, and optimize the testing process. Simultaneously, this database supports a closed-loop learning mechanism, continuously optimizing test plans and code generation logic by constantly collecting and integrating user feedback, thereby improving testing efficiency and accuracy. Ultimately, this helps to shorten the testing cycle, save manpower costs, and accurately locate defects, thereby improving the overall R&D efficiency and product quality of the autonomous driving cloud simulation platform.

[0073] Step S102: Pre-train multiple language models based on knowledge fragment types, and vectorize the knowledge fragments of the knowledge source database according to the pre-trained language models to determine the corresponding vector database. The vector database includes a document vector set, a code vector set, and a scene parameter vector set.

[0074] Optionally, in this embodiment, this step describes the process of constructing a vector database.

[0075] Optionally, in this embodiment, a suitable pre-trained language model is selected for training based on the type of knowledge fragment (document, code, scene parameters, etc.).

[0076] Specifically, the model loading process includes: initializing CodeBERT, Sentence-BERT, and the custom scene model, and loading pre-trained weights;

[0077] Text-based (product documents): Converted to 768-dimensional vectors using Sentence-BERT, retaining "module labels" (such as "simulation scheduling"), and stored in the docs collection;

[0078] Code class: Converted into a 768-dimensional vector using CodeBERT, associated with "code type" (such as "API code" or "test script"), and stored in the codes collection;

[0079] Scenario use cases: Converted into 768-dimensional vectors through a custom model (trained based on scenario parameter features), labeled with "use case type" (such as "traffic flow scenario" or "extreme weather scenario"), and stored in the cases set;

[0080] In the aforementioned vector set, the text class set and the scenario use case set are used to help the model understand the scenario requirements proposed by the user and generate test case logic, while the code class set and the text class set are used to determine test cases based on the test case logic and perform testing.

[0081] During vectorization, the semantic content, structural relationships, and contextual information of the knowledge fragments are considered. The vectorized knowledge fragments are then grouped by type to construct a vector database. This database includes document vector sets, code vector sets, and scenario parameter vector sets, each corresponding to a different knowledge fragment type. Each vector set contains multiple vectors, and each vector corresponds to a knowledge fragment.

[0082] By implementing step S102, the multi-source knowledge of the autonomous driving cloud simulation platform can be effectively integrated and vectorized, providing rich vector representations for subsequent intelligent testing. The establishment of the vector database enables the AI ​​large model to efficiently retrieve relevant knowledge fragments from the vector database when understanding and generating test requirements, thereby generating test cases and test code more accurately.

[0083] Step S103: After receiving the test requirements described in natural language and vectorizing the test requirements, perform similarity retrieval on the test requirement vectors in the vector database according to the retrieval enhancement generation algorithm to determine the corresponding retrieval results. Then, parse the retrieval results according to the preset artificial intelligence model to determine the corresponding test case logic. The test case logic includes functional test cases, performance test cases, and security test cases.

[0084] Optionally, in this embodiment, the core step in the intelligent testing method of the autonomous driving cloud simulation platform involves transforming the test requirements described in natural language into specific test case logic.

[0085] Optionally, in this embodiment, test requirements are typically presented in natural language, such as "test the vehicle's obstacle avoidance function in rainy weather." These requirements may come from developers, test engineers, or product managers. Vectorizing the test requirements described in natural language converts them into a vector form that computers can understand and manipulate, thereby capturing the semantic information of the test requirements.

[0086] Next, a hybrid retrieval method is used to search the vector database. This step involves understanding the retrieval requirements of the scenario. First, the data is filtered by metadata such as "module tag" and "code type," then the vector cosine similarity is calculated to retrieve the Top-5 results.

[0087] Based on the Retrieval Augmentation Generation (RAG) algorithm, similarity retrieval of test requirement vectors in a vector database can efficiently retrieve the most relevant content from a large number of knowledge fragments. Similarity retrieval is achieved by calculating the cosine similarity between the test requirement vector and each vector in the vector database, thereby determining the best-matching retrieval result.

[0088] Specifically, when understanding the logic of generating test cases based on scenario requirements, we adjust the dynamic weights of the vector machine in the vector database, using a weight of 60% for the cases set and 40% for the documents set for retrieval.

[0089] Subsequently, when generating test case template files for logical retrieval, we adjusted the dynamic weights of the vector machine in the vector database, setting the weight of the codes set at 70% and the weight of the documents set at 30% for retrieval.

[0090] To illustrate with a specific example, suppose we need to test the obstacle avoidance function of the main vehicle in a rainy weather scenario on an autonomous driving cloud simulation platform.

[0091] Input test requirement: "Test the vehicle's obstacle avoidance function in rainy weather". Convert the test requirement "Test the vehicle's obstacle avoidance function in rainy weather" described in natural language into a 768-dimensional vector representation.

[0092] In the document vector set, retrieve document fragments related to "rainy weather scenario" and "main vehicle obstacle avoidance". The historical document fragments that may be recalled include "rainy weather scenario parameter configuration" (such as solar altitude angle, cumulus degree, etc.) and "main vehicle obstacle avoidance function description".

[0093] In the scene parameter vector set, retrieve scene parameters related to "rainy day scene". The historical scene parameters that may be recalled include "rainy day mode, road surface water content, road surface friction coefficient", etc.

[0094] After similarity calculation (cosine similarity), the document fragments and scene parameters most relevant to the test requirements are obtained as the search results.

[0095] Using a pre-defined AI model, combined with retrieved document fragments and scenario parameters, a deep understanding of the testing requirements is achieved. The AI ​​model parses out the core parameters in the testing requirements, such as:

[0096] Scene parameters: map (e.g., Town10HD_Opt.xodr, complex intersection), main vehicle model (e.g., Audi TT), obstacles (e.g., pedestrians crossing).

[0097] Environmental parameters: rain mode, solar altitude angle, cumulus cloud cover, road surface moisture content, and road surface friction coefficient.

[0098] Indicator parameters: obstacle avoidance success rate ≥95%, collision time (TTC) ≥2s.

[0099] Based on the analysis results, the AI ​​model generates three types of test case logic:

[0100] Functional test cases: cover normal obstacle avoidance and abnormal obstacle avoidance scenarios (such as the main vehicle successfully avoiding obstacles, the main vehicle failing to avoid obstacles, etc.).

[0101] Performance test cases: Verify concurrent processing capabilities and obstacle avoidance performance under extreme conditions in rainy weather scenarios.

[0102] Security test cases: covering edge scenarios (such as obstacle avoidance safety under extreme weather conditions).

[0103] The effect of this step is:

[0104] To improve testing efficiency, natural language processing technology and similarity retrieval allow testers to quickly obtain information related to testing requirements without having to manually consult large amounts of documentation or code, thus saving a significant amount of time.

[0105] To ensure comprehensive testing, the generated test case logic covers multiple dimensions, including functionality, performance, and security, ensuring thorough testing of the platform. This helps to uncover potential problems and vulnerabilities, improving the platform's quality and reliability.

[0106] To improve testing accuracy, pre-defined AI models can generate test case logic that fits actual needs based on search results and platform characteristics. This reduces test omissions or errors caused by human factors and improves testing accuracy.

[0107] It supports intelligent testing, with the entire process based on automation and intelligent technologies, making the testing process more efficient, accurate, and repeatable. This is of great significance for improving the R&D efficiency and testing quality of autonomous driving cloud simulation platforms.

[0108] Step S104: Retrieve test code templates from the vector database according to the test case logic, and determine the corresponding test code so that the autonomous driving cloud simulation platform can perform tests according to the test code. The test code includes interface test code and UI test code.

[0109] Optionally, in this embodiment, this step retrieves a suitable test code template from the vector database based on the determined test case logic and generates specific test code.

[0110] Optionally, in this embodiment, based on the test case logic determined in step S103, the system will retrieve matching test code templates from the code vector set in the vector database. These templates cover various common test scenarios and functionalities. The retrieval process will comprehensively consider the type of test case (such as functional testing, performance testing, and security testing), the functional modules involved, and the specific testing requirements to ensure that the retrieved test code templates are highly relevant to the test case logic.

[0111] After retrieving the test code template, the system will make necessary adjustments and optimizations to the template based on the specific parameters and configurations of the current testing requirements in order to generate test code that meets the requirements.

[0112] The generated test code includes API test code and UI test code. The API test code is used to verify the functionality and performance of the platform's API interfaces, while the UI test code is used to simulate user operations on the web interface, verifying the interface's interaction logic and display effects.

[0113] The generated test code will be deployed to the autonomous driving cloud simulation platform, where the platform will automatically execute the test tasks. During execution, the test code will verify each function of the platform one by one according to the predetermined test case logic, and record the test results and related information.

[0114] This step, by retrieving and reusing test code templates, eliminates the need for testers to write test code from scratch, significantly saving writing time and improving efficiency. Furthermore, the test code templates are meticulously designed and validated; reusing these templates ensures high-quality and reliable generated test code, reducing the risk of test failures due to coding errors. By retrieving test code templates and generating specific test code, this method provides an efficient and high-quality solution for testing autonomous driving cloud simulation platforms, helping to improve testing efficiency, ensure test quality, and provide a solid guarantee for the platform's continuous iteration and optimization.

[0115] This example demonstrates how this embodiment combines AI large model and RAG technology. The AI ​​large model is responsible for deeply understanding user needs and developing requirement documents, while RAG technology retrieves relevant content from multi-source knowledge to assist the large model. The two work together to improve the intelligence of testing.

[0116] As described above, the autonomous driving cloud simulation platform testing method provided in this application can acquire multi-source data from the autonomous driving cloud simulation platform, classify and structurally extract corresponding knowledge fragments from the multi-source data and store them in a knowledge source database. Based on the knowledge fragment type, different language models are used to vectorize the knowledge fragments to obtain document vector sets, code vector sets, and scene parameter vector sets. The method receives test requirements described in natural language and quantizes them. Based on a retrieval enhancement generation algorithm, vector retrieval is performed in the document vector set and scene parameter vector set. The retrieval results are input into an artificial intelligence model to understand the test scenario requirements, resulting in test case logic output by the model. Based on this test case logic, test code templates are retrieved from the code vector set, and input parameters are injected into the test code templates to obtain test code for testing. This improves the efficiency and accuracy of autonomous driving cloud simulation platform testing.

[0117] In one embodiment of the autonomous driving cloud simulation platform testing method of this application, it may further include the following:

[0118] Step S201: Divide the product document into modules according to functional modules using natural language processing technology, perform semantic unit segmentation on the text of each module, and extract independent segments containing functional descriptions and parameter rules;

[0119] Step S202: Extract key entities from the functional description and label the relationships between entities based on dependency parsing and named entity recognition technology to obtain text knowledge fragments, and attach metadata tags to the text knowledge fragments for retrieval optimization.

[0120] Optionally, in this embodiment, this step describes the product document preprocessing process.

[0121] First, the product documentation is divided into modules. Natural Language Processing (NLP) techniques are used to perform in-depth analysis, identifying the different functional modules described within the documentation. Through methods such as keyword matching and sentence structure analysis, the document content is divided according to functional modules, such as user management, scenario management, and task management.

[0122] Next, semantic unit segmentation is performed, dividing the text of each functional module into fine-grained semantic units. A semantic unit is the smallest unit in a document that describes a specific function or parameter. Through techniques such as sentence segmentation and phrase recognition, long paragraphs of text are broken down into independent segments containing functional descriptions and parameter rules. These segments possess complete semantic information, facilitating subsequent processing.

[0123] Next, based on dependency parsing technology, the sentence structure in the functional description is analyzed to identify key components such as subject, predicate, and object. Named Entity Recognition (NER) technology is then used to extract entities with specific meanings from the functional description, such as users, scenarios, and tasks. After extracting key entities, the relationships between these entities are further analyzed, such as the association between users and scenarios, and the dependency between tasks and metrics. Relationship annotation makes the connections between entities explicit, forming textual knowledge fragments with rich semantic information.

[0124] To optimize subsequent retrieval efficiency, metadata tags are attached to text knowledge fragments. These tags include functional module names, entity types, and relationship types. The introduction of metadata tags enables faster location of relevant fragments when retrieving related knowledge in the vector database, improving retrieval accuracy and efficiency.

[0125] Through step S202, this embodiment forms text knowledge fragments with rich semantic information and structured features. Through refined document preprocessing methods, it lays a solid foundation for intelligent testing of the autonomous driving cloud simulation platform.

[0126] In one embodiment of the autonomous driving cloud simulation platform testing method of this application, it may further include the following:

[0127] Step S301: Perform interface definition parsing, business logic extraction, configuration parameter parsing, and data structure parsing operations on the backend code to determine the corresponding backend code knowledge fragments. The backend code knowledge fragments are used to support the understanding of business logic when generating test cases.

[0128] Step S302: Perform API interface extraction, state management parsing, and environment configuration parsing operations on the front-end code to determine the corresponding front-end code knowledge fragments;

[0129] Step S303: Perform class and attribute parsing operations, method and business logic extraction operations, ProtoBuf definition parsing operations, and map data parsing operations on the simulation engine code to determine the corresponding simulation code knowledge fragments. The simulation code knowledge fragments are used to support the scene parameters when generating test cases.

[0130] Step S304: Perform framework configuration parsing, authentication logic extraction, and test case parsing operations on the automated test code to determine the corresponding automated test code knowledge fragments. These automated test code knowledge fragments are used to support the reuse of the test framework when generating test cases.

[0131] Optionally, in this embodiment, this step describes the codebase preprocessing process.

[0132] For the preprocessing of code libraries for autonomous driving cloud simulation platforms, it is necessary to combine the syntactic characteristics and business logic of code types (backend, frontend, simulation engine, automated test code, etc.) and use a four-step process of "structured parsing → key information extraction → redundancy removal → standardization" to convert unstructured code into vectorizable knowledge fragments.

[0133] Optionally, in this embodiment, the backend code is preprocessed.

[0134] Backend code is the core carrier of platform business logic, including service definition, dependency injection, configuration parameters and data model. Preprocessing needs to focus on the relationship between "interface definition - business logic - data storage".

[0135] (1) proto file (interface definition and data serialization)

[0136] Processing objects: such as usecase / v1 / usecase.proto, which defines services (Usecase) and methods for creating, deleting, and exporting use cases.

[0137] Preprocessing steps:

[0138] Use the protoc tool (Protocol Buffers compiler) to parse the proto file and extract the service name (e.g., Usecase), the list of methods (e.g., CreateUsecase, DeleteUsecase), and the parameter / return value types (e.g., CreateUsecaseRequest contains fields such as name and map_id).

[0139] Associated data models: Parse message definitions (such as UsecaseInfo), extract fields and their business meanings (such as associating the sim_mode field with "UE / 3DGS simulation mode"), and establish a "method-data model" mapping (such as CreateUsecase depending on UsecaseInfo).

[0140] This step ensures a comprehensive understanding of the backend API interfaces, providing a foundation for generating test cases for these interfaces.

[0141] (2) Go code (business logic and dependency injection)

[0142] Processing objects: such as internal / service / service.go, based on the Kratos framework, use wire to implement dependency injection for services such as users, maps, and metrics.

[0143] Preprocessing steps:

[0144] AST syntax tree parsing:

[0145] The Go language's built-in go / parser library is used to generate an abstract syntax tree (AST), locate the wire.Build function call, and extract the list of services for dependency injection (such as UserService, MapService, ScenarioService) and their relationships (such as UsecaseService depending on MapService to obtain map data).

[0146] Business logic extraction:

[0147] Traverse the function body (such as the CreateUsecase method) and extract the core logic:

[0148] Parameter validation (such as name length limit, map_id validity check);

[0149] Database operations (such as calling repo.Insert to write test case data);

[0150] Exception handling (e.g., returning an error when "test case already exists").

[0151] By understanding the business logic, we can more accurately simulate real-world business scenarios and generate test cases that closely resemble actual usage.

[0152] (3) Configuration file (e.g., conf / wsi_changan.yaml)

[0153] Target objects: Includes configurations for databases, Redis, OSS, JWT, etc., and associated platform deployment and runtime environments.

[0154] Preprocessing steps:

[0155] Key-value pair structuring: Use a YAML parsing library (such as gopkg.in / yaml.v3) to read the configuration, split it by module (database, cache, storage, authentication), and extract key parameters and business meanings.

[0156] These configuration parameters are crucial for setting up the test environment and executing test cases, ensuring consistency between the test environment and the production environment.

[0157] (4) SQL script (e.g., deploy / sql / task_plan.sql)

[0158] Processing objects: Define the table structure of task plans, use case directories, etc., and associate them with business entities (such as simulation tasks and use cases).

[0159] Preprocessing steps:

[0160] Table structure and business field extraction: Use an SQL parser (such as libpg_query) to parse the script and extract the table name (task_plan), field list, and business meaning.

[0161] Understanding data structures helps in generating test cases involving data operations, such as adding, deleting, modifying, and querying data, and verifying data consistency.

[0162] Optionally, in this embodiment, the front-end code is preprocessed.

[0163] The front-end code focuses on user interaction and API communication. Preprocessing requires extracting the mapping relationship between "page function - API call - state management" to support the generation of UI automated test code.

[0164] (1) Service layer code (such as services / organize.ts, user.ts)

[0165] Processing objects: Using umi's request library to interact with the backend API, including logic such as organization management and user authentication.

[0166] Preprocessing steps:

[0167] API Interface Extraction: Parse function definitions to extract request methods (GET / POST), URL paths, parameters, and response processing.

[0168] This helps generate test cases for backend API calls made by the frontend, verifying the interaction logic between the frontend and the backend.

[0169] (2) State management code (such as useState, useRef calls)

[0170] Processing objects: Handling interactive logic such as pagination, filtering, and sorting (e.g., pagination loading of a use case list).

[0171] Preprocessing steps:

[0172] Extracting state variables and interaction logic: Locate the useState initialization (e.g., const[page, setPage] = useState(1)), associate it with the event that triggers the update (e.g., onPageChange callback), and generate a "state-operation-API" mapping.

[0173] Understanding state management is crucial for generating test cases that involve changes in the state of the front-end page, such as testing scenarios like page loading and data updates.

[0174] (3) Configuration files (such as config / env.ts, Dockerfile)

[0175] Target objects: Differentiate between development / production environments, configure API gateway addresses, etc.

[0176] Preprocessing steps:

[0177] Environment parameter extraction: Parse environment variables (such as REACT_APP_API_URL) and deployment parameters (such as Docker image version).

[0178] Understanding environment configuration ensures that test cases can be executed in the correct environment, avoiding test failures caused by environmental differences.

[0179] Optionally, in this embodiment, the simulation engine code is preprocessed.

[0180] (1) Python integrated script preprocessing (e.g., carla_ue_bridge_main.py)

[0181] The complete logic of "bridging initialization - synchronization control - actor management - sensor data processing" needs to be extracted.

[0182] Class and Core Attribute Analysis

[0183] Objective: To analyze the properties of core classes such as CarlaCyberBridge and clarify the basic configuration of the simulation engine.

[0184] Steps: Use a Python AST parsing library (such as the ast module) to locate the class definition and extract the attributes and default values.

[0185] This step provides a basis for generating test cases involving simulation engine configuration, such as simulation step size and sensor configuration.

[0186] (2) Extraction of methods and business logic

[0187] Objective: To analyze the key methods of the parsing class and extract the core operation flow of the simulation engine (initialization, synchronization, data processing, etc.).

[0188] step:

[0189] For the `initialize` method: extract the CARLA engine initialization process, including server connection, map loading, and simulation parameter settings.

[0190] For synchronous mode processing methods (such as tick): extract step size control and data synchronization logic.

[0191] For actor management methods (such as spawn_actor, destroy_actor): extract the parameters and constraints for actor creation and destruction.

[0192] By understanding the business logic of the simulation engine, test cases that closely resemble real simulation scenarios can be generated to verify the functionality and performance of the simulation engine.

[0193] (3) Preprocessing of ProtoBuf definition files

[0194] The ProtoBuf file defines the data interaction format between the simulation engine and external systems (such as autonomous driving algorithm modules), and it is necessary to extract "message type - field meaning - data flow".

[0195] 1. Message Type and Field Parsing

[0196] Objective: To clarify the structure of core messages such as sensor data and control commands.

[0197] step:

[0198] Use the protoc tool to parse the .proto file and extract the message definitions and field meanings.

[0199] Extract control command messages (such as VehicleControl) to determine the operation commands that the simulation engine can receive.

[0200] This step helps generate test cases involving communication between the simulation engine and external systems, verifying the correctness of data interaction.

[0201] (4) Map data preprocessing

[0202] Map data is the foundation of the simulation scenario, and it is necessary to extract "map structure - static elements - association with CARLA".

[0203] Map Format and Key Element Analysis

[0204] Objective: To identify the static information contained in the map, such as roads and transportation facilities, and to link it to CARLA's map loading logic.

[0205] Steps: Parse map files supported by CARLA (such as .xodr format OpenDRIVE maps) and extract core elements.

[0206] Understanding map data is crucial for generating test cases that involve specific scenarios, such as driving tests at complex intersections and simulation tests under extreme weather conditions.

[0207] Optionally, in this embodiment, automated test code preprocessing is performed.

[0208] A. Interface automation test code preprocessing (Python)

[0209] The interface test code is directly linked to the platform API verification logic. It is necessary to extract "test framework configuration - test case parameters - authentication logic" to support the reuse of automated code generation.

[0210] (1) Configuration files (such as pytest.ini, require-sim.txt)

[0211] Processing objects: Define test framework parameters, dependency libraries, and report configurations.

[0212] Preprocessing steps:

[0213] Framework parameter extraction: Parse the configuration in pytest.ini (such as addopts=--alluredir=reports--reruns2) to extract the report path and number of retries; extract the dependency libraries and versions (pytest==7.4.0, allure-pytest==2.13.2) from require-sim.txt to clarify the test technology stack.

[0214] (2) Utility scripts (such as tools / login_sim.py, common / global_var.py)

[0215] Target objects: Login authentication, global variable definition.

[0216] Preprocessing steps:

[0217] Authentication logic extraction: Parse the get_token method of the Login class to extract the request URL ( / api / auth / login), parameters (username, password), and token storage logic (e.g., storing in global_var).

[0218] (3) Test cases (e.g., test_case / usecase / test_create.py)

[0219] Target audience: API functions for verifying test case creation and deletion.

[0220] Preprocessing steps:

[0221] Test case parameter and assertion extraction: Parse pytest test functions to extract preconditions (such as obtaining the token from the login fixture), input parameters, and assertion logic.

[0222] B. UI Automated Test Code Preprocessing (Python)

[0223] UI test code is based on the Page Object Model (POM) and needs to extract "page elements - operation methods - test steps" to support automated UI code generation.

[0224] (1) Page objects (such as the SimPage class in simulation_page.py)

[0225] Processing objects: Includes methods for login, navigation, scene operations, etc.

[0226] Preprocessing steps:

[0227] Element location and operation extraction: Parsing methods extract element locators (e.g., #login-button), operation types (click, input), and business meanings.

[0228] (2) Test cases (e.g., test_case / test_simulation.py)

[0229] Processing object: Calling the page object to execute test steps (such as creating a simulation scenario).

[0230] Preprocessing steps:

[0231] Test process extraction: Parse test case functions to extract the step sequence, dependent page object methods, and expected results.

[0232] Optionally, in this embodiment, the preprocessed code knowledge fragments will be stored in the codes set of the vector database according to their type, providing a basis for accurate retrieval of RAG technology, wherein:

[0233] Backend code snippets support "business logic understanding" (such as retrieving the parameter validation rules of CreateUsecase when generating test code for the test case creation interface);

[0234] The simulation engine code snippets support "scene parameter generation" (e.g., when generating CARLA simulation test cases, refer to the sensor configuration of CarlaCyberBridge);

[0235] Automated test code snippets support "test framework reuse" (such as reusing the SimPage login method when generating new UI test cases).

[0236] Through structured extraction, the "technical details-business implications" of the codebase are made explicit, providing knowledge support for generating test plans that fit the characteristics of the platform for large AI models.

[0237] Understandably, by deeply analyzing the backend code, frontend code, simulation engine code, and automated test code, the generated test cases can more accurately simulate real business scenarios and simulation environments, improving test coverage and accuracy.

[0238] Through step S304, this embodiment lays a solid foundation for the generation of test cases for the autonomous driving cloud simulation platform through refined code preprocessing methods, which helps to improve the quality, efficiency and maintainability of testing.

[0239] In one embodiment of the autonomous driving cloud simulation platform testing method of this application, it may further include the following:

[0240] Step S401: For the text knowledge fragment, use the pre-trained Sentence-BERT model to perform semantic vectorization to determine the corresponding document vector set;

[0241] Step S402: For the code knowledge fragment, use a pre-trained CodeBERT model to perform joint syntactic and semantic vectorization to determine the corresponding code vector set;

[0242] Step S403: For knowledge fragments containing scene parameters, perform structure vectorization based on a custom feature extraction model to determine the corresponding scene parameter vector set;

[0243] Step S404: Unify the dimensions of the document vector set, the code vector set, and the scene parameter vector set to 768 dimensions, and verify the consistency of similar segment vectors through cosine similarity to determine the corresponding vector database.

[0244] Optionally, in this embodiment, this step describes the process of constructing a vector database.

[0245] The knowledge source database after the above preprocessing includes text knowledge fragments and code knowledge fragments.

[0246] We first chose Sentence-BERT, an advanced natural language processing model, to semantically vectorize text knowledge fragments. The Sentence-BERT model captures the semantic information of text, converting it into high-dimensional vectors. Through processing by the Sentence-BERT model, each text knowledge fragment is transformed into a corresponding vector, and these vectors together constitute the document vector set `docs`.

[0247] Then, for each code knowledge fragment, the CodeBERT model is selected for joint vectorization of syntax and semantics. The CodeBERT model is specifically designed for code and can simultaneously understand the syntactic structure and semantic information of the code. Through the processing of the CodeBERT model, each code knowledge fragment is transformed into a vector containing syntactic and semantic information; these vectors constitute the code vector set `codes`.

[0248] Finally, to facilitate subsequent models' understanding of scenario requirements based on scenario parameters, we further extracted scenario parameter fragments from the knowledge source database. Since scenario parameters possess specific structural features, a custom feature extraction model was used for structure vectorization. This model, designed according to the characteristics of scenario parameters, accurately captures their structural information. Through processing by the custom feature extraction model, each scenario parameter knowledge fragment is converted into a structured vector, and these vectors constitute the scenario parameter vector set `cases`.

[0249] The document vector set, code vector set, and scene parameter vector set were unified to 768 dimensions to ensure comparability between vectors. Cosine similarity was calculated between vectors of the same type to verify vector consistency. Cosine similarity is a commonly used method for measuring the similarity between vectors; a value closer to 1 indicates greater similarity. After dimension unification and similarity verification, the various vector sets were integrated to construct a vector database. This database provides an efficient and accurate retrieval foundation for subsequent Retrieval Augmentation (RAG) technology.

[0250] Vectorized knowledge fragments make the retrieval process more efficient. Through vector databases, documents, code, and scenario parameters related to testing requirements can be retrieved quickly, significantly reducing retrieval time. Because vectors contain rich semantic and syntactic information, the retrieval results are more accurate. This helps large AI models understand testing requirements more accurately and generate more realistic test cases and test code.

[0251] Through step S404, this embodiment successfully constructed a vector database, providing solid support for RAG technology and enabling large AI models to generate high-quality test content by combining external knowledge sources. This not only improves testing efficiency but also enhances test quality and coverage.

[0252] In one embodiment of the autonomous driving cloud simulation platform testing method of this application, it may further include the following:

[0253] Step S501: Pre-filter the vector database based on the metadata tags of the test requirement vectors to determine the vector subset after pre-filtering;

[0254] Step S502: Calculate the cosine similarity between the vector subset and the document vector set and the scene parameter vector set, and return the Top-K similar segments as the retrieval results. The retrieval results are used to understand the scene requirements.

[0255] Optionally, in this embodiment, this step is a process of searching using a vector database.

[0256] Understandably, when a user issues a testing request, we first need to enable the large model to understand the user's needs. Therefore, this search does not involve the code vector set in the vector database. Instead, it achieves the large model's understanding of the scenario requirements by searching the text vector set and the scene parameter vector set.

[0257] Specifically, firstly, test requirement vectors typically contain a series of metadata tags describing the test requirements, such as test modules, test types, and scenario parameters. These metadata tags are used to initially filter the vector database, eliminating vectors that are irrelevant or only marginally relevant to the test requirements, thus determining a pre-filtered subset of vectors. This step significantly reduces the amount of data required for subsequent similarity calculations, improving retrieval efficiency.

[0258] Next, in the pre-filtered vector subset, the cosine similarity between each vector and the document vector set and the scene parameter vector set is calculated. Cosine similarity is an effective method for measuring the similarity between vectors, with values ​​ranging from -1 to 1; the closer the value is to 1, the more similar the vectors are. Based on the cosine similarity calculation results, the K segments with the highest similarity are selected as the search results. These search results are directly related to the testing requirements and provide key information for understanding the scene requirements. Specifically, when calculating the final weights, the dynamic weights of the vector machine in the vector database are adjusted, with 60% weight for the cases scene set and 40% weight for the documents text set to determine the search weights.

[0259] For example, when inputting a test case (such as "testing the vehicle's obstacle avoidance function in rainy weather"), the process is as follows:

[0260] Demand vectorization: Converting natural language requirements into 768-dimensional vectors;

[0261] RAG Search: Retrieves "Rainy Day Scene Parameter Configuration" (such as solar altitude angle, cumulus degree, etc.) and "Main Vehicle Obstacle Avoidance Function Description" from the docs set, and retrieves historical scene parameters including "Rainy Day Mode, Road Surface Water Content, Road Surface Friction Coefficient" from the cases set.

[0262] Autonomous driving cloud simulation platforms involve complex and varied scenarios. Through an efficient retrieval mechanism, testers can quickly obtain knowledge and information related to specific scenarios, thereby designing and executing test cases more effectively and improving test coverage and test quality.

[0263] Through step S502, this embodiment provides strong support for intelligent testing of the autonomous driving cloud simulation platform through a refined retrieval strategy.

[0264] In one embodiment of the autonomous driving cloud simulation platform testing method of this application, it may further include the following:

[0265] Step S601: Perform cross-modal semantic matching on the knowledge fragments in the search results according to the preset artificial intelligence model to determine the corresponding semantic association results;

[0266] Step S602: Based on the semantic association result, the test requirements are decomposed into atomic test tasks, and test case logic containing input parameters is generated. The test case logic includes functional test cases, performance test cases, and security test cases.

[0267] Optionally, in this embodiment, this step involves the process of transforming the RAG retrieval into specific test case logic using the AI ​​large model.

[0268] First, a pre-trained artificial intelligence model with cross-modal semantic understanding capabilities is used to process various types of knowledge fragments, including text and scene parameters. The model performs deep semantic analysis on the knowledge fragments in the retrieval results, identifying and matching semantic associations between different modalities. Through semantic matching, the model deeply understands user needs and outputs a series of semantic association results. These results reveal the intrinsic connection between testing requirements and knowledge fragments, providing a foundation for subsequent test case generation.

[0269] Next, based on the semantic association results, the complex testing requirements are broken down into a series of atomic test tasks. Each atomic task corresponds to a specific test point, facilitating independent execution and verification. For each atomic task, test case logic containing input parameters is generated.

[0270] The test case logic details the purpose, steps, expected results, and necessary input parameters of the test. Depending on the testing requirements, the generated test case logic includes functional test cases (verifying whether the function works as expected), performance test cases (evaluating the system's performance under specific conditions), and security test cases (detecting the system's security under abnormal conditions).

[0271] Through step S602, this embodiment provides strong support for intelligent testing of the autonomous driving cloud simulation platform through refined semantic matching and test requirement decomposition.

[0272] In one embodiment of the autonomous driving cloud simulation platform testing method of this application, it may further include the following:

[0273] Step S701: Retrieve test code templates from the code vector set according to the test case logic;

[0274] Step S702: Inject the input parameters extracted from the test case logic into the test code template according to the preset syntax rules, and determine the corresponding test code so that the autonomous driving cloud simulation platform can perform tests according to the test code.

[0275] Optionally, in this embodiment, this step involves the process of converting test case logic into executable test code.

[0276] In the previous steps, the platform's front-end and back-end code, simulation engine code, and past test code have been converted into code vector sets through vectorization. These vector sets are stored in a vector database, supporting efficient retrieval.

[0277] Specifically, backend code snippets support "business logic understanding", simulation engine code snippets support "scenario parameter generation", and automated test code snippets support "test framework reuse".

[0278] Based on the requirements of the current test case logic, a matching test code template is retrieved from the code vector set. The retrieval process is based on the similarity calculation between vectors, which can quickly locate the code snippet that best meets the requirements.

[0279] The platform extracts specific input parameters from the test case logic to execute the tests. It pre-defines a set of syntax rules to guide how to inject these input parameters into the test code templates. These rules ensure that the generated test code conforms to programming language specifications and guarantees the executability of the tests.

[0280] The extracted input parameters are injected into the retrieved test code template according to preset syntax rules to generate complete test code. The generated test code includes the specific test steps, expected results, and assertions for verification.

[0281] Optionally, in this embodiment, code generation includes interface automation test code generation and UI automation test code generation.

[0282] (1) Generation of automated test code for interfaces

[0283] For platform API interfaces (such as scene submission, task query, and metric calculation), generate Python code as follows:

[0284] RAG retrieval: Retrieves test code for similar interfaces from the codes collection, such as when retrieving "submitting a rainy day simulation scenario".

[0285] Code generation: Based on test case parameters, generate simulation code for submitting a rainy day test scenario.

[0286] Code optimization:

[0287] Automatically add parameterized decorators (@pytest.mark.parametrize) to cover multiple scene IDs;

[0288] Based on the knowledge in the docs collection (documents) that "3DGS mode takes a long time", adjust the timeout parameter (timeout=30);

[0289] Integrate Allure tags (@allure.story) for easier report categorization.

[0290] (2) UI automation test code generation

[0291] For platform web interface operations (such as use case set creation, map upload, and metric configuration), generate Playwright code as follows:

[0292] RAG Retrieval: Retrieves UI action examples from the codes collection, such as when retrieving "Create Rainy Day Test Case Set".

[0293] Code generation: Adapts to obstacle avoidance scenarios in rainy weather, generating code that includes element location and assertions.

[0294] Code optimization:

[0295] Based on the rule in the docs collection (documents) that "test case sets must be leaf nodes to add test cases", the #is_leaf checkbox logic is automatically added;

[0296] Add explicit wait (wait_for) to adapt to web page loading delays;

[0297] The `headless=False` parameter is retained for easier manual debugging.

[0298] Understandably, the vector database-based retrieval mechanism can quickly locate suitable test code templates, significantly reducing code writing time. By injecting input parameters through pre-defined syntax rules, the generated test code conforms to programming standards, reducing the possibility of human error and improving test code reliability. Since the test code is template-based, changes in test requirements only require updating the template or adjusting input parameters, reducing test code maintenance costs. By flexibly combining different test code templates and input parameters, test cases covering various complex scenarios can be constructed, ensuring the stable operation of the autonomous driving cloud simulation platform under all conditions.

[0299] Through step S702, this embodiment provides strong support for intelligent testing of the autonomous driving cloud simulation platform through an efficient code template retrieval and parameter injection mechanism.

[0300] To improve the efficiency and accuracy of autonomous driving cloud simulation platform testing, this application provides an embodiment of an autonomous driving cloud simulation platform testing apparatus for implementing all or part of the aforementioned autonomous driving cloud simulation platform testing method. See [link to relevant documentation]. Figure 2 The autonomous driving cloud simulation platform testing device specifically includes the following components:

[0301] The knowledge source database construction module 10 is used to acquire multi-source data from the autonomous driving cloud simulation platform. The multi-source data includes product documents and product code libraries. The product documents are classified according to functional modules, and the functional descriptions and parameter rules of each functional module are extracted. Key entities are extracted from the functional descriptions and the relationships between entities are marked to obtain text knowledge fragments. The product code library is parsed and logically extracted according to code type to determine the corresponding code knowledge fragments. The knowledge source database is constructed based on the text knowledge fragments and the code knowledge fragments.

[0302] The vector database construction module 20 is used to pre-train multiple language models based on knowledge fragment types, and vectorize the knowledge fragments of the knowledge source database according to the pre-trained language models to determine the corresponding vector database. The vector database includes a document vector set, a code vector set, and a scene parameter vector set.

[0303] The test case logic determination module 30 is used to receive test requirements described in natural language and vectorize the test requirements, perform similarity retrieval on the test requirement vectors in the vector database according to the retrieval enhancement generation algorithm, determine the corresponding retrieval results, parse the retrieval results according to the preset artificial intelligence model, and determine the corresponding test case logic, wherein the test case logic includes functional test cases, performance test cases, and security test cases.

[0304] The test code generation module 40 is used to retrieve test code templates from the vector database according to the test case logic and determine the corresponding test code so that the autonomous driving cloud simulation platform can perform tests according to the test code. The test code includes interface test code and UI test code.

[0305] As described above, the autonomous driving cloud simulation platform testing device provided in this application can acquire multi-source data from the autonomous driving cloud simulation platform, classify and structurally extract the multi-source data to obtain corresponding knowledge fragments and store them in a knowledge source database. Based on the knowledge fragment type, different language models are used to vectorize the knowledge fragments to obtain document vector sets, code vector sets, and scene parameter vector sets. The device receives test requirements described in natural language and quantizes them. It then performs vector retrieval in the document vector set and scene parameter vector set using a retrieval enhancement generation algorithm, and inputs the retrieval results into an artificial intelligence model to understand the test scenario requirements, obtaining the test case logic output by the model. Based on this test case logic, it retrieves test code templates from the code vector set and injects the input parameters into the test code templates to obtain test code for testing. This improves the efficiency and accuracy of autonomous driving cloud simulation platform testing.

[0306] To further illustrate this solution, this application also provides a specific application example of using the aforementioned autonomous driving cloud simulation platform testing device to implement the autonomous driving cloud simulation platform testing method, which specifically includes the following:

[0307] Functional modules:

[0308] 1. Use Case Understanding

[0309] This module receives uploaded interface test cases as input. With the assistance of RAG technology, the AI ​​big data model performs a detailed analysis of the interface test case documents. RAG technology retrieves information related to the test case from numerous knowledge sources, providing rich background knowledge for the AI ​​big data model's understanding. Through sentence-by-sentence parsing, semantic unit extraction, and contextual analysis, the AI ​​big data model deeply understands the requirements of the interface test cases, extracts key information such as the interface's input and output parameters, expected functions, and performance metrics, and outputs the interface / UI automation code generation logic accordingly.

[0310] For example, if the interface test case is for the scene creation interface of the scene management module in the autonomous driving cloud simulation platform, the AI ​​big model analyzes and obtains relevant code logic and experience of similar test cases from knowledge sources. It then extracts the parameter information required by the interface to create different types of scenes, such as scene type, road parameters, weather conditions, and other key information. Finally, it outputs the logic of how to generate automated code based on this information to ensure that the functionality of the interface is fully tested.

[0311] If users find errors in the generated code, they can correct them and return the correction information to the AI ​​model. The AI ​​model will record and save this information to further optimize its understanding of similar test cases and continuously improve the accuracy of its analysis.

[0312] 2. Generate automated test code for APIs

[0313] The AI ​​large-scale model and RAG technology have been integrated with a pre-written interface automation test code library. Based on the functional test case information generated by the test case understanding module, code snippets with similar functionality are retrieved from the code library for reference. In conjunction with new testing requirements, the syntax rules and structure of the pytest framework are used to generate new interface automation test case code.

[0314] Taking the user login interface of the user management module of the autonomous driving cloud simulation platform as an example, the request method of this interface is first determined to be POST, and the request parameters include username and password. The request is sent using the requests library, and the assertion function of pytest is used to verify whether the data format returned by the interface is JSON, and whether the returned user information (such as user ID, user permissions, etc.) matches expectations. The generated code is organized and integrated according to the pytest framework specifications to ensure a clear structure and ease of maintenance.

[0315] Simultaneously, configure the relevant parameters of the Allure tool to enable it to collect detailed information during test execution, such as test case execution time, status, and error messages. During integration, seamlessly integrate the newly generated code with the existing codebase to ensure the integrity and consistency of the entire interface automation test codebase, facilitating the subsequent implementation of test report generation functionality.

[0316] 3. Execution of API automated test code

[0317] The generated automated interface test code is executed. The pytest framework runs test cases in a predetermined order and provides real-time feedback on the execution status. After the test execution is complete, the execution results and an Allure report are output. The report presents the overall interface test status with intuitive charts and detailed text descriptions, including key metrics such as the number of passed and failed test cases, average response time, and error type distribution.

[0318] When an error occurs during execution, the user intervenes. The platform's integrated AI model analyzes the error message, combining it with code logic and relevant content from knowledge sources, to determine the cause of the error. For example, if a user login interface test displays an error message "Username or password incorrect," even though the actual input is correct, the AI ​​model might analyze the data and discover that a change in the storage format of user information in the database caused the verification failure. It will then automatically attempt to modify the verification logic in the code. If the user is not satisfied with the automatically modified code, they can manually correct the errors and return the corrected code to the platform's integrated AI model for recording and saving, further refining the codebase and error handling logic.

[0319] 4. UI automated test code generation

[0320] AI large-scale models and RAG technology can query and write to existing UI automation test code libraries. Based on the generated functional UI test cases, code examples of similar UI operations are searched in the code library. Using the pytest + playwright framework, new UI automation test case code is generated based on page element positioning methods, user interaction behaviors, and expected page responses.

[0321] For example, for actions such as button clicks, text input, and dropdown menu selections on a webpage, code is written using the playwright library to simulate these actions, and the pytest framework is used for test case organization and management. During code generation, readability and maintainability are emphasized, and code is written according to standard programming styles.

[0322] Similarly, configure Allure tool parameters to collect detailed information during the testing process, such as page screenshots, operation step records, and element state changes. During integration, integrate the newly generated UI automation test code with the existing codebase to ensure the entire UI automation test codebase can work collaboratively, preparing for the generation of detailed test reports.

[0323] 5. UI automated test code execution

[0324] The generated UI automation test code is executed, with the PlayWright library driving the browser to simulate actual user actions on the page. During execution, page responsiveness is monitored in real time, and the results of each operation step are recorded. Upon completion, the execution results and an Allure report are output. The report visually demonstrates the UI testing process and final results through page screenshots, video clips of the operations, and detailed text descriptions.

[0325] When an error occurs during execution, the user intervenes. The AI ​​big data model analyzes the error information, combined with the page element structure, interaction logic, and relevant content from knowledge sources, to determine the cause of the error and automatically attempts to modify the erroneous code, such as adjusting element positioning methods or correcting the operation order. The user can check and correct the automatically modified code, and then feed the corrected code back to the AI ​​big data model integrated into the platform for recording and saving, continuously optimizing the UI automated testing code library and error handling mechanism.

[0326] Optionally, in this embodiment, after code generation, test execution and error handling steps are also included.

[0327] (1) Test execution process

[0328] Test case scheduling: The Pytest framework executes code in order of module dependencies (e.g., execute the "Resource Management" test first, then execute the "Simulation Scheduling" test), and supports multi-threaded concurrency (default number of threads = number of CPU cores).

[0329] Data collection: Allure tools record test data in real time, including:

[0330] Execution status (passed / failed / skipped);

[0331] Key metrics (such as "average loading time for simulation scene playback = 8s");

[0332] Error screenshots (when UI tests fail) and API response logs (when API tests fail).

[0333] (2) Error Analysis and Repair

[0334] When a test fails (e.g., "task status becomes abnormal after submitting the obstacle avoidance scenario in rainy weather"), the handling process is as follows:

[0335] Error information collection: Collect error logs (such as "500 Internal Server Error"), interface responses (such as {"error":"map file corrupted"}), and related code (such as map_loader.py).

[0336] RAG retrieval: Retrieve historical fix cases for "scene loading error" from the codes collection, and retrieve "rainy obstacle avoidance scene format requirements" (such as "must include coordinate system information") from the docs collection.

[0337] (3) AI Diagnosis and Repair

[0338] Diagnosis: Map file missing <coordinatesystem>The tag caused the parsing to fail;

[0339] Automatic repair: Generate map verification code and add format checking logic.

[0340] (4) Human feedback

[0341] If the user confirms the repair result and is not satisfied, they can manually modify it. The modification record is stored in the vector database for optimizing the next repair logic.

[0342] Optionally, this embodiment also includes a closed-loop learning mechanism to continuously optimize system performance based on user feedback, as follows:

[0343] Feedback collection: Users mark requirements that are misunderstood (e.g., "misunderstood 'obstacle avoidance' as 'follow'") and inefficient code (e.g., "historical map validation function not reused").

[0344] Knowledge update: Misunderstanding of requirements: Store the correct parsing results in the docs collection to enhance the model's ability to distinguish terms such as "obstacle avoidance" and "follow".

[0345] Code issue: Store the optimized code snippets in the codes collection to improve the reusability of the next generation.

[0346] Model fine-tuning: For every 100 feedback points accumulated, the AI ​​model is fine-tuned with new data, resulting in a 5%-8% monthly increase in test case coverage.

[0347] Optionally, the beneficial effects of this solution are as follows:

[0348] Reduced Labor Costs: Autonomous driving cloud simulation platforms require a large number of testers to perform functional testing and develop automated test code. This method, with its high degree of automation, significantly reduces manual workload. For example, a medium-sized project might traditionally require 5-7 testers, while this method may only require 1-2 testers for supervision and review, saving approximately 70%-80% in labor costs. Testers can then focus their energy on more creative and analytical work, such as complex problem research and exploratory testing.

[0349] Shorten the testing cycle: Traditional testing involves a lot of manual work, is slow, and has a long testing cycle. This method automates the process to quickly generate test cases and code and execute them automatically, greatly accelerating the testing process. For web-based autonomous driving cloud simulation platforms with frequently updated features, traditional comprehensive testing may take weeks or even months, while this method can shorten it to days or even less than a week, allowing products to be launched to market faster and improving the company's market responsiveness and competitiveness.

[0350] Precise Defect Location: During testing, the platform meticulously records test case execution and error messages. When a test case fails, it quickly and accurately analyzes the cause of the error and pinpoints the defect by combining various knowledge sources. For example, by analyzing interface test error messages and code logic, developers can directly locate the erroneous function and code segment. Compared to traditional testing methods, defect location time can be reduced by approximately 50%-60%, improving development and testing collaboration efficiency, accelerating problem fixing, and helping products quickly reach high-quality standards.

[0351] In this embodiment, the AI ​​big model is responsible for deeply understanding various textual information, such as development requirement documents; RAG technology retrieves relevant content from multi-source knowledge (including development requirement documents, product manuals, front-end and back-end code libraries of test objects, past test cases, and interface and UI automation test code libraries) to assist the big model. The two work together to improve the intelligence of testing, which is a key technology combination to realize the core functions of the platform.

[0352] Meanwhile, the company's web-based autonomous driving cloud simulation platform incorporates a wide range of resources as knowledge support. These include not only common development requirement documents and code repositories, but also past test cases and API and UI automation test code repositories. These rich knowledge sources provide comprehensive and accurate references for requirement understanding, test case generation, code generation and optimization, forming a crucial foundation for the platform to generate high-quality test solutions.

[0353] The platform possesses intelligent learning capabilities. Whether it's user understanding of requirements, test cases, or code corrections, everything is recorded and saved by the platform's integrated AI model. By learning from this feedback, the model continuously optimizes its understanding of requirements, test case generation logic, and error handling capabilities, thereby consistently improving the platform's performance and accuracy.

[0354] From a hardware perspective, in order to improve the efficiency and accuracy of autonomous driving cloud simulation platform testing, this application provides an embodiment of an electronic device for implementing all or part of the autonomous driving cloud simulation platform testing method, wherein the electronic device specifically includes the following:

[0355] The system comprises a processor, memory, a communications interface, and a bus; wherein the processor, memory, and communications interface communicate with each other via the bus; the communications interface is used to realize information transmission between the autonomous driving cloud simulation platform testing method and core business systems, user terminals, and related databases and other related devices; the logic controller can be a desktop computer, tablet computer, or mobile terminal, etc., and this embodiment is not limited to these. In this embodiment, the logic controller can be implemented with reference to the embodiments of the autonomous driving cloud simulation platform testing method in the present embodiment, and the content of the embodiments is incorporated herein, and repeated parts will not be described again.

[0356] It is understood that the user terminal may include smartphones, tablet computers, network set-top boxes, portable computers, desktop computers, personal digital assistants (PDAs), in-vehicle devices, smart wearable devices, etc. Among these, the smart wearable devices may include smart glasses, smartwatches, smart bracelets, etc.

[0357] In practical applications, the testing method of the autonomous driving cloud simulation platform can be partially executed on the electronic device side as described above, or all operations can be completed on the client device. The specific choice depends on the processing power of the client device and the limitations of the user's usage scenario. This application does not impose any limitations on this. If all operations are completed on the client device, the client device may further include a processor.

[0358] The aforementioned client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission. The server may include a server on the task scheduling center side; in other implementation scenarios, it may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a distributed server structure.

[0359] Figure 3 This is a schematic block diagram illustrating the system configuration of the electronic device 9600 according to an embodiment of this application. Figure 3 As shown, the electronic device 9600 may include a central processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It is worth noting that... Figure 3 This is an example; other types of structures can also be used to supplement or replace this structure to achieve telecommunications functions or other functions.

[0360] In one embodiment, the testing method function of the autonomous driving cloud simulation platform can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following controls:

[0361] Step S101: Obtain multi-source data from the autonomous driving cloud simulation platform. The multi-source data includes product documents and product code libraries. Classify the product documents according to functional modules and extract the functional descriptions and parameter rules of each functional module. Extract key entities from the functional descriptions and mark the relationships between entities to obtain text knowledge fragments. Perform syntax parsing and logic extraction on the product code library according to code type to determine the corresponding code knowledge fragments. Construct a knowledge source database based on the text knowledge fragments and the code knowledge fragments.

[0362] Step S102: Pre-train multiple language models based on knowledge fragment types, and vectorize the knowledge fragments of the knowledge source database according to the pre-trained language models to determine the corresponding vector database. The vector database includes a document vector set, a code vector set, and a scene parameter vector set.

[0363] Step S103: After receiving the test requirements described in natural language and vectorizing the test requirements, perform similarity retrieval on the test requirement vectors in the vector database according to the retrieval enhancement generation algorithm to determine the corresponding retrieval results. Then, parse the retrieval results according to the preset artificial intelligence model to determine the corresponding test case logic. The test case logic includes functional test cases, performance test cases, and security test cases.

[0364] Step S104: Retrieve test code templates from the vector database according to the test case logic, and determine the corresponding test code so that the autonomous driving cloud simulation platform can perform tests according to the test code. The test code includes interface test code and UI test code.

[0365] As described above, the electronic device provided in this application embodiment acquires multi-source data from an autonomous driving cloud simulation platform, classifies and structurally extracts the multi-source data to obtain corresponding knowledge fragments, and stores them in a knowledge source database. Based on the type of knowledge fragment, different language models are used to vectorize the knowledge fragments to obtain document vector sets, code vector sets, and scene parameter vector sets. It receives test requirements described in natural language and quantifies them. Based on a retrieval enhancement generation algorithm, it performs vector retrieval in the document vector set and scene parameter vector set, and inputs the retrieval results into an artificial intelligence model to understand the test scenario requirements, obtaining the test case logic output by the model. Based on this test case logic, it retrieves test code templates from the code vector set and injects the input parameters into the test code templates to obtain test code for testing. This improves the efficiency and accuracy of testing on the autonomous driving cloud simulation platform.

[0366] In another embodiment, the autonomous driving cloud simulation platform testing method can be configured separately from the central processing unit 9100. For example, the autonomous driving cloud simulation platform testing method can be configured as a chip connected to the central processing unit 9100, and the functions of the autonomous driving cloud simulation platform testing method can be realized through the control of the central processing unit.

[0367] like Figure 3 As shown, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily need to include these components. Figure 3 All components shown; in addition, the electronic device 9600 may also include Figure 3 For components not shown, please refer to existing technologies.

[0368] like Figure 3 As shown, the central processing unit 9100, sometimes also referred to as a controller or operating control, may include a microprocessor or other processor device and / or logic device, which receives inputs and controls the operation of various components of the electronic device 9600.

[0369] The memory 9140 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It may store the aforementioned failure-related information, and also store a program for executing that information. The central processing unit 9100 may execute the program stored in the memory 9140 to perform information storage or processing, etc.

[0370] Input unit 9120 provides input to central processing unit 9100. Input unit 9120 may be, for example, a keypad or touch input device. Power supply 9170 provides power to electronic device 9600. Display 9160 displays images and text. Display may be, for example, an LCD display, but is not limited thereto.

[0371] The memory 9140 can be a solid-state memory, such as a read-only memory (ROM), random access memory (RAM), a SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and contains more data; examples of this type of memory are sometimes referred to as EPROMs. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142 for storing application programs and function programs or processes for executing the operation of the electronic device 9600 via the central processing unit 9100.

[0372] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for the electronic device's communication functions and / or for performing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0373] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 is coupled to the central processing unit 9100 to provide input signals and receive output signals, which is the same as in a conventional mobile communication terminal.

[0374] Based on different communication technologies, multiple communication modules 9110 can be configured in the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby realizing typical telecommunications functions. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. Furthermore, the audio processor 9130 is also coupled to a central processing unit 9100, enabling on-device recording via the microphone 9132 and on-device playback of stored sound via the speaker 9131.

[0375] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the autonomous driving cloud simulation platform testing method with a server or client execution subject in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the autonomous driving cloud simulation platform testing method with a server or client execution subject in the above embodiments. For example, when the processor executes the computer program, it implements the following steps:

[0376] Step S101: Obtain multi-source data from the autonomous driving cloud simulation platform. The multi-source data includes product documents and product code libraries. Classify the product documents according to functional modules and extract the functional descriptions and parameter rules of each functional module. Extract key entities from the functional descriptions and mark the relationships between entities to obtain text knowledge fragments. Perform syntax parsing and logic extraction on the product code library according to code type to determine the corresponding code knowledge fragments. Construct a knowledge source database based on the text knowledge fragments and the code knowledge fragments.

[0377] Step S102: Pre-train multiple language models based on knowledge fragment types, and vectorize the knowledge fragments of the knowledge source database according to the pre-trained language models to determine the corresponding vector database. The vector database includes a document vector set, a code vector set, and a scene parameter vector set.

[0378] Step S103: After receiving the test requirements described in natural language and vectorizing the test requirements, perform similarity retrieval on the test requirement vectors in the vector database according to the retrieval enhancement generation algorithm to determine the corresponding retrieval results. Then, parse the retrieval results according to the preset artificial intelligence model to determine the corresponding test case logic. The test case logic includes functional test cases, performance test cases, and security test cases.

[0379] Step S104: Retrieve test code templates from the vector database according to the test case logic, and determine the corresponding test code so that the autonomous driving cloud simulation platform can perform tests according to the test code. The test code includes interface test code and UI test code.

[0380] As described above, the computer-readable storage medium provided in this application embodiment acquires multi-source data from an autonomous driving cloud simulation platform, classifies and structurally extracts the multi-source data to obtain corresponding knowledge fragments, and stores them in a knowledge source database. Based on the type of knowledge fragment, different language models are used to vectorize the knowledge fragments to obtain document vector sets, code vector sets, and scene parameter vector sets. The medium receives test requirements described in natural language and quantizes them. Based on a retrieval enhancement generation algorithm, vector retrieval is performed in the document vector set and scene parameter vector set. The retrieval results are input into an artificial intelligence model to understand the test scenario requirements, resulting in test case logic output by the model. Based on this test case logic, test code templates are retrieved from the code vector set, and input parameters are injected into the test code templates to obtain test code for testing. This improves the efficiency and accuracy of testing on the autonomous driving cloud simulation platform.

[0381] Embodiments of this application also provide a computer program product capable of implementing all steps of the autonomous driving cloud simulation platform testing method with the execution subject being a server or client in the above embodiments. When this computer program / instruction is executed by a processor, it implements the steps of the autonomous driving cloud simulation platform testing method. For example, the computer program / instruction implements the following steps:

[0382] Step S101: Obtain multi-source data from the autonomous driving cloud simulation platform. The multi-source data includes product documents and product code libraries. Classify the product documents according to functional modules and extract the functional descriptions and parameter rules of each functional module. Extract key entities from the functional descriptions and mark the relationships between entities to obtain text knowledge fragments. Perform syntax parsing and logic extraction on the product code library according to code type to determine the corresponding code knowledge fragments. Construct a knowledge source database based on the text knowledge fragments and the code knowledge fragments.

[0383] Step S102: Pre-train multiple language models based on knowledge fragment types, and vectorize the knowledge fragments of the knowledge source database according to the pre-trained language models to determine the corresponding vector database. The vector database includes a document vector set, a code vector set, and a scene parameter vector set.

[0384] Step S103: After receiving the test requirements described in natural language and vectorizing the test requirements, perform similarity retrieval on the test requirement vectors in the vector database according to the retrieval enhancement generation algorithm to determine the corresponding retrieval results. Then, parse the retrieval results according to the preset artificial intelligence model to determine the corresponding test case logic. The test case logic includes functional test cases, performance test cases, and security test cases.

[0385] Step S104: Retrieve test code templates from the vector database according to the test case logic, and determine the corresponding test code so that the autonomous driving cloud simulation platform can perform tests according to the test code. The test code includes interface test code and UI test code.

[0386] As described above, the computer program product provided in this application acquires multi-source data from an autonomous driving cloud simulation platform, classifies and structurally extracts the multi-source data to obtain corresponding knowledge fragments, and stores them in a knowledge source database. Based on the type of knowledge fragment, different language models are used to vectorize the knowledge fragments to obtain document vector sets, code vector sets, and scene parameter vector sets. The product receives test requirements described in natural language and quantifies them. It then performs vector retrieval in the document vector set and scene parameter vector set using a retrieval enhancement generation algorithm, and inputs the retrieval results into an artificial intelligence model to understand the test scenario requirements, obtaining test case logic output by the model. Based on this test case logic, a test code template is retrieved from the code vector set, and the input parameters are injected into the test code template to obtain test code for testing. This improves the efficiency and accuracy of testing on the autonomous driving cloud simulation platform.

[0387] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0388] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0389] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0390] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0391] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.< / coordinatesystem>

Claims

1. An automatic driving cloud simulation platform test method, characterized in that, The method includes: Acquire multi-source data from an autonomous driving cloud simulation platform, including product documents and product code libraries. Classify the product documents by functional modules and extract the functional descriptions and parameter rules for each functional module. Extract key entities from the functional descriptions and label the relationships between entities to obtain text knowledge fragments. Perform syntax parsing and logic extraction on the product code library according to code type to determine the corresponding code knowledge fragments. Construct a knowledge source database based on the text knowledge fragments and the code knowledge fragments. Multiple language models are pre-trained based on knowledge fragment types, and the knowledge fragments of the knowledge source database are vectorized according to the pre-trained language models to determine the corresponding vector database. The vector database includes a document vector set, a code vector set, and a scene parameter vector set. After receiving test requirements described in natural language and vectorizing them, the system performs a similarity search on the test requirement vectors in the vector database according to the retrieval enhancement generation algorithm to determine the corresponding search results. The system then parses the search results according to a preset artificial intelligence model to determine the corresponding test case logic, wherein the test case logic includes functional test cases, performance test cases, and security test cases. According to the test case logic, test code templates are retrieved from the vector database to determine the corresponding test code, so that the autonomous driving cloud simulation platform can perform tests based on the test code. The test code includes interface test code and UI test code.

2. The autonomous driving cloud simulation platform testing method of claim 1, wherein, The product documents are categorized by functional modules, and the functional descriptions and parameter rules of each module are extracted. Key entities are extracted from the functional descriptions, and the relationships between entities are labeled to obtain text knowledge fragments, including: The product document is divided into modules according to functional modules using natural language processing technology. Semantic unit segmentation is performed on the text of each module to extract independent segments containing functional descriptions and parameter rules. Based on dependency parsing and named entity recognition technology, key entities are extracted from the functional description and the relationships between entities are labeled to obtain text knowledge fragments. Metadata tags are added to the text knowledge fragments for retrieval optimization.

3. The autonomous driving cloud simulation platform testing method of claim 1, wherein, The step of performing syntax parsing and logic extraction on the product code library according to code type to determine the corresponding code knowledge fragments includes: The backend code is parsed by interface definition, business logic extraction, configuration parameter parsing and data structure parsing to determine the corresponding backend code knowledge fragments. These backend code knowledge fragments are used to support the understanding of business logic when generating test cases. Perform API interface extraction, state management parsing, and environment configuration parsing operations on the front-end code to determine the corresponding front-end code knowledge fragments; The simulation engine code is subjected to class and attribute parsing operations, method and business logic extraction operations, ProtoBuf definition parsing operations, and map data parsing operations to determine the corresponding simulation code knowledge fragments. These simulation code knowledge fragments are used to support the scenario parameters when generating test cases. The automated test code is subjected to framework configuration parsing, authentication logic extraction, and test case parsing operations to determine the corresponding automated test code knowledge fragments. These automated test code knowledge fragments are used to support the reuse of the test framework when generating test cases.

4. The testing method for the autonomous driving cloud simulation platform according to claim 1, characterized in that, The process involves pre-training multiple language models based on knowledge fragment types, and vectorizing the knowledge fragments from the knowledge source database according to the pre-trained language models to determine the corresponding vector database, including: For the text knowledge fragments, a pre-trained Sentence-BERT model is used to perform semantic vectorization to determine the corresponding document vector set; For the code knowledge fragments, a pre-trained CodeBERT model is used to perform joint syntactic and semantic vectorization to determine the corresponding code vector set; For knowledge fragments containing scene parameters, structural vectorization is performed based on a custom feature extraction model to determine the corresponding scene parameter vector set; The dimensions of the document vector set, the code vector set, and the scene parameter vector set are unified to 768 dimensions, and the consistency of vectors of the same type of fragments is verified by cosine similarity to determine the corresponding vector database.

5. The testing method for the autonomous driving cloud simulation platform according to claim 1, characterized in that, After receiving the test requirements described in natural language and vectorizing them, the test requirements vectors are used to perform a similarity search on the vector database according to the retrieval enhancement generation algorithm to determine the corresponding search results, including: The vector database is pre-filtered based on the metadata tags of the test requirement vectors to determine the vector subset after pre-filtering. Calculate the cosine similarity between the vector subset and the document vector set and the scene parameter vector set, and return the Top-K similar segments as the retrieval results. The retrieval results are used to understand the scene requirements.

6. The testing method for the autonomous driving cloud simulation platform according to claim 1, characterized in that, The step of parsing the search results according to a preset artificial intelligence model to determine the corresponding test case logic includes: Based on a pre-set artificial intelligence model, cross-modal semantic matching is performed on knowledge fragments in the search results to determine the corresponding semantic association results; Based on the semantic association results, the test requirements are decomposed into atomic test tasks, and test case logic containing input parameters is generated. The test case logic includes functional test cases, performance test cases, and security test cases.

7. The testing method for the autonomous driving cloud simulation platform according to claim 1, characterized in that, The step of retrieving test code templates from the vector database according to the test case logic and determining the corresponding test code, so that the autonomous driving cloud simulation platform can perform tests according to the test code, includes: Retrieve test code templates from the code vector set according to the test case logic; The input parameters extracted from the test case logic are injected into the test code template according to preset syntax rules to determine the corresponding test code, so that the autonomous driving cloud simulation platform can perform tests based on the test code.

8. A testing device for an autonomous driving cloud simulation platform, characterized in that, The device includes: The knowledge source database construction module is used to acquire multi-source data from the autonomous driving cloud simulation platform. The multi-source data includes product documents and product code libraries. The product documents are classified according to functional modules, and the functional descriptions and parameter rules of each functional module are extracted. Key entities are extracted from the functional descriptions and the relationships between entities are marked to obtain text knowledge fragments. The product code library is parsed and logically extracted according to code type to determine the corresponding code knowledge fragments. The knowledge source database is constructed based on the text knowledge fragments and the code knowledge fragments. The vector database construction module is used to pre-train multiple language models based on knowledge fragment types, and vectorize the knowledge fragments of the knowledge source database according to the pre-trained language models to determine the corresponding vector database. The vector database includes a document vector set, a code vector set, and a scene parameter vector set. The test case logic determination module is used to receive test requirements described in natural language, vectorize the test requirements, perform similarity retrieval on the test requirement vectors in the vector database according to the retrieval enhancement generation algorithm, determine the corresponding retrieval results, parse the retrieval results according to the preset artificial intelligence model, and determine the corresponding test case logic, wherein the test case logic includes functional test cases, performance test cases, and security test cases. The test code generation module is used to retrieve test code templates from the vector database according to the test case logic, determine the corresponding test code, and enable the autonomous driving cloud simulation platform to perform tests based on the test code. The test code includes interface test code and UI test code.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the autonomous driving cloud simulation platform testing method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the autonomous driving cloud simulation platform testing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Production-test code co-evolution method based on large model thinking chain

    CN118331859A

  • Automatic driving test case generation method based on large model retrieval enhancement technology

    CN120371708A