Electric vehicle interface test method based on AI

Through the AI-based electric vehicle interface testing method, the pre-trained AI model is used to generate test programs, which solves the problems of low efficiency of traditional testing technology and difficult to guarantee code quality, and achieves efficient and high-quality test programs generation.

CN119473898AActive Publication Date: 2025-02-18GUANGZHOU RUIHU INFORMATION TECHNOLOGY CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411610888.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-02-18
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

Traditional electric vehicle interface testing technology is inefficient, requires engineers to manually write test programs, and rely heavily on experience, making it difficult to ensure code quality.

Method used

Using the AI-based electric vehicle interface testing method, high-quality testing programs are generated by determining interface information, testing requirements text information and pre-training AI models.

Benefits of technology

It improves the efficiency and quality of electric vehicle interface testing, reduces the time and dependence of manually writing test programs, and ensures the code quality of the test programs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473898A_ABST
    Figure CN119473898A_ABST
Patent Text Reader

Abstract

The invention discloses an AI-based electric vehicle interface test method, which comprises the steps of determining interface information of a to-be-tested interface in an electric vehicle, test demand text information related to the to-be-tested interface and a pre-trained AI model configured with interface prompt information, the interface prompt information comprises a plurality of standard test demand features obtained by training the initial AI model by using a plurality of standard test demand information of the sample interface; inputting the interface information and the test demand text information into a pre-trained AI model, enabling the pre-trained AI model to select a standard test demand feature matched with the test demand text information from a plurality of standard test demand features, and generating and outputting a test program according to the interface information and the selected standard test demand feature; the test program is obtained and sent to the test device, the test device is indicated to test the to-be-tested interface, the high-quality test program can be efficiently generated, and the test efficiency and test quality of the electric vehicle interface test can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to an AI-based electric vehicle interface testing method. Background Art

[0002] In traditional electric vehicle interface testing technology, since the functions and specific interface parameters corresponding to different interfaces may be different, engineers are often required to write corresponding test programs for each different interface in order to test whether the interface is qualified.

[0003] However, manually writing test programs is inefficient. Each time the relevant information of an interface is changed, the test program needs to be rewritten. It is also heavily dependent on the experience of engineers, making it difficult to ensure the code quality of the test program. Summary of the invention

[0004] In order to solve the above technical problems, the embodiment of the present application proposes an AI-based electric vehicle interface testing method, which can efficiently generate high-quality test programs to improve the test efficiency and test quality of electric vehicle interface testing.

[0005] The present application embodiment provides an AI-based electric vehicle interface testing method, including:

[0006] Determine interface information of an interface to be tested in the electric vehicle, 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 after respectively training the initial AI model using multiple standard test requirement information of the sample interface;

[0007] Inputting 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;

[0008] The test program is obtained and sent 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] Acquire the plurality of standard test requirement information and sample interface information of the sample interface, wherein the plurality of standard test requirement information corresponds one-to-one to the plurality of standard test requirement features;

[0011] Perform text feature extraction on each type of standard test requirement information to obtain a standard test requirement feature corresponding to each type of standard test requirement information;

[0012] Inputting 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] Based on the multiple standard test requirement characteristics and their corresponding standard test procedures, as well as the sample interface information, the initial AI model is trained to obtain the pre-trained AI model.

[0014] Optionally, the training of the initial AI model based on the multiple standard test requirement characteristics and their corresponding standard test procedures, as well as 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 corresponding initial test procedure and the procedural differences between it and the corresponding standard test procedure;

[0017] Based on the program differences corresponding to the various standard test requirement characteristics, the initial AI model is trained to obtain the pre-trained AI model.

[0018] Optionally, the determining of the program difference between the corresponding initial test program and the corresponding standard test program includes:

[0019] Converting the corresponding initial test program into an initial test text, and converting the corresponding standard test program into a standard test text;

[0020] Extracting initial semantic features of the initial test text, and extracting standard semantic features of the standard test text;

[0021] A first similarity between the initial semantic feature and the standard semantic feature is determined to characterize the program difference.

[0022] Optionally, determining test requirement text information related to the interface to be tested includes:

[0023] Obtaining a test instruction from a user, wherein the test instruction carries test requirement data;

[0024] Based on the set rules and the test requirement data, data cleaning is performed to obtain standardized test requirement data;

[0025] The standard test requirement data is converted into the test requirement text information.

[0026] Optionally, the test requirement data includes test requirement sub-data corresponding to at least one test requirement, and the data cleaning process is performed based on the set rules and the test requirement data to obtain the standardized test requirement data, including:

[0027] Extracting corresponding requirement sub-features from each test requirement sub-data, wherein the requirement sub-features are used to indicate the requirement standardization of the corresponding test requirement data;

[0028] Filtering out the requirement sub-features that meet the setting rules from the requirement sub-features corresponding to all the test requirement sub-data, wherein the setting rules indicate the requirement normative requirements that match the requirement normativeness;

[0029] The test requirement sub-data corresponding to all the requirement sub-features that meet the setting rules constitute the standard test requirement data.

[0030] Optionally, the requirement specification includes at least one of the following: clarity, completeness, and testability;

[0031] The requirement specification requirements include at least one of the following: clarity requirements, completeness requirements, and testability requirements.

[0032] Optionally, the requirement sub-feature includes at least one of the following:

[0033] terminology features and / or contextual ambiguity features suitable for characterizing said clarity;

[0034] Test input and output characteristics and / or test boundary condition characteristics suitable for characterizing said integrity;

[0035] Test standard indicator characteristics suitable for characterizing the testability.

[0036] Optionally, converting the standard test requirement data into the test requirement text information includes:

[0037] Converting the standard test requirement data into a standard test requirement text;

[0038] The standard test requirement text is semantically analyzed by natural language processing technology to obtain the test requirement text information.

[0039] Optionally, selecting a standard test requirement feature that matches the test requirement text information from the multiple standard test requirement features includes:

[0040] Determining a second similarity between each standard test requirement feature and the test requirement text information;

[0041] According to the second similarity, the selected standard test requirement feature is selected from the multiple standard test requirement features.

[0042] In summary, the embodiments of the present application have at least the following beneficial effects:

[0043] According to an embodiment of the present application, by determining interface information of an interface to be tested in an electric vehicle, test requirement text information related to the interface to be tested, and a pretrained AI model configured with interface prompt information, wherein the type of the interface to be tested is the same as the type of a sample interface, the interface prompt information includes: a plurality of standard test requirement features obtained after respectively training an initial AI model using a plurality of standard test requirement information of the sample interface; inputting the interface information and the test requirement text information into the pretrained AI model, so that the pretrained AI model selects a standard test requirement feature that matches the test requirement text information from the plurality of standard test requirement features, so as to generate and output 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 utilize the pretrained AI model to efficiently generate a high-quality test program, so as to improve the test efficiency and test quality of the electric vehicle interface test. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a flow chart of an AI-based electric vehicle interface testing method provided in an embodiment of the present application;

[0045] Figure 2 It is a structural schematic diagram of an AI-based electric vehicle interface testing device provided in an embodiment of the present application;

[0046] Figure 3 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] In the description of the present application, the terms "first", "second", "third", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, features defined as "first", "second", "third", etc. may explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, the meaning of "multiple" is two or more. In the description of the present application, the term "including" and its variations are open inclusions, 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 based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other 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 limited, the terms "installed", "connected", and "connected" 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 a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[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 meaning as those commonly understood by those skilled in the art. 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 by specific circumstances.

[0051] The following is an explanation of some terminology concepts involved in the embodiments of the present application:

[0052] AI (Artificial Intelligence) is a technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. Among them, AI models refer to mathematical models trained by machine learning or other artificial intelligence technologies, which are used to perform specific tasks such as classification, regression, prediction, natural language processing, etc. These models can recognize patterns, make decisions or generate new data by learning from large amounts of data.

[0053] See also Figure 1 , shows a flow chart of an AI-based electric vehicle interface testing method provided in an embodiment of the present application, the method includes steps S101-S103, which are as follows:

[0054] S101, determining interface information of an interface to be tested in an electric vehicle, 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 after respectively training the initial AI model using multiple standard test requirement information of the sample interface;

[0055] In an 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 communication with electric vehicle charging stations, vehicle systems and other related equipment. The SDK protocol can be used to define the format, method and rules of data exchange to ensure that devices from different manufacturers are 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 by pre-training the AI ​​model to implement relevant interface tests for the interface to be tested based on the SDK protocol, thereby solving the technical problem of insufficient standardization of testing caused by the fact that the current SDK protocol has not achieved unified specifications in all application scenarios.

[0057] CAN (Controller Area Network) bus: a standard protocol for internal communication in automobiles.

[0058] In one example, the pre-trained AI model can be constructed based on any of the following:

[0059] BERT (Bidirectional Encoder Representations from Transformers)

[0060] T5, a Transformer-based model suitable for a variety of natural language processing tasks;

[0061] Decision trees and random forests;

[0062] Support vector machines;

[0063] Neural networks;

[0064] Deep learning models;

[0065] Reinforcement learning model.

[0066] In an example, the interface prompt information can be generated by the following steps:

[0067] 1) Data preparation

[0068] Collect test requirements for sample interfaces: Collect various standard test requirement information from existing test cases, where the standard test requirement information may refer to a series of detailed test requirements formulated for each sample interface during the test process to ensure that the functions, performance, security and other key attributes of the interface or system meet the predetermined standards and specifications. The standard test requirement information may include at least one of the following: functional requirements, performance requirements, security requirements, compatibility requirements, usability requirements, maintainability requirements, and standard compliance requirements.

[0069] Annotate data: Annotate corresponding interface information and test scenarios for each test requirement.

[0070] 2) Model training

[0071] Preprocess data: Clean and preprocess the collected test requirements to ensure data quality.

[0072] Training model: Use labeled data to train the initial AI model. The training process can include the following transfer learning and data enhancement processes:

[0073] Transfer learning: Use 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 model performance: Use an independent test set to evaluate the performance of the model. Common evaluation indicators include accuracy, recall, F1 score, etc.

[0077] Tune the model: Adjust the model's hyperparameters based on the evaluation results to optimize the model's performance.

[0078] 4) Interface prompt information generation

[0079] Generate prompt information: Use the trained model to generate interface prompt information related to the interface to be tested. The prompt information may include:

[0080] Test scenarios: test requirements of the interface in different scenarios;

[0081] Test case: specific test steps and expected results;

[0082] Notes: Things to note during the test.

[0083] S102, inputting 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;

[0084] In one example, the selected standard test requirement feature may refer to the standard test requirement feature having the highest similarity with the test requirement text information.

[0085] In one example, generating and outputting a test program according to the interface information and the selected standard test requirement characteristics 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] Furthermore, generating and outputting a test program according to the modified standard test requirement characteristics and the selected standard test requirement characteristics may include:

[0088] determining a third similarity between the modified standard test requirement feature and the selected standard test requirement feature;

[0089] Based on the third similarity and the selected standard test requirement characteristics, a test program is generated and output.

[0090] S103, acquiring the test program and sending it to the test device to instruct the test device to test the interface to be tested.

[0091] In this embodiment, the initial AI model is trained separately using a variety of standard test requirement information collected in advance to obtain a corresponding variety of standard test requirement features, and configured into the pre-trained AI model so that the pre-trained AI model can select features that match the test requirement text information from the configured standard test requirement features, and then combine them with the specific interface information to generate a test program that takes into account both efficiency and quality, thereby avoiding the situation where the test requirement text information input by the user is not standardized enough, which makes it difficult for the model to accurately identify the test requirements.

[0092] In an optional implementation, the training process of the pre-trained AI model includes:

[0093] Acquire the plurality of standard test requirement information and sample interface information of the sample interface, wherein the plurality of standard test requirement information corresponds one-to-one to the plurality of standard test requirement features;

[0094] Perform text feature extraction on each type of standard test requirement information to obtain a standard test requirement feature corresponding to each type of standard test requirement information;

[0095] Inputting 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] Based on the multiple standard test requirement characteristics and their corresponding standard test procedures, as well as the sample interface information, the initial AI model is trained 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, the corresponding standard test requirement features can be extracted from the standard test requirement information by using 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 may be a model that has been pre-trained with a large amount of data, such as GPT-4 (Generative Pre-trained Transformer 4).

[0099] In an optional implementation, the training of the initial AI model based on the multiple standard test requirement characteristics and their corresponding standard test procedures, as well as 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 corresponding initial test procedure and the procedural differences between it and the corresponding standard test procedure;

[0102] Based on the program differences corresponding to the various standard test requirement characteristics, the initial AI model is trained to obtain the pre-trained AI model.

[0103] In one example, the program difference can be characterized by the similarity of the feature vectors of the two programs, 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. In this way, the process of training the initial AI model can adopt a similarity-based model training method, specifically, by calculating the similarity between the input data to generate or classify the output, so as to achieve the effect of model training.

[0104] In an optional implementation, the determining of 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 initial semantic features of the initial test text, and extracting standard semantic features of the standard test text;

[0107] A first similarity between the initial semantic feature and the standard semantic feature is determined to characterize the program difference.

[0108] In an example, the first similarity may include at least one of the following: cosine similarity, Euclidean distance, Jaccard similarity, Pearson correlation coefficient, Manhattan distance, Hamming distance, and the like.

[0109] In one example, initial semantic features and / or standard semantic features may be extracted through a large language model.

[0110] In one example, the corresponding initial test program may be converted into an initial test text by a large language model, and / or the corresponding standard test program may be converted into a standard test text.

[0111] In an optional implementation manner, determining the test requirement text information related to the interface to be tested includes:

[0112] Obtaining a test instruction from a user, wherein the test instruction carries test requirement data;

[0113] Based on the set rules and the test requirement data, data cleaning is performed to obtain standardized test requirement data;

[0114] The standard test requirement data is converted into the test requirement text information.

[0115] In one example, the test instruction may be input by voice, or may be input by inputting text on a terminal interface.

[0116] In an example, the setting rule may be used to indicate at least one of the following: removing irrelevant information, unifying formats, processing missing values, processing abnormal values, and removing duplicate records.

[0117] In an optional implementation, the test requirement data includes test requirement sub-data corresponding to at least one test requirement, and the data cleaning process is performed based on the set rules and the test requirement data to obtain the standardized test requirement data, including:

[0118] Extracting corresponding requirement sub-features from each test requirement sub-data, wherein 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 corresponding to all the test requirement sub-data, wherein the setting rules indicate the requirement normative requirements that match the requirement normativeness;

[0120] The test requirement sub-data corresponding to all the requirement sub-features that meet the setting rules constitute the standard test requirement data.

[0121] In this embodiment, the test requirement data input by the user may include unreasonable and / or non-standard test requirements. These unreasonable and / or non-standard test requirements do not need to be tested, and even forced testing may cause damage to the interface to be tested. Therefore, this embodiment can screen out these unreasonable and / or non-standard test requirements to improve the safety and rationality of the testing process.

[0122] In one example, extracting corresponding requirement sub-features from each test requirement sub-data may include: extracting corresponding requirement sub-features from each test requirement sub-data using regular expressions based on normative keywords corresponding to the requirement normativity, wherein the test requirement sub-data may be represented in text form.

[0123] In an optional implementation, the requirement specification includes at least one of the following: clarity, completeness, and testability;

[0124] The requirement specification requirements include at least one of the following: clarity requirements, completeness requirements, and testability requirements.

[0125] It should be noted that in this embodiment:

[0126] Clarity, suitable for indicating whether the requirement description is clear and unambiguous;

[0127] Completeness, which is suitable for indicating whether the requirement contains all necessary information;

[0128] Testability, which is useful for indicating whether a requirement can be effectively tested.

[0129] In an optional implementation, the demand sub-feature includes at least one of the following:

[0130] terminology features and / or contextual ambiguity features suitable for characterizing said clarity;

[0131] Test input and output characteristics and / or test boundary condition characteristics suitable for characterizing said integrity;

[0132] Test standard indicator characteristics suitable for characterizing the testability.

[0133] It should be noted that in this embodiment:

[0134] Test input and output characteristics, suitable for indicating the expected input format of the requirement and its corresponding expected output format;

[0135] Testing boundary condition features, suitable for indicating whether the requirements take into account boundary conditions and abnormal situations;

[0136] The test standard indicator characteristics are suitable for indicating whether the requirements can be verified, that is, whether there are clear test methods and standards, and whether the requirements can be quantified, that is, whether there are specific indicators or parameters.

[0137] In an optional implementation, converting the standard test requirement data into the test requirement text information includes:

[0138] Converting the standard test requirement data into a standard test requirement text;

[0139] The standard test requirement text is semantically analyzed by natural language processing technology to obtain the test requirement text information.

[0140] In an optional implementation, the selecting a standard test requirement feature that matches 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] According to the second similarity, the selected standard test requirement feature is selected from the multiple standard test requirement features.

[0143] In an example, the selected standard test requirement feature may be the standard test requirement feature corresponding to the largest second similarity.

[0144] Correspondingly, an embodiment of the present application also 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 embodiments.

[0145] See also Figure 2 , shows a schematic diagram of the structure of an AI-based electric vehicle interface testing device provided in an embodiment of the present application, the device comprising:

[0146] The information determination module 201 is used to 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, 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 after respectively training the initial AI model using multiple standard test requirement information of the sample interface;

[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 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;

[0148] The testing module 203 is used to obtain the testing program and send it to the testing device to instruct the testing device to test the interface to be tested.

[0149] In an optional implementation, the training process of the pre-trained AI model includes:

[0150] Acquire the plurality of standard test requirement information and sample interface information of the sample interface, wherein the plurality of standard test requirement information corresponds one-to-one to the plurality of standard test requirement features;

[0151] Perform text feature extraction on each type of standard test requirement information to obtain a standard test requirement feature corresponding to each type of standard test requirement information;

[0152] Inputting 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] Based on the multiple standard test requirement characteristics and their corresponding standard test procedures, as well as the sample interface information, the initial AI model is trained to obtain the pre-trained AI model.

[0154] In an optional implementation, the training of the initial AI model based on the multiple standard test requirement characteristics and their corresponding standard test procedures, as well as 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 program corresponding to each standard test requirement feature;

[0156] For each standard test requirement feature, determine the corresponding initial test procedure and the procedural differences between it and the corresponding standard test procedure;

[0157] Based on the program differences corresponding to the various standard test requirement characteristics, the initial AI model is trained to obtain the pre-trained AI model.

[0158] In an optional implementation, the determining of the program difference between the corresponding initial test program and the corresponding standard test program includes:

[0159] Converting the corresponding initial test program into an initial test text, and converting the corresponding standard test program into a standard test text;

[0160] Extracting initial semantic features of the initial test text, and extracting standard semantic features of the standard test text;

[0161] A first similarity between the initial semantic feature and the standard semantic feature is determined to characterize the program difference.

[0162] In an optional implementation manner, determining the test requirement text information related to the interface to be tested includes:

[0163] Obtaining a test instruction from a user, wherein the test instruction carries test requirement data;

[0164] Based on the set rules and the test requirement data, data cleaning is performed to obtain standardized test requirement data;

[0165] The standard test requirement data is converted into the test requirement text information.

[0166] In an optional implementation, the test requirement data includes test requirement sub-data corresponding to at least one test requirement, and the data cleaning process is performed based on the set rules and the test requirement data to obtain the standardized test requirement data, including:

[0167] Extracting corresponding requirement sub-features from each test requirement sub-data, wherein the requirement sub-features are used to indicate the requirement standardization of the corresponding test requirement data;

[0168] Filtering out the requirement sub-features that meet the setting rules from the requirement sub-features corresponding to all the test requirement sub-data, wherein the setting rules indicate the requirement normative requirements that match the requirement normativeness;

[0169] The test requirement sub-data corresponding to all the requirement sub-features that meet the setting rules constitute the standard test requirement data.

[0170] In an optional implementation, the requirement specification includes at least one of the following: clarity, completeness, and testability;

[0171] The requirement specification requirements include at least one of the following: clarity requirements, completeness requirements, and testability requirements.

[0172] In an optional implementation, the demand sub-feature includes at least one of the following:

[0173] terminology features and / or contextual ambiguity features suitable for characterizing said clarity;

[0174] Test input and output characteristics and / or test boundary condition characteristics suitable for characterizing said integrity;

[0175] Test standard indicator characteristics suitable for characterizing the testability.

[0176] In an optional implementation, converting the standard test requirement data into the test requirement text information includes:

[0177] Converting the standard test requirement data into a standard test requirement text;

[0178] The standard test requirement text is semantically analyzed by natural language processing technology to obtain the test requirement text information.

[0179] In an optional implementation, the selecting a standard test requirement feature that matches the test requirement text information from the multiple standard test requirement features includes:

[0180] Determining a second similarity between each standard test requirement feature and the test requirement text information;

[0181] According to the second similarity, the selected standard test requirement feature is selected from the multiple standard test requirement features.

[0182] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above-mentioned AI-based electric vehicle interface testing methods are implemented.

[0183] See also Figure 3 An 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, and the processor 301 implements the steps of any one of the above-mentioned AI-based electric vehicle interface testing methods when executing the computer program.

[0184] The computer device of this embodiment includes: a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301, such as an AI-based electric vehicle interface test program. When the processor 301 executes the computer program, the steps in the above-mentioned embodiments of the AI-based electric vehicle interface test method are implemented, such as Figure 1 Steps S101-S103 are shown.

[0185] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 302 and executed by the processor 301 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the computer device.

[0186] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will appreciate that the schematic diagram is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than shown in the diagram, or may combine certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0187] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A 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, and uses various interfaces and lines to connect various parts of the entire computer device.

[0188] The memory 302 can be used to store the computer program and / or module. The processor 301 implements various functions of the computer device by running or executing the computer program and / or module stored in the memory 302 and calling the data stored in the memory 302. The memory 302 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application 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, a phone book, etc.). In addition, the memory 302 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0189] Wherein, if the module / unit integrated in the computer device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor 301. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0190] In summary, the embodiments of the present application have at least the following beneficial effects:

[0191] According to an embodiment of the present application, by determining interface information of an interface to be tested in an electric vehicle, test requirement text information related to the interface to be tested, and a pretrained AI model configured with interface prompt information, wherein the type of the interface to be tested is the same as the type of a sample interface, the interface prompt information includes: a plurality of standard test requirement features obtained after respectively training an initial AI model using a plurality of standard test requirement information of the sample interface; inputting the interface information and the test requirement text information into the pretrained AI model, so that the pretrained AI model selects a standard test requirement feature that matches the test requirement text information from the plurality of standard test requirement features, so as to generate and output 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 utilize the pretrained AI model to efficiently generate a high-quality test program, so as to improve the test efficiency and test quality of the electric vehicle interface test.

[0192] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary hardware platform, and of course, it can also be implemented entirely by hardware. Based on such an understanding, all or part of the contribution of the technical solution of the present application to the background technology can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0193] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications are also considered to be within the scope of protection of the present application.

Claims

1. An AI-based electric vehicle interface testing method, characterized in that: include: Determine interface information of an interface to be tested in the electric vehicle, 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 after respectively training the initial AI model using 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 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; The test program is obtained and sent to a test device to instruct the test device to test the interface to be tested.

2. The method according to claim 1, characterized in that The training process of the pre-trained AI model includes: Acquire the plurality of standard test requirement information and sample interface information of the sample interface, wherein the plurality of standard test requirement information corresponds one-to-one to the plurality of standard test requirement features; Perform text feature extraction on each type of standard test requirement information to obtain a standard test requirement feature corresponding to each type of standard test requirement information; Inputting 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; Based on the multiple standard test requirement characteristics and their corresponding standard test procedures, as well as the sample interface information, the initial AI model is trained to obtain the pre-trained AI model.

3. The method according to claim 2, characterized in that The training of the initial AI model based on the multiple standard test requirement characteristics and their corresponding standard test procedures, as well as 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 corresponding initial test procedure and the procedural differences between it and the corresponding standard test procedure; Based on the program differences corresponding to the various standard test requirement characteristics, the initial AI model is trained to obtain the pre-trained AI model.

4. The method according to claim 3, characterized in that The determining of the program difference between the corresponding initial test program and the corresponding standard test program includes: Converting the corresponding initial test program into an initial test text, and converting the corresponding standard test program into a standard test text; Extracting initial semantic features of the initial test text, and extracting standard semantic features of the standard test text; A first similarity between the initial semantic feature and the standard semantic feature is determined to characterize the program difference.

5. The method according to claim 1, characterized in that Determine the test requirement text information related to the interface to be tested, including: Obtaining a test instruction from a user, wherein the test instruction carries test requirement data; Based on the set rules and the test requirement data, data cleaning is performed to obtain standardized test requirement data; The standard test requirement data is converted into the test requirement text information.

6. The method according to claim 5, characterized in that The test requirement data includes test requirement sub-data corresponding to at least one test requirement. The data cleaning process is performed based on the set rules and the test requirement data to obtain the standardized test requirement data, including: Extracting corresponding requirement sub-features from each test requirement sub-data, wherein the requirement sub-features are used to indicate the requirement standardization of the corresponding test requirement data; Filtering out the requirement sub-features that meet the setting rules from the requirement sub-features corresponding to all the test requirement sub-data, wherein the setting rules indicate the requirement normative requirements that match the requirement normativeness; The test requirement sub-data corresponding to all the requirement sub-features that meet the setting rules constitute the standard test requirement data.

7. The method according to claim 6, characterized in that The requirement specification includes at least one of the following: clarity, completeness, and testability; The requirement specification requirements include at least one of the following: clarity requirements, completeness requirements, and testability requirements.

8. The method according to claim 7, characterized in that The requirement sub-characteristics include at least one of the following: terminology features and / or contextual ambiguity features suitable for characterizing said clarity; Test input and output characteristics and / or test boundary condition characteristics suitable for characterizing said integrity; Test standard indicator characteristics suitable for characterizing the testability.

9. The method according to claim 5, characterized in that The converting the standard test requirement data into the test requirement text information comprises: Converting the standard test requirement data into a standard test requirement text; The standard test requirement text is semantically analyzed by natural language processing technology to obtain the test requirement text information.

10. The method according to claim 1, characterized in that The selecting a standard test requirement feature that matches the test requirement text information from the multiple standard test requirement features includes: Determining a second similarity between each standard test requirement feature and the test requirement text information; According to the second similarity, the selected standard test requirement feature is selected from the multiple standard test requirement features.

Citation Information

Patent Citations

  • Vehicle-mounted interface test method, electronic equipment and storage medium

    CN116244210A

  • Large model risk assessment method and device, storage medium and electronic equipment

    CN117113339A

  • Interface test case generation method and device based on large language model and medium

    CN118349441A

  • Software test requirement generation method and device, equipment and storage medium

    CN118484403A

  • Test case generation method and device, storage medium and vehicle

    CN118733456A