Spaceflight equipment test system based on scripts and plug-ins
By adopting a script-based and plug-in architecture in the aerospace equipment test system, combining LUA script and plug-in architecture, communication between aerospace equipment subsystem models is realized, solving the problem of cumbersome communication code in the existing technology, and improving the system flexibility and efficiency.
Patent Information
- Application Number
- CN202411521833.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-29
Smart Images

Figure CN119473430A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a script- and plug-in-based aerospace equipment test system, belonging to the technical field of LVC test verification. Background Art
[0002] LVC simulation refers to the combination of real (live), virtual (Virtual), and construct (Construct) simulation. It can not only adapt to the future joint combat mode, support the complex test style of combat-oriented aerospace equipment, and transform to the comprehensive combat effectiveness test, but also realize the test conditions that cannot be achieved in reality, and well solve the problem that it is difficult for real equipment to participate in equipment testing. To realize LVC simulation, it is necessary to realize the underlying communication based on the distributed simulation support architecture. In the existing technology, the communication between models is realized by writing the corresponding communication code in real time, and there is a set of communication code for each model. If the communication logic needs to be adjusted, the code needs to be modified, which is cumbersome and time-consuming. Summary of the invention
[0003] The technical problem solved by the present invention is: to overcome the shortcomings of the prior art, and to propose a script- and plug-in-based aerospace equipment test system. By combining the LUA script and the plug-in architecture, a bridge is established between the system and the model, and between the system and the communication middleware, and the communication between the subsystem models of the aerospace equipment is realized. The subsystems are integrated into a whole to form an overall model of the digital equipment.
[0004] The technical solution of the present invention is:
[0005] A script- and plug-in-based aerospace equipment test system, comprising a main control module, a plurality of slave control modules and an operation support library;
[0006] Each slave control module is a plug-in sub-module designed according to a unified coding format. The plug-in sub-module defines the implementation logic of the object model and executes internal functions by calling the object model in the running support library after being loaded.
[0007] The main control module reads external configuration parameters and assigns values to internal variables of each plug-in sub-module, loads all plug-in sub-modules, and controls the corresponding plug-in sub-modules to execute in sequence through the set execution order;
[0008] The runtime support library provides an object model library for each plug-in sub-module. The objects defined in the object model include messages, state distribution objects and remote methods.
[0009] Further, the main control module includes a configuration management submodule, a program initialization submodule, a plug-in management submodule and an execution sequence control submodule;
[0010] The configuration management submodule reads the external configuration file and saves the configuration parameters of the external configuration file;
[0011] The program initialization submodule performs initial assignment of internal variables, applies for and creates computer resources, and loads all plug-in submodules;
[0012] The plug-in management submodule initializes, schedules and releases the included plug-in submodules;
[0013] The execution order control submodule sets the execution order of each plug-in submodule, transmits a signal to the corresponding plug-in submodule through the plug-in management submodule, and implements the execution of the corresponding method in the plug-in submodule.
[0014] Furthermore, the execution order control submodule sets the execution order of each plug-in submodule through an external LUA script, reads and parses the external script, obtains the method name in the plug-in submodule to be executed, and transmits a signal to the corresponding plug-in submodule through the plug-in management submodule.
[0015] Furthermore, the method for initializing the program initialization submodule is:
[0016] First, define entity variables for the publish-subscribe class of the model application in the LUA script and perform entity initialization. If physical hardware or semi-physical hardware is added to the test system, perform hardware initialization operations in the hardware initialization configuration.
[0017] Secondly, create a business thread to execute the test system. The framework allows the creation of multiple business threads, and scans and stores all dynamic library files in the plug-in sub-module directory folder in the memory. The files are stored in the memory through the map function and exist with the creation and release of the main business thread.
[0018] Finally, determine whether the plug-in sub-module is a valid plug-in. If it is not a valid plug-in, release the dynamic execution library file. If it is a valid plug-in, execute the initialization within the plug-in, including loading the configuration file, reading the log file, and executing the status initialization of the plug-in, including the initialization of the defined structure and the initialization of the status variables.
[0019] Furthermore, the plug-in submodule is an application program composed of multiple dynamic link libraries, designed in a unified coding format, and can be loaded and executed by the main control module; the plug-in program includes a plug-in interaction management unit, a plug-in initialization unit, an interactive service unit, a state initialization unit, a state time evolution unit and a state update unit;
[0020] The plug-in interaction management unit is used for communication and mutual calling between the plug-in submodule and the main control module, receiving signals from the plug-in management submodule in the main control module, sending signals to the plug-in initialization unit, the state time evolution unit, and the state update unit, and returning the execution results to the main control module;
[0021] The plug-in initialization unit is automatically triggered after the plug-in submodule is successfully loaded, and initializes the memory structure variables, publishes the state variables, subscribes to the state variables, publishes the remote methods, and subscribes to the remote methods;
[0022] The interactive service unit uses proxy-based services to complete remote method publishing and remote method subscription; remote method publishing is used to register the remote method publishing end in the middleware network, which receives requests initiated by other remote method subscription ends and returns the running results; remote method subscription is used to actively initiate requests to the remote method publishing end and obtain its calculated results;
[0023] The state initialization unit is the starting point of the space-time evolution process of the test system. It checks the state data frame of the test system, assigns the values in the state data frame of the test system to the state variables of the object model, and then saves the state variables of the object model as a complete simulation data frame and publishes it.
[0024] After the plug-in and state initialization are completed, the state time evolution unit performs internal logic calculations based on the initialized values and sends the calculation results to the state update unit;
[0025] After a state time evolution is completed, the state update unit saves the variable value as a complete simulation data frame, publishes it to the model subscriber, and serves as the input for the next state time evolution calculation.
[0026] Furthermore, after receiving the initialization signal, the plug-in interaction management unit sends an enable signal to the plug-in initialization unit and the state initialization unit; after receiving the time evolution signal, it sends an enable signal to the state time evolution unit; after receiving the state update signal, it sends an enable signal to the state update unit.
[0027] Further, the state initialization unit checks the virtual space state data frame, and the checking method includes integrity check, time deviation amount calculation, and time evolution confidence threshold check;
[0028] The integrity check ensures that all simulation variables that need to be assigned values can find meaningful data value mappings in the data frame;
[0029] The time deviation calculation check counts the deviation between all state value timestamps and the latest logical time;
[0030] The time evolution confidence threshold check is calculated based on whether the state value deviation exceeds the extrapolation threshold.
[0031] Furthermore, the interactive service unit adopts a proxy-based service to complete the remote method publication, and adopts a thread pool working mechanism at the remote method publishing end to optimize the efficiency of remote method implementation; the thread pool includes a thread scheduling module and a thread pool module of multiple system threads. When the remote method request arrives at the publishing end, the thread scheduling management module intelligently distributes the request to an available thread in the thread pool, thereby realizing high-concurrency processing of remote methods.
[0032] Furthermore, the runtime support library also includes a third-party runtime library.
[0033] The advantages of the present invention compared with the prior art are:
[0034] (1) The present invention provides a script- and plug-in-based aerospace equipment test system, which adopts a master-slave framework structure. The master control module implements the definition and maintenance of basic states such as initialization and time management. The slave control module is a plug-in submodule. The program defines the implementation logic of the object model, and assigns values to the master and slave control modules through LUA scripts to realize the information flow and data interaction coupling relationship between the models.
[0035] (2) The present invention provides a script- and plug-in-based aerospace equipment test system, which uses a combination of LUA scripts and a plug-in architecture to separate all communication service information between models into LUA scripts, and implements the construction of different test systems by defining the interaction of models in LUA scripts.
[0036] (3) The present invention provides a script- and plug-in-based aerospace equipment test system, which implements attribute assignment and attribute value acquisition of three types of objects defined in the object model, namely, message, state distribution object (VIO), and remote method (RM). BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0038] Figure 1 This is a schematic diagram of the composition of the test system of an embodiment of the present invention;
[0039] Figure 2 This is an example diagram of a configuration file of a main control module according to an embodiment of the present invention;
[0040] Figure 3 This is a flowchart of program initialization according to an embodiment of the present invention;
[0041] Figure 4 The working principle diagram of the sequential control module of the embodiment of the present invention is as follows;
[0042] Figure 5 The figure is a schematic diagram of the working mechanism of the thread pool at the remote method publishing end according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0044] The present invention proposes a script- and plug-in-based aerospace equipment test system, which integrates model prototypes into a computer application program of the test system. The program can assemble the prototype object model into a digital thread that can evolve with logical time in the data space of a virtual test field, solve the problem of aerospace equipment model integration at the application layer, define the interaction logic of the aerospace equipment model itself, and form a digital aerospace equipment test overall model composed of a large number of cross-domain, heterogeneous prototypes and test equipment.
[0045] The aerospace equipment test system includes a main control module, a slave control module and an operation support library. The system model framework is as follows: Figure 1 As shown, the main control module is the main program, the slave control module is the slave program, and the plug-in submodule is the plug-in program. A complete test consists of multiple test applications, each of which consists of a main control module, multiple slave control modules, and a running support library.
[0046] (1) Main control module
[0047] The main control module is the entry point of the test system model framework and the core of the entire framework. It can be run directly. In the test application, only one main control module is allowed, and the main control module must exist in the test model framework. The main control module consists of four sub-function modules: configuration management, program initialization, plug-in management, and execution sequence control.
[0048] The configuration management submodule reads external configuration files and saves related parameter configurations to memory for reading and use by other modules within the application. Considering the application scenarios and scalability requirements, the XML format is used as the encoding format of the configuration files. Figure 2 The following is a specific example of a configuration file.
[0049] The program initialization submodule performs initial assignment of internal variables of the main control module by executing LUA scripts; applies for and creates computer resources; initializes the included plug-in submodules; and coordinates the normal startup of each plug-in function. Figure 3 The flowchart for program initialization operation is as follows. First, define entity variables for the publish-subscribe class of the model application in the LUA script to perform entity initialization. If physical hardware or semi-physical hardware is added to the test system, perform hardware initialization operations in the hardware initialization configuration. Secondly, create a business thread to execute the test system operation. The framework allows the creation of multiple business threads, and scans and stores all dynamic library files in the directory folder of the plug-in submodule in the memory. The files are stored in the memory through the map function and exist with the creation and release of the main business thread. Finally, determine whether the plug-in submodule is a valid plug-in. If it is not a valid plug-in, release the dynamic execution library file. If it is a valid plug-in, perform the initialization within the plug-in, including loading configuration files, reading log files, etc., and perform the state initialization of the plug-in, including the initialization of the defined structure and state variables. These tasks are the basis for the normal operation of the application. In the process of program initialization, developers need to carefully consider the collaboration and dependency between various functional modules to ensure that the application can run stably in different environments and conditions. For example, in the process of applying for and creating computer resources, it is necessary to consider the differences between different operating systems and hardware platforms, as well as the actual needs and performance requirements of the application. When loading and starting plug-in submodules, you need to consider issues such as the dependencies between plug-ins, the startup order, and the error handling mechanism.
[0050] The plug-in management submodule is used to complete the processing of all external plug-in submodules corresponding to the main control module, including initializing, scheduling and releasing the included plug-in submodules.
[0051] The execution order control submodule is used to manage the execution order of business functions. This submodule supports parsing external script languages and executes them one by one in strict order according to the functions described in the script language. Lua language is used as the syntax of the external script language. This language has rich function definition capabilities and can define various methods in the execution plug-in submodule, such as Figure 4 As shown in the figure, the working principle of the execution order control module is shown. First, the external script language is read and the language content is parsed to obtain the method name in the plug-in sub-module that needs to be executed. Then, the execution order control module transmits a signal to the corresponding plug-in interaction management module through the plug-in management module, and finally realizes the execution of the corresponding method in the plug-in sub-module. In addition, the execution order control module also has many advanced functions, such as execution priority control, exception handling, etc., to ensure the stability and efficiency of the program.
[0052] (2) Plug-in submodules
[0053] A plug-in sub-module is an application composed of multiple dynamic link libraries. It is designed according to a unified coding format and can be loaded by the main control module to execute its internal functions. A complete test application can contain multiple plug-in sub-modules. The functions of these plug-in sub-modules are independent of each other and do not interfere with each other, and they work together to complete the test process.
[0054] The plug-in sub-module includes multiple units: plug-in interaction management, plug-in initialization, interaction service, state initialization, state time evolution and state update.
[0055] The plug-in interaction management unit is used for the connection and mutual calling between the plug-in submodule and the main control module, and is responsible for receiving the signal from the plug-in management in the main control module. When receiving the initialization signal, the plug-in interaction management will execute the plug-in initialization and state initialization functions in the plug-in submodule; when receiving the time evolution signal, the plug-in interaction management module will execute the state time evolution function in the plug-in submodule; when receiving the state update signal, the plug-in interaction management module will execute the state update function in the plug-in submodule.
[0056] The plug-in initialization unit is automatically triggered after the plug-in is successfully loaded to complete the following key functions: 1) Execute the initialization and assignment operation of memory variables to ensure that all variables in the plug-in are correctly initialized and assigned; 2) Publish the initialization operation of VIO state variables to ensure that they can be accessed and used by other plug-ins; 3) Subscribe to the initialization operation of VIO state variables to ensure that variable values published by other plug-ins can be received; 4) Publish the initialization operation of remote methods to ensure that the method can be accessed and called by other plug-ins; 5) Subscribe to the initialization operation of remote methods to ensure that method call requests published by other plug-ins can be received.
[0057] The interactive service unit uses proxy-based service technology to complete the implementation of remote method functions and its optimized scheduling. The implementation of remote methods is distributed in other applications and returned to remote method subscribers through network transmission. Interactive service is divided into two forms: remote method publication and remote method subscription. Remote method publication is to register the remote method publishing end in the middleware network. This end can receive requests initiated by other remote method subscribers and return the running results. Remote method subscription is used to actively initiate requests to the remote method publishing end and obtain its calculated results. Among them, in order to optimize the efficiency of remote method implementation, the thread pool working mechanism is adopted at the remote method publishing end, such as Figure 5As shown in the figure, the working block diagram of the thread pool of the remote method publishing end is shown. The working mechanism includes a thread scheduling module and a thread pool module of multiple system threads. When the remote method request arrives at the publishing end, the thread scheduling management module intelligently distributes the request to an available thread in the thread pool, thereby realizing high concurrent processing of the remote method. Such a design can not only improve the parallel computing capability of the system, but also effectively avoid resource competition and thread blocking, thereby optimizing the overall performance and response speed.
[0058] The state initialization unit is the starting point of the space-time evolution process of the test system, including checking the test system state data frame and object model state assignment. Checking the test system state data frame is to perform integrity check, time deviation calculation, and time evolution confidence threshold check on the latest state frame of the test system space to ensure that the logical time evolution has the correct premise. The integrity check determines that all simulation variables that need to be assigned can find meaningful data value mappings in the data frame; the time deviation calculation counts the deviation between all state value timestamps and the latest logical time; the time evolution confidence threshold check is based on whether the state value deviation calculation exceeds the extrapolation threshold. The object model state assignment process assigns the values in the state data frame of the test system to the object model state variables.
[0059] After the plug-in initialization and state initialization are completed, the state time evolution unit performs internal logic calculations based on the initialized values and then gives the results to the state update unit.
[0060] After a state time evolution is completed, the state update unit saves the variable value as a complete simulation data frame, publishes it to the model subscriber, and serves as the input for the next state time evolution calculation.
[0061] Publishing simulation data frames is a key step to ensure the continuity and integrity of the simulation process, and is also an important guarantee for the reliability of simulation results. When saving simulation data frames, you need to pay attention to the structure and content of the data frames to ensure the integrity and readability of the data frames. At the same time, before publishing the data frames, you need to perform some necessary checks and verifications on the data frames to ensure the correctness and consistency of the data frames. Through these measures, the accuracy and reliability of simulation results can be ensured, and strong support can be provided for subsequent simulation analysis and decision-making.
[0062] (3) Runtime support library
[0063] The runtime support library provides business support for the plug-in submodules, including the object model (VOM) library, remote method implementation, and third-party runtime library components. The definition of the object model can be found in the patent A method for automatically generating code for a virtual test distributed object model framework (201210429079.0). The implementation definition of the remote method is in the object model, and the implementation logic of the remote method needs to be added to the object model. The framework supports referencing third-party runtime library programs based on C / C++ to achieve richer functions.
[0064] The present invention is the basic framework of the distributed simulation support architecture and an application program running on the integrated support platform, which is used to integrate various component modules of aerospace equipment in digital space. This experimental system establishes a bridge between the framework and the model, and between the framework and the communication middleware, and realizes the communication between subsystem models. At the same time, users can add specific logic of the application on the basis of the model framework to realize the interaction between models, integrate the subsystems into a whole through the basic model framework, and relate the subsystems of aerospace equipment to each other to form a digital equipment overall model.
[0065] The above-described embodiments are only preferred specific implementations of the present invention. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.
Claims
1. A script and plug-in based aerospace equipment test system, characterized in that: It includes a main control module, multiple slave control modules and an operation support library; Each slave control module is a plug-in sub-module designed according to a unified coding format. The plug-in sub-module defines the implementation logic of the object model and executes internal functions by calling the object model in the running support library after being loaded. The main control module reads external configuration parameters and assigns values to internal variables of each plug-in sub-module, loads all plug-in sub-modules, and controls the corresponding plug-in sub-modules to execute in sequence through the set execution order; The runtime support library provides an object model library for each plug-in sub-module. The objects defined in the object model include messages, state distribution objects and remote methods.
2. The script- and plug-in-based aerospace equipment test system according to claim 1, characterized in that: The main control module includes a configuration management submodule, a program initialization submodule, a plug-in management submodule and an execution sequence control submodule; The configuration management submodule reads the external configuration file and saves the configuration parameters of the external configuration file; The program initialization submodule performs initial assignment of internal variables, applies for and creates computer resources, and loads all plug-in submodules; The plug-in management submodule initializes, schedules and releases the plug-in submodules it manages; The execution order control submodule sets the execution order of each plug-in submodule, transmits a signal to the corresponding plug-in submodule through the plug-in management submodule, and implements the execution of the corresponding method in the plug-in submodule.
3. The script- and plug-in-based aerospace equipment test system according to claim 2, characterized in that: The execution order control submodule sets the execution order of each plug-in submodule through an external LUA script, reads and parses the external script, obtains the method name in the plug-in submodule to be executed, and transmits signals to the corresponding plug-in submodule through the plug-in management submodule.
4. The script- and plug-in-based aerospace equipment test system according to claim 2, characterized in that: The method for initializing the program initialization submodule is: First, define entity variables for the publish-subscribe class of the model application in the LUA script and perform entity initialization. If physical hardware or semi-physical hardware is added to the test system, perform hardware initialization operations in the hardware initialization configuration. Secondly, create a business thread to execute the test system operation, allowing the creation of multiple business threads, and scan and store all dynamic library files in the plug-in sub-module directory folder in the memory. The files are stored in the memory through the map function and exist with the creation and release of the main business thread. Finally, determine whether the plug-in sub-module is a valid plug-in. If it is not a valid plug-in, release the dynamic execution library file. If it is a valid plug-in, execute the initialization within the plug-in, including loading the configuration file, reading the log file, and executing the status initialization of the plug-in, including the initialization of the defined structure and the initialization of the status variables.
5. The script- and plug-in-based aerospace equipment test system according to claim 1, characterized in that: The plug-in submodule is an application program composed of multiple dynamic link libraries, designed in a unified coding format, and can be loaded and executed by the main control module; the plug-in submodule includes a plug-in interaction management unit, a plug-in initialization unit, an interactive service unit, a state initialization unit, a state time evolution unit, and a state update unit; The plug-in interaction management unit is used for communication and mutual calling between the plug-in submodule and the main control module, receiving signals from the plug-in management submodule in the main control module, sending signals to the plug-in initialization unit, the state time evolution unit, and the state update unit, and returning the execution results to the main control module; The plug-in initialization unit is automatically triggered after the plug-in submodule is successfully loaded, and initializes the memory structure variables, publishes the state variables, subscribes to the state variables, publishes the remote methods, and subscribes to the remote methods; The interactive service unit uses agent-based services to complete remote method publishing and remote method subscription; Remote method publishing is used to register a remote method publishing end in the middleware network, which receives requests from other remote method subscription ends and returns the running results; remote method subscription is used to actively initiate requests to the remote method publishing end and obtain its calculated results; The state initialization unit is the starting point of the space-time evolution process of the test system. It checks the state data frame of the test system, assigns the values in the state data frame of the test system to the state variables of the object model, and then saves the state variables of the object model as a complete simulation data frame and publishes it. After the plug-in and state initialization are completed, the state time evolution unit performs internal logic calculations based on the initialized values and sends the calculation results to the state update unit; After a state time evolution is completed, the state update unit saves the variable value as a complete simulation data frame, publishes it to the model subscriber, and serves as the input for the next state time evolution calculation.
6. The script- and plug-in-based aerospace equipment test system according to claim 5, characterized in that: When the plug-in interaction management unit receives the initialization signal, it sends an enable signal to the plug-in initialization unit and the state initialization unit; when the time evolution signal is received, it sends an enable signal to the state time evolution unit; when the state update signal is received, it sends an enable signal to the state update unit.
7. The script- and plug-in-based aerospace equipment test system according to claim 5, characterized in that: The state initialization unit checks the virtual space state data frame, and the checking method includes integrity check, time deviation calculation, and time evolution confidence threshold check; The integrity check ensures that all simulation variables that need to be assigned values can find meaningful data value mappings in the data frame; The time deviation calculation check counts the deviation between all state value timestamps and the latest logical time; The time evolution confidence threshold check is based on whether the state value deviation exceeds the extrapolation threshold.
8. The script- and plug-in-based aerospace equipment test system according to claim 5, characterized in that: The interactive service unit uses a proxy-based service to complete the remote method publication, and uses a thread pool working mechanism at the remote method publication end to optimize the efficiency of remote method implementation; the thread pool includes a thread scheduling module and a thread pool module of multiple system threads. When the remote method request arrives at the publication end, the thread scheduling management module intelligently distributes the request to an available thread in the thread pool to achieve high concurrent processing of remote methods.
9. The script- and plug-in-based aerospace equipment test system according to claim 1, characterized in that: The runtime support library also has a third-party runtime library.
Citation Information
Patent Citations
A method for automatic generation of framework code of virtual test distributed object model
CN102929681B
Aerospace measurement and control system configuration method and device
CN112905262A
Spaceflight measurement and control integrated test software framework system and operation method
CN114880249A
Semi-physical simulation master control system for spacecraft control system
CN116360288A
Systems and methods of management console user interface pluggability
US20180246837A1
Cited By
Method and device for running Lua plug-in under RTEMS system
CN121116421A