CN-121979760-A - Simulink model normalization automatic checking method and device
Abstract
The invention discloses a method and a device for automatically checking standardization of a Simulink model, wherein the method comprises the steps of creating an independent configuration file containing rule information, judging conditions and violation templates for each inspection rule, synchronously developing inspection functions corresponding to the independent configuration files one by one, analyzing the Simulink model to be checked, extracting module attributes, signal line connection relations and global data, caching the module attributes, the signal line connection relations and the global data as information sets, sequentially executing the inspection functions according to a predefined priority order, loading and verifying the independent configuration files corresponding to the inspection functions, matching target objects from the information sets, carrying out compliance judgment, judging the violation rules to generate inspection results containing hierarchical paths, rule numbers and reasons, storing the inspection results into a standardized structure, summarizing to generate inspection reports containing model names, time lengths and Simulink positionable click links, solving the defect of low integration level of the existing tools, and being capable of seamlessly butting enterprise-level CI/CD flows, and guaranteeing development quality and efficiency of embedded software.
Inventors
- Liang Panting
- CHENG XIXI
- ZHANG JIAOYUE
- ZHANG XIAOMING
- BI QIANKUN
Assignees
- 陕西法士特汽车传动集团有限责任公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251231
Claims (10)
- 1. The automatic check method for the normalization of the Simulink model is characterized by comprising the following steps of: When an independent configuration file containing rule information, judging conditions and violation templates is created for each inspection rule, synchronously developing inspection functions corresponding to the independent configuration files one by one; analyzing the Simulink model to be checked, extracting module attributes, signal line connection relations and global data, and caching the module attributes, the signal line connection relations and the global data into an information set; sequentially executing the checking functions according to a predefined priority order, loading and verifying independent configuration files corresponding to the checking functions, matching target objects from the information set, judging compliance, and judging rule violations to generate checking results comprising hierarchical paths, rule numbers and reasons; and storing each checking result into a standardized structure body, and summarizing to generate a checking report containing the model name, the duration and the Simulink locatable click link.
- 2. The automatic Simulink model normative checking method of claim 1, wherein the rule information in the independent profile includes a rule identifier, a rule description, and a rule priority; The violation template predefines two types of information formats, namely error and warning, which respectively correspond to different violation grades.
- 3. The automatic Simulink model normative checking method according to claim 1, wherein all checking functions follow a unified input-output architecture and parameter analysis standard; the input/output architecture comprises input parameters and output parameters, wherein the input parameters are information sets and corresponding independent configuration file data, and the output parameters are standardized compliance judgment results.
- 4. The automatic check method for normalization of Simulink model according to claim 1, further comprising, after buffering as the information set: constructing a structured database, and caching the information set into the structured database; The information set supports quick retrieval based on module ID and signal line name, and the structured database comprises a module information base, a signal line information base and a global data information base.
- 5. The automatic Simulink model normalization checking method according to claim 1, wherein when loading and verifying the independent configuration files corresponding to each checking function, the method specifically comprises: Judging the validity of the independent configuration file format, and judging whether the rule information, the conditions and the violation templates are completely contained, and if the verification fails, exiting the current checking function and executing the next piece.
- 6. The automatic check method for standardization of Simulink model according to claim 1, wherein after storing each check result in the standardized structure, it further records whether the check is passed, the number of warnings, the number of errors and the non-operation information, and the check report further includes an overview of check results.
- 7. An automatic Simulink model normalization inspection system, comprising: the configuration and function construction module is used for creating an independent configuration file containing rule information, judgment conditions and violation templates for each inspection rule, and synchronously developing inspection functions corresponding to the independent configuration files one by one; The model analysis and caching module is used for analyzing the Simulink model to be checked, extracting module attributes, signal line connection relations and global data, and caching the module attributes, the signal line connection relations and the global data into an information set; The checking execution module is used for sequentially executing the checking functions according to a predefined priority order, loading and verifying independent configuration files corresponding to the checking functions, matching target objects from the information set, and carrying out compliance judgment, and if the judgment is illegal, generating a checking result containing a hierarchical path, a rule number and a reason; and the result processing and outputting module is used for storing each checking result into the standardized structure body and summarizing to generate a checking report containing the model name, the checking duration and the Simulink locatable click link.
- 8. Terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, realizes the steps of the method according to any of claims 1-6.
- 9. A computer readable storage medium, in which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1-6.
- 10. A computer program product comprising computer instructions for instructing a computing device to perform the operations corresponding to the method of any one of claims 1-6.
Description
Simulink model normalization automatic checking method and device Technical Field The invention belongs to the technical field of computer software, and particularly relates to a Simulink model normalization automatic checking method and device. Background Model-based design Methods (MBDs) have become the mainstream of safety critical fields such as automotive electronics, aerospace and the like, and Simulink is used as a core modeling tool, and the quality of a model directly relates to the safety reliability and development efficiency of embedded software, so that model normalization inspection is very important. The conventional Simulink Model automatic inspection technology has obvious defects that on one hand, a commercial built-in tool (such as a Model provider) has poor rule customization, insufficient coordination capability and low integration level, and cannot adapt to the exclusive requirement of an enterprise and a CI/CD flow, and on the other hand, custom script development is flexible, but has low rule development efficiency and poor consistency, and complex Model inspection has weak performance due to repeated I/O operation. The problem that the large-scale customization of the inspection rules is difficult to develop and the inspection efficiency of the complex model is low is solved, so that the automatic inspection method of the customized Simulink model, which can improve the development efficiency, optimize the execution performance and ensure the maintainability, is urgently needed in the field. Disclosure of Invention The invention aims to provide a Simulink model normalization automatic checking method and device, which are used for solving the technical defects that in the prior art, checking tools are difficult to adapt to personalized norms and cannot adapt to exclusive enterprise demands, and on the other hand, a customized checking scheme is low in development efficiency and poor in consistency, and the checking time is too long when facing a complex model. The technical scheme adopted by the invention is as follows: The first aspect of the application provides a Simulink model normalization automatic checking method, which comprises the following steps: When an independent configuration file containing rule information, judging conditions and violation templates is created for each inspection rule, synchronously developing inspection functions corresponding to the independent configuration files one by one; analyzing the Simulink model to be checked, extracting module attributes, signal line connection relations and global data, and caching the module attributes, the signal line connection relations and the global data into an information set; sequentially executing the checking functions according to a predefined priority order, loading and verifying independent configuration files corresponding to the checking functions, matching target objects from the information set, and judging compliance, and generating checking results containing hierarchical paths, rule numbers and reasons in a violation manner; and storing each checking result into a standardized structure body, and summarizing to generate a checking report containing the model name, the duration and the Simulink locatable click link. In an alternative embodiment, the rule information in the independent configuration file comprises a rule identifier, a rule description and a rule priority, and the rule violation template predefines two types of information formats of error and warning, wherein the error and warning types of information formats respectively correspond to different violation grades. In an alternative embodiment, all of the inspection functions follow a unified input-output architecture and parameter resolution criteria; The input-output architecture comprises input parameters and output parameters, wherein the input parameters are the model information set and corresponding independent configuration file data, and the output parameters are standardized compliance judgment results. In an alternative embodiment, after buffering as the information set, the method further comprises: constructing a structured database, and caching the information set into the structured database; The information set supports quick retrieval based on module ID and signal line name, and the structured database comprises a module information base, a signal line information base and a global data information base. In an alternative embodiment, when loading and verifying the independent configuration file corresponding to each checking function, the method specifically includes: Judging the validity of the independent configuration file format, and judging whether the rule information, the conditions and the violation templates are completely contained, and if the verification fails, exiting the current checking function and executing the next piece. In an alternative embodiment, after storing each inspection result in the standar