Generation method of interactive control panel for vehicle testing and electronic equipment

By extracting key variables in vehicle testing applications to generate dynamic data sets and combining them with preset generation tools to generate interactive control panels, it solves the problems of cumbersome generation, high maintenance costs, and poor compatibility in the existing technology, and achieves more efficient and accurate Automated testing.

CN118733029APending Publication Date: 2024-10-01CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410730066.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In the existing technology, interactive control panels have problems such as tedious generation, high maintenance costs, and poor compatibility.

Method used

Generate dynamic data sets by extracting key variables from vehicle testing applications, call preset generation tools to generate panel layout files based on panel layout sketches and prompt word information, bind panel controls and graphical interface codes, and generate interactive control panels.

Benefits of technology

It simplifies the generation process of interactive control panels, reduces maintenance costs, and improves the accuracy and reliability of compatibility and automated testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733029A_ABST
    Figure CN118733029A_ABST
Patent Text Reader

Abstract

The invention provides a method for generating an interactive control panel for a vehicle test and electronic equipment, and the method comprises the steps: firstly extracting a key variable corresponding to a test project from a vehicle test application, generating a dynamic data set according to the key variable, and then calling a preset generation tool, generating a panel layout file based on the panel layout sketch and the corresponding cue word, obtaining corresponding graphical interface code information, and then binding each key variable with a corresponding panel control in the panel layout file according to the panel control corresponding to each key variable in the dynamic data set, and finally, generating an interactive control panel by running the graphical interface code information, so that a user controls compiling and running of the test project through the interactive control panel, and controls the bound key variables by operating a panel control in the interactive control panel, thereby realizing the test of the test project. According to the method, the problems of tedious generation, high maintenance cost, poor compatibility and the like of an interactive control panel in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle testing, and in particular to a method for generating an interactive control panel for vehicle testing and an electronic device. Background Art

[0002] In the field of automotive automated test systems, CANoe (CAN open environment, where CAN refers to Controller Area Network) is a widely used automated test tool that provides a complete set of test environments and tools to help developers perform automated tests on various types of automotive electronic equipment.

[0003] In the existing technology, CANoe automated testing usually includes steps such as creating test configuration files, writing test scripts, configuring the test environment, running tests, and analyzing test results. In addition, in order to view and modify the status of the system in real time when running the test, it is also necessary to write a panel interactive control panel. This panel-based interactive control panel needs to be associated with specific variables. The writing process may be cumbersome, requiring specific knowledge and skills, high maintenance costs, and may have compatibility issues. Summary of the invention

[0004] In view of the above-mentioned defects or deficiencies in the prior art, the present application aims to provide a method and electronic device for generating an interactive control panel for vehicle testing, so as to solve the problems in the prior art of cumbersome generation of interactive control panels, high maintenance costs, poor compatibility, etc.

[0005] The present application embodiment provides a method for generating an interactive control panel for vehicle testing, comprising:

[0006] Extracting key variables corresponding to the test project from the vehicle test application, and generating a dynamic data set based on the key variables;

[0007] Calling a preset generation tool to generate a panel layout file based on the panel layout sketch and corresponding prompt word information, and determining graphical interface code information corresponding to the panel layout file;

[0008] Based on the panel controls corresponding to the key variables in the dynamic data set, binding the key variables to the corresponding panel controls in the panel layout file;

[0009] An interactive control panel is generated by running the graphical interface code information, so that the user can control the compilation and operation of the test project through the interactive control panel, and control the bound key variables by operating the panel controls in the interactive control panel.

[0010] Optionally, extracting key variables corresponding to the test project from the vehicle test application includes:

[0011] Establishing a connection with the vehicle test application, and starting a project instance in the vehicle test application through the connection;

[0012] In the test project corresponding to the started project instance, all available variables are obtained, and key variables corresponding to the test project are extracted from all available variables.

[0013] Optionally, extracting key variables corresponding to the test project from all available variables includes:

[0014] Traversing the namespace of the test project to determine a network name under the namespace, a network node name under the network name, and variable properties of each available variable under the network node name;

[0015] Based on the preset network name, preset network node name and preset variable attributes corresponding to the test project, key variables corresponding to the test project are extracted in the namespace of the test project.

[0016] Optionally, generating a dynamic data set based on the key variables includes:

[0017] Obtaining variable information of the key variable, wherein the variable information includes variable source, variable description, variable initial value, variable maximum value, variable minimum value and data type;

[0018] Determine the panel controls and control events corresponding to the key variables, and generate a dynamic data set based on the variable information of the key variables, the panel controls and control events corresponding to the key variables.

[0019] Optionally, generating a panel layout file based on the panel layout sketch and corresponding prompt word information includes:

[0020] Acquire a panel layout sketch, and generate an initial panel layout file based on the panel layout sketch;

[0021] Obtain prompt word information corresponding to the panel layout sketch, adjust the initial panel layout file according to the prompt word information, and obtain a final panel layout file.

[0022] Optionally, the obtaining prompt word information corresponding to the panel layout sketch includes:

[0023] Obtaining function prompts of each panel control in the panel layout sketch, and obtaining process information of user interaction of the panel layout sketch;

[0024] The function prompt word and the process information are used as prompt word information corresponding to the panel layout sketch.

[0025] Optionally, after determining the graphical interface code information corresponding to the panel layout file, the method further includes:

[0026] Displaying the graphical interface code information to obtain adjustment information for the panel controls in the panel layout file and event processing functions for the panel controls;

[0027] The panel control in the panel layout file is adjusted based on the adjustment information, and the event processing function is added to the panel control.

[0028] Optionally, binding each key variable with a corresponding panel control in the panel layout file based on the panel control corresponding to each key variable in the dynamic data set includes:

[0029] Based on the panel controls and control events corresponding to each key variable in the dynamic data set, interactive controls are created for the panel controls in the panel layout file, and event processing functions corresponding to the panel controls are bound to the interactive controls to bind each key variable to the corresponding panel controls in the panel layout file.

[0030] Optionally, the method provided in the embodiment of the present application further includes:

[0031] In response to detecting that a key variable corresponding to the test project has changed, updating the dynamic data set based on the changed key variable;

[0032] Based on the panel controls corresponding to the key variables in the updated dynamic data set, the binding of each panel control in the panel layout file is updated to update the interactive control panel.

[0033] The present application also provides an electronic device, the electronic device comprising:

[0034] Processor and memory;

[0035] The processor is used to execute the steps of the method for generating an interactive control panel for vehicle testing provided in any embodiment of the present application by calling the program or instruction stored in the memory.

[0036] An embodiment of the present application also provides a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute the steps of the method for generating an interactive control panel for vehicle testing provided in any embodiment of the present application.

[0037] In summary, the present application proposes a method for generating an interactive control panel for vehicle testing, which first extracts key variables corresponding to a test project from a vehicle test application, generates a dynamic data set based on the key variables, and then calls a preset generation tool to generate a panel layout file based on a panel layout sketch and corresponding prompt words, and obtains corresponding graphical interface code information, and then binds each key variable to the corresponding panel control in the panel layout file according to the panel control corresponding to each key variable in the dynamic data set, and finally generates an interactive control panel by running the graphical interface code information, so that the user can control the compilation and operation of the test project through the interactive control panel, and control the bound key variables by operating the panel controls in the interactive control panel, thereby realizing the generation of an interactive control panel, so that the user can perform vehicle automation testing more intuitively and conveniently, thereby improving the test efficiency. Test efficiency, this method generates a dynamic data set by extracting key variables in the test project, avoiding the need to associate specific variables in traditional methods, simplifying the entire process, and reducing the complexity of generating interactive control panels. In addition, this method converts the panel layout file into graphical interface code information, and can realize an interactive control panel based on a graphical user interface. Combined with the simple maintenance characteristics of the graphical user interface, when the variables involved or the functions of the variables change, the maintenance cost can be reduced. Moreover, since the key variables in the dynamic data set are associated with the interactive control panel based on the graphical user interface, there is no need to check whether variables that do not exist in the current test project are used, which can improve compatibility. In addition, this method can call a preset generation tool to generate graphical interface code information, further improving the degree of automated testing, reducing manual intervention, and improving the accuracy and reliability of testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0039] Figure 1 is a flow chart of a method for generating an interactive control panel for vehicle testing provided in an embodiment of the present application;

[0040] Figure 2 is a schematic diagram of a generation process of an interactive control panel provided in an embodiment of the present application;

[0041] Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0043] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0044] Before introducing in detail the method for generating an interactive control panel for vehicle testing provided in an embodiment of the present application, the technical problem solved by the method is first described.

[0045] In the prior art, the writing process of the panel-based interactive control panel is cumbersome and requires associating specific variables, which makes the whole process cumbersome and increases the workload of developers. Secondly, writing the panel requires a certain understanding of CANoe and CAPL (Communication Access Programming Language, scripting language), which may be difficult for developers without relevant knowledge and skills. In addition, since the variables or functions of the variables involved in the panel may change, the maintenance cost will be relatively high. Finally, if the panel is created in other projects, it may be necessary to check whether variables that do not exist in the current project are used, which may cause compatibility issues.

[0046] Therefore, in order to solve the above problems, an embodiment of the present application provides a method for generating an interactive control panel for vehicle testing, which solves the problems of cumbersome generation of interactive control panels, high maintenance costs, and poor compatibility in the prior art.

[0047] Figure 1 is a flow chart of a method for generating an interactive control panel for vehicle testing provided by an embodiment of the present application. Figure 1 The method for generating an interactive control panel for vehicle testing specifically includes:

[0048] S110 , extracting key variables corresponding to the test project from the vehicle test application, and generating a dynamic data set based on the key variables.

[0049] Among them, the vehicle test application can be CANoe. CANoe can be used to perform automated testing of the vehicle. Exemplarily, the vehicle test application can be used to test the vehicle's autonomous driving functions, such as adaptive cruise control, lane keeping assist, automatic parking, etc., or the vehicle test application can also be used to test the communication functions of each module in the vehicle, such as testing whether the T-Box (Telematics Box, on-board communication module) in the vehicle can send signals to other modules in a timely manner, or testing whether the T-Box in the vehicle can send signals to the cloud or remote service platform in a timely manner.

[0050] In this embodiment, the test project can be understood as a vehicle test project constructed in a vehicle test application. Specifically, the vehicle test application can provide a component object model (COM) service, such as a CANoe COM server provided by CANoe; through the component object model service provided by the vehicle test application, all variables of the test project in the vehicle test application can be accessed, and key variables can be identified and extracted therefrom to form a dynamic data set.

[0051] In a specific implementation, extracting key variables corresponding to the test project from the vehicle test application includes:

[0052] Establish a connection with the vehicle test application, and start the project instance in the vehicle test application through the connection; obtain all available variables in the test project corresponding to the started project instance, and extract key variables corresponding to the test project from all available variables.

[0053] Specifically, a COM object can be created through Python's win32com.client module to establish a connection with the vehicle test application.

[0054] Furthermore, the Dispatch or DispatchEx method may be called to connect and start a project instance in the vehicle test application, wherein the project instance may be a CANoe instance in the vehicle test application, and the project example may be understood as a test item in the test project.

[0055] After connecting to the project instance in the vehicle test application, you can verify whether the connection is successful. For example, if a connection success response returned by the vehicle test application is detected, it can be determined that the connection is successful, and then it can be ensured that subsequent operations can be performed in a valid session.

[0056] Furthermore, an API (Application Programming Interface) provided by a component object model service (CANoe COM server) may be called to obtain all available variables in the test project, and then key variables corresponding to the test project may be extracted from all available variables.

[0057] In this embodiment, all available variables can be divided into three types: signal variables, system variables and environment variables. Among them, signal variables can be variables involved in the signals transmitted by various modules in the vehicle, such as the switch status of the lights, the steering wheel speed of the vehicle, the speed gear of the vehicle, etc.; system variables can be variables involved in various systems in the vehicle, such as the status of the chassis control system, etc.; environment variables can be variables that describe the test environment of the vehicle test, such as the definition of the road network, the number of lane lines, etc.

[0058] Specifically, the key variables may refer to the variables that are focused on in the vehicle automation test. In this embodiment, the key variables corresponding to the test project may be pre-set according to the actual test requirements under the test project.

[0059] Optionally, extract key variables corresponding to the test project from all available variables, including:

[0060] Traverse the namespace of the test project to determine the network name under the namespace, the network node name under the network name, and the variable properties of each available variable under the network node name; based on the preset network name, preset network node name and preset variable properties corresponding to the test project, extract the key variables corresponding to the test project in the namespace of the test project.

[0061] The variable attributes of each available variable may be stored in a multi-level manner. For example, the available variables may be stored in a tree structure, with the top layer being the namespace, the second layer being the network name, the third layer being the network node name, and the bottom layer being the variable attributes.

[0062] Specifically, the namespace of the test project can be traversed to determine each network name under the namespace, each network node name under each network name, and each variable attribute of each available variable under each network node name. The variable attributes may include variable name, variable identifier, variable type, variable position, etc.

[0063] In this embodiment, the preset network name, preset network node name and preset variable attributes corresponding to the test project can be specified in advance according to the actual test requirements under the test project, and then the preset network name, preset network node name and preset variable attributes can be used to utilize Python's data processing capabilities to screen out key variables from all available variables.

[0064] Through the above implementation, all key variables corresponding to the test project can be screened, avoiding the need to manually associate specific variables in the traditional Panel-based interactive control panel, simplifying the entire interactive control panel generation process and reducing the workload of developers.

[0065] After obtaining the key variables corresponding to the test project, further, a test data set containing all the key variables can be dynamically generated, that is, a dynamic data set is generated. In this embodiment, the purpose of generating a dynamic data set is that the generated dynamic data set can be used for binding between subsequent key variables and panel controls, and can also provide data support for vehicle testing. The dynamic data set not only needs to contain the variable information of each key variable, but also needs to clarify the corresponding relationship between the key variables and the panel controls.

[0066] In a specific implementation, generating a dynamic data set based on key variables includes:

[0067] Obtain variable information of key variables, where the variable information includes variable source, variable description, variable initial value, variable maximum value, variable minimum value and data type; determine the panel controls and control events corresponding to the key variables, and generate dynamic data sets based on the variable information of the key variables, the panel controls and control events corresponding to the key variables.

[0068] Specifically, for each key variable, the variable source (such as signal variable, system variable or environment variable), variable description (such as description of the meaning of the variable), variable initial value, variable maximum value, variable minimum value and data type of the key variable can be obtained.

[0069] Furthermore, for each key variable, the panel controls corresponding to the key variable can also be determined, such as buttons, text boxes, input boxes, drop-down boxes, selection boxes, indicator lights, charts, etc.; and the control events corresponding to the key variables can be determined.

[0070] Among them, the control event can be a trigger operation that can be executed under the corresponding panel control, such as, for a button, the control event can be a click or a drag; or, the control event can also be a data condition that triggers the corresponding panel control, such as, the panel control can be triggered by the user when the value of the key variable is greater than the set threshold; or, the control event can also be a prerequisite for the corresponding panel control to be triggered, such as when the set operation is completed, the panel control becomes clickable.

[0071] Furthermore, a dynamic data set can be generated based on the variable information of the key variables, the panel controls corresponding to the key variables, and the control events, so that the dynamic data set can not only contain the variable information of each key variable, but also describe the corresponding relationship between the key variables and the panel controls. The dynamic data set can be represented in JSON (JavaScript Object Notation, JS object notation) format.

[0072] Through the above implementation, a dynamic data set describing the variable information of each key variable and the corresponding relationship between the key variables and the panel controls can be obtained, so as to facilitate subsequent variable mapping based on the dynamic data set and bind the corresponding panel controls.

[0073] S120, calling a preset generation tool, generating a panel layout file based on the panel layout sketch and corresponding prompt word information, and determining graphical interface code information corresponding to the panel layout file.

[0074] The preset generation tool may be AIGC (Artificial Intelligence Generated Content). The panel layout sketch may be a UI (User Interface) sketch. The prompt word information corresponding to the panel layout sketch may describe the function of each panel control in the panel layout sketch, or describe the process of user interaction with the panel.

[0075] In this embodiment, AIGC may be called to generate a panel layout file through a panel layout sketch and corresponding prompt word information, and the panel layout file is converted into graphical interface code information.

[0076] In a specific implementation, generating a panel layout file based on the panel layout sketch and corresponding prompt word information includes:

[0077] A panel layout sketch is obtained, and an initial panel layout file is generated based on the panel layout sketch; prompt word information corresponding to the panel layout sketch is obtained, and the initial panel layout file is adjusted according to the prompt word information to obtain a final panel layout file.

[0078] The panel layout sketch may include at least one panel control, the information to be displayed, and how the user interacts with the panel. The panel layout sketch may be defined in advance according to the requirements of automated testing. For example, a panel layout sketch may be drawn using Sketch to determine the layout of the panel, including the positions and functions of panel controls such as buttons, text boxes, drop-down boxes, selection boxes, indicator lights, and charts.

[0079] The prompt word information corresponding to the panel layout sketch can be used to define the control function and user interaction process.

[0080] Optionally, obtain the prompt word information corresponding to the panel layout sketch, including:

[0081] Get the function prompt words of each panel control in the panel layout sketch, and get the process information of the user interaction of the panel layout sketch; use the function prompt words and the process information as the prompt word information corresponding to the panel layout sketch.

[0082] Among them, the function prompt words of each panel control can be the function description defined for each panel control. For example, a button may have functions such as "start test", "stop test", "set parameters", etc.; text boxes, drop-down boxes, and selection boxes have options that need to be displayed and interacted; chart elements have variable change trends that need to be reflected, etc. The process information of user interaction can specifically describe the process of user interaction with the panel, including how the user triggers an event and the expected feedback after the event is triggered.

[0083] In this embodiment, the function prompt words of each panel control and the process information of user interaction can be used as the prompt word information corresponding to the panel layout sketch, so as to facilitate the subsequent improvement of the control function and user interaction process in the panel layout file.

[0084] Specifically, the development environment may be selected as Qt (graphical user interface application development framework), and a panel layout sketch may be uploaded to a preset generation tool to generate an initial panel layout file through the preset generation tool. The panel layout file may be a .ui file.

[0085] Furthermore, the initial panel layout file can be adjusted according to the prompt word information corresponding to the panel layout sketch to improve the control function and user interaction process, and further generate the final panel layout file.

[0086] After the final panel layout file is obtained, the panel layout file may be further converted into a GUI (Graphical User Interface) code to obtain graphical interface code information corresponding to the panel layout file.

[0087] For example, the pyuic tool can be used to convert the panel layout file (.ui file) into Python code to obtain the corresponding graphical interface code information. Considering that after obtaining the GUI code, the converted code may need further adjustment and optimization to ensure that the code meets the layout and functional requirements of the designed sketch, the graphical interface code information can also be displayed to the user after it is obtained so that the user can adjust and optimize the graphical interface code information.

[0088] Optionally, after determining the graphical interface code information corresponding to the panel layout file, the following is further included:

[0089] The graphical interface code information is displayed to obtain adjustment information for the panel controls in the panel layout file and event processing functions for the panel controls; the panel controls in the panel layout file are adjusted based on the adjustment information, and event processing functions are added for the panel controls.

[0090] Specifically, after obtaining the graphical interface code information, the graphical interface code information can be displayed so that the user can modify the graphical interface code information, such as adjusting the panel controls in the panel layout file by modifying the code, or adding event processing functions to the panel controls by modifying the code.

[0091] After displaying the graphical interface code information, the user's adjustment information for the graphical interface code information for the panel control can be obtained, such as adjusting the size, color, font or display position of the panel control, and the event processing function added by the user in the graphical interface code information for the panel control can also be obtained.

[0092] Among them, the event processing function can be a function that processes the corresponding key variables after the panel control is triggered, such as rounding the value of the corresponding key variable; or, the event processing function can be a function that further processes the results processed by other panel controls, such as summing the results calculated by other panel controls.

[0093] In the above implementation, after obtaining the graphical interface code information, by displaying the graphical interface code information, the user can optimize the GUI code, such as adjusting panel controls or adding event processing functions, which can further ensure that the GUI code meets the layout and functional requirements of the design sketch.

[0094] S130. Based on the panel controls corresponding to the key variables in the dynamic data set, bind the key variables to the corresponding panel controls in the panel layout file.

[0095] Specifically, after obtaining the dynamic data set and the graphical interface code information, each panel control in the graphical interface code information can be associated with the corresponding key variable in the dynamic data set. For example, each key variable can be bound to the corresponding panel control in the panel layout file according to the corresponding relationship between each key variable described in the dynamic data set and the panel control.

[0096] In a specific implementation, based on the panel controls corresponding to the key variables in the dynamic data set, each key variable is bound to the corresponding panel control in the panel layout file, including:

[0097] Based on the panel controls and control events corresponding to each key variable in the dynamic data set, create interactive controls for the panel controls in the panel layout file, and bind the event processing functions corresponding to the panel controls to the interactive controls, so as to bind each key variable to the corresponding panel controls in the panel layout file.

[0098] Specifically, for each panel control, interactive control, i.e., GUI control, can be created for the panel control through the panel controls and control events corresponding to the key variables declared in the dynamic data set. Interactive control can refer to the operation and management of panel controls, including the state setting and control events of buttons, menus, text boxes, list boxes and other controls on the interface.

[0099] Furthermore, the interactive control can be bound to the event processing function added in the graphical interface code information, so that when the user subsequently triggers the panel control, the corresponding key variables can be processed through the event processing function bound to the interactive control, or the results of processing by other panel controls can be further processed.

[0100] Through the above implementation, it is possible to implement binding between each key variable and the corresponding panel control, bind the corresponding key variables, control events and event processing functions to the panel controls, and facilitate subsequent users to interactively control the panel controls displayed in the interactive control panel to trigger various functions.

[0101] S140, generating an interactive control panel by running the graphical interface code information, so that the user can control the compilation and operation of the test project through the interactive control panel, and control the bound key variables by operating the panel controls in the interactive control panel.

[0102] Specifically, after completing the binding between the panel controls and the key variables, the graphical interface code information can be run to deploy the graphical interface code information to the real test environment, generate an interactive control panel, and realize the generation of a CANoe automated test interactive control panel based on CANoeCOM server and AIGC.

[0103] After generating the interactive control panel, the user can control the compilation and operation of the test project based on the interactive control panel to perform automated testing. For example, the user can operate the panel control for managing compilation on the interactive control panel, and then when it is detected that the user operates the panel control for managing compilation, the compilation of the test project is realized by calling CANoe.

[0104] In addition, the user can also control the bound key variables through the panel controls in the interactive control panel, for example, modify the value of the bound key variables, or modify the state of the bound key variables, such as modifying the on / off state of the car lights.

[0105] It should be noted that in an embodiment of the present application, the panel controls in the interactive control panel can change with the changes of the corresponding key variables, that is, the state of the GUI elements (panel controls) in the interactive control panel can reflect the state of the key variables in the dynamic data set and be updated in real time.

[0106] Optionally, the method provided in the embodiment of the present application further includes:

[0107] In response to detecting changes in key variables corresponding to the test project, the dynamic data set is updated based on the changed key variables; based on the panel controls corresponding to each key variable in the updated dynamic data set, the binding of each panel control in the panel layout file is updated to update the interactive control panel.

[0108] Specifically, since the embodiment of the present application constructs a dynamic data set, the data in the dynamic data set can be updated in real time. Therefore, if a change is detected in the key variables corresponding to the test project, for example, a change in the maximum value or minimum value of the key variable or a change in the corresponding panel control, the dynamic data set can be updated according to the changed key variables.

[0109] Furthermore, the binding of each panel control in the panel layout file may be updated according to the panel control corresponding to each key variable in the updated dynamic data set, so as to update the interactive control panel.

[0110] Through the above method, since the acquisition and definition of dynamic data sets are standardized and the GUI elements are bound to the corresponding key variables in the dynamic data sets, when the test project in CANoe changes, the changes in the dynamic data sets can be synchronized with the changes in the test project in CANoe. At the same time, the generated interactive control panel can also be synchronized with the changes in the dynamic data sets.

[0111] The method for generating an interactive control panel for vehicle testing provided in the embodiment of the present application can be referred to in detail. Figure 2 , Figure 2is a schematic diagram of a generation process of an interactive control panel provided in an embodiment of the present application, such as Figure 2 As shown, first, in the variable extraction module, you can connect to the CANoe COM server, and then read all available variables of the test project, get the project variable list, and filter the key variables as necessary variables to generate a dynamic test data set.

[0112] Furthermore, in the GUI code generation module, a GUI layout sketch may be designed, and the AIGC tool may be used to transform the UI sketch, adjust and optimize the GUI code, and generate the GUI code based on the AIGC tool.

[0113] Furthermore, in the GUI mapping module, data binding can be created, that is, GUI elements are bound to key variables, and data synchronization can be achieved, that is, the dynamic data set is updated synchronously according to the changes in the test project, and then the GUI code is integrated into the test environment to generate an interactive control panel, and finally the test and verification can be achieved through the interactive control panel. In the test process of the test project, the value of each key variable can be the initial value in the dynamic data set, and can also be obtained by sampling in combination with the maximum value and the maximum value in the dynamic data set.

[0114] Compared with the prior art, the method provided in the embodiment of the present application has the following technical effects:

[0115] 1. Simplify the writing process: Based on the CANoe COM server, the programming language is used to call and access the various function templates and system variables of the CANoe project to generate dynamic data sets, avoiding the need to associate specific variables with the traditional panel-based interactive control panel, thereby simplifying the writing process and reducing the workload of developers.

[0116] 2. Improve efficiency: By designing and implementing an interactive control panel based on a graphical user interface (GUI), such as Qt, users can perform automated testing more intuitively and conveniently, thereby improving testing efficiency.

[0117] 3. Reduce maintenance costs: Since the embodiment of the present application adopts a GUI-based interactive control panel, and the maintenance of the GUI is relatively simple, when the variables or functions involved change, the maintenance cost will be relatively low.

[0118] 4. Improve compatibility: Since the embodiment of the present application implements an interactive control panel based on GUI, and GUI has good compatibility, even if a Panel is created in other projects, since the data set is dynamically generated and associated with the generated GUI interface, there is no need to check whether signals or variables that do not exist in the current project are used, thereby improving compatibility.

[0119] 5. Improve the degree of automation: The embodiment of the present application uses a powerful AIGC tool to generate GUI code, thereby further improving the degree of automated testing, reducing manual intervention, and improving the accuracy and reliability of testing.

[0120] The method for generating an interactive control panel for vehicle testing provided in an embodiment of the present application first extracts key variables corresponding to a test project from a vehicle test application, generates a dynamic data set based on the key variables, and then calls a preset generation tool to generate a panel layout file based on a panel layout sketch and corresponding prompt words, and obtains corresponding graphical interface code information, and then binds each key variable to the corresponding panel control in the panel layout file based on the panel control corresponding to each key variable in the dynamic data set, and finally generates an interactive control panel by running the graphical interface code information, so that the user can control the compilation and operation of the test project through the interactive control panel, and control the bound key variables by operating the panel controls in the interactive control panel, thereby realizing the generation of an interactive control panel, so that the user can perform vehicle automation testing more intuitively and conveniently, thereby improving the test efficiency. The method generates a dynamic data set by extracting key variables in the test project, avoiding the need to associate specific variables in the traditional method, simplifying the entire process, and reducing the complexity of generating an interactive control panel. In addition, the method converts the panel layout file into graphical interface code information, and can realize an interactive control panel based on a graphical user interface. Combined with the simple maintenance characteristics of the graphical user interface, when the variables involved or the functions of the variables change, the maintenance cost can be reduced. Since the key variables in the dynamic data set are associated with the interactive control panel based on the graphical user interface, there is no need to check whether variables that do not exist in the current test project are used, which can improve compatibility. In addition, the method can call a preset generation tool to generate graphical interface code information, further improving the degree of automated testing, reducing manual intervention, and improving the accuracy and reliability of testing.

[0121] Figure 3 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 3 As shown, the electronic device 400 includes one or more processors 401 and a memory 402 .

[0122] The processor 401 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.

[0123] The memory 402 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 301 may run the program instructions to implement the method for generating an interactive control panel for vehicle testing of any embodiment of the present application described above and / or other desired functions. Various contents such as initial external parameters, thresholds, etc. may also be stored in the computer-readable storage medium.

[0124] In one example, the electronic device 400 may further include: an input device 403 and an output device 404, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown). The input device 403 may include, for example, a keyboard, a mouse, etc. The output device 404 may output various information to the outside, including early warning information, braking force, etc. The output device 404 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.

[0125] Of course, to simplify, Figure 3 Only some of the components related to the present application in the electronic device 400 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application conditions, the electronic device 400 may also include any other appropriate components.

[0126] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method for generating an interactive control panel for vehicle testing provided in any embodiment of the present application.

[0127] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0128] In addition, an embodiment of the present application may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enables the processor to execute the steps of a method for generating an interactive control panel for vehicle testing provided in any embodiment of the present application.

[0129] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0130] It should be noted that the terms used in this application are only for describing specific embodiments, rather than limiting the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements.

[0131] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. 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 an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0132] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and its core ideas of this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression and the objective existence of infinite specific structures, ordinary technicians in this technical field can make several improvements, modifications or changes without departing from the principles of this application, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the concept and technical solution of the invention to other occasions without improvement, should be regarded as the scope of protection of this application.

Claims

1. A method for generating an interactive control panel for vehicle testing, characterized in that: include: Extracting key variables corresponding to the test project from the vehicle test application, and generating a dynamic data set based on the key variables; Calling a preset generation tool to generate a panel layout file based on the panel layout sketch and corresponding prompt word information, and determining graphical interface code information corresponding to the panel layout file; Based on the panel controls corresponding to the key variables in the dynamic data set, binding the key variables to the corresponding panel controls in the panel layout file; An interactive control panel is generated by running the graphical interface code information, so that the user can control the compilation and operation of the test project through the interactive control panel, and control the bound key variables by operating the panel controls in the interactive control panel.

2. The method according to claim 1, characterized in that The key variables corresponding to the test project are extracted from the vehicle test application, including: Establishing a connection with the vehicle test application, and starting a project instance in the vehicle test application through the connection; In the test project corresponding to the started project instance, all available variables are obtained, and key variables corresponding to the test project are extracted from all available variables.

3. The method according to claim 2, characterized in that The step of extracting key variables corresponding to the test project from all available variables includes: Traversing the namespace of the test project to determine a network name under the namespace, a network node name under the network name, and variable properties of each available variable under the network node name; Based on the preset network name, preset network node name and preset variable attributes corresponding to the test project, key variables corresponding to the test project are extracted in the namespace of the test project.

4. The method according to claim 1, characterized in that: The generating a dynamic data set based on the key variables comprises: Obtaining variable information of the key variable, wherein the variable information includes variable source, variable description, variable initial value, variable maximum value, variable minimum value and data type; Determine the panel controls and control events corresponding to the key variables, and generate a dynamic data set based on the variable information of the key variables, the panel controls and control events corresponding to the key variables.

5. The method according to claim 1, characterized in that The generating of the panel layout file based on the panel layout sketch and the corresponding prompt word information includes: Acquire a panel layout sketch, and generate an initial panel layout file based on the panel layout sketch; Obtain prompt word information corresponding to the panel layout sketch, adjust the initial panel layout file according to the prompt word information, and obtain a final panel layout file.

6. The method according to claim 5, characterized in that The obtaining of prompt word information corresponding to the panel layout sketch includes: Obtaining function prompts of each panel control in the panel layout sketch, and obtaining process information of user interaction of the panel layout sketch; The function prompt word and the process information are used as prompt word information corresponding to the panel layout sketch.

7. The method according to claim 4, characterized in that After determining the graphical interface code information corresponding to the panel layout file, the method further includes: Displaying the graphical interface code information to obtain adjustment information for the panel controls in the panel layout file and event processing functions for the panel controls; The panel controls in the panel layout file are adjusted based on the adjustment information, and the event processing function is added to the panel controls.

8. The method according to claim 7, characterized in that The binding of each key variable with the corresponding panel control in the panel layout file based on the panel control corresponding to each key variable in the dynamic data set includes: Based on the panel controls and control events corresponding to each key variable in the dynamic data set, interactive controls are created for the panel controls in the panel layout file, and event processing functions corresponding to the panel controls are bound to the interactive controls to bind each key variable to the corresponding panel controls in the panel layout file.

9. The method according to claim 1, characterized in that: The method further comprises: In response to detecting that a key variable corresponding to the test project has changed, updating the dynamic data set based on the changed key variable; Based on the panel controls corresponding to the key variables in the updated dynamic data set, the binding of each panel control in the panel layout file is updated to update the interactive control panel.

10. An electronic device, characterized in that: The electronic device comprises: Processor and memory; The processor is used to execute the steps of the method for generating an interactive control panel for vehicle testing as claimed in any one of claims 1 to 9 by calling the program or instructions stored in the memory.