AI-Based Electric Vehicle Interface Testing Method
Through the AI-based electric vehicle interface testing method, the pre-trained model is used to generate high-quality test programs, which solves the problems of low efficiency and difficult to guarantee the quality of traditional testing technology, and realizes efficient interface testing.
Patent Information
- Application Number
- CN202411610888.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2044-11-12
AI Technical Summary
Traditional electric vehicle interface testing technology requires manual writing of test programs, which are inefficient and heavily rely on engineer experience, making it difficult to ensure code quality.
Using the AI-based electric vehicle interface testing method, the test program is generated by pre-training the AI model, and the initial AI model is trained using the standard test requirement information of the sample interface to generate high-quality test programs.
It improves the efficiency and quality of electric vehicle interface testing, reduces the dependence of manually writing test programs, and ensures the code quality of the test programs.
Smart Images

Figure CN119473898B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of vehicles, and particularly to an AI-based test method for electric vehicle interfaces. Background Art
[0002] In traditional electric vehicle interface test technologies, since the functions, specific interface parameters, and other information corresponding to different interfaces may all be different, engineers often need to write corresponding test programs for each different interface respectively to facilitate testing whether the interface is qualified.
[0003] However, the efficiency of manually writing test programs is low. After changing the relevant information of a certain interface each time, the test program needs to be rewritten, and it highly depends on the experience of engineers, making it difficult to ensure the code quality of the test program. Summary of the Invention
[0004] To solve the above technical problems, an embodiment of this application proposes an AI-based test method for electric vehicle interfaces, which can efficiently generate high-quality test programs to improve the test efficiency and test quality of electric vehicle interface tests.
[0005] An embodiment of this application provides an AI-based test method for electric vehicle interfaces, including:
[0006] Determine the interface information of the interface to be tested in the electric vehicle, the test requirement text information related to the interface to be tested, and a pre-trained AI model configured with interface prompt information, where the type of the interface to be tested is the same as the type of the sample interface, and the interface prompt information includes: multiple standard test requirement features obtained by training an initial AI model respectively using multiple standard test requirement information of the sample interface;
[0007] Input the interface information and the test requirement text information into the pre-trained AI model, so that the pre-trained AI model selects the standard test requirement feature that matches the test requirement text information from the multiple standard test requirement features, and generates and outputs a test program according to the interface information and the selected standard test requirement feature;
[0008] Obtain the test program and send it to a test device to instruct the test device to test the interface to be tested.
[0009] Optionally, the training process of the pre-trained AI model includes:
[0010] Obtain the multiple standard test requirement information and the sample interface information of the sample interface, where the multiple standard test requirement information corresponds one-to-one with the multiple standard test requirement features;
[0011] Extract text features from each standard test requirement information to obtain the standard test requirement features corresponding to each standard test requirement information;
[0012] Input the sample interface information and each standard test requirement feature into a large language model to generate a standard test program corresponding to each standard test requirement feature;
[0013] Train the initial AI model based on the multiple standard test requirement features, their respective corresponding standard test programs, and the sample interface information to obtain the pre-trained AI model.
[0014] Optionally, the training of the initial AI model based on the multiple standard test requirement features, their respective corresponding standard test programs, and the sample interface information to obtain the pre-trained AI model includes:
[0015] Input each standard test requirement feature and the sample interface information into the initial AI model to generate an initial test program corresponding to each standard test requirement feature;
[0016] For each standard test requirement feature, determine the program difference between the corresponding initial test program and the corresponding standard test program;
[0017] Train the initial AI model based on the program differences corresponding to the multiple standard test requirement features to obtain the pre-trained AI model.
[0018] Optionally, the determination of the program difference between the corresponding initial test program and the corresponding standard test program includes:
[0019] Convert the corresponding initial test program into initial test text and convert the corresponding standard test program into standard test text;
[0020] Extract the initial semantic features of the initial test text and extract the standard semantic features of the standard test text;
[0021] Determine the first similarity between the initial semantic features and the standard semantic features to characterize the program difference.
[0022] Optionally, determining the test requirement text information related to the interface to be tested includes:
[0023] Obtain the test instructions of the user, where the test instructions carry test requirement data;
[0024] Based on the set rules and the test requirement data, perform data cleaning processing to obtain standardized test requirement data;
[0025] Convert the specified test requirement data into the test requirement text information.
[0026] Optionally, the test requirement data includes test requirement sub-data corresponding to at least one test requirement respectively. The data cleaning process is performed based on the set rules and the test requirement data to obtain the specified test requirement data, including:
[0027] Extract the corresponding requirement sub-features from each test requirement sub-data, where the requirement sub-features are used to indicate the requirement normativity of the corresponding test requirement data;
[0028] Select the requirement sub-features that meet the set rules from the requirement sub-features corresponding to all the test requirement sub-data, where the set rules indicate the requirement normativity requirements matching the requirement normativity;
[0029] The test requirement sub-data corresponding to all the requirement sub-features that meet the set rules constitutes the specified test requirement data.
[0030] Optionally, the requirement normativity includes at least one of the following: clarity, integrity, testability;
[0031] The requirement normativity requirements include at least one of the following: clarity requirements, integrity requirements, testability requirements.
[0032] Optionally, the requirement sub-features include at least one of the following:
[0033] Term word features and / or context ambiguity features suitable for characterizing the clarity;
[0034] Test input-output features and / or test boundary condition features suitable for characterizing the integrity;
[0035] Test standard index features suitable for characterizing the testability.
[0036] Optionally, the conversion of the specified test requirement data into the test requirement text information includes:
[0037] Convert the specified test requirement data into a specified test requirement text;
[0038] Through natural language processing technology, perform semantic analysis on the specified test requirement text to obtain the test requirement text information.
[0039] Optionally, the selection of the standard test requirement features that match the test requirement text information from the multiple standard test requirement features includes:
[0040] Determine a second similarity between each standard test requirement feature and the test requirement text information;
[0041] Select the selected standard test requirement features from the multiple standard test requirement features according to the second similarity.
[0042] In summary, the embodiments of the present application have at least the following beneficial effects:
[0043] By adopting the embodiments of the present application, by determining the interface information of the interface to be tested in the electric vehicle, the test requirement text information related to the interface to be tested, and the pre-trained AI model configured with interface prompt information, wherein the type of the interface to be tested is the same as the type of the sample interface, and the interface prompt information includes: multiple standard test requirement features obtained by training the initial AI model respectively with multiple standard test requirement information of the sample interface; inputting the interface information and the test requirement text information into the pre-trained AI model, so that the pre-trained AI model selects the standard test requirement features matching the test requirement text information from the multiple standard test requirement features, and generates and outputs a test program according to the interface information and the selected standard test requirement features; obtaining the test program and sending it to the test device to instruct the test device to test the interface to be tested, thereby being able to efficiently generate high-quality test programs by using the pre-trained AI model, so as to improve the test efficiency and test quality of the electric vehicle interface test. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a schematic flowchart of a method for testing an electric vehicle interface based on AI provided by an embodiment of the present application;
[0045] Figure 2 is a schematic structural diagram of a device for testing an electric vehicle interface based on AI provided by an embodiment of the present application;
[0046] Figure 3 is a schematic structural diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0048] In the description of this application, the terms "first", "second", "third", etc. are used only for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second", "third", etc. may explicitly or implicitly include one or more of such features. In the description of this application, unless otherwise stated, "a plurality" means two or more. In the description of this application, the term "comprising" and its variants are open-ended, i.e., "including but not limited to". The term "based on" means "at least partially based on". The term "according to" means "at least partially according to". The term "an embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments".
[0049] In the description of this application, it should be noted that, unless otherwise clearly specified and defined, the terms "installed", "connected", "coupled" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific situations.
[0050] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in this application have the same meanings as those commonly understood by those skilled in the technical field to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific situations.
[0051] The following explains some term concepts related to the embodiments of this application:
[0052] AI (Artificial Intelligence) is a technical science that studies, develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. Among them, an AI model refers to a mathematical model trained through machine learning or other artificial intelligence technologies for performing specific tasks, such as classification, regression, prediction, natural language processing, etc. These models can identify patterns, make decisions, or generate new data through learning a large amount of data.
[0053] See Figure 1 , which shows a schematic flowchart of a method for testing an electric vehicle interface based on AI provided by an embodiment of this application. The method includes steps S101 - S103, specifically as follows:
[0054] S101. Determine the interface information of the interface to be tested in the electric vehicle, the test requirement text information related to the interface to be tested, and the pre-trained AI model configured with interface prompt information, where the type of the interface to be tested is the same as the type of the sample interface, and the interface prompt information includes: multiple standard test requirement features obtained by training the initial AI model with multiple standard test requirement information of the sample interface respectively;
[0055] In one example, the type of the interface to be tested may include at least one of the following:
[0056] SDK (Software Development Kit) protocol: Usually used to standardize and simplify the communication with electric vehicle charging stations, in-vehicle systems and other related devices. The SDK protocol can be used to define the format, method and rules of data exchange to ensure that devices from different manufacturers can be compatible and interoperable with each other. In this embodiment, a test program for the interface to be tested based on the SDK protocol can be generated through the pre-trained AI model to be used for implementing the relevant interface test for the interface to be tested based on the SDK protocol, thereby being able to solve the technical problem of insufficient standardization in testing caused by the fact that the current SDK protocol has not achieved standardization and unification in all application scenarios.
[0057] CAN (Controller Area Network) bus: A standard protocol for in-vehicle communication.
[0058] In one example, the pre-trained AI model can be constructed based on any one of the following:
[0059] BERT (Bidirectional Encoder Representations from Transformers);
[0060] T5, a Transformer-based model suitable for various natural language processing tasks;
[0061] Decision trees and random forests;
[0062] Support vector machines;
[0063] Neural networks;
[0064] Deep learning models;
[0065] Reinforcement learning models.
[0066] In one example, the interface prompt information can be generated through the following steps:
[0067] 1) Data Preparation
[0068] Collect test requirements for sample interfaces: Collect various standard test requirement information from existing test cases. Among them, the standard test requirement information can refer to a series of detailed test requirements formulated to ensure that the functions, performance, security, and other key attributes of the interface or system meet the predetermined standards and specifications during the testing process of each sample interface. The standard test requirement information can include at least one of the following: functional requirements, performance requirements, security requirements, compatibility requirements, usability requirements, maintainability requirements, and standard compliance requirements.
[0069] Label the data: Label the corresponding interface information and test scenarios for each test requirement.
[0070] 2) Model Training
[0071] Preprocess the data: Clean and preprocess the collected test requirements to ensure data quality.
[0072] Train the model: Use the labeled data to train the initial AI model. The training process can include the following processes of transfer learning and data augmentation:
[0073] Transfer learning: Utilize the existing knowledge of the pre-trained model to improve the generalization ability of the model;
[0074] Data augmentation: Increase the diversity of training data by generating new test requirement data.
[0075] 3) Model Evaluation
[0076] Verify the model performance: Use an independent test set to evaluate the performance of the model. Commonly used evaluation metrics include accuracy, recall rate, F1 score, etc.
[0077] Tune the model: Adjust the hyperparameters of the model according to the evaluation results to optimize the model performance.
[0078] 4) Interface Hint Information Generation
[0079] Generate hint information: Use the trained model to generate interface hint information related to the interface to be tested. The hint information can include:
[0080] Test scenarios: Test requirements for the interface in different scenarios;
[0081] Test cases: Specific test steps and expected results;
[0082] Precautions: Precautions that need to be noted during the testing process.
[0083] S102. Input the interface information and the test requirement text information into the pre-trained AI model, so that the pre-trained AI model selects the standard test requirement features that match the test requirement text information from the multiple standard test requirement features, and generates and outputs a test program according to the interface information and the selected standard test requirement features;
[0084] In one example, the selected standard test requirement features may refer to the standard test requirement features with the highest similarity to the test requirement text information.
[0085] In one example, the generating and outputting a test program according to the interface information and the selected standard test requirement features may include:
[0086] The pre-trained AI model modifies at least part of the feature information in the selected standard test requirement features according to the interface information, and generates and outputs a test program according to the modified standard test requirement features and the selected standard test requirement features.
[0087] Further, the generating and outputting a test program according to the modified standard test requirement features and the selected standard test requirement features may include:
[0088] Determine the third similarity between the modified standard test requirement features and the selected standard test requirement features;
[0089] Generate and output a test program based on the third similarity and the selected standard test requirement features.
[0090] S103. Obtain the test program and send it to the test device to instruct the test device to test the interface under test.
[0091] In this embodiment, the initial AI model is trained respectively with a variety of pre-collected standard test requirement information to obtain corresponding a variety of standard test requirement features, and configure them into the pre-trained AI model, so that the pre-trained AI model can select the features that match the test requirement text information from the configured standard test requirement features, and then combine the specific interface information to generate a test program taking into account both efficiency and quality, where it avoids the situation that the test requirement text information input by the user is not standardized enough, resulting in the model being difficult to accurately identify the test requirements.
[0092] In an alternative embodiment, the training process of the pre-trained AI model includes:
[0093] Obtain the variety of standard test requirement information and the sample interface information of the sample interface, where the variety of standard test requirement information corresponds to the variety of standard test requirement features one by one;
[0094] Extract text features from each standard test requirement information to obtain the standard test requirement features corresponding to each standard test requirement information;
[0095] Input the sample interface information and each standard test requirement feature into a large language model to generate a standard test program corresponding to each standard test requirement feature;
[0096] Train the initial AI model based on the multiple standard test requirement features, their respective corresponding standard test programs, and the sample interface information to obtain the pre-trained AI model.
[0097] It should be noted that in this embodiment, the standard test requirement information is usually stored in the form of documents, which may record specific codes and their text annotations, or specific algorithm text descriptions. Therefore, corresponding standard test requirement features can be extracted from the standard test requirement information through text feature extraction processing, so that the model can accurately read the information contained in the standard test requirement features.
[0098] In one example, the large language model can be a model pre-trained with a large amount of data, such as GPT-4 (Generative Pre-trained Transformer 4), etc.
[0099] In an alternative implementation, the training of the initial AI model based on the multiple standard test requirement features, their respective corresponding standard test programs, and the sample interface information to obtain the pre-trained AI model includes:
[0100] Input each standard test requirement feature and the sample interface information into the initial AI model to generate an initial test program corresponding to each standard test requirement feature;
[0101] For each standard test requirement feature, determine the program difference between the corresponding initial test program and the corresponding standard test program;
[0102] Train the initial AI model based on the program differences corresponding to the multiple standard test requirement features to obtain the pre-trained AI model.
[0103] In one example, the program difference can be characterized by the similarity of the two feature vectors, and the similarity can include at least one of the following: cosine similarity, Euclidean distance, Jaccard similarity, Pearson correlation coefficient, Manhattan distance, Hamming distance, etc. Thus, the process of training the initial AI model can adopt a similarity-based model training method. Specifically, the similarity between input data is calculated to generate or classify the output to achieve the effect of model training.
[0104] In an alternative embodiment, determining the program difference between the corresponding initial test program and the corresponding standard test program includes:
[0105] Converting the corresponding initial test program into an initial test text, and converting the corresponding standard test program into a standard test text;
[0106] Extracting the initial semantic features of the initial test text, and extracting the standard semantic features of the standard test text;
[0107] Determining the first similarity between the initial semantic features and the standard semantic features to characterize the program difference.
[0108] In one example, the first similarity can include at least one of the following: cosine similarity, Euclidean distance, Jaccard similarity, Pearson correlation coefficient, Manhattan distance, Hamming distance, etc.
[0109] In one example, the initial semantic features and / or the standard semantic features can be extracted by a large language model.
[0110] In one example, the large language model can be used to convert the corresponding initial test program into an initial test text, and / or convert the corresponding standard test program into a standard test text.
[0111] In an alternative embodiment, determining the test requirement text information related to the interface under test includes:
[0112] Obtaining the test instruction of the user, where the test instruction carries test requirement data;
[0113] Based on the set rules and the test requirement data, performing data cleaning processing to obtain standardized test requirement data;
[0114] Converting the standardized test requirement data into the test requirement text information.
[0115] In one example, the test instruction can be input by voice, or can be input by typing text on the terminal interface.
[0116] In one example, the setting rules can be used to indicate at least one of the following: removing irrelevant information, unifying formats, handling missing values, handling outliers, and removing duplicate records.
[0117] In an alternative embodiment, the test requirement data includes test requirement sub-data respectively corresponding to at least one test requirement. Based on the setting rules and the test requirement data, data cleaning is performed to obtain standardized test requirement data, including:
[0118] Extracting corresponding requirement sub-features from each test requirement sub-data, where the requirement sub-features are used to indicate the requirement standardization of the corresponding test requirement data;
[0119] Filtering out the requirement sub-features that meet the setting rules from the requirement sub-features respectively corresponding to all test requirement sub-data, where the setting rules indicate the requirement standardization requirements matching the requirement standardization;
[0120] Constructing the standardized test requirement data from the test requirement sub-data respectively corresponding to all the requirement sub-features that meet the setting rules.
[0121] In this embodiment, the test requirement data input by the user may contain unreasonable and / or non-standardized test requirements. These unreasonable and / or non-standardized test requirements are not necessary for testing, and even if forced to test, it may cause damage to the interface under test. Therefore, this embodiment can filter out these unreasonable and / or non-standardized test requirements to improve the security and rationality of the test process.
[0122] In one example, extracting the corresponding requirement sub-features from each test requirement sub-data may include: according to the normative keywords corresponding to the requirement standardization, using regular expressions to extract the corresponding requirement sub-features from each test requirement sub-data, where the test requirement sub-data can be represented in text form.
[0123] In an alternative embodiment, the requirement standardization includes at least one of the following: clarity, integrity, testability;
[0124] The requirement standardization requirements include at least one of the following: clarity requirements, integrity requirements, testability requirements.
[0125] It should be noted that in this embodiment:
[0126] Clarity is suitable for indicating whether the requirement description is clear and unambiguous;
[0127] Integrity is suitable for indicating whether the requirement contains all necessary information;
[0128] Testability, which is suitable for indicating whether a requirement can be effectively tested.
[0129] In an alternative embodiment, the requirement sub-features include at least one of the following:
[0130] A term word feature and / or a context ambiguity feature suitable for characterizing the clarity;
[0131] A test input / output feature and / or a test boundary condition feature suitable for characterizing the integrity;
[0132] A test standard index feature suitable for characterizing the testability.
[0133] It should be noted that in this embodiment:
[0134] The test input / output feature is suitable for indicating the expected input format of the requirement and its corresponding expected output format;
[0135] The test boundary condition feature is suitable for indicating whether the requirement takes into account boundary conditions and exceptional situations;
[0136] The test standard index feature is suitable for indicating whether the requirement can be verified, that is, whether there are clear test methods and standards, and whether the requirement can be quantified, that is, whether there are specific indicators or parameters.
[0137] In an alternative embodiment, the conversion of the specified test requirement data into the test requirement text information includes:
[0138] Converting the specified test requirement data into a specified test requirement text;
[0139] Performing semantic analysis on the specified test requirement text through natural language processing technology to obtain the test requirement text information.
[0140] In an alternative embodiment, the selection of the standard test requirement features that match the test requirement text information from the multiple standard test requirement features includes:
[0141] Determining a second similarity between each standard test requirement feature and the test requirement text information;
[0142] Selecting the selected standard test requirement features from the multiple standard test requirement features according to the second similarity.
[0143] In an example, the selected standard test requirement feature may be the standard test requirement feature corresponding to the maximum second similarity.
[0144] Accordingly, an embodiment of the present application further provides an AI-based electric vehicle interface testing device, which can implement all processes of the AI-based electric vehicle interface testing method provided in the above embodiment.
[0145] See Figure 2 , which shows a schematic structural diagram of the AI-based electric vehicle interface testing device provided in an embodiment of the present application. The device includes:
[0146] An information determination module 201, configured to determine interface information of a to-be-tested interface in an electric vehicle, test requirement text information related to the to-be-tested interface, and a pre-trained AI model configured with interface prompt information. Among them, the type of the to-be-tested interface is the same as the type of a sample interface, and the interface prompt information includes: multiple standard test requirement features obtained by training an initial AI model with multiple standard test requirement information of the sample interface respectively;
[0147] A program generation module 202, configured to input the interface information and the test requirement text information into the pre-trained AI model, so that the pre-trained AI model selects standard test requirement features matching the test requirement text information from the multiple standard test requirement features, and generates and outputs a test program according to the interface information and the selected standard test requirement features;
[0148] A test module 203, configured to obtain the test program and send it to a test device to instruct the test device to test the to-be-tested interface.
[0149] In an optional implementation manner, the training process of the pre-trained AI model includes:
[0150] Obtain the multiple standard test requirement information and the sample interface information of the sample interface, where the multiple standard test requirement information corresponds to the multiple standard test requirement features one by one;
[0151] Perform text feature extraction on each standard test requirement information to obtain standard test requirement features corresponding to each standard test requirement information;
[0152] Input the sample interface information and each standard test requirement feature into a large language model to generate a standard test program corresponding to each standard test requirement feature;
[0153] Train the initial AI model based on the multiple standard test requirement features and their respective corresponding standard test programs, and the sample interface information to obtain the pre-trained AI model.
[0154] In an alternative embodiment, training the initial AI model based on the multiple standard test requirement features, their respective corresponding standard test procedures, and the sample interface information to obtain the pre-trained AI model includes:
[0155] Input each standard test requirement feature and the sample interface information into the initial AI model to generate an initial test procedure corresponding to each standard test requirement feature;
[0156] For each standard test requirement feature, determine the program difference between the corresponding initial test procedure and the corresponding standard test procedure;
[0157] Based on the program differences corresponding to the multiple standard test requirement features, train the initial AI model to obtain the pre-trained AI model.
[0158] In an alternative embodiment, determining the program difference between the corresponding initial test procedure and the corresponding standard test procedure includes:
[0159] Convert the corresponding initial test procedure into an initial test text, and convert the corresponding standard test procedure into a standard test text;
[0160] Extract the initial semantic features of the initial test text and extract the standard semantic features of the standard test text;
[0161] Determine the first similarity between the initial semantic features and the standard semantic features to represent the program difference.
[0162] In an alternative embodiment, determining the test requirement text information related to the interface to be tested includes:
[0163] Obtain the test instruction of the user, where the test instruction carries test requirement data;
[0164] Based on the set rules and the test requirement data, perform data cleaning processing to obtain standardized test requirement data;
[0165] Convert the standardized test requirement data into the test requirement text information.
[0166] In an alternative embodiment, the test requirement data includes test requirement sub-data corresponding to at least one test requirement respectively. The data cleaning processing based on the set rules and the test requirement data to obtain the standardized test requirement data includes:
[0167] Extract the corresponding requirement sub - features from each test requirement sub - data, where the requirement sub - features are used to indicate the requirement normativity of the corresponding test requirement data;
[0168] From the requirement sub - features corresponding to all test requirement sub - data, filter out the requirement sub - features that meet the set rules, where the set rules indicate the requirement normativity requirements that match the requirement normativity;
[0169] Construct the standardized test requirement data from the test requirement sub - data corresponding to all the requirement sub - features that meet the set rules.
[0170] In an alternative embodiment, the requirement normativity includes at least one of the following: clarity, integrity, testability;
[0171] The requirement normativity requirements include at least one of the following: clarity requirements, integrity requirements, testability requirements.
[0172] In an alternative embodiment, the requirement sub - features include at least one of the following:
[0173] Term - word features and / or context ambiguity features suitable for characterizing the clarity;
[0174] Test input - output features and / or test boundary condition features suitable for characterizing the integrity;
[0175] Test standard index features suitable for characterizing the testability.
[0176] In an alternative embodiment, the converting the standardized test requirement data into the test requirement text information includes:
[0177] Convert the standardized test requirement data into a standardized test requirement text;
[0178] Through natural language processing technology, perform semantic analysis on the standardized test requirement text to obtain the test requirement text information.
[0179] In an alternative embodiment, the selecting the standard test requirement features that match the test requirement text information from the multiple standard test requirement features includes:
[0180] Determine the second similarity between each standard test requirement feature and the test requirement text information;
[0181] According to the second similarity, select the selected standard test requirement features from the multiple standard test requirement features.
[0182] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned AI-based electric vehicle interface testing method are implemented.
[0183] See Figure 3 , the embodiment of the present application also provides a computer device, including a processor 301, a memory 302, and a computer program stored in the memory 302 and configured to be executed by the processor 301. When the processor 301 executes the computer program, the steps of the above-mentioned AI-based electric vehicle interface testing method are implemented.
[0184] The computer device of this embodiment includes: a processor 301, a memory 302, and a computer program stored in the memory 302 and operable on the processor 301, such as an AI-based electric vehicle interface testing program. When the processor 301 executes the computer program, the steps in the above-mentioned various embodiments of the AI-based electric vehicle interface testing method are implemented, such as Figure 1 the steps S101 - S103 shown.
[0185] Exemplarily, the computer program can be divided into one or more modules / units. The one or more modules / units are stored in the memory 302 and executed by the processor 301 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the computer device.
[0186] The computer device can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The computer device may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art can understand that the schematic diagram is only an example of the computer device and does not constitute a limitation on the computer device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the computer device may also include input / output devices, network access devices, a bus, etc.
[0187] The processor 301 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor 301 may also be any conventional processor, etc. The processor 301 is the control center of the computer device, connecting various parts of the entire computer device through various interfaces and lines.
[0188] The memory 302 can be used to store the computer programs and / or modules. The processor 301 realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 302, and by calling the data stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, at least one magnetic disk storage device, flash device, or other volatile solid-state storage devices.
[0189] Among them, if the modules / units integrated in the computer device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above method embodiments of this application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor 301, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0190] In summary, the embodiments of this application have at least the following beneficial effects:
[0191] By adopting the embodiments of this application, by determining the interface information of the interface to be tested in the electric vehicle, the test requirement text information related to the interface to be tested, and a pre-trained AI model configured with interface prompt information, wherein the type of the interface to be tested is the same as the type of the sample interface, and the interface prompt information includes: multiple standard test requirement features obtained by training an initial AI model respectively with multiple standard test requirement information of the sample interface; inputting the interface information and the test requirement text information into the pre-trained AI model, so that the pre-trained AI model selects the standard test requirement feature that matches the test requirement text information from the multiple standard test requirement features, and generates and outputs a test program according to the interface information and the selected standard test requirement feature; obtaining the test program and sending it to a test device to instruct the test device to test the interface to be tested, thereby being able to efficiently generate high-quality test programs by using the pre-trained AI model, so as to improve the test efficiency and test quality of the electric vehicle interface test.
[0192] Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus a necessary hardware platform. Of course, it can also be implemented entirely through hardware. Based on such an understanding, all or part of the technical solution of this application that contributes to the background art can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0193] The above is the preferred embodiment of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of this application.
Claims
1. An AI-based test method for electric vehicle interfaces, characterized in that Including: Determine the interface information of the interface to be tested in the electric vehicle, the test requirement text information related to the interface to be tested, and a pre-trained AI model configured with interface prompt information, where the type of the interface to be tested is the same as the type of the sample interface, and the interface prompt information includes: multiple standard test requirement features obtained by training an initial AI model with multiple standard test requirement information of the sample interface respectively; Input the interface information and the test requirement text information into the pre-trained AI model, so that the pre-trained AI model selects a standard test requirement feature that matches the test requirement text information from the multiple standard test requirement features, and generates and outputs a test program according to the interface information and the selected standard test requirement feature; Obtain the test program and send it to the test device to instruct the test device to test the interface to be tested; Among them, the training process of the pre-trained AI model includes: Obtain the multiple standard test requirement information and the sample interface information of the sample interface, where the multiple standard test requirement information corresponds to the multiple standard test requirement features one by one; Extract text features from each standard test requirement information to obtain a standard test requirement feature corresponding to each standard test requirement information; Input the sample interface information and each standard test requirement feature into a large language model to generate a standard test program corresponding to each standard test requirement feature; Train the initial AI model based on the multiple standard test requirement features and their respective corresponding standard test programs, and the sample interface information to obtain the pre-trained AI model.
2. The method according to claim 1, wherein The training the initial AI model based on the multiple standard test requirement features and their respective corresponding standard test programs, and the sample interface information to obtain the pre-trained AI model includes: Input each standard test requirement feature and the sample interface information into the initial AI model to generate an initial test program corresponding to each standard test requirement feature; For each standard test requirement feature, determine the program difference between the corresponding initial test program and the corresponding standard test program; Train the initial AI model based on the program differences corresponding to the multiple standard test requirement features to obtain the pre-trained AI model.
3. The method according to claim 2, wherein The determining the program difference between the corresponding initial test program and the corresponding standard test program includes: Convert the corresponding initial test program into an initial test text, and convert the corresponding standard test program into a standard test text; Extract the initial semantic features of the initial test text and extract the standard semantic features of the standard test text; Determine the first similarity between the initial semantic feature and the standard semantic feature to represent the program difference.
4. The method according to claim 1, characterized in that, Determining the test requirement text information related to the interface to be tested includes: Obtain a test instruction from the user, where the test instruction carries test requirement data; Based on the set rules and the test requirement data, perform data cleaning processing to obtain standardized test requirement data; Convert the standardized test requirement data into the test requirement text information.
5. The method according to claim 4, wherein The test requirement data includes test requirement sub-data respectively corresponding to at least one test requirement. The performing data cleaning processing based on the set rules and the test requirement data to obtain standardized test requirement data includes: Extract the corresponding requirement sub-features from each test requirement sub-data, where the requirement sub-features are used to indicate the requirement standardization of the corresponding test requirement data; From the requirement sub-features respectively corresponding to all test requirement sub-data, filter out the requirement sub-features that meet the set rules, where the set rules indicate the requirement standardization requirements matching the requirement standardization; Constitute the standardized test requirement data with the test requirement sub-data respectively corresponding to all the requirement sub-features that meet the set rules.
6. The method according to claim 5, wherein The requirement standardization includes at least one of the following: clarity, integrity, testability; The requirement standardization requirements include at least one of the following: clarity requirements, integrity requirements, testability requirements.
7. The method according to claim 6, wherein The requirement sub-features include at least one of the following: Term word features and / or context ambiguity features suitable for characterizing the clarity; Test input and output features and / or test boundary condition features suitable for characterizing the integrity; Test standard index features suitable for characterizing the testability.
8. The method according to claim 4, wherein The converting the standardized test requirement data into the test requirement text information includes: Convert the standardized test requirement data into a standardized test requirement text; Through natural language processing technology, perform semantic analysis on the standardized test requirement text to obtain the test requirement text information.
9. The method according to claim 1, characterized in that, The selecting the standard test requirement features matching the test requirement text information from the multiple standard test requirement features includes: Determine the second similarity between each standard test requirement feature and the test requirement text information; According to the second similarity, select the selected standard test requirement features from the multiple standard test requirement features.
Citation Information
Patent Citations
Interface test case generation method and device based on large language model and medium
CN118349441A
Vehicle testing method and device, electronic equipment and readable medium
CN118838818A