Packaging method and system based on zero code platform
By providing task designers and packaging operators on the zero-code platform, configuring input and output parameters and building task workflows, the complexity and maintenance problems of software development in the industrial control field are solved, and efficient development and low-cost maintenance are achieved.
Patent Information
- Application Number
- CN202510521882.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-05-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the field of industrial control, the software development process is complex and the amount of code is large, resulting in low development efficiency and difficult maintenance. The existing low-code or zero-code platforms lack systematic technical solutions when handling complex tasks.
By providing a task designer on the zero code platform, creating encapsulated operators to process tasks in the task flow, and configuring input parameters and output parameters for the encapsulated operators, building a task workflow, and encapsulating them into reusable modules.
It realizes the transformation of complex tasks and code logic into modular and visual operating units, improves development efficiency and code readability, and reduces maintenance costs and development thresholds.
Smart Images

Figure CN120029606A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of software development, and in particular relates to a packaging method and system based on a zero-code platform. Background Art
[0002] In the field of industrial control, software development often faces challenges of tight timelines and heavy tasks. The development of industrial control systems not only requires the realization of basic control functions, but also involves complex process design and algorithm implementation. Due to the particularity of industrial control projects, developers must not only master programming techniques, but also have a deep understanding of specific industrial processes, process requirements, and the principles of related algorithms. This multifaceted knowledge requirement makes the development process extremely complicated, resulting in a significant increase in the amount of code.
[0003] At the same time, the writing and management of a large amount of code further reduces development efficiency and prolongs the project cycle. In addition, since the code is usually written by professional developers, its readability and modularity often vary from person to person, and later maintenance becomes another major problem. Maintenance personnel need to invest a lot of time to understand the logic and structure of the original code, especially in the after-sales stage of the project. If there is a lack of professional technical support, the difficulty of maintenance will increase significantly, and may even lead to unstable system operation or functional failure.
[0004] In recent years, with the advancement of software development technology, the emergence of low-code platforms and zero-code platforms has provided new ideas for solving the above problems. These platforms enable developers to shift their attention from tedious underlying code writing to the implementation of process design and development logic through graphical interfaces and pre-configured functional modules. This approach has reduced the development burden and improved development efficiency to a certain extent. However, the existing low-code or zero-code platforms still have certain shortcomings when dealing with complex tasks in the field of industrial control, especially in terms of how to effectively organize and reuse batch tasks, improve the controllability of the development process, and reduce maintenance costs. A systematic technical solution has not yet been formed.
[0005] Therefore, it is necessary to provide a new solution to the above technical problems. Summary of the invention
[0006] The purpose of the present invention is to provide a packaging method and system based on a zero-code platform, which can encapsulate large quantities of code and task processes into reusable modules, improve development efficiency and reduce maintenance costs.
[0007] To achieve the above purpose, the technical solution provided by the present invention is as follows: In a first aspect, the present invention provides a packaging method based on a zero-code platform, comprising: A task designer is provided on the zero-code platform. The task designer responds to the user's request for encapsulation of the task flow, creates an encapsulation operator to process the tasks in the task flow; configures input parameters and output parameters for the encapsulation operator, and builds a task workflow in the encapsulation operator; encapsulates the task workflow and the input parameters and output parameters into a module that can be reused by the task flow.
[0008] In one or more embodiments, the task designer includes a canvas task designer, which supports the creation of multiple canvas processes, each of which can configure properties, including a process name, type and / or an associated graphical display window, wherein the process type includes an active process and a passive process.
[0009] In one or more embodiments, the encapsulated operator includes an input parameter configuration module, an output parameter configuration module and a logic writing area, wherein the input parameter configuration module is used to configure the input parameters and support binding reference data; the output parameter configuration module is used to configure the output parameters and support providing output data for reference by other operators; the logic writing area is used to build the task workflow by dragging and dropping, and the logic writing area creates implicit input operators and implicit output operators by default.
[0010] In one or more embodiments, the input parameter supports modification of parameter name, parameter type and reference value; and / or the output parameter supports modification of parameter name and parameter type and provides a default value option.
[0011] In one or more embodiments, the method of saving the encapsulated operator includes: saving the configuration parameters, input parameters and output parameters of the encapsulated operator; saving the design structure and operator parameters of the task workflow; saving the layout structure of the logic writing area, generating a resource file and storing it in a specified path.
[0012] In one or more embodiments, the method of saving the encapsulated operator includes: when the save operation is triggered, saving the input parameter structure and output parameter structure of the encapsulated operator; creating a save node in the save structure of the encapsulated operator, and the save node is used to store the configuration information and logical structure of all operators in the logic writing area; after creating the save node, recursively traversing the tree structure inside the encapsulated operator; in the recursive process, cyclically calling the internal save method of each operator in the tree structure, and adding the logical structure and configuration information of each operator to the save node; when there is a special logical structure in the tree structure, creating a logical node under the save node; recursively traversing the operators bound to the bottom of the logical node, and saving the logical structure and configuration information of the operators under the logical node to its parent node; after all operators in the tree structure are saved, saving the current canvas resource file of the logic writing area to the specified path.
[0013] In one or more embodiments, the method of importing a packaged operator includes: importing the configuration parameters, input parameters and output parameters of the packaged operator; importing the saved node of the packaged operator, and loading all operator structures in the saved node into the tree structure of the task designer; importing the canvas resource file of the packaged operator, and loading the canvas resource file into the task designer.
[0014] In one or more embodiments, the method of executing the encapsulated operator includes: checking whether the configuration parameters of the encapsulated operator are empty, and if so, the execution fails; checking whether there are unconfigured operators in the task workflow, and if so, terminating the execution and recording the log; if there are no unconfigured operators, determining whether the current input parameter structure of the encapsulated operator is empty, and if so, not assigning the latest input parameters; if not, traversing the current input parameter structure, obtaining the latest input parameter result value and assigning it to the output of the implicit input operator.
[0015] In one or more embodiments, the method of executing the encapsulated operator also includes: determining whether there is an operator in the background tree structure of the logic writing area; if there is no operator in the background tree structure, skipping execution; if there is an operator in the background tree structure, determining whether there is an unconfigured operator in the logic writing area, if there is no unconfigured operator, recursively executing all operators in the background tree structure and obtaining the execution result, wherein if any operator fails to execute, a log is recorded but the entire execution process is not paused; if there is an unconfigured operator, the execution is terminated, and a pop-up prompt and log are recorded; after all operators in the background tree structure are executed, determining whether the current output parameter structure of the encapsulated operator is empty; if the output parameter structure is empty, the latest output parameter is not assigned; if the output parameter structure is not empty, traversing the output parameter structure and assigning the execution result to the implicit output operator.
[0016] In a second aspect, the present invention provides a packaging system based on a zero-code platform, which includes a task designer, a configuration module, and a packaging module; the task designer is used to respond to a request from a user to package a task process, and create a packaging operator to process tasks in the task process; the configuration module is used to configure input parameters and output parameters for the packaging operator, and build a task workflow in the packaging operator; the packaging module is used to package the task workflow and the input parameters and output parameters into a module that can be reused by the task process.
[0017] Compared with the prior art, the packaging method and system based on the zero-code platform provided by the present invention package the task process into reusable modules through packaging operators, solving the problems of low development efficiency, large amount of code, and difficult maintenance; using packaging technology to transform complex tasks and code logics into modular and visual operation units not only improves development efficiency and code readability, but also reduces maintenance costs and development thresholds. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0019] Figure 1 It is a flowchart of the packaging method based on the zero-code platform in an embodiment of the present invention; Figure 2 It is a schematic diagram of logical editing removal in an embodiment of the present invention; Figure 3 It is a schematic diagram of the packaging system based on the zero-code platform in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0021] The invention is derived from the analysis of the shortcomings of existing software development technology in specific scenarios, especially in development environments with high complexity and high efficiency requirements such as the industrial control (IP) field. Traditional software development usually relies on large-scale manual coding, which is flexible but has significant disadvantages. When analyzing the prior art, the inventors found that developers often need to deal with complex business logic and tedious code writing tasks at the same time, resulting in low development efficiency, especially in industrial control projects with tight time and heavy tasks. This inefficiency is particularly prominent.
[0022] In addition, the accumulation of a large amount of code not only increases the development burden, but also reduces the readability of the code due to the lack of a unified organizational structure, making subsequent maintenance a high-cost, high-tech task. Although the low-code or zero-code platforms that have emerged in recent years have alleviated some of the coding pressure through visual tools, the inventors have noticed that these platforms still lack an effective mechanism to integrate and reuse development results when dealing with batch tasks and complex processes, resulting in developers still having to repeat work when facing diverse needs, and failing to fully tap the potential of zero-code technology.
[0023] Based on the above analysis, the inventors realized that the prior art lacks a technical means that can efficiently organize and transform complex tasks and process logic into reusable units. This means should not only reduce the amount of coding, but also improve development efficiency, while optimizing the readability and maintainability of the code. To this end, the present invention proposes an implementation idea of a packaging method based on a zero-code platform, the core of which is to abstract the task process into independent functional units through visualization tools and modular ideas, thereby changing the inefficient mode of traditional development.
[0024] Specifically, the implementation idea of the present invention is to design a mechanism based on the visualization characteristics of the zero-code platform, so that users can define and organize task processes in an intuitive way, and integrate these processes and their related data into reusable modules. This idea breaks down the complex development process into manageable parts, and then integrates these parts into unified components through encapsulation technology. Such components can not only reduce repetitive development, but also be called by subsequent tasks in a standardized form, thereby achieving a balance between development efficiency, code organization, and system maintainability.
[0025] Please refer to Figure 1 FIG. 1 is a flow chart of a packaging method based on a zero-code platform in an embodiment of the present invention. The packaging method based on a zero-code platform specifically includes the following steps: S101: providing a task designer on the zero-code platform, responding to a user's request for encapsulating a task flow through the task designer, and creating an encapsulation operator to process tasks in the task flow.
[0026] The role of the task designer is to provide a visual development environment that allows users to intuitively build task processes without having to write a lot of code. In the implementation process, the task designer can adopt a canvas-style process design, where users can add task modules (operators) to the process by dragging and dropping, and establish execution relationships between tasks in a logically connected manner. For example, in the development of industrial automation control software, users need to establish a task process of "temperature monitoring-data recording-abnormal alarm". Through the task designer, users can drag and combine the corresponding task components without having to manually write the code for data collection, recording and alarming, thereby greatly improving development efficiency.
[0027] The encapsulated operator is equivalent to a reusable task module, which can encapsulate specific business logic and be called in subsequent task processes. For example, in a production line control system, a product inspection task may need to be executed multiple times. If the logic of the task is manually configured each time, the efficiency will be very low. By encapsulating the operator, the user can create a "product inspection" operator in the task designer, which can receive input parameters (such as product type, inspection standard), execute the corresponding inspection process, and output the inspection results. In multiple subsequent production processes, the operator can be called directly without repeated configuration, thereby achieving standardization and reuse of task processes.
[0028] From the perspective of technical implementation, step S101 can be implemented through the front-end and back-end interactive architecture. The front-end part of the task designer can be built based on HTML5+JavaScript+Canvas technology (it can also be implemented through the .Net architecture Winform, and the task designer and canvas designer can be built based on C# technology) to achieve a canvas-style drag-and-drop interactive experience, while the back-end part is based on the service architecture (it can also be built based on C# technology through the .Net architecture), which is responsible for parsing user operations and dynamically generating data structures for encapsulated operators. For example, when a user drags a new encapsulated operator on the canvas, the front end will trigger an event to notify the back end, such as notifying the canvas process designer through a mouse drag event. The canvas process designer can parse the dragged task object into an operator task name that can be recognized by the process, automatically create and store the corresponding encapsulated operator object, and return it to the task designer for visual display.
[0029] In an exemplary embodiment, the task designer includes a canvas task designer, which supports the creation of multiple canvas processes, each of which can be configured with properties, including a process name, type and / or an associated graphical display window, wherein the process type includes an active process and a passive process.
[0030] The canvas task designer can be presented as a graphical interface, the core of which is one or more editable canvas areas, each of which represents an independent task process. Users can add task nodes and draw connecting lines on the canvas by dragging, clicking, or selecting from the menu to form the process logic. For example, the canvas task designer may include a toolbar that provides predefined templates for task nodes (such as data input, processing, output, etc.), and users only need to drag these nodes into the canvas and connect them to create a process.
[0031] In addition, each canvas process supports property configuration. Users can set the process type (active process or passive process) and / or the associated graphic display window through the right-click menu or the property panel. Active processes can be understood as processes that are actively triggered by users or systems, such as tasks that collect sensor data at regular intervals; passive processes are processes that are executed under specific conditions, such as alarm tasks that are triggered when the temperature exceeds a threshold. The graphic display window allows users to bind a visualization interface to the process, which is used to display the image processed by the visual operator or the visual ROI selection area in the process in real time, such as displaying the final processed image and real-time image after threshold segmentation.
[0032] In an exemplary embodiment, the encapsulated operator includes an input parameter configuration module, an output parameter configuration module and a logic writing area. The input parameter configuration module is used to configure the input parameters and support binding reference data; the output parameter configuration module is used to configure the output parameters and support providing output data for reference by other operators; the logic writing area provides one or more canvases for building the task workflow by dragging and dropping, and the logic writing area creates implicit input operators and implicit output operators by default.
[0033] In terms of specific implementation, the encapsulated operator can be presented as a graphical control in the task designer, and the user can configure and edit it through the interactive interface. The main function of the input parameter configuration module is to provide a data input interface for the encapsulated operator so that it can accept data from the external task process. The input parameter configuration module can be presented in the form of a parameter list, in which the user can add parameter items, set the parameter name (such as "temperature value"), type (such as floating point number) and reference data source (such as the output of a sensor node). This module supports binding reference data, and the user can dynamically obtain input values from the output of other operators in the task process to achieve flexible transmission of data flow.
[0034] The output parameter configuration module is used to define the output data of the encapsulated operator and supports references by other operators. The output parameter configuration module similarly provides an output parameter list, where users can define the output name (such as "alarm signal"), type (such as Boolean value) and default value. The generated output data can be directly referenced by subsequent operators in the process, forming a seamless connection between modules.
[0035] Please refer to Figure 2 As shown in the figure, the logic writing area is the core operation area of the encapsulated operator. It provides a visual way for users to build task logic by dragging components. This area allows users to select appropriate operators from the toolbox and freely combine these operators in the logic writing area to complete specific tasks. In particular, the logic writing area creates implicit input operators and implicit output operators by default. These two operators serve as the starting point and end point of the data flow, respectively receiving the values of the input parameter configuration module and passing the processing results to the output parameter configuration module.
[0036] Specifically, the input parameter supports modification of parameter name, parameter type and reference value; and / or the output parameter supports modification of parameter name and parameter type, and provides a default value option.
[0037] Input parameters are interfaces for encapsulating operators to accept external data. The parameter name, parameter type, and reference value can be modified to enhance the configurability and adaptability of the operator. In practical applications, different task processes may require different data input formats, so allowing users to modify parameter names can make the parameters more intuitive and easier to understand the task process. For example, in an intelligent manufacturing system, there may be multiple different product quality inspection operators, each of which may require different inspection data as input. By modifying the parameter name, users can name the input parameter "Product A Inspection Data" or "Product B Inspection Data", thereby clearly expressing the source of the data processed by the operator and improving readability.
[0038] Different task processes may involve different data types, such as integers, floating-point numbers, strings, Boolean values, etc. If the input parameter type is fixed, the scope of application of the operator may be limited. For example, in an automation equipment control process, the "temperature setting value" parameter may be input as an integer, but in some precision control tasks, it may be necessary to accept floating-point values as input. Therefore, users are supported to dynamically modify parameter types so that the packaged operator can adapt to different data format requirements.
[0039] The support of reference values enables encapsulated operators to dynamically obtain the output data of other operators as input without the need for users to manually provide input data, thereby improving the automation of task processes. For example, in an intelligent warehousing system, suppose there is an "inventory management" operator that needs to obtain the output data of the "commodity scanning" operator (such as inventory quantity, product number, etc.). At this time, the user can directly reference the output value of the "commodity scanning" operator in the input parameter configuration, so that data can flow automatically between operators, avoiding tedious manual input operations and improving the efficiency and accuracy of task execution.
[0040] In terms of output parameters, you can modify parameter names and parameter types so that the output results of operators can meet the needs of different task processes. Modifying parameter names can help users understand the output data of operators more intuitively, especially in complex task processes. Reasonable parameter naming can significantly improve the readability of task processes. Modifying the type of output parameters allows users to adjust the output data format of operators according to different business needs.
[0041] In addition, a default value option is provided so that the encapsulated operator can still execute normally in the absence of input data, which improves the stability of the task process. For example, in the user login system, if the "User Permission Verification" operator does not receive the permission level data passed in from the outside, the default value "Ordinary User" can be used as the permission level to ensure the normal operation of the system. This feature can effectively prevent operators from abnormalities due to lack of input in scenarios involving data uncertainty.
[0042] S102: configuring input parameters and output parameters for the encapsulation operator, and building a task workflow in the encapsulation operator.
[0043] Step S102, based on the creation of the encapsulated operator, further assigns specific functions and logic to the encapsulated operator, turning it into an operational module that can handle specific tasks. Its essence is to define the data input and output interface of the encapsulated operator through parameter configuration, and implement the internal processing logic through the construction of the task workflow, thereby completing the functional customization of the encapsulated operator.
[0044] In specific implementation, step S102 can be completed through a dedicated interface in the task designer. The user first enters the configuration window of the encapsulated operator, which contains the editing area for input parameters and output parameters. The input parameter configuration may be presented in the form of a list, and the user can add parameter items, set the name (such as "temperature value"), type (such as floating point number) and bind reference data (such as the output of a sensor node); the output parameter configuration allows the user to define the output name (such as "alarm signal"), type (such as Boolean value) and default value (such as "false").
[0045] After completing the parameter configuration, the user enters the logic writing area of the encapsulated operator, which can be a small canvas. The user builds the task workflow by dragging the function nodes in the toolbox (such as "Compare Data Operator" and "Calculate Rotation Coordinates"). The system provides implicit input operators and implicit output operators by default, which connect the input parameters and output parameters respectively. The user only needs to add nodes between the two and connect them. By default, the input parameter operator and the output parameter operator are automatically connected. There is no need to disconnect the logic line of this operator and delete the operator operation. The operator tool created by dragging and dropping in the toolbox will automatically connect to the input parameters and output parameters. For example, the toolbox can provide predefined nodes such as conditional judgment and data processing. The user defines the order of task execution by dragging and connecting. Another possible implementation method is to provide a template selection function. The user can start with a preset workflow template (such as "Threshold Monitoring"), and then adjust the parameters and nodes according to needs to further simplify the operation.
[0046] Let's take an example from an industrial control scenario to illustrate the meaning and purpose of this step. Assume that the user needs to configure the "temperature over-limit detection" function for a package operator. In step S102, the user first configures the input parameter "current temperature" for the package operator, the type is a floating point number, and the reference value is the data output of the external sensor; then configures the output parameter "over-limit status" with a Boolean value and a default value of "false". Next, in the logic writing area, the user drags in a "threshold comparison" node, sets the threshold to 50°C, and connects the implicit input operator (receives "current temperature") and the implicit output operator (outputs "over-limit status"), with the logic of "output true if the temperature > 50°C". The purpose of this step is to clarify the input and output behavior of the package operator through parameter configuration, and define its internal logic through the task workflow, making it an independent functional unit. Compared with traditional coding methods, users do not need to write variable declarations or conditional statements, and can complete it with just a few drags and configurations, which greatly simplifies the development process.
[0047] S103: Encapsulate the task workflow and the input parameters and output parameters into a module that can be reused by the task process.
[0048] After completing the configuration parameters and building the task workflow, these elements are integrated into an independent functional unit to make it reusable. Its essence is to transform the scattered task logic and data interface into a standardized module through encapsulation technology. Users can repeatedly call this module in different task processes without redesigning or coding.
[0049] The encapsulated task module needs to store the structural information of the task workflow, including the internal operator layout, execution logic, parameter configuration, etc., and ensure that it can be restored during subsequent use. For example, in a software system, each encapsulated task module can be stored in JSON, XML, or a specific serialization format, which details the binding relationships of input parameters, the data structures of output parameters, as well as the execution order and logical relationships of each sub-operator in the task workflow.
[0050] In actual operation, when the user completes the encapsulation task, the system will automatically save the task module or the user can manually click to save the task, and generate an optional task component in the resource library of the zero-code platform for direct drag-and-drop use during subsequent process design. For example, in an automated operation and maintenance system, an administrator can create a "server log analysis" task, whose workflow includes "log collection - log formatting - anomaly analysis - alarm notification". After encapsulation, this task module can be directly integrated into other operation and maintenance processes, such as "periodic health check" or "security vulnerability scan" tasks, avoiding repeated configuration and improving operation and maintenance efficiency.
[0051] In addition to the storage mechanism, this step also involves the import and export of encapsulated operators. The encapsulated task module should not only be available within the current system but also support cross-project and cross-platform migration. For example, in an industrial control system, similar general processes may be used in different scenarios. Through the encapsulation mechanism of the present invention, this general process can be stored as a standardized module and directly imported and used by different business processes, reducing the workload of process construction and ensuring consistency across business scenarios. At the same time, the encapsulated task module can also be exported as a file and loaded on other zero-code platforms, thus achieving wider application and sharing.
[0052] In an exemplary embodiment, the method of saving the encapsulated operator includes: saving the configuration parameters, input parameters, and output parameters of the encapsulated operator; saving the design structure of the task workflow and the operator parameters; saving the layout structure of the logic writing area, generating a resource file, and storing it at a specified path.
[0053] During the saving process of the encapsulated operator, it is necessary to save the configuration parameters, input parameters, and output parameters of the encapsulated operator. The configuration parameters are the core settings of the encapsulated operator, such as the name, description, execution mode, etc. of the operator, while the input and output parameters determine the interface information of the operator, enabling it to interact data in different task processes.
[0054] The task workflow design structure and operator parameters on which the encapsulated operator depends also need to be saved together. The task workflow design structure includes the connection relationships, execution order, conditional judgment logic, etc. between operators, while the operator parameters involve the specific configurations of each sub-operator. Saving the design structure of the task workflow and operator parameters can be achieved by traversing the node tree in the workflow, and the type, connection relationship, and parameter settings of each node are recorded, and may be stored as a structured data file, associated with the metadata file.
[0055] In addition to the task workflow structure and operator parameters, the layout structure of the logic writing area of the encapsulated operator also needs to be saved, and a resource file is generated and stored in the specified path. The layout structure of the logic writing area determines the visual presentation method of the operator in the task designer, the position of the operator node, the layout of the connection lines, etc., such as the coordinates of each node on the canvas, the path of the connection line, etc. This information is generated into a resource file (such as a ".gsc" file) and stored in the specified path (such as the "GBlockFull" folder under the application root directory).
[0056] Specifically, the method of saving the encapsulated operator includes: when the save operation is triggered, saving the input parameter structure and output parameter structure of the encapsulated operator; creating a save node in the save structure of the encapsulated operator, and the save node is used to store the logical structure and configuration information of all operators in the logic writing area; after creating the save node, traversing the tree structure inside the encapsulated operator in a recursive manner; during the recursive process, circularly calling the internal save method of each operator in the tree structure, and adding the logical structure and configuration information of each operator to the save node; when there is a special logical structure in the tree structure, creating a logic node under the save node; recursively traversing the operators bound to the bottom of the logic node, and saving the logical structure and configuration information of the operators under the logic node to its parent node; after all operators in the tree structure are saved, saving the current canvas resource file of the logic writing area to the specified path.
[0057] When the user triggers the save operation, the system first saves the input parameter structure and output parameter structure of the encapsulated operator. The input parameters determine the data types, names, and reference relationships that the encapsulated operator can receive, while the output parameters determine how the processing results of the operator are passed to subsequent tasks. This saving method can be triggered by the save function in the task designer. When the user clicks the "Save" button, the system first saves the input parameter structure and output parameter structure, and this step can be achieved by serializing the parameter list into JSON or XML format, for example, writing the parameter names, types, and reference values into a metadata file.
[0058] Subsequently, the system creates a save node in the save structure of the encapsulated operator. This node can be a data object or an XML node. The role of this node is to store all the operator structures in the logic writing area. After the save node is created, the information of these operators will be organized into a hierarchical data structure so that the task logic can be restored in the correct order when it is subsequently loaded.
[0059] To ensure the integrity of the encapsulated operator, the system will recursively traverse the tree structure inside the encapsulated operator, and in the recursive process, it will cyclically call the internal save method of each operator in the tree structure and add the save structure of each operator to the save node. The advantage of this mechanism is that it can automatically traverse the entire task process and store the information of all operators according to the hierarchical relationship.
[0060] During the traversal process, if there are special logical structures in the tree structure (such as conditional judgment, loop logic, multiple branches, etc.), the system will create logical child nodes under the save node. Logical nodes are used to store these special control logics so that the execution order and logical relationship between operators can be correctly parsed when loading. After the logical node is created, the system recursively traverses the operator structure bound to the bottom of the logical node and stores its operator structure on its parent node. This process ensures that all task operators and logical control structures can be stored in the correct hierarchical relationship.
[0061] After all operators in the tree structure are saved, the system saves the current canvas resource file in the logic writing area to the specified path. The canvas resource file records the visual layout information of the encapsulated operator, including the relative position, connection method, parameter configuration, layout information, etc. of the operator.
[0062] In an exemplary embodiment, the method of importing a packaged operator includes: importing the configuration parameters, input parameters and output parameters of the packaged operator; importing the saved node of the packaged operator, and loading all operator structures in the saved node into the tree structure of the task designer; importing the canvas resource file of the packaged operator, and loading the canvas resource file into the task designer.
[0063] The import method of encapsulated operators is a mechanism for the zero-code platform to achieve task process reuse, cross-project sharing, and flexible configuration. The import process of encapsulated operators involves the loading of configuration parameters, input and output parameters, the restoration of task logic structure, and the restoration of canvas resource files, ensuring that encapsulated operators can run correctly in different environments and maintain consistent task logic and interaction methods.
[0064] When importing a packaged operator, the system first imports the configuration parameters, input parameters, and output parameters of the packaged operator. Configuration parameters are the basic settings of the packaged operator, such as operator name, execution mode, task type, etc., while input and output parameters determine the interface information of the operator to ensure the correctness of data flow. The way to import a packaged operator may be triggered by the "Import" function in the task designer. After the user selects a saved module file, the system first imports the configuration parameters, input parameters, and output parameters. This step can be completed by parsing metadata files (such as JSON or XML format), loading parameter names, types, reference values, or default values into memory, and updating the parameter configuration interface of the packaged operator.
[0065] After loading the basic parameters, the system needs to find the save node of the encapsulated operator. The system obtains the tree structure of the task workflow by parsing the node, and then restores it to the background tree data model of the task designer. The tree structure of the task designer is the organization method of the internal logic of the encapsulated operator, which includes the execution order, dependencies and data flow between operators. In the specific implementation process, the system will parse the save node in the encapsulated file, traverse the operator information layer by layer, and insert it into the tree structure of the task designer according to the original logical structure.
[0066] After completing the restoration of the task logic, the system also needs to find the canvas resource file of the encapsulated operator and load it into the task designer to restore the visual layout of the operator. The canvas resource file records the visual information of the encapsulated operator in the task designer, including the location of the operator node, the connection structure, the parameter configuration interface, the layout relationship, etc. If the resource file is located in the specified path (such as the "GBlockFull" folder), the system will automatically locate and load it; if the file is missing, the user can be prompted to manually specify the path or automatically create the file path.
[0067] In an exemplary embodiment, the method of executing the encapsulated operator includes: checking whether the configuration parameters of the encapsulated operator are empty, and if so, the execution fails; checking whether there are unconfigured operators in the task workflow, and if so, terminating the execution and recording the log; if there are no unconfigured operators, determining whether the current input parameter structure of the encapsulated operator is empty, and if so, not assigning the latest input parameter; if not, traversing the current input parameter structure, obtaining the latest input parameter result value and assigning it to the output of the implicit input operator.
[0068] When executing a packaged operator, the system will first check whether there is an unconfigured operator in the process designer. If so, the system will prompt a pop-up box and exit the execution; otherwise, the operation will continue, and the system will check whether the configuration parameters of the operator are empty. Configuration parameters usually include the operator's input parameter name, input parameter type, input parameter reference value, output parameter name, output parameter type, calculation rules, parameter default value, etc., which determine the specific behavior of the operator. If these parameters are empty, the packaged operator will not be executed correctly, and the system will directly terminate the task and return an error.
[0069] The system then checks whether there are any unconfigured operators in the task workflow. In the zero-code task designer, users may drag and drop multiple operators to build complex task flows, but some operators may still be in an "unconfigured" state before they are fully configured. Checking whether there are unconfigured operators in the task workflow can be achieved by traversing the node tree in the workflow. The system checks the properties of each operator one by one, such as determining whether the threshold of a comparison node has been set. If an unconfigured operator is found, the system will terminate execution and write error information to the log file, such as recording "Timestamp: Threshold comparison operator has not set threshold", so that users can quickly locate the problem and supplement the necessary parameter configuration during debugging.
[0070] After confirming that the task flow is complete, the system will check whether the input parameter structure of the encapsulated operator is empty. The input parameter is the basic data for the operator to perform calculations, usually provided by external operators or user input. If the input parameter structure is empty, it will be considered that this encapsulated operator has no task input parameter configuration. In this case, the system will not assign the latest input parameters to prevent incorrect calculations due to lack of input. If the input parameter structure is empty, the operator cannot perform statistical analysis, and the system will not forcibly assign new inputs, but wait for new data to be input before performing calculations.
[0071] If the input parameter is not empty, the system will traverse the current input parameter structure, obtain the latest input parameter result value, and assign it to the output of the implicit input operator. The implicit input operator is an internal operator automatically generated by the system, responsible for receiving and transmitting input data, so that the encapsulated operator can seamlessly connect to the external data stream.
[0072] In an exemplary embodiment, the method of executing the encapsulated operator also includes: determining whether there is an operator in the background tree structure of the logic writing area; if there is no operator in the background tree structure, skipping execution; if there is an operator in the background tree structure, recursively executing all operators in the background tree structure and obtaining execution results, wherein if any operator fails to execute, a log is recorded but the entire execution process is not paused; after all operators in the background tree structure are executed, determining whether the current output parameter structure of the encapsulated operator is empty; if the output parameter structure is empty, not assigning the latest output parameter; if the output parameter structure is not empty, traversing the output parameter structure and assigning the execution result to the implicit output operator.
[0073] Determining whether there are operators in the background tree structure of the logic writing area can be achieved by querying the root node of the tree structure, for example, checking whether there are any functional nodes (such as comparing data, calculating the rotation center). If the tree structure is empty, the system directly skips the execution, and can record a log (such as "no operator can be executed") and return to the default state. If there are operators, the system uses a recursive algorithm to traverse the tree structure, starting from the root node, accessing each operator layer by layer, calling its execution method and collecting the results.
[0074] During the recursive execution, if any operator fails to execute, the system will record the log but will not pause the entire execution process. The purpose of this design is to improve the fault tolerance of the task process and ensure that even if an operator fails due to abnormal data or calculation errors, it will not affect the operation of the entire encapsulated operator.
[0075] When all operators in the background tree structure are executed, the system needs to check whether the output parameter structure of the encapsulated operator is empty. The output parameter is used to store the calculation results of the encapsulated operator and pass it to the subsequent task process. If the output parameter is empty, it means that the encapsulated operator has not produced a valid calculation result. At this time, the system will not assign new output parameters to avoid erroneous data flowing into subsequent tasks.
[0076] If the output parameter structure is not empty, the system will traverse the output parameter structure and assign the execution result to the implicit output operator to ensure that the calculation result of the encapsulated operator can be correctly passed to the subsequent tasks. For example, in an industrial production optimization system, a "production scheduling optimization" encapsulated operator may output "optimal production scheduling plan" after execution. This output parameter will be assigned to the implicit output operator and used by the "equipment scheduling" or "task execution monitoring" operator to ensure the integrity of the entire production optimization process.
[0077] Please refer to Figure 3As shown, based on the same inventive concept as the aforementioned packaging method based on the zero-code platform, the present invention provides a packaging system 300 based on the zero-code platform, which includes: a task designer 301, a configuration module 302 and a packaging module 303.
[0078] The task designer 301 is used to respond to the user's request to encapsulate the task flow, and create an encapsulation operator to process the tasks in the task flow. The configuration module 302 is used to configure the input parameters and output parameters for the encapsulation operator, and build a task workflow in the encapsulation operator. The encapsulation module 303 is used to encapsulate the task workflow and the input parameters and output parameters into a module that can be reused by the task flow.
[0079] In summary, the encapsulation method and system based on the zero-code platform provided by the present invention encapsulates the task process into a reusable module by encapsulating the operator, thereby solving the problems of low development efficiency, large amount of code, and difficult maintenance; and utilizes encapsulation technology to transform complex tasks and code logic into modular and visual operation units, which not only improves development efficiency and code readability, but also reduces maintenance costs and development thresholds.
[0080] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0081] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, systems, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0082] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0083] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A packaging method based on a zero-code platform, characterized in that: include: A task designer is provided on the zero-code platform, and a user's request for encapsulation of a task flow is responded to through the task designer, and an encapsulation operator is created to process the tasks in the task flow; Configure input parameters and output parameters for the encapsulated operator, and build a task workflow in the encapsulated operator; The task workflow and the input parameters and output parameters are encapsulated into a module that can be reused by the task process.
2. The packaging method based on the zero-code platform according to claim 1, characterized in that: The task designer includes a canvas task designer, which supports the creation of multiple canvas processes. Each canvas process can be configured with properties, including a process name, type and / or an associated graphic display window, wherein the process type includes an active process and a passive process.
3. The packaging method based on the zero-code platform according to claim 1, characterized in that: The encapsulation operator includes an input parameter configuration module, an output parameter configuration module and a logic writing area, wherein: The input parameter configuration module is used to configure the input parameters and support binding reference data; The output parameter configuration module is used to configure the output parameters and support providing output data for reference by other operators; The logic writing area provides one or more canvases for building the task workflow by dragging and dropping. The logic writing area creates implicit input operators and implicit output operators by default.
4. The packaging method based on the zero-code platform according to claim 3, characterized in that: The input parameter supports modification of parameter name, parameter type and reference value; and / or the output parameter supports modification of parameter name and parameter type, and provides a default value option.
5. The packaging method based on the zero-code platform according to claim 3, characterized in that: Methods for saving the encapsulated operator include: Saving the configuration parameters, input parameters and output parameters of the encapsulated operator; Saving the design structure and operator parameters of the task workflow; The layout structure of the logic writing area is saved, and a resource file is generated and stored in a specified path.
6. The packaging method based on the zero-code platform according to claim 5, characterized in that: Methods for saving the encapsulated operator include: When the save operation is triggered, the input parameter structure and the output parameter structure of the encapsulated operator are saved; Creating a save node in the save structure of the encapsulated operator, the save node being used to store configuration information and logical structures of all operators in the logic writing area; After creating the save node, recursively traverse the tree structure inside the encapsulation operator; In the recursive process, the internal saving method of each operator in the tree structure is cyclically called to add the logical structure and configuration information of each operator to the saving node; When a special logical structure exists in the tree structure, a logical node is created under the storage node; Recursively traverse the operators bound to the bottom of the logical node, and save the logical structure and configuration information of the operators under the logical node to its parent node; After all operators in the tree structure are saved, the current canvas resource file of the logic writing area is saved to a specified path.
7. The packaging method based on the zero-code platform according to claim 6, characterized in that: The ways to import packaged operators include: Import the configuration parameters, input parameters, and output parameters of the encapsulated operator; Import the save node of the encapsulated operator and load all operator structures in the save node into the tree structure of the task designer; Import the canvas resource file of the encapsulated operator and load the canvas resource file into the task designer.
8. The packaging method based on the zero-code platform according to claim 3, characterized in that: Methods for executing the encapsulation operator include: Check whether the configuration parameters of the encapsulated operator are empty. If so, the execution fails. Check whether there are any unconfigured operators in the task workflow, and if so, terminate the execution and record the log; If there is no unconfigured operator, determine whether the current input parameter structure of the encapsulated operator is empty. If it is empty, do not assign the latest input parameter; if it is not empty, traverse the current input parameter structure, obtain the latest input parameter result value and assign it to the output of the implicit input operator.
9. The packaging method based on the zero-code platform according to claim 8, characterized in that: The method of executing the encapsulation operator also includes: Determine whether there is an operator in the background tree structure of the logic writing area; If the operator does not exist in the background tree structure, the execution is skipped; If there are operators in the background tree structure, determine whether there are unconfigured operators in the logic writing area. If there are no unconfigured operators, recursively execute all operators in the background tree structure and obtain execution results. If any operator fails to execute, logs are recorded but the entire execution process is not paused. If there are unconfigured operators, the execution is terminated, a pop-up prompt is displayed, and logs are recorded. After all operators in the background tree structure are executed, determine whether the current output parameter structure of the encapsulated operator is empty; If the output parameter structure is empty, the latest output parameter is not assigned; If the output parameter structure is not empty, the output parameter structure is traversed and the execution result is assigned to the implicit output operator.
10. A packaging system based on a zero-code platform, characterized in that: include: A task designer, used to respond to a user's request to encapsulate a task flow and create an encapsulation operator to process the tasks in the task flow; A configuration module, used to configure input parameters and output parameters for the encapsulation operator and build a task workflow in the encapsulation operator; The encapsulation module is used to encapsulate the task workflow and the input parameters and output parameters into a module that can be reused by the task process.
Citation Information
Patent Citations
Streaming data processing system based on dragging arrangement mode and processing method thereof
CN112328220A
Multi-objective optimization platform based on low codes and establishment method thereof
CN115328465A
Zero code development platform, development method, electronic equipment and medium
CN119473238A
Development method and system based on zero code platform, electronic equipment and medium
CN119576312A
Multi-person collaborative programming method and system, electronic equipment and medium
CN119645358A
Cited By
Zero code platform
CN120255864A