Dynamic interface generation method

Through the interface editing mode and the dynamic generation method of the interface configuration file, the problem of high coupling between the interface and business logic in the instructor console software is solved, the interface and business logic are decoupled, the development efficiency and adaptability are improved, and rapid iterative delivery is adapted.

CN120653241APending Publication Date: 2025-09-16CHINA HELICOPTER RES & DEV INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510505678.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In the existing flight training simulator instructor console software development, the interface implementation is highly coupled with business logic functions, resulting in high development costs and low efficiency, and is unable to quickly adapt to the rapid iterative delivery requirements of user needs.

Method used

Adopting the interface editing mode and interface configuration file, the class reflection technology is used to dynamically generate the interface when the instructor console software is started, realizing the decoupling of the interface and business logic, including the initialization configuration, interface editing and interface generation process, using setting controls, display controls and configuration controls, and saving layout information through XML files.

Benefits of technology

It reduces development costs and time costs, improves development efficiency, realizes dynamic adjustment of interface content, adapts to the requirements of rapid iterative delivery, and complies with the design principles of high cohesion and low coupling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653241A_ABST
    Figure CN120653241A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of flight training simulators, in particular to a dynamic interface generation method. The method comprises the following steps of: realizing an interface configuration generation function in a mode conforming to user operation by using an interface editing mode on the premise of not influencing a business logic function of teacher console software; and meanwhile, dynamic generation of a human-computer interaction interface and binding of control business logic are realized in a form of reading an interface configuration file when the teacher console software is started.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of flight training simulators, and in particular to a method for generating a dynamic interface. Background Art

[0002] The development of instructor console software for flight training simulators requires organizing developers to create a human-machine interface with diverse interactive features tailored to the training tasks and user needs. As the primary subsystem for interaction between the flight training simulator and the instructor, the instructor console software provides functions such as designing sent parameters, displaying received parameters, pop-up prompts for system interaction, and security verification during data input. Therefore, finding a way to more efficiently generate interfaces tailored to user needs is a key research topic in this field.

[0003] When developing the human-computer interaction interface (HMI) for the instructor console software, most simulator vendors implemented the interface in native code, while simultaneously adding business logic to the interface implementation code. This resulted in a high degree of coupling between the interface implementation and the business logic implementation code, making it impossible to meet user needs as training tasks change. The existing development model requires developers to design and develop interfaces individually based on user needs, resulting in significant labor and time costs. Furthermore, the interface content cannot be dynamically adjusted in real time based on user needs, making it incapable of adapting to the requirements of rapid, iterative task delivery. Summary of the Invention

[0004] Purpose of the invention: To provide a method for generating a dynamic interface to solve the problem of consuming a lot of manpower and time costs and being unable to adapt to the requirements of rapid iterative delivery of tasks.

[0005] Technical solution:

[0006] A method for generating a dynamic interface is provided, which is applied to a development system. The method includes:

[0007] Without affecting the business logic function of the teacher console software, the interface configuration generation function is realized by using the interface editing mode in a mode that conforms to the user operation. At the same time, when the teacher console software is started, the dynamic generation of the human-computer interaction interface and the binding of the control business logic are realized by reading the interface configuration file.

[0008] Furthermore, without affecting the business logic function of the instructor console software, the interface configuration generation function is realized by using the interface editing mode in accordance with the user operation mode. At the same time, when the instructor console software is started, the dynamic generation of the human-computer interaction interface and the binding of the control business logic are realized by reading the interface configuration file, including:

[0009] Initialization configuration: Based on the functional requirements of the instructor console, three types of button components with different functions are created: setting controls for interface parameter control, display controls for interface parameter display, and software function configuration controls. During system initialization, an initialization grid layout is generated, the last modified or default instructor console software interface configuration file is read, and the combination mode of the three types of button components is called to fill the grid layout, preparing for instructors to edit the instructor console software interface.

[0010] Interface editing: When using the instructor console software editing function, users can configure interface controls according to the needs of different scientific research tasks or training tasks through the software function configuration control click response function or the setting / display control drag function; at the same time, during configuration, the user's save layout instruction is received, and according to the save layout instruction, the layout control information is traversed to automatically save the interface configuration file; the save layout instruction is the user's instruction to bind the parameters set in the corresponding interface configuration file according to the control type and submit the interface layout;

[0011] Interface generation: When users use the training function of the instructor console software, the latest interface configuration file is automatically read at startup, and the setting / display controls are automatically created. Based on the bound interface parameters, the corresponding control business logic functions are implemented, such as the setting and sending of interface parameters, and the front-end numerical display of interface parameters, to meet the needs of scientific research tasks or training tasks.

[0012] Furthermore, the method further comprises:

[0013] Designed settings controls for interface parameter control, display controls for interface parameter display, and software function configuration controls that meet the unique interface layout of the instructor console software;

[0014] Among them, the setting / display control is used to only record the layout coordinates and binding parameter configuration information during the user editing process during the interface editing, and at the same time monitor the setting / display control to implement the drag function, but does not implement the training business logic function; the configuration control is used to provide the user with a layout area and provide click events to implement control replacement during the interface editing. When the interface is generated, the system will hide the configuration control and not display it to the user.

[0015] Furthermore, the combination mode of three types of button components is called to fill the grid layout, including:

[0016] During the initialization process, the interface configuration file in the form of an XML file is read, and according to the structure and parameters of the configuration file, the setting / display controls and configuration controls are called to fill the interface grid layout.

[0017] Furthermore, before editing the interface, the method further includes:

[0018] When the software interface editing function is started, the system will generate an interface operation area, which is mainly divided into a configurable control area, an interface configuration area, and a layout setting area.

[0019] Furthermore, when using the instructor console software editing function, users can configure interface controls based on the needs of different scientific research tasks or training tasks through the software function configuration control click response function or the setting / display control drag function, including:

[0020] In the interface configuration area, after completing the control editing, the system will pop up a window prompting you to bind the corresponding input / output interface parameters based on the type of edited control. The bound interface parameters will be recorded in the interface configuration file in the form of an XML file for the implementation of business logic when the interface is generated. The interface configuration is completed through a loop operation.

[0021] In the configurable control area, the system provides configurable control examples, monitors the controls in the configurable control area, identifies mouse drag operations, and records the target coordinates of the mouse drag;

[0022] In the interface configuration area, the system automatically reads the interface configuration file and identifies the corresponding configuration file structure according to the corresponding layout rules in the helicopter settings, environment settings, and recording and playback control function modules to generate a configurable interface. When receiving a drag command from the user to drag a control into the interface configuration area, the system will replace the control at the corresponding coordinates, displaying the effect of interface editing in real time. In addition, the system also implements the option of replacing controls in blank areas of the layout with a mouse click, thus realizing the interface editing function.

[0023] In the interface configuration area, after completing the editing of the control, the system will pop up a window prompting you to bind the corresponding input / output interface parameters based on the type of edited control. The bound interface parameters will be recorded in the interface configuration file in the form of an XML file for the implementation of business logic when the interface is generated.

[0024] Furthermore, during configuration, a user submission instruction is received, and according to the submission instruction, the layout control information is traversed to automatically save the interface configuration file, including:

[0025] In the layout setting area, after the interface editing and control parameter binding are completed, the layout setting area provides layout management control functions. After receiving the save layout instruction, the system will traverse all existing control layout coordinates and bound interface parameters in the interface configuration area, and parse the interface according to the established interface configuration file rules and save it as an XML interface configuration file.

[0026] Furthermore, the latest interface configuration file is automatically read at startup, and the build settings / display controls are automatically created, including:

[0027] When started in training mode, it will automatically read the latest interface configuration file, parse the layout coordinates, control type, binding parameters, control size and control parameter information, dynamically create and generate control examples through class reflection technology, and place them in the coordinates corresponding to the interface layout to achieve the generation of the interface layout.

[0028] Beneficial effects:

[0029] The present invention adopts an interface editing form that conforms to human-computer interaction and a dynamic interface generation method based on class reflection technology with interface configuration files as intermediate storage, which effectively reduces the difficulty of system interface generation, improves the development efficiency of software projects, reduces labor costs and time costs, and enables the software to dynamically complete interface configuration according to user needs. At the same time, it realizes the decoupling and separation of interface generation and business logic function implementation, conforms to the "high cohesion-low coupling" design principle of software development, and enables the software to adapt well to the requirements of rapid iterative delivery of training tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 This is a flowchart of the interface editing of the present invention.

[0031] Figure 2 Generate a flow chart for the interface of the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solutions and advantages of the implementation of this application clearer, the technical solutions in the implementation of this application will be described in more detail below in conjunction with the drawings in the implementation of this application. In the drawings, the same or similar numbers throughout represent the same or similar elements or elements with the same or similar functions. The described implementation is a part of the implementation of this application, not all of the implementations. The implementation described below with reference to the drawings is exemplary and is intended to be used to explain this application, and should not be understood as a limitation on this application. Based on the implementation in this application, all other implementations obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. The implementation of this application is described in detail below in conjunction with the drawings.

[0033] In the description of the present invention, it should be understood that the terms "center", "axial", "vertical", "up", "down", "upper end", "bottom end", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the scope of protection of the present invention.

[0034] The present invention provides a method for generating a dynamic interface, the method comprising: initializing configuration, editing the interface, and generating the interface;

[0035] Initialization configuration: Based on the functional requirements of the instructor console, the system creates three types of button components with different functions: setting controls for interface parameter control, display controls for interface parameter display, and software function configuration controls. During system initialization, an initialization grid layout is generated, the last modified or default instructor console software interface configuration file is read, and a combination mode of the three types of controls is called to fill the grid layout, thus preparing the instructor for editing the instructor console software interface.

[0036] Interface editing: When using the instructor console software editing function, users can configure interface controls according to the needs of different scientific research tasks or training tasks through the software function configuration control click response function or the setting / display control drag function. At the same time, during configuration, users can bind the parameters set in the corresponding interface configuration file according to the control type. Finally, after submitting the interface layout, the system will traverse the layout control information and automatically save the interface configuration file;

[0037] The interface generation: When the user uses the training function of the instructor console software, the system will automatically read the latest interface configuration file at startup, automatically create and generate setting / display controls, and implement corresponding control business logic functions such as setting and sending interface parameters and front-end numerical display of interface parameters based on the bound interface parameters to meet the needs of scientific research tasks or training tasks.

[0038] Furthermore, in the initialization configuration: the system is designed to meet the unique interface parameter control requirements of the instructor console software interface layout, display controls for interface parameter display, and software function configuration controls. When editing the interface, the setting / display controls are only used to record the layout coordinates and binding parameter configuration information during the user editing process. At the same time, the setting / display controls are monitored to implement the drag and drop function, and the training business logic function is not implemented. When editing the interface, the configuration controls are used to provide users with a layout area and provide click events to implement control replacement. When the interface is generated, the system will hide the configuration controls and not display them to the user.

[0039] Furthermore, in the initialization configuration: the system reads the interface configuration file in the form of an XML file during the initialization process, and calls the setting / display control and the configuration control to fill the interface grid layout according to the structure and parameters of the configuration file.

[0040] Furthermore, the interface editing is as follows: when the software interface editing function is started, the system will generate an interface operation area, which is mainly divided into interface editing areas such as a configurable control area, an interface configuration area, and a layout setting area.

[0041] Furthermore, the interface is edited as follows: in the configurable control area, the system provides configurable control examples, such as setting controls, display controls, and unique instrument controls. The system monitors the controls in the configurable control area, identifies mouse drag operations, and records the target coordinates of the mouse drag.

[0042] Furthermore, the interface editing is as follows: in the interface configuration area, the system automatically reads the interface configuration file, identifies the corresponding configuration file structure according to the corresponding layout rules in the functional modules such as helicopter settings, environment settings, recording and playback control, and generates a configurable interface. When the user drags the control into the interface configuration area, the system will replace the control of the corresponding coordinates and display the effect of the interface editing in real time. In addition, the system also implements the option of replacing the control with a mouse click for the controls in the blank area of ​​the layout, and also implements the interface editing function. For the controls that have completed the layout, the system implements a click effect to delete the controls whose layout has been edited.

[0043] Furthermore, the interface editing is as follows: in the interface configuration area, after completing the editing of the control, the system will pop up a window prompting to bind the corresponding input / output interface parameters according to the type of edited control. The bound interface parameters will be recorded in the interface configuration file in the form of an XML file for the implementation of business logic when the interface is generated. Further, the interface editing is as follows: in the layout setting area, after the interface editing and control parameter binding are completed, the layout setting area provides a control function for layout management. After receiving the "save layout" instruction, the system will traverse all existing control layout coordinates and bound interface parameters in the interface configuration area, and parse the interface according to the established interface configuration file rules and save it as an interface configuration file in XML format.

[0044] Furthermore, the interface is generated as follows: when the system is started in training mode, it will automatically read the latest interface configuration file, parse the layout coordinates, control type, binding parameters, control size and other control parameter information, dynamically create a generated control example through class reflection technology, and place it in the coordinates corresponding to the interface layout to realize the generation of the interface layout.

[0045] Furthermore, the interface is generated as follows: In addition, the system will implement business logic functions such as parameter setting and display of the control according to the interface parameters bound to the control to achieve the functional requirements of the system.

[0046] The present invention works by using an interface configuration file as an intermediate storage structure and a structured text file to store interface layout information. This file primarily stores information such as the interface layout coordinates, control types, control sizes, and control binding interface parameters. During the initial configuration process, the interface configuration file is called to complete the initial configuration, preparing for interface editing. During the interface editing process, the user-defined interface layout information is stored in the interface configuration file. During the interface generation process, the system reads the configuration file to complete interface generation and bind business logic functions.

[0047] The present invention provides a method for generating a dynamic interface, the method comprising:

[0048] Initialization configuration:

[0049] According to the functional requirements of the software, the system creates three types of button controls with different functions: setting controls, display controls, and configuration controls. When the system is initialized, it generates an initial grid layout, reads the last modified interface configuration file, and calls related controls to fill the grid layout, preparing for users to edit the interface.

[0050] Interface Editor:

[0051] according to Figure 1 As shown in the interface editing flow chart, during the interface editing state, the system creates a configurable control area, an interface configuration area, and a layout settings area. The system monitors mouse drag events for controls in the configurable control area. Users can configure the software interface by dragging controls in the interface configuration area according to the software interface design requirements. After monitoring the drag event, the system records the coordinates of the mouse drag in real time and determines the coordinate area where the mouse is released. If the coordinates of the mouse release are not within the grid coordinate layout, the operation is considered invalid. If the coordinates of the mouse release are within the grid coordinate layout, the system records the layout coordinate information, replaces the layout content controls, and binds the interface parameters. Configurable controls can accept click-to-delete operations to delete configured controls. After repeating these operations in a loop, the interface layout can be configured.

[0052] After the user completes the interface layout configuration, click Save Layout. The system will traverse the grid layout control information and save the layout information as an XML file according to the preset rules. In addition, the user can click Reset Layout, and the system will initialize the interface configuration area and restore it to its original state.

[0053] Interface generation:

[0054] according to Figure 2As shown in the interface generation flow chart, during the interface generation phase, the system reads the modified interface configuration file and, based on the configuration file's layout coordinates, control type, interface parameters, and other control parameter information, dynamically creates and generates control instances using class reflection technology. These instances are then placed within the corresponding interface layout coordinates to generate the interface. Furthermore, control-bound interface parameters are used to implement business logic functions such as control parameter setting and display, fulfilling the system's functional requirements.

[0055] Example 1:

[0056] Taking the instructor console software developed by a research institute as an example, the implementation process of this method is explained:

[0057] The first step is to complete the network connection configuration of the computer equipment in each subsystem before starting the flight training simulator, using a local area network for data exchange. The user completes the initial configuration of the instructor console software on the instructor console system, selects the interface editing mode, and enters the interface editing operation.

[0058] In the second step, when starting the software interface editing function, according to the actual application needs, complete the control configuration of the instructor console software interface by dragging the control or clicking the fill function of the area control, select the corresponding interface parameters in the system interface configuration file, complete the interface configuration and parameter binding, and automatically save the interface configuration file after submission.

[0059] The third step is to switch the software mode to training mode. The system will restart and load the latest interface configuration file. It will automatically create and generate interface controls and bind interface parameters to implement the business logic functions of the controls. Use the software interface created according to user needs to start user training.

[0060] The present invention comprehensively analyzes the application modes of the state attributes and functional attributes of interface controls, extracts common technologies to realize the dynamic generation of software interfaces, and implements a parameter-driven data synchronization mechanism through the binding of interface parameters of controls, effectively reducing manpower and time costs, and can adjust the interface content in real time according to user needs, effectively adapting to the requirements of rapid iterative delivery of task projects.

[0061] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0062] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for generating a dynamic interface, characterized in that: Applied to a development system, the method includes: Without affecting the business logic function of the teacher console software, the interface configuration generation function is realized by using the interface editing mode in a mode that conforms to the user operation. At the same time, when the teacher console software is started, the dynamic generation of the human-computer interaction interface and the binding of the control business logic are realized by reading the interface configuration file.

2. The method according to claim 1, characterized in that Without affecting the business logic functions of the instructor console software, the interface configuration generation function is realized by using the interface editing mode in a mode that conforms to the user operation. At the same time, when the instructor console software is started, the dynamic generation of the human-computer interaction interface and the binding of the control business logic are realized by reading the interface configuration file, including: Initialization configuration: Based on the functional requirements of the instructor console, three types of button components with different functions are created: setting controls for interface parameter control, display controls for interface parameter display, and software function configuration controls. During system initialization, an initialization grid layout is generated, the last modified or default instructor console software interface configuration file is read, and the combination mode of the three types of button components is called to fill the grid layout, preparing for instructors to edit the instructor console software interface. Interface editing: When using the instructor console software editing function, users can configure interface controls according to the needs of different scientific research tasks or training tasks through the software function configuration control click response function or the setting / display control drag function; at the same time, during configuration, the user's save layout instruction is received, and according to the save layout instruction, the layout control information is traversed to automatically save the interface configuration file; the save layout instruction is the user's instruction to bind the parameters set in the corresponding interface configuration file according to the control type and submit the interface layout; Interface generation: When users use the training function of the instructor console software, the latest interface configuration file is automatically read at startup, and the setting / display controls are automatically created. Based on the bound interface parameters, the corresponding control business logic functions are implemented, such as the setting and sending of interface parameters, and the front-end numerical display of interface parameters, to meet the needs of scientific research tasks or training tasks.

3. The method according to claim 2, characterized in that The method further comprises: Designed settings controls for interface parameter control, display controls for interface parameter display, and software function configuration controls that meet the unique interface layout of the instructor console software; Among them, the setting / display control is used to only record the layout coordinates and binding parameter configuration information during the user editing process during the interface editing, and at the same time monitor the setting / display control to implement the drag function, but does not implement the training business logic function; the configuration control is used to provide the user with a layout area and provide click events to implement control replacement during the interface editing. When the interface is generated, the system will hide the configuration control and not display it to the user.

4. The method according to claim 3, characterized in that Call the combination mode of three types of button components to fill the grid layout, including: During the initialization process, the interface configuration file in the form of an XML file is read, and according to the structure and parameters of the configuration file, the setting / display controls and configuration controls are called to fill the interface grid layout.

5. The method according to claim 3, characterized in that Before the interface is edited, the method further includes: When the software interface editing function is started, the system will generate an interface operation area, which is mainly divided into a configurable control area, an interface configuration area, and a layout setting area.

6. The method according to claim 5, characterized in that When using the instructor console software editing function, users can configure interface controls based on the needs of different scientific research or training tasks through the software function configuration control click response function or the setting / display control drag function, including: In the interface configuration area, after completing the control editing, the system will pop up a window prompting you to bind the corresponding input / output interface parameters based on the type of edited control. The bound interface parameters will be recorded in the interface configuration file in the form of an XML file for the implementation of business logic when the interface is generated. The interface configuration is completed through a loop operation. In the configurable control area, the system provides configurable control examples, monitors the controls in the configurable control area, identifies mouse drag operations, and records the target coordinates of the mouse drag; In the interface configuration area, the system automatically reads the interface configuration file and identifies the corresponding configuration file structure according to the corresponding layout rules in the helicopter settings, environment settings, and recording and playback control function modules to generate a configurable interface. When receiving a drag command from the user to drag a control into the interface configuration area, the system will replace the control at the corresponding coordinates, displaying the effect of interface editing in real time. In addition, the system also implements the option of replacing controls in blank areas of the layout with a mouse click, thus realizing the interface editing function. In the interface configuration area, after completing the editing of the control, the system will pop up a window prompting you to bind the corresponding input / output interface parameters based on the type of edited control. The bound interface parameters will be recorded in the interface configuration file in the form of an XML file for the implementation of business logic when the interface is generated.

7. The method according to claim 6, characterized in that During configuration, the system receives the user's submission instruction, and automatically saves the interface configuration file by traversing the layout control information according to the submission instruction, including: In the layout setting area, after the interface editing and control parameter binding are completed, the layout setting area provides layout management control functions. After receiving the save layout instruction, the system will traverse all existing control layout coordinates and bound interface parameters in the interface configuration area, and parse the interface according to the established interface configuration file rules and save it as an XML interface configuration file.

8. The method according to claim 7, characterized in that Automatically read the latest interface configuration file at startup and automatically create build settings / display controls, including: When started in training mode, it automatically reads the latest interface configuration file, parses the layout coordinates, control types, binding parameters, and control sizes, and dynamically creates and generates control examples through class reflection technology. It is placed in the coordinates corresponding to the interface layout to achieve the generation of the interface layout.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.