Automatic flight mode conversion simulation system and method based on workflow modeling
Through an automatic flight mode conversion simulation system based on workflow modeling, the time-consuming and labor-intensive and manual coding problems in the existing technology are solved, and the automated flight mode conversion and testing process is realized, which improves the testing efficiency and quality.
Patent Information
- Application Number
- CN202411328604.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-09-24
AI Technical Summary
The existing flight mode testing methods have problems such as inconsistency between requirements and design, time-consuming and labor-intensive manual coding and testing, huge regression test time and labor consumption, making it difficult to effectively detect design defects in flight mode conversion.
An automatic flight mode conversion simulation system based on workflow modeling is adopted, and the automatic flight mode conversion and testing process is realized through the mode conversion diagram modeling management module, the mode conversion logic verification management module, the mode conversion software code management module and the automated test execution management module.
It reduces errors in manual programming, improves coding quality and efficiency, and automated monitoring and interpretation reduces manual work, shortens testing time, and cured mode conversion diagrams facilitate knowledge transfer and experience preservation.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of simulation systems, and in particular to an automatic flight mode conversion simulation system and method based on workflow modeling. Background Art
[0002] The purpose of flight mode testing is to comprehensively and effectively detect possible problems and design defects in the shortest possible time, provide truly valuable and highly reliable test conclusions, provide favorable technical support for the development of the entire aircraft, and ensure the normal operation of the aircraft in orbit.
[0003] Due to the complexity of flight mode conversion logic, there are many logics involved in the entire mode conversion process. Using conventional modeling methods may cause the conversion results to be inconsistent with expectations due to timing, iteration effects, etc. Considering that the conversion logic is basically Boolean or enumeration type variables, it is necessary to establish a detailed system requirements specification, adopt model-based development technology, and use formal methods for verification.
[0004] Currently, flight mode tests mostly use document-based requirement decomposition and manual coding tests: the description method based on natural language is ambiguous, resulting in inconsistency between requirements and designs, incomplete coverage of requirements, redundant designs beyond requirements, and design errors caused by ambiguity. The test is mainly carried out manually, which results in a lot of time for test execution. At the same time, the recording and comparison of test results also consume a lot of manpower and material resources. Especially when performing regression testing, it needs to be carried out completely manually, which results in a huge consumption of time and manpower, and is also prone to errors. Ultimately, it brings huge challenges and pressure to the quality and progress of the test tasks.
[0005] Workflow technology is the design and processing technology of workflow computational models, that is, the logic and rules of how the work in the workflow is organized together are represented in the computer with an appropriate model and calculated. For automatic flight mode conversion, the workflow can be defined as: the full or partial automation of the mode conversion logic. During this process, the logical conditions, states or branch interpretations are executed according to certain system requirement rules, and the coordination between the logical conditions and the flight modes is achieved to achieve the overall goal of the automatic flight mode conversion simulation.
[0006] The significance of the automatic flight mode conversion simulation system based on workflow modeling is that the system can model and implement different logical branch combinations according to the requirements of the automatic flight mode conversion system, monitor the corresponding flight mode conversion, eliminate the ambiguity of document transmission, and make a comprehensive and reliable judgment on the automatic flight mode conversion, thereby solving the large-scale and batch heavy manual code writing and manual operation testing work. Summary of the invention
[0007] In view of the defects in the prior art, an object of the present invention is to provide an automatic flight mode conversion simulation system and method based on workflow modeling.
[0008] An automatic flight mode conversion simulation system based on workflow modeling provided by the present invention comprises: a mode conversion diagram modeling management module, a mode conversion logic verification management module, a mode conversion software code management module and an automated test execution management module;
[0009] The mode conversion diagram modeling management module is used to configure the mode conversion diagram and the mode conversion flow chart of each mode conversion diagram, and build the flight mode model based on the configured mode conversion diagram and the mode conversion flow chart of each mode conversion diagram;
[0010] The mode conversion logic verification management module is used to automatically verify the constructed flight mode model, and after the verification is completed, the flight mode model is initialized; the mode conversion logic verification management module is also used to monitor and verify the state data of the mode conversion diagram generated after automatic execution in real time;
[0011] The mode conversion software code management module is used to convert the flight mode model into executable C code;
[0012] The automated test execution management module is used to implement automated execution of flight mode conversion based on C code and generate mode conversion diagram state data.
[0013] Preferably, the mode transition diagram modeling management module includes: a modeling project management submodule, a mode transition diagram management submodule, a mode transition process configuration submodule, a Simulink / Stateflow model conversion submodule and a test report template configuration submodule;
[0014] The mode transition diagram management submodule is used to manage different mode transition diagrams;
[0015] The mode conversion process configuration submodule is used to graphically configure the mode conversion process corresponding to each mode conversion diagram;
[0016] The modeling engineering management submodule is used to construct a flight mode model based on the mode conversion diagram and the mode conversion process corresponding to each mode conversion diagram, and save different flight mode models into different project files;
[0017] The Simulink / Stateflow model conversion submodule is used to use the state machine line diagram drawing function to automatically traverse and calculate each state transformation branch path, generate a corresponding state switching line diagram, and convert it into a corresponding Simulink / Stateflow model;
[0018] The test report template configuration submodule is used to configure the test report template.
[0019] Preferably, the mode conversion software code management module includes: a graphic module parsing submodule, a code generation syntax tree configuration submodule, a code generation management submodule and a code packaging and compiling configuration submodule;
[0020] The graphic module parsing submodule is used to parse the flight mode model to generate a target code file;
[0021] The code generation management submodule is used to create a workspace and copy or dynamically refresh the code templates on the local disk to the workspace;
[0022] The code packaging and compilation configuration submodule is used to automatically analyze the code in the workspace, and package the project files, reference files and dependent files to form an independent executable software package.
[0023] Preferably, the automated test execution management module includes: a test process automatic execution submodule, a test process status graphical display submodule, a test process debugging submodule, a test abnormality alarm submodule and a test log generation submodule;
[0024] The test process automatic execution submodule is used to call the C code obtained by parsing and conversion based on the test entry data to complete a process test;
[0025] The test process status graphical display submodule is used to display the current execution progress and the results of the executed test cases in real time;
[0026] The test process debugging submodule is used to debug the simulation system when an abnormality occurs in the test process;
[0027] The test abnormality alarm submodule is used to automatically provide alarm information when an abnormality occurs during the test process, and display the alarm information through a preset UI interface;
[0028] The test log generation submodule is used to record the detailed log of each scenario and each test execution unit; the recorded information includes the start execution time, end execution time, number of executions, execution input, execution output, judgment data value and judgment result.
[0029] Preferably, the mode conversion logic verification management module includes: a verification input management submodule, a verification result display submodule and a verification difference intelligent analysis submodule;
[0030] The verification input management submodule is used to provide a data input window for a mode conversion diagram, select corresponding input parameters for input configuration according to preset input conditions, and call the parameter management module to initialize the input parameters;
[0031] The verification result display submodule is used to realize real-time monitoring of the status data and perform automatic judgment on the status data;
[0032] The verification difference intelligent analysis submodule is used to define possible causes of verification differences, infer the most likely cause of the difference based on different weights and corresponding judgment conditions, and display it in a highlighted font on the verification result display interface.
[0033] According to the present invention, an automatic flight mode conversion simulation method based on workflow modeling is provided, comprising:
[0034] Step S1: configuring a mode conversion diagram and a mode conversion flow chart of each mode conversion diagram through a mode conversion diagram modeling management module, and building a flight mode model based on the configured mode conversion diagram and the mode conversion flow chart of each mode conversion diagram;
[0035] Step S2: automatically verifying the constructed flight mode model through the mode conversion logic verification management module, and after completing the verification, initializing the flight mode model;
[0036] Step S3: converting the flight mode model into executable C code through the mode conversion software code management module;
[0037] Step S4: Implementing the automated execution of flight mode conversion based on C code through the automated test execution management module to generate state data of the mode conversion diagram;
[0038] Step S5: real-time monitoring and verification management of the state data of the mode conversion diagram is performed through the mode conversion logic verification management module;
[0039] Step S6: Generate a test log and a test report based on real-time monitoring and verification management of the state data of the mode transition diagram;
[0040] Step S7: Evaluate the test process according to the test log and the test report to obtain the test result information.
[0041] Preferably, the step S1 comprises:
[0042] Step S1.1: managing different mode transition diagrams using a mode transition diagram management submodule;
[0043] Step S1.2: graphically configure the mode conversion process corresponding to each mode conversion diagram using the mode conversion process configuration submodule;
[0044] Step S1.3: constructing a flight mode model based on different mode conversion diagrams and the mode conversion process corresponding to each mode conversion diagram using the modeling engineering management submodule, and saving different flight mode models into different project files;
[0045] Step S1.4: using the Simulink / Stateflow model conversion submodule, using the state machine line diagram drawing function to automatically traverse and calculate each state transformation branch path, generate the corresponding state switching line diagram, and convert it into the corresponding Simulink / Stateflow model;
[0046] Step S1.5: Use the test report template configuration submodule to configure the test report template.
[0047] Preferably, the step S3 adopts:
[0048] Step S3.1: Analyze the flight mode model using the graphic module analysis submodule to generate a target code file;
[0049] Step S3.2: Create a workspace using the code generation management submodule, and copy or dynamically refresh the code template from the local disk to the workspace;
[0050] Step S3.3: Use the code packaging and compilation configuration submodule to automatically analyze the code in the workspace, and package the project files, reference files, and dependent files to form an independent executable software package.
[0051] Preferably, the step S4 adopts:
[0052] Step S4.1: Using the test process automatic execution submodule to call the C code obtained by parsing and conversion based on the test entry data to complete a process test;
[0053] Step S4.2: using the test process status graphical display submodule to display the current execution progress and the results of the executed test cases in real time;
[0054] Step S4.3: When an abnormality occurs during the test process, the simulation system is debugged using the test process debugging submodule;
[0055] Step S4.4: When an abnormality occurs during the test process, the test abnormality alarm submodule is used to automatically provide alarm information, and the alarm information is displayed through a preset UI interface;
[0056] Step S4.5: Use the test log generation submodule to record the detailed log of each scenario and each test execution unit; the recorded information includes the start execution time, end execution time, execution number, execution input, execution output, judgment data value and judgment result.
[0057] Preferably, the step S2 adopts: using the verification input management submodule to provide a data input window for the mode conversion diagram, selecting corresponding input parameters for input configuration according to preset input conditions, and calling the parameter management module to initialize the input parameters;
[0058] The step S5 adopts:
[0059] Step S5.1: using the verification result display submodule to monitor the status data in real time and automatically judge the status data;
[0060] Step S5.2: Use the verification difference intelligent analysis submodule to define the possible causes of the verification difference, infer the most likely cause of the difference based on different weights and corresponding judgment conditions, and display it in a highlighted font on the verification result display interface.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] 1. Use computers to automatically execute system requirements specifications. According to the definition of system requirements specifications, automatically complete the automatic flight mode conversion, reducing errors and mistakes that are easy to occur due to manual programming in the work;
[0063] 2. Through automatic code generation technology, the differences in programming ability of business personnel are shielded, and the coding quality and efficiency are improved;
[0064] 3. Automatically interpret data according to the defined parameter range, reducing a lot of work in manual monitoring and judgment. When the data is abnormal, an alarm is issued, and manual intervention is performed at this time, making the test work convenient and fast;
[0065] 4. Parameter interpretation is directly linked to instruction execution, which saves manual response time and greatly reduces test time;
[0066] 5. Solidify the mode conversion diagram to facilitate knowledge transfer. If the developer is replaced, it will not have much impact on the project development and testing process. New development and testing personnel will find it easier to design mode conversions. Development and testing experience will be well preserved and passed on. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0068] Figure 1 Schematic diagram of the automatic flight mode conversion simulation system based on workflow modeling.
[0069] Figure 2 Flowchart for automatic flight mode conversion test. DETAILED DESCRIPTION
[0070] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0071] Example 1
[0072] According to an automatic flight mode conversion simulation system and method based on workflow modeling provided by the present invention, a graphical modeling interface is used to complete the configuration of the flight mode conversion and the configuration of the logical branch rule conditions. The simulation system automatically implements different logical branch combinations and generates codes according to preset conditions, automatically runs the generated code and monitors the corresponding flight mode conversion, and completes the full-process and full-path test verification of the automatic flight mode conversion.
[0073] The automatic flight mode conversion simulation system based on workflow modeling is as follows: Figure 1 As shown, including:
[0074] It includes: mode conversion diagram modeling management module, mode conversion logic verification management module, mode conversion software code management module and automated test execution management module;
[0075] The mode conversion diagram modeling management module is used to configure the mode conversion diagram and the mode conversion flow chart of each mode conversion diagram;
[0076] The mode conversion logic verification management module is used to implement real-time monitoring and verification management of the mode conversion diagram state data generated by modeling. Input data refers to the state data configured according to requirements. The system interprets these data to determine whether the mode conversion diagram operation state and the mode conversion diagram response to external input are correct. When the mode state does not meet expectations, the data font is marked with a special color to detect and solve the problem;
[0077] The mode conversion software code management module is used to load the conversion logic and conditions configured in the mode conversion diagram: including initialization settings, state settings, logical relationship settings, etc.; and to parse the entire mode conversion diagram into executable C code in combination with the context association in the conversion process;
[0078] The automated test execution management module is used to realize automated execution of flight mode conversion, including mode switching and parameter interpretation.
[0079] Specifically, the mode transition diagram modeling management module includes: a modeling project management submodule, a mode transition diagram management submodule, a mode transition process configuration submodule, a Simulink / Stateflow model conversion submodule and a test report template configuration submodule;
[0080] The modeling project management submodule is used to save different modeling projects into different project files;
[0081] The mode transition diagram management submodule is used to manage different mode transition diagrams;
[0082] The mode conversion process configuration submodule is used to graphically configure the mode conversion process corresponding to each mode conversion diagram;
[0083] The Simulink / Stateflow model conversion submodule is used to use the state machine line diagram drawing function to automatically traverse and calculate each state transformation branch path, generate a corresponding state switching line diagram, and can be converted into a corresponding Simulink / Stateflow model, and imported into other simulation tool platforms for use;
[0084] The test report template configuration submodule is used to configure the test report template.
[0085] Specifically, the mode conversion logic verification management module includes: a verification input management submodule, a verification result display submodule and a verification difference intelligent analysis submodule;
[0086] The verification input management submodule is used to provide a data input window for a mode conversion diagram, select corresponding input parameters for input configuration according to preset input conditions, and call the parameter management module in the background to initialize the input parameters;
[0087] The verification result display submodule is used to realize real-time monitoring and control of parameters, change the previous time-consuming, labor-intensive and unreliable manual monitoring, adopt automatic monitoring, and automatically judge the output parameters or status;
[0088] The verification difference intelligent analysis submodule is used to define possible causes of verification differences, infer the most likely cause of the difference based on different weights and corresponding judgment conditions, and display it in a highlighted font on the verification result display interface.
[0089] Specifically, the mode conversion software code management module includes: a graphic module parsing submodule, a code generation syntax tree configuration submodule, a code generation management submodule, and a code packaging and compilation configuration submodule;
[0090] The graphic module parsing submodule is used to read and parse the attribute parameters of the graphic interface configuration, and should load the code template according to the context association of the graphic module and parse it into a target code file;
[0091] The code generation syntax tree configuration submodule is used to configure the configuration file of the mapping relationship between the modeling graphics and the C code pre-edited by the mode conversion designer, and convert the business identifier in the graphic element into a recognizable variable or function in the C language by parsing the code syntax tree;
[0092] The code generation management submodule is used to provide two modes of code generation: local disk loading and dynamic generation. Create a workspace and copy or dynamically refresh the code template from the local disk to the workspace;
[0093] The code packaging and compilation configuration submodule is used to provide the functions of configuring the code compilation environment and packaging related files. By automatically analyzing the generated code, the corresponding project files, reference files, dependent files, etc. are automatically packaged to form an independent and executable software package.
[0094] Specifically, the automated test execution management module includes: a test process automatic execution submodule, a test process status graphical display submodule, a test process debugging submodule, a test abnormality alarm submodule and a test log generation submodule;
[0095] The test process automatic execution submodule is used to call the system requirement specifications from the database and input data into the flight mode switching code according to the system requirement specifications. The automatic execution can be divided into two parts according to the classification of work content: executing instructions and judging parameters;
[0096] The test process status graphical display submodule is used to display the current execution progress, the results of the executed test cases and other information in real time;
[0097] The test process debugging submodule is used to debug the system when unexpected problems occur, providing breakpoint debugging to stop at the position expected by the tester and analyze by viewing relevant values;
[0098] The test abnormality alarm submodule is used to automatically provide alarm information to the tester when an abnormality occurs during the test process and the automated test process cannot be completed according to the preset process. The alarm information is highlighted and presented through the preset UI interface;
[0099] The test log generation submodule is used to record the detailed log records of the execution of each scenario and each test execution unit. The recorded information includes the start execution time, end execution time, execution times, execution input, execution output, judgment data value, judgment result and other necessary information.
[0100] The automatic flight mode conversion simulation method based on workflow modeling includes:
[0101] Step 1: First, in the automatic flight mode conversion simulation system, a mode conversion diagram modeling management module is used to configure a mode conversion diagram and a mode conversion flow chart of each mode conversion diagram;
[0102] Step 2: After the configuration is completed, the operation starts. First, the mode conversion logic verification management module automatically verifies the validity and correctness of the entire process. After the verification is completed, the management mode conversion process will initialize the mode conversion conditions through network transmission data; then the mode conversion software code management module parses the mode conversion process according to the set syntax tree definition, and determines the direction of the conversion process according to the interpretation of the state in the mode conversion diagram;
[0103] Step 3: During the test, some configurations will be made to the test input and the expected mode status results;
[0104] Step 4: The automated test execution management module monitors the aircraft's speed, altitude, range, flight time, takeoff, landing, and maneuvering flight performance in real time; after the test, it generates a test log and test report as required;
[0105] Step 5: Evaluate the entire test process based on the contents of the test log and test report to obtain the test result information.
[0106] Specifically, the step 1 includes the following steps:
[0107] Step 1.1: The automatic flight modeling project is saved into different single flight record project files; the file format follows the standard XML file format; the platform can open and save single flight record project files, and the project files include mode transition diagrams at different times and branches;
[0108] Step 1.2: The automatic flight mode conversion process is carried out in different conditions and stages, such as the ignition stage, the operation stage, etc. Different modes are used in different stages; different mode conversion diagrams are supported to connect different mode conversion diagrams in series. After a mode conversion diagram test is completed, the next mode conversion diagram can be automatically entered; avoid human intervention in the process of mode conversion diagram switching;
[0109] Step 1.3: Graphically configure the mode conversion process corresponding to each mode conversion diagram. The graphical mode conversion process configuration can more clearly show the state change process of the mode conversion and clearly define the branch processing of the process;
[0110] Step 1.4: Provide Simulink / Stateflow model generation function, use the state machine line diagram drawing function to automatically traverse and calculate each state transformation branch path, generate the corresponding state switching line diagram, and convert it into the corresponding Simulink / Stateflow model, and import it into other simulation tool platforms for use;
[0111] Step 1.5: When configuring the mode conversion diagram, you need to complete the configuration of the relevant settings of the report in advance; mainly including the definition of the report template and the definition of the report content.
[0112] Specifically, the step 2 includes the following steps:
[0113] Step 2.1: Provide a data input window for a mode conversion diagram, select the corresponding input parameters for input configuration according to the preset input conditions, and call the parameter management configuration file in the background to initialize the input parameters;
[0114] Step 2.2: Establish a unified, networked operating parameter automatic monitoring platform to realize the display of output parameters and status, and automatic alarm functions;
[0115] Step 2.3: Define the possible reasons for the verification difference through the parameter management configuration file, infer the most likely cause of the difference based on different weights and corresponding judgment conditions, and display it in a highlighted font on the verification result display interface.
[0116] Specifically, step 3 includes the following steps:
[0117] Step 3.1: Conversion logic and conditions In the mode conversion diagram, multiple configurations are required, including initialization settings, state settings, logical relationship settings, etc., and there will be context associations in the conversion process. Therefore, the parsing of graphic modules to C code must be performed in the entire mode conversion diagram.
[0118] Step 3.2: Most of the code syntax trees are configuration files of the mapping relationship between modeling graphics and C codes pre-edited by the mode conversion designer. The business identifiers in the graphics are converted into recognizable variables or functions in the C language by parsing the code syntax tree;
[0119] Step 3.3: Code files are generated by loading from local disk and dynamically generating. During the automated test, a workspace is created for each test project, and the code templates from the local disk are copied to the workspace. Editing files on the local disk does not affect files in the workspace. If the edited code file package needs to be applied to this test project, it can be updated to the workspace through the refresh function to replace the original code file package.
[0120] Step 3.4: Code packaging and compilation configuration provides the function of configuring the code compilation environment and packaging related files. By automatically analyzing the generated code, the corresponding project files, reference files, dependent files, etc. are automatically packaged to form an independent and executable software package.
[0121] Specifically, step 4 includes the following steps:
[0122] Step 4.1: Automatic test execution management is the core part of the automatic mode conversion simulation system. The automated test mainly realizes the automated execution of flight mode conversion, including mode switching and parameter interpretation;
[0123] Step 4.2: During the automatic execution of test cases, the current execution progress, the results of executed test cases and other information are displayed in real time, so it is necessary to explicitly present them and mark the modules that have been executed, are being executed, and have not yet been executed. They are marked with different colors in the graphical process designed previously;
[0124] Step 4.3: The tester stops the test process at the breakpoint by setting a breakpoint, and analyzes the problem by analyzing the stimulus data and system feedback data.
[0125] Step 4.4: If an exception occurs during the test process and the automated test process cannot be completed according to the preset process, an alarm message will be displayed to the tester through the interface; the alarm message may be that the communication of a certain module is abnormal; the format of a certain file is abnormal, a certain process has timed out, etc. The alarm message will be displayed through the UI interface;
[0126] Step 4.5: The test log is recorded in a file in text format; it provides a detailed record of the execution of each scenario and each test execution unit; the recorded information at least includes the start execution time, end execution time, execution times, execution input, execution output, judgment data value, judgment result and other necessary information;
[0127] Step 4.6: After each test scenario is executed or the entire test process is executed, a test report is automatically generated according to the report template information preset by the user; during the test process, the test result information is recorded in the database. When the report is generated, the result information is extracted according to the database open interface, and the report generation engine is executed to generate a complete test report that meets the requirements.
[0128] Specifically, step 5 includes the following steps:
[0129] Step 5.1: Intelligent interpretation technology is different from the parameter interpretation method in the existing system. It describes and stores the conversion logic in a unified and standardized manner, and automatically interprets the current flight mode status based on the conversion logic and input parameters;
[0130] Step 5.2: Allowing manual expansion of the transformation logic, and automatically expanding the knowledge base through self-learning;
[0131] Step 5.3: The system using intelligent interpretation technology receives the input type and the real-time value of each condition status, and then determines the current flight mode status and checks whether the status is consistent with the expected status;
[0132] Step 5.4: Interpret the abnormal flight mode conditions reflected by the changes in multiple parameters, improve the accuracy of fault diagnosis and positioning by judging the current working status of the flight mode, and provide advice and support to testers.
[0133] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0134] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. An automatic flight mode conversion simulation system based on workflow modeling, characterized in that: include: Mode conversion diagram modeling management module, mode conversion logic verification management module, mode conversion software code management module and automated test execution management module; The mode conversion diagram modeling management module is used to configure the mode conversion diagram and the mode conversion flow chart of each mode conversion diagram, and build the flight mode model based on the configured mode conversion diagram and the mode conversion flow chart of each mode conversion diagram; The mode conversion logic verification management module is used to automatically verify the constructed flight mode model, and after the verification is completed, the flight mode model is initialized; the mode conversion logic verification management module is also used to monitor and verify the state data of the mode conversion diagram generated after automatic execution in real time; The mode conversion software code management module is used to convert the flight mode model into executable C code; The automated test execution management module is used to realize the automated execution of flight mode conversion based on C code and generate mode conversion diagram state data; The mode conversion diagram modeling management module includes: a modeling project management submodule, a mode conversion diagram management submodule, a mode conversion process configuration submodule, a Simulink / Stateflow model conversion submodule and a test report template configuration submodule; The mode transition diagram management submodule is used to manage different mode transition diagrams; The mode conversion process configuration submodule is used to graphically configure the mode conversion process corresponding to each mode conversion diagram; The modeling engineering management submodule is used to construct a flight mode model based on the mode conversion diagram and the mode conversion process corresponding to each mode conversion diagram, and save different flight mode models into different project files; The Simulink / Stateflow model conversion submodule is used to use the state machine line diagram drawing function to automatically traverse and calculate each state transformation branch path, generate a corresponding state switching line diagram, and convert it into a corresponding Simulink / Stateflow model; The test report template configuration submodule is used to configure the test report template; The mode conversion logic verification management module includes: a verification input management submodule, a verification result display submodule and a verification difference intelligent analysis submodule; The verification input management submodule is used to provide a data input window for a mode conversion diagram, select corresponding input parameters for input configuration according to preset input conditions, and call the parameter management module to initialize the input parameters; The verification result display submodule is used to realize real-time monitoring of the status data and perform automatic judgment on the status data; The verification difference intelligent analysis submodule is used to define the possible reasons for the verification difference, infer the most likely reason for the difference according to different weights and corresponding judgment conditions, and display it in a highlighted font on the verification result display interface; The mode conversion software code management module includes: a graphic module parsing submodule, a code generation syntax tree configuration submodule, a code generation management submodule and a code packaging and compiling configuration submodule; The graphic module parsing submodule is used to parse the flight mode model to generate a target code file; The code generation management submodule is used to create a workspace and copy or dynamically refresh the code templates on the local disk to the workspace; The code packaging and compilation configuration submodule is used to automatically analyze the code in the workspace, and package the project files, reference files and dependent files to form an independent executable software package; The code generation syntax tree configuration submodule is used to configure the configuration file of the mapping relationship between the modeling graphics and the C code pre-edited by the mode conversion designer, and convert the business identifier in the graphic element into a recognizable variable or function in the C language by parsing the code syntax tree; The automated test execution management module includes: a test process automatic execution submodule, a test process status graphical display submodule, a test process debugging submodule, a test abnormality alarm submodule and a test log generation submodule; The test process automatic execution submodule is used to call the C code obtained by parsing and conversion based on the test entry data to complete a process test; The test process status graphical display submodule is used to display the current execution progress and the results of the executed test cases in real time; The test process debugging submodule is used to debug the simulation system when an abnormality occurs in the test process; The test abnormality alarm submodule is used to automatically provide alarm information when an abnormality occurs during the test process, and display the alarm information through a preset UI interface; The test log generation submodule is used to record the detailed log of each scenario and each test execution unit; the recorded information includes the start execution time, end execution time, number of executions, execution input, execution output, judgment data value and judgment result.
2. An automatic flight mode conversion simulation method based on workflow modeling, characterized in that: include: Step S1: configuring a mode conversion diagram and a mode conversion flow chart of each mode conversion diagram through a mode conversion diagram modeling management module, and building a flight mode model based on the configured mode conversion diagram and the mode conversion flow chart of each mode conversion diagram; Step S2: automatically verifying the constructed flight mode model through the mode conversion logic verification management module, and after completing the verification, initializing the flight mode model; Step S3: converting the flight mode model into executable C code through the mode conversion software code management module; Step S4: Implementing the automated execution of flight mode conversion based on C code through the automated test execution management module to generate state data of the mode conversion diagram; Step S5: real-time monitoring and verification management of the state data of the mode conversion diagram is performed through the mode conversion logic verification management module; Step S6: Generate a test log and a test report based on real-time monitoring and verification management of the state data of the mode transition diagram; Step S7: Evaluate the test process according to the test log and test report to obtain test result information; The step S1 comprises: Step S1.1: managing different mode transition diagrams using a mode transition diagram management submodule; Step S1.2: graphically configure the mode conversion process corresponding to each mode conversion diagram using the mode conversion process configuration submodule; Step S1.3: constructing a flight mode model based on different mode conversion diagrams and the mode conversion process corresponding to each mode conversion diagram using the modeling engineering management submodule, and saving different flight mode models into different project files; Step S1.4: using the Simulink / Stateflow model conversion submodule, using the state machine line diagram drawing function to automatically traverse and calculate each state transformation branch path, generate the corresponding state switching line diagram, and convert it into the corresponding Simulink / Stateflow model; Step S1.5: configuring the test report template using the test report template configuration submodule; The step S2 adopts: using the verification input management submodule to provide a data input window for the mode conversion diagram, selecting corresponding input parameters for input configuration according to the preset input conditions, and calling the parameter management module to initialize the input parameters; The step S5 adopts: Step S5.1: using the verification result display submodule to monitor the status data in real time and automatically judge the status data; Step S5.2: Use the verification difference intelligent analysis submodule to define the possible causes of the verification difference, infer the most likely cause of the difference based on different weights and corresponding judgment conditions, and display it in a highlighted font on the verification result display interface; The step S3 adopts: Step S3.1: Analyze the flight mode model using the graphic module analysis submodule to generate a target code file; Step S3.2: Generate a syntax tree using the code to configure the submodule configuration mode conversion designer pre-edited modeling graphics and C code mapping relationship configuration file, by parsing the code syntax tree to convert the business identifier in the primitive into a recognizable variable or function in the C language; Step S3.3: Create a workspace using the code generation management submodule, and copy or dynamically refresh the code template from the local disk to the workspace; Step S3.4: Use the code packaging and compilation configuration submodule to automatically analyze the code in the workspace, and package the project files, reference files, and dependent files to form an independent executable software package; The step S4 adopts: Step S4.1: Using the test process automatic execution submodule to call the C code obtained by parsing and conversion based on the test entry data to complete a process test; Step S4.2: Use the test process status graphical display submodule to display the current execution progress and the results of the executed test cases in real time; Step S4.3: When an abnormality occurs during the test process, the simulation system is debugged using the test process debugging submodule; Step S4.4: When an abnormality occurs during the test process, the test abnormality alarm submodule is used to automatically provide alarm information, and the alarm information is displayed through a preset UI interface; Step S4.5: Use the test log generation submodule to record the detailed log of each scenario and each test execution unit; the recorded information includes the start execution time, end execution time, execution number, execution input, execution output, judgment data value and judgment result.