CN-121979793-A - Vehicle physical simulation unit packaging method, device, equipment and storage medium
Abstract
The invention discloses a vehicle physical simulation unit packaging method, a device, equipment and a storage medium, wherein the packaging method comprises compiling and generating an application layer software execution code, and importing and generating a runtime environment execution code; the source code model bottom layer package, the executable function model unit inner layer package and the executable function model unit outer layer package, wherein the package device comprises a package preparation module, a bottom layer package module, an inner layer package module and an outer layer package module. The invention only shows the interface which is allowed to be exposed by the packager after packaging, ensures the safety of the data interface, does not need the scheduling of a trigger for the function triggering of the executable function model unit module, can directly carry out function verification by carrying out joint simulation on simulation software alone or other models, effectively solves the problem of losing a standard code structure when an automobile open system architecture model is generated into an executable function model unit, reduces the organization difficulty of application layer software integration test, and improves the efficiency of the integration test.
Inventors
- TIAN FENG
- TIAN YUANFENG
- LI YUNSHENG
- WU KAI
Assignees
- 浙江千顾汽车科技有限公司
- 千顾汽车科技(江苏)有限公司
- 千顾科技(上海)有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260115
Claims (10)
- 1. A vehicle physical simulation unit packaging method, characterized by comprising: Compiling and generating an application layer software execution code, and importing and generating a runtime environment execution code; Packaging a source code model bottom layer; Inner layer encapsulation of the executable function model unit; the executable function model unit is encapsulated.
- 2. The vehicle physical simulation unit packaging method according to claim 1, wherein compiling the generated application layer software execution code, importing the generated runtime environment execution code, comprises: compiling and generating an application layer software execution code matched with an automobile open system architecture by a preset model development tool; the environment generating tool imports a configuration file corresponding to preset application layer software to be tested to generate a runtime environment executing code; And removing the reference relation between the corresponding relevant configuration and the operation calling file of the bottom layer software, and opening the calling authority of the interface of the bottom layer software.
- 3. The vehicle physical simulation unit packaging method of claim 1, wherein the source code model underfilling comprises: defining a mapping relation between typical function calls of a runtime environment and function model interfaces; wherein the typical function call includes an initialization function call, a write interface call, an output interface call, and a task execution function call.
- 4. The vehicle physical simulation unit packaging method according to claim 3, wherein when the task execution function call is packaged, task execution timing is determined based on the related configuration and the application layer software code call sequence of the operation call file.
- 5. The vehicle physical simulation unit packaging method according to claim 1, wherein the executable function model unit inner layer packaging comprises: and modifying the internal implementation relation of the standard function of the function model interface, inserting typical function call in the source code model bottom layer package required in the preset stage, and matching the mapping relation of the model package function and the standard function of the function model interface.
- 6. The vehicle physical simulation unit packaging method according to claim 1, wherein the executable function model unit is packaged as an outer layer, comprising: writing an extensible markup language file described in an executable function model unit model based on a source code model encapsulation interface definition relationship into an external display interface; and setting interface configuration parameters based on the variable data types of the original codes when writing the external display interface.
- 7. The vehicle physical simulation unit packaging method according to claim 6, wherein the interface configuration parameters include a data type, a data upper limit, a data lower limit, a data initial value, and a data call mode.
- 8. A vehicle physical simulation unit packaging apparatus, characterized in that the packaging apparatus comprises: The package preparation module is used for compiling and generating application layer software execution codes and importing and generating runtime environment execution codes; the bottom layer encapsulation module is used for defining a mapping relation between the typical function call of the runtime environment and the function model interface; the inner layer encapsulation module is used for matching the mapping relation between the model encapsulation function and the function model interface standard function; And the outer packaging module is used for writing the extensible markup language file described in the executable function model unit model into the external display interface based on the definition relation of the source code model packaging interface.
- 9. An electronic device, comprising: One or more processors, memory, and One or more computer programs stored in the memory and configured to be executed by the processor, wherein one or more of the computer programs are stored in the memory, the memory is coupled to the processor, and the processor, when executing the computer programs, implements the steps in the vehicle physical simulation unit packaging method of any of claims 1 to 7.
- 10. A computer-readable storage medium, characterized in that it stores a computer program for running a vehicle physical simulation unit packaging method, wherein the computer program causes a computer to execute the vehicle physical simulation unit packaging method according to any one of claims 1 to 7.
Description
Vehicle physical simulation unit packaging method, device, equipment and storage medium Technical Field The present invention relates to the field of vehicle control software development technologies, and in particular, to a vehicle physical simulation unit packaging method, device, equipment, and storage medium. Background The open system architecture (Automotive Open System Architecture, AUTOSAR) is a framework for collaborative development of automotive electronics systems commonly engaged by global automotive manufacturers, component suppliers, and research service institutions, while an open standard software architecture for automotive controllers (ECU) is established. The Software developed based on the architecture is divided into application layer Software (Application Software, ASW), runtime environment (Runtime Environment, RTE) and bottom layer Software (BSW) on a microcontroller (ECU), and the unified architecture can improve the expandability and flexibility of the Software, is convenient for the integration and conversion of application functions, further increases the development speed and reduces the development and maintenance costs of the Software. The Functional Model Interface (FMI) is an open Interface standard, and the core objective is to promote interoperability between different modeling and simulation tools, which is developed jointly by industry and academia, and is now an industry standard for cross-tool, cross-platform model exchange and co-simulation. An executable Function Model Unit (FMU) based on FMI standard encapsulation has the characteristic of plug and play, can be imported and operated by any tool supporting FMI, greatly improves multi-software joint simulation efficiency, and the FMU can protect a model principle structure and only expose an input/output interface due to the black box characteristic, but currently main stream model development software such as MATLAB/SIMULINK only supports AUTOSAR software development and FMU export, and the problem that AUTOSAR standard code structure is lost easily occurs when an AUTOSAR model is generated into the FMU, and the organization difficulty of an application layer software integration test is high, so that the efficiency of the integration test is low. Disclosure of Invention The invention aims to solve the defects in the prior art and provides a vehicle physical simulation unit packaging method, device, equipment and storage medium. In order to achieve the above object, in a first aspect, the present invention provides a vehicle physical simulation unit packaging method, including: Compiling and generating an application layer software execution code, and importing and generating a runtime environment execution code; Packaging a source code model bottom layer; Inner layer encapsulation of the executable function model unit; the executable function model unit is encapsulated. In some embodiments, the compiling generates application layer software execution code, importing generates runtime environment execution code, including: compiling and generating an application layer software execution code matched with an automobile open system architecture by a preset model development tool; the environment generating tool imports a configuration file corresponding to preset application layer software to be tested to generate a runtime environment executing code; And removing the reference relation between the corresponding relevant configuration and the operation calling file of the bottom layer software, and opening the calling authority of the interface of the bottom layer software. In some of these embodiments, the source code model bottom package includes: defining a mapping relation between typical function calls of a runtime environment and function model interfaces; wherein the typical function call includes an initialization function call, a write interface call, an output interface call, and a task execution function call. In some of these embodiments, when the task execution function call is packaged, the task execution timing is determined based on the relevant configuration and the application layer software code call order of the operation call file. In some of these embodiments, the executable functional model unit inner layer package includes: and modifying the internal implementation relation of the standard function of the function model interface, inserting typical function call in the source code model bottom layer package required in the preset stage, and matching the mapping relation of the model package function and the standard function of the function model interface. In some of these embodiments, the executable functional model unit is encapsulated, comprising: writing an extensible markup language file described in an executable function model unit model based on a source code model encapsulation interface definition relationship into an external display interface; and setting interface configuration pa