Graphical interface program design method capable of dynamically simulating
By combining the data flow syntax paradigm and abstract syntax tree, dynamic simulation of airborne display interfaces is achieved, solving the problem that the effects are difficult to see intuitively in complex interface designs, and improving development and testing efficiency.
Patent Information
- Application Number
- CN202511969720.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies cannot intuitively and quickly view the design effects under different display states when designing complex airborne display interfaces, resulting in low development efficiency.
The graphical interface is designed using the data flow syntax paradigm. By designing the update order of the data flow and the abstract syntax tree, the dynamic simulation of the control state is realized, and the logical relationship between the controls is constructed and dynamically simulated.
It improves the efficiency of designers in visually viewing the graphical interface, simplifies functional testing, and increases software development efficiency.
Smart Images

Figure CN121501282A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of aviation display software development, and particularly relates to a graphical interface programming method capable of dynamic simulation. BACKGROUND
[0002] Graphical interface programming (GUI programming for short) is a software development technology, which involves creating a visual interface for user interaction with a computer, and allows the user to interact with a computer program through a graphical interface (GUI), which can greatly improve the usability and accessibility of the program. Common GUI development tools and technologies include:
[0003] 1. Windows Forms, a Windows user interface framework developed by Microsoft, based on.NetFrameWork;
[0004] 2. Qt, a cross-platform C++ graphical user interface application development framework;
[0005] 3. JavaFX, a Java technology platform for creating and deploying client applications;
[0006] 4. Tkinter, a standard GUI library for Python.
[0007] The above technologies are basically easy to use, provide rich controls, and have good integrated development environments, but when designing, the interfaces obtained are generally static, and the user can only see the stacked display of various controls in the integrated development environment, and cannot confirm the actual running effect. In the field of airborne display, the main interface elements are basically composed of basic graphics such as text, lines, rectangles, and circles, and in different display states, the same display area will display completely different content. When multiple display states are superimposed, it is impossible to intuitively view the design effect through static design pictures, and it is usually necessary to combine control logic to compile an executable program in the development environment for verification. When the project structure is complex, the above process will consume a lot of time and reduce the development efficiency. SUMMARY
[0008] The present application aims to provide a graphical interface programming method capable of dynamic simulation, which solves the problem of being unable to intuitively and quickly view the design effect when designing a complex interface.
[0009] The present application achieves the above-mentioned purpose through the following technical solutions:
[0010] A method for designing a dynamically simulated graphical user interface (GUI) program includes the following steps:
[0011] Step 1: Design a data flow syntax paradigm, whereby the data flow is an expression that expresses the logical relationship between the attributes of controls, including source expressions and target expressions;
[0012] Step 2: Based on the syntax paradigm, design the data flow according to the requirements during the interface design process, calculate the update order of the data flow according to the interdependencies, and save the design results to the design file;
[0013] In step 3, dynamic simulation is performed based on the design results. According to the update order of the data flow, the data flow or update control is executed sequentially or cyclically to achieve simulation operation.
[0014] Preferably, the design method of the data flow syntax paradigm is as follows: the syntax paradigm of the data flow is defined according to the EBNF syntax paradigm. The source expression is reduced to an entity and constructed through mathematical operation, logical operation, and macro function iteration, including strings, integers, enumerations, objects, and object properties; the target expression is reduced to an object or object property, and the syntax of the target expression belongs to a subset of the source expression.
[0015] Preferably, step 2 specifically includes:
[0016] Step 2-1: In the process of graphical interface design, create a series of controls, and then set the parent-child and sequential relationships between the controls, as well as their respective properties and styles to build a complex display screen; at the same time, based on the data flow syntax paradigm defined in Step 1, and combined with the current context, design the property logic relationship expression between different control objects, that is, the data flow.
[0017] Step 2-2: Validate the written data flow. First, verify whether the format conforms to the syntax paradigm; second, verify whether the semantics are correct in the current context. In addition, the same target expression can only appear once in the same context. Errors in the data flow should be indicated during the design phase, and during the parsing of the design file, the data flow should be indicated and ignored.
[0018] Steps 2-3: Sort the data stream update order according to priority, and sort those with the same priority according to the text of the destination expression;
[0019] Steps 2-4: After sorting is complete, save the update order of the obtained data stream to the corresponding graphical interface design configuration file to save the design results.
[0020] Preferably, the priority is calculated as follows: each data stream has an initial priority and two associated lists, namely an input list and an output list. Assuming the destination expression of data stream A appears in the source expression of data stream B, then A is placed in B's input list, and B is placed in A's output list. Whenever a new data stream is added, all previous data streams are traversed, and the input and output lists of each data stream are updated. After all the input and output lists of all data streams are established, all data streams are traversed, and the following priority update operation is performed on each data stream: the priority of the current data stream is obtained and decremented by 1 to get the adjusted priority; each input data stream in the input list of the current data stream is traversed; if the priority of the input data stream is greater than the adjusted priority, the priority of the input data stream is set to the adjusted priority, and the priority update operation is performed on the input data stream. This process is recursively repeated until the priorities of all data streams are obtained. The smaller the priority value, the higher the priority level, and the more likely it is to be executed first.
[0021] Preferably, step 3 specifically includes:
[0022] Step 3-1: After sorting all data streams by priority, update the control objects related to the data stream destination expression;
[0023] Step 3-2: Execute the update list of data stream and control object sequentially. Parse the data stream according to the syntax paradigm, construct the corresponding abstract syntax tree, calculate the value of the syntax tree node based on the relationship between the syntax tree node and the control object, and thus obtain the value of the data stream source expression. Then, through the data stream destination expression, feed the result back to the control object associated with the destination expression. The control object then updates and refreshes the display according to the changes in its properties.
[0024] Step 3-3: After establishing the relationship between multiple controls and external inputs through data flow, the state changes of the associated control objects can be dynamically driven by the external inputs, thereby achieving a dynamic simulation effect.
[0025] Preferably, the method for updating the control objects related to the destination expression of the data stream is as follows: obtain the associated control object of the highest priority data stream destination expression, traverse all remaining data streams in descending order of priority, and determine whether the associated control object of the data stream destination expression is consistent with the associated control object of the highest priority data stream destination expression. If they are consistent, continue traversing; if they are inconsistent, update the associated control object of the highest priority data stream destination expression before the data stream that has changed; then treat that data stream as the highest priority data stream, repeat the previous process, and so on, to obtain an update list of all data streams and control objects that need to be updated.
[0026] The beneficial effects of this invention are as follows:
[0027] 1. By constructing logical relationships between graphical controls through data flow and combining it with abstract syntax trees to interpret and execute data flow, designers can more intuitively and quickly view the graphical interface design effects under different states, thereby improving development efficiency;
[0028] 2. By designing data flow, the relationship between external input and graphical interface can be quickly established, helping designers to conduct functional testing more conveniently and improving the efficiency of software verification. Attached Figure Description
[0029] Figure 1 A flowchart illustrating a graphical user interface (GUI) programming method capable of dynamic simulation.
[0030] Figure 2 A diagram illustrating the design process of an interface design file for a dynamically simulated graphical user interface programming method.
[0031] Figure 3 This is a diagram illustrating the interface simulation process of a dynamically simulated graphical user interface programming method. Detailed Implementation
[0032] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0033] This embodiment illustrates a dynamically simulateable graphical user interface (GUI) programming method. See [link to relevant documentation]. Figure 1 As shown, it includes the following steps:
[0034] Step 1: Design a data flow syntax paradigm. The data flow is an expression that expresses the logical relationship between the attributes of controls. The data flow includes source expressions and target expressions, which represent the flow of data from the source to the destination.
[0035] The design method of the syntax paradigm is as follows: the user defines the syntax paradigm of the data flow according to the EBNF syntax paradigm. The source expression is reduced to an entity and can be iteratively constructed through mathematical operations (such as addition, subtraction, multiplication, and division), logical operations (such as AND, OR, and NOT), and specific macro functions (such as Max and Min). It can include strings, integers, enumerations, objects, object properties, etc. The target expression is reduced to an object or object property. The syntax of the target expression belongs to a subset of the source expression.
[0036] Step 2: Based on syntactic paradigms, design the data flow according to requirements during the interface design process, calculate the update order of the data flow based on interdependencies, and save the design results to the design file. For example... Figure 2 As shown, it specifically includes:
[0037] Step 2-1: In the graphical interface design process, a series of basic controls are created by dragging, clicking, etc., according to conventional design methods. Then, the parent-child and sequential relationships between the controls, as well as their respective attributes and styles, are set to construct complex display screens. At the same time, in order to achieve dynamic simulation, this embodiment also designs the attribute logic relationship expression between different control objects, i.e., data flow, based on the data flow syntax paradigm defined in Step 1 and combined with the current context environment.
[0038] Step 2-2: In the actual design process, it is necessary to verify the written data flow. First, it is necessary to verify whether the format conforms to the syntax paradigm; second, it is necessary to verify whether the semantics are correct in the current context. In addition, the same purpose expression can only appear once in the same context (i.e., a single graphical interface design file). For erroneous data flows, prompts should be given during design, and during the parsing of the design file, the data flow should be prompted and ignored.
[0039] Steps 2-3: Dependencies exist between data flows and control objects, as well as between data flows themselves. Therefore, different execution orders can affect the display of the designed interface. It's necessary to sort the data flows to eliminate inconsistencies in design results caused by different writing orders of the same data flow. The specific sorting logic involves calculating the priority of all data flows, and sorting those with the same priority according to the text of their destination expression. The priority calculation method is as follows: each data flow has an initial priority and two data flow association lists: an input list and an output list. For example, if the destination expression of data flow A appears in the source expression of data flow B, then A... Place the data stream into B's input list, and add B to A's output list. Whenever a new data stream is added, iterate through all previous data streams, updating the input and output lists of each stream. Once all data stream input and output lists are established, iterate through all data streams, performing the following priority update operation for each stream: obtain the current data stream's priority and decrement it by 1 to get the adjusted priority; iterate through each input data stream in the input queue of that data stream; if the input data stream's priority is greater than the adjusted priority, set the input data stream's priority to the adjusted priority and perform the priority update operation on the input data stream, recursively. Finally, the priorities of all data streams are obtained, where a smaller priority value indicates a higher priority level and requires priority execution.
[0040] Steps 2-4: After sorting all data streams by priority from largest to smallest, save the resulting data stream list to the corresponding graphical interface design configuration file to save the design results.
[0041] In step 3, dynamic simulation is performed based on the design results. According to the update order of the data flow, the data flow or updated controls are executed sequentially and cyclically to achieve simulation operation. For example... Figure 3 As shown, it specifically includes:
[0042] Step 3-1: Having obtained the updated list of all data streams and saved the design file through the previous steps, during dynamic simulation, in addition to updating the data streams sequentially, the associated control objects also need to be updated. This is because a change in a certain attribute of a control object may affect the object's state, causing other attributes of the object to change. After sorting all data streams by priority, the update order of associated control objects needs to be calculated. Only the control objects related to the destination expression of the data stream need to be updated. The specific method is as follows: Obtain the associated control object of the destination expression of the highest priority data stream. Traverse all remaining data streams in descending order of priority, and check whether the associated control object of the destination expression of each data stream is consistent with the associated control object of the destination expression of the highest priority data stream. If they are consistent, continue traversing. If they are inconsistent, the associated control object of the destination expression of the highest priority data stream should be updated before the data stream that has changed. Then, treat that data stream as the highest priority data stream and repeat the previous process. By doing so, the updated list of all data streams and control objects that need to be updated can be obtained.
[0043] Step 3-2: The dynamic simulation process executes sequentially according to the update list of the data flow and control objects. For the data flow, it is parsed according to the syntax paradigm to construct the corresponding Abstract Syntax Tree (AST). Based on the relationship between the AST nodes and control objects, the values of the AST nodes in the current context are calculated to obtain the value of the data flow source expression. Then, through the data flow destination expression, the result is fed back to the control object associated with the destination expression. The control object is then updated and refreshed according to the changes in its properties.
[0044] Step 3-3: After establishing the relationship between multiple controls and external inputs through data flow, the state changes of the associated control objects can be dynamically driven by the external inputs, thereby achieving a dynamic simulation effect.
[0045] It is understood that those skilled in the art can make equivalent substitutions or modifications to the technical solution and inventive concept of the present invention, and all such substitutions or modifications should fall within the protection scope of the appended claims.
Claims
1. A method for designing a dynamically simulated graphical user interface, characterized in that... Includes the following steps: Step 1: Design a data flow syntax paradigm, whereby the data flow is an expression that expresses the logical relationship between the attributes of controls, including source expressions and target expressions; Step 2: Based on the syntax paradigm, design the data flow according to the requirements during the interface design process, calculate the update order of the data flow according to the interdependencies, and save the design results to the design file; In step 3, dynamic simulation is performed based on the design results. According to the update order of the data flow, the data flow or update control is executed sequentially or cyclically to achieve simulation operation.
2. The method for designing a dynamically simulated graphical user interface according to claim 1, characterized in that... The design method of the data flow syntax paradigm is as follows: the syntax paradigm of the data flow is defined according to the EBNF syntax paradigm, the source expression is reduced to an entity, and it is constructed through mathematical operation, logical operation, and macro function iteration, including strings, integers, enumerations, objects, and object properties; The target expression is reduced to an object or object property, and the syntax of the target expression is a subset of the source expression.
3. The method for designing a dynamically simulated graphical user interface according to claim 1, characterized in that... Step 2 specifically includes: Step 2-1: In the process of graphical interface design, create a series of controls, and then set the parent-child and sequential relationships between the controls, as well as their respective properties and styles to build a complex display screen; at the same time, based on the data flow syntax paradigm defined in Step 1, and combined with the current context, design the property logic relationship expression between different control objects, that is, the data flow. Step 2-2: Validate the written data flow. First, verify whether the format conforms to the syntax paradigm; second, verify whether the semantics are correct in the current context. In addition, the same target expression can only appear once in the same context. Errors in the data flow should be indicated during the design phase, and during the parsing of the design file, the data flow should be indicated and ignored. Steps 2-3: Sort the data stream update order according to priority, and sort those with the same priority according to the text of the destination expression; Steps 2-4: After sorting is complete, save the update order of the obtained data stream to the corresponding graphical interface design configuration file to save the design results.
4. The method for designing a dynamically simulated graphical user interface according to claim 3, characterized in that... The priority is calculated as follows: each data stream has an initial priority and two data stream association lists, namely an input list and an output list. Assuming that the destination expression of data stream A appears in the source expression of data stream B, then A is placed in the input list of B, and B is placed in the output list of A. Whenever a new data stream is added, all previous data streams are traversed, and the input and output lists of each data stream are updated. After the input and output lists of all data streams are established, all data streams are traversed, and the following priority update operation is performed on each data stream: the priority of the current data stream is obtained and decremented by 1 to get the adjusted priority; each input data stream in the input list of the current data stream is traversed, and if the priority of the input data stream is greater than the adjusted priority, the priority of the input data stream is set to the adjusted priority, and the priority update operation is performed on the input data stream. This process is repeated recursively until the priority of all data streams is obtained. The smaller the priority value, the higher the priority level, and the more likely it is to be executed first.
5. The method for designing a dynamically simulated graphical user interface according to claim 1, characterized in that... Step 3 specifically includes: Step 3-1: After sorting all data streams by priority, update the control objects related to the data stream destination expression; Step 3-2: Execute the update list of data stream and control object sequentially. Parse the data stream according to the syntax paradigm, construct the corresponding abstract syntax tree, calculate the value of the syntax tree node based on the relationship between the syntax tree node and the control object, and thus obtain the value of the data stream source expression. Then, through the data stream destination expression, feed the result back to the control object associated with the destination expression. The control object then updates and refreshes the display according to the changes in its properties. Step 3-3: After establishing the relationship between multiple controls and external inputs through data flow, the state changes of the associated control objects can be dynamically driven by the external inputs, thereby achieving a dynamic simulation effect.
6. The method for designing a dynamically simulated graphical user interface according to claim 5, characterized in that... The method for updating control objects related to the destination expression of a data stream is as follows: Obtain the associated control object of the highest priority data stream destination expression. Iterate through all remaining data streams in descending order of priority, and check whether the associated control object of each data stream destination expression is consistent with the associated control object of the highest priority data stream destination expression. If they are consistent, continue iterating; if they are inconsistent, update the associated control object of the highest priority data stream destination expression before the data stream that has changed. Then, treat that data stream as the highest priority data stream and repeat the previous process, and so on, to obtain an update list of all data streams and control objects that need to be updated.