An editing method and device of a configuration software control, an electronic device, and a storage medium

By constructing static attributes and business logic data of controls in configuration software, and utilizing block tools and JavaScript generator functions, the problem of inconvenient control definition is solved, enabling efficient simulation and visual editing of devices, thus improving user experience and work efficiency.

CN121255306BActive Publication Date: 2026-11-06CHINA ELECTRONICS CORP 6TH RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511391415.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-11-06
Estimated Expiration
2045-09-26

AI Technical Summary

Technical Problem

The control definition methods in existing configuration software are not convenient enough, the controls are not editable and have low versatility, making it difficult to perfectly simulate the real-time status and behavioral logic of the device.

Method used

By responding to interactive operations in the configuration interface, the static attribute data of the controls is determined, and business logic data is constructed through the block toolbox and graphical code editing area. Preview animations are generated, and combined with JavaScript generator functions and simulation scripts, the visual editing and simulation of the controls are realized.

Benefits of technology

It enables efficient configuration and binding of controls, adds device state logic and behavior logic attributes, and enables controls to achieve the highest level of device simulation, improving user experience and work efficiency, and reducing the probability of operation errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121255306B_ABST
    Figure CN121255306B_ABST
Patent Text Reader

Abstract

The application provides an editing method and device of a configuration software control, an electronic device and a storage medium, wherein the method comprises: determining static attribute data of an initial business control in response to an interaction operation received by the initial business control in a configuration interface; determining business logic data of the initial business control in response to an interaction operation on a plurality of function blocks in a control customization interface; and generating a preview animation and displaying the preview animation based on the static attribute data and the business logic data of the initial business control in response to an interaction operation on a preview control in the control customization interface, so as to solve the problems that the control definition method in the configuration software is not convenient enough, the control editing is weak, and the universality is not high in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of PLC technology, and more specifically, to a method, apparatus, electronic device, and storage medium for editing configuration software controls. Background Technology

[0002] The visualization of graphical components is a crucial aspect of configuration software. A user-friendly interface and flexible display effects provide a superior user experience. Especially for business controls, which serve as digital models of equipment and require simulation of real-time equipment status, the implementation of their visualization capabilities significantly impacts the degree of equipment digitization. Traditional control definition methods limit their editability; controls only represent the appearance of the field equipment and cannot perfectly interpret the changing states and behavioral logic of the equipment. Summary of the Invention

[0003] The purpose of this application is to provide a method, apparatus, electronic device, and storage medium for editing configuration software controls, so as to solve the problems of inconvenient control definition methods, weak control editability, and low versatility in the prior art configuration software.

[0004] In a first aspect, the present invention provides a method for editing a configuration software control, the method comprising: responding to an interactive operation received by an initial business control in a configuration interface, determining static attribute data of the initial business control; responding to an interactive operation on multiple functional blocks in a control customization interface, determining business logic data of the initial business control; and responding to an interactive operation on a preview control in the control customization interface, generating and displaying a preview animation based on the static attribute data and business logic data of the initial business control.

[0005] In an optional implementation, the control customization interface includes a block toolbox display area and a graphical code editing area. In response to drag-and-drop operations targeting the target function block in the control customization interface, the block control of the target function block is displayed in the graphical code editing area; In response to a click on the block control for the target function block, display the block rewriting interface; Determine the connection relationships between multiple functional building blocks; In response to the editing operation of the target functional block in the block rewriting interface, determine the logical attribute data of the target functional block; Based on the connection relationships between multiple functional blocks and the logical attribute data of each functional block, a preview animation is generated.

[0006] In an optional implementation, the control customization interface also includes an animation preview area, which includes a preview control and an animation display sub-area. In response to a click on the preview control in the custom control interface, a preview animation is generated based on the connection relationships, logical attribute data, and static attribute data between all functional blocks in the graphical code editing area, and displayed in the animation display sub-area.

[0007] In an optional implementation, for each functional block, the JavaScript generator function corresponding to that functional block is rewritten based on the corresponding logical attribute data; Based on the connection relationships between all functional blocks in the graphical code editing area and all rewritten JavaScript generator functions, a simulation script is generated. Execute the simulation script to obtain the simulation results of the initial business controls; Based on the simulation results and static attribute data of the initial business controls, a preview animation of the initial business controls is generated.

[0008] In an optional implementation, the control customization interface also includes a storage control. In response to a click on the storage control, an initial property data package for the business control is generated and saved in the component library.

[0009] In an optional implementation, the configuration interface includes a business control display bar and a business control editing area, as well as multiple initial business items within the business control display bar. In response to a click or drag operation on the initial business entry, the initial business control corresponding to the initial business entry is displayed in the business control editing area.

[0010] In an optional implementation, the configuration interface further includes simulation controls, and the business control display bar also includes predefined business items. In response to click or drag operations on defined business items, the defined business controls corresponding to the defined business items are displayed in the business control editing area; In response to a click operation on the simulation control, a programmable logic scenario simulation is executed based on the attribute data package corresponding to all defined business controls within the business control editing area.

[0011] Secondly, the present invention provides an editing device for configuration software controls, the device comprising: The first data acquisition module is used to respond to the interactive operations received by the initial business control in the configuration interface and determine the static attribute data of the initial business control. The second acquisition module is used to respond to the interactive operations of multiple functional blocks in the custom interface of the control and determine the business logic data of the initial business control. The animation module is used to respond to interactive operations on the preview control in the custom interface of the control. Based on the static attribute data and business logic data of the initial business control, it generates and displays the preview animation.

[0012] Thirdly, the present invention provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the editing method of any of the configuration software controls as described in the foregoing embodiments.

[0013] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when run by a processor, executes the steps of the editing method of any of the configuration software controls described in the foregoing embodiments.

[0014] This application provides a method, apparatus, electronic device, and storage medium for editing configuration software controls. The method includes: responding to interactive operations received by the initial business control in the configuration interface; determining the static attribute data of the initial business control in response to interactive operations on multiple functional blocks in the control customization interface; and generating and displaying a preview animation based on the static attribute data and business logic data of the initial business control in response to interactive operations on the preview control in the control customization interface. This not only allows for rapid configuration and binding of control attributes but also incorporates device state and behavior logic attributes into the control definition, achieving the highest level of device simulation and realizing a digital twin of the industrial site scenario. Furthermore, the visual definition mode provides users with a convenient and simple operation method and reduces the probability of operational errors caused by complex binding operations, effectively improving work efficiency and user experience. Attached Figure Description

[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 A flowchart illustrating a method for editing a configuration software control provided in an embodiment of this application; Figure 2 A schematic diagram of a custom control interface provided in an embodiment of this application; Figure 3 An editing device for configuration software controls is provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a control editing engine provided in an embodiment of this application. Detailed Implementation

[0017] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0018] Figure 1 This is a flowchart illustrating a method for editing a configuration software control provided in an embodiment of this application. Figure 1 As shown, this application provides a method for editing configuration software controls, which can be executed by configuration software, and specifically includes: S1. In response to the interactive operation received by the initial business control in the configuration interface, determine the static attribute data of the initial business control.

[0019] In step S1, the basic attribute configuration of the controls is completed based on the configuration interface. The controls here can be digital models of the equipment, and the control attributes are configured based on the equipment attributes. For example, the equipment can be an impeller, and the equipment attributes can be power, speed, etc.

[0020] Configurable control properties fall into two main categories: basic properties and logical properties. Basic properties describe the static appearance of the device, such as its style, status information, bound attribute variables, and internal structural relationships. Logical properties describe the specific behavior of the device under specific conditions, and include state logical properties and behavior logical properties.

[0021] Users select a single or combined control in the configuration interface and configure its basic attributes according to the specified device. Once the basic attributes of the control are configured, the resulting control will have the static attributes of the device, and its behavior can be edited based on these basic attributes.

[0022] S2. Responding to the interactive operations of multiple functional blocks in the custom interface of the control, determine the business logic data of the initial business control.

[0023] The control customization interface includes a block toolbox display area and a graphical code editing area. This customization interface can be generated using the Blockly tool, allowing users to select functional blocks and visually define business controls to build corresponding business logic. The graphical code editing area is used for block-based configuration of controls.

[0024] Specifically, in response to drag-and-drop operations targeting a target functional block in the control customization interface, the block control of the target functional block can be displayed in the graphical code editing area. In response to click operations targeting the block control of the target functional block, the block rewriting interface can be displayed. The connection relationships between multiple functional blocks can be determined. In response to editing operations on the target functional block in the block rewriting interface, the logical attribute data of the target functional block can be determined. Based on the connection relationships between multiple functional blocks and the logical attribute data of each functional block, a preview animation can be generated.

[0025] Users select a single or combined control in the configuration interface and configure its basic attributes according to the specified device. Once the basic attributes of the control are configured, the resulting control will have the static attributes of the device, and its behavior can be edited based on these basic attributes.

[0026] The functional blocks here can include logic blocks, event blocks, math blocks, text blocks, text blocks, and animation blocks.

[0027] The logic blocks are used for logical judgments, determining the execution of control behavior based on conditional statements. Event blocks are used to bind event properties to controls, including event types and message delivery. Math blocks are used to bind data properties to controls, including data items and numerical calculations. Text blocks are used to configure the text style within controls or to display the data bound to the controls. Animation blocks are used to bind animation properties to controls, containing executable animation statements.

[0028] Furthermore, for each functional block, the corresponding JavaScript generator function is rewritten based on its logical attribute data. A simulation script is generated based on the connection relationships between all functional blocks within the graphical code editing area and all rewritten JavaScript generator functions. The simulation script is executed to obtain the simulation results of the initial business controls. Based on the simulation results and static attribute data of the initial business controls, a preview animation of the initial business controls is generated.

[0029] By rewriting the blocks in Blockly, we can obtain blocks with visualization, state logic, and behavior logic functions. We can also add JavaScript generator functions to each block to enable it to execute code.

[0030] The graphical code editing area provides a canvas for logically constructing selected controls. Custom blocks from the block toolbox are dragged and dropped onto the canvas. Based on the specific behavioral attributes of the device, the blocks are built and variables are configured to define the control's visual attributes, state logic attributes, and behavioral logic attributes. At this point, the control possesses operational logic and corresponding visual display effects. The control has the device's logical attributes, executes corresponding logic, and simulates the device's operating mechanism and working state, thereby achieving a digital twin of the device.

[0031] S3. Responding to interactive operations on the preview control in the custom control interface, generate and display a preview animation based on the static attribute data and business logic data of the initial business control.

[0032] The control customization interface also includes an animation preview area, which comprises a preview control and an animation display sub-area. The animation display sub-area is used to display the animation effect executed after the control's conditions are triggered.

[0033] In response to a click on the preview control in the custom control interface, a preview animation is generated based on the connection relationships, logical attribute data, and static attribute data between all functional blocks in the graphical code editing area, and displayed in the animation display sub-area.

[0034] Here, the corresponding animation effects can be displayed based on the logical properties of the control, simulating the situation of the device in operation, such as impeller rotation, door opening and closing, flow counter reading changes, and special behaviors after the device malfunctions.

[0035] In one feasible implementation, a rendering engine is provided, which, after the business control is defined, is compiled and executed by the logic processing of the code execution engine to display the animation effect.

[0036] like Figure 5 As shown, visual function blocks, state logic blocks, and behavioral logic blocks can be generated based on the Blockly tool. Users can generate visual attributes, state logic attributes, and behavioral logic attributes of controls through a modular construction method. After the code execution engine processes the logic of the code blocks and compiles and executes the logic statements, it can simulate business scenarios such as indicator changes, state switching, device operation / stop, and alarms. Designers do not need to write code or perform cumbersome attribute binding operations; they can add attributes to controls in a WYSIWYG manner by dragging and dropping blocks.

[0037] This application provides a method for editing configuration software controls, which not only allows for rapid configuration and binding of control attributes, but also incorporates device state and behavior logic attributes into the control definition, enabling the control to achieve the highest level of device simulation and realize a digital twin of the industrial site scenario. Furthermore, the visual definition mode provides users with a convenient and simple operation method, reducing the probability of operational errors caused by complex binding operations, effectively improving work efficiency and user experience.

[0038] In one embodiment of this application, after the control is configured and the application is saved, it can be directly saved in the component library and dragged and dropped for use in the configuration interface. Specifically, the control customization interface also includes a storage control.

[0039] In response to a click on the storage control, an initial property data package for the business control is generated and saved in the component library.

[0040] The configuration interface includes a business control display area, a business control editing area, simulation controls, and multiple initial business entries within the business control display area. The business control display area also includes pre-defined business entries.

[0041] In response to a click or drag operation on an initial business item, the initial business control corresponding to the initial business item is displayed in the business control editing area. In response to a click or drag operation on a defined business item, the defined business control corresponding to the defined business item is displayed in the business control editing area. In response to a click operation on a simulation control, programmable logic scene simulation is performed based on the attribute data packages corresponding to all defined business controls within the business control editing area.

[0042] Custom controls stored in the component library can be used in other projects, and their configured properties also exist, including the device's visual properties, state logic properties, and behavioral logic properties. In complex scenarios, a large number of devices may have the same appearance and functions. The visually generated custom business controls solve the repetitive and tedious configuration work for designers, making the business controls highly available.

[0043] Figure 3 This application provides an editing device for configuration software controls. For example... Figure 3 As shown, based on the same inventive concept, this application also provides an editing device 30 for configuration software controls, the device comprising: The first acquisition module 310 is used to respond to the interactive operation received by the initial business control in the configuration interface and determine the static attribute data of the initial business control. The second acquisition module 320 is used to respond to the interactive operations of multiple functional blocks in the custom interface of the control and determine the business logic data of the initial business control. Animation module 330 is used to respond to interactive operations on the preview control in the custom interface of the control. Based on the static attribute data and business logic data of the initial business control, it generates and displays the preview animation.

[0044] In a preferred embodiment, the control customization interface includes a block toolbox display area and a graphical code editing area. The second acquisition module 320 is used to respond to the drag operation of the target function block in the control customization interface and display the block control of the target function block in the graphic code editing area. In response to a click on the block control for the target function block, display the block rewriting interface; Determine the connection relationships between multiple functional building blocks; In response to the editing operation of the target functional block in the block rewriting interface, determine the logical attribute data of the target functional block; Based on the connection relationships between multiple functional blocks and the logical attribute data of each functional block, a preview animation is generated.

[0045] In a preferred embodiment, the control customization interface further includes an animation preview area, which includes a preview control and an animation display sub-area. The animation module 330 is used to respond to the click operation of the preview control in the control customization interface. Based on the connection relationship, logical attribute data and static attribute data between all functional blocks in the graphical code editing area, it generates a preview animation and displays it in the animation display sub-area.

[0046] In a preferred embodiment, for each functional block, the JavaScript generator function corresponding to the functional block is rewritten according to the corresponding logical attribute data; Based on the connection relationships between all functional blocks in the graphical code editing area and all rewritten JavaScript generator functions, a simulation script is generated. Execute the simulation script to obtain the simulation results of the initial business controls; Based on the simulation results and static attribute data of the initial business controls, a preview animation of the initial business controls is generated.

[0047] In a preferred embodiment, the control customization interface further includes a storage control. It also includes a storage module, which is used to generate an initial business control property data package in response to a click operation on the storage control and save it in the component library.

[0048] In a preferred embodiment, the configuration interface includes a business control display bar and a business control editing area, as well as multiple initial business items within the business control display bar. The first acquisition module 310 is used to respond to click or drag operations on the initial business entry and display the initial business control corresponding to the initial business entry in the business control editing area.

[0049] In a preferred embodiment, the configuration interface further includes simulation controls, and the business control display bar also includes predefined business items. The first acquisition module 310 is also used to respond to click or drag operations on defined business items and display the defined business control corresponding to the defined business item in the business control editing area. In response to a click operation on the simulation control, a programmable logic scenario simulation is executed based on the attribute data package corresponding to all defined business controls within the business control editing area.

[0050] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.

[0051] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, they can perform the operations described above. Figure 1 The steps of an editing method for a configuration software control shown in the method embodiment are described in detail in the method embodiment, and will not be repeated here.

[0052] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 The steps of an editing method for a configuration software control shown in the method embodiment are described in detail in the method embodiment, and will not be repeated here.

[0053] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0054] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0055] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0056] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0057] It should be noted that if the function is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0058] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0059] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for editing configuration software controls, characterized in that, The method includes: In response to the interactive operation received by the initial business control in the configuration interface, the static attribute data of the initial business control is determined, wherein the initial business control is a digital model of the device; In response to drag-and-drop operations targeting the target function block in the control customization interface, the block control of the target function block is displayed in the graphical code editing area. The control customization interface includes a block toolbox display area and a graphical code editing area. In response to a click on the block control for the target function block, display the block rewriting interface; Determine the connection relationships between multiple functional building blocks; In response to the editing operation of the target functional block in the block rewriting interface, determine the logical attribute data of the target functional block; For each functional block, the JavaScript generator function corresponding to that functional block is rewritten based on the corresponding logical attribute data; Based on the connection relationships between all functional blocks in the graphical code editing area and all rewritten JavaScript generator functions, a simulation script is generated. Execute the simulation script to obtain the simulation results of the initial business controls; Based on the simulation results and static attribute data of the initial business controls, a preview animation of the initial business controls is generated to simulate the device's operation. The control customization interface also includes an animation preview area, which includes a preview control and an animation display sub-area. In response to a click operation on the preview control in the control customization interface, the preview animation is displayed in the animation display sub-area.

2. The method according to claim 1, characterized in that, The customizable interface also includes a storage control. In response to a click on the storage control, an initial property data package for the business control is generated and saved in the component library.

3. The method according to claim 2, characterized in that, The configuration interface includes a business control display panel and a business control editing area, as well as multiple initial business items within the business control display panel. In response to a click or drag operation on the initial business entry, the initial business control corresponding to the initial business entry is displayed in the business control editing area.

4. The method according to claim 3, characterized in that, The configuration interface also includes simulation controls, and the business control display panel includes predefined business items. In response to click or drag operations on defined business items, the defined business controls corresponding to the defined business items are displayed in the business control editing area; In response to a click operation on the simulation control, a programmable logic scenario simulation is executed based on the attribute data package corresponding to all defined business controls within the business control editing area.

5. An editing device for configuration software controls, characterized in that, The method for editing configuration software controls according to any one of claims 1 to 4, the apparatus comprising: The first data acquisition module is used to respond to the interactive operations received by the initial business control in the configuration interface and determine the static attribute data of the initial business control. The second acquisition module is used to respond to the interactive operations of multiple functional blocks in the custom interface of the control and determine the business logic data of the initial business control. The animation module is used to respond to interactive operations on the preview control in the custom interface of the control. Based on the static attribute data and business logic data of the initial business control, it generates and displays the preview animation.

6. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the editing method for the configuration software control as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the editing method for the configuration software control as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Water affair system configuration design system and method

    CN114818033A

  • Visual configuration development method and device, electronic equipment and storage medium

    CN119739448A