Display control software dynamic construction method based on visual data form

By using a dynamic construction method for visual data forms in the control software, the problem of complex form creation and management in existing technologies is solved. This method enables rapid construction and editing, reduces development difficulty and cost, and supports multiple protocols and application scenarios.

CN120909474AActive Publication Date: 2025-11-07CHINA STATE SHIPBUILDING CORP NO 707 RES INST
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511446649.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-11
Publication Date
2025-11-07
Estimated Expiration
2045-10-11

AI Technical Summary

Technical Problem

The existing display and control system has complex form creation and management, requires professional programming knowledge, is difficult to modify and update, has insufficient system interface openness, is highly customized, is difficult to expand application scenarios, and has high costs for repeated development.

Method used

A dynamic construction method for display and control software based on visual data forms is adopted. Through protocol library configuration, control layout design, data form mapping rule binding and subscription and publication mode, the rapid construction and editing of forms can be realized.

Benefits of technology

It provides a unified processing mechanism that supports the editing and binding of multiple forms, attributes, and protocols, meeting the business application needs of various scenarios and reducing development difficulty and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909474A_ABST
    Figure CN120909474A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a display control software dynamic construction method based on a visual data form, which comprises the following steps: establishing a structured protocol library containing messages, faults, states and formatting modules; generating an interface layout containing interface components through a visual designer; performing visual binding on the interface component and protocol data in a protocol library to generate a data form mapping rule; and after the rule is serialized into a configuration file to be published, the display control software dynamically loads the configuration file during operation, an interface is automatically constructed, and data subscription is completed. According to the method, deep decoupling of protocols, interfaces and logics is achieved, the development and maintenance efficiency, the system flexibility and expandability are remarkably improved through the model-driven visual and code-free process, and the development cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and in particular to a dynamic construction method of display and control software based on visual data form. BACKGROUND

[0002] In the existing display and control system, the creation and management of forms mainly depend on the fixed code and configuration implementation written in advance, and this method has the following problems: 1. The creation and management process of forms is complex, and requires professional programming knowledge; 2. The modification and update of forms are difficult, and require the re-writing of code according to the protocol and display requirements; 3. The system interface is not open enough, and the degree of customization is high, with high secondary development cost; 4. The scene support is single, and it is difficult to expand the application scenarios of forms, and repeated development will consume a lot of manpower and time cost; Therefore, it is necessary to implement a more convenient development and integration dynamic construction method of display and control software based on visual data form, which can quickly construct data forms, and through visual interface application secondary design, developers with different experience levels can use drag-and-drop components and model-driven logic to conveniently construct display and control interfaces through a graphical visual interface. SUMMARY

[0003] The present application aims to at least solve one of the technical problems in the related art. To this end, the present application provides a dynamic construction method of display and control software based on visual data form.

[0004] A dynamic construction method of display and control software based on visual data form, comprising the following steps: Performing protocol library configuration, the protocol library structurally processes the underlying communication protocol to generate protocol data containing messages, faults, states and formatting definitions, and the protocol library configuration includes the configuration of message modules, fault modules, state modules and formatting modules; Performing control layout design of form interface to generate an interface layout containing one or more controls; the control layout design of form interface is realized through a visual form design module; Scanning the protocol library to scan the XML configuration of the protocol to the memory, and binding the control attributes in the interface layout with the protocol data through visual check matching to form a data form mapping rule; scanning the protocol library is realized through a component protocol binding module; Encoding the data form mapping rule into form configuration information and publishing it to the form running state scanning directory.

[0005] Further, the fault module configuration step in the protocol library configuration comprises: The fault logic unit is formed by using the basic configuration fault tree, and the logic unit is generated by the low-layer hardware fault identification code.

[0006] Further, the state module configuration step in the protocol library configuration comprises: The hardware state code is mapped with the defined enmu enumeration value, and the state switching is dynamically injected into the data processing stage through the reflection mechanism.

[0007] Further, the formatting module configuration step in the protocol library configuration comprises: The application layer shared format symbol is stored as a set of format symbol sets, and the symbol bit printf is replaced and printed when the data is displayed, so as to form the specific parameter symbol display.

[0008] Further, the step of binding to form the data form mapping rule comprises: The protocol scanning is performed, the XML configuration of the protocol is scanned into the memory and the protocol field is parsed; The form component interface UI scanning is performed, and the form component mapping table in QHash format is parsed and generated; The interface designer is taken as the interface binding operation object, and the binding is completed by the user through the visual check matching selection in the scanned protocol data interface.

[0009] Further, the binding comprises: Attribute name binding: dynamically binding the Chinese name of the protocol to the displayed component text content; And attribute value binding: binding the received protocol data value to the component text.

[0010] Further, it further comprises the processing step of the display control software running time: The form running state scanning directory is scanned, the form configuration is parsed to dynamically generate the form control and layout according to the control type, and the protocol configuration in the form configuration is used to subscribe the protocol data, the subscription protocol binding is completed, and the form running state scanning directory is completed by the form manager; The form menu is created and generated by the configuration file name, and the menu is embedded into the form list; In the case of no real-time data, the default formatting symbol is called for display.

[0011] Further, the subscription protocol binding adopts the subscription and publication mode for data receiving and sending binding.

[0012] Further, the message module configuration step in the protocol library configuration comprises: The device, the message and the details are entered in a many-to-many relationship to realize multiplexing between different protocols and devices.

[0013] The one or more technical solutions in the embodiments of the present application have at least one of the following technical effects: The dynamic configuration and software dynamic construction of the data form protocol are realized, and a unified processing mechanism is provided for design, construction, release and integration. The protocol binding and release of the data form are integrated, and the editing and binding capabilities of multiple forms, multiple attributes and multiple protocols are provided. The interface library and rich general display components are provided, and the business application design requirements in various scenes are met.

[0014] Additional aspects and advantages of the present application will be described in part below with reference to the description, will become apparent from the description, or will be learned by practice of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0016] Figure 1 It is a message module logic processing flowchart of the present application. Figure 2 It is a fault logic processing flowchart of the present application. Figure 3 It is a state processing flowchart of the present application. Figure 4 It is a formatting processing flowchart of the present application. Figure 5 It is a component construction and protocol binding flowchart of the present application. Figure 6 It is a data form integration design flowchart of the present application. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solutions and advantages of the present application more clear, the technical solutions in the present application will be described clearly and completely in the following with reference to the drawings in the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor belong to the scope of protection of the present application. The following embodiments are used to illustrate the present application, but cannot be used to limit the scope of the present application.

[0018] The application discloses a dynamic construction method of a visual data form-based display and control software, comprising the following steps: Protocol library configuration and dynamic form protocol binding are performed; the protocol library configuration comprises configuration of a message module, a fault module, a state module and a formatting module; and the dynamic form protocol binding unit is used for providing graphical standardized component protocol binding; The visual form design module is used for control layout design of a form interface; The component protocol binding module is used for binding edited component attributes to protocols to realize dynamic construction capability.

[0019] 1. The message module adopts a dynamic attribute mechanism to map a message into an entity object, abstracts common attributes, and dynamically loads specific parameters to establish a protocol data buffer area, which is uniformly managed by the message module and provides a public interface for external calling; 2. The fault module adopts a basic configuration fault tree to form a fault logic unit in an upper layer, contains logical symbols such as and, not and greater than and less than, and generates and issues a logic unit by a low-level hardware fault identification code, and provides public fault notification information processing.

[0020] 3. The state module is mapped with a hardware state code, internally maintains a set of state switching mechanisms, and is dynamically injected into a data processing stage through a reflection mechanism to switch different data application results in different states; the state is a defined enmu enumeration value, and public disclosure is a state information switching function to drive external response.

[0021] 4. The formatting module abstracts common format symbols of an application layer, stores a set of format symbol sets as infrastructure resources, and replaces and prints specific parameter symbols according to specific symbols through a printf symbol bit to form specific parameter symbol display.

[0022] 5. The component design and protocol binding module adopts a subscription and publication mode to bind data receiving and sending, and the binding steps are as follows: 1) Protocol scanning: the protocol XML configuration is scanned into the memory, the protocol field is parsed, and the protocol ID, protocol name, belonging device and protocol parameter are contained; and the parameter type is converted and mapped.

[0023] 2) Type registration: the converter is initialized, the main type converter Int / String / float / double / basic type conversion is performed, and special type processing including fault code, state code and gridding code is extended on the basis of the basic type; 3) Form component interface UI scanning, parsing form component mapping table QHash<QString, IFormWidget*> object, and through IFormWidget class component to determine whether it is a legal component, the enumeration type is determined by WidgetType.

[0024] 4) Component protocol dynamic binding: interface designer as interface binding operation object, select component to get component ID, pop up scanned protocol data interface, user through visual check matching selection binding to component attribute.

[0025] Binding is mainly managed by ProtocolMessage protocol communication, and the binding protocol ID, component attribute ID, attribute name and attribute value are classified and bound.

[0026] Attribute name binding: dynamically bind the Chinese name of the protocol to the displayed component text content; Attribute value binding: bind the received protocol data value to the component text; User configurable processing is required to bind the content, which has the characteristics of high availability, high configurability and editable compared with traditional protocol binding mode. In the subscription mode, the data can be changed through instructions to change the component display different protocol content in the running state, which has scalability.

[0027] 6. Integrated publishing module, combined with protocol binding, data form associates protocol ID with component attribute to form data form mapping rule, and encodes into form configuration information and publishes to form running state scanning directory to complete the publishing process.

[0028] I. Message module The message module provides basic message information, integrates and associates devices / messages / message details. At the same time, it is mapped with fault / status / formatting information, and each message corresponds to multiple data parameters, supporting the protocol binding function of data form.

[0029] The message is encapsulated by the protocol entity, the protocol entity is constructed by loading the protocol configuration, and the protocol data is written into the established buffer, and the dependent items (fault / status / formatting) in the protocol entity are loaded and mapped through delayed loading, and finally the processing interface is called to realize data filling, forming entity data, and its process is shown in Figure 1 .

[0030] The message configuration process is configured step by step, and the device entry / message entry / detail configuration is configured. The device and message / message and detail are entered in a many-to-many relationship, realizing the reuse between different protocols and devices.

[0031] II. Fault module The fault module is loaded by fault code, fault analysis, fault mapping, fault configuration binding and protocol association. The fault information of the corresponding device can be retrieved through the protocol. After the completion of the configured protocol, the form fault protocol data display is completed based on the protocol attribute and data driving.

[0032] The fault code information is extracted from the device hardware parameter indicators, and the device fault tree is formed by fault code classification entry, which includes logical fault, hardware fault and parameter fault. Each type of fault has corresponding processing and reporting logic, and the fault display is automatically refreshed after processing the fault. The design process is as shown in Figure 2 .

[0033] Three, state module The state module is loaded by state code, state analysis, state mapping, state configuration binding and protocol association. The state information of the corresponding device can be retrieved through the protocol. After the completion of the configured protocol, the form state protocol data display is completed based on the protocol attribute and data driving.

[0034] The state code information is extracted from the device hardware parameter indicators, and the device state code table is formed by state code classification entry configuration file. The data is driven to the state processing module through state monitoring dynamic parameters, different data is switched according to different state codes, and the state information of the corresponding item is refreshed. The design process is as shown in Figure 3 .

[0035] 1. State information configuration, solidify the required state of existing business application to the platform system, realize the unified scheduling of state information; 2. Protocol data mapping of state information, associate the unified state configuration to the specific protocol detail parameters, realize the parameter state association; 3. Serializing the associated state data to the protocol configuration file, different parameter details can be configured with different state information; 4. Provides a variety of protocol query interfaces and associated data to support state code analysis; Four, formatting module The formatting module is loaded by format code, format analysis, format mapping, format configuration binding and protocol association. The formatted information of the corresponding device can be retrieved through the protocol. After the completion of the configured protocol, the form formatting data display is completed based on the protocol attribute and data driving.

[0036] A common set of formatting symbol information is established, and one-to-many formatting mapping is performed through the protocol. The placeholder in the formatting is replaced with the existing actual symbol, and the business symbol is output after successful processing, and the corresponding numerical unit is displayed, and the formatting processing is completed. The design process is as shown in Figure 4 .

[0037] 1. Format information configuration, solidify the format data required by existing service application into the platform system, realize the format information configuration library; 2. Format information protocol mapping, associate the unified format configuration to the specific protocol detail parameters, realize the parameter table association; 3. Serialize the associated table data to the protocol configuration file, different parameter details can be configured with different format information; 4. Provide a variety of protocol query interfaces and associated data to support format code parsing; Five, component design and protocol binding After being combined by components into a data form and bound by attribute editing and communication protocol, the form is saved to realize the serialization processing of the form.

[0038] The component first constructs IFormWidget to complete the construction of basic information when initializing, then constructs QWidget graphic base class to make the component have graphical ability, and then constructs specific component types from the derived classes of IFormWidget and QWidget, and finally completes the whole component construction protocol binding process through the associated component attribute editor FormWidgetEditor binding protocol. The design process is as shown in Figure 5 .

[0039] Load the protocol component to initialize all information of the component and complete the loading work of the protocol component; After the loading of the component is completed, the form control attribute bar will obtain the editable protocol attribute information under the control; The obtained component protocol attribute information is dynamically generated according to the input grid attribute bar; Through the dynamically generated protocol attribute bar, select the protocol configuration to be bound, and the protocol attribute bar will change the field according to different components. The user clicks the configuration item to pop up the protocol selection dialog box for user selection. Click OK to complete the protocol editing work; According to whether the user selected protocol is valid, if not, return to edit the protocol attribute for the user to select the protocol again; After selecting the valid protocol data, save the protocol through the application protocol attribute; Judge whether the binding of the protocol to the control is successful. If not, return to the application protocol attribute process for the user to select and apply the protocol data again; If the protocol is successfully applied, it is embedded into the configuration file to complete the control protocol binding process.

[0040] The protocol binding is through the panel interface protocol configuration attribute editing process as follows: According to the protocol ID, a general configuration interface is generated by calling the initDataInfoSet interface of the MessageInfoSetWidget class; The message details of the general configuration interface (CommonPageWidget class) table are called, and the hierarchical relationship of the xml file of the general configuration is read by readData of MessageInfoData; According to the root structure of Config, the configuration file of the device is determined, and the device is determined by the name field of the device configuration file; Determine which message belongs to by the ID field of the configuration file, and insert the xml message data into the configTableView function by the setEquipmentData function of the MessageInfoSetWidget class; In the configTableView displayed in the general configuration interface, select the protocol CommonPageWidget class (selection event), send the click signal, and get the selected protocol; Through the application button of the panel, the onApplyAgreement interface of the current control is called to get the interface configuration protocol; Finally, the setBindProtocol interface of the IFormWidget base class sets the binding protocol of the control.

[0041] The component interface includes the following reserved data and functions: ID: the unique ID of the control; parentId: parent control ID; widgetType: control type; index: the index order of the control in the parent space; setSelected: the selected control is displayed as highlighted in the central canvas; editorPanel: the editor panel pointer corresponding to the control; serialize: serialize the control.

[0042] Design components: for different types of forms, their structures need to be designed separately. Component design needs to be multiple inherited from the abstract control (IFormWidget) and the child base control (QWidget) class, construct the control class, implement all abstract interfaces, and inherit FormWidgetEditor to realize its editor panel based on component data. For example, the container panel control LarkFormPanel and its editor panel LarkFormPanelEditor.

[0043] LarkFormPanel: Specifies the width and height of the panel, and the container control it belongs to; setFormLayout: Sets the layout direction inside the container control; setFormLayoutMargins: Sets the four-way margins of the layout inside the container control; setFormLayoutSpacing: Sets the spacing between elements in the layout inside the container control; unsetFormLayout: Cancels the layout inside the container control; addFormWidget: Adds a child control inside the container control; removeFormWidget: Deletes and destroys a child control; The internal container layout of the panel component is divided into horizontal layout, vertical layout, and absolute layout (no layout). When horizontal or vertical layout is applied, the internal child controls will be automatically positioned, otherwise the internal child controls can edit their own coordinate positions in the property editor panel.

[0044] Six, data form integration After publishing the data form, the generated visual interface is dynamically integrated into the display and control software.

[0045] The integration process of the data form first initializes the form manager, scans the form files under the form configuration directory, and generates all form items under the form directory. The form items are displayed in the form of a menu set for users to choose. Secondly, the form manager triggers the protocol binding callback to bind the configured subscription protocol to the component when the form is opened through interaction. Once the subscription protocol binding takes effect, it will receive the data from the state network protocol. According to whether the protocol has data, the format interface call is performed. Finally, the data form integration is completed. The design is as shown in Figure 6 .

[0046] 1. First, process the pre-set related information function, complete the initialization of the form manager; 2. Scan the current all forms through the form save directory, and filter out the sub-form configuration; 3. Create and generate the form menu from the configuration file name, and embed the menu into the form list to form a selectable and displayable form list; 4. Open the form by clicking the form menu, and input the form ID into the form manager; 5. Parse the form configuration through the form ID, get the elements in the form, dynamically generate form controls and layouts according to the type, and embed them into the form interface; 6. Subscribing protocol data by protocol configuration in form configuration, completing subscription protocol binding; 7. Different display according to whether there is real-time data after protocol configuration binding, if there is no data, calling default formatting symbol for display, if there is data, performing data formatting symbol display; 8. Finally, after completing the call of the formatting symbol, rendering to the display control.

[0047] Seven, test confirmation In order to verify the feasibility of the present application, form building test will be carried out in the following environment: 1. Hardware: mainstream configuration PC (Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz, 32G memory); 2. Software: kylinV10 operating system, install gcc9.3 compilation environment.

[0048] In the test environment, the following operations are carried out: 1. Verify the data form designer and the data form editor: Click form management, select data form, set data form name, identifier and form size, generally set the form size to 1920x1080, set the form name to Forms1, and after setting the form, the interface displays the set form as 1920x1080.

[0049] Select panel control in control box, click "+", panel control is added to the form, set panel control size to 1920x1080 in attribute; Select four label controls in control box, click "+", set label control in attribute, display name is astronomical navigation, set label control size to 100x50, adjust label control position in interface; Select four table controls in control box, click "+", set table control to 3 rows and 3 columns without header in attribute, and then adjust the position of table control below the label control.

[0050] 2. Verify the communication protocol binding tool: Select a row in the table, click space in protocol binding, a protocol selection window pops up, select different protocols for binding.

[0051] Bind all protocols in all tables, click save button, save xml file under Forms folder.

[0052] 3. Verify the data form publishing tool and the data form integration tool: Click menu button, the central view interface pops up.

[0053] Open the Forms1 form in the central view, the Forms1 form displays the formatted symbols without data; Open the analog source, send the data form Forms1 binding protocol, open the transceiver component, and configure the address of the transceiver component; In the central view, the received data under the Forms1 form is consistent with the data sent by the analog source.

[0054] The test results are as follows: The analog source data received in the Forms1 of the central view is displayed on the interface, and a new central view interface composed without programming can efficiently process the interaction and storage of protocol data.

[0055] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit it; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A dynamic construction method of visual data form-based console software, characterized in that, Comprising the following steps: Performing protocol library configuration, which structures underlying communication protocols to generate protocol data containing messages, faults, states and formatting definitions, the protocol library configuration including configuration of message modules, fault modules, state modules and formatting modules; Performing control layout design of the form interface to generate an interface layout containing one or more controls; control layout design of the form interface is achieved through a visual form design module; Scanning the protocol library to scan the XML configuration of the protocol into memory, and binding the control properties in the interface layout to the protocol data through visual check matching to form data form mapping rules; scanning the protocol library is achieved through a component protocol binding module; Encoding the data form mapping rules into form configuration information and publishing to a form running state scanning directory.

2. The visual data form-based display and control software dynamic construction method according to claim 1, wherein the fault module configuration step in the protocol library configuration comprises: Using a basic configuration fault tree to form a fault logic unit, and generating a logic unit from a low-level hardware fault identification code.

3. The visual data form-based display and control software dynamic construction method according to claim 1, wherein the state module configuration step in the protocol library configuration comprises: Mapping hardware state codes to defined enmu enumeration values, and dynamically injecting state switching into the data processing stage through a reflection mechanism.

4. The visual data form-based display and control software dynamic construction method according to claim 1, wherein the formatting module configuration step in the protocol library configuration comprises: Storing application layer shared format symbols as a set of format symbol sets, and replacing and printing through symbol bits printf when displaying data to form a unique parameter symbol display.

5. The visual data form-based display and control software dynamic construction method according to claim 1, wherein the step of binding to form data form mapping rules specifically comprises: Performing protocol scanning to scan the XML configuration of the protocol into memory and parse the protocol fields; Performing form component interface UI scanning to parse and generate a QHash format form component mapping table; Taking the interface designer as the interface binding operation object, and in the pop-up scanning protocol data interface, the user completes the binding through visual check matching selection.

6. The visual data form-based display and control software dynamic construction method according to claim 5, wherein the binding comprises: Attribute name binding: dynamically binding the Chinese name of the protocol to the displayed component text content; And attribute value binding: binding the received protocol data value to the component text. Further comprising a processing step of the display and control software running time: Scanning the form running state scanning directory, parsing the form configuration to dynamically generate form controls and layouts according to the control type, and subscribing to protocol data from the protocol configuration in the form configuration to complete the subscription protocol binding; scanning the form running state scanning directory is completed through a form manager. ​ ​ ​ 7. The method of claim 1, wherein the method further comprises: ​ ​ Form menu creation is generated by the configuration file name, and the menu is embedded into the form list; In the absence of real-time data, call the default formatting symbol for display.

8. The visual data form-based dynamic construction method of the control software according to claim 7, characterized in that, The subscription protocol binding adopts a subscription and publication mode for data transceiving binding.

9. The visual data form-based dynamic construction method of the control software according to claim 1, characterized in that, The message module configuration step in the protocol library configuration comprises: Devices and messages, messages and details are entered in a many-to-many relationship to realize the reuse between different protocols and devices.

Citation Information

Patent Citations

  • System and method for generating and running form

    CN102789382A

  • Interface development method, electronic device and readable storage medium

    CN109240688A

  • Visual form design method and system implemented in low-code mode

    CN114610280A

  • Configurable fault tree structure for electrical devices

    CN116547617A

  • Low-code application page publishing method and device

    CN117369812A