Graphical programming method and system
By providing graphical programming methods and systems in the zero-code development platform, users can intuitively configure the logic and data flow between operators, solving the problem of insufficient guidance of the existing platform, and achieving an efficient development process and a stable software product.
Patent Information
- Application Number
- CN202510521879.2
- 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
The existing zero-code development platform has insufficient guidance in actual applications, which leads to non-professional users who need to rely on a large number of trial and error processes when building logical relationships between functional modules, which increases development costs and affects the stability and maintainability of the software.
Provide a graphical programming method and system. By creating operators on the canvas and displaying their logical interfaces and data interfaces graphically, users can intuitively configure the data reference relationship and logical connection relationship between operators to form a task flow. The system also provides automated configuration measures and real-time detection mechanisms to ensure the correctness of the connection relationship.
It reduces the difficulty of software development, improves development efficiency, reduces learning costs and operation difficulties, avoids complex code writing and debugging processes in traditional programming, and improves the stability and maintainability of the software.
Smart Images

Figure CN120029614A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of software development, and in particular relates to a graphical programming method and system. Background Art
[0002] At present, with the diversification of software applications and the continuous growth of business needs, traditional programming methods are becoming increasingly difficult in the face of complex and ever-changing business scenarios. In order to lower the development threshold and improve development efficiency, zero-code development platforms have emerged. This type of platform is mainly aimed at non-programming professionals. Its basic concept is to allow users to program through a graphical interface without writing complex source code, thereby achieving rapid development and iterative updates of applications with a lower professional threshold.
[0003] However, the existing zero-code development platform still has many shortcomings in practical applications. Since the original intention of the design of the zero-code platform is to reduce the technical requirements of developers, the guidance for non-professionals is generally insufficient. In traditional platforms, developers often need to combine modules and build logic based on business needs, but these platforms do not provide sufficiently friendly and intuitive guidance, so that non-professional users often need to rely on a lot of trial and error processes to ensure the reasonable connection of each module when building the logical relationship between various functional modules. This repeated trial and error mechanism not only increases development costs, but also easily leads to error accumulation, thus affecting the stability and maintainability of the overall software.
[0004] Therefore, it is necessary to provide a new solution to the above technical problems. Summary of the invention
[0005] The purpose of the present invention is to provide a graphical programming method and system, which can reduce the difficulty of software development and improve development efficiency.
[0006] 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 graphical programming method, which comprises: An operator is created on a canvas and displayed graphically. The operator has a logic interface and a data interface. The logic interface is used to determine the execution logic between operators, and the data interface is used to transfer data between operators. When a new operator is created, the input logic interface of the new operator is connected to the output logic interface of the previous operator by default. On the canvas, the data reference relationship and the logical connection relationship between the operators are configured through visual connection lines to form a task flow. The operators in the task flow are executed, and the execution status and data flow are displayed in a display interface. The method of creating an operator on the canvas includes: in response to a user's drag operation, the X coordinate and Y coordinate of the user's current mouse position in the canvas are obtained, and the operator is created at the current position of the user's current mouse. After the user completes the drag operation, in response to the user's continuous double-click operation, multiple additional operators are created, and the created additional operators are displayed in the visible range of the canvas, each additional operator is created near the operator created by the drag operation, and each newly created additional operator is offset by a predetermined offset relative to the X coordinate and Y coordinate of the last created operator.
[0007] In one or more implementations, after the data interfaces between operators are connected by connecting lines, it is detected whether the connection relationship of the connecting lines is abnormal.
[0008] In one or more embodiments, detecting whether the connection relationship of the connecting line is abnormal includes: detecting whether there is an input interface connection or an output interface connection, and if so, prompting an error; and / or detecting whether there is a situation where the output interface of the same operator is connected to the input interface of the same operator, and if so, prompting an error; and / or detecting whether the output interface of the subsequent operator is connected to the input interface of the previous operator, and if so, prompting an error; and / or detecting whether the data interface types at both ends of the connecting line match, and if not, prompting an error; and / or detecting whether the current connection is a closed-loop connection, and if so, prompting an error; and / or detecting whether there is a cross-branch structure connection, and if so, prompting an error.
[0009] In one or more embodiments, the data interface distinguishes data types through preset colors, and data interfaces with the same color indicate the same data type; if more than two colors appear in the data interface, it means that the data interface supports multiple data types, and the data types corresponding to the various colors are the data types supported by the data interface.
[0010] In one or more implementations, before executing the operator in the task flow, it is determined whether the operator has completed configuration; if the operator has not completed configuration, the execution will not succeed and a prompt message will pop up to the user.
[0011] In one or more embodiments, executing the operators in the task flow includes: in response to an operation on a single execution control in a display interface, executing all operators in the task flow once; or in response to an operation on a cyclic execution control in a display interface, cyclically executing all operators in the task flow; or in response to an operation on the right button of a mouse, executing the operator currently mapped by the mouse; or in response to an operation on the right button of a mouse, executing the current flow when the mouse is not mapped with an operator; or in response to an operation on a triggered execution, using a triggering operator to execute a certain flow, and setting the executed flow to passive execution; or in response to a triggering operation, triggering the execution of a certain operator or triggering a certain flow through an event manager of an HMI interface; or in response to an operation on the keyboard shortcut F10, executing operators individually in sequence according to the currently selected flow.
[0012] In one or more embodiments, the graphical programming method also includes: obtaining the referenced and referencing lists of the currently selected operator; traversing the reference lists of other operators in the entire task process, and if the selected operator is included, displaying the corresponding reference relationship in the display interface; by clicking on the reference relationship displayed in the display interface, jumping to the configuration interface of the relevant operator and the process interface to which the operator belongs.
[0013] In one or more embodiments, the method of creating an operator on the canvas includes: in response to a user's double-click operation, creating an operator on the canvas, and jumping to the area where the created operator is located, so that the created operator is displayed within the visible range of the canvas; or in response to a user clicking an operation to create an operator control, creating an operator on the canvas, and jumping to the area where the created operator is located, so that the created operator is displayed within the visible range of the canvas.
[0014] In one or more embodiments, the method further includes: detecting whether the currently created operator has input parameters, and if so, automatically creating the input interface of the operator and displaying it in the canvas; detecting whether the currently created operator has output parameters, and if so, automatically creating the output interface of the operator and displaying it in the canvas; wherein any created operator includes "run time" and / or "status" output interfaces.
[0015] In one or more embodiments, the method also includes: in response to an operation of creating or deleting the current operator interface, based on the specified interface type and interface name, detecting whether the current operator has interface parameters that match the interface type and interface name, and if so, creating or deleting the corresponding interface according to the interface type and interface name.
[0016] In one or more embodiments, the method also includes: in response to a user selecting reference information in an operator configuration interface, configuring the data reference relationship of the current operator; detecting whether the data reference relationship is abnormal, and if not, generating a visual connection line based on the data reference relationship to connect the data interface of the current operator and the referenced operator.
[0017] In one or more embodiments, the method further includes: in response to a user's operation of locally persisting configuration parameters, detecting whether the saving process of the task process is abnormal, and if not, persisting the configuration parameter information of the task process locally; or in response to a user's operation of importing local configuration parameters, detecting whether the import process of the local configuration parameters is abnormal, and if not, generating a corresponding task process based on the local configuration parameters.
[0018] In a second aspect, the present invention provides a graphical programming system, which includes: a creation module, a configuration module and an execution module; the creation module is used to create an operator on a canvas and display the operator in a graphical manner, the operator having a logic interface and a data interface, the logic interface is used to determine the execution logic between operators, and the data interface is used to transfer data between operators; wherein, when a new operator is created, the input logic interface of the new operator is connected to the output logic interface of the previous operator by default; the configuration module is used to configure the data reference relationship and logical connection relationship between the operators on the canvas through visual connection lines to form a task flow; the execution module is used to execute The operator in the task flow is displayed, and the execution status and data flow are displayed in the display interface; wherein the creation module creates the operator on the canvas in a manner including: in response to the user's drag operation, obtaining the X coordinate and Y coordinate of the user's current mouse position in the canvas, and creating the operator at the current position of the user's current mouse; after the user completes the drag operation, in response to the user's continuous double-click operation, creating multiple additional operators, and displaying the created additional operators within the visible range of the canvas, each additional operator is created near the operator created by the drag operation, and each newly created additional operator is offset by a predetermined offset relative to the X coordinate and Y coordinate of the last created operator.
[0019] Compared with the prior art, the graphical programming method and system provided by the present invention enable users to intuitively create and configure operators through a graphical interface, avoiding the complicated code writing and debugging process in traditional programming languages; through a graphical representation, users can easily understand the relationship and data flow between various operators in the task process, reducing learning costs and operating difficulties. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 A flowchart of a graphical programming method according to an embodiment of the present invention; Figure 2 A schematic diagram of operator configuration relationship in one embodiment of the present invention; Figure 3 This is a diagram showing an interface for displaying operator reference relationships in one embodiment of the present invention; Figure 4 A schematic diagram of a graphical programming system according to an embodiment of the present invention; Figure 5 FIG. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0023] Although existing technologies have simplified software development using graphical interfaces, in actual use, non-programming professionals often find it difficult to establish correct and coherent functional modules and data transfer relationships. The main reason is that traditional platforms lack a complete user guidance and automated configuration mechanism, which requires developers to rely on a lot of trial and error when building task processes, thereby reducing development efficiency and increasing the risk of problems caused by logical confusion and interface configuration errors.
[0024] Based on the above background, the core implementation idea of the present invention is to intuitively display the development modules in a graphical manner in a zero-code development environment, and provide an automated and intelligent module connection and status feedback mechanism.
[0025] In the scheme of the present invention, the development modules are graphically displayed to present each functional unit in a visual manner. At the same time, in view of the cumbersome operations that may occur during user configuration, the present invention presets automatic configuration measures so that the relevant modules are logically associated by default during the creation process, thereby greatly shortening the overall configuration time and reducing human errors.
[0026] Please refer to Figure 1 FIG. 1 is a flowchart of a graphical programming method in an embodiment of the present invention. The graphical programming method specifically includes the following steps: S101: Create an operator on a canvas and display the operator in a graphical manner, wherein the operator has a logic interface and a data interface, wherein the logic interface is used to determine the execution logic between operators, and the data interface is used to transfer data between operators; wherein, when a new operator is created, the input logic interface of the new operator is connected to the output logic interface of the previous operator by default.
[0027] In step S101, operators are created graphically, and their logic interfaces and data interfaces are defined for each operator, thereby realizing the execution logic and data flow between operators. Specifically, an operator is a basic module that completes a specific function or task. It can be a computing unit, a data processing module, or other function implementation modules. In a graphical programming environment, users can create operators on the canvas through simple drag and drop operations and display them in a graphical manner. Each operator includes a logic interface and a data interface.
[0028] The logical interface is mainly used to determine the execution order and execution logic between operators. For example, an operator may be executed only after another operator completes a specific operation. This execution order relationship is connected and described through the logical interface. The data interface is responsible for transferring data between operators to ensure the flow of data when tasks are executed.
[0029] When creating a new operator, the system (such as the GraniStudio platform) will connect the input logic interface of the new operator to the output logic interface of the previous operator by default (the interface on the left side of the operator is the input interface, and the interface on the right side is the output interface). This ensures that the execution order between operators is always logical, and avoids errors caused by users forgetting to connect the logic interfaces when creating operators. For example, suppose that when a user creates a "data reading" operator and a "data processing" operator, by default, the output logic interface of the "data reading" operator will be automatically connected to the input logic interface of the "data processing" operator, thus ensuring that the data reading operation is completed before the data processing.
[0030] This default connection design can greatly simplify user operations, especially for non-programmers or novice users, and can significantly reduce errors that may occur during programming. For example, if the user accidentally omits the connection logic interface or connects in the wrong order, the program may not run due to the wrong execution order. By automatically completing this connection, users only need to focus on the function and data flow of the operator when creating an operator, without having to worry about the execution order between operators, which improves the ease of operation.
[0031] In addition, the default logical interface connection also helps improve development efficiency. Users can focus more on the function implementation and data processing of the operator itself without having to repeatedly check and adjust the connection relationship of each operator. For large projects or complex workflows, this automated operation method can significantly reduce development time and debugging costs.
[0032] You can use the mouse to map to different connection lines, and the mapped connection lines will be highlighted so that users can clearly observe the references and logical relationships between operators.
[0033] In an exemplary embodiment, the method of creating an operator on a canvas includes: in response to a double-click operation of a user, creating an operator on the canvas, and jumping to the area where the created operator is located, so that the created operator is displayed in the visible range of the canvas; or in response to a drag operation of a user, obtaining the X coordinate and Y coordinate of the position of the user's current mouse in the canvas, and creating the operator at the current position of the user's current mouse; after the user completes the drag operation, in response to the user's continuous double-click operation, creating multiple additional operators, and displaying the created additional operators in the visible range of the canvas, each additional operator is created near the operator created by the drag operation, and each newly created additional operator is offset by a predetermined offset relative to the X coordinate and Y coordinate of the last created operator; or in response to a user clicking an operation to create an operator control, creating an operator on the canvas, and jumping to the area where the created operator is located, so that the created operator is displayed in the visible range of the canvas.
[0034] When the user double-clicks any blank area on the canvas, the system will create a new operator on the canvas and automatically jump to the area where the operator is located to ensure that the operator is always visible. The purpose of this function is that regardless of whether the user's current view is in the center of the canvas, the system will adjust the view to bring the newly created operator into the visible range to prevent the operator from being blocked or out of the screen after creation, thereby affecting the user's operation. For example, if the user's current perspective is in the (200,200) area of the canvas, and the new operator is created at (0,0) by default when double-clicking, the system will automatically adjust the canvas to bring the (0,0) area into the user's field of view.
[0035] Dragging to create operators allows users to control the position of operators more accurately. In this mode, the system detects the X and Y coordinates of the user's current mouse and creates the operator at that coordinate when the mouse is released. This method is suitable for scenarios where operators need to be placed precisely. For example, when users want to keep a newly created operator in a specific relative position to an existing operator, the dragging method can provide greater flexibility.
[0036] In addition, to improve the smoothness of the operation, the system will record the coordinates of the user's most recent drag to create an operator. If the user double-clicks to create multiple operators after dragging and creating, these newly created operators will be automatically distributed near the operator initially created by dragging, and each newly created operator will be offset by a predetermined offset in the X and Y directions relative to the previously created operator. The purpose of this design is to prevent new operators from overlapping with existing operators and affecting recognition. For example, assuming that the user drags to create the first operator at position (100,100), and then double-clicks to create three additional operators, the system can place them in positions such as (120,120), (140,140), and (160,160) in turn, so that the operators are arranged relatively closely but not completely overlapped, which is convenient for subsequent adjustment and connection.
[0037] The method of clicking the Create Operator control is suitable for scenarios where users want to create operators directly through the menu bar or toolbar. When the user clicks the "Create Operator" control, the system will create a new operator on the canvas and automatically adjust the view to bring the new operator into the visible range. This method is suitable for situations where operators need to be created in batches but their specific initial positions are not important. The system can place the newly created operators at (0,0) or other default areas by default, and automatically adjust the canvas view so that users can immediately see the created operators to avoid operators being hidden or created at positions beyond the current field of view.
[0038] In an exemplary embodiment, the method further includes: detecting whether the currently created operator has input parameters, and if so, automatically creating the input interface of the operator and displaying it in the canvas; detecting whether the currently created operator has output parameters, and if so, automatically creating the output interface of the operator and displaying it in the canvas; wherein any created operator includes "run time" and / or "status" output interfaces.
[0039] When a user creates an operator, the system first checks whether the operator has defined input parameters. If the operator needs to receive data from other operators, the system automatically creates one or more input interfaces and displays these interfaces in the operator node on the canvas. For example, if a "data processing" operator needs to receive raw data from a "data reading" operator, the system will automatically detect its input parameters when creating the "data processing" operator and generate corresponding input interfaces for it, making the connection of subsequent data flows intuitive and operable.
[0040] Similarly, the system will also detect whether the operator has defined output parameters. If the operator has calculation, conversion or data transfer functions, it needs to output the processed data to the subsequent operator, and the system will automatically create an output interface for the operator. For example, if a "data calculation" operator generates calculation results, the system will generate a "calculation result" output interface for it when creating the operator, so that the subsequent operator can correctly receive the calculation results and continue the task process.
[0041] To ensure the traceability and debugging convenience of operators, the system adds "run time" and / or "status" output interfaces to all created operators by default. The "run time" interface is used to record the execution time of the operator, which is crucial for performance analysis and optimization. For example, it can help users determine whether a certain operator is a performance bottleneck in the process. The "status" interface is used to indicate the execution status of the operator, such as "disabled", "enabled", or "running", helping users quickly locate fault points in complex task processes and improve debugging efficiency.
[0042] In an exemplary embodiment, in response to an operation of creating or deleting the current operator interface, based on the specified interface type and interface name, it is detected whether the current operator has interface parameters that match the interface type and interface name. If so, the corresponding interface is created or deleted according to the interface type and interface name.
[0043] When a user creates a new interface, the system requires the user to explicitly specify the type (input interface or output interface) and name of the interface. For example, if a user wants to add a new input interface "filter parameter" to a data processing operator, the system will first detect the input parameter list of the operator to confirm whether there is an input parameter matching the name. If it exists, the input interface is created normally and displayed on the operator node on the canvas, so that the user can connect the interface with other operators; if it does not exist, it will not be created to ensure that the operator only supports the input parameters it actually needs and avoid the appearance of invalid interfaces. This mechanism not only ensures the integrity of the operator's input data, but also avoids unnecessary configuration errors.
[0044] Similarly, when a user deletes an interface, the system also requires the user to specify the interface type (input or output) and the name of the interface to be deleted. The system will detect whether the current operator has an interface of that name. If so, the interface will be deleted normally and the operator's interface display on the canvas will be updated. If the interface does not exist, the deletion operation will not be performed to prevent erroneous deletion or misoperation. For example, in a data conversion operator, if the user wants to delete the "formatting parameter" input interface, the system will first detect the current input interface list of the operator. If the "formatting parameter" interface is found to exist, it will be deleted, otherwise no changes will be made. This detection mechanism effectively prevents users from accidentally deleting key interfaces, causing the task process to fail.
[0045] To enhance the configurability of operators, the system allows users to modify the interface type and interface name of operators. When a user wants to modify an interface type, they need to provide the name of the current interface. The system will first detect whether the interface exists. If the interface exists, the system will further check whether the type of the current interface is the same as the type the user wants to modify. If the types are consistent, the system will perform the interface type modification operation; if the types are inconsistent, no changes will be made. Such a detection mechanism ensures that the operator's interface will not be mistakenly modified to an illogical data type.
[0046] Similarly, when the user wants to modify the interface name, he needs to provide the old name and new name of the current interface. The system will first check whether the interface with the old name exists. If it does, it will further check whether the new name has been used. If the new name already exists in the operator, the system will prompt the user that "the interface name already exists" to prevent conflicts caused by duplicate naming; if the new name has not been used, the system will perform the interface name modification operation and update the display name of the interface on the canvas interface.
[0047] S102: On the canvas, data reference relationships and logical connection relationships between operators are configured through visual connection lines to form a task flow.
[0048] Please refer to Figure 2 As shown in the figure, in graphical programming, the relationship between operators is represented by connecting lines, which not only reflect the direction of data flow, but also indicate the logical order of operator execution. In this way, users can intuitively depict complex program logic and data flow on the canvas.
[0049] Specifically, after adding multiple operators to the canvas, users need to configure the data flow and execution logic between operators through visual connection lines. Data flow connection is to connect the output interface of one operator with the input interface of another operator to determine the order of data transmission. Logical connection is to connect the logical interfaces of operators to ensure that the execution order of operators meets the requirements of business logic.
[0050] For example, suppose the user adds a "data reading" operator, a "data processing" operator, and a "data output" operator to the canvas. Through the connection line, the user can connect the output interface of "data reading" to the input interface of "data processing", and then connect the output interface of "data processing" to the input interface of "data output", thus defining the complete process from data reading to processing and then to output.
[0051] In order to make this process more intuitive and easy to operate, the system provides a graphical interface that allows users to connect by dragging, clicking, etc. For example, the user can click the connection point on an operator and then drag the mouse to the connection point of another operator to complete the connection. In this way, users can quickly create complex task flows and clearly see the relationship between operators, reducing the tedious code writing and debugging work in traditional programming.
[0052] The graphical connection method makes the overall structure of the program more transparent. Users can quickly understand the entire task process through the visual interface. Even users without a programming background can easily understand the program's operating logic. Moreover, the clear display of data reference relationships and logical connection relationships allows users to quickly locate problems. Especially when errors occur in the program, the data flow and logical order can be directly viewed through the visual interface, which facilitates debugging and optimization.
[0053] In an exemplary embodiment, after the data interfaces between operators are connected by connecting lines, it is detected whether the connection relationship of the connecting lines is abnormal.
[0054] Detecting whether the connection relationship of the connecting line is abnormal specifically includes: detecting whether there is an input interface connection or an output interface connection, and if so, prompting an error; and / or detecting whether there is a situation where the output interface of the same operator is connected to the input interface of the same operator, and if so, prompting an error; and / or detecting whether the output interface of the subsequent operator is connected to the input interface of the previous operator, and if so, prompting an error; and / or detecting whether the data interface types at both ends of the connecting line match, and if not, prompting an error; and / or detecting whether the current connection is a closed-loop connection, and if so, prompting an error; and / or detecting whether there is a cross-branch structure connection, and if so, prompting an error.
[0055] After the connection line is connected to the input or output interface of the operator, the system will immediately analyze and verify the connection to ensure that these connections comply with the preset rules. In this way, the system can detect possible incorrect connections in advance and provide timely feedback during the development process to help users correct errors and avoid problems such as logical confusion or data processing errors.
[0056] For example, the output interface for data reading should not be connected to another output interface, and the input interface for data processing should not be connected to the input interface of other operators. If the user mistakenly connects two output interfaces, or connects one input interface to another input interface, the system should be able to automatically detect this connection error and remind the user. This automatic detection mechanism can determine whether the connection complies with the rules by analyzing the operator interface type and connection method, and provide the user with an error prompt in real time.
[0057] When implementing this mechanism, the system will first determine whether the connection is reasonable by matching the interface type. For example, a data input interface can usually only be connected to a data output interface, and vice versa. The system will perform type matching on each connection, and if there is an unmatched interface connection, the user will be immediately reminded to make adjustments. In addition, the system can also check whether the order of operator connections is correct. For example, the input interface of a "calculation" operator must receive data only after the data is ready. Therefore, the system needs to ensure that the "calculation" operator will only receive the output of the "data reading" operator and the output results of operators of the same type, and will not be mistakenly connected to operators of other types.
[0058] The system will detect whether the output interface of the same operator is connected to the input interface of the same operator. In programming, the output interface of an operator should be connected to the input interface of other operators, rather than connected back to itself, because this will not only fail to transfer data, but also cause logical confusion in program execution. For example, if the user connects the output interface of a "calculate" operator back to the input interface of the operator, the system should be able to immediately detect this unreasonable connection and give an error prompt.
[0059] In graphical programming, the connection of operators usually follows the rule of "the first operator is executed first, and the second operator is executed later". If the user mistakenly connects the output interface of the second operator to the input interface of the first operator, this will cause the order of data flow to be disordered, thus affecting the execution of the entire task process. For example, if the user connects the output interface of a "result output" operator to the input interface of a "data reading" operator, this is obviously against the execution order. The system can identify and warn the user of such incorrect connections to prevent logical errors from causing the program to fail to work properly.
[0060] A closed-loop connection refers to a self-circulating structure formed by the data flow or logical connection between operators. This type of connection may cause the program to fail to terminate normally or cause a deadlock. In order to ensure the correct execution of the program, the system can detect the occurrence of closed-loop connections. The system can analyze the input and output paths of each operator through the connection relationship between operators represented in the graphical interface. Specifically, when the user connects operators through visual connection lines, the system can track the direction of each connection and the data flow. If the output interface of an operator is connected back to its input interface, or the output interface of operator A is connected to the input interface of operator B, and then from the output interface of operator B back to the input interface of operator A, a closed loop is formed, and the system will identify and prompt the user that a closed-loop connection exists.
[0061] A more complicated situation is that the connection order between operators may sometimes involve logic problems. For example, in a conditional judgment process, there may be multiple branches, each representing a different execution logic. In this case, the system must not only detect whether the interface type matches, but also determine whether the logical connection is reasonable to ensure that there are no errors when the data flow flows between different branches. For example, if the user mistakenly connects the output of a branch with other branches, causing the data of multiple branches to interfere with each other, the system needs to detect this in time and remind the user to make corrections.
[0062] In one embodiment, there is no problem with the connection order between operators, there is no problem with the type of connection, and the rules of the connection interface are completely in line with the program. After the operator connection is completed, if the type of the connection interface is modified by the front operator or the back operator, the system can automatically detect the aforementioned modification and prompt the user with the relevant connection line in the form of a dotted line, without actively disconnecting the connection line connected to the user.
[0063] In the traditional coding mode, programmers need to manually check the validity of each connection in the code, and any error may cause the program to crash or fail to execute. In the graphical programming mode, the automatic detection mechanism can check and feedback errors in real time, allowing developers to focus on the design of task processes without worrying about the correctness of the underlying connections. Especially in complex task processes, users may overlook certain details when programming through a graphical interface. Automatic detection can help them discover and correct these potential problems in a timely manner, thereby improving development efficiency.
[0064] In addition, automatic detection of connection anomalies can also avoid the impact of program errors on the entire task process to a certain extent. Without this mechanism, incorrect connections may cause the entire task process to fail to execute correctly, or the data flow may be chaotic, ultimately making the program unable to complete the intended function. By performing real-time detection after each connection, the probability of such errors can be greatly reduced, ensuring the smooth operation of the program.
[0065] In an exemplary embodiment, the data interface distinguishes data types through preset colors, and data interfaces with the same color indicate the same data type; if more than two colors appear in the data interface, it means that the data interface supports multiple data types, and the data types corresponding to the various colors are the data types supported by the data interface.
[0066] Each data interface in the graphical interface uses a preset color to represent its data type, helping users quickly identify and understand the relationship between different interfaces and data flow. Data interfaces of the same color represent the same data type. This design can effectively reduce errors caused by mismatched interface types in complex task processes, while enhancing the intuitiveness and interactivity of program design.
[0067] Specifically, each data type will correspond to a specific color in the interface. For example, an integer input and output interface may be represented by blue, a floating type interface may be represented by green, a string type may be represented by yellow, and a Boolean value may be represented by red. Through this color distinction, when connecting operators, users can intuitively judge whether the data type matches by color, avoiding the tedious process of checking data types one by one in traditional programming.
[0068] This color-coding method not only allows users to clearly identify the matching of interfaces when connecting operators, but also greatly improves operational efficiency. For non-professional programmers, the graphical interface itself has greatly lowered the threshold for programming, and the use of color to identify different data types further simplifies the difficulty of understanding and operation. Users do not need to constantly check the details of data types during programming, and color identification helps them quickly identify type matching.
[0069] When a data interface in an operator or task flow supports multiple data types, the system will distinguish these data types through different color labels. Each color corresponds to a data type, and users can quickly identify the data type that a data interface can receive or transmit by switching or combining colors. For example, if an operator's output interface can transmit both integer type data and string type data, the color of the interface may be composed of multiple color segments or gradient colors, indicating that the interface supports these two data types.
[0070] To achieve this function, the system can design a color coding rule, where each data type corresponds to one or more specific colors. When the developer connects an operator, the system automatically displays the corresponding color based on the operator's configuration. If the output data interface of an operator can support different data types (for example, integers, floating-point numbers, and Boolean values), the color of the interface will be a mixed color (such as a gradient color), which can be formed by the colors corresponding to different data types in a predetermined order (such as from left to right). This color coding method allows developers to more intuitively identify the data types supported by each data interface when making connections.
[0071] In an exemplary embodiment, in response to a user selecting reference information in an operator configuration interface, the data reference relationship of the current operator is configured; it is detected whether the data reference relationship is abnormal; if not, based on the data reference relationship, a visual connection line is generated to connect the data interface of the current operator and the referenced operator.
[0072] The system also provides an automatic connection method based on the reference dependency box, which is suitable for more complex task configuration requirements. In this way, users can select the required reference information in the operator configuration interface, that is, determine the output data of other operators to be referenced by the current operator. The system will automatically detect the validity of the referenced operator, and after confirmation, automatically establish a data interface connection through the operator delegation notification framework, and generate a visual connection line on the canvas. This method greatly improves the degree of automation of configuration, reduces the possibility of errors in manual connection by users, and ensures the correctness of data flow logic.
[0073] In order to ensure the accuracy of data interface configuration, the system will perform a series of checks when performing connection operations to prevent abnormal data reference relationships. For example, in the reference dependency mode, the system will first check whether the provided operator ID is valid to ensure that the referenced operator does exist, and further verify whether the operator is empty to avoid referencing invalid operators. In addition, the system will also check whether the operator has an available data interface, and whether the ID and interface of the currently connected operator match to prevent data flow errors caused by invalid connections. For example, if an operator attempts to connect to an operator that does not exist, or references an operator that does not contain a data output interface, the system will prompt the user with an "invalid reference" and prevent the occurrence of an incorrect connection.
[0074] After the data interface connection is completed, the system will perform further verification, including detecting whether it is a data interface connected to a data interface to avoid data flow connection errors; detecting whether the input interface is incorrectly connected to the input interface or the output interface is incorrectly connected to the output interface to ensure the correct direction of the data flow; detecting whether an attempt is made to incorrectly connect the data interface to the logical interface to prevent task logic confusion. In addition, the system will also detect whether the current connection operator has established the same connection to prevent execution errors caused by repeated connections.
[0075] For example, if the input interface of an operator is already connected to an output interface, the system will prevent users from creating the same connection again to avoid data flow anomalies. At the same time, the system will also detect whether the operator is in a locked state. If an operator is locked, its data interface will not be allowed to be modified to prevent users from making mistakes and causing unexpected changes to the task flow.
[0076] In actual applications, users can flexibly choose to manually drag and drop connections or reference dependency selection methods to adjust data flow configuration according to task complexity. For simpler tasks, you can use the drag and drop method to quickly complete the connection, while for complex data processing processes, the reference dependency method can reduce user operation steps and ensure the accuracy of data references.
[0077] S103: Execute the operators in the task flow, and display the execution status and data flow in the display interface.
[0078] By executing each operator in the task flow, the task is automatically processed, and the execution status and data flow are dynamically displayed through a graphical interface to enhance the user's perception of task progress and data flow. Through this design, users can not only intuitively view the execution status of the task, but also grasp the flow and processing status of the data in a timely manner, ensuring the smooth progress of the process and facilitating debugging and optimization.
[0079] In specific implementation, executing operators in a task flow may involve executing each operator in the canvas. After each operator is connected into a flow, it will be executed in a certain order according to the relationship between the set logic and data interface. For example, a user can define a task flow that includes three main operators: data input, data processing, and output. During execution, the system will run these operators in sequence according to the pre-configured logical order and pass data from one operator to the next.
[0080] To implement this step, the system needs an execution engine that can trigger the calculation and processing of each operator one by one in the specified order and display the results according to the operator and data flow relationship configured in the graphical interface. The execution of these operators may be synchronous or asynchronous, depending on the requirements of the task. The execution of operators is not only a process of data calculation, but also a process of data flow. During the execution process, the system will update the execution status of each operator in real time and feed these statuses back to the graphical interface, so that users can see whether each operator has been executed, whether the execution is successful or not, and the data in execution.
[0081] For example, in a task flow, suppose there is a data acquisition operator and a data processing operator. The data acquisition operator is responsible for acquiring data from external sources, while the data processing operator is responsible for computing and processing the acquired data. When the task is executed, the system first executes the data acquisition operator, and the acquired data will be displayed in real time on the interface, and the user can see the flow of acquired data. Next, the data will be passed to the data processing operator for processing. During the processing, the user can view the status update of the data in real time, and see the intermediate data flow and calculation results in the calculation process through the interface.
[0082] By dynamically presenting the execution status and data flow in the display interface, users can track the execution process of the entire task flow in real time. Users can not only understand the progress of the entire task in a timely manner, but also clearly see the flow of data between various operators through the graphical interface. This intuitive display method reduces the complexity of task execution, especially for non-professional users, which can help them easily understand the progress of the task flow and the status of the data.
[0083] Furthermore, the display of execution status and data flow can provide real-time feedback, which is helpful for task debugging and optimization. If an operator encounters an exception or error during execution, the system will warn the user through a graphical interface, showing the specific steps or data flow where the problem lies. This real-time feedback mechanism enables users to quickly discover and solve potential problems, thus avoiding the difficulty of debugging and locating problems in traditional programming.
[0084] This system provides two operation modes: Debug and Relsase. The default is Debug operation mode. Debug mode displays execution status and data flow, and can provide real-time feedback. In contrast, Relsase mode does not provide execution status and data flow display. Therefore, the execution speed of Relsase mode is faster than that of Debug mode.
[0085] In an exemplary embodiment, before executing the operator in the task flow, it is determined whether the operator has completed configuration; if the configuration is not completed, the execution will not be successful and a prompt message will be popped up to the user.
[0086] When a user creates a new operator in the graphical programming environment, each operator needs to perform a series of configurations. The configuration content includes but is not limited to: the selection of input data interface, the setting of output data interface, the execution logic configuration of the operator, etc. In order to ensure the correct execution of the operator, the system needs to determine whether these configuration items have been completed and meet the logical requirements. If the input and output interfaces of an operator are not correctly connected, or the execution logic configuration of the operator is conflicting or incomplete, the system will trigger the configuration check mechanism.
[0087] Before executing a task, the system will traverse all operators, check the configuration status of each operator, and confirm whether all configuration items of each operator have been completed and are correct. If it is found that the configuration of an operator is incomplete or there is a problem, the task cannot be executed successfully, and the error information will be fed back to the user in the form of a pop-up prompt box.
[0088] For example, in a graphical programming task flow, the user creates a data processing operator and a data output operator. If the user only configures the output interface of the data output operator but does not configure the input interface of the data processing operator, the system will automatically detect the missing input interface before executing the task and prevent the execution of the task flow. At this time, the system will prompt the user through a pop-up window that "the input interface of the data processing operator is not configured, please connect the input interface first", thereby effectively avoiding errors caused by the lack of necessary data input during the execution phase.
[0089] This checking mechanism can not only avoid interruptions or exceptions during the execution of operators due to missing configurations, but also prevent incorrect outputs of the entire task process due to incorrect configurations. For example, if the output interface of an operator is connected incorrectly or the data type does not match, continuing to execute the task may lead to incorrect execution of downstream operators or even cause the task to fail to complete. Therefore, the configuration check before execution ensures the coherence of the entire task process.
[0090] In an exemplary embodiment, before executing the operator in the task flow, it is determined whether the operator is in a disabled state; if it is in a disabled state, the current operator will not be executed, and the current operator will be skipped directly to execute the next operator; if it is in an enabled state, the current operator will be executed. In a specific implementation, each operator can have an enabled / disabled state attribute, which can be manually switched by the user or automatically set by the system according to certain conditions. During the task execution process, the system first checks the state flag of the operator before triggering the execution of the operator.
[0091] If the operator is in the enabled state, the system will load the input data of the operator normally, execute the operator according to the established logic, generate output data, and continue to execute the subsequent process. If the operator is in the disabled state, the system will not execute the internal logic of the operator, directly skip the operator, and continue to execute the next operator connected to its logic.
[0092] In an exemplary embodiment, executing the operators in the task flow includes: in response to an operation on a single execution control in a display interface, executing all operators in the task flow once; or in response to an operation on a cyclic execution control in a display interface, cyclically executing all operators in the task flow; or in response to an operation on the right button of a mouse, executing the operator currently mapped by the mouse; or in response to an operation on the right button of a mouse, executing the current flow when the mouse is not mapped with an operator; or in response to an operation on a trigger execution, using a trigger operator to execute a certain flow, and the executed flow must be set to passive execution; or in response to a trigger operation, triggering the execution of a certain operator or triggering a certain flow through an event manager of an HMI interface; or in response to an operation on the keyboard shortcut F10, executing operators individually in sequence according to the currently selected flow.
[0093] According to different user needs, the execution operation can be triggered in different ways, including responding to the operation of interface controls, mouse operations, etc. Specifically, the operators in the execution task flow can be started in the following ways: The first method is to execute all operators in the task flow through a single execution control. A single execution control can be a button or icon in the user interface. When the user clicks the control, the system will execute each operator in sequence according to the task flow configured by the user. This method is suitable for one-time task execution. For example, the user only needs to quickly execute the entire process and view the results after entering the data. For example, the user enters a set of data and configures the operator. After clicking the "Single Execution" button, the system will execute all operators in sequence and display the final processing results.
[0094] The second method is to repeatedly execute all operators in the task flow by operating the loop execution control. The loop execution control is a button or setting item that can set the number of loops or cycles. The user can start the loop execution of the task flow by operating the control, and the system will continue to repeat all operators until the user manually stops or reaches the set number of times / time. This method is suitable for tasks that need to be executed continuously, such as real-time data processing, repeated calculations, or dynamic monitoring. For example, in a graphical programming environment, if the user designs a data acquisition and processing task flow and hopes to automatically process new data input at regular intervals, then the loop execution control can be used to start the periodic execution of the task. Each time the loop is executed, the system will repeatedly execute the task flow according to the interval time set by the user until the stop condition is met. In this way, users can easily implement periodic task execution without manual intervention, greatly improving efficiency and automation.
[0095] The third way is to respond to the right-click operation of the mouse to execute the currently mapped operator. In a graphical programming environment, the user may want to execute only a specific operator instead of the entire task flow. In this case, the user can quickly select and execute a specific operator by right-clicking the mouse. Usually, the user can specify a specific right-click menu option for each operator, and when the user right-clicks an operator, the system will execute the operation of the operator. This method is suitable for the debugging and testing phase, and the user can quickly verify the function and output of a certain operator without executing the entire process. For example, in a data processing process, the user can right-click a data filtering operator and choose to execute the operator to view the results after data filtering without waiting for the entire process to be executed. This interactive method not only facilitates quick testing and debugging, but also provides users with more flexible control methods.
[0096] The fourth way is to respond to the right-click operation to execute the current process. When the user right-clicks the interface in the graphical programming environment, the system will first check whether the current mouse position is mapped to a specific operator. If the current mouse is not mapped to any operator, the system will execute all operators in the entire task flow by default without the user manually specifying or clicking on a specific operator.
[0097] The fifth method is to trigger the execution of a process in response to a trigger operator such as the running process, trigger, and merge process operator. When the trigger operator is executed, it triggers the execution of another bound process. The triggered process is set to passive execution, that is, the execution of the trigger operator itself does not directly affect the active execution of the current process, but starts another process through the trigger mechanism. This method is suitable for hierarchical processing scenarios, such as when two different functions are executed in different threads or in the same thread but not in the same process. This execution method can be used.
[0098] The sixth method is to respond to the event manager provided in the HMI designer and complete the execution by creating different controls to add event binding processes or bind an operator.
[0099] The seventh method is to respond to the keyboard shortcut F10 to execute the operators in the current task flow list. The single-step execution mode is used and the operation starts from the first operator in the current list. Each time the shortcut F10 is pressed, an operator is executed until all operators in the task flow list are executed, or the current list is reset, or the current operation is stopped. The single-step execution mode will not be stopped.
[0100] In an exemplary embodiment, please refer to Figure 3 As shown, the graphical programming method also includes: obtaining the referenced and referencing lists of the currently selected operator; traversing the reference lists of other operators in the entire task process, and if the selected operator is included, displaying the corresponding reference relationship in the display interface; by clicking on the reference relationship displayed in the display interface, jumping to the configuration interface of the relevant operator and the process interface to which the operator belongs.
[0101] Each operator may have some kind of dependency with other operators in the task flow, which is specifically manifested as data transfer or logic triggering. Therefore, an operator may be both a reference source and a referenced object of other operators. By obtaining the reference list and reference list of the currently selected operator, the system can identify the position and role of the current operator in the task flow. For example, in a data processing flow, a data screening operator may be referenced by multiple subsequent processing operators, and it itself may reference a data input source. By obtaining this information, the system can clearly identify the upstream and downstream relationships of the current operator and display relevant reference information to the user.
[0102] The system will traverse the reference list of other operators in the entire task process and check whether the selected operator is included. If so, the system will dynamically highlight or mark the reference relationships that include the currently selected operator in the reference list of the display interface. This visual display of reference relationships not only allows users to clearly see the dependencies between operators, but also helps users more easily identify and analyze the connections between different operators in complex task processes. This function can be used when the task process is long or the relationship between operators is complex. Users can intuitively view the impact range and association relationship of each operator through the visual interface, so as to locate problems more quickly.
[0103] Users can quickly jump to the configuration interface of the relevant operator and the process interface to which the operator belongs for detailed settings by clicking on the reference relationship displayed in the reference list of the display interface. This design allows users to interact with the operators in the task process directly on the interface without having to go through cumbersome steps or menu switching to find and modify the operator's configuration. When the user clicks on the reference relationship between an operator and the currently selected operator, the system automatically locates and opens the configuration interface of the operator, making it convenient for users to further configure or adjust it.
[0104] The visualization of reference relationships can help users clearly understand the role and interdependence of each operator in the task flow, allowing users to locate problems and optimize processes more efficiently when designing and debugging complex task flows. In addition, the jump function reduces the complexity of user operations, especially when the task flow is long or there are many operators. Users do not need to manually find the location and configuration interface of each operator. They can jump quickly by directly clicking on the reference relationship, which improves operational efficiency and user experience.
[0105] In an exemplary embodiment, the method of the present invention also includes: in response to the user's operation of locally persisting the configuration parameters, detecting whether the saving process of the task process is abnormal, and if not, persisting the configuration parameter information of the task process locally; or in response to the user's operation of importing local configuration parameters, detecting whether the import process of the local configuration parameters is abnormal, and if not, generating a corresponding task process based on the local configuration parameters.
[0106] In a zero-code programming environment, the configuration of task flows often needs to be frequently adjusted, stored, and reused. In order to improve the flexibility and maintainability of the system, this system provides a local persistence function that allows users to save the configuration information of task flows to local files and supports importing saved configuration files to quickly restore task flows.
[0107] During the local persistent storage process, the system will respond to the user's storage operation and perform a series of tests to ensure the stability of the saving process and the integrity of the file data. First, the system will check whether the storage path of the current project exists to ensure that the data can be correctly stored in the specified directory. Then, the system will determine whether the system is in a backup state. If the current system is performing an automatic backup task, it may affect the storage operation, so it is necessary to postpone the save or wait for the backup task to complete before performing the storage. In addition, the system will also detect whether the suffix format of the project file is a ".gsp" file to ensure that the stored data conforms to the expected format and prevent the user from misoperating and causing data incompatibility. Before storing the file, the system will further check whether the target file already exists. If the file already exists, it will perform a replacement operation; if the file does not exist, it will create a new file and write the configuration information. During the writing process, the system will detect whether the file header information is correct to ensure that the stored file format is complete, and check whether the configuration of key components such as the resource manager, main task designer, and HMI interface designer is successfully saved in turn, and finally confirm that there is no abnormality in the entire writing process.
[0108] When the user wants to import the task configuration stored locally, the system will also perform strict anomaly detection to ensure the integrity of the imported data structure and avoid configuration errors that cause the task process to fail. First, the system will check whether the file selected by the user is in the ".gsp" format to ensure that the imported data format is compatible with the system. Subsequently, the system will detect whether the folder structure of the imported project is complete to prevent the missing files from affecting the normal recovery of the task. Next, the system will verify the imported file format and confirm whether the header information of the project file meets the expected specific characters to prevent wrong files or damaged files from being loaded into the system. In order to avoid interfering with the user's current task operation during the file import process, the system will also automatically check whether various auxiliary windows are closed. If there are open windows, they will be closed first to ensure a smooth import process.
[0109] In addition, during the file import process, the system will verify whether there is an abnormality in the resource manager. If an error occurs in the resource manager during import, the entire import process will be terminated to avoid affecting the task flow. At the same time, the system will check whether the resource file of the resource manager is complete to ensure that all task-related dependent resources can be loaded correctly. In addition, the system will also monitor the import status of the main task designer, process designer, and HMI interface designer to ensure that all design modules can be restored smoothly. If the header characters of the imported HMI configuration file do not meet expectations, the system will prompt an import error to avoid abnormal interface component loading affecting task operations.
[0110] In summary, the graphical programming method provided by the present invention enables users to intuitively create and configure operators through a graphical interface, avoiding the complicated code writing and debugging process in traditional programming languages; through graphical representation, users can easily understand the relationship and data flow between various operators in the task process, reducing learning costs and operation difficulty.
[0111] Through the automated connection relationship detection mechanism, the rationality of the logical connection between operators is ensured. The system can detect and prompt users in real time the errors that may occur when connecting operators, such as incorrect connection of input and output interfaces, operator self-reference, improper connection relationship, etc., thereby effectively avoiding errors caused by operational errors and improving the accuracy of the development process.
[0112] By dynamically displaying the reference relationships of operators and providing a convenient jump function, users can quickly locate and modify problematic operators in the task flow. Especially when the task flow is complex, the visual display of the reference relationship and the click-to-jump function greatly improve the operational efficiency, avoid the tedious search process, and enable users to adjust and optimize the task flow more efficiently.
[0113] Please refer to Figure 4 As shown, based on the same inventive concept as the aforementioned graphical programming method, the present invention provides a graphical programming system 400 , which includes: a creation module 401 , a configuration module 402 and an execution module 403 .
[0114] The creation module 401 is used to create an operator on the canvas and display the operator in a graphical manner. The operator has a logic interface and a data interface. The logic interface is used to determine the execution logic between operators, and the data interface is used to transfer data between operators. When creating a new operator, the input logic interface of the new operator is connected to the output logic interface of the previous operator by default. The configuration module 402 is used to configure the data reference relationship and logical connection relationship between operators on the canvas through visual connection lines to form a task flow. The execution module 403 is used to execute the operators in the task flow and display the execution status and data flow in the display interface.
[0115] Among them, the creation module 401 creates an operator on the canvas in the following manner: in response to the user's dragging operation, obtain the X coordinate and Y coordinate of the user's current mouse position in the canvas, and create the operator at the current position of the user's current mouse; after the user completes the dragging operation, in response to the user's continuous double-clicking operation, create multiple additional operators, and display the created additional operators in the visible range of the canvas, each additional operator is created near the operator created by the dragging operation, and each newly created additional operator is offset by a predetermined offset relative to the X coordinate and Y coordinate of the last created operator.
[0116] Please refer to Figure 5 As shown, an embodiment of the present invention further provides an electronic device 500, which includes at least one processor 501, a memory 502 (such as a non-volatile memory), a memory 503, and a communication interface 504, and the at least one processor 501, the memory 502, the memory 503, and the communication interface 504 are connected together via an internal bus 505. The at least one processor 501 is used to call at least one program instruction stored or encoded in the memory 502, so that the at least one processor 501 performs various operations and functions of the graphical programming method described in various embodiments of this specification.
[0117] In the embodiments of the present specification, the electronic device 500 may include, but is not limited to, personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile electronic devices, smart phones, tablet computers, cellular phones, personal digital assistants (PDAs), handheld devices, messaging devices, wearable electronic devices, consumer electronic devices, and the like.
[0118] An embodiment of the present invention further provides a computer-readable medium carrying computer-executable instructions. When the computer-executable instructions are executed by a processor, they can be used to implement various operations and functions of the graphical programming method described in various embodiments of this specification.
[0119] The computer-readable medium in the present invention can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0120] In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0121] 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.
[0122] 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.
[0123] 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.
[0124] 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 graphical programming method, characterized in that: include: An operator is created on the canvas and displayed graphically. The operator has a logic interface and a data interface. The logic interface is used to determine the execution logic between operators, and the data interface is used to transfer data between operators. When a new operator is created, the input logic interface of the new operator is connected to the output logic interface of the previous operator by default. On the canvas, data reference relationships and logical connection relationships between operators are configured through visual connection lines to form a task flow; Execute the operators in the task flow and display the execution status and data flow in the display interface; The method of creating an operator on the canvas includes: in response to a user's dragging operation, obtaining the X coordinate and Y coordinate of the user's current mouse position in the canvas, and creating the operator at the current position of the user's current mouse; after the user completes the dragging operation, in response to the user's continuous double-clicking operation, creating multiple additional operators, and displaying the created additional operators within the visible range of the canvas, each additional operator is created near the operator created by the dragging operation, and each newly created additional operator is offset by a predetermined offset relative to the X coordinate and Y coordinate of the last created operator.
2. The graphical programming method according to claim 1, characterized in that: After the data interfaces between operators are connected through connecting lines, it is detected whether the connection relationship of the connecting lines is abnormal.
3. The graphical programming method according to claim 2, characterized in that: Detecting whether the connection relationship of the connecting line is abnormal includes: Check whether there is an input interface connection or an output interface connection, and if so, prompt an error; and / or Check whether the output interface of the same operator is connected to the input interface of the same operator. If so, an error message is displayed; and / or Check whether the output interface of the subsequent operator is connected to the input interface of the previous operator, and if so, prompt an error; and / or Check whether the data interface types at both ends of the connection line match. If they do not match, an error message will be displayed; and / or Check whether the current connection has a closed loop connection, and if so, prompt an error; and / or Check whether there is a cross-branch structure connection, such as the branch 2 operator connecting to the branch 1 operator. If so, an error message will be prompted.
4. The graphical programming method according to claim 1, characterized in that: The data interface distinguishes data types by preset colors, and data interfaces with the same color indicate the same data type; if more than two colors appear in the data interface, it means that the data interface supports multiple data types, and the data types corresponding to the various colors are the data types supported by the data interface.
5. The graphical programming method according to claim 1, characterized in that: Before executing the operator in the task flow, determine whether the operator has completed configuration; if the configuration is not completed, the execution will not succeed and a prompt message will be popped up to the user.
6. The graphical programming method according to claim 1, characterized in that: Executing the operators in the task flow includes: In response to an operation on a single execution control in the display interface, all operators in the task flow are executed once; or In response to an operation on a loop execution control in the display interface, loop execution of all operators in the task flow; or In response to an operation on the right button of the mouse, the operator currently mapped by the mouse is executed; or In response to an operation on the right button of the mouse, the current process is executed when the mouse is not mapped to an operator; or In response to the operation of triggering execution, a certain process is executed using the trigger operator, and the executed process is set to be executed passively; or In response to the trigger operation, the event manager of the HMI interface triggers the execution of a certain operator or a certain process; or In response to the operation of the keyboard shortcut F10, the operators are individually executed in sequence according to the currently selected process.
7. The graphical programming method according to claim 1, characterized in that: The graphical programming method also includes: Get the referenced and referenced lists of the currently selected operator; Traverse the reference list of other operators in the entire task process. If the selected operator is included, the corresponding reference relationship will be displayed in the display interface; By clicking the reference relationship displayed in the display interface, you can jump to the configuration interface of the relevant operator and the process interface to which the operator belongs.
8. The graphical programming method according to claim 1, characterized in that: There are two ways to create operators on the canvas: In response to a double-click operation by the user, an operator is created on the canvas, and the page is jumped to the area where the created operator is located, so that the created operator is displayed within the visible range of the canvas; or In response to the user clicking the operation of creating an operator control, an operator is created on the canvas, and the area where the created operator is located is jumped to make the created operator displayed in the visible range of the canvas.
9. The graphical programming method according to claim 1, characterized in that: The method further comprises: Check whether the currently created operator has input parameters. If so, the operator's input interface is automatically created and displayed in the canvas. Check whether the currently created operator has output parameters. If so, automatically create the output interface of the operator and display it on the canvas. Any created operator contains "runtime" and / or "status" output interfaces.
10. The graphical programming method according to claim 1, characterized in that: The method further comprises: In response to the operation of creating or deleting the current operator interface, based on the specified interface type and interface name, it is detected whether the current operator has interface parameters that match the interface type and interface name. If so, the corresponding interface is created or deleted according to the interface type and interface name.
11. The graphical programming method according to claim 1, characterized in that: The method further comprises: In response to the user selecting reference information in the operator configuration interface, configuring the data reference relationship of the current operator; It is detected whether the data reference relationship is abnormal. If not, a visual connection line is generated based on the data reference relationship to connect the data interface of the current operator and the referenced operator.
12. The graphical programming method according to claim 1, characterized in that: The method further comprises: In response to the user's operation of locally persisting the configuration parameters, detecting whether the saving process of the task process is abnormal, and if not, persisting the configuration parameter information of the task process to the local; or In response to the user's operation of importing local configuration parameters, it is detected whether the import process of the local configuration parameters is abnormal. If not, a corresponding task process is generated based on the local configuration parameters.
13. A graphical programming system, characterized in that: include: A creation module, used to create an operator on the canvas and display the operator in a graphical manner, wherein the operator has a logic interface and a data interface, wherein the logic interface is used to determine the execution logic between operators, and the data interface is used to transfer data between operators; wherein, when a new operator is created, the input logic interface of the new operator is connected to the output logic interface of the previous operator by default; A configuration module, used to configure the data reference relationship and logical connection relationship between operators on the canvas through visual connection lines to form a task flow; An execution module, used to execute the operators in the task flow and display the execution status and data flow in a display interface; Among them, the creation module creates an operator on the canvas in the following manner: in response to the user's dragging operation, obtain the X coordinate and Y coordinate of the user's current mouse position in the canvas, and create the operator at the current position of the user's current mouse; after the user completes the dragging operation, in response to the user's continuous double-clicking operation, create multiple additional operators, and display the created additional operators in the visible range of the canvas, each additional operator is created near the operator created by the dragging operation, and each newly created additional operator is offset by a predetermined offset relative to the X coordinate and Y coordinate of the last created operator.
Citation Information
Patent Citations
ETL process visualization method and device, equipment and storage medium
CN116226256A
Processing method and system based on low-code development platform UI interface operation
CN117827199A
Zero code development platform, development method, electronic equipment and medium
CN119473238A
Multi-person collaborative programming method and system, electronic equipment and medium
CN119645358A
Cited By
Configurable precise motion control method and device based on hardware and medium
CN120972777A
Visual data pipeline generation method and system
CN121680819A
A method and system for visualizing a data pipeline
CN121680819B