Sub-operation grouping method and apparatus in automated process, and control method and apparatus
By grouping the sub-operations related to the main operations in the automated process, the problem of sub-operations grouping in the process is solved, and efficient control and processing of the process is realized, especially in the process termination scenario, which shows high efficiency and reusability.
Patent Information
- Application Number
- PCT/CN2024/141071
- 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
In an automated process, how to effectively group sub-operations to achieve efficient control of the process, especially in special scenarios such as process termination.
By obtaining an ordered operation group of automated processes, grouping the main operation with its sub-operations that are performed earlier or later than before, and grouping the sub-operations between adjacent main operations with the main operation performed later, and finally the sub-operations of the last main operation that are performed later as an operation group.
The method of efficient grouping sub-operation in automated processes is realized, and the efficiency of process processing and control is improved. Especially in special scenarios such as process termination, it is more efficient and has strong reusability than traditional methods.
Smart Images

Figure CN2024141071_26062025_PF_FP_ABST
Abstract
Description
Grouping method, control method and device for sub-operations in automated processes
[0001] This application claims priority to the Chinese patent application with application number 202311778741.8 filed with the Chinese Patent Office on December 22, 2023, and application name “Grouping method, control method and device for sub-operations in automated processes”, and claims priority to the Chinese patent application with application number 202311778360.X filed with the Chinese Patent Office on December 22, 2023, and application name “Control method, device, electronic device and storage medium for automated processes”, 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 grouping sub-operations in an automation process, a device for grouping sub-operations in an automation process, a method for controlling an automation process, an electronic device, and a storage medium. Background Art
[0003] Currently, many fields are continuously implementing automation transformations to achieve the goals of freeing up manpower and improving efficiency. Whether it is automated manufacturing, automated testing, or automated testing / experiments, automated systems are widely used. Taking laboratory automation systems as an example, the automation system can include multiple devices. Users use the automation system to build corresponding automated processes to achieve the purpose of testing / experiments. Specifically, the automated process can be composed of multiple process nodes, each process node corresponding to a device, and a device generally corresponding to multiple operations. For example, the automated process can be composed of the following nodes: consumables (such as well plates) node (corresponding to a starting location) → first device node (such as a pipetting workstation) → second device node (such as an incubator) → end node (the final destination of the consumables, corresponding to an end location). For example, the first device node corresponds to a device, namely a pipetting workstation, and multiple operations, namely, opening the door, transferring within the pipetting workstation, closing the door, and pipetting.
[0004] Before the automation system is run, the automation process needs to be parsed into an operation sequence. Usually, a node may be parsed into multiple operations, and these operations are defined as pre-operation, main operation and post-operation according to the main function of the equipment. As the name implies, the main operation is the main operation performed by the equipment. For example, the main function of the pipetting workstation is pipetting, so the pipetting operation is the main operation, and the operation before the pipetting operation can be defined as the pre-operation. Similarly, the operation after the pipetting operation can be defined as the post-operation. During the operation of the automation process, the pre-operation, main operation and post-operation are usually processed separately. In some cases, it is necessary to implement related functions as a whole for these operations, that is, these operations need to be grouped, and each group needs to implement related functions as a whole. For example, if the process needs to be terminated during operation, the path of the consumables to the specified location needs to be planned. However, how to group related sub-operations is an urgent problem to be solved in this field. Summary of the Invention
[0005] In view of the above problems, the present application is proposed. In a first aspect, the present application provides a method for grouping sub-operations in an automated process, wherein the automated process is connected by multiple nodes, each of which includes at least one device node; the method comprises:
[0006] Obtaining an ordered operation group of the automated process, wherein the ordered operation group is obtained based on at least a connection relationship between nodes in the automated process, the ordered operation group includes a plurality of ordered sub-operations, an execution time of an earlier sub-operation is earlier than an execution time of a later sub-operation, the sub-operations include a main operation and auxiliary operations other than the main operation, and the main operation is an operation corresponding to the device node and corresponds to a primary function of the device node;
[0007] Based on the ordered operation group, the sub-operations of the first main operation that are executed earlier than the main operation and the main operation are taken as one operation group, the sub-operations between two adjacent main operations in the ordered operation group and the main operation executed later than the two adjacent main operations are taken as another operation group, and the sub-operations of the last main operation that are executed later than the main operation are taken as yet another operation group.
[0008] In a possible implementation, the method of combining, based on the ordered operation group, sub-operations of a first main operation that are executed earlier than the main operation and the main operation as one operation group, combining sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and combining sub-operations of a last main operation that is executed later than the main operation as yet another operation group includes:
[0009] Based on the ordered operation group, the order relationship between all main operations and their next sub-operations in the ordered operation group is deleted.
[0010] In a possible implementation, the method of combining the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group, combining the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and combining the sub-operations of the last main operation that are executed later than the main operation as yet another operation group based on the ordered operation group includes:
[0011] Setting an initial operation number for each sub-operation in the ordered operation group, and setting the operation group number of the current operation group to the initial value;
[0012] Traverse each sub-operation in the ordered operation group, and if the operation number of the sub-operation is the initial operation number, perform the following steps:
[0013] Modify the operation group number of the current operation group to the target value; set the operation number of the current sub-operation to the target value; obtain the adjacent sub-operation of the sub-operation, and if the operation number of the adjacent sub-operation is the initial operation number, set the operation number of the adjacent sub-operation to the target value; and so on, for the adjacent sub-operation, continue to obtain the corresponding adjacent sub-operation, and if the operation number of the adjacent sub-operation is the initial operation number, set the operation number of the adjacent sub-operation to the target value, until the adjacent sub-operation cannot continue to obtain the next adjacent sub-operation, traverse the next sub-operation in the ordered operation group, and the target value obtained by each modification during traversal is different;
[0014] Group sub-operations with the same operation number into the same operation group.
[0015] In a possible implementation, the method of combining the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group, combining the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and combining the sub-operations of the last main operation that are executed later than the main operation as yet another operation group based on the ordered operation group includes:
[0016] Create a new stack and initialize it to empty;
[0017] Setting an initial operation number for each sub-operation in the ordered operation group, and setting the operation group number of the current operation group to the initial value;
[0018] Traverse each sub-operation in the ordered operation group, and if the operation number of the sub-operation is the initial operation number, perform the following steps:
[0019] Modify the operation group number of the current operation group to the target value; and push the sub-operation into the stack;
[0020] If the stack is not empty, perform the following steps:
[0021] Taking out the sub-operation at the top of the stack, and if the operation number of the sub-operation is the initial operation number, setting the operation number of the sub-operation to the target value, which is recorded as the taking step;
[0022] Obtaining an adjacent sub-operation of the sub-operation, and if the operation number of the adjacent sub-operation is the initial operation number, pushing the adjacent sub-operation into a stack, which is recorded as a stacking step;
[0023] Determine again whether the stack is empty. If the stack is not empty, continue to loop the above steps of taking out and pushing;
[0024] When it is determined that the stack is empty, it is determined whether the traversal is completed. If not, the traversal continues to the next sub-operation in the ordered operation group until all sub-operations belong to the corresponding operation group.
[0025] In a possible implementation, the method further includes: determining, based on the ordered operation group, a sequence of execution of each main operation in the ordered operation group to obtain an ordered main operation;
[0026] After the method of combining, based on the ordered operation group, the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group, combining the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and combining the sub-operations of the last main operation that are executed later than the main operation as yet another operation group, the method further includes:
[0027] Traverse each operation group and determine the intersection of the sub-operations contained in the operation group and the ordered main operations;
[0028] When the intersection is not empty, determine whether each sub-operation in the corresponding operation group belongs to the same operation set as the main operation based on the position of the main operation in the ordered main operations in the intersection and the corresponding relationship between each sub-operation in the operation group and the main operation, so as to complete the grouping of the sub-operations, wherein the corresponding relationship is the corresponding relationship between the main operation and the auxiliary operation.
[0029] In a possible implementation, when the intersection is not empty, determining whether each sub-operation in the corresponding operation group belongs to the same operation set as the main operation based on the position of the main operation in the ordered main operations in the intersection and the corresponding relationship between each sub-operation in the operation set and the main operation, so as to complete the grouping of the sub-operations, includes:
[0030] When the main operation in the intersection is the first main operation in the ordered main operations, all sub-operations in the current operation group belong to the same operation set;
[0031] When the main operation in the intersection is not the first main operation in the ordered main operations, determine whether each sub-operation in the corresponding operation group belongs to the same operation set as the main operation according to the following method:
[0032] In the case where a sub-operation in the corresponding operation group is the main operation, the main operation belongs to another operation set;
[0033] In the case where the sub-operation in the corresponding operation group is an auxiliary operation, based on the corresponding relationship between the auxiliary operation and the previous main operation, it is determined whether the auxiliary operation belongs to the same operation set as the main operation.
[0034] In one possible implementation, for the case where the sub-operation in the operation group is an auxiliary operation, when the auxiliary operation and the main operation do not belong to the same operation set, it is determined whether the auxiliary operation and the subsequent main operation belong to the same operation set based on the correspondence between the auxiliary operation and the subsequent main operation.
[0035] In a possible implementation, when the intersection is empty, all sub-operations in the current operation group belong to the last operation set.
[0036] According to a second aspect of the present application, a method for controlling an automated process is also provided, including the above-mentioned method for grouping sub-operations in the automated process.
[0037] According to a third aspect of the present application, a device for grouping sub-operations in an automated process is also provided, wherein the automated process is connected by multiple nodes, and the nodes include at least one device node; the device includes: an acquisition module, used to obtain an ordered operation group of the automated process, wherein the ordered operation group is obtained at least according to the connection relationship between the nodes in the automated process, the ordered operation group includes multiple ordered sub-operations, the execution time of the sub-operations in the earlier order is earlier than the execution time of the sub-operations in the later order, the types of the sub-operations include main operations and auxiliary operations other than the main operations, the main operation is the operation corresponding to the device node and corresponds to the main function of the device node; the grouping module is used to, based on the ordered operation group, group the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group, group the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and group the sub-operations of the last main operation that are executed later than the main operation as another operation group.
[0038] According to a fourth aspect of the present application, an electronic device is also provided, comprising a processor and a memory, wherein the memory stores computer program instructions, which are used by the processor to execute the grouping method of sub-operations in the automated process as described above when the computer program instructions are executed.
[0039] According to a fifth aspect of the present application, a storage medium is further provided, on which program instructions are stored. The program instructions are used to execute the above-mentioned method for grouping sub-operations in the automation process when running.
[0040] In the above technical solution, in actual application scenarios (such as process termination scenarios), the process is processed and controlled by the grouping method of sub-operations in the automated process provided by this application, which can effectively improve the processing efficiency. Specifically, during the operation of the automated process, it is necessary to execute the "terminate" command on the automated process. At this time, the sub-operations are first grouped using the grouping method provided by this application to form multiple operation groups, and then the corresponding operation groups are regarded as a whole to consider subsequent related issues or steps. Compared with the method of deleting the remaining unexecuted sub-operations and adding them to the specified location, the grouping method of sub-operations in the automated process provided by this application is used to process some special application scenarios (such as process termination) with high efficiency and strong reusability. This advantage is particularly obvious for complex automated processes.
[0041] 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
[0042] 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.
[0043] FIG1 shows a schematic flow chart of an automation process according to an embodiment of the present application;
[0044] FIG2 shows a schematic flow chart of a method for grouping sub-operations in an automated process according to an embodiment of the present application;
[0045] FIG3 is a schematic diagram showing an ordered operation group obtained according to the connection relationship between the nodes in the automation process of the embodiment corresponding to FIG1 of the present application;
[0046] FIG4 is a schematic diagram showing a grouping result based on the ordered operation group shown in FIG3 ;
[0047] FIG5 shows a flowchart of determining an ordered main operation according to an embodiment of the present application;
[0048] FIG6 shows a logical diagram of a grouping method according to an embodiment of the present application;
[0049] FIG7 shows a logic diagram of a grouping method according to another embodiment of the present application;
[0050] FIG8 is a schematic diagram of an ordered operation group obtained by connecting nodes in an automation process according to another embodiment of the present application;
[0051] FIG9 shows a schematic block diagram of a device for grouping sub-operations in an automated process according to an embodiment of the present application; and
[0052] FIG10 shows a schematic block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0053] 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.
[0054] In order to at least partially solve the above problems, an embodiment of the present application provides a method for grouping sub-operations in an automated process. The method for grouping sub-operations in the automated process can be applied to a device for grouping sub-operations in an automated process. The automated process is connected by a plurality of nodes, and the nodes include at least one device node. Specifically, for example, as shown in Figure 1, a schematic diagram of the automated process provided by an embodiment of the present application, in Figure 1, a centrifuge and an incubator can be considered as device nodes. When the sample flows to the device corresponding to the centrifuge node, the relevant centrifugation operation will be performed. Similarly, when the sample flows to the incubator, an incubation operation will be performed. The lines between nodes can be understood as transport operations. For example, the line from the starting node to the node corresponding to the centrifuge indicates that the sample needs to be transported from the starting position to the centrifuge.
[0055] Fig. 2 shows a schematic flow chart of a method 100 for grouping sub-operations in an automated process according to an embodiment of the present application. As shown in Fig. 2 , the method 100 may include step S110 and step S120.
[0056] Step S110: Obtain an ordered operation group of the automated process, wherein the ordered operation group is obtained based on at least a connection relationship between nodes in the automated process, the ordered operation group includes multiple ordered sub-operations, and the execution time of sub-operations with an earlier order is earlier than the execution time of sub-operations with a later order. The types of sub-operations include main operations and auxiliary operations other than the main operations. The main operation is an operation corresponding to the device node and corresponds to the main function of the device node.
[0057] As the name suggests, the operations in the ordered operation group are ordered. Specifically, after the user builds the automated process shown in Figure 1, some processing will be performed according to the connection relationship between the nodes in the automated process, such as process parsing, to obtain an ordered operation group. The ordered operation group includes multiple sub-operations, which are in order. The execution time of the sub-operations at the front of the order is earlier than the execution time of the sub-operations at the back of the order. As shown in Figure 3, this is a schematic diagram of the ordered operation group obtained according to the connection relationship between the nodes in the automated process in Figure 1. The execution order of the sub-operations is indicated by the direction of the arrows and the front and back positions of the sub-operations. It can be understood that the sub-operations in the ordered operation group are the smallest units of operations.
[0058] For example, for some application scenarios, the ordered operation group can also be obtained based on the connection relationship between each node and some special needs that arise during the operation process. For example, during the process operation, there is a lack of pipette tips when pipetting at the pipetting workstation. At this time, it is necessary to insert the pipette tip for loading operations, thereby obtaining an ordered operation group.
[0059] In step S110, the types of sub-operations include main operations and auxiliary operations other than the main operations. The main operation is an operation corresponding to the main function of the device corresponding to the corresponding node. It can be understood that in an ordered operation group, there are two types of sub-operations, one is the main operation and the other is the auxiliary operation, and the main operation is the main function of the device corresponding to the corresponding node. For example, the main function of the centrifuge is centrifugation, so the centrifugation operation is the main operation. For example, referring to Figure 3, the ordered operation group in Figure 3 corresponds to the automation process shown in Figure 1. The main function is that the sample first enters the centrifuge for centrifugation, and then enters the incubator for incubation. In the ordered operation group shown in Figure 3, since the flowchart in Figure 1 corresponds to two device nodes, there are two main operations in the corresponding ordered operation group, namely, sub-operation 42 and sub-operation 49. Sub-operation 42 is a centrifugation operation, and sub-operation 49 is an incubation operation. As for sub-operation 37 (centrifuge rotation operation, it is required before centrifugation), The following operations are auxiliary operations: sub-operation 38 (centrifuge door opening operation), sub-operation 39 (robotic arm 1 moves the sample to the middle position), sub-operation 40 (robotic arm 2 moves the sample from the middle position into the centrifuge), sub-operation 41 (centrifuge door closing operation), sub-operation 43 (centrifuge rotation operation, which needs to be rotated into place after centrifugation), sub-operation 44 (centrifuge door opening operation), sub-operation 45 (robotic arm 2 handling operation, specifically the robotic arm moves the sample from the centrifuge to the middle position), sub-operation 46 (robotic arm 1 moves the sample from the middle position into the incubator), sub-operation 47 (centrifuge door closing operation), sub-operation 48 (transferring the sample from the incubator to the incubation station), sub-operation 50 (transferring the sample from the incubator to the incubator outlet), and sub-operation 51 (robotic arm 1 moves the sample out of the incubator).
[0060] Exemplarily, the auxiliary operation includes a front operation performed before the corresponding main operation and a back operation performed after the corresponding main operation. The front operation or the back operation includes a transfer operation between devices (robotic arm handling). Continuing to refer to Figure 3, sub-operation 42 is the main operation, and the auxiliary operations such as sub-operation 37, sub-operation 38, sub-operation 39, sub-operation 40 and sub-operation 41 before the main operation are all front operations of the main operation 42; similarly, sub-operation 43, sub-operation 44, and sub-operation 47 after sub-operation 42 (main operation) are back operations of the main operation. Sub-operation 49 is the main operation, and sub-operation 45, sub-operation 46, and sub-operation 48 before the main operation are all front operations of the main operation 49; sub-operation 50 and sub-operation 51 after the main operation are back operations of the main operation. It should be noted that the correspondence between the main operation and the auxiliary operation needs to be determined based on the equipment attributes corresponding to the main operation. Not all sub-operations located before the main operation are its auxiliary operations. For example, sub-operation 47 represents closing the centrifuge door. Therefore, this operation is the subsequent operation of the main operation corresponding to sub-operation 42, rather than the preceding operation of the main operation corresponding to sub-operation 49.
[0061] For example, before setting up the automated process, the user will configure the corresponding device properties, which will configure the main operation of the device and the corresponding front and back operations (for example, for a centrifuge, according to its device properties, it needs to be rotated into place before centrifugation and the door needs to be opened, so it is necessary to configure the front operation of the centrifugation operation, such as sub-operation 37 and sub-operation 38 above). In this way, for example, matching can be performed by ID number (of course, matching can also be performed in other ways). In this way, it is possible to determine which operation is the main operation and which sub-operations are the corresponding front and back operations based on the corresponding ID number. In this way, the correspondence between the main operation and the corresponding auxiliary operation (front operation and / or back operation) can be established. Specifically, each device has a main instruction and several front and back operation instructions. The main instruction is identified by the IsMainCommand attribute, and the front and back operations are associated with the main instruction to which they belong through the MainDeviceCommandId attribute. This information will be attached to the process when it is built. During process parsing, each sub-operation will be assigned an ID number (for example, an integer ID number). The corresponding relationship between the main operation and its preceding and following operations can then be determined based on the MainDeviceCommandId property of each sub-operation. Specifically, taking the incubator as an example, during process parsing, the main operation Incubate, the preceding operation PlateIn, and the following operation PlateOut will be assigned an ID number (for example, 2). In this way, the MainDeviceCommandId can be used to determine the corresponding relationship between the main operation Incubate, the preceding operation PlateIn, and the following operation PlateOut.
[0062] For example, in certain application scenarios, since there are requirements for the direction of the consumables before and after transportation, the direction of the consumables will be adjusted by the diverter during the transportation process (the consumables are containers for holding samples). Specifically, for example, the sample is first transported to the diverter by the robot 1. After the commutator rotates and reverses, the robot 2 transports the sample to the designated position. Of course, if the distance is appropriate, the robot 2 may not be needed, and the sample can be directly transported to the designated position by the robot 1. Therefore, the reversing operation is also an auxiliary operation. At the same time, according to the position of the reversing operation in the ordered operation group and the corresponding relationship between the reversing operation and the main operation, the reversing operation may be a front operation or a rear operation. Similarly, the robot arm transportation, that is, the transfer operation may be a front operation or a rear operation according to the position of the transfer operation in the ordered operation group.
[0063] Step S120, based on the ordered operation group, the sub-operations of the first main operation that are executed earlier than the main operation and the main operation are taken as one operation group, the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations are taken as another operation group, and the sub-operations of the last main operation that are executed later than the main operation are taken as yet another operation group.
[0064] Exemplarily, an ordered operation group may include one main operation or multiple main operations. For the case of one main operation, all sub-operations in the ordered operation group are directly regarded as an operation group, which can also be considered as an operation set; that is, for the case of one main operation in the ordered operation group, all operations of the ordered operation group belong to the same operation set; for the case of multiple main operations, the grouping result can be regarded as three parts, one part is the first operation group, one part is the middle operation group, and the other part is the last operation group. The sub-operations in the first operation group are composed of the sub-operations of the first main operation that are executed earlier than the main operation and the main operation. The middle operation group is composed of the sub-operations between two adjacent main operations and the main operation that is executed later than the two adjacent main operations. The last operation group is composed of the sub-operations of the last main operation that are executed later than the main operation. It is understandable that when there are more than three main operations, there are also multiple intermediate operation groups. For example, if there are four main operations, there are two intermediate operation groups, one of which is composed of the sub-operations between the first and second main operations and the second main operation (the second main operation is executed later than the first main operation), and the other is composed of the sub-operations between the second and third main operations and the third main operation (the third main operation is executed later than the second main operation). Figure 4 shows the grouping result based on the ordered operation groups shown in Figure 3. Figure numerals 61, 62, and 63 represent the first operation group, the second operation group, and the third operation group, respectively.
[0065] For example, referring to the ordered operation group shown in FIG3 , sub-operation 42 is the first main operation, and sub-operation 37, sub-operation 38, sub-operation 39, sub-operation 40, and sub-operation 41 are all executed earlier than the main operation. Therefore, sub-operation 37, sub-operation 38, sub-operation 39, sub-operation 40, sub-operation 41 and main operation sub-operation 42 are collectively regarded as an operation group, the first operation set 61 in FIG4 ; and the main operation corresponding to sub-operation 42 and the main operation corresponding to sub-operation 49 are two adjacent main operations in the ordered operation group, and the sub-operations between them are sub-operation 43, sub-operation 44, Sub-operation 45, sub-operation 46, sub-operation 47, sub-operation 48, therefore the sub-operation 43, sub-operation 44, sub-operation 45, sub-operation 46, sub-operation 47, sub-operation 48 between two adjacent main operations and the sub-operation 49 executed later of the two main operations are collectively regarded as the second operation group 62. It can be understood that, depending on the number of main operations, the second operation set can have two or more). Sub-operation 50 and sub-operation 51 are both sub-operations executed later than the last main operation (sub-operation 49), therefore sub-operation 50 and sub-operation 51 are regarded as the third operation group 63.
[0066] In the above technical solution, in actual application scenarios (such as process termination scenarios), the sub-operations are grouped by the grouping method provided in this application, and specific requirements are implemented on this basis (such as process termination requirements), which can effectively improve processing efficiency.
[0067] Illustratively, before step S120 , the method further includes, based on the ordered operation group, deleting the sequential relationship between all main operations and their next sub-operations in the ordered operation group.
[0068] The sequential relationship means that in an ordered operation group, for a sub-operation, it includes a sequential relationship with the previous sub-operation and a sequential relationship with the next sub-operation. For example, if the sequential relationship between the sub-operation and the next sub-operation is deleted, the order of the sub-operation and the next sub-operation is deleted. For ease of understanding, it can also be represented by a diagram. For example, as shown in Figure 3, the sequential relationship is represented by a directional arrow. For sub-operation 42 (main operation), delete its sequential relationship with the next sub-operation. Continuing to refer to Figure 3, the intuitive understanding can be considered to be deleting the edge (arrow) starting from each main operation in Figure 3. Specifically, delete the edge starting from sub-operation 42 (main operation), and delete the edge starting from sub-operation 49 (main operation). In this way, after deleting the sequential relationship between the main operation and the next sub-operation of the main operation, it will be impossible to obtain the next sub-operation of the main operation based on the ordered operation group.
[0069] In the above technical solution, the sequential relationship between all main operations and their next sub-operations in the ordered operation group is deleted in advance before grouping. In this way, grouping can be quickly achieved with each main operation as the boundary, thereby improving the execution efficiency of the automated process.
[0070] For example, in one embodiment, step S120 may include step S120a, step S120b, and step S120c. Specifically:
[0071] Step S120a: setting an initial operation number for each sub-operation in the ordered operation group, and setting the operation group number of the current operation group to the initial value;
[0072] Exemplarily, each sub-operation in the ordered operation group can be set with a corresponding initial operation number, for example, it can be set to 0; similarly, the operation group number of the current operation group can also be set to an initial value, for example, the initial value can also be 0. It can be understood that the operation number represents the sub-operation, and the operation group number represents the operation group composed of one or more sub-operations. For example, sub-operations 37 to sub-operations 51 in Figure 3 can each have an initial operation number of 0; and after grouping, multiple operation groups are formed, each operation group has its own operation group number, that is, sub-operation 37 → sub-operation 38 (sub-operation 39) → sub-operation 40 → sub-operation 41 → sub-operation 42 in Figure 3 can be considered as one operation group.
[0073] Step S120b: traverse each sub-operation in the ordered operation group, and if the operation number of the sub-operation is the initial operation number, perform the following steps:
[0074] Modify the operation group number of the current operation group to the target value; set the operation number of the current sub-operation to the target value; obtain the adjacent sub-operation of the sub-operation, and if the operation number of the adjacent sub-operation is the initial operation number, set the operation number of the adjacent sub-operation to the above target value; and so on, for the adjacent sub-operation, continue to obtain the corresponding adjacent sub-operation, and if the operation number of the adjacent sub-operation is the initial operation number, set the operation number of the adjacent sub-operation to the above target value, until the adjacent sub-operation can no longer obtain the next adjacent sub-operation, traverse the next sub-operation in the ordered operation group, and the target value obtained by each modification during traversal is different;
[0075] It can be understood that for the main operation, since its sequential relationship with the next sub-operation has been deleted, its adjacent sub-operation is only the previous sub-operation. As shown in Figure 3, when obtaining the adjacent sub-operation of sub-operation 42, there is only sub-operation 41.
[0076] The target value modified each time during traversal is different. For example, when the operation group number of the current operation group needs to be modified, the operation group number of the current operation group can be increased by 1. As mentioned above, when the operation group number of the current operation group is the initial value 0, if the operation group number of the current operation group needs to be modified, the operation group number of the current operation group can be increased by 1 based on the initial value (for example, 0), that is, the operation group number of the current operation group is modified to the target value 1. Specifically, in the embodiment shown in Figures 3 and 4, when traversing sub-operation 37, since the operation number of sub-operation 37 is the initial operation number (for example, 0), the operation group number of the current operation group is modified. Number (in this embodiment, the operation group number of the current operation group is 0) is the target value, which is recorded as the first target value; and when traversing sub-operation 43, since the operation number of sub-operation 43 is the initial operation number (for example, 0), it is necessary to modify the operation group number of the current operation group to the second target value. It can be understood that the first target value and the second target value are different. For example, the first target value is 1, and the second target value is 2; that is, when the operation group number of the current operation group needs to be modified for the second time, the operation group number of the current operation group is 1, so 1 can be added to the operation group number of the current operation group. After modification, the operation group number of the current operation group can be 2.
[0077] Step S120c: group sub-operations with the same operation number into the same operation group.
[0078] For example, as shown in FIG3 , the operation numbers of all sub-operations can be set to the initial operation numbers, for example, to 0; at the same time, the operation group number of the current operation group is set to the initial value, for example, it can also be 0; first traverse the first sub-operation 37, because the operation number of sub-operation 37 is the initial operation number 0 at this time, therefore, the operation group number of the current operation group is modified from the initial operation number 0 to the target value 1, and the operation number of sub-operation 37 is set to the target value 1; then obtain the adjacent sub-operation of sub-operation 37, that is, sub-operation 38, because the operation number of the adjacent sub-operation 38 is 0, the operation number of the adjacent sub-operation 38 is set to the target value 1; then, for the adjacent sub-operation 38, continue to obtain the corresponding adjacent sub-operations, that is, sub-operation 37 and sub-operation 40, because the operation number of the adjacent sub-operation 40 is 0, so the operation number of the adjacent sub-operation 40 is set to the target value 1, and so on, for the adjacent sub-operation 40 (the operation number of the sub-operation 37 is not 0 at this time, so there is no need to continue processing the adjacent sub-operation 37), continue to obtain the corresponding adjacent sub-operation... until the sub-operation 42 is used as the adjacent sub-operation, its next sub-operation cannot be obtained (because the sub-operation 42 is the main operation, and before this, the sequential relationship between all main operations and their next sub-operations has been deleted), so the related operations of the sub-operation 37 are ended, and since the operation numbers of the sub-operations 37-42 are the same, both are 1, the sub-operations 37-42 are divided into the same operation group, so that the "sub-operations of the first main operation that are executed earlier than the main operation and the main operation are regarded as an operation group" in step S120 can be achieved.
[0079] Since it is impossible to obtain the next adjacent sub-operation after sub-operation 42, it is necessary to traverse the next sub-operation in the ordered operation group. At this time, traverse sub-operation 38, that is, the current sub-operation is 38. Continue with the above steps. Since the operation numbers of sub-operations 38-42 are not the initial operation numbers, continue to traverse sub-operation 43. At this time, the current sub-operation is sub-operation 43, and the operation number of sub-operation 43 is the initial operation number 0. Therefore, it is necessary to modify the operation group number of the current operation group. Therefore, the operation group number of the current operation group is changed from 1 to 2, and the operation number of the current sub-operation 43 is set to 2; obtain the adjacent sub-operation of sub-operation 43, that is, sub-operation 44. Since the operation number of sub-operation 44 is the initial operation number, the operation number of the adjacent sub-operation 44 is set to the current operation group operation number 2. And so on. For this adjacent sub-operation 44, continue to obtain the corresponding adjacent sub-operation, that is, sub-operation 45 Since the operation number of sub-operation 45 is the initial operation number, the operation number of the adjacent sub-operation 45 is set to the current operation group operation number 2. For the adjacent sub-operation 45, continue to obtain its adjacent sub-operations 46 and 47. Similarly, the operation numbers of the adjacent sub-operations 46, 47, 48, and 49 are set to the current operation group operation number 2. When sub-operation 49 is used as an adjacent sub-operation, its next sub-operation cannot be obtained (because sub-operation 49 is the main operation, and the sequential relationship between all main operations and their next sub-operations has been deleted before), so the related operations of sub-operation 43 are terminated. Since the operation numbers of sub-operations 43-sub-operation 49 are the same, which is 2, sub-operations 43-sub-operation 49 are divided into the same operation group. In this way, the "sub-operations between the two adjacent main operations in the ordered operation group and the main operation executed later of the two adjacent main operations are taken as another operation group" in step S120 can be achieved.
[0080] Since the next adjacent sub-operation cannot be obtained after sub-operation 49, it is necessary to traverse the next sub-operation in the ordered operation group. At this time, traverse sub-operation 44, that is, the current sub-operation is 44. Continue with the above steps. Since the operation numbers of sub-operations 44-49 are not the initial operation numbers, continue to traverse sub-operation 50, and the operation number of sub-operation 4503 is the initial operation number 0, so it is necessary to modify the operation group number of the current operation group. Therefore, the operation group number of the current operation group is changed from 2 to 3. Through similar methods as mentioned above, until the traversal is completed, the operation number of sub-operation 50 and sub-operation 51 is 3. In this way, it can be achieved: the sub-operation of the last main operation that is executed later than the main operation is used as another operation group.
[0081] In the above technical solution, by adopting step S120a, step S120b and step S120c, all sub-operations in the ordered operation group are grouped, so that each group can be considered as a whole in actual application, thereby effectively improving the execution efficiency of the automation process.
[0082] For example, the above method can also be implemented with the help of a stack. FIG6 shows a schematic flow chart of a specific implementation of step S120 according to an embodiment of the present application. Step S120 may include step S121, step S122, and step S123. Specifically:
[0083] Step S121: Create a new stack and initialize it to be empty;
[0084] As you can understand, a stack, also known as a stack, is a linear list with restricted operations. This is a linear list where insertion and removal (deletion) operations are limited to the end of the list. This end is called the top of the stack, and the other end is called the bottom of the stack. Inserting a new element into a stack is also called pushing, which is to place the new element on top of the stack element, making it the new top element; removing an element from a stack is to remove the top element from the stack, making its adjacent element the new top element. The elements here can be understood as sub-operations in an ordered operation group.
[0085] Step S122: setting an initial operation number for each sub-operation in the ordered operation group, and setting the operation group number of the current operation group to the initial value;
[0086] For example, each sub-operation in the ordered operation group can be set with a corresponding initial operation number, for example, it can be set to 0; similarly, the operation group number of the current operation group can also be set to an initial value, for example, the initial value can also be 0. It can be understood that the operation number represents the sub-operation, and the operation group number represents the operation group composed of one or more sub-operations. For example, sub-operations 37 to sub-operations 51 in Figure 3 can each have an initial operation number of 0; and after grouping, multiple operation sets are formed, each operation group has its own operation group number, that is, sub-operation 37 → sub-operation 38 (sub-operation 39) → sub-operation 40 → sub-operation 41 → sub-operation 42 in Figure 3 can be considered as an operation group.
[0087] Step S123: Traverse each sub-operation in the ordered operation group, and if the operation number of the sub-operation is the initial operation number, perform the following steps:
[0088] Step S123a: Modify the operation group number of the current operation group to the target value; and push the sub-operation into the stack;
[0089] For example, in the ordered operation group shown in FIG3 , the first sub-operation 37 is traversed in the ordered operation group. Since the operation number of sub-operation 37 is the initial operation number (set in step S122 ), the operation group number of the current operation group can be modified to the target value, that is, the operation group number of the current operation group is modified from the initial value (e.g., 0) to the target value, e.g., the target value is 1. Correspondingly, sub-operation 37 is pushed onto the stack. Since the stack is empty before sub-operation 37 is pushed onto the stack, sub-operation 37 is now at the top of the stack.
[0090] In step S123a, when the operation number of the sub-operation is the initial operation number, the operation group number of the current operation group is modified to the target value. It should be noted that only when the operation number of the sub-operation (which can be understood as the current sub-operation) is the initial operation number when traversing the sub-operation, the operation group number of the current operation group needs to be modified to the target value; based on this situation, there may be multiple modifications to the operation group number of the current operation group. It can be understood that the target value is a general concept, and it does not mean that the operation group number of the current operation group needs to be modified to the same value every time. In this case, the grouping is meaningless. Therefore, it can be understood that each time the operation number of the current operation group needs to be modified, the target value is different. For example, when the operation group number of the current operation group needs to be modified, the operation group number of the current operation group can be increased by 1. As mentioned above, when the operation group number of the current operation group is the initial value 0, if the operation group number of the current operation group needs to be modified, 3 and 4 , when traversing sub-operation 37, since the operation number of sub-operation 37 is the initial operation number (for example, 0), the operation group number of the current operation group is modified (in this embodiment, the operation group number of the current operation group is 0) to the target value, which is recorded as the first target value; and when traversing sub-operation 43, since the operation number of sub-operation 43 is the initial operation number (for example, 0), the operation group number of the current operation group needs to be modified to the second target value. It can be understood that the first target value and the second target value are different, for example, the first target value is 1 and the second target value is 2; that is, when the operation group number of the current operation group needs to be modified for the second time, the operation group number of the current operation group is 1, so 1 can be added to the operation group number of the current operation group. After the modification, the operation group number of the current operation group can be 2.
[0091] Step S123b: If the stack is not empty, the following steps are executed: the sub-operation at the top of the stack is retrieved, and if the operation number of the sub-operation is the initial operation number, the operation number of the sub-operation is set to the target value, which is recorded as a retrieve step; the adjacent sub-operation of the sub-operation is retrieved, and if the operation number of the adjacent sub-operation is the initial operation number, the adjacent sub-operation is pushed into the stack, which is recorded as a push step;
[0092] For example, for a sub-operation, its adjacent sub-operations may be one or more. In one embodiment, sub-operation 37 has only one adjacent sub-operation, namely, sub-operation 38, while sub-operation 40 has three adjacent sub-operations, namely, sub-operation 39, sub-operation 38, and sub-operation 41. Sub-operation 38 has two adjacent sub-operations, namely, sub-operation 37 and sub-operation 40. Of course, for some more complex automation processes, there may be four, five, or even more sub-operations for a single sub-operation, which is well understood by those skilled in the art and will not be elaborated on here.
[0093] Exemplarily, as described above, since there is sub-operation 37 in the stack, the stack is not empty, so the taking out step and the pushing step continue to be executed. Specifically, continue to refer to Figure 3 to take out the sub-operation 37 at the top of the stack. Since the operation number of the sub-operation is the initial operation number 0, the operation number of the sub-operation 37 is set to the above-mentioned target value, that is, the operation group number of the current operation group, that is, 1; for the pushing step, the adjacent sub-operation 38 of the sub-operation 37 is obtained. Since the operation number of the adjacent sub-operation 38 is 0, the adjacent sub-operation 38 is pushed into the stack. Since the sub-operation 37 has been taken out of the stack, there is only sub-operation 38 in the stack at this time, and the sub-operation 38 is at the top of the stack.
[0094] Step S123c: Determine again whether the stack is empty. If the stack is not empty, continue looping the above steps of taking out and pushing.
[0095] Exemplarily, as described above, since the stack now contains sub-operation 38, the stack is not empty, and thus the above-mentioned steps of removing and pushing are continued. Specifically, referring to FIG3 , sub-operation 38 at the top of the stack is removed. Since the operation number of sub-operation 38 is the initial operation number 0, the operation number of sub-operation 38 is set to the target value, i.e., the operation group number of the current operation group, i.e., 1. The adjacent sub-operations of sub-operation 38, i.e., sub-operation 37 and sub-operation 40, are obtained. Since the operation number of adjacent sub-operation 40 is 0, adjacent sub-operation 40 is pushed onto the stack. Since sub-operation 38 has already been removed from the stack, only sub-operation 40 remains on the stack at this time, and sub-operation 40 is at the top of the stack, while the operation number of sub-operation 37 is 1 (the operation number of sub-operation 37 has been set to 1 in steps S132a-4b), which is not the initial operation number, and therefore, there is no need to push onto the stack. It is further determined that the stack is not empty, and the above-mentioned steps of removing and pushing are continued until the stack is empty. It should be noted that since the sequential relationship between sub-operation 42 (main operation) and its next sub-operation (sub-operation 43) has been deleted in the previous step, sub-operation 43 will not be obtained when obtaining the adjacent sub-operation of sub-operation 42.
[0096] In one embodiment, adjacent sub-operations may be obtained simultaneously or sequentially. For example, the sub-operation before a sub-operation may be defined as the source sub-operation, and the sub-operation after the sub-operation may be defined as the adjacent sub-operation. For example, for sub-operation 40, the source sub-operations of sub-operation 40, i.e., sub-operation 38 and sub-operation 39, may be obtained first. Since the operation number of sub-operation 39 is the initial operation number 0, sub-operation 39 is pushed onto the stack. At this time, only sub-operation 39 remains on the stack (sub-operation 38 has been removed). , located at the top of the stack, continue to obtain the adjacent sub-operation of sub-operation 40, that is, sub-operation 41. Since the operation number of sub-operation 41 is the initial operation number 0, sub-operation 41 is pushed into the stack. At this time, there are sub-operation 41 and sub-operation 39 from top to bottom in the stack. Since sub-operation 39 is overwritten when sub-operation 41 is pushed into the stack, sub-operation 41 is at the top of the stack at this time. In this way, after continuing to judge whether the stack is not empty, when taking out the sub-operation at the top of the stack, the sub-operation taken out is 41. In the subsequent stacking step, the adjacent sub-operation obtained is 42.
[0097] Step S123d: If the stack is empty, determine whether the traversal is complete. If not, continue traversing the next sub-operation in the ordered operation group until all sub-operations are divided into corresponding operation groups.
[0098] For example, as described above, after processing the six sub-operations of sub-operation 37 to sub-operation 42, the stack is empty. At this time, it is obvious that the traversal has not ended (only sub-operation 37 has been traversed), so the traversal continues to sub-operation 38. For sub-operation 38, the process returns to step S132a-4. Since the operation number of sub-operation 38 at this time is not the initial operation number (as can be seen from the above, the operation number of sub-operation 38 is 1 at this time), there is no need to continue to execute steps S132a-4a to step S132a-4c (at this time the stack is still empty), and the above traversal is continued to be judged. Obviously, it has not ended. Sub-operation 38-sub-operation 42 is the same as sub-operation 37. There is no need to continue executing steps S132a-4a-step S132a-4c (the stack is still empty at this time). Continue to traverse sub-operation 43. Since the operation number of sub-operation 43 is the initial operation number, it is necessary to continue executing steps S132a-4a-step S132a-4c, modify the operation group number of the current operation group to the target value (for example, modify it to 2); and push the sub-operation into the stack. The details of steps S132a-4a-step S132a-4c are similar to the other steps introduced above and will not be repeated here.
[0099] Therefore, the above method can be used to group the sub-operations in the automation process. For example, the ordered operation group in Figure 3 is grouped, and the grouping result is sub-operation 37, sub-operation 38, sub-operation 39, sub-operation 40, sub-operation 41, and sub-operation 42. The operation numbers corresponding to these sub-operations are all 1, so they belong to the same operation group (the first operation group, that is, the sub-operations of the first main operation that are executed earlier than the main operation and the main operation are regarded as an operation group. The first main operation is 42. In the ordered operation group, the sub-operations before the sub-operation are all executed earlier than the main operation 42). Sub-operation 43, sub-operation 44, sub-operation 45, sub-operation 46, sub-operation 47, sub-operation 48, and sub-operation 49 all have operation numbers corresponding to them. Therefore, they belong to the same operation group (the second operation group, that is, the sub-operations between the two adjacent main operations in the ordered operation group and the main operation executed later of the two adjacent main operations are another operation group, sub-operations 43 to sub-operation 48 are all executed between main operation 42 and main operation 49, and main operation 49 is obviously executed later than main operation 42. It can be understood that according to the number of main operations, there can be two or more second operation groups, and the operation numbers corresponding to sub-operation 50 and sub-operation 51 are both 3, so they belong to the same operation group (the third operation group, that is, the sub-operations of the last main operation executed later than the main operation are another operation group, the last main operation is 49, and the sub-operations executed later than the main operation are 50 and 51).
[0100] Exemplarily, the above method may further include step S130. Specifically:
[0101] S130: Based on the ordered operation group, determine the execution order of each main operation in the ordered operation group to obtain the ordered main operation.
[0102] In an ordered operation group, each sub-operation is in order, and the main operation is also a sub-operation in the ordered operation group. Therefore, the order of each main operation can be determined based on the ordered operation group.
[0103] Exemplarily, in the embodiment corresponding to FIG3 , the order of the main operations determined according to the ordered operation group is sub-operation 42 (main operation) → sub-operation 49 (main operation), that is, the main operation corresponding to sub-operation 42 comes first, and the main operation corresponding to sub-operation 49 comes later.
[0104] For example, in combination with FIG3 and the flowchart of the main operation path calculation (i.e., determining the ordered main operation) in the embodiment shown in FIG5, for the embodiment shown in FIG3, the ordered main operation is determined as follows: first, the sub-operations that are not the main operation are deleted, leaving only the main operation, i.e., sub-operation 42 and sub-operation 49 (sub-operation 42→sub-operation 49); a new stack is created and initialized to be empty (the stack will be described in detail below); sub-operation 42 is pushed into the stack, and it is determined whether the stack is empty. If the stack is not empty, the sub-operation at the top of the stack, i.e., sub-operation 42, is obtained; it is determined whether the sub-operation at the top of the stack is the end point. If not, the first unvisited edge is obtained. (It can also be understood as obtaining the sequential relationship between the sub-operation and the next sub-operation. If it is not obtained, it means that the sub-operation has no next sub-operation. If it can be obtained, it means that the sub-operation has a corresponding next sub-operation). If the edge is not empty, the sub-operation corresponding to the edge is pushed into the stack, that is, sub-operation 49 is pushed into the stack; continue to judge whether the stack is empty. When the stack is not empty (from top to bottom in the stack: 49, 42), obtain the vertex at the top of the stack, that is, sub-operation 49; judge whether the sub-operation 49 at the top of the stack is the end point. If not, obtain the first unvisited edge again and continue the loop; if so, output the main operation path sub-operation 42 → sub-operation 49;
[0105] The top vertex 49 is popped from the stack. If the stack is not empty, the top vertex, i.e., vertex 42, is obtained. Since vertex 42 is not the end vertex, the first unvisited edge is obtained. If there is none, backtrack (pop vertex 42 and keep backtracking until a new edge is obtained. If no new edge is obtained until the stack is empty, the backtracking ends). It is determined again whether the stack is empty. If the stack is empty, the result is output. This embodiment has only one path.
[0106] After step S120, the process further includes S140 and S150, specifically:
[0107] S140: traverse each operation group to determine the intersection of the sub-operations contained in the operation group and the ordered main operations;
[0108] Traversing each operation group in step S120, for example, referring to FIG4 , traversing the first operation group 61, the sub-operations contained in this operation group are sub-operation 37 - sub-operation 42, and the ordered main operation determined in step S131 is sub-operation 42 (main operation) → sub-operation 49 (main operation), so the intersection of the two is sub-operation 42 (main operation). When traversing the second operation group 62, the sub-operations contained in this operation group 42 are sub-operation 43 - sub-operation 49, and the ordered main operation determined in step S131 is sub-operation 42 (main operation) → sub-operation 49 (main operation), so the intersection of the two is sub-operation 49 (main operation). For the third operation group 63, it is obvious that its intersection with the ordered main operation is empty.
[0109] S150: When the intersection is not empty, determine whether each sub-operation in the corresponding operation group belongs to the same operation set as the main operation based on the position of the main operation in the ordered main operations in the intersection and the corresponding relationship between each sub-operation in the operation group and the main operation, so as to complete the grouping of the sub-operations, wherein the corresponding relationship is the corresponding relationship between the main operation and the auxiliary operation.
[0110] For example, the position of the main operation in the intersection in the ordered main operations includes whether the main operation is the first main operation in the ordered main operations. If it is the first main operation, all sub-operations in the operation group belong to the first operation set; if it is not the first main operation, the operation set to which it belongs is determined based on the correspondence between each sub-operation and the main operation. The correspondence between the main operation and the auxiliary operations (sub-operations other than the main operation) has been introduced above and will not be repeated here.
[0111] In the above technical solution, the grouping result of step S120 is further optimized by adopting steps S140 and S150, so that the sub-operations in the ordered operation group can be accurately grouped, and each group can be considered as a whole in practical applications, thereby effectively improving the execution efficiency of the automation process.
[0112] Exemplarily, step S150 may include step S151 and step S152. Specifically:
[0113] Step S151: when the main operation in the intersection is the first main operation in the ordered main operations, all sub-operations in the current operation group are grouped into one operation set;
[0114] Exemplarily, referring to the embodiments shown in Figures 3 and 4, for the first operation group 61 (including sub-operations 37-sub-operation 42), the intersection of this operation group and the ordered main operation (including sub-operation 42 and sub-operation 49) is sub-operation 42, which is the first main operation. Therefore, all sub-operations in the first operation group 61 belong to the same operation set, which is also the first operation set in this embodiment.
[0115] Step S152: When the main operation in the intersection is not the first main operation in the ordered main operations, determine whether each sub-operation in the corresponding operation group belongs to the same operation set as the main operation according to the following method:
[0116] S152a: In the case where the sub-operation in the corresponding operation group is the main operation, the main operation belongs to another operation set;
[0117] S152b: In the case where the sub-operation in the corresponding operation group is an auxiliary operation, based on the corresponding relationship between the auxiliary operation and the previous main operation, determine whether the auxiliary operation belongs to the same operation set as the main operation.
[0118] Exemplarily, in step S152b, for the case where the sub-operation in the operation group is an auxiliary operation, and the auxiliary operation and the main operation do not belong to the same operation set, it is determined whether the auxiliary operation and the subsequent main operation belong to the same operation set based on the correspondence between the auxiliary operation and the subsequent main operation. Continuing to refer to the embodiment shown in Figure 3, for the second operation group 42 (including sub-operations 43-sub-operations 49), the intersection of this operation group and the ordered main operation (including sub-operations 42 and sub-operations 49) is sub-operation 49, which is not the first main operation. Therefore, it is necessary to traverse each sub-operation in the second operation group 42 to determine whether all sub-operations in the second operation group 42 belong to the first operation set or the next operation set. Specifically, for sub-operation 43, since this sub-operation 43 is not a main operation but an auxiliary operation, and this sub-operation 43 is the post-operation of the previous main operation (sub-operation 42) (the correspondence between the main operation and the auxiliary operation), this sub-operation 43 and the main operation (sub-operation 42) belong to the same operation set. As mentioned above, sub-operation 42 already belongs to the first operation set (the previous operation set), so sub-operation 43 also belongs to the first operation set; similarly, sub-operation 44 and sub-operation 47 also belong to the first operation set. For sub-operation 45, since this sub-operation 45 is not a main operation but an auxiliary operation, and this sub-operation 45 is the previous operation of the subsequent main operation (sub-operation 49) (the correspondence between the main operation and the auxiliary operation), this sub-operation 45 and the subsequent main operation (sub-operation 49) belong to the same operation set.
[0119] In the above technical solution, combined with the logical diagram shown in Figure 7, the sub-operations can be grouped in actual application scenarios (such as process termination scenarios), and on this basis, the corresponding operation set can be considered as a whole to determine which steps need to be retained and how to create new sub-operations, thereby effectively improving processing efficiency. This technical solution can also be applied to other scenarios, such as calculation of candidate sets to be scheduled, planning parameter construction, equipment allocation, resource locks, etc. Specifically, 1) Calculation of candidate sets to be scheduled: After the process starts running, each sub-operation must be added to the list to be scheduled before it starts execution. When a sub-operation should be added to the list to be scheduled, it is necessary to determine the dependency between the sub-operations and meet the conditions such as the equipment resource occupancy relationship, board position occupancy relationship, cover position occupancy relationship, and planning time. When judging these conditions, it is not possible to do so by simply looking at a single sub-operation. It is necessary to consider the set to which the sub-operation belongs as a whole according to this application. 2) Planning Parameter Construction: Planning requires not only information about each sub-operation, but also information about device resources, board slot occupancy, cover slot occupancy, time constraints, and more. Some of this information, such as the preceding and following operations associated with the main operation, must be calculated using this application. This information is passed as parameters to the planning process. 3) Equipment Allocation: A system may contain more than one device of the same type, hence the concept of a device pool. Therefore, the device type selected during process design will change during process execution based on the number of devices in the pool and the device pool usage strategy. Specifically, the final device to be used must be determined in the first step of planning, which involves assigning a device to each sub-operation. Since a main operation and its associated preceding and following operations generally belong to the same device, they must also be considered as a whole, according to the set determined in this application. 4) Resource Locking: A device can be considered a resource, and several sub-operations can use the same device resource. As soon as any sub-operation begins executing, the corresponding device resource enters a locked state, making it unavailable to other flows. Furthermore, during process execution, dynamic planning may occur due to scenarios such as device online and offline or branch switching. Therefore, the locked state of device resources must be used to determine when sub-operations of other fluxes can use locked devices. Therefore, in this case, the operation set corresponding to the sub-operation must also be considered as a whole.
[0120] Exemplarily, each operation group is traversed to determine the intersection of the sub-operations contained in the operation group and the ordered main operations. If the intersection is empty, all sub-operations in the current operation group are included in the last operation set.
[0121] For example, when traversing an operation group, if the intersection of the sub-operations in the operation group and the ordered main operations is empty, then the entire operation group is the same as the last operation set. In the embodiment shown in Figure 4, the intersection of the third operation group 43 (sub-operations 50 and 51) and the ordered main operations (sub-operations 42 and 49) is empty, so all sub-operations in the third operation group 43 belong to the last operation set.
[0122] Exemplarily, the automated process includes a starting node, one or more intermediate nodes, and an ending node. The starting node indicates the location of the sample before the start of the automated process, and the ending node indicates the location of the sample after the end of the automated process. The intermediate nodes include a device node, which is used to indicate the location corresponding to the sample when performing related operations between the starting position and the ending position; wherein the device node can be considered as an intermediate node. The starting node corresponds to multiple samples. Before step S120, it includes: taking the sample as a unit, based on the ordered operation group, determining the ordered operation group corresponding to the sample. In this case, in step S120, based on the determined ordered operation group corresponding to the sample, the sub-operations of each ordered operation group are grouped accordingly.
[0123] It can be understood that the above technical solution is mainly applicable to situations where there are multiple samples in an automated process. That is to say, there is a corresponding relationship between the ordered operation group and the sample. Therefore, the essence of the ordered operation group is related to the sample, or it is centered on the sample. For example, whether it is the main operation or the previous operation or the subsequent operation, some operations are performed on the sample.
[0124] According to the above technical solution, when there are multiple samples, the sample can be used as the core, and a series of ordered operation groups can be obtained based on the correspondence between the pre-set sample and each node in the automated process. These ordered operation groups can also determine the correspondence between the sample and the ordered operation group based on the previous connection relationship between each node, so that accurate grouping can be performed from the perspective of the sample, and then some specific application scenarios can be efficiently processed or executed, which is more applicable and easier to promote.
[0125] For example, for some application scenarios, the ordered operation group can also be obtained based on the connection relationship of each node and some special needs that arise during the operation process. For example, the dynamic tip-requiring scenario is that when the pipette workstation lacks a pipette tip during the process operation, it is necessary to insert the pipette tip to load the material, thereby obtaining an ordered operation group. As shown in Figure 8, this is a schematic diagram of the ordered operation group obtained by the connection relationship of each node in the automation process of another embodiment of the present application, specifically a schematic diagram of the ordered operation group for dynamic tip-requiring, wherein sub-operation 6-sub-operation 10 is the inserted pipette tip loading, specifically, sub-operation 6 is the transfer of the empty material tray of the pipette tip out of the pipette workstation, sub-operation 7 and sub-operation 8 are the robot arm transporting the material tray into the pipette workstation, sub-operation 9 is the transfer of the pipette tip material tray inside the pipette workstation, and sub-operation 10 is the newly inserted main operation (because the main operation corresponding to sub-operation 3 cannot be performed due to the lack of a pipette tip, so the main operation needs to be reinserted). Through the above technical solution, sub-operation 1, sub-operation 2, and sub-operation 3 (main operation) belong to an operation group, and sub-operation 6-sub-operation 10 are the newly inserted main operation (because the main operation corresponding to sub-operation 3 cannot be performed due to the lack of a pipette tip, so the main operation needs to be reinserted). Operation 10 belongs to the second operation group, sub-operation 4 and sub-operation 5 belong to the third operation group. The first, second and third operation groups are traversed respectively through the above technical solution. Since sub-operation 6 is the post-operation of sub-operation 3 (main operation), sub-operation 9 is the pre-operation of sub-operation 10 (main operation), and sub-operations 6, 7, 8, and 9 are steps for transferring the gun tip from sub-operation 3 (main operation) to sub-operation 10 (main operation), they can be regarded as serving sub-operation 3 (main operation) as well as serving sub-operation 10 (main operation). Therefore, sub-operations 6, 7, 8, and 9 are shared operations. Therefore, sub-operations 1-sub-operation 3 and sub-operations 6-9 (6 sub-operations) belong to the same operation set, and sub-operation 4-sub-operation 10 belong to another operation set. Therefore, shared operations can include not only transfer operations and reversing operations, but also other operations. Whether a sub-operation is a shared operation depends on the relationship between the sub-operation and the previous main operation and the next main operation, or whether the sub-operation serves the devices corresponding to the two main operations at the same time. For example, corresponding to a door opening sub-operation, since it only serves the device corresponding to one main operation, the door opening sub-operation will not be a shared operation. The transport operation and reversing operation are used when transporting samples between two devices. Therefore, they serve the devices corresponding to the two main operations and are therefore shared operations.
[0126] The above technical solution can also be applied to special scenarios such as dynamic gun head, and can also quickly and effectively handle these application scenarios and control the execution of corresponding processes.
[0127] In the present application, in actual application scenarios (such as process termination scenarios), the process is processed and controlled by the grouping method of sub-operations in the automation process provided by the present application, which can effectively improve the processing efficiency. Specifically, during the operation of the automation process, it is necessary to execute the "terminate" command on the automation process. At this time, the sub-operations are first grouped using the grouping method provided by the present application to form multiple operation groups, and then the corresponding operation groups are regarded as a whole to consider subsequent related issues or steps. Compared with the method of deleting the remaining unexecuted sub-operations and adding them to the specified position, the grouping method of sub-operations in the automation process provided by the present application is used to process some special application scenarios (such as process termination) with high efficiency and strong reusability. This advantage is particularly obvious for complex automation processes.
[0128] According to a second aspect of the present application, a method for controlling an automated process is further provided, including a method for grouping sub-operations in the automated process. Specifically, in the control method, the sub-operations in the automated process are first grouped, and then the execution of the automated process is controlled based on the grouping results.
[0129] According to a third aspect of the present application, a control device for an automated process is also provided. FIG9 shows a schematic block diagram of a control device 800 for an automated process according to an embodiment of the present application. As shown in FIG9 , the device 800 may include an acquisition module 810 and a grouping module 820 .
[0130] The acquisition module 810 can be used to obtain an ordered operation group of an automated process, wherein the ordered operation group is obtained based on at least the connection relationship between each node in the automated process. The ordered operation group includes multiple ordered sub-operations, and the execution time of the sub-operations with an earlier order is earlier than the execution time of the sub-operations with a later order. The types of sub-operations include main operations and auxiliary operations other than the main operation. The main operation is the operation corresponding to the device node and corresponds to the main function of the device node.
[0131] The grouping module 820 can be used to, based on the ordered operation group, group the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group, group the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and group the sub-operations of the last main operation that are executed later than the main operation as yet another operation group.
[0132] According to a fourth aspect of the present application, an electronic device is also provided. Figure 10 shows a schematic block diagram of an electronic device 900 according to an embodiment of the present application. As shown in Figure 10, the electronic device 900 includes a processor 910 and a memory 920. The memory 920 stores computer program instructions, which, when executed by the processor 910, are used to execute the grouping method 100 for the sub-operations in the above-described automated process.
[0133] According to a fifth aspect of the present application, a storage medium is also provided. Program instructions are stored on the storage medium, and the program instructions are used to execute the grouping method 100 of the sub-operations in the above-mentioned automated process when running. The storage medium may include, for example, a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.
[0134] A person skilled in the art can understand the specific implementation scheme of the control device, electronic device and storage medium of the above-mentioned automation process by reading the above-mentioned description of the grouping method of sub-operations in the automation process and the control method of the automation process. For the sake of brevity, it will not be repeated here.
[0135] Example
[0136] Embodiment 1. A method for grouping sub-operations in an automated process, wherein the automated process is connected by a plurality of nodes, each of which includes at least one device node; the method comprising:
[0137] Obtaining an ordered operation group of the automated process, wherein the ordered operation group is obtained based on at least a connection relationship between nodes in the automated process, the ordered operation group includes a plurality of ordered sub-operations, an execution time of an earlier sub-operation is earlier than an execution time of a later sub-operation, the sub-operations include a main operation and auxiliary operations other than the main operation, and the main operation is an operation corresponding to the device node and corresponds to a primary function of the device node;
[0138] Based on the ordered operation group, the sub-operations of the first main operation that are executed earlier than the main operation and the main operation are taken as one operation group, the sub-operations between two adjacent main operations in the ordered operation group and the main operation executed later than the two adjacent main operations are taken as another operation group, and the sub-operations of the last main operation that are executed later than the main operation are taken as yet another operation group.
[0139] Embodiment 2. The method of embodiment 1, wherein, before the step of combining, based on the ordered operation group, the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group, combining the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and combining the sub-operations of the last main operation that are executed later than the main operation as yet another operation group, the step of:
[0140] Based on the ordered operation group, the order relationship between all main operations and their next sub-operations in the ordered operation group is deleted.
[0141] Embodiment 3. The method of embodiment 1 or 2, wherein, based on the ordered operation group, the sub-operations of the first main operation that are executed earlier than the main operation and the main operation are taken as one operation group, the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations are taken as another operation group, and the sub-operations of the last main operation that are executed later than the main operation are taken as yet another operation group, including:
[0142] Setting an initial operation number for each sub-operation in the ordered operation group, and setting the operation group number of the current operation group to the initial value;
[0143] Traverse each sub-operation in the ordered operation group, and if the operation number of the sub-operation is the initial operation number, perform the following steps:
[0144] Modify the operation group number of the current operation group to the target value; set the operation number of the current sub-operation to the target value; obtain the adjacent sub-operation of the sub-operation, and if the operation number of the adjacent sub-operation is the initial operation number, set the operation number of the adjacent sub-operation to the target value; and so on, for the adjacent sub-operation, continue to obtain the corresponding adjacent sub-operation, and if the operation number of the adjacent sub-operation is the initial operation number, set the operation number of the adjacent sub-operation to the target value, until the adjacent sub-operation cannot continue to obtain the next adjacent sub-operation, traverse the next sub-operation in the ordered operation group, and the target value obtained by each modification during traversal is different;
[0145] Group sub-operations with the same operation number into the same operation group.
[0146] Embodiment 4. The method according to any one of Embodiments 1 to 3, wherein, based on the ordered operation group, the sub-operations of the first main operation that are executed earlier than the main operation and the main operation are taken as one operation group, the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations are taken as another operation group, and the sub-operations of the last main operation that are executed later than the main operation are taken as yet another operation group, including:
[0147] Create a new stack and initialize it to empty;
[0148] Setting an initial operation number for each sub-operation in the ordered operation group, and setting the operation group number of the current operation group to the initial value;
[0149] Traverse each sub-operation in the ordered operation group, and if the operation number of the sub-operation is the initial operation number, perform the following steps:
[0150] Modify the operation group number of the current operation group to the target value; and push the sub-operation into the stack;
[0151] If the stack is not empty, perform the following steps:
[0152] Taking out the sub-operation at the top of the stack, if the operation number of the sub-operation is the initial operation number, then setting the operation number of the sub-operation to the target value, which is recorded as the taking step;
[0153] Obtaining an adjacent sub-operation of the sub-operation, and if the operation number of the adjacent sub-operation is the initial operation number, pushing the adjacent sub-operation into a stack, which is recorded as a stacking step;
[0154] Determine again whether the stack is empty. If the stack is not empty, continue to loop the above steps of taking out and pushing;
[0155] When it is determined that the stack is empty, it is determined whether the traversal is completed. If not, the traversal continues to the next sub-operation in the ordered operation group until all sub-operations belong to the corresponding operation group.
[0156] Embodiment 5. The method according to any one of embodiments 1 to 4, further comprising: determining, based on the ordered operation group, a sequence of execution of each main operation in the ordered operation group to obtain an ordered main operation;
[0157] After the method of combining, based on the ordered operation group, the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group, combining the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and combining the sub-operations of the last main operation that are executed later than the main operation as yet another operation group, the method further includes:
[0158] Traverse each operation group and determine the intersection of the sub-operations contained in the operation group and the ordered main operations;
[0159] When the intersection is not empty, determine whether each sub-operation in the corresponding operation group belongs to the same operation set as the main operation based on the position of the main operation in the ordered main operations in the intersection and the corresponding relationship between each sub-operation in the operation group and the main operation, so as to complete the grouping of the sub-operations, wherein the corresponding relationship is the corresponding relationship between the main operation and the auxiliary operation.
[0160] Embodiment 6. The method of any one of Embodiments 1 to 5, wherein, when the intersection is not empty, determining whether each sub-operation in the corresponding operation group belongs to the same operation set as the main operation based on the position of the main operation in the ordered main operations in the intersection and the corresponding relationship between each sub-operation in the operation set and the main operation, so as to complete the grouping of the sub-operations, includes:
[0161] When the main operation in the intersection is the first main operation in the ordered main operations, all sub-operations in the current operation group belong to the same operation set;
[0162] When the main operation in the intersection is not the first main operation in the ordered main operations, determine whether each sub-operation in the corresponding operation group belongs to the same operation set as the main operation according to the following method:
[0163] In the case where a sub-operation in the corresponding operation group is the main operation, the main operation belongs to another operation set;
[0164] In the case where the sub-operation in the corresponding operation group is an auxiliary operation, based on the corresponding relationship between the auxiliary operation and the previous main operation, it is determined whether the auxiliary operation belongs to the same operation set as the main operation.
[0165] Example 7. A method as described in any one of Examples 1 to 6, wherein, for the case where the sub-operation in the operation group is an auxiliary operation, when the auxiliary operation and the main operation do not belong to the same operation set, it is determined whether the auxiliary operation and the subsequent main operation belong to the same operation set based on the corresponding relationship between the auxiliary operation and the subsequent main operation.
[0166] Embodiment 8. The method as described in any one of embodiments 1 to 7, wherein, when the intersection is empty, all sub-operations in the current operation group belong to the last operation set.
[0167] Embodiment 9. A method for controlling an automated process, comprising the method for grouping sub-operations in the automated process described in any one of embodiments 1 to 8 above.
[0168] Embodiment 10. A device for grouping sub-operations in an automated process, wherein the automated process is connected by a plurality of nodes, each of which includes at least one device node; the device comprising:
[0169] an acquisition module, configured to acquire an ordered operation group of the automated process, wherein the ordered operation group is obtained based at least on a connection relationship between nodes in the automated process, the ordered operation group includes a plurality of ordered sub-operations, an execution time of an earlier sub-operation is earlier than an execution time of a later sub-operation, the sub-operations include a main operation and auxiliary operations other than the main operation, the main operation is an operation corresponding to the device node and corresponds to a primary function of the device node;
[0170] A grouping module is used to, based on the ordered operation group, group the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group, group the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and group the sub-operations of the last main operation that are executed later than the main operation as yet another operation group.
[0171] Embodiment 11. An electronic device comprises 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 grouping method of sub-operations in the automation process as described in any one of Embodiments 1 to 8 when the processor is executed.
[0172] Embodiment 12. A storage medium having program instructions stored thereon, wherein the program instructions are used to execute the method for grouping sub-operations in an automated process as described in any one of embodiments 1 to 8 when running.
[0173] 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.
[0174] 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.
[0175] 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.
[0176] 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.
[0177] 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.
[0178] 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.
[0179] 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.
[0180] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some modules in the panel detection device according to the embodiment of the present application. The present application can also be implemented as a device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing 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.
[0181] 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.
[0182] 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 grouping sub-operations in an automated process, characterized in that: The automation process is formed by connecting a plurality of nodes, wherein the nodes include at least one device node; the method includes: Acquire an ordered operation group of the automation process, wherein the ordered operation group is obtained at least according to the connection relationship between the nodes in the automation process, the ordered operation group includes a plurality of ordered sub-operations, the execution time of the sub-operations in the front sequence is earlier than the execution time of the sub-operations in the back sequence, the types of the sub-operations include a main operation and auxiliary operations other than the main operation, the main operation is an operation corresponding to the device node and corresponds to the main function of the device node; Based on the ordered operation group, the sub-operation of the first main operation that is executed earlier than the main operation and the main operation are taken as one operation group, the sub-operation between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations are taken as another operation group, and the sub-operation of the last main operation that is executed later than the main operation is taken as yet another operation group.
2. The method according to claim 1, characterized in that Before the method based on the ordered operation group, taking the sub-operation of the first main operation that is executed earlier than the main operation and the main operation as one operation group, taking the sub-operation between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and taking the sub-operation of the last main operation that is executed later than the main operation as another operation group, the method includes: Based on the ordered operation group, the order relationship between all main operations and their next sub-operations in the ordered operation group is deleted.
3. The method according to claim 2, characterized in that The method of taking the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group based on the ordered operation group, taking the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and taking the sub-operations of the last main operation that are executed later than the main operation as yet another operation group includes: Setting an initial operation number for each sub-operation in the ordered operation group, and setting the operation group number of the current operation group to the initial value; Traverse each sub-operation in the ordered operation group, and when the operation number of the sub-operation is the initial operation number, perform the following steps: Modify the operation group number of the current operation group to the target value; set the operation number of the current sub-operation to the target value; obtain the adjacent sub-operation of the sub-operation, and when the operation number of the adjacent sub-operation is the initial operation number, set the operation number of the adjacent sub-operation to the target value; and so on, for the adjacent sub-operation, continue to obtain the corresponding adjacent sub-operation, and when the operation number of the adjacent sub-operation is the initial operation number, set the operation number of the adjacent sub-operation to the target value, until the adjacent sub-operation cannot continue to obtain the next adjacent sub-operation, traverse the next sub-operation in the ordered operation group, and the target value obtained by each modification during traversal is different; Group sub-operations with the same operation number into the same operation group.
4. The method according to claim 2, characterized in that The method of taking the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group based on the ordered operation group, taking the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and taking the sub-operations of the last main operation that are executed later than the main operation as yet another operation group includes: Create a new stack and initialize it to empty; Setting an initial operation number for each sub-operation in the ordered operation group, and setting the operation group number of the current operation group to the initial value; Traverse each sub-operation in the ordered operation group, and when the operation number of the sub-operation is the initial operation number, perform the following steps: Modify the operation group number of the current operation group to the target value; and push the sub-operation into the stack; If the stack is not empty, perform the following steps: Taking out the sub-operation at the top of the stack, if the operation number of the sub-operation is the initial operation number, setting the operation number of the sub-operation to the target value, which is recorded as the taking out step; Obtaining an adjacent sub-operation of the sub-operation, and when the operation number of the adjacent sub-operation is the initial operation number, pushing the adjacent sub-operation into a stack, which is recorded as a stacking step; Determine again whether the stack is empty. If the stack is not empty, continue to loop the above-mentioned steps of taking out and pushing; When it is determined that the stack is empty, it is determined whether the above traversal is completed. If it is not completed, the next sub-operation in the ordered operation group is continuously traversed until all sub-operations belong to the corresponding operation group.
5. The method according to any one of claims 1 to 4, characterized in that The method further includes: determining, based on the ordered operation group, a sequence of execution of each main operation in the ordered operation group to obtain an ordered main operation; After taking the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group based on the ordered operation group, taking the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later of the two adjacent main operations as another operation group, and taking the sub-operations of the last main operation that are executed later than the main operation as yet another operation group, the method further includes: Traverse each operation group and determine the intersection of the sub-operations contained in the operation group and the ordered main operations; When the intersection is not empty, determine whether each sub-operation in the corresponding operation group belongs to the same operation set as the main operation based on the position of the main operation in the ordered main operations in the intersection and the corresponding relationship between each sub-operation in the operation group and the main operation, so as to complete the grouping of the sub-operations, wherein the corresponding relationship is the corresponding relationship between the main operation and the auxiliary operation.
6. The method according to claim 5, characterized in that In the case where the intersection is not empty, determining whether each sub-operation in the corresponding operation group belongs to the same operation set as the main operation according to the position of the main operation in the intersection in the ordered main operation and the corresponding relationship between each sub-operation in the operation set and the main operation, so as to complete the grouping of the sub-operations, includes: When the main operation in the intersection is the first main operation in the ordered main operations, all sub-operations in the current operation group belong to the same operation set; When the main operation in the intersection is not the first main operation in the ordered main operations, determine whether each sub-operation in the corresponding operation group belongs to the same operation set as the main operation according to the following method: For the case where a sub-operation in the corresponding operation group is a main operation, the main operation belongs to another operation set; In the case where the sub-operation in the corresponding operation group is an auxiliary operation, based on the corresponding relationship between the auxiliary operation and the previous main operation, it is determined whether the auxiliary operation belongs to the same operation set as the main operation.
7. The method according to claim 6, characterized in that For the case where the sub-operation in the operation group is an auxiliary operation, when the auxiliary operation and the main operation do not belong to the same operation set, it is determined whether the auxiliary operation and the subsequent main operation belong to the same operation set based on the corresponding relationship between the auxiliary operation and the subsequent main operation.
8. The method according to claim 5, characterized in that When the intersection is empty, all sub-operations in the current operation group belong to the last operation set.
9. A method for controlling an automated process, characterized in that: A method for grouping sub-operations in an automated process comprising the method described in any one of claims 1 to 8.
10. A device for grouping sub-operations in an automated process, characterized in that: The automation process is formed by connecting a plurality of nodes, wherein the nodes include at least one device node; the apparatus includes: an acquisition module, configured to acquire an ordered operation group of the automation process, wherein the ordered operation group is obtained at least according to the connection relationship between the nodes in the automation process, the ordered operation group includes a plurality of ordered sub-operations, the execution time of the sub-operations in the front sequence is earlier than the execution time of the sub-operations in the back sequence, the types of the sub-operations include a main operation and auxiliary operations other than the main operation, the main operation is an operation corresponding to the device node and corresponds to the main function of the device node; A grouping module is used to, based on the ordered operation group, group the sub-operations of the first main operation that are executed earlier than the main operation and the main operation as one operation group, group the sub-operations between two adjacent main operations in the ordered operation group and the main operation that is executed later than the two adjacent main operations as another operation group, and group the sub-operations of the last main operation that are executed later than the main operation as yet another operation group.
11. 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 grouping sub-operations in an automation process according to any one of claims 1 to 8 when the processor executes the computer program instructions.
12. A storage medium having program instructions stored thereon, wherein the program instructions are used to execute the method for grouping sub-operations in an automation process according to any one of claims 1 to 8 when run.
Citation Information
Patent Citations
Grouping method, control method and device for sub-operation in automatic process
CN120353517A
Automated process management method and device, electronic equipment and storage medium
CN115755790A
Automated process management method and device, electronic equipment and storage medium
CN115755792A
Automatic process control method and device, electronic equipment and storage medium
CN117827323A
Identifying groups of related nodes in an integration flow
US20200228403A1