Host computer software user interface dynamic generation method and device
By combining a reflective static factory with a dependency injection container, the host computer software UI is dynamically generated, solving the problem of fixed development of traditional UI interfaces, improving device adaptability and development efficiency, and reducing programming costs and maintenance difficulty.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN UNIMAT AUTOMATION TECH
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-19
AI Technical Summary
The fixed UI development of traditional host computer software means that the code needs to be rewritten and compiled for each new device model, resulting in long development cycles, deep coupling between interface logic and business code, difficult maintenance, and difficulty in meeting the needs of device upgrades or providing differentiated views for different user roles.
By combining a reflection-based static factory with a dependency injection container, lazy loading, on-demand creation, and intelligent caching of components are achieved. The UI interface is dynamically generated through industrial control context information, decoupling the interface content from the program logic. UI parameters are defined using UI description files and changed through configuration files.
It can adapt to different devices without modifying or recompiling the core code, reducing development costs, improving development efficiency, supporting device interface assembly and iteration, and enhancing system adaptability and maintainability.
Smart Images

Figure CN122240104A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial automation control software technology, and in particular to a method and apparatus for dynamically generating a host computer software user interface. Background Technology
[0002] In the field of industrial control, host computer software serves as the core of human-machine interaction. Its user interface is used to monitor equipment status, set equipment parameters, and write control commands. Traditional host computer software UIs are often developed in a fixed manner, meaning that the interface layout and elements are predefined by writing code for specific equipment or production lines. This approach has significant drawbacks: every time a new equipment model is added, developers need to rewrite and compile the code, resulting in a long development cycle. Furthermore, the interface logic is deeply coupled with the business logic code, meaning that even small UI changes can trigger program retesting and redeployment. Summary of the Invention
[0003] This application provides a method, apparatus, electronic device, and storage medium for dynamically generating a host computer software user interface, which can solve at least one of the technical problems in the background art to a certain extent.
[0004] To achieve the above objectives, this application adopts the following technical solution:
[0005] Firstly, a method for dynamically generating a host computer software user interface is provided, including: Determine the current industrial control context information; Based on the industrial control context information, one or more UI description files are loaded from the configuration storage module; the industrial control context information includes one or more of the target device type, component information, and component interface function information. Parse the UI description file to generate a device model tree of interface objects; The interface object device model tree is instantiated into a visual interface.
[0006] Secondly, a device for dynamically generating a host computer software user interface is provided, comprising: The determination module is used to determine the current industrial control context information; The loading module is used to load one or more UI description files from the configuration storage module according to the industrial control context information; the industrial control context information includes one or more of the following: target device type, component information, and component interface function information. The generation module is used to parse the UI description file and generate a device model tree of interface objects; The instantiation module is used to instantiate the interface object device model tree into a visual interface.
[0007] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for dynamically generating a host computer software user interface as described in any of the first aspects above.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for dynamically generating a host computer software user interface as described in any of the first aspects above.
[0009] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to execute the host computer software user interface dynamic generation method described in any of the first aspects above.
[0010] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0011] In this embodiment, the current industrial control context information is first determined. Then, based on the industrial control context information, one or more UI description files are loaded from the configuration storage module. The industrial control context information includes one or more of the target device type, component information, and component interface function information. The UI description files are then parsed to generate an interface object device model tree, which is then instantiated into a visual interface. Thus, by defining the UI as an externally readable configuration file, interface changes do not require modification or recompilation of the core code, greatly improving the adaptability of the industrial control software to different devices. Developers can focus on the core control logic and functional interface modules. Device interface assembly can be completed through configuration files, reducing the overall programming cost. New devices or processes only require adding configuration files; the system architecture remains unchanged. If existing basic controls are insufficient, new development controls are added. Configuration through configuration files facilitates deployment and iteration.
[0012] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description
[0013] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiments below. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart illustrating the method for dynamically generating the host computer software user interface provided in an embodiment of this application. Figure 2 This is a schematic diagram of the four-layer componentized software architecture provided in the embodiments of this application; Figure 3 This is a structural block diagram of the host computer software user interface dynamic generation device provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0014] The embodiments of the technical solutions of this application will now be described in detail with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of this application, and are therefore merely examples and should not be used to limit the scope of protection of this application. When the following description relates to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. Various changes, modifications, and equivalents of the methods, apparatus, and / or systems described herein will become apparent upon understanding this disclosure. For example, the order of operations described herein is merely illustrative and is not limited to those orders set forth herein, but can be changed as will become apparent upon understanding this disclosure, except for operations that must be performed in a specific order. Furthermore, for clarity and conciseness, descriptions of features known in the art may be omitted.
[0015] The embodiments described in the following examples of this disclosure are not representative of all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0016] It's important to note that traditional host computer software UIs are often developed in a fixed manner, meaning the interface layout and elements are predefined by writing code for specific equipment or production lines. This approach has significant drawbacks: 1. Each new equipment model requires developers to rewrite and compile the code, resulting in a long development cycle. 2. Maintenance difficulties: The interface logic is deeply coupled with the business code; any small UI change can trigger program retesting and redeployment. 3. The need for equipment upgrades or providing differentiated views for different user roles. 4. Integrated systems experience exponential resource consumption as business expands, with hardware costs and maintenance pressures rising simultaneously.
[0017] The purpose of this invention is to overcome the shortcomings of the prior art. By combining the traditional dependency injection container with the static factory pattern through a reflective static factory, it achieves lazy loading, on-demand creation and intelligent caching of components, decouples the interface content from the program logic, enables the UI to change dynamically according to device and other context information, and saves resources.
[0018] To achieve the above objectives, the present invention adopts the following technical solution: See Figure 1 This is a flowchart illustrating the method for dynamically generating a host computer software user interface according to the first embodiment of this application. Figure 1 As shown, the method for dynamically generating the host computer software user interface may include the following steps: Step 101: Determine the current industrial control context information.
[0019] The industrial control context information includes one or more of the following: target device type, component information, and component interface function information. The target device type is the specific model of the industrial equipment that needs to be monitored or controlled in the current industrial control site (such as injection molding machine model A, sensor model B, etc.). The component information is the relevant information of the functional components corresponding to the target device (such as component model, component operating parameters, component connection status, etc.). The component interface function information is the UI display requirements and operation function information corresponding to each functional component of the target device (such as component parameter display, control button operation, data curve display, etc.).
[0020] Specifically, the context management module in the host computer software can collect device connection signals and component operating status signals in the industrial control field in real time. Combined with the user's current operation instructions, the current industrial control context information can be comprehensively determined to ensure that the context information can accurately reflect the actual needs of the industrial control field.
[0021] Step 102: Load one or more UI description files from the configuration storage module based on the industrial control context information.
[0022] Optionally, one or more corresponding UI description files can be selected and retrieved from the configuration storage module based on at least one of the target device type, component information, and component interface function information contained in the industrial control context information. The UI description files contain control types, layout information, and interface interaction rules.
[0023] The configuration storage module is used to pre-store UI description files corresponding to multiple different scenarios and devices, so as to realize unified management and flexible retrieval of UI description files.
[0024] The UI description file is a configurable file used to define the relevant parameters of the UI interface, providing a basis for the subsequent parsing and generation of the UI interface.
[0025] Optionally, one or more corresponding UI description files can be selected and retrieved from the configuration storage module based on at least one of the target device type, component information, and component interface function information contained in the industrial control context information. The UI description files contain control types, layout information, and interface interaction rules.
[0026] The control types include commonly used industrial control UI controls such as buttons, input boxes, data display boxes, and line charts; layout information is used to define the position, size, and hierarchy of each control in the UI interface; and interface interaction rules are used to define the operation logic of the controls (such as the response action after clicking a button, the data validation rules of the input box, etc.).
[0027] Specifically, once the industrial control context information is determined, the configuration loading module connects to the configuration storage module and performs matching queries based on the core parameters in the context information (such as the target device type) to filter out the UI description file that best matches the current context information. If the current context information corresponds to multiple functional scenarios, multiple corresponding UI description files can be loaded simultaneously to achieve the combined generation of UI interfaces for multiple scenarios.
[0028] Step 103: Parse the UI description file and generate the interface object device model tree.
[0029] Optionally, the loaded UI description file is parsed and processed to extract relevant information about the interface elements in the UI description file, and an abstract interface object device model tree is constructed according to the hierarchical relationship of the interface elements.
[0030] Among them, the interface object device model tree is an abstract hierarchical structure model used to organize the information in the UI description file in a structured way, and to transform the unstructured parameters in the UI description file into structured interface objects, which facilitates the instantiation and generation of the UI interface in the future.
[0031] In this system, the nodes of the interface object device model tree correspond one-to-one with the controls in the UI interface, and the node attributes correspond to the control parameters and layout information in the UI description file.
[0032] Optionally, the loaded UI description file is parsed and processed to extract relevant information about the interface elements (including control types, layout information, interaction rules, etc.) from the UI description file, and an abstract interface object device model tree is constructed according to the hierarchical relationship of the interface elements.
[0033] Specifically, the configuration parsing module performs syntax validation on the UI description file to ensure that the file format is correct and the parameters are complete. After the validation is passed, the relevant information of the interface elements in the file is extracted. According to the hierarchical relationship of the interface elements (such as the subordinate relationship between parent and child controls), the root node and child nodes of the model tree are constructed in sequence. Each node is assigned corresponding attributes (such as control type, position parameters, and interaction rules), and finally a complete interface object device model tree is formed.
[0034] Step 104: Instantiate the interface object device model tree into a visual interface.
[0035] The instantiation process involves transforming an abstract interface object device model tree into a visual UI interface that can be displayed and operated by the host computer software. By calling UI component resources in the system and combining the node information of the model tree, the creation, layout, and rendering of controls are completed, ultimately forming a visual interface that meets the needs of the industrial control site.
[0036] Optionally, the runtime component factory system is invoked to dynamically create corresponding user function interface object instances based on the interface object device model tree. The user function interface object instances are then arranged according to the layout information in the UI description file to complete the generation of the visual interface.
[0037] The runtime component factory system manages all UI component resources in the host computer software. It can dynamically call the corresponding components and create user interface object instances based on the node requirements of the model tree, without having to preload all component resources, thus saving system resources.
[0038] Optionally, basic components in the runtime component factory system can be called to dynamically create and initialize user function interface object instances, taking into account the requirements of the interface object device model tree.
[0039] Among them, the basic components are general UI components preset by the host computer software (such as basic buttons, general data display boxes, etc.), which can adapt to a variety of UI scenarios. By combining the use of basic components, the development cost of UI interface is reduced and the instantiation efficiency is improved. When creating a user function interface object instance, the initialization operation of the instance is completed simultaneously (such as setting the initial display state of the control, binding the initial parameters, etc.) to ensure that the instance can run normally.
[0040] Optionally, activate the predefined interface interaction rules in the UI description file to associate the instantiated user function interface object with the real-time industrial control data corresponding to the data source binding address, so that the visualization interface enters an interactive state.
[0041] The data source binding address is the storage address of industrial control data. By associating the user function interface object with this address, the real-time industrial control data can be synchronously displayed on the UI interface (such as real-time refresh of equipment operating parameters). At the same time, the linkage between user operation and industrial control equipment can be realized (such as sending corresponding control commands to the equipment after clicking the control button).
[0042] Optionally, the current industrial control context information can be monitored in real time. When a change in the industrial control context information is detected, the currently generated visualization interface is unloaded, the updated industrial control context information is redefined, and the visualization interface is updated.
[0043] Specifically, the context monitoring module monitors changes in industrial control context information in real time (such as target device switching, component running status changes, user operation command adjustments, etc.). When a change is detected, the current visualization interface and corresponding resources are immediately unloaded to avoid resource waste. At the same time, steps 101-104 are re-executed. Based on the updated industrial control context information, a new UI description file is loaded, a new interface object device model tree is parsed and generated, and a new visualization interface is instantiated to achieve hot switching of the UI interface without restarting the host computer software, thereby improving the operational efficiency of the industrial control site.
[0044] The following is a specific example to illustrate this: The operator clicks the "Device Selection" button in the host computer software, selects "Model A Injection Molding Machine" as the current monitoring target, confirms that the module has collected the user's operation instructions and the connection signal of Model A Injection Molding Machine, and comprehensively determines the current industrial control context information as "Target equipment type: Model A Injection Molding Machine; Component information: Model A Injection Molding Machine core control component, production statistics component; Component interface function information: Displays equipment operating parameters, supports parameter settings, and statistical production data".
[0045] Based on the "Target device type: Model A injection molding machine" in the current industrial control context information, the loading module filters and retrieves the Device_A_UI.xml description file from the configuration storage module. This file contains the control types required for the UI interface of Model A injection molding machine, such as the emergency stop button, production statistics box, and mold temperature input box, as well as the layout position of each control and the interface interaction rules (such as the numerical range validation rules for the mold temperature input box).
[0046] The generation module performs syntax validation on the Device_A_UI.xml description file. After confirming that the file format is correct and the parameters are complete, it extracts the relevant information of the interface elements in the file and constructs the interface object device model tree according to the hierarchical relationship of "root node - parent control node - child control node". The root node is "A-type injection molding machine UI interface", the parent control nodes are "parameter setting area" and "status display area", and the child control nodes are mold temperature input box, production statistics box, emergency stop button, etc. Each node is assigned corresponding control type, layout position and other attributes. The instantiation module calls the runtime component factory system. According to the node requirements of the interface object device model tree, it calls the corresponding basic components (emergency stop button component, production statistics component, etc.) to dynamically create instances of each user function interface object. According to the layout information in the Device_A_UI.xml description file, it arranges the emergency stop button in the upper left corner of the interface, the production statistics box in the middle of the interface, and the mold temperature input box on the right side of the interface, completing the rendering and generation of the visual interface.
[0047] Subsequently, the interaction activation module activates the interface interaction rules in Device_A_UI.xml, associating the production statistics box with the production data source binding address of the A-type injection molding machine to achieve real-time updates of production data. It also associates the emergency stop button with the equipment stop control command, making the visualization interface interactive. Operators can then perform parameter settings and equipment control operations through the interface. When the operator needs to switch monitoring targets and selects "B-type injection molding machine," the monitoring update module detects a change in the industrial control context information (the target equipment type changes to B-type injection molding machine). It immediately unloads the currently generated A-type injection molding machine visualization interface and its corresponding resources, triggering the determination module to re-determine the updated industrial control context information. Then, the loading module retrieves the Device_B_UI.xml description file, the generation module parses the file and generates the corresponding interface object device model tree, and the instantiation module instantiates the visualization interface corresponding to the B-type injection molding machine (including controls unique to the B-type injection molding machine, such as the injection speed curve), achieving hot-switching of the UI interface. The entire process does not require restarting the host computer software.
[0048] Figure 2This is a schematic diagram of a four-layer component-based software architecture. The bottom layer, a reflective static component factory, provides fundamental support for the entire architecture through a component metadata registry, lazy loading manager, instance cache manager, lifecycle manager, and dependency resolver. This support includes component registration, on-demand loading, instance reuse, full lifecycle management, and dependency handling. The component layer above it contains communication components, UI components, device components, engineering components, and tool components, providing various reusable atomic functional units. The service computer common channel layer, through a service registry, message router, event publish / subscribe mechanism, and dependency injection container, realizes service registration and discovery, message forwarding, event-driven collaboration, and automatic dependency management, thereby achieving decoupling and efficient collaboration between components. The top layer, the application assembly layer, relies on an application context manager, component assembler, runtime configuration manager, and extension point coordinator. Based on the underlying capabilities, it can dynamically maintain the application state, assemble business modules, adjust runtime parameters, and manage extension points, ultimately quickly assembling applications that meet business needs and have high scalability. The overall architecture is based on componentization and loose coupling, balancing operational efficiency and maintainability.
[0049] In this embodiment, the current industrial control context information is first determined. Then, based on the industrial control context information, one or more UI description files are loaded from the configuration storage module. The industrial control context information includes one or more of the target device type, component information, and component interface function information. The UI description files are then parsed to generate an interface object device model tree, which is then instantiated into a visual interface. Thus, by defining the UI as an externally readable configuration file, interface changes do not require modification or recompilation of the core code, greatly improving the adaptability of the industrial control software to different devices. Developers can focus on the core control logic and functional interface modules. Device interface assembly can be completed through configuration files, reducing the overall programming cost. New devices or processes only require adding configuration files; the system architecture remains unchanged. If existing basic controls are insufficient, new development controls are added. Configuration through configuration files facilitates deployment and iteration.
[0050] Corresponding to the method for dynamically generating the host computer software user interface described in the above embodiments, Figure 3 This is a structural block diagram of the host computer software user interface dynamic generation device provided in the embodiments of this application.
[0051] Reference Figure 3 The host computer software user interface dynamic generation device 200 includes: Module 210 is used to determine the current industrial control context information; The loading module 220 is used to load one or more UI description files from the configuration storage module according to the industrial control context information; the industrial control context information includes one or more of the following: target device type, component information, and component interface function information. Generation module 230 is used to parse the UI description file and generate a user interface object device model tree; Instantiation module 240 is used to instantiate the interface object device model tree into a visual interface.
[0052] Optionally, when the loading module performs the loading action, it is specifically used to: filter and retrieve one or more corresponding UI description files from the configuration storage module based on at least one of the target device type, component information, and component interface function information contained in the industrial control context information. The UI description files contain control types, layout information, and interface interaction rules.
[0053] Optionally, when the generation module performs the parsing and generation actions, it is specifically used to: parse the UI description file loaded by the loading module, extract the interface element-related information in the UI description file, and construct an abstract interface object device model tree according to the hierarchical relationship of the interface elements.
[0054] Optionally, the instantiation module includes a calling unit and an arrangement unit, wherein: The calling unit is used to call the runtime component factory system to dynamically create corresponding user function interface object instances based on the interface object device model tree generated by the generation module. The arrangement unit is used to arrange the user function interface object instances created by the calling unit according to the layout information in the UI description file, thereby completing the generation of the visual interface.
[0055] Optionally, when the calling unit performs the calling and creation actions, it is specifically used to: call the basic components in the runtime component factory system, and, in combination with the requirements of the interface object device model tree, complete the dynamic creation and initialization of the user function interface object instance.
[0056] Optionally, it also includes an interaction activation module, which is used to activate the interface interaction rules predefined in the UI description file after the instantiation module instantiates the interface object device model tree into a visual interface, associate the instantiated user function interface object with the real-time industrial control data corresponding to the data source binding address, and make the visual interface enter an interactive state.
[0057] Optionally, it also includes a monitoring and update module, which is used for: Real-time monitoring of the current industrial control context information; When a change in the industrial control context information is detected, the currently generated visualization interface by the instantiation module is unloaded, the determination module is triggered to re-determine the updated industrial control context information, and the visualization interface is updated by sequentially executing actions through the loading module, generation module, and instantiation module.
[0058] In this embodiment, the current industrial control context information is first determined. Then, based on the industrial control context information, one or more UI description files are loaded from the configuration storage module. The industrial control context information includes one or more of the target device type, component information, and component interface function information. The UI description files are then parsed to generate an interface object device model tree, which is then instantiated into a visual interface. Thus, by defining the UI as an externally readable configuration file, interface changes do not require modification or recompilation of the core code, greatly improving the adaptability of the industrial control software to different devices. Developers can focus on the core control logic and functional interface modules. Device interface assembly can be completed through configuration files, reducing the overall programming cost. New devices or processes only require adding configuration files; the system architecture remains unchanged. If existing basic controls are insufficient, new development controls are added. Configuration through configuration files facilitates deployment and iteration.
[0059] in addition, Figure 3 The host computer software user interface dynamic generation device shown can be a software unit, hardware unit, or a combination of software and hardware built into an existing electronic device, or it can be integrated into the electronic device as an independent component, or it can exist as an independent electronic device.
[0060] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0061] Figure 4 This is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. For example... Figure 4As shown, the electronic device 5 of this embodiment includes: at least one processor 50 ( Figure 4 (Only one is shown in the diagram) a processor, a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 executes the computer program 52 to implement the steps in any of the above embodiments of the dynamic generation method for host computer software user interface.
[0062] The electronic device may be a desktop computer, laptop, handheld computer, or cloud server, etc. This electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 4 This is merely an example of electronic device 5 and does not constitute a limitation on electronic device 5. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0063] The processor 50 may be a central processing unit, or it may be other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0064] In some embodiments, the memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. In other embodiments, the memory 51 may be an external storage device of the electronic device 5, such as a plug-in hard disk, smart memory card, secure digital card, flash memory card, etc., equipped on the electronic device 5. Further, the memory 51 may include both internal storage units and external storage devices of the electronic device 5. The memory 51 is used to store operating systems, applications, boot loaders, data, and other programs, such as the program code of the computer program. The memory 51 can also be used to temporarily store data that has been output or will be output.
[0065] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the above-described method embodiments.
[0066] This application provides a computer program product that, when run on an electronic device, enables the electronic device to implement the steps described in the various method embodiments above.
[0067] If the integrated unit is implemented as a software functional unit and used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / electronic device, a recording medium, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0068] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0069] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0070] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0071] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0072] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for dynamically generating a host computer software user interface, characterized in that, include: Determine the current industrial control context information; Based on the industrial control context information, load one or more UI description files from the configuration storage module; The industrial control context information includes one or more of the following: target device type, component information, and component interface function information; Parse the UI description file to generate a device model tree of interface objects; The interface object device model tree is instantiated into a visual interface.
2. The method for dynamically generating a host computer software user interface according to claim 1, characterized in that, The step of loading one or more UI description files from the configuration storage module based on the industrial control context information includes: Based on at least one of the target device type, component information, and component interface function information contained in the industrial control context information, one or more corresponding UI description files are filtered and retrieved from the configuration storage module. The UI description files contain control types, layout information, and interface interaction rules.
3. The method for dynamically generating a host computer software user interface according to claim 1, characterized in that, The step of parsing the UI description file and generating a device model tree for interface objects includes: The loaded UI description file is parsed and processed to extract the interface element information in the UI description file. According to the hierarchical relationship of the interface elements, an abstract interface object device model tree is constructed.
4. The method for dynamically generating a host computer software user interface according to claim 1, characterized in that, The instantiation of the interface object device model tree into a visual interface includes: The runtime component factory system is invoked to dynamically create corresponding user function interface object instances based on the interface object device model tree. Based on the layout information in the UI description file, the user function interface object instances are arranged to generate the visual interface.
5. The method for dynamically generating a host computer software user interface according to claim 4, characterized in that, The process of calling the runtime component factory to dynamically create the corresponding user interface based on the interface object device model tree includes: The system invokes basic components from the runtime component factory system and, in conjunction with the requirements of the interface object device model tree, dynamically creates and initializes the user function interface object instance.
6. The method for dynamically generating a host computer software user interface according to claim 1, characterized in that, After instantiating the interface object device model tree into a visual interface, the process also includes: Activate the predefined interface interaction rules in the UI description file, associate the instantiated user function interface object with the real-time industrial control data corresponding to the data source binding address, and make the visualization interface enter an interactive state.
7. The method for dynamically generating a host computer software user interface according to claim 1, characterized in that, Also includes: Real-time monitoring of the current industrial control context information; When a change in the industrial control context information is detected, the currently generated visualization interface is unloaded, the updated industrial control context information is determined, and the visualization interface is updated.
8. A device for dynamically generating a host computer software user interface, characterized in that, include: The determination module is used to determine the current industrial control context information; The loading module is used to load one or more UI description files from the configuration storage module according to the industrial control context information; The industrial control context information includes one or more of the following: target device type, component information, and component interface function information; The generation module is used to parse the UI description file and generate a device model tree of interface objects; The instantiation module is used to instantiate the interface object device model tree into a visual interface.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, which is loaded by a processor to perform the steps of the method according to any one of claims 1 to 7.