Editing method for variable in automated process and control method for automated process
By defining script information of variable assignment instructions in the process editing interface of the automated process, the problem of difficulty in obtaining and assigning complex variable values in the existing technology is solved, and flexible editing and efficient monitoring of the automated process is realized.
Patent Information
- Application Number
- PCT/CN2024/141086
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-22
- Filing Date
- 2024-12-20
- Publication Date
- 2025-06-26
AI Technical Summary
The prior art is difficult to quickly and flexibly obtain and assign the actual values of complex variables in automated processes, especially when logical or mathematical operations are required.
Provides a method of editing variables in an automated process. By displaying the process editing interface, users can define script information of variable assignment instructions at the script execution node, including the name of the target variable and the expression used to calculate the value of the target variable, and perform syntax checksum calculation verification.
It realizes personalized editing of the calculation methods of various expected variable values in the automation process, and flexibly defines the target variables and their calculation expressions without modifying the program code, which improves the monitoring efficiency and optimization management capabilities of the automation process.
Smart Images

Figure CN2024141086_26062025_PF_FP_ABST
Abstract
Description
Methods for editing variables in automated processes and methods for controlling automated processes
[0001] This application claims priority to the Chinese patent application with application number 202311790944.9 filed with the China Patent Office on December 22, 2023, and application name “Method for editing variables in an automated process and method for controlling an automated process”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of automation, and more specifically to a method for editing variables in an automation process, a method for controlling an automation process, a system for editing variables in an automation process, a control system for an automation process, an electronic device, and a storage medium. Background Art
[0003] In recent years, business processes and logic in the automation field have become increasingly complex. Fixed, single processes are difficult to meet the ever-changing needs of users and application scenarios. The ability to quickly and flexibly respond to changing business needs has become the core competitiveness of automation process control software.
[0004] For example, during the operation of an automated process, it is necessary to obtain the actual values of some variables in the process in real time, such as counting the number of actual cycle runs of a process, the actual duration of the main operations of certain equipment, etc., so as to facilitate the optimization and management of the automated process.
[0005] In existing technologies, obtaining the actual values of simple variables, such as the actual number of samples to be pipetted, is often done manually via a pop-up window or imported from a configuration file. However, because this method is embedded in the program, it is limited to obtaining the values of variables that require little computation. Complex variables that require logical or mathematical operations cannot be obtained in real time through the program. Summary of the Invention
[0006] In view of the above problems, the present application is proposed. According to a first aspect of the present application, a method for editing variables in an automated process is provided, comprising:
[0007] Displaying a process editing interface, wherein the process editing interface includes a flow chart of the automation process;
[0008] determining, based on operation information of a first operation of a user on a script execution node in the flowchart, script information of a variable assignment instruction executed at the script execution node, wherein the script information of the variable assignment instruction includes information about a name of a target variable to be assigned and an expression for calculating a value of the target variable; and
[0009] Stores script information for variable assignment instructions.
[0010] In a possible implementation, before storing the script information of the variable assignment instruction, the editing method further includes:
[0011] Verify the script information of the variable assignment instruction to determine whether the script information of the variable assignment instruction is reasonable;
[0012] The script information storing the variable assignment instruction is executed under the condition that the script information of the variable assignment instruction is determined to be reasonable.
[0013] In one possible implementation, verifying the script information of the variable assignment instruction includes:
[0014] Verify the syntax of the script information of the expression to determine whether the syntax of the script information of the expression is legal;
[0015] Evaluate expressions and validate the expressions to determine if they are reasonable; and
[0016] When it is determined that the syntax of the script information of the expression is legal and the expression is reasonable, it is determined that the script information of the variable assignment instruction is reasonable.
[0017] In a possible implementation, calculating the value of an expression and verifying the value of the expression are performed under the condition that the syntax of the script information of the expression is determined to be legal.
[0018] In one possible implementation, calculating the value of an expression and verifying the value of the expression include:
[0019] Calculate the value of the expression according to the default value of the associated variable of the target variable contained in the script information of the expression, wherein the associated variable of the target variable is the variable involved in the expression of the target variable;
[0020] Determine whether the type of the value of the calculated expression is consistent with the type of the target variable, and if so, determine that the expression is reasonable.
[0021] In a possible implementation, the editing method further includes:
[0022] In response to a second operation of the user on the process editing interface, determining definition information of each custom variable in the automated process, wherein the custom variables include a target variable; and
[0023] Store the definition information of each custom variable;
[0024] The definition information includes the name, type, and default value of the variable. The type of the variable is the numeric format of the value of the variable defined by the user.
[0025] In a possible implementation, the information about the name of the target variable to be assigned is the number corresponding to the name of the target variable, and the definition information further includes the number corresponding to the name of the variable and the correspondence between the name and the number;
[0026] Before verifying the script information of the variable assignment instruction, the editing method further includes:
[0027] Preprocessing the script information of the variable assignment instruction according to the corresponding relationship to replace the number of the target variable and the numbers of the associated variables of the target variable contained in the variable assignment instruction with the names of the respective variables;
[0028] Verify the script information of the variable assignment instruction, including:
[0029] The script information of the variable assignment instruction is verified using the name of the replaced variable.
[0030] In a possible implementation, the editing method further includes:
[0031] In response to a third user operation on the flowchart, a script execution node is added to the automation process.
[0032] In one possible implementation, determining script information of a variable assignment instruction executed at a script execution node based on operation information of a user on a script execution node in a flowchart includes:
[0033] In response to a first operation of the user on the script execution node, displaying a first variable editing interface, wherein the first variable editing interface includes an input text box;
[0034] receiving information of a name of a target variable input by a user using an input text box; and
[0035] An expression that receives the value of the target variable entered by the user using the input text box.
[0036] In one possible implementation, determining script information of a variable assignment instruction executed at a script execution node based on operation information of a user on a script execution node in a flowchart includes:
[0037] In response to a first operation of the user on the script execution node, displaying a second variable editing interface, wherein the second variable editing interface includes an instruction setting control corresponding to the variable assignment instruction; and
[0038] Based on the operation information of the fourth operation of the user on the instruction setting control, the script information of the variable assignment instruction executed at the script execution node is determined.
[0039] In a possible implementation, determining script information of a variable assignment instruction executed at a script execution node based on operation information of a fourth operation of a user on an instruction setting control includes:
[0040] In response to a fourth operation of the user on the instruction setting control, displaying a third variable editing interface, wherein the third variable editing interface includes a variable name selection control and an expression editing control;
[0041] In response to a fifth operation of the variable name selection control by the user, determining information on the name of the target variable; and
[0042] In response to a sixth operation of the expression editing control by the user, an expression for calculating the value of the target variable is determined.
[0043] In a possible implementation, the script execution node includes a first script execution node disposed before any device node in the automation process and / or a second script execution node disposed after the device node.
[0044] The variable assignment instruction executed at the first script execution node is executed before the main operation of the device is executed, and the variable assignment instruction executed at the second script execution node is executed after the main operation of the device is executed.
[0045] According to a second aspect of the present application, a method for controlling an automated process is further provided, comprising:
[0046] Before running the automation process, using the above-mentioned method for editing variables in the automation process, determine and store script information of the variable assignment instruction executed at the script execution node of the automation process;
[0047] During the execution of the automated process, when the script execution node containing the variable assignment instruction is reached, the stored script information of the variable assignment instruction is obtained, wherein the script information of the variable assignment instruction includes information about the name of the target variable to be assigned and an expression for calculating the value of the target variable;
[0048] Parsing the script information of the variable assignment instruction to determine the name and expression of the target variable; and
[0049] Assign a value to the target variable based on the target variable's name and expression.
[0050] According to a third aspect of the present application, a system for editing variables in an automated process is further provided, comprising:
[0051] A display module is used to display a process editing interface, wherein the process editing interface includes a flow chart of the automation process;
[0052] a determining module configured to determine, based on operation information of a first operation of a user on a script execution node in the flowchart, script information of a variable assignment instruction to be executed at the script execution node, wherein the script information of the variable assignment instruction includes information about a name of a target variable to be assigned and an expression for calculating a value of the target variable; and
[0053] Storage module, used to store script information of variable assignment instructions.
[0054] According to a fourth aspect of the present application, a control system for an automated process is further provided, comprising:
[0055] An editing module, used for determining and storing script information of variable assignment instructions executed at a script execution node of the automation process before running the automation process, using the above-mentioned method for editing variables in the automation process;
[0056] an acquisition module, configured to, during the execution of an automated process, acquire stored script information of a variable assignment instruction when the script execution node containing the variable assignment instruction is reached, wherein the script information of the variable assignment instruction includes information about the name of a target variable to be assigned and an expression for calculating the value of the target variable;
[0057] The determination module is used to parse the script information of the variable assignment instruction to determine the name and expression of the target variable; and the assignment module is used to assign a value to the target variable according to the name and expression of the target variable.
[0058] According to the fifth aspect of the present application, an electronic device is also provided, comprising a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used by the processor to execute the editing method of variables in the above-mentioned automation process and / or the control method of the above-mentioned automation process when the processor is running.
[0059] According to the sixth aspect of the present application, a storage medium is also provided, on which program instructions are stored. The program instructions are used to execute the editing method of variables in the above-mentioned automation process and / or the control method of the above-mentioned automation process during runtime.
[0060] According to the above solution, a process editing interface can be provided to the user. Through human-computer interaction between the user and the interface, script information for variable assignment instructions executed at the script execution node is determined and stored. Because this script information includes not only the name of the target variable to be assigned, but also the expression used to calculate the value of the target variable, personalized editing of the calculation method for the values of various variables to be assigned in the process is possible. This allows for flexible definition of target variables for desired assignments through simple operations without modifying the program code, and the expression used to calculate the target variable's value can be flexibly set. In this way, simply executing the script during the execution of the automated process can quickly and accurately assign values to multiple variables. This solution is applicable to various automated process usage scenarios, fully meeting the user's personalized data processing needs, more efficiently monitoring the automated process, and facilitating optimized management of the automated process. Furthermore, it provides a better user experience.
[0061] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The above and other purposes, features, and advantages of the present application will become more apparent through a more detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the drawings, the same reference numerals generally represent the same components or steps.
[0063] FIG1 is a schematic flow chart showing a method for editing variables in an automation process according to one embodiment of the present application;
[0064] FIG2 is a schematic diagram showing a portion of an automation process according to an embodiment of the present application;
[0065] FIG3 is a flowchart of a method for editing variables in an automated process according to another embodiment of the present application;
[0066] FIG4 shows a schematic flow chart of a method for controlling an automated process according to an embodiment of the present application;
[0067] FIG5 is a schematic block diagram of a system for editing variables in an automated process according to an embodiment of the present application.
[0068] FIG6 shows a schematic block diagram of a control system for an automated process according to an embodiment of the present application; and
[0069] FIG7 shows a schematic block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solutions and advantages of the present application more apparent, the following is a detailed description of example embodiments of the present application with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the example embodiments described herein. Based on the embodiments of the present application described in this application, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of this application.
[0071] To at least partially address the above technical issues, according to a first aspect of the present application, a method for editing variables in an automated process is provided. The editing method according to an embodiment of the present application can be applied to automated processes in various fields. For simplicity, the following explanation will be given using an automated process in an automated system in the field of biochemistry as an example.
[0072] Fig. 1 shows a schematic flow chart of a method 100 for editing variables in an automated process according to an embodiment of the present application. As shown in Fig. 1 , the editing method 100 may include steps S120, S140, and S170.
[0073] Step S120: Displaying a process editing interface, wherein the process editing interface includes a flow chart of the automation process.
[0074] According to an embodiment of the present application, before executing an automated process using the equipment of the automation system, the user can edit the automated process according to actual needs. For example, the user can use any suitable human-computer interaction device to edit the automated process. For example, the human-computer interaction device may include a control body and an input device and a display device connected to the control body. For example, the control body is a host, and the operating system of the host may be pre-installed with editing software for the automated process. For example, in response to the user's input operation using the input device, the display device may be used to display a process editing interface. The process editing interface may have any suitable display form, and this application does not limit it.
[0075] The process editing interface includes at least a flowchart. This flowchart can be a complete flowchart of the entire automation process or a partial flowchart. By way of example and not limitation, the process editing interface can display the complete flowchart of the entire automation process by default. The default flowchart can be enlarged or reduced, i.e., displayed in a magnified manner, in response to different user input operations. For example, after being magnified to a certain ratio, the flowchart displayed in the process editing interface can be a partial flowchart.
[0076] A flowchart may be a flowchart formed by connecting multiple nodes in a certain connection order. Each node may correspond to at least one task, and different nodes may correspond to different tasks. In addition, the multiple nodes may include different types of nodes, and different types of nodes may correspond to different types of tasks. For example, in the flowchart displayed in the process editing interface, different types of nodes may be displayed in different styles. For example, nodes may be represented by icons, and the shapes, fill colors, border colors, border thicknesses, and border sizes of icons of different types of nodes may be different.
[0077] According to an embodiment of the present application, the node types of the multiple nodes in the flowchart include at least device nodes and script execution nodes. Exemplarily, the multiple nodes in the flowchart may also include other node types such as consumable nodes and cycle nodes, which are not limited by the present application.
[0078] The tasks corresponding to each device node include the device operations performed at the node. Each device node corresponds to one or more devices. The devices corresponding to the device node include at least the main device. The device operations performed at the device node include at least the main operations performed by the main device. In some examples, the devices corresponding to the device node may also include auxiliary devices. The auxiliary devices are used to perform auxiliary operations, and the auxiliary operations include pre-operations performed before the main operation and / or post-operations performed after the main operation. The auxiliary devices may include transfer devices such as robotic arms, auxiliary main operation devices such as lid opening devices and lid closing devices, etc. It can be understood that the transfer device can transfer the consumables used to carry samples from the previous device node to the current device node, so that the main device of the current device node can operate on the samples carried by the consumables. The transfer device can also transfer consumables from the current device node to the next device node. In addition, each device node is associated with at least one consumable, and the consumables associated with different device nodes can be the same or different.
[0079] The task corresponding to each script execution node includes data processing instructions executed at the node. Each script execution node corresponds to at least one variable. The variable is a variable of data about the equipment operation in the automated process. These data can be various types of data, including but not limited to the time involved in the equipment operation, the number of samples or consumables, the number of executions of the equipment operation, etc., and this application does not limit them. The types of data processing instructions executed at the script execution node can include multiple types. The type of data processing instruction can include at least a variable assignment instruction. It is easy to understand that a variable assignment instruction is an instruction to assign a value to a defined variable. When executing the variable assignment instruction, the value of the defined variable can be determined according to the calculation method preset in the instruction script. In some other examples, the type of data processing instruction can also include other variable-related data processing instructions such as export variable instructions and modify variable instructions.
[0080] Each script execution node can be connected to a device node. The data processing instructions executed at the script execution node are related to the device operations involved in the connected device node. It can be understood that the device operations involved in the device node are device operations performed at the device node, which may include the main operation performed by the main device, and may also include the pre-operation and post-operation performed by the auxiliary device. Exemplarily, the variable corresponding to each script execution node can be a variable of the relevant data of the main operation involved in the device node connected to the node. For example, the variable can be a time variable such as the start time, end time, duration of the main operation involved in the connected device node, or it can be a quantitative variable such as the number of samples operated by the main operation.
[0081] According to an embodiment of the present application, the user can also set the execution order of tasks corresponding to each node of the automated process through the process editing interface. The flowchart of the automated process may also include lines connecting different nodes. The lines may include directed lines or undirected lines. The direction of the directed lines can indicate the execution order of tasks corresponding to different nodes. For example, the directed lines include arrows. The direction of the arrows can indicate the direction of process execution. For example, for two device nodes connected by a directed line, the device operations involving the front-end device node in the starting direction of the arrow are executed first, and the device operations involving the back-end node to which the arrow points are executed later. For example, for a script execution node and a device node connected by a directed line, if the script execution node is set before the device node, the data processing instruction (e.g., variable assignment instruction) corresponding to the script execution node is executed before the main operation corresponding to the device node. This can also be understood as the data processing instruction executed at the script execution node being executed before the main operation executed at the device node. If the script execution node is set after the device node, the data processing instruction (e.g., variable assignment instruction) corresponding to the script execution node is executed after the main operation corresponding to the device node. This can also be understood as the data processing instruction executed at the script execution node being executed later than the main operation executed at the device node. Therefore, expressions similar to "data processing instructions executed at the script execution node" herein can also be understood as "data processing instructions corresponding to the script execution node."
[0082] Exemplarily, the script execution node includes a first script execution node set before any device node in the automation process and / or a second script execution node set after the device node. The variable assignment instruction executed at the first script execution node is executed before the main operation of the device is executed, and the variable assignment instruction executed at the second script execution node is executed after the main operation of the device is executed. Reference is made to FIG2 . FIG2 shows a partial flow chart of an automation process according to an embodiment of the present application. As shown in FIG2 , the partial flow chart includes two device nodes and two script execution nodes. The display forms of the device nodes and the script execution nodes are different. The device nodes are represented by rounded rectangles filled with pure white, and the script execution nodes are represented by rectangular rectangles containing the "fx" icon. Furthermore, these four nodes are connected together by directed lines. The name of each node can be shown near the location of the node. Exemplarily, the name of the device node can be represented by the name of the device or the node number. For example, if the main device corresponding to "Device Node 1" in the figure is a film peeling machine, "Film Peeling Machine" can also be displayed directly near the location of the device node. As shown in FIG2 , the name of the script execution node can be represented by the node number. It can be understood that for the four nodes shown in the diagram, if the tasks corresponding to two script execution nodes both include variable assignment instructions, the tasks corresponding to these four nodes are arranged in the following order: variable assignment instructions for "Script Execution Node 1," main operation for "Device Node 1," variable assignment instructions for "Script Execution Node 2," and main operation for "Device Node 2." This facilitates the processing of data involved in the main operations executed by the primary devices, and improves the monitoring efficiency of the automated process.
[0083] For example, the process editing interface may further include a process editing control. The user may use the process editing control to edit the flowchart. The process editing control may include at least a node adding control.
[0084] In one example, the device nodes in the flowchart are pre-set, while the script execution node can be added by the user using the node addition control. Exemplarily, the editing method 100 further includes step S111. Step S111 adds a script execution node to the automated process in response to a third user operation on the flowchart. This third operation can be any suitable human-computer interaction operation. For example, the input device includes a mouse, and the process editing interface includes a script execution node addition control. Alternatively, the third operation can be a user dragging the script execution node addition control to the device node. Specifically, the flowchart can be displayed in the center of the interface, with menu bars containing script execution node addition controls on both the left and right sides of the flowchart. If the user wishes to add a script execution node before a device node, they can drag the script execution node addition control from the left menu bar to the right to the device node. If the user wishes to add a script execution node after a device node, they can drag the script execution node addition control from the right menu bar to the left to the device node. After the user completes the dragging operation, the script execution node is displayed before or after the device node in the flowchart. Alternatively, the third operation can also be the user double-clicking the script execution node to add a control using the mouse. For example, after the user double-clicks the script execution node to add a control, a floating "Script Execution Node 3" (not shown) can be displayed at any location in the flowchart shown in Figure 2. For example, the process editing interface can also include a line control. A new flowchart can also be displayed after receiving operation information indicating that the user has sequentially clicked the line control, "Device Node 2," and "Script Execution Node 3" using the mouse. In the new flowchart, "Device Node 2" is backward connected to "Script Execution Node 3." In other examples, script execution nodes can also be added to the flowchart based on the user's third operation using multiple input devices. By way of example and not limitation, after the user selects any device node using the mouse by single-clicking, a script execution node can be added before or after the device node using keyboard shortcuts. For example, after recognizing that the user has pressed the keyboard shortcut "shift" + "←," a script execution node can be added before the device node; and after recognizing that the user has pressed the keyboard shortcut "shift" + "→," a script execution node can be added after the device node. As a result, users can freely add script execution nodes through the process editing interface according to actual needs, and can add variable assignment instructions to any node in the automated process. In this way, when executing the automated process, the corresponding variable assignment instructions can be executed only when the corresponding node is executed. Therefore, in this solution, the timing of variable assignment can be freely set, which can fully meet the user's personalized needs, improve user experience, and more efficient monitoring of the automated process, facilitating the optimization and management of the automated process.
[0085] In another example, the device nodes and script execution nodes in the flowchart can be added by the user through the node addition control in the process editing interface. Any suitable method can be used to add device nodes, and this application does not limit it.
[0086] Step S140 , based on the user's operation information for the first operation on the script execution node in the flowchart, determines the script information of the variable assignment instruction executed at the script execution node. The script information of the variable assignment instruction includes information about the name of the target variable to be assigned and an expression for calculating the value of the target variable.
[0087] In this step, you can add a script with variable assignment instructions to the corresponding script execution node through human-computer interaction. In this way, during the execution of the automated process, when the script execution node is executed, the script with variable assignment instructions can be executed to assign values to the corresponding variables to be assigned.
[0088] The target variable is the variable involved in the variable assignment instruction among the variables corresponding to the current script execution node. In other words, the target variable is the variable to be assigned among the variables corresponding to the current script execution node. As mentioned above, the variable corresponding to each script execution node can be a variable of the relevant data of the main operation involved in the device node connected to the node. The variable can be a time variable such as the start time, end time, duration of the main operation involved in the connected device node, or it can be a quantitative variable such as the number of samples operated by the main operation. Referring again to Figure 2, take the example that the main device corresponding to "device node 2" is a pipetting workstation. The target variable in "script execution node 2" is, for example, the running time of the pipetting operation performed by the pipetting workstation. In this step, a variable assignment instruction for assigning a value to the variable representing the running time can be added to "script execution node 2" based on at least the user's operation information for the first operation of "script execution node 2", and the script information of the variable assignment instruction can be determined.
[0089] According to an embodiment of the present application, the script information of a variable assignment instruction includes at least information about the name of the target variable and an expression for calculating the value of the target variable. The information about the name of the target variable can be in any suitable form. Taking the example of "Script Execution Node 2" in Figure 2 where the target variable is the runtime of a pipetting operation, the name of the target variable can be represented by a string such as "runtime" or a number such as "0001." Of course, the name of the target variable can also be represented by other forms, as long as the information can distinguish the target variable from other variables. The expression used to calculate the value of the target variable can take various forms, such as an arithmetic expression, a comparison expression, a conditional expression, and a logical operation expression, and this application is not limited thereto. The following explanation will be expanded on the example of an arithmetic expression used to calculate the value of the target variable. It will be understood that an arithmetic expression can include constants, variables, functions, parentheses, operators, etc. Exemplarily, the expression used to calculate the value of the target variable includes at least one variable. Alternatively, the expression used to calculate the value of the target variable can include a unique variable. This unique variable can be the target variable itself or another variable. Alternatively, the expression used to calculate the value of the target variable can also include multiple variables. The variables included in the expression can be predefined variables preset by the system, or other custom variables customized by the user through human-computer interaction. For example, the predefined variables include a variable named "current time". It can be understood that when the expression of the target variable includes the variable "current time", when assigning a value to the target variable, the actual time at that moment can be directly obtained as the value of the variable "current time", and then the value of the target variable can be calculated. Custom variables are, for example, time variables with names such as "start time" and "end time", and numerical variables with names such as "number of runs" and "number of samples".
[0090] The first operation can be any suitable human-computer interaction operation, and this application does not limit it. The first operation can include one operation, or multiple operations performed in sequence. Similarly, taking the input device as a mouse as an example. By way of example and not limitation, the first operation can be an operation in which a user clicks on a script execution node with a mouse. In one example, the first operation can include a double-click operation in which a user double-clicks a script execution node with a mouse. After the user double-clicks the script execution node with a mouse, a new user interface can be displayed or a new window can pop up based on the current process editing interface.
[0091] Optionally, the new user interface or window can be a variable editing interface that directly allows the user to edit the script information of the variable assignment instruction. In other words, after the user performs the first operation on the script execution node, the variable editing interface for determining the script information of the variable assignment instruction can be directly displayed. For example, the variable editing interface can include an input text box or various suitable operation controls. Based on the user's operation information on the input text box and / or operation controls, the script information of the variable assignment instruction executed at the script execution node can be determined. Specifically, the variable editing interface can include a name script control. The name script control can be any suitable control such as an input text box or a drop-down selection box. The user can enter the name of a defined target variable by operating the input text box, or select the name of a defined target variable using the drop-down selection box. Optionally, the target variable can be predefined. In this step, the user can enter or select the name of a defined target variable. Alternatively, the target variable can be temporarily defined. For example, the variable editing interface can also include a variable definition control. After the user enters the name of the target variable to be defined, the variable definition control can be further operated. In response to the user's operation on the variable definition control, a variable definition interface may also pop up. The user may also use the various controls in the variable definition interface to define the target variable. Based on the user's operation, other definition information of the target variable may be determined. Other definition information of the target variable may include the type of the target variable and the default value of the target variable, the range, mode, upper limit, lower limit, etc. of the value of the target variable. An expression script control may also be included in the variable editing interface. For example, similar to the scheme for editing the name of the target variable, the expression script control may be an input text box for providing an input interface for an expression or a selection control for providing a selection interface for an expression. The expression of the value of the target variable may be determined based on the user's operation on the expression script control. For example, the user may directly enter an expression for calculating the value of the target variable in the input text box.
[0092] Alternatively, before displaying the above-mentioned variable editing interface, the instruction setting interface may be displayed first. The instruction setting interface may include an instruction type setting area. As mentioned above, there may be multiple types of data processing instructions, and the variable assignment instruction may be one of them. In this step, after the user performs the first operation on the script execution node, the instruction setting interface may be displayed first. Exemplarily, the instruction setting interface may include a plurality of instruction type selection controls, including a first instruction type selection control corresponding to the variable assignment instruction. The above-mentioned variable editing interface may be displayed in response to the user's selection operation on the first instruction type selection control. Furthermore, the name and expression of the target variable to be assigned, etc. may be determined based on the user's operation on the various controls in the variable editing interface.
[0093] In one example, the target variable to be assigned can be the number of samples to be pipetted. For example, the device corresponding to "Device Node 2" in Figure 2 can be a pipetting station. For example, before starting pipetting, the pipetting station needs to obtain the number of samples to be pipetted from the program. This number is the number of wells in the deep-well plate containing samples that enter the pipetting station. Specifically, the user can pre-define a variable named "Number of Samples Pipetted" in the program using process editing software and specify other target variable definition information. Furthermore, by interacting with the process editing interface, a script execution node can be added before the device node for the pipetting station in the flowchart, such as "Script Execution Node 2" in Figure 2. Then, the user can double-click "Script Execution Node 2" to display the instruction setup interface. The instruction setup interface can include selectors corresponding to various data processing instructions, including a first instruction type selector for variable assignment instructions. Double-clicking the first instruction type selector displays the variable editing interface. The variable editing interface can include a name script control. For example, the variable editing interface includes a name editing area and an expression editing area. The word "Name" appears in the name editing area, followed by a text box for input. The user can enter the name of the target variable, for example, "Number of Samples Pipetting." The word "Expression" appears in the expression editing area, followed by a text box for input. The user can enter an expression to calculate the value of "Number of Samples Pipetting." For example, "Deepwell Plate Sample Number Property" might be entered. It will be understood that "Deepwell Plate Sample Number Property" is the name of a predefined variable in the system. Through the above human-computer interaction, the script information for the variable assignment instruction for the target variable "Number of Samples Pipetting" can be determined. Thus, during the automated process, before the pipetting workstation performs the pipetting operation, the variable assignment instruction can be executed according to the script information of the variable assignment instruction, obtaining the number of samples in the deepwell plate and using it as the value of the target variable "Number of Samples Pipetting." For example, a command such as "Export Variable" can be used to write the value of "Number of Samples Pipetting" to a designated file, completing data interaction. In this way, the pipetting robot can obtain the number of samples to be pipetted from the specified file, so that the pipetting operation can be performed efficiently and accurately.
[0094] In another example, the target variable to be assigned a value could be the number of times a process loops. Similar to the above example, the user can pre-define a target variable named "Number of Runs" using the process editing software and determine other definition information for the target variable, such as setting its default initial value to 0. Then, upon receiving an operation message in which the user places the mouse cursor over a device node in the loop process (for example, "Device Node 1" in Figure 2) and right-clicks the mouse, a list control pops up. This list control includes a selection control named "Add Script Execution Node Forward" and a selection control named "Add Script Execution Node Backward." After the user clicks the "Add Script Execution Node Backward" selection control, a script execution node can be added after "Device Node 1" in the flow chart of Figure 2, such as "Script Execution Node 2" in Figure 2. After the user double-clicks "Script Execution Node 2" and then selects the first instruction type selection control in the instruction setting interface that appears, the variable editing interface is displayed. Similar to the above example, the variable editing interface can include a name editing area and an expression editing area. The word "Name" appears in the name edit area, followed by a text box for input. Users can enter the name of the target variable, such as "Number of Runs," in this text box. The word "Expression" appears in the expression edit area, followed by a text box for input. Users can enter an expression to calculate the value of "Number of Runs." For example, they could enter "Number of Runs + 1." Through this human-computer interaction, the script information for the variable assignment instruction for the target variable "Number of Runs" can be determined. Thus, during the execution of the automated process, each time the loop runs, after executing the device main operation corresponding to the device node, the variable assignment instruction for the target variable is executed according to the determined script information. This means that the target variable "Number of Runs" is incremented by 1 based on the value assigned to it in the previous loop. After the process completes, the current value of the variable "Number of Runs" can be viewed on the variable monitoring interface, indicating the number of times the loop has run.
[0095] In another example, the target variable to be assigned can be the start time of the main operation of the main device corresponding to a certain device node. Referring again to Figure 2, for example, the main device corresponding to "Device Node 1" is a film tearing machine. The variable assignment instruction can be used to count the start time of the film tearing machine's operation. Since the issuance of the film tearing machine's operation instruction requires time, that is, there is a communication delay. For example, the time between the start of the process control host computer issuing the operation instruction and the film tearing machine receiving the instruction is approximately 1 second, then the communication delay time is approximately 1 second. Therefore, the method of the above example can be used to pre-define a variable "communication delay" and determine other definition information of the variable, such as defining its type as duration and the default value as 1 second. At the same time, a target variable "film tearing start time" is defined, and its type is defined as time, with a default value of the current time. And based on the user's operation information on the process editing interface, a variable assignment instruction for the target variable "film tearing start time" can be added to the "pre-operation" of the film tearing machine, and the script information of the variable assignment instruction can be determined. For example, after the user places the mouse cursor at "Device Node 1" and right-clicks the mouse, and clicks the selection control named "Add Script Execution Node Forward" in the pop-up list control, "Script Execution Node 1" can be added to the flowchart. Then, after the user uses the mouse to double-click "Script Execution Node 1" and selects the first instruction type selection control in the instruction setting interface that is displayed, the variable editing interface is displayed. Then, the user can enter the name of the target variable "Film Tearing Start Time" in the input text box in the name editing area of the interface. And the expression "Current Time + Communication Delay" can be entered in the input text box in the expression editing area of the interface. "Current Time" can be a variable predefined by the system, which represents the actual time. "Communication Delay" is a variable pre-defined by the user. Through the above-mentioned human-computer interaction operation, the script information of the variable assignment instruction for the target variable "Film Tearing Start Time" can be determined. In this way, in the process of executing the automated process, before the film tearing instrument starts running, the variable assignment instruction can be executed according to the determined script information. Specifically, the expression "Current Time" + "Communication Delay" can be calculated and assigned to the "Film Tear Start Time" variable. Thus, after the process is completed, the user can view the current value of the variable "Film Tear Start Time" on the variable monitoring interface, which is the start time of the film tearing operation of the film tearing machine.
[0096] In another example, the variable to be assigned can be the running time of the main operation of a certain device that needs to be counted in the process. Take the running time of the main device "Pipette Workstation" corresponding to "Device Node 2" in Figure 2 as an example. The user can use the process editing software to pre-define multiple variables. The variables "Pipette Start Time" and "Pipette End Time" can be defined, and the type of these two variables can be determined to be time, with the default value being the current time. The variables "Pipette Run Time" and "Communication Delay" can also be defined, and the type of these two variables can be determined to be duration, with the default value being, for example, 0 seconds and 1 second. Then, through user interaction with the process editing interface, a script execution node can be added before and after "Device Node 2" in the flowchart of Figure 2, for example, "Script Execution Node 2" and "Script Execution Node 3" can be added in Figure 2. Then, on the one hand, after the user uses the mouse to double-click "Script Execution Node 2" and select the first instruction type selection control in the instruction setting interface that is displayed, the variable editing interface can be displayed. Furthermore, the user can enter the name "Pipeline Start Time" in the input text box in the Name Edit area of this interface to set the variable "Pipeline Start Time" as the target variable. Furthermore, the user can enter the expression "Current Time + Communication Delay" in the input text box in the Expression Edit area of this interface to use as the expression to calculate the value of the variable "Pipeline Start Time." Alternatively, the variable editing interface can be displayed after the user double-clicks "Script Execution Node 3" with the mouse and selects the first instruction type selection control in the instruction setting interface that appears. Furthermore, the user can enter the name "Pipeline End Time" in the input text box in the Name Edit area of this interface to set the variable "Pipeline End Time" as the target variable. Furthermore, the user can enter the expression "Current Time - Communication Delay" in the input text box in the Expression Edit area of this interface to use as the expression to calculate the value of the variable "Pipeline End Time." The variable editing interface can then be displayed again after the user double-clicks "Script Execution Node 3" with the mouse again and selects the first instruction type selection control in the instruction setting interface that appears. Furthermore, the user can enter the name "Pipetting Run Time" in the input text box in the name editing area of the interface to use the variable "Pipetting Run Time" as the target variable. And the expression "Pipetting End Time - Pipetting Start Time" can be entered in the input text box in the expression editing area of the interface as the expression for calculating the value of the variable "Pipetting Run Time". It can be understood that in this example, it is necessary to add a total of 3 variable assignment instructions for the 3 target variables in the two script execution nodes before and after the device node. Among them, 2 variable assignment instructions for the target variable "Pipetting End Time" and the target variable "Pipetting Run Time" need to be added in "Script Execution Node 3".It is understood that the variable assignment instruction for the target variable "pipetting run time" needs to be executed after the variable assignment instruction for the target variable "pipetting end time." Therefore, the execution order of the two variable assignment instructions can also be set using the process editing interface. For example, the instruction order setting interface can be displayed in response to the user's first operation on any script execution node. If each script execution node corresponds to multiple instructions, the execution order of the multiple instructions executed at that node can also be determined in response to an operation on the instruction order setting interface. For example, the instruction order setting interface may include multiple instruction controls arranged in sequence. The multiple instruction controls correspond one-to-one to the multiple data processing instructions executed at that node. The name of each instruction control may include the type of the corresponding data processing instruction, the target variable name, and the expression. The user can sort the individual data processing instructions by dragging the individual instruction controls. For example, the user can drag the instruction control for the variable assignment instruction corresponding to the target variable "pipetting end time" before the instruction control for the variable assignment instruction corresponding to the target variable "pipetting run time." In this way, during the execution of an automated process, before the pipetting robot begins running, the value of the assignment expression "Current Time + Communication Delay" can be calculated and assigned to the "Pipetting Start Time" variable. When the pipetting robot ends running, the value of the assignment expression "Current Time - Communication Delay" can be calculated and assigned to the "Pipetting End Time" variable. Then, the value of the expression "Pipetting End Time - Pipetting Start Time" is calculated and assigned to the "Pipetting Run Duration" variable. Furthermore, after the process ends, the current value of the "Pipetting Run Duration" variable can be viewed on the variable monitoring interface, which is the running time of the pipetting robot.
[0097] Step S170: storing script information of the variable assignment instruction.
[0098] According to an embodiment of the present application, after determining the script information of the variable assignment instruction, the interface can be called to save the script into a preset database based on a preset condition. The preset condition can be any condition indicating that the script editing of the variable assignment instruction is successful. In one example, the preset condition can be a condition for receiving a "save instruction script" instruction from the user. In this example, after the script information of the variable assignment instruction is successfully stored, a prompt message "Storage successful" can be displayed on the interface. In another example, the preset condition can also be a condition for successful script verification of the current variable assignment instruction. In other words, before storing the script information of the current variable assignment instruction, a verification operation of the script information of the instruction can also be performed. If the verification is successful, the script storage operation of step S170 is performed; if the verification is unsuccessful, step S170 is not performed.
[0099] It is understandable that for automated processes in the prior art, if the values of certain "variables" in the process are to be changed during operation, they are usually imported from a configuration file or the user manually enters the corresponding values through a pop-up window. In this solution, the variable assignment logic must be hard-coded into the program in advance, and its execution timing is fixed. The variable name, the method of calculating the variable value, etc. are all hard-coded and cannot be changed after the program is compiled. If adjustments are required, professionals are required to modify the code, resulting in extremely poor operability. Moreover, the variable assignment logic in this solution can only assign variables simple fixed values and cannot support expression calculation.
[0100] According to the variable editing method in the above-mentioned automated process of the embodiment of the present application, a process editing interface can be provided for the user, and through the human-computer interaction between the user and the interface, the script information of the variable assignment instruction executed at the script execution node is determined and stored. Since these script information includes not only the name of the target variable to be assigned, but also the expression for calculating the value of the target variable, personalized editing of the calculation method of the value of the various variables expected to be assigned in the process is achieved. Therefore, the target variable for the expected assignment can be flexibly defined through simple operations without modifying the program code, and the expression for calculating the value of the target variable can be flexibly set. In this way, as long as the script is executed in the execution of the automated process, the assignment of multiple variables can be quickly and accurately achieved. This solution can be applied to the use scenarios of various automated processes, thereby fully meeting the user's personalized data processing needs, more efficient monitoring of the automated process, and convenient optimization management of the automated process. In addition, the user experience is also better.
[0101] Exemplarily, the editing method 100 further includes step S112 and step S113.
[0102] Step S112: In response to the user's second operation on the process editing interface, the definition information of each custom variable in the automated process is determined. Custom variables include target variables. Exemplarily, in addition to the process editing interface, the process editing interface may also include a variable definition area. The variable definition area may include settings controls for each variable's definition information. These settings controls may be any suitable controls, including but not limited to various selection controls and input controls. For example, the variable definition area in the process editing interface may be a variable list, with each row corresponding to a variable and each column corresponding to a type of definition information. The definition information includes the variable's name, type, and default value. The variable type is the numeric format of the variable's value defined by the user. For example, each row of the list may include a name input text box, a type selector control, and a default value input text box. In this step, the user may enter the name of the variable to be defined in the name input text box, the type of the variable selected by the user in the type selector control, and the default initial value of the variable entered in the default value input text box. Exemplarily, the variable name may consist of one or more characters, such as numbers, letters, and special symbols. The variable type may include numeric, text, date, time, duration, and the like. The default value of a variable can be any suitable fixed value of the corresponding type. The default value can be used as the initial value of the variable. For example, a user can define the variable "pipetting start time" and the variable "pipetting end time" through the process editing interface, and can determine that the type of these two variables is time type, and can set their default values to any time. For example, the default value can be set to the actual time when the variable is defined (for example, 12:00:00). In some examples, the definition information of the custom variable may also include other information. For example, it may also include the variable number corresponding to the variable name and the correspondence between the variable name and the variable number. According to an embodiment of the present application, the variable number may be automatically generated according to a preset rule, or it may be randomly generated, or it may be set by the user using an input device for a text box or operation control in the variable editing interface. This application does not limit it, as long as the uniqueness of the number of each target variable is guaranteed.
[0103] It can be understood that since the variable type can be freely set through the human-computer interaction of the user and the interface, it can support a variety of variable assignment types such as integer, floating point, Boolean, etc. Therefore, it also supports multiple types of variable expressions, not only supporting complex calculation methods, but also the final calculation result of the expression has the advantage of variable type. For example, it supports time-related variable expressions, and the supported type operations include: time-time = duration, date-date = duration, duration + duration = duration and its inverse operation, etc. In addition, taking time-related variable expressions as an example, since the variables involved in time-related expressions can be changed, different types of variables can be flexibly selected for operation, which also makes the final calculation result of the expression have the advantage of variable type. For example, the calculation result of time-related expressions supports three types: date, time, and duration.
[0104] Step S113: Storing the definition information of each custom variable. For example, after receiving the definition information of each custom variable in the automation process from the user, the definition information of these variables can be stored in the variable database to facilitate the subsequent verification or assignment of the definition information of these variables.
[0105] It can be understood that for the solutions in the prior art, the calculation method of the variable to be assigned, the type of the variable value, and the default value cannot be changed, and it usually only supports the setting of one type corresponding to one value. In the above-mentioned solution of the embodiment of the present application, the process editing interface can provide the user with an interface for defining information such as the name, type, and default value of the custom variable, so that the user can not only customize the name of the variable, but also freely set the type and default value of the variable. In other words, the variable assignment instruction can be flexibly edited from multiple dimensions, and different types of variables and different types of expressions can be flexibly selected. Therefore, it has the advantages of variable assignment type and support for complex calculation methods. Thus, various types of data in the automated process can be obtained accurately and efficiently, and the management efficiency of the automated process is higher.
[0106] Exemplarily, step S140 determines script information of a variable assignment instruction executed at the script execution node based on operation information of a user's first operation on the script execution node in the flowchart, and includes steps S141 , S142 and S143 .
[0107] In step S141, in response to a user's first operation on a script execution node, a first variable editing interface is displayed. The first variable editing interface includes an input text box. In step S142, the user enters the name of a target variable in the input text box. In step S143, the user enters an expression for calculating the value of the target variable in the input text box.
[0108] As previously mentioned, the first operation can be any suitable operation performed by a user on a script execution node using any suitable input device, and this application is not limited thereto. For example, the first operation can be a single-click or double-click operation on the script execution node using a mouse. After recognizing that the user has performed the first operation using an input device, a first variable editing interface can be directly displayed on a display device, such as a display screen. This variable editing interface can be a script editing interface for variable assignment instructions for the current target variable. This interface can include a variable name editing area and an expression editing area. For example, the word "Name" can be displayed in the variable name editing area, and a text box can be provided after "Name" for input. The user can enter the name of the target variable to be assigned in the text box using an input device such as a mouse or keyboard. For example, the words "Please enter expression" can be displayed in the expression editing area, and another text box can be displayed after "Please enter expression". The user can place the mouse cursor in the text box for input and enter the expression for the current target variable using an input device such as a keyboard.
[0109] In one example, after the above-mentioned operation of the user is recognized, the name and expression of the target variable input by the user may be received and stored as script information of a variable assignment instruction for the target variable.
[0110] In another example, the script information for the variable assignment instruction for the target variable can be determined based on the name of the target variable entered by the user and the definition information of each variable stored in step S113. The target variable number can be determined as the target variable name information based on the correspondence between the target variable name, the variable names, and the variable numbers of each variable stored in step S113. Furthermore, the numbers of each variable included in the target variable expression can be determined based on the correspondence between the names of each variable included in the target variable expression, the variable names, and the numbers stored in step S113, and the names of the variables in the expression can be replaced with numbers. In other words, in the script information for the determined variable assignment instruction, the target variable name information and the names of each variable included in the expression can both be represented by unique numbers. It will be understood that, for any variable, once defined, the variable number can be fixed and unique. The variable name can be modified by the user at any time. Thus, even if the user modifies the variable name after editing the script, the corresponding variable can still be found by the variable number when the script is executed.
[0111] In this solution, after the user operates the script execution node of the flowchart, the variable editing interface can be directly displayed, and the input text box in the interface can provide the user with an input interface for freely entering the target variable name and the expression for calculating the value of the target variable, so that the script information of the variable assignment instruction that better meets the user's needs can be determined more accurately.
[0112] Exemplarily, step S140 determines script information of a variable assignment instruction executed at the script execution node based on operation information of a user's first operation on the script execution node in the flowchart, and includes steps S144 and S145.
[0113] In step S144, in response to the user's first operation on the script execution node, a second variable editing interface is displayed. The second variable editing interface includes an instruction setting control. In step S145, based on the user's fourth operation on the instruction setting control, script information for the variable assignment instruction executed at the script execution node is determined.
[0114] The first operation may be the first operation in step S141 described above, and will not be further described here. Unlike step S141 described above, in step S144, the second variable editing interface displayed in response to the user's first operation may be the instruction setting interface described in the aforementioned example. Exemplarily, the instruction setting interface may include multiple instruction setting controls, including at least one instruction setting control corresponding to a variable assignment instruction. In one specific example, the second variable editing interface includes an instruction type setting area. The instruction type setting area includes multiple instruction type selection controls. Each instruction type selection control corresponds to a type of data processing instruction, including a first instruction type selection control corresponding to a variable assignment instruction. Optionally, in step S145, after the user clicks the first instruction type selection control using an input device such as a mouse, a variable editing interface corresponding to the variable assignment instruction may be displayed. This interface, i.e., an interface providing the user with an input interface and / or an operation interface for setting the target variable name and expression, may be displayed. Through the user's interaction with the variable editing interface described in the aforementioned example, script information for the current variable assignment instruction is determined, including the name of the target variable and the expression used to calculate the target variable's value. Alternatively, in addition to the above-mentioned instruction type setting area, the second variable editing interface may also include a variable editing area. An input text box and / or operation control are displayed in the variable editing area to directly provide the user with an input interface and / or operation interface for setting the name and expression of the target variable. In this way, the user can use the mouse to click the first instruction type selection control, and use the mouse and keyboard to operate the input text box and / or operation control in the variable editing area to determine the script information of the variable assignment instruction executed at the current script execution node. In addition, in some examples, the second variable editing interface may also include an instruction sequence editing area. The instruction sequence editing area may also include instruction setting controls such as instruction sequence editing controls. In this way, if multiple data processing instructions are set at the current script execution node, the user can also use the instruction sequence editing controls to set the order of these data processing instructions. For example, the current script execution node may include variable assignment instructions for multiple target variables. In this step, the order of these variable assignment instructions can also be set using these instruction sequence editing controls in the second variable editing interface.
[0115] In the above solution, after the user operates the script execution node in the flowchart, a variable editing interface including an instruction setting control for the corresponding variable assignment instruction is displayed. After the user operates the instruction setting control, the script information of the variable assignment instruction can be determined. In this way, the user's setting intention can be obtained more accurately, and the script information of the variable assignment instruction determined is also more accurate. This human-computer interaction solution is more reasonable and applicable to a wider range of scenarios.
[0116] Exemplarily, step S145 determines the script information of the variable assignment instruction executed at the script execution node based on the operation information of the fourth operation of the user on the instruction setting control, including steps S145a, S145b, and S145c. Step S145a, in response to the fourth operation of the user on the instruction setting control, displays the third variable editing interface. The third variable editing interface includes a variable name selection control and an expression editing control. Step S145b, in response to the fifth operation of the user on the variable name selection control, determines the name information of the target variable. Step S145c, in response to the sixth operation of the user on the expression editing control, determines the expression used to calculate the value of the target variable.
[0117] The third variable editing interface can function similarly to the first variable editing interface displayed in step S141. Unlike the first variable editing interface, the third variable editing interface also provides a variable name selection control and an expression editing control. Both the variable name selection control and the expression editing control can be any suitable control, including but not limited to buttons, radio buttons, check boxes, sliders, etc., as long as they provide an interface for selecting variables and editing expressions. In a specific example, the third variable editing interface may include a variable name selection area and an expression editing area. For example, the variable name selection area may display the word "Name," followed by a variable drop-down list box. The variable drop-down list box displays multiple selection controls corresponding to the names of defined variables. In step S145b, the fifth operation may include an operation in which the user uses the mouse to select the name of the target variable to be assigned a value from the variable drop-down list box. For example, the expression editing area may display the words "Please select an expression," followed by multiple expression editing controls. The following uses the example of setting an arithmetic expression for illustration. For example, multiple expression editing controls may include a variable drop-down list box, an operator drop-down list box, and a value drop-down list box. Each drop-down list box displays multiple selection controls. For example, the variable drop-down list box displays multiple selection controls corresponding to the names of each defined variable, the operator drop-down list box displays selection controls corresponding to various operators, and the value drop-down list box displays multiple selection controls corresponding to each value. In step S145b, the sixth operation may at least include the user operating these drop-down list boxes and the selection controls therein using an input device such as a mouse. Exemplarily, the expression editing area may also include an expression text box. When the user places the mouse cursor in the text box, the expression consisting of the various items selected by the user (variable name, operator symbol, value, etc. selected by the user) is displayed in the text box based on the user's operation of the above-mentioned expression editing control using the mouse. Exemplarily, an "OK" button may also be included after the expression text box. The expression may be received in response to the user clicking the "OK" button using the mouse.
[0118] In this solution, after the user operates the instruction setting control corresponding to the variable assignment instruction in the second variable editing interface, a third variable editing interface including a variable name selection control and an expression editing control can be displayed. Based on the user's operation on these two controls, the name of the target variable and the expression used to calculate the value of the target variable can be determined. This human-computer interaction solution can not only accurately obtain the user's intention to add a variable assignment instruction to the current script execution node, but also accurately determine the target variable to be assigned and the expression used to calculate the value of the target variable. More importantly, this human-computer interaction solution is more reasonable, can significantly reduce the user's operating difficulty, and save the user the time cost of setting up the script. This makes human-computer interaction more efficient, and can reduce input errors and the user's learning difficulty. The user experience is better.
[0119] Exemplarily, before storing the script information of the variable assignment instruction in step S170 , the editing method 100 further includes step S160 .
[0120] Step S160: Verify the script information of the variable assignment instruction to determine whether the script information of the variable assignment instruction is reasonable. Storing the script information of the variable assignment instruction is performed under the condition that the script information of the variable assignment instruction is determined to be reasonable.
[0121] This step can use any suitable script information verification logic to verify the script information of the determined variable assignment instruction. In one example, the existence of the target variable can be verified based on the name of the target variable to determine whether the script information of the variable assignment instruction is reasonable. In another example, the expression script used to calculate the value of the target variable can also be syntax-checked, and the rationality of the script information of the variable assignment instruction can be determined based on the syntax verification result. In yet another example, the calculated value of the expression can also be obtained by a suitable method, and the rationality of the script information of the variable assignment instruction can be determined based on the type of the calculated value.
[0122] The above solution can ensure the validity of the script information of the stored variable assignment instructions to avoid unnecessary memory usage, thereby improving the effectiveness of data acquisition in the automation process.
[0123] For example, the information about the name of the target variable to be assigned is the number corresponding to the name of the target variable. The definition information also includes the number corresponding to the name of the variable and the corresponding relationship between the name and the number.
[0124] As previously described, users can use input devices to operate text boxes and / or operation controls in the process editing interface and variable editing interface to add variable assignment instructions for target edges at the script execution node in the process, and can also set the name and expression of the target variable. The original script information for the variable assignment instructions set by the user is pre-stored in the database. Specifically, in the pre-stored script information for each variable assignment instruction, the name of the target variable can be the unique number of the variable. In other words, the name of the target variable can be pre-stored as the unique number of the variable. For each variable assignment instruction, the pre-stored target variable number can be automatically generated according to preset rules, randomly generated, or set by the user in the variable editing interface using the input device. This is not limited to this, as long as different target variables have different numbers. It is understood that the correspondence between variable names and variable numbers can be a one-to-one correspondence or a one-to-many correspondence. For two variable assignment instructions executed at two different script execution nodes, the target variable names can be the same, but the numbers must be different. In other words, the name of each variable may not be unique, but its number is unique.
[0125] Before verifying the script information of the variable assignment instruction in step S160, the editing method 100 further includes step S150. In step S150, the script information of the variable assignment instruction is preprocessed based on the corresponding relationship to replace the target variable number and the numbers of the associated variables of the target variable contained in the variable assignment instruction with the names of the respective variables.
[0126] As previously described, in the script information of the variable assignment instruction determined in step S140, the target variable name information and the names of the various variables included in the expression can be represented by unique numbers. To ensure smooth and efficient execution of the verification step of the variable assignment instruction script information, in this step, the target variable number in the script information of the variable assignment instruction and the numbers of the associated variables of the target variable included in the variable assignment instruction can be replaced with the names of the respective variables, based on the correspondence between the variable names and numbers determined in step S113.
[0127] The associated variables of the target variable can be all the variables involved in the variable assignment instruction. For example, in the aforementioned example, the variable assignment instruction for the target variable "pipetting operation duration" is added to the "script execution node 3" after the device node corresponding to the pipetting workstation, and the expression of the target variable "pipetting operation duration" is "pipetting end time-pipetting start time". For this example, the associated variables of the target variable "pipetting operation duration" are the variable "pipetting end time" and the variable "pipetting start time". Therefore, in step S150, the number of the target variable "pipetting operation duration" contained in the variable assignment instruction can be replaced with its name "pipetting operation duration", the number of the variable "pipetting end time" involved in the expression can be replaced with its name "pipetting end time", and the number of the variable "pipetting start time" involved in the expression can be replaced with its name "pipetting start time".
[0128] As mentioned above, the variable name information stored in the script information of the pre-stored variable assignment instruction is the unique number of the variable, rather than directly storing the variable name. In this way, it can deal with the situation where the user modifies the name of the variable after writing the script, causing the name in the script to be different from the variable name. This solution allows the user to modify the name in the variable definition after writing the script. Since the variable name is stored as the unique number of the variable in the original script information of the pre-stored variable assignment instruction, when performing script verification, the variable assignment script passed in by the front end needs to be preprocessed, that is, the unique number of the variable in the script is replaced with the name of the variable to which it corresponds, and then the verification of the script information is performed.
[0129] Step S160 verifies the script information of the variable assignment instruction, including step S160a. Step S160a verifies the script information of the variable assignment instruction using the replaced variable name. For example, based on the replaced variable name in the script information of the variable assignment instruction, definition information of the target variable and an expression for calculating the value of the target variable can be obtained, and definition information of associated variables of the target variable can also be obtained.
[0130] In this way, it is convenient to verify the script information of the variable assignment instruction based on this information, thereby improving the efficiency and accuracy of the script information verification.
[0131] Exemplarily, in step S170, the script information of the variable assignment instruction can be stored when the script information of the variable assignment instruction is successfully verified, that is, when the script information of the variable assignment instruction is determined to be reasonable. In the stored script information, the information of the name of the target variable can be the unique number of the variable, that is, the name of the target variable can be pre-stored as the unique number of the variable. It can be understood that using the variable number to represent the name when storing the script information of the variable assignment instruction can not only cope with the situation where the user modifies the name in the variable definition after writing the script, and facilitates finding the corresponding variable according to the stored unique number in the subsequent script, but also can reduce memory usage and improve the efficiency of executing the script, so that the target variable can be assigned quickly and accurately during the execution of the automation process.
[0132] Exemplarily, step S160 verifies the script information of the variable assignment instruction, including step S161, step S162 and step S163.
[0133] Step S161 , verifying the syntax of the script information of the expression to determine whether the syntax of the script information of the expression is legal.
[0134] For example, the variable editing interface may include an "OK" button. After the user edits the name and value using the text box and / or operation control in the variable editing interface, the user can click the "OK" button. After receiving the operation information that the user clicks the "OK" button, the script verification interface can be called to perform syntax verification on the script information of the variable assignment instruction. Any suitable syntax verification method can be used to implement this step. For example, the syntax parsing tool of GOLD Parser can be used for syntax verification. Specifically, it can be checked whether the variable is defined, whether the statement logic is correct, whether various exceptions are considered, whether errors are exited, and whether the correct status value is returned.
[0135] For example, after the syntax check, the result information returned by the check interface may include whether the script syntax check is successful, the location of the syntax error and exception information when the check is unsuccessful, etc. For example, when the check is unsuccessful, an error message may be displayed on the variable editing interface to prompt the user to make corresponding modifications.
[0136] Step S162, calculates the value of the expression and verifies the value of the expression to determine whether the expression is reasonable. Various suitable methods can be used to calculate the value of the expression. For example, the value of the expression can be calculated based on the definition information of each variable involved in the expression. For example, the default values of each variable involved in the expression can be substituted into the expression for calculation to obtain the calculated value of the expression. Then, based on the calculated value, it can be determined whether the expression is reasonable. For example, the type of the calculated value can be compared with the type of the target variable in the definition information of the target variable to determine whether the expression is reasonable.
[0137] Step S163: When it is determined that the syntax of the script information of the expression is legal and the expression is reasonable, it is determined that the script information of the variable assignment instruction is reasonable.
[0138] In the above scheme, not only is the syntax of the script information of the variable assignment instruction verified to be legal, but the expression is also verified to be reasonable by calculating its value. Ultimately, only when the syntax of the script information is confirmed to be legal and the expression is reasonable, is the script information of the variable assignment instruction determined to be reasonable, thereby saving the script information of the reasonable variable assignment instruction. This script information verification scheme can not only ensure that the syntax of the stored variable assignment instruction script information is legal and the expression is reasonable. In this way, the script can be executed smoothly and accurately during the execution of the automated process, and the assignment of variables is also more accurate, making the control of the automated process more precise and the management efficiency higher.
[0139] Preferably, step S162 calculates the value of the expression and verifies the value of the expression, which is performed under the condition that the syntax of the script information of the expression is determined to be legal in step S161. In other words, in this solution, step S161 is performed first. If the syntax verification result of the script information in step S161 indicates that the syntax is legal, step S162 is performed, and further, based on the verification result of the expression in step S162, it is determined whether the script information of the variable assignment instruction is reasonable. If the syntax verification result of the script information in step S161 indicates that the syntax is illegal, it can be directly determined that the script information of the variable assignment instruction is unreasonable, and step S162 is no longer performed.
[0140] The execution logic of the above solution is more reasonable, which can reduce unnecessary calculations, thereby improving the efficiency of verifying the script information of the variable assignment instruction on the basis of ensuring accurate verification of the script information of the variable assignment instruction.
[0141] Exemplarily, step S162 calculates and verifies the value of an expression, including steps S162a and S162b. Step S162a calculates the value of the expression based on the default values of the target variable's associated variables, as contained in the script information for the expression. The target variable's associated variables are variables involved in the target variable's expression. Step S162b determines whether the type of the calculated expression's value is consistent with the type of the target variable, and if so, determines that the expression is reasonable.
[0142] Exemplarily, step S162a can be executed when it is determined that the syntax of the script information of the variable assignment instruction is legal. Specifically, the value of the expression can be calculated based on the default values in the definition information of each variable in the expression. It can be understood that the default values of the variables are hard-coded. For example, for the variable assignment instruction of the target variable "film tearing start time", its expression is "current time + communication delay". Taking the default value of the user-defined variable "current time" as 10:00:00 (time format is hours: minutes: seconds) as an example, that is, when the variable is defined, the system time is 10:00:00, and the default value of the user-defined variable "communication delay" is, for example, 1s, then in step S162a, the value of the expression can be calculated based on the default values of these two variables to obtain a calculated value of 10:00:01.
[0143] Then, in step S162b, the type of the value of the calculated expression and the type in the definition information of the target variable can be compared. If the types of the two are consistent, it can be determined that the expression of the variable assignment instruction is reasonable. If the types of the two are inconsistent, it can be determined that the expression of the variable assignment instruction is unreasonable. For the case where the verification result is that the expression is unreasonable, a special mark can be written in the "type" of the expression in the calculation result, and the expression verification exception information is recorded as the expression verification result. Then, it can be assembled into an expression verification result, which includes a mark of whether the expression calculation is successful, the expression calculation result, the expression calculation exception information, etc. The relevant information of the expression verification result can be displayed in the process editing interface for the user to view.
[0144] For example, in step S162a, if the value of the expression cannot be calculated, the verification result of the expression can be directly determined to be a verification failure, and a prompt message indicating that the expression is illegal can be displayed on the variable editing interface, and the editing is completed. If the calculated value of the expression can be obtained, step S162b can be continued to determine whether the type of the current target variable is consistent with the type of the calculated value of the expression. If they are consistent, it can be determined that the script information of the variable assignment instruction is reasonable, and the script information of the variable assignment instruction is allowed to be stored; if they are inconsistent, a prompt message indicating that the type does not match can be displayed on the variable editing interface, and the editing is completed.
[0145] The above method for verifying the value of the expression in the script information of the variable assignment instruction is relatively simple, has a small amount of calculation and a high verification accuracy.
[0146] Exemplarily, step S170 stores the script information of the variable assignment instruction, including step S171. Step S171 assembles the script information of the variable assignment instruction and stores the assembled script information of the variable assignment instruction. In the assembled script information of the variable assignment instruction, the name of the variable is represented by a number. Exemplarily, if it is determined that the script information of the variable assignment instruction is reasonable, the interface can be called to save the instruction and expression script into the database. Specifically, in the assembled script information of the variable assignment instruction, the name of the variable is represented by a number.
[0147] Figure 3 shows a flowchart of a method for editing variables in an automated process according to another embodiment of the present application. Exemplarily, a human-computer interaction device including a control element, an input device connected to the control element, and a display device can be provided to facilitate user editing of automated processes. The control element is a host computer, and the host computer's operating system can be pre-installed with automated process editing software. Exemplarily, a process editing interface can be displayed using the display device in response to a user input operation using the input device. The process editing interface includes a flowchart. The flowchart can include device nodes and script execution nodes, with script execution nodes set before or after any device node. Exemplarily, the process editing interface can include a node addition control, and script execution nodes can be added by the user using the node addition control. For example, if a user wishes to add a variable assignment instruction to the preceding operation corresponding to a device node, they can use the node addition control to add a script execution node before the device node. Exemplarily, the process editing interface can also include a variable definition area. The variable definition area can include settings controls for various variable definition information. Users can use the settings controls to customize various variables, including target variables and their associated variables. According to an embodiment of the present application, the definition information of each variable can be determined based on the user's operation information on the setting control in the interface. Specifically, the definition information may include the name, default value, and type of the variable. It may also include the unique number of the variable and the corresponding relationship between the number and the name.
[0148] Then, after the user clicks the script execution node with a mouse, an instruction setting interface can be displayed. The instruction setting interface can include an instruction type setting area, which can include multiple instruction type selection controls, including a first instruction type selection control corresponding to a variable assignment instruction. In response to the user selecting the first instruction type selection control, a variable editing interface can be displayed. The variable editing interface can include a name editing area and an expression editing area. Both the name editing area and the expression editing area can include input text boxes and / or various suitable operation controls. Based on the user's operation information on the input text boxes and / or operation controls, script information for the variable assignment instruction executed at the script execution node can be further determined. Specifically, based on the user's operation information on the text boxes and / or operation controls in the name editing area, information about the name of the target variable can be determined; and based on the user's operation information on the text boxes and / or operation controls in the expression editing area, an expression for calculating the value of the target variable can be determined. For example, the name of the target variable rotated by the user using the selection control in the name editing area can be received, and an expression entered by the user using the input text box in the expression editing area can be received. Then, based on these two, the script information of the variable assignment instruction can be determined. Specifically, in the script information of the determined variable assignment instruction, the name of the target variable and the names of the variables involved in the expression can be represented by unique numbers corresponding to their respective names. Exemplarily, the variable editing interface can also include a "Confirm" button, and in response to the user clicking the "Confirm" button, the script information of the determined variable assignment instruction can be pre-processed. Specifically, the variable numbers in the script information can be replaced with the variable names. Then, a script verification interface can be called to perform syntax verification on the script information of the variable assignment instruction to determine whether the syntax of the script information is legal. If the syntax of the script information is determined to be illegal, the verification result of the script information of the variable assignment instruction can be directly determined to be verification failure. If the syntax of the script information is determined to be legal, the value of the expression can be calculated based on the default values of each variable in the expression to obtain the calculated value of the expression. Then, the type of the calculated value can be compared to the type set in the definition information of the target variable to see if they are consistent. If they are consistent, the verification result of the script information of the variable assignment instruction can be determined to be verification success. If the verification is successful, the script information of the variable assignment instruction can be saved in a preset database, and the editing interface can be exited. If the verification fails, a prompt message indicating that the script information is illegal can be output on the variable editing interface to prompt the user to check and modify it.
[0149] According to a second aspect of the present application, a method for controlling an automated process is also provided. FIG4 shows a schematic flow chart of a method 400 for controlling an automated process according to an embodiment of the present application. As shown in FIG4 , the control method 400 includes steps S420 , S440 , and S460 .
[0150] Step S420 , before running the automation process, using the above-mentioned method 100 for editing variables in the automation process, determines and stores script information of the variable assignment instruction executed at the script execution node of the automation process.
[0151] Step S440: During the execution of the automated process, when the script execution node containing a variable assignment instruction is reached, the stored script information for the variable assignment instruction is obtained. The script information for the variable assignment instruction includes information about the name of the target variable to be assigned and an expression used to calculate the value of the target variable. For example, when the script execution node is reached, a query can be made to determine whether the node contains a script for the variable assignment instruction. If so, the script information for the variable assignment instruction can be obtained.
[0152] Step S460: Parse the script information of the variable assignment instruction to determine the name and expression of the target variable. Any suitable parsing method can be used to parse the script information of the variable assignment instruction. After the parsing is completed, the name and expression of the target variable in the variable assignment instruction can be obtained.
[0153] For example, before parsing the syntax, a pre-processing step for the script information can also be performed. As previously mentioned, the variable name in the stored variable assignment instruction can be represented by the unique number of the variable. Therefore, the script information of the variable assignment instruction obtained from the database cannot be used directly and needs to be pre-processed. Specifically, the variable number value in the script information can be replaced with the variable name. The implementation method of this step is the same as the solution type of the aforementioned step S150, and will not be repeated here.
[0154] Step S480: assign a value to the target variable according to the name and expression of the target variable.
[0155] For example, the actual value of an expression can be calculated based on the current values of the expression and the variables involved in the expression. For example, for the variable assignment instruction of the target variable "film tearing start time", its expression is "current time + communication delay". In this step, the current value of "current time" can be used, that is, the current system time. For example, the current value of the current time is 13:00:00, and the current value of the variable "communication delay" is 1s. In this step, the current values of these two variables can be substituted into the expression to obtain the actual value of the expression "current time + communication delay" as 13:00:01.
[0156] Exemplarily, the target variable can be assigned based on a preset condition. Exemplarily and non-restrictively, the preset condition can be a condition that the type of the target variable is consistent with the type of the actual value of the calculated expression. Specifically, exemplarily, after obtaining the script information, the definition information of all variables defined in the process can also be obtained, and this information can be assembled into execution parameter information. Then, the type of the target variable corresponding to the current variable assignment instruction can be found from the assembled execution parameter information. Then, it can be determined whether the type of the defined target variable is consistent with the type of the actual value of the calculated expression. If consistent, the calculated actual value is assigned to the target variable, and the execution of the variable assignment instruction ends.
[0157] This automated process control method, on the one hand, provides an intuitive process editing interface that facilitates user-friendly editing of variable assignment scripts within the automated process, enabling personalized editing of the names and value calculation methods for various variables to be assigned within the process. This allows users to flexibly define target variables for desired assignments and flexibly set expressions for calculating the target variable's value through simple operations, without modifying program code. Furthermore, during the execution of the automated process, upon reaching a script execution node containing a variable assignment instruction, the user simply obtains the script information for the variable assignment instruction and performs syntax parsing on the script information to accurately obtain the target variable's name and expression. This method of assigning values through script editing and execution not only ensures flexible setting of the assignment timing and method, but also features simple execution logic, minimal computational effort, and high assignment efficiency and accuracy. Furthermore, this solution is applicable to a variety of automated process scenarios, fully meeting users' personalized data processing needs, improving automated process monitoring efficiency, and facilitating optimized management of the automated process. Furthermore, it offers a better user experience.
[0158] According to a third aspect of the present application, a system for editing variables in an automated process is also provided. FIG5 shows a schematic block diagram of a system 500 for editing variables in an automated process according to an embodiment of the present application. As shown in FIG5 , the system 500 includes:
[0159] The display module 510 is used to display a process editing interface, wherein the process editing interface includes a flow chart of the automation process.
[0160] The determination module 520 is used to determine the script information of the variable assignment instruction executed at the script execution node based on the operation information of the user's first operation on the script execution node in the flowchart, wherein the script information of the variable assignment instruction includes information about the name of the target variable to be assigned and an expression for calculating the value of the target variable.
[0161] The storage module 530 is used to store script information of variable assignment instructions.
[0162] According to a fourth aspect of the present application, a control system for an automated process is also provided. FIG6 shows a schematic block diagram of a control system 600 for an automated process according to an embodiment of the present application. As shown in FIG6 , the system 600 includes:
[0163] The editing module 610 is used to determine and store script information of variable assignment instructions executed at the script execution node of the automation process by using the above-mentioned editing method of variables in the automation process before running the automation process.
[0164] The acquisition module 620 is configured to acquire stored script information of a variable assignment instruction when the script execution node containing the variable assignment instruction is reached during the execution of the automated process. The script information of the variable assignment instruction includes information about the name of the target variable to be assigned and an expression used to calculate the value of the target variable.
[0165] The determination module 630 is used to perform syntax analysis on the script information of the variable assignment instruction to determine the name and expression of the target variable.
[0166] The assignment module 640 is used to assign a value to the target variable according to the name and expression of the target variable.
[0167] According to a fifth aspect of the present application, an electronic device is also provided. FIG7 shows a schematic block diagram of an electronic device 700 according to an embodiment of the present application. As shown in FIG7 , the electronic device 700 includes a processor 710 and a memory 720, wherein the memory 720 stores computer program instructions, which, when executed by the processor 710, are used to execute the above-mentioned method for editing variables in the automated process and / or the above-mentioned method for controlling the automated process.
[0168] According to the sixth aspect of the present application, a storage medium is also provided, on which program instructions are stored. The program instructions are used to execute the editing method of variables in the above-mentioned automation process and / or the control method of the above-mentioned automation process during runtime.
[0169] A person skilled in the art can understand the specific implementation schemes and beneficial effects of the above-mentioned variable editing system 500, automation process control system 600, electronic device 700 and storage medium by reading the above-mentioned descriptions of the method 100 for editing variables in an automation process and the method 400 for controlling an automation process. For the sake of brevity, they will not be elaborated here.
[0170] Example
[0171] Example 1. A method for editing variables in an automated process, comprising:
[0172] Displaying a process editing interface, wherein the process editing interface includes a flow chart of the automation process;
[0173] determining, based on operation information of a first operation performed by a user on a script execution node in the flowchart, script information of a variable assignment instruction to be executed at the script execution node, wherein the script information of the variable assignment instruction includes information about a name of a target variable to be assigned and an expression for calculating a value of the target variable; and
[0174] The script information of the variable assignment instruction is stored.
[0175] Embodiment 2. The editing method according to embodiment 1, wherein, before storing the script information of the variable assignment instruction, the editing method further comprises:
[0176] Verifying the script information of the variable assignment instruction to determine whether the script information of the variable assignment instruction is reasonable;
[0177] The storing of the script information of the variable assignment instruction is executed under the condition that the script information of the variable assignment instruction is determined to be reasonable.
[0178] Embodiment 3. The editing method according to embodiment 1 or 2, wherein the verifying the script information of the variable assignment instruction comprises:
[0179] Verifying the syntax of the script information of the expression to determine whether the syntax of the script information of the expression is legal;
[0180] Calculating the value of the expression and verifying the value of the expression to determine whether the expression is reasonable; and
[0181] When it is determined that the syntax of the script information of the expression is legal and the expression is reasonable, it is determined that the script information of the variable assignment instruction is reasonable.
[0182] Embodiment 4. An editing method as described in any one of embodiments 1 to 3, wherein the calculating the value of the expression and verifying the value of the expression are performed under the condition that the syntax of the script information of the expression is determined to be legal.
[0183] Embodiment 5. The editing method according to any one of embodiments 1 to 4, wherein calculating the value of the expression and verifying the value of the expression comprises:
[0184] Calculating a value of the expression according to a default value of an associated variable of the target variable included in the script information of the expression, wherein the associated variable of the target variable is a variable involved in the expression of the target variable;
[0185] Determine whether the type of the calculated value of the expression is consistent with the type of the target variable, and if consistent, determine that the expression is reasonable.
[0186] Embodiment 6. The editing method according to any one of embodiments 1 to 5, wherein the editing method further comprises:
[0187] In response to a second operation of the user on the process editing interface, determining definition information of each custom variable in the automated process, wherein the custom variables include the target variable; and
[0188] Store the definition information of each custom variable;
[0189] The definition information includes the name, type and default value of the variable. The type of the variable is the digital format of the value of the variable defined by the user.
[0190] Embodiment 7. The editing method according to any one of embodiments 1 to 6, wherein the information about the name of the target variable to be assigned is a number corresponding to the name of the target variable, and the definition information further includes the number corresponding to the name of the variable and a correspondence between the name and the number;
[0191] Before verifying the script information of the variable assignment instruction, the editing method further includes:
[0192] Preprocessing the script information of the variable assignment instruction according to the corresponding relationship to replace the number of the target variable and the numbers of the associated variables of the target variable contained in the variable assignment instruction with the names of the respective variables;
[0193] The verifying of the script information of the variable assignment instruction includes:
[0194] The script information of the variable assignment instruction is verified using the name of the replaced variable.
[0195] Embodiment 8. The editing method according to any one of embodiments 1 to 7, wherein the editing method further comprises:
[0196] In response to a third operation of the user on the flowchart, the script execution node is added to the automation process.
[0197] Embodiment 9. The editing method according to any one of embodiments 1 to 8, wherein determining the script information of the variable assignment instruction executed at the script execution node based on the operation information of the user's first operation on the script execution node in the flowchart comprises:
[0198] In response to a first operation of the user on the script execution node, displaying a first variable editing interface, wherein the first variable editing interface includes an input text box;
[0199] receiving information of the name of the target variable input by the user using the input text box; and
[0200] An expression for calculating the value of the target variable input by the user using the input text box is received.
[0201] Embodiment 10. The editing method according to any one of embodiments 1 to 9, wherein determining the script information of the variable assignment instruction executed at the script execution node in the flowchart based on the operation information of the user's first operation on the script execution node includes:
[0202] In response to a first operation of the user on the script execution node, displaying a second variable editing interface, wherein the second variable editing interface includes an instruction setting control corresponding to the variable assignment instruction; and
[0203] Based on the operation information of the fourth operation of the user on the instruction setting control, script information of the variable assignment instruction executed at the script execution node is determined.
[0204] Embodiment 11. The editing method according to any one of embodiments 1 to 10, wherein determining the script information of the variable assignment instruction executed at the script execution node based on the operation information of the fourth operation of the user on the instruction setting control comprises:
[0205] In response to a fourth operation of the user on the instruction setting control, displaying a third variable editing interface, wherein the third variable editing interface includes a variable name selection control and an expression editing control;
[0206] In response to a fifth operation of the user on the variable name selection control, determining information on the name of the target variable; and
[0207] In response to a sixth operation of the expression editing control by the user, an expression for calculating a value of the target variable is determined.
[0208] Embodiment 12. The editing method according to any one of embodiments 1 to 11, wherein the script execution node comprises a first script execution node arranged before any device node in the automation process and / or a second script execution node arranged after the device node.
[0209] The variable assignment instruction executed at the first script execution node is executed before the main operation of the device is executed, and the variable assignment instruction executed at the second script execution node is executed after the main operation of the device is executed.
[0210] Example 13. A method for controlling an automated process, comprising:
[0211] Before running the automation process, using the method for editing variables in the automation process as described in any one of embodiments 1 to 12, determine and store script information of the variable assignment instruction executed at the script execution node of the automation process;
[0212] During the execution of the automated process, when the script execution node containing a variable assignment instruction is reached, the stored script information of the variable assignment instruction is obtained, wherein the script information of the variable assignment instruction includes information about the name of the target variable to be assigned and an expression for calculating the value of the target variable;
[0213] Parsing the script information of the variable assignment instruction to determine the name of the target variable and the expression; and
[0214] Assign a value to the target variable according to the name of the target variable and the expression.
[0215] Example 14. A system for editing variables in an automated process, comprising:
[0216] A display module, configured to display a process editing interface, wherein the process editing interface includes a flow chart of the automation process;
[0217] a determining module configured to determine, based on operation information of a first operation performed by a user on a script execution node in the flowchart, script information of a variable assignment instruction to be executed at the script execution node, wherein the script information of the variable assignment instruction includes information about a name of a target variable to be assigned and an expression for calculating a value of the target variable; and
[0218] The storage module is used to store the script information of the variable assignment instruction.
[0219] Example 15. A control system for an automated process, comprising:
[0220] an editing module, configured to determine and store script information of a variable assignment instruction executed at a script execution node of the automation process before running the automation process, using the method for editing variables in the automation process as described in any one of embodiments 1 to 12;
[0221] an acquisition module, configured to, during the execution of the automation process, acquire stored script information of a variable assignment instruction when the script execution node containing the variable assignment instruction is reached, wherein the script information of the variable assignment instruction includes information about the name of a target variable to be assigned and an expression for calculating the value of the target variable;
[0222] a determination module, configured to perform syntax analysis on the script information of the variable assignment instruction to determine the name of the target variable and the expression; and
[0223] An assignment module is used to assign a value to the target variable according to the name of the target variable and the expression.
[0224] Example 16. An electronic device comprising a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used by the processor to execute the method for editing variables in an automation process as described in any one of Examples 1 to 12 and / or the method for controlling an automation process as described in Example 11 when the processor is running.
[0225] Example 17. A storage medium having program instructions stored thereon, wherein the program instructions are used, during runtime, to execute the method for editing variables in an automation process as described in any one of Examples 1 to 12 and / or the method for controlling an automation process as described in Example 13.
[0226] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely illustrative and are not intended to limit the scope of the present application. Various changes and modifications may be made therein by those skilled in the art without departing from the scope and spirit of the present application. All such changes and modifications are intended to be included within the scope of the present application as required by the appended claims.
[0227] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0228] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units described is merely a logical function division. In actual implementation, other division methods may be used, such as combining or integrating multiple units or components into another device, or ignoring or not performing some features.
[0229] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0230] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this approach of the present application should not be interpreted as reflecting the intention that the application claimed for protection requires more features than those explicitly recited in each claim. More precisely, as reflected in the corresponding claims, the inventive point is that the corresponding technical problem can be solved with fewer features than all the features of a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present application.
[0231] It will be understood by those skilled in the art that, except where mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or apparatus disclosed herein may be combined in any combination. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature providing the same, equivalent, or similar purpose.
[0232] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of this application and to form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
[0233] The various component embodiments of the present application can be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to implement some or all of the functions of some modules in the editing system of the variable and the control system of the automated process according to the embodiment of the present application. The application can also be implemented as a part or all of the device program (for example, a computer program and a computer program product) for performing the method described herein. Such a program realizing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0234] It should be noted that the above embodiments illustrate rather than limit the present application, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbols placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0235] The above description is merely a specific embodiment or illustration of a specific embodiment of the present application, and the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. The scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for editing variables in an automated process, characterized in that: include: Displaying a process editing interface, wherein the process editing interface includes a flow chart of the automation process; determining, based on operation information of a first operation of a user on a script execution node in the flowchart, script information of a variable assignment instruction executed at the script execution node, wherein the script information of the variable assignment instruction includes information about a name of a target variable to be assigned and an expression for calculating a value of the target variable; and The script information of the variable assignment instruction is stored.
2. The editing method according to claim 1, characterized in that: Before storing the script information of the variable assignment instruction, the editing method further includes: Verifying the script information of the variable assignment instruction to determine whether the script information of the variable assignment instruction is reasonable; The script information storing the variable assignment instruction is executed under the condition that the script information storing the variable assignment instruction is reasonable.
3. The editing method according to claim 2, characterized in that: The verifying of the script information of the variable assignment instruction includes: Checking the syntax of the script information of the expression to determine whether the syntax of the script information of the expression is legal; Calculating the value of the expression and checking the value of the expression to determine whether the expression is reasonable; and When it is determined that the syntax of the script information of the expression is legal and the expression is reasonable, it is determined that the script information of the variable assignment instruction is reasonable.
4. The editing method according to claim 3, characterized in that: The calculating the value of the expression and verifying the value of the expression are performed under the condition that the syntax of the script information of the expression is determined to be legal.
5. The editing method according to claim 3, characterized in that: The calculating the value of the expression and verifying the value of the expression includes: Calculating the value of the expression according to the default value of the associated variable of the target variable contained in the script information of the expression, wherein the associated variable of the target variable is a variable involved in the expression of the target variable; It is determined whether the type of the value of the calculated expression is consistent with the type of the target variable, and if they are consistent, the expression is determined to be reasonable.
6. The editing method according to any one of claims 1 to 5, characterized in that: The editing method further comprises: In response to a second operation of the user on the process editing interface, determining definition information of each custom variable in the automated process, wherein the custom variable includes the target variable; and Store the definition information of each custom variable; The definition information includes the name, type and default value of the variable, and the type of the variable is the digital format of the value of the variable defined by the user.
7. The editing method according to claim 6 as cited in claim 2, characterized in that: The information about the name of the target variable to be assigned is the number corresponding to the name of the target variable, and the definition information also includes the number corresponding to the name of the variable and the corresponding relationship between the name and the number; Before verifying the script information of the variable assignment instruction, the editing method further includes: Preprocessing the script information of the variable assignment instruction according to the corresponding relationship, so as to replace the number of the target variable and the number of the associated variable of the target variable contained in the variable assignment instruction with the names of the respective variables; The verifying of the script information of the variable assignment instruction includes: The script information of the variable assignment instruction is verified using the name of the replaced variable.
8. The editing method according to any one of claims 1 to 5, characterized in that: The editing method further comprises: In response to a third operation of the user on the flowchart, the script execution node is added to the automation process.
9. The editing method according to any one of claims 1 to 5, characterized in that: The step of determining the script information of the variable assignment instruction executed at the script execution node based on the operation information of the first operation of the user on the script execution node in the flowchart includes: In response to a first operation of the user on the script execution node, displaying a first variable editing interface, wherein the first variable editing interface includes an input text box; receiving information of the name of the target variable input by the user using the input text box; and An expression for calculating the value of the target variable input by the user using the input text box is received.
10. The editing method according to any one of claims 1 to 5, characterized in that: The step of determining the script information of the variable assignment instruction executed at the script execution node based on the operation information of the first operation of the user on the script execution node in the flowchart includes: In response to a first operation of the user on the script execution node, displaying a second variable editing interface, wherein the second variable editing interface includes an instruction setting control corresponding to the variable assignment instruction; and Based on the operation information of the fourth operation of the instruction setting control by the user, script information of the variable assignment instruction executed at the script execution node is determined.
11. The editing method according to claim 10, characterized in that: The step of determining the script information of the variable assignment instruction executed at the script execution node based on the operation information of the fourth operation of the instruction setting control by the user includes: In response to a fourth operation of the user on the instruction setting control, displaying a third variable editing interface, wherein the third variable editing interface includes a variable name selection control and an expression editing control; In response to a fifth operation of the user on the variable name selection control, determining information on the name of the target variable; and In response to a sixth operation of the user on the expression editing control, an expression for calculating the value of the target variable is determined.
12. The editing method according to any one of claims 1 to 5, characterized in that: The script execution node includes a first script execution node arranged before any device node in the automation process and / or a second script execution node arranged after the device node. The variable assignment instruction executed at the first script execution node is executed before the main operation of the device is executed, and the variable assignment instruction executed at the second script execution node is executed after the main operation of the device is executed.
13. A control method for an automated process, characterized in that: include: Before running the automation process, using the method for editing variables in the automation process as described in any one of claims 1 to 12, determine and store script information of the variable assignment instruction executed at the script execution node of the automation process; In the process of running the automation process, when running to a script execution node containing a variable assignment instruction, obtaining the stored script information of the variable assignment instruction, wherein the script information of the variable assignment instruction includes information about the name of the target variable to be assigned and an expression for calculating the value of the target variable; Parsing the script information of the variable assignment instruction to determine the name of the target variable and the expression; as well as Assign a value to the target variable according to the name of the target variable and the expression.
14. A system for editing variables in an automated process, characterized in that: include: A display module, used to display a process editing interface, wherein the process editing interface includes a flow chart of the automation process; a determining module, configured to determine script information of a variable assignment instruction executed at the script execution node in the flowchart based on operation information of a first operation of a user on the script execution node, wherein the script information of the variable assignment instruction includes information about a name of a target variable to be assigned and an expression for calculating a value of the target variable; and A storage module is used to store script information of the variable assignment instruction.
15. A control system for an automated process, characterized in that: include: An editing module, used for determining and storing script information of variable assignment instructions executed at a script execution node of the automation process before running the automation process, using the method for editing variables in the automation process according to any one of claims 1 to 12; an acquisition module, configured to acquire stored script information of a variable assignment instruction when the script execution node containing the variable assignment instruction is reached during the running of the automation process, wherein the script information of the variable assignment instruction includes information about the name of a target variable to be assigned and an expression for calculating the value of the target variable; A determination module, used for parsing the script information of the variable assignment instruction to determine the name of the target variable and the expression; as well as An assignment module is used to assign a value to the target variable according to the name of the target variable and the expression.
16. An electronic device comprising a processor and a memory, wherein: The memory stores computer program instructions, which are used by the processor to execute the method for editing variables in an automation process as described in any one of claims 1 to 12 and / or the method for controlling an automation process as described in claim 11 when the processor is running.
17. A storage medium having program instructions stored thereon, characterized in that: The program instructions are used to execute the method for editing variables in an automation process as described in any one of claims 1 to 12 and / or the method for controlling an automation process as described in claim 13 when running.
Citation Information
Patent Citations
A flow chart programming method and system
CN109634572A
Data processing apparatus and method, operator station, electronic device, and storage medium
CN114690713A
Customized script running method and device
CN115617322A
Automatic verification rule configuration method, verification rule verification method and device
CN115964096A
Editing method of variables in automatic process and control method of automatic process
CN117850305A