Test method and device of control system, electronic equipment and storage medium

By obtaining and processing application layer files and logic layer files, automatically update and converting simulation models, generating object codes, and conducting tests, the problem of low testing efficiency of vehicle control system is solved, and automated testing processes and efficient test results are realized.

CN119668234APending Publication Date: 2025-03-21CHINA FAW CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411793818.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

During the testing process, the vehicle control system has problems such as confusing versions, cumbersome testing steps, and manual files adding errors are prone to errors, resulting in low testing efficiency.

Method used

By obtaining application layer files and logic layer files, responding to model update instructions and code conversion instructions, automatically update and converting simulation models, generating object codes, and testing based on logic layer files and object codes, implementing automated testing processes.

Benefits of technology

It improves the testing efficiency of the vehicle control system, reduces the error rate of manual operation, and realizes a standardized testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668234A_ABST
    Figure CN119668234A_ABST
Patent Text Reader

Abstract

The invention discloses a test method and device of a control system, electronic equipment and a storage medium. The method comprises the steps that in response to a received test instruction of a control system, an application layer file and a logic layer file of the control system are obtained, the application layer file is used for representing a file for achieving interactive operation in the control system, and the logic layer file is used for representing a file for achieving logic processing in the control system; a model updating instruction for the application layer file is responded, an initial simulation model corresponding to the application layer file is updated based on updating parameters carried by the model updating instruction, a simulation model is obtained, and the initial simulation model is constructed based on the application layer file; in response to a code conversion instruction for the simulation model, performing code conversion on the simulation model to obtain a target code; and testing the control system based on the logic layer file and the target code to obtain a test result. According to the invention, the technical problem of low test efficiency of the vehicle control system is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicles, and in particular to a test method, device, electronic equipment and storage medium for a control system. Background Art

[0002] With the increasing level of automotive intelligence, the introduction of the Automotive Software Process Improvement and Capability Determination (ASPICE) model and the Automotive Open System Architecture (AUTOSAR), and the increase in software complexity, the frequency of software integration is increasing. When building a vehicle control system, after developing the simulation and link (simul ink) model and underlying software locally, upload the simulation model and underlying software to the cloud server, convert the model into code, and then perform unified integration.

[0003] However, in the process of building a vehicle control system, due to the numerous development steps and complex tasks, version confusion is prone to occur, which makes the testing work more difficult. In addition, in the process of testing the vehicle control system, when updating the simul ink model, more MATLAB (an integrated development environment) commands are required, and the model update steps are relatively cumbersome. In addition, during the test process, engineers are required to manually add various function files, and the probability of error is high. Therefore, there are technical problems such as the difficulty of testing the vehicle control system and the low test efficiency.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a control system testing method, device, electronic device and storage medium to at least solve the technical problem of low vehicle control system testing efficiency.

[0006] According to one aspect of an embodiment of the present invention, a control system testing method is provided, comprising: in response to receiving a test instruction of the control system, obtaining an application layer file and a logic layer file of the control system, wherein the application layer file is used to represent a file for implementing interactive operations in the control system, and the logic layer file is used to represent a file for implementing logic processing in the control system; in response to a model update instruction for the application layer file, updating an initial simulation model corresponding to the application layer file based on update parameters carried by the model update instruction to obtain a simulation model, wherein the initial simulation model is constructed based on the application layer file; in response to a code conversion instruction for the simulation model, converting the simulation model into a target code; and testing the control system based on the logic layer file and the target code to obtain a test result, wherein the test result is used to indicate whether the control system has passed the test.

[0007] Optionally, the control system is tested based on the logic layer file and the target code to obtain a test result, including: responding to a first test instruction for the control system, placing the target code in the target path where the logic layer file is located for testing, and obtaining a logic test result, wherein the first test instruction is used to test the logic function of the control system, and the logic test result is used to indicate whether the logic function of the control system is normal; when the logic test result is that the logic function is normal, responding to a second test instruction for the control system, testing the control function of the control system based on the target code and the logic layer file, and obtaining a control test result, wherein the second test instruction is used to test the control function of the control system, and the control test result is used to indicate whether the control function is normal; in response to the control test result being that the control function is normal, determining that the test result is that the control system test has passed.

[0008] Optionally, the control function of the control system is tested based on the target code and the logic layer file to obtain a control test result, including: integrating the application layer software and the logic layer software of the control system based on the target code and the logic layer file to obtain an integration result; and testing the control function based on the integration result to obtain a control test result.

[0009] Optionally, the application layer software and logic layer software of the control system are integrated based on the target code and the logic layer file to obtain an integration result, including: responding to a conversion instruction for the target code, calling a preset program to convert the target code into an executable file; integrating the application layer software and the logic layer software based on the executable file and the logic layer file to obtain an integration result.

[0010] Optionally, the application layer software and the logic layer software are integrated based on the executable files and the logic layer files to obtain an integration result, including: deleting duplicate files in the executable files and the logic layer files to obtain a deletion result; determining modified files in the executable files and the logic layer files based on integration rules, wherein the modified files are used to represent files to be modified during the integration process; and integrating the application layer software and the logic layer software based on the deletion result and the modified files to obtain an integration result.

[0011] Optionally, after testing the control system based on the logic layer file and the target code and obtaining the test results, the method also includes: in response to the test result that the control system test passed, outputting the integration result; in response to an upload instruction for the integration result, uploading the integration result to the target server; in response to a flash instruction for the integration result, flashing the integration result to the target vehicle.

[0012] Optionally, in response to receiving an update instruction of the control system, obtaining application layer files and logic layer files of the control system includes: in response to receiving an update instruction of the control system, displaying a software interface of the control system, wherein the software interface includes at least one first version information and at least one second version information of the control system, the first version information is used to represent the version information of the application layer files, and the second version information is used to represent the version information of the logic layer files; in response to a confirmation instruction for a first target version information in at least one first version information, obtaining application layer files corresponding to the first target version information; in response to a confirmation instruction for a second target version information in at least one second version information, obtaining logic layer files corresponding to the second target version information.

[0013] According to another aspect of an embodiment of the present invention, a test device for a control system is also provided, including: an acquisition module, used to acquire application layer files and logic layer files of the control system in response to receiving a test instruction of the control system, wherein the application layer files are used to represent files that implement interactive operations in the control system, and the logic layer files are used to represent files that implement logical processing in the control system; an update module, used to respond to a model update instruction for the application layer file, update an initial simulation model corresponding to the application layer file based on update parameters carried by the model update instruction, and obtain a simulation model, wherein the initial simulation model is constructed based on the application layer file; a conversion module, used to respond to a code conversion instruction for the simulation model, perform code conversion on the simulation model, and obtain a target code; a test module, used to test the control system based on the logic layer file and the target code, and obtain a test result, wherein the test result is used to indicate whether the control system has passed the test.

[0014] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the above-mentioned control system test method is executed when the program is running.

[0015] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program runs, the device where the storage medium is located is controlled to execute the above-mentioned control system testing method.

[0016] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the above-mentioned control system testing method.

[0017] In an embodiment of the present invention, in response to receiving a test instruction of a control system, an application layer file and a logic layer file of the control system are obtained, wherein the application layer file is used to represent a file for implementing interactive operations in the control system, and the logic layer file is used to represent a file for implementing logic processing in the control system; in response to a model update instruction for the application layer file, an initial simulation model corresponding to the application layer file is updated based on update parameters carried by the model update instruction to obtain a simulation model, wherein the initial simulation model is constructed based on the application layer file; in response to a code conversion instruction for the simulation model, the simulation model is converted into code to obtain a target code; the control system is tested based on the logic layer file and the target code to obtain a test result, wherein the test result is used to indicate whether the control system has passed the test. It is easy to notice that the initial simulation model corresponding to the application layer file is updated through the update parameters carried by the model update instruction, avoiding the use of trivial integrated development environment commands to update the initial simulation model; the application layer files and logic layer files used for control system testing are obtained, and the versions of the application layer files and logic layer files can be replaced more conveniently during testing; the application layer files and logic layer files of the control system are obtained, and the application layer files are processed using the update parameters and code conversion instructions carried by the model update instruction to obtain the target code, and the control system is tested based on the logic layer files and the target code, completing the standardized test process of the logic layer files and application layer files, avoiding the high error rate and cumbersome operation caused by manually adding files during the test process. The purpose of improving the test efficiency of the vehicle control system is achieved, thereby solving the technical problem of low test efficiency of the vehicle control system. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0019] Figure 1 is a flow chart of a control system testing method according to an embodiment of the present invention;

[0020] Figure 2 is a flow chart of an optional control system testing method according to an embodiment of the present invention;

[0021] Figure 3 is a schematic diagram of a test device for a control system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] Example 1

[0025] According to an embodiment of the present invention, an embodiment of a test method for a control system is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0026] Figure 1 is a flow chart of a control system testing method according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0027] Step S102, in response to receiving a test instruction of the control system, obtaining application layer files and logic layer files of the control system, wherein the application layer files are used to represent files for implementing interactive operations in the control system, and the logic layer files are used to represent files for implementing logical processing in the control system.

[0028] The test instructions in the above steps are used to test the vehicle control system and can trigger the execution of the control system test method.

[0029] The application layer files in the above steps are files used to represent interactive operations in the vehicle control system. They usually refer to files that describe system functions and behaviors at a high level of abstraction. They can be MATLAB model files, but are not limited to them. Application layer files usually include user interfaces, input and output processing, algorithm implementation, etc.

[0030] The logic layer file in the above steps is used to represent the file that implements the logic processing in the vehicle control system. It usually refers to the file that implements the system functions and logic at the bottom layer. It can be the bottom layer software, but it is not limited to this. The logic layer file is responsible for processing the instructions from the application layer, performing the corresponding operations and returning the results to the application layer.

[0031] In an optional embodiment, after receiving the test instruction of the control system, the software executing the test method of the control system opens the software interface and displays all the application layer files and logic layer files on the server to the user, wherein the application layer files may include but are not limited to MATLAB model files, and the logic layer files may include but are not limited to the underlying software. After the user selects the required application layer files and logic layer files, the software executing the test method of the control system will download the application layer files and logic layer files of the control system from the server to the local computer, thereby completing the acquisition of the application layer files and logic layer files of the control system.

[0032] Step S104, in response to the model update instruction for the application layer file, the initial simulation model corresponding to the application layer file is updated based on the update parameters carried in the model update instruction to obtain a simulation model, wherein the initial simulation model is constructed based on the application layer file.

[0033] The model update instruction in the above steps is an instruction for updating the initial simulation model corresponding to the application layer file, and may be an Automotive Open System Architecture Extensible Markup Language (arxml) file, but is not limited thereto.

[0034] The update parameters in the above steps are parameters carried by the model update instruction, which are used to guide the specific update steps and update methods of the initial simulation model.

[0035] The initial simulation model in the above steps is an original model built based on the application layer file, which is used to describe the behavior and function of the vehicle control system. It can be a vehicle dynamics model or a vehicle control algorithm model, but is not limited to this.

[0036] The simulation model in the above steps is the latest model obtained after updating with the guidance of the update parameters. The addition of new functions can be completed through the update. New functions can be added to the initial simulation model or the original functions of the initial simulation model can be improved, so that the updated simulation model can better meet the requirements of system performance, efficiency or safety. The parameters of the initial simulation model can also be adjusted through updating to optimize the performance of the control system or adapt to more working environments. The interface of the initial simulation model can also be modified through updating so that the updated simulation model can adapt to the requirements of other systems or components. The code optimization of the initial simulation model can also be implemented during the update process to improve the operating efficiency of the control system or reduce resource consumption. Errors in the initial simulation model can also be repaired through updating to ensure the stability and reliability of the control system. However, the purpose of updating may not be limited to this.

[0037] In an optional embodiment, the model update instruction can be an arxml file, but is not limited to this. The arxml file can be downloaded from a server by software that implements a test method for a control system. The initial simulation model can be a MATLAB model file that can implement the basic functions of the control system and is built based on an application layer file. The software extracts update parameters that can characterize the vehicle control system configuration information and interface definitions from the arxml file, and then automatically runs a script file in MATLAB that is used to execute a series of MATLAB commands based on the update parameters to update the initial simulation model and obtain a simulation model. Among them, the script file can be a file with a .m extension, but is not limited to this.

[0038] The initial simulation model corresponding to the application layer file is updated using the update parameters carried by the model update instruction, which avoids manually entering a large number of MATLAB commands for the initial simulation model and improves the model update efficiency. By updating the initial simulation model, the latest configuration information, parameter settings, and interface definitions can be synchronized to the simulation model, making the updated simulation model more in line with actual needs.

[0039] Step S106, responding to the code conversion instruction for the simulation model, performing code conversion on the simulation model to obtain target code.

[0040] The code conversion instructions in the above steps are instructions for converting the simulation model into target codes.

[0041] The target code in the above steps is a code that can be used in a vehicle electronic control unit to implement vehicle control functions and complies with the Automotive Open System Architecture (AUTOSAR) standard.

[0042] In an optional embodiment, a code conversion instruction can be generated by selecting a code generation option in the simu link interface, and the simulation model is converted into a target code by simu link based on the code conversion instruction. Wherein, simu link is an additional toolbox of MATLAB, which is used for modeling, simulating and analyzing dynamic systems, and can cooperate with MATLAB to jointly complete the modeling, simulation and code generation of the control system. The target code can be AUTOSAR code, but is not limited to this. AUTOSAR is a standard for the development of automotive electronic control unit software. The purpose of converting the simulation model into AUTOSAR code is to convert the simulation model into a software code that meets the AUTOSAR standard, so as to realize the vehicle control function in the automotive electronic control unit (ECU), and improve the reusability, portability and maintainability of the software.

[0043] Step S108, testing the control system based on the logic layer file and the target code to obtain a test result, wherein the test result is used to indicate whether the control system has passed the test.

[0044] The test results in the above steps refer to the results obtained after testing the control system, which are used to indicate whether the system has passed the test. The indicators for judging the test results can be whether the functions of the control system are operating normally, whether the performance of the control system meets the requirements, or whether there are errors in the control system, but are not limited to these. The test results can be used to describe the stability and reliability of the control system and determine whether the control system meets the design requirements.

[0045] In an optional embodiment, the logic layer file can be tested using a locally stored logic layer file test case. If the logic layer file test fails, the test result is directly determined as a control system test failure. If the logic layer file test passes, click the CompileVCU button on the simu link (the button on the simu link used to edit the model) to integrate and compile the underlying software code and AUTOSAR code, that is, the logic layer file and the target code into machine code to generate a hex file (a file in hexadecimal format). Afterwards, the hex file is tested using the test case to obtain the test result.

[0046] In an embodiment of the present invention, in response to receiving a test instruction of a control system, an application layer file and a logic layer file of the control system are obtained, wherein the application layer file is used to represent a file for implementing interactive operations in the control system, and the logic layer file is used to represent a file for implementing logic processing in the control system; in response to a model update instruction for the application layer file, an initial simulation model corresponding to the application layer file is updated based on update parameters carried by the model update instruction to obtain a simulation model, wherein the initial simulation model is constructed based on the application layer file; in response to a code conversion instruction for the simulation model, the simulation model is converted into code to obtain a target code; the control system is tested based on the logic layer file and the target code to obtain a test result, wherein the test result is used to indicate whether the control system has passed the test. It is easy to notice that the initial simulation model corresponding to the application layer file is updated through the update parameters carried by the model update instruction, avoiding the use of trivial integrated development environment commands to update the initial simulation model; the application layer files and logic layer files used for control system testing are obtained, and the versions of the application layer files and logic layer files can be replaced more conveniently during testing; the application layer files and logic layer files of the control system are obtained, and the application layer files are processed using the update parameters and code conversion instructions carried by the model update instruction to obtain the target code, and the control system is tested based on the logic layer files and the target code, completing the standardized test process of the logic layer files and application layer files, avoiding the high error rate and cumbersome operation caused by manually adding files during the test process. The purpose of improving the test efficiency of the vehicle control system is achieved, thereby solving the technical problem of low test efficiency of the vehicle control system.

[0047] Optionally, the control system is tested based on the logic layer file and the target code to obtain a test result, including: responding to a first test instruction for the control system, placing the target code in the target path where the logic layer file is located for testing, and obtaining a logic test result, wherein the first test instruction is used to test the logic function of the control system, and the logic test result is used to indicate whether the logic function of the control system is normal; when the logic test result is that the logic function is normal, responding to a second test instruction for the control system, testing the control function of the control system based on the target code and the logic layer file, and obtaining a control test result, wherein the second test instruction is used to test the control function of the control system, and the control test result is used to indicate whether the control function is normal; in response to the control test result being that the control function is normal, determining that the test result is that the control system test has passed.

[0048] The first test instruction in the above steps refers to an instruction for testing the logical function of the control system, and the first test instruction can be generated by user interaction.

[0049] The logical function of the control system in the above steps is the basic logical reasoning and decision-making function of the control system when processing data and information. When testing the logical function of the control system, the contents that can be tested include but are not limited to whether the code syntax of the control system is smooth, whether the basic logic of the control system when processing data is reasonable, and whether there are conflicts in the basic logic of the control system when processing events.

[0050] The logic test results in the above steps refer to the results obtained through the logic function test, which can indicate whether the logic function of the control system is normal.

[0051] The target path in the above steps is the path where the logic layer file is located. It is also the path of the target code that needs to be prevented when performing logic function testing. It is usually a designated folder or directory in the control system.

[0052] The second test instruction in the above steps refers to an instruction for testing the control function of the control system, and the second test instruction can be generated by user interaction.

[0053] The control function of the control system in the above steps is the function of the control system to control the vehicle to complete specific behaviors according to the specified logic. When testing the control function of the control system, the contents that can be tested include but are not limited to whether the turning instruction can be successfully received, whether the right turn signal can be successfully issued, and whether the vehicle can be controlled to successfully perform the right turn operation.

[0054] The control test results in the above steps refer to the results obtained through the control function test, which are used to indicate whether the control function is normal.

[0055] In an optional embodiment, after receiving the first test instruction of the control system, the copych option on the simu link (a button on the simu link for creating a copy) is used to create a copy of the target code, and the target path where the logic layer file is located is selected to prevent the target code from being on the target path. Then the bat file (a text file) containing the logic function test case is run to obtain the logic test result. Wherein, when writing the bat file, the text editor writes the command and parameter of the test case and saves it in bat format. Since the bat file can be executed by batch processing, the test case is executed by running the bat file, which can improve the test efficiency of the control system logic function test.

[0056] When the logic test result shows that the logic function is normal, after receiving the second test instruction of the control system, the underlying software code and the AUTOSAR code, that is, the logic layer file and the target code are integrated to obtain a hex file. The hex file is compiled to obtain an executable file. The executable file is tested using the test case of the control function to obtain the control test result.

[0057] When using the test case of the control function to test the executable file, you can determine the input data, expected output, and expected behavior when writing the test case of the control function, and then use the test framework to execute the test case to ensure that the executable file works as expected, and then check the test results to determine whether the actual output is consistent with the expected output. If consistent, it is determined that the control function is normal, and if inconsistent, it is determined that the control function is abnormal. Since the control function test is started only when the logic function is normal, when the control function is normal, it can be determined that both the logic function and the control function are normal, thereby determining that the control system test has passed.

[0058] Optionally, the control function of the control system is tested based on the target code and the logic layer file to obtain a control test result, including: integrating the application layer software and the logic layer software of the control system based on the target code and the logic layer file to obtain an integration result; and testing the control function based on the integration result to obtain a control test result.

[0059] The application layer software in the above steps is the software module in the target code responsible for user interaction and business logic processing, and the logic layer software is the software module in the logic layer file responsible for processing business logic and data transmission.

[0060] The integration result in the above steps refers to the result obtained after integrating the application layer software and the logic layer software. The integration result not only includes the content of the application layer software and the content of the logic layer software, but also includes the operation interaction and data transmission between the application layer software and the logic layer software.

[0061] In an optional embodiment, the application layer software may be the AUTOSAR code obtained by updating the MATLAB model using the arxml file, and the logic layer software may be the underlying software downloaded from the server to the local computer. The AUTOSAR code and the underlying software are integrated using the CompileVCU button on the Simul ink to obtain a hex file as the integration result.

[0062] In the process of testing the control function based on the integration results, the hex file is loaded into the simulator, and the test case is written, including the control instructions and data as input, and the expected output results. Run the test case and record the test results, check whether the output results are consistent with the expectations to determine whether there are any problems with the hex file. If there are problems with the hex file, the control test result is a test failure. If there are no problems with the hex file, the control test result is a test pass.

[0063] Optionally, the application layer software and logic layer software of the control system are integrated based on the target code and the logic layer file to obtain an integration result, including: responding to a conversion instruction for the target code, calling a preset program to convert the target code into an executable file; integrating the application layer software and the logic layer software based on the executable file and the logic layer file to obtain an integration result.

[0064] The conversion instructions in the above steps are instructions for converting the target code into an executable file.

[0065] The executable file in the above steps is a file that contains machine language codes and can be run directly, usually including instructions and data.

[0066] The preset program in the above steps is a pre-written program that can convert the target code into an executable file. It can be a compiler, an assembler, or a custom compiler, but is not limited to these.

[0067] In an optional embodiment, the preset program may be a compiler, which generates conversion instructions after clicking the CompileVCU button on the simu link, and calls an external compiler according to the conversion instructions to compile the target program to obtain an executable file. The executable file may be a binary code that can be executed on a computer, a bytecode that can be executed on a virtual machine, or a hex file that can be burned into a vehicle engine control unit (Engine Control Unit, ECU for short).

[0068] Use integration tools to combine executable files and logic layer files, verify the correctness of the interface and communication between executable files and logic layer files, and ensure that executable files and logic layer files can call and run each other. Then integrate the executable files and logic layer files, and complete the integration of application layer software and logic layer software through the integration between executable files and logic layer files to obtain the integration result.

[0069] Optionally, the application layer software and the logic layer software are integrated based on the executable files and the logic layer files to obtain an integration result, including: deleting duplicate files in the executable files and the logic layer files to obtain a deletion result; determining modified files in the executable files and the logic layer files based on integration rules, wherein the modified files are used to represent files to be modified during the integration process; and integrating the application layer software and the logic layer software based on the deletion result and the modified files to obtain an integration result.

[0070] The duplicate files in the above steps are duplicate executable files and logic layer files in the software that executes the test method of the control system. The duplication form can be that the same file has multiple copies in different paths, or the file names are different but the file contents are completely duplicated, but the duplication form is not limited to this.

[0071] The deletion result in the above steps refers to the result obtained after deleting duplicate files, that is, the remaining file set.

[0072] The integration rules in the above steps refer to the rules and processes defined during the software integration process, which are used to determine which files need to be modified to ensure that the software can work properly after integration.

[0073] The modified files in the above steps are files that need to be modified during the integration process. The modification scenario may be that due to conflicts or dependencies between different modules, executable files or logic layer files need to be modified to ensure the consistency and functional integrity of the control system, but the modification scenario is not limited to this.

[0074] In an optional embodiment, for executable files and logical layer files, duplicate files can be identified by comparing file contents, or by comparing file hash values, but the method of identifying duplicate files in executable files and logical layer files is not limited to this. After duplicate files are identified, the duplicate files are deleted to reduce redundancy and improve overall efficiency.

[0075] According to the pre-set integration rules, determine whether there is a conflict or dependency between the executable file and the logical layer file, and thus determine the modified files in the executable file and the logical layer file. Modify the modified files to eliminate conflicts, resolve errors, or improve performance. Then integrate the deleted and modified executable files and logical layer files to obtain the integration results.

[0076] Optionally, after testing the control system based on the logic layer file and the target code and obtaining the test results, the method also includes: in response to the test result that the control system test passed, outputting the integration result; in response to an upload instruction for the integration result, uploading the integration result to the target server; in response to a flash instruction for the integration result, flashing the integration result to the target vehicle.

[0077] The upload instruction in the above steps is an instruction to instruct the software for executing the test method of the control system to upload the integration result to the target server. The target server is a server for receiving the integration result.

[0078] The integration result in the above steps is an instruction for instructing the software executing the test method of the control system to flash the integration result to the target vehicle. The target vehicle is a vehicle for receiving the integration result.

[0079] In an optional embodiment, if the test result is that the control system test passes, it means that the control system corresponding to the integrated result can meet the design standard, and the integrated result can be output and put into use. When the integrated result is put into use, the integrated result can be applied to the vehicle, or the integrated result can be applied to the target server. If the software that executes the test method of the control system receives an upload instruction for the integrated result, the integrated result is uploaded to the target server. In the process of uploading the integrated result to the server, the file transfer protocol (File Transfer Protocol, referred to as FTP) can be used to upload the integrated result, or the rsync (a file synchronization tool) command can be used to upload the integrated result, but the upload method is not limited to this.

[0080] If the software executing the test method of the control system receives a flashing instruction of the integrated result, the integrated result is flashed to the target vehicle. During the flashing process, an ECU programmer can be selected as a flashing tool, the software executing the test method of the control system is connected to the ECU module of the target vehicle, the corresponding flashing software is started, and the integrated result is flashed to the ECU module of the target vehicle, but the flashing method is not limited to this.

[0081] Optionally, in response to receiving an update instruction of the control system, obtaining application layer files and logic layer files of the control system includes: in response to receiving an update instruction of the control system, displaying a software interface of the control system, wherein the software interface includes at least one first version information and at least one second version information of the control system, the first version information is used to represent the version information of the application layer files, and the second version information is used to represent the version information of the logic layer files; in response to a confirmation instruction for a first target version information in at least one first version information, obtaining application layer files corresponding to the first target version information; in response to a confirmation instruction for a second target version information in at least one second version information, obtaining logic layer files corresponding to the second target version information.

[0082] The update instruction in the above steps is an instruction for updating the application layer file version and the logic layer file version.

[0083] The software interface in the above steps refers to the interface through which the user interacts with the control system, and operations can be performed and information can be obtained through the software interface.

[0084] The first version information in the above steps refers to the version information of the application layer files of the control system, which is used to indicate updates and improvements in the functions and interfaces of the software system. The second version information refers to the version information of the logic layer files of the control system, which is used to indicate updates and improvements in the logic processing and data processing of the software system. Version information refers to the differences and update information between different versions of the software system, which may include but is not limited to functional improvements, bug fixes, performance optimization, etc.

[0085] The first target version information in the above steps is the version information corresponding to the application layer file of the target version selected by the user in the first version information. The second target version information is the version information corresponding to the logic layer file of the target version selected by the user in the second version information.

[0086] The confirmation instruction in the above steps refers to an instruction sent by the user to the control system to confirm the version information, which is used to indicate that the user agrees to obtain the file corresponding to the version information.

[0087] In an optional embodiment, if the test result is that the control system test fails, the versions of the application layer files and the logic layer files can be updated and retested. After receiving the update instruction of the control system, the versions of the application layer files and the logic layer files are updated. During the update process, the software interface of the control system is displayed to show the user the first version information corresponding to the application layer files and the second version information corresponding to the logic layer files. The user selects the version of the application layer files and the version of the logic layer files, and issues a confirmation instruction for the first target version information and a confirmation instruction for the second target version information. According to the confirmation instruction for the first target version information and the confirmation instruction for the second target version information, the corresponding versions of the application layer files and the logic layer files are downloaded from the server, thereby realizing the version update of the application layer files and the logic layer files.

[0088] A preferred embodiment is described below. Figure 2 is a flow chart of an optional control system testing method according to an embodiment of the present invention, such as Figure 2As shown, the application layer software is the application layer file mentioned above. The processing of the application layer software is to download the model update instruction and the model file from the server. The model update instruction for updating the model file can be an arxml file, and the model file can be a MATLAB model file. The model file here is equivalent to the initial simulation model mentioned above. The model file is updated using the update instruction to obtain the model generation code. The model generation code here is equivalent to the simulation model mentioned above. Then, the sorting function file is generated based on the model generation code. The sorting function file here is equivalent to the target code mentioned above. The basic software is also the logic layer file mentioned above. The processing of the basic software is to download the basic software from the server, perform version management on the basic software, and then test the basic software. Then, the basic software that passes the test is integrated with the sorting function file, and the result after the software integration is tested. For the integrated result that passes the test, it can be selected to upload the integrated result to the server or burn it into the vehicle according to the actual application requirements.

[0089] Example 2

[0090] According to an embodiment of the present invention, an embodiment of a test device for a control system is provided, and the device can execute the test method for the control system provided in the above-mentioned embodiment 1. The specific implementation method and preferred application scenario are the same as those of the above-mentioned embodiment 1, and will not be repeated here.

[0091] Figure 3 Schematic diagram of a control system test device according to an embodiment of the present invention. Figure 3 As shown,

[0092] The acquisition module 30 is used to obtain the application layer files and logic layer files of the control system in response to receiving a test instruction of the control system, wherein the application layer files are used to represent files that implement interactive operations in the control system, and the logic layer files are used to represent files that implement logical processing in the control system.

[0093] The updating module 32 is used to respond to the model updating instruction for the application layer file, and update the initial simulation model corresponding to the application layer file based on the updating parameters carried in the model updating instruction to obtain the simulation model, wherein the initial simulation model is constructed based on the application layer file.

[0094] The conversion module 34 is used to respond to the code conversion instruction for the simulation model, perform code conversion on the simulation model, and obtain the target code.

[0095] The test module 36 is used to test the control system based on the logic layer file and the target code to obtain a test result, wherein the test result is used to indicate whether the control system has passed the test.

[0096] The test module includes: a first test unit, which is used to respond to a first test instruction for the control system, place the target code in the target path where the logic layer file is located for testing, and obtain a logic test result, wherein the first test instruction is used to test the logic function of the control system, and the logic test result is used to indicate whether the logic function of the control system is normal; a second test unit, which is used to respond to a second test instruction for the control system when the logic test result is that the logic function is normal, test the control function of the control system based on the target code and the logic layer file, and obtain a control test result, wherein the second test instruction is used to test the control function of the control system, and the control test result is used to indicate whether the control function is normal; a determination unit, which is used to determine that the test result is that the control system test has passed in response to the control test result being that the control function is normal.

[0097] The second test unit is also used to integrate the application layer software and the logic layer software of the control system based on the target code and the logic layer file to obtain an integration result; and to test the control function based on the integration result to obtain a control test result.

[0098] The second test unit is also used to respond to the conversion instruction for the target code, call the preset program to convert the target code into an executable file; integrate the application layer software and the logic layer software based on the executable file and the logic layer file to obtain an integration result.

[0099] The second test unit is also used to delete duplicate files in the executable files and the logical layer files to obtain deletion results; determine the modified files in the executable files and the logical layer files based on the integration rules, wherein the modified files are used to represent the files to be modified during the integration process; integrate the application layer software and the logical layer software based on the deletion results and the modified files to obtain integration results.

[0100] The determination unit is also used to output an integration result in response to the test result that the control system test has passed; to upload the integration result to a target server in response to an upload instruction for the integration result; and to flash the integration result to a target vehicle in response to a flash instruction for the integration result.

[0101] The acquisition module includes: a display unit, used to display the software interface of the control system in response to receiving an update instruction of the control system, wherein the software interface includes at least one first version information and at least one second version information of the control system, the first version information is used to represent the version information of the application layer file, and the second version information is used to represent the version information of the logic layer file; a first acquisition unit, used to respond to a confirmation instruction for a first target version information in at least one first version information, and acquire the application layer file corresponding to the first target version information; a second acquisition unit, used to respond to a confirmation instruction for a second target version information in at least one second version information, and acquire the logic layer file corresponding to the second target version information.

[0102] Example 3

[0103] According to an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the test method of the control system in Embodiment 1 is executed when the program is running.

[0104] Example 4

[0105] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the test method of the control system in each embodiment of the present invention.

[0106] Example 5

[0107] An embodiment of the present application further provides a computer program product, including a computer program, which implements the control system testing method in each embodiment of the present invention when executed by a processor.

[0108] Example 6

[0109] An embodiment of the present application also provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the test method of the control system in each embodiment of the present invention is implemented.

[0110] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0111] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0112] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0113] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0114] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0115] If the integrated unit 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 technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0116] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A control system testing method, characterized in that: include: In response to receiving a test instruction of the control system, acquiring an application layer file and a logic layer file of the control system, wherein the application layer file is used to represent a file for implementing interactive operations in the control system, and the logic layer file is used to represent a file for implementing logic processing in the control system; In response to a model update instruction for the application layer file, an initial simulation model corresponding to the application layer file is updated based on an update parameter carried in the model update instruction to obtain a simulation model, wherein the initial simulation model is constructed based on the application layer file; In response to a code conversion instruction for the simulation model, the simulation model is code converted to obtain a target code; The control system is tested based on the logic layer file and the target code to obtain a test result, wherein the test result is used to indicate whether the control system has passed the test.

2. The control system testing method according to claim 1, characterized in that: The control system is tested based on the logic layer file and the target code to obtain a test result, including: In response to a first test instruction for the control system, the target code is placed in the target path where the logic layer file is located for testing, and a logic test result is obtained, wherein the first test instruction is used to test the logic function of the control system, and the logic test result is used to indicate whether the logic function of the control system is normal; When the logic test result shows that the logic function is normal, responding to a second test instruction for the control system, testing the control function of the control system based on the target code and the logic layer file to obtain a control test result, wherein the second test instruction is used to test the control function of the control system, and the control test result is used to indicate whether the control function is normal; In response to the control test result indicating that the control function is normal, determining that the test result indicates that the control system test has passed.

3. The control system testing method according to claim 2, characterized in that: Testing the control function of the control system based on the target code and the logic layer file to obtain a control test result includes: Integrate the application layer software and the logic layer software of the control system based on the target code and the logic layer file to obtain an integration result; The control function is tested based on the integration result to obtain the control test result.

4. The control system testing method according to claim 3, characterized in that: Integrating the application layer software and the logic layer software of the control system based on the target code and the logic layer file to obtain an integration result includes: In response to a conversion instruction for the target code, calling a preset program to convert the target code into an executable file; The application layer software and the logic layer software are integrated based on the executable file and the logic layer file to obtain the integration result.

5. The control system testing method according to claim 4, characterized in that: Integrating the application layer software and the logic layer software based on the executable file and the logic layer file to obtain the integration result includes: Deleting duplicate files in the executable file and the logical layer file to obtain a deletion result; Determine, based on the integration rule, a modified file in the executable file and the logical layer file, wherein the modified file is used to represent a file to be modified during the integration process; The application layer software and the logic layer software are integrated based on the deletion result and the modification file to obtain the integration result.

6. The control system testing method according to claim 4 or 5, characterized in that: After testing the control system based on the logic layer file and the target code to obtain the test result, the method further includes: In response to the test result indicating that the control system test has passed, outputting the integration result; In response to an upload instruction for the integration result, the integration result is uploaded to a target server; In response to a flashing instruction for the integration result, the integration result is flashed to a target vehicle.

7. The control system testing method according to claim 1, characterized in that: In response to receiving an update instruction of the control system, obtaining an application layer file and a logic layer file of the control system, including: In response to receiving the update instruction of the control system, displaying a software interface of the control system, wherein the software interface includes at least one first version information and at least one second version information of the control system, the first version information is used to represent the version information of the application layer file, and the second version information is used to represent the version information of the logic layer file; In response to a confirmation instruction for the first target version information in the at least one first version information, acquiring the application layer file corresponding to the first target version information; In response to a confirmation instruction for the second target version information in the at least one second version information, the logic layer file corresponding to the second target version information is acquired.

8. A control system testing device, characterized in that: include: an acquisition module, configured to acquire, in response to receiving a test instruction of the control system, an application layer file and a logic layer file of the control system, wherein the application layer file is used to represent a file for implementing interactive operations in the control system, and the logic layer file is used to represent a file for implementing logical processing in the control system; An updating module, configured to respond to a model updating instruction for the application layer file, and update an initial simulation model corresponding to the application layer file based on an updating parameter carried in the model updating instruction to obtain a simulation model, wherein the initial simulation model is constructed based on the application layer file; A conversion module, configured to respond to a code conversion instruction for the simulation model, perform code conversion on the simulation model, and obtain a target code; A test module is used to test the control system based on the logic layer file and the target code to obtain a test result, wherein the test result is used to indicate whether the control system has passed the test.

9. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 7 when running.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

11. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Current regulation simulation method, device and equipment of rod control system and medium

    CN115032887A

  • Data synchronization method, system, device and equipment and storage medium

    CN117827974A

  • Whole vehicle calibration method and device, computer equipment, readable storage medium and program product

    CN119066774A

  • Method and apparatus for automatic updating and testing of software

    US20040060044A1