Parallel execution control system and method for modular beverage preparation process
By breaking down the order process into steps and scheduling them in multiple tiers, the problem of insufficient parallel compatibility judgment in the modular beverage preparation system was solved, enabling efficient and stable parallel execution of multiple orders and improving overall efficiency and system adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING NINGMENG ROBOT CO LTD
- Filing Date
- 2026-02-13
- Publication Date
- 2026-05-05
AI Technical Summary
Existing modular beverage preparation systems cannot accurately determine the parallel compatibility of order process steps during peak periods with multiple concurrent orders, leading to problems such as module contention or reduced efficiency.
By breaking down the order process into steps and nodes, a conflict value system is constructed, a multi-tiered parallel execution control method is established, and the conflict value drives the hierarchical scheduling of step nodes to achieve parallel execution of low-conflict nodes and staggered processing of high-conflict nodes. Combined with module idle scheduling and order insertion mechanism, the scheduling results are optimized.
It improved the overall capacity and response speed of modular beverage preparation, enhanced the stability and adaptability of system scheduling, reduced module contention, and improved execution efficiency in multi-order scenarios.
Smart Images

Figure CN121707292B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of beverage preparation technology, and more specifically, to a parallel execution control system and method for a modular beverage preparation process. Background Technology
[0002] In existing beverage preparation environments, beverage production is typically handled sequentially according to orders, with each order's production task completed by staff in a fixed area or on fixed equipment.
[0003] To improve efficiency, a modular beverage preparation system has been proposed, which breaks down different production stages into independent functional modules, such as juicing, mixing, and heating modules, allowing multiple tasks to be processed in parallel on different modules simultaneously. This modular approach effectively alleviates resource idleness issues caused by sequential processing and improves overall processing capacity.
[0004] However, in core application scenarios such as lunch and dinner delivery peaks and the overlap of offline and delivery orders, beverage production demand exhibits significant characteristics of multiple concurrent orders, diverse product categories, and large differences in processes. The parallel advantages of modular systems have always been difficult to fully realize. In existing modular preparation, there is a lack of a quantitative assessment system for the conflict of different orders, making it impossible to accurately determine whether the process links of different orders have the conditions for parallel compatibility. This results in a lack of refined basis for scheduling decisions, either leading to blind parallelism that causes module contention or excessive conservatism that reduces efficiency.
[0005] In view of this, the present invention proposes a parallel execution control system and method for a modular beverage preparation process to solve the above problems. Summary of the Invention
[0006] To overcome the aforementioned deficiencies of the prior art and achieve the above objectives, the present invention provides the following technical solution: a parallel execution control method for a modular beverage preparation process, comprising:
[0007] Obtain orders and break them down into a set of steps based on the production process;
[0008] In the set of step nodes, the step nodes of different orders are paired up and conflict values are obtained to clarify the degree of conflict between the step nodes of different orders during execution;
[0009] Establish the first echelon for execution and establish the first execution layer in the first echelon. Select the step node with the lowest degree of conflict with other step nodes as the first step node of the first execution layer.
[0010] The method of determining whether the remaining step nodes in the first echelon should be assigned to the first execution layer is based on the conflict value, so as to avoid conflicts between step nodes in the first execution layer due to functional module contention.
[0011] Continuously build new execution layers until all steps and nodes not yet included are incorporated, ensuring that highly conflicting steps and nodes in the first tier are executed in different execution layers to avoid peak execution.
[0012] The first echelon executes in the order of the execution layers, establishing the execution layers for subsequent echelons. The execution layers of subsequent echelons are ordered based on the conditions for the completion of step nodes, allowing subsequent echelons that depend on the preceding step nodes to start in a timely manner.
[0013] Furthermore, methods for decomposing the steps into a set of nodes include:
[0014] S101: Based on the beverage category of the order, call the corresponding production process pre-stored in the recipe library. This production process is a set of process instructions sorted according to the standard preparation process.
[0015] S102: Determine the independence of each process instruction. If the execution of a process instruction can be completed independently by a single functional module, then directly treat the process instruction as a step node.
[0016] S103: If the execution of a certain process instruction requires the use of multiple functional modules, then the process instruction shall be further subdivided into multiple step nodes according to the functional modules, so as to ensure that each step node calls a single functional module;
[0017] S104: Obtain information about the step node, including the functional modules used by the step node, whether it has exclusive attributes, the beverage category it belongs to, and the order ID it belongs to, and establish a set of step nodes based on the step nodes after all orders are broken down.
[0018] Furthermore, the method for obtaining the conflict value is as follows:
[0019] Based on the information of the step nodes, determine whether the step nodes in the combination of step nodes need to use the same functional module. If they do not need to use the same functional module, set the conflict value of the combination of step nodes to 0. If they need to use the same functional module, calculate the conflict value.
[0020] The methods for calculating conflict values include:
[0021] S2021: Preset exclusive conflict value to determine whether the step nodes in the step node combination have exclusive attributes. If both step nodes are marked as exclusive, the exclusive conflict value is included in the initial conflict value calculation; otherwise, it is not included.
[0022] S2022: If two step nodes belong to different beverage categories and need to be executed sequentially on the same functional module, then obtain the switching cost of the different execution order of these two step nodes, and take the maximum value as the switching conflict value. The switching conflict value of step nodes of the same beverage category is zero.
[0023] S2023: Add the exclusive conflict value and the switching conflict value to obtain the conflict value of the step node combination.
[0024] Furthermore, the method for obtaining the first step node of the first execution layer includes:
[0025] S301: Analyze the dependencies of all step nodes, group step nodes without prerequisite dependencies into the first tier, and group step nodes with prerequisite dependencies into the first tier according to the order of the prerequisite step nodes.
[0026] S302: Traverse all step nodes in the first echelon. For each step node, count the conflict value of its combination with all other step nodes in the first echelon. Sum the values and divide by the number of step node combinations that include the step node to get the average conflict value of the step node.
[0027] S303: Establish the first execution layer, sort all step nodes in the first echelon in ascending order of average conflict value, and select the step node with the smallest average conflict value as the first step node of the first execution layer.
[0028] Furthermore, the method for determining whether the remaining step nodes of the first echelon should be assigned to the first execution layer based on the conflict value-based assignment method includes:
[0029] S401: Obtain the conflict value of the combination of the remaining step nodes in the first echelon and all step nodes in the current first execution layer;
[0030] S402: If all conflict values are less than the preset threshold, then add the remaining step node to the first execution layer;
[0031] If the conflict value of the remaining step node with any step node in the first execution layer is greater than or equal to a preset threshold, then the remaining step node is considered an unentered step node and is not included in the first execution layer.
[0032] Furthermore, methods for establishing new execution layers until all non-inclusion step nodes are included include:
[0033] S501: Establish a second execution layer, sort the non-entry step nodes in ascending order of average conflict value, and select the non-entry step node with the smallest average conflict value as the first step node of the second execution layer.
[0034] S502: Incorporate the remaining unincorporated step nodes according to the incorporation judgment method based on conflict value in S401 to S402;
[0035] S503: If there are still un-entered step nodes that have not been assigned to the second execution layer, then a third execution layer is established, and the first step node is selected and assigned. The execution layer is established repeatedly until all un-entered step nodes are assigned.
[0036] Furthermore, the method for establishing the execution layer of subsequent tiers, and triggering the sorting of the execution layer of subsequent tiers based on the conditions for the completion of step nodes, includes:
[0037] S601: The first echelon is executed in the order of the execution layer, and the steps of the same execution layer are executed in order of increasing average conflict value;
[0038] If the steps can be executed simultaneously, then they will be executed simultaneously.
[0039] At the same time, a self-detection mechanism for functional modules is added. During the execution process, if a functional module completes the currently assigned step node, or if the functional module still has remaining processing capacity, it will detect in real time whether there are step nodes in the current execution layer and subsequent execution layers that call the functional module, satisfy the prerequisite dependencies and have non-exclusive attributes. If they exist, the step node will be scheduled for execution first. After execution, it will return to the original execution layer sorting logic.
[0040] S602: When the first step node of the first echelon is completed, establish the execution layer of the second echelon and obtain the estimated start time of all step nodes in the second echelon;
[0041] The estimated startup time is obtained by subtracting the execution time of the current preceding step node from the average execution time of the preceding step node in the historical execution data. If the calculation result is negative, the estimated startup time is directly set to 0.
[0042] S603: Compare the estimated start times of all step nodes in the second-tier execution layer, set a start time threshold, select step nodes whose current estimated start time is within the start time threshold, and arrange them in ascending order of average conflict value as the execution order of this execution layer. The remaining step nodes are not sorted, and the sorted step nodes are executed in the execution order.
[0043] S604: When the first step node of the second echelon is completed, the third echelon is established according to the methods of S602 and S603, and so on.
[0044] S605: Whenever the first echelon completes the execution of a step node, it triggers the reordering of the second echelon execution layer. The reordering method is the same as the sorting method in S603. Whenever the second echelon completes the execution of a step node, it triggers the reordering of the third echelon execution layer, and so on.
[0045] Furthermore, it also includes establishing a window insertion mechanism for new orders received during the execution process;
[0046] The in-window insertion mechanism is used to establish a short-term insertion window after a certain step node in the first echelon is completed.
[0047] Collect new step nodes that arrive before or within the insertion window;
[0048] For newly added step nodes, first classify them into the corresponding echelon based on their dependencies, then obtain the conflict value of their combination with the step node combinations of all step nodes in the execution layer of the current echelon, and classify each echelon's execution layer according to the classification judgment method.
[0049] Furthermore, it also includes the introduction of a step node aging mechanism;
[0050] The step node aging mechanism is used to gradually increase the sorting priority of a step node when the waiting time exceeds a preset aging threshold.
[0051] Each time a reordering is performed due to the addition of a new order, the pending correction value is calculated for each step node that has been queued in a previous order;
[0052] The waiting correction value is calculated based on the waiting time of the step node and a preset aging threshold. The waiting correction value is used to correct the conflict value of the step node combination of the step node, thereby forming a corrected conflict value, but without affecting the other step node of the step node combination.
[0053] Use the conflict value after waiting for correction during reordering.
[0054] A parallel execution control system for a modular beverage preparation process, comprising a method for implementing the parallel execution control of the modular beverage preparation process, including:
[0055] Order breakdown module: Obtains orders and breaks them down into a set of step nodes according to the production process;
[0056] Conflict Detection Module: In the set of step nodes, the step nodes of different orders are combined in pairs and the conflict value is obtained to clarify the degree of conflict between the step nodes of different orders during execution;
[0057] The queue establishment module establishes the first queue during execution and establishes the first execution layer within the first queue, selecting the step node with the lowest degree of conflict with other step nodes as the first step node of the first execution layer;
[0058] Inclusion Judgment Module: Determines whether the remaining step nodes in the first echelon should be included in the first execution layer by using an inclusion judgment method based on conflict value, so as to avoid conflicts between step nodes in the first execution layer due to functional modules competing for them.
[0059] Layered execution module: Continuously build new execution layers until all un-included step nodes are included, ensuring that highly conflicting step nodes in the first tier are executed in different execution layers to avoid peak execution times;
[0060] Tier Trigger Module: The first tier is executed in the order of the execution layer. The execution layer order of the subsequent tier is triggered by the completion of the step node, so that the subsequent tiers that depend on the preceding step node can be connected and started in a timely manner.
[0061] The technical effects and advantages of the parallel execution control system and method for the modular beverage preparation process proposed in this invention are as follows:
[0062] First, this invention breaks down the manufacturing process into step-by-step nodes and constructs a conflict value system based on the exclusive attributes of functional modules and the cost of category switching. This allows for the quantitative assessment of module occupancy conflicts and switching losses between different orders, overcoming the problem of not being able to accurately determine the parallel compatibility of steps in existing modular manufacturing, and providing a refined basis for subsequent scheduling.
[0063] Then, the present invention introduces execution layer division within each echelon and drives the layering and entry judgment of step nodes with average conflict value, so that low-conflict and highly compatible step nodes are automatically gathered in the same execution layer to achieve parallel execution, while high-conflict nodes are automatically diverted to subsequent execution layers for peak-shifting processing. This significantly improves parallelism without disrupting process dependencies, reduces module contention, and improves overall execution efficiency under multi-order coordination.
[0064] Secondly, while maintaining the stability of the multi-tier, multi-execution-layer scheduling framework, this invention combines module idle-based fill-in scheduling, subsequent tier succession sorting based on startup time threshold, and insertion and aging correction of new orders. Without changing the core scheduling logic, it further enhances the adaptability to real-time state changes and continuous order input, ensuring that the scheduling results always maintain high utilization and fairness.
[0065] In summary, this invention achieves automatic aggregation of parallelizable nodes, automatic splitting of conflicting nodes, and efficient coordination across orders through conflict value-driven multi-tiered and multi-execution-layer parallel scheduling, thereby improving the overall capacity, response speed, and system scheduling stability of modular beverage preparation. Attached Figure Description
[0066] Figure 1 This is a flowchart of the parallel execution control method for the modular beverage preparation process in Embodiment 1 of the present invention;
[0067] Figure 2 This is a schematic diagram illustrating the establishment of the first execution layer of the first echelon in Embodiment 2 of the present invention;
[0068] Figure 3This is a block diagram of the parallel execution control system for the modular beverage preparation process in Embodiment 3 of the present invention. Detailed Implementation
[0069] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0070] Example 1:
[0071] The parallel execution control method for the modular beverage preparation process provided in this embodiment includes:
[0072] Obtain the order and break it down into a set of steps based on the production process.
[0073] The method for obtaining the set of step nodes through decomposition includes:
[0074] S101: Based on the beverage category of the order, call the corresponding production process pre-stored in the recipe library. This production process is a set of process instructions ordered according to the standard preparation process.
[0075] S102: Determine the independence of each process instruction. If the execution of a process instruction can be completed independently by a single functional module, then directly treat the process instruction as a step node.
[0076] S103: If the execution of a certain process instruction requires the use of multiple functional modules, then the process instruction is further subdivided into multiple step nodes according to the functional modules, ensuring that each step node calls a single functional module.
[0077] S104: Obtain information about the step node, including the functional modules used by the step node, whether it has exclusive attributes, the beverage category it belongs to, and the order ID it belongs to, and establish a set of step nodes based on the step nodes after all orders are broken down.
[0078] It's important to note that in modular beverage preparation scenarios, functional modules are the core units constituting the entire production system. These refer to hardware devices or clusters of devices that are standardized and broken down according to the functional requirements of beverage preparation processes, possess independent operating capabilities, and can be flexibly combined. Their design aims to adapt to the production needs of different beverage types through on-demand module combinations. These modules have clear and specialized functional boundaries; for example, a refrigeration module for cooling beverages, or a cup-transfer module for conveying cups. Each module performs only one specific type of process action, enabling it to complete its own tasks independently without relying on other modules, while also collaborating with other modules through system scheduling to form a complete production chain.
[0079] The exclusive attribute refers to the exclusive right of a step node in a modular beverage preparation scenario to use a corresponding functional module when executing a process action. No other step node is allowed to use the same functional module until the current step node has completed its entire execution process. This attribute is primarily used for core modules or special processes with high process requirements and precise, stable parameter control. For example, the extraction module for high-end coffee extraction requires strict maintenance of parameters such as water temperature and pressure. If it is interrupted by other nodes, it will directly affect the quality of the beverage. Therefore, these types of step nodes are marked with an exclusive attribute. Auxiliary functional modules such as cup taking and passing have relatively simple process requirements, and their corresponding step nodes usually do not have an exclusive attribute and can be shared and used by multiple nodes in a time-sharing manner.
[0080] In the set of step nodes, the step nodes of different orders are paired up and conflict values are obtained to clarify the degree of conflict between the step nodes of different orders during execution.
[0081] The method for obtaining the conflict value is as follows:
[0082] Based on the information of the step nodes, determine whether the step nodes in the step node combination need to use the same functional module. If they do not need to use the same functional module, set the conflict value of the step node combination to 0. If they need to use the same functional module, calculate the conflict value.
[0083] The method for calculating the conflict value includes:
[0084] S2021: Preset exclusive conflict value to determine whether the step nodes in the step node combination have exclusive attributes. If both step nodes are marked as exclusive, the exclusive conflict value is included in the initial conflict value calculation; otherwise, it is not included.
[0085] The exclusive conflict value is set by those skilled in the art based on their own experience.
[0086] S2022: If two step nodes belong to different beverage categories and need to be executed sequentially on the same functional module, then obtain the switching cost of the different execution order of these two step nodes, and take the maximum value as the switching conflict value. The switching conflict value of step nodes of the same beverage category is zero.
[0087] The switching cost is calculated by collecting the historical actual time spent switching from the step node of beverage category x to the step node of beverage category y in the same functional module within the most recent preset time (e.g., within 3 months), calculating the average of the historical actual time spent, and finally normalizing and removing the dimensions of the average value, and then using it as the switching cost for switching from the step node of beverage category x to the step node of beverage category y in the functional module.
[0088] S2023: Add the exclusive conflict value and the switching conflict value to obtain the conflict value of the step node combination.
[0089] It should be noted that the conflict value for the combination of step nodes within the same order is directly 0.
[0090] See Figure 2 As shown, a first echelon is established during execution, and a first execution layer is established in the first echelon. The step node with the lowest degree of conflict with other step nodes is selected as the first step node of the first execution layer.
[0091] Specific methods include:
[0092] S301: Analyze the dependencies of all step nodes. If a subsequent step node p can only be executed after its preceding step node q is completed, then step node p is considered to depend on step node q. Step nodes without preceding dependencies are grouped into the first tier. Step nodes with preceding dependencies are grouped according to the tier order of their preceding dependencies. For example, if step node A4 depends on step nodes A2 and A3, and step nodes A2 and A3 depend on step node A1, and step node A1 has no preceding dependencies, then step node A1 is grouped into the first tier, step nodes A2 and A3 into the second tier, and step node A4 into the third tier.
[0093] S302: Traverse all step nodes in the first echelon. For each step node, count the conflict value of its combination with all other step nodes in the first echelon. Sum the values and divide by the number of combination of step nodes that includes that step node to obtain the average conflict value of that step node.
[0094] S303: Establish the first execution layer, sort all step nodes in the first echelon in ascending order of average conflict value, select the step node with the smallest average conflict value as the first step node of the first execution layer. This step node has the strongest compatibility and can minimize the probability of conflict when subsequent step nodes enter the layer.
[0095] By using a conflict value-based inclusion judgment method, it is determined whether the remaining step nodes in the first echelon should be included in the first execution layer, thus avoiding conflicts caused by functional modules competing for the step nodes in the first execution layer.
[0096] Specific methods include:
[0097] S401: Obtain the conflict value of the combination of the remaining step nodes in the first echelon and all step nodes in the current first execution layer;
[0098] S402: If all conflict values are less than the preset threshold, then add the remaining step node to the first execution layer;
[0099] If the conflict value of the remaining step node with any step node in the first execution layer is greater than or equal to a preset threshold, then the remaining step node is considered an unentered step node and is not included in the first execution layer.
[0100] The preset threshold is set by those skilled in the art based on their own experience.
[0101] Continuously build new execution layers until all nodes not yet included are incorporated, ensuring that highly conflicting step nodes in the first tier are executed in different execution layers to avoid peak execution.
[0102] Specific methods include:
[0103] S501: Establish a second execution layer, sort the non-entry step nodes in ascending order of average conflict value, and select the non-entry step node with the smallest average conflict value as the first step node of the second execution layer.
[0104] S502: Incorporate the remaining unincorporated step nodes according to the incorporation judgment method based on conflict value in S401 to S402.
[0105] S503: If there are still un-entered step nodes that have not been assigned to the second execution layer, then a third execution layer is established, and the first step node is selected and assigned. The execution layer is established repeatedly until all un-entered step nodes are assigned.
[0106] In the step node allocation process of this invention, a first-tier execution layer division is introduced, rather than executing all step nodes in the same layer in a simple sequential manner. The reason for this is that different step nodes have varying degrees of parallelizability based on functional module resource usage and conflict value calculations. If all step nodes are placed in the same layer, only a serial queuing strategy can be adopted, making it impossible to identify which step nodes can be executed in parallel on different functional modules. This forces multiple step nodes that could be executed simultaneously to queue sequentially, significantly increasing the total execution time. By dividing the execution layer, step nodes with low conflict values and high module compatibility can be grouped into the same execution layer, allowing step nodes within that layer to be scheduled in parallel while satisfying dependency constraints, thereby minimizing the critical path of the overall order cluster.
[0107] The first echelon executes in the order of the execution layers, establishing the execution layers for subsequent echelons. The execution layers of subsequent echelons are ordered based on the conditions for the completion of step nodes, allowing subsequent echelons that depend on the preceding step nodes to start in a timely manner.
[0108] Specific methods include:
[0109] S601: The first echelon is executed in the order of the execution layer, and the steps of the same execution layer are executed in order of increasing average conflict value;
[0110] If the step nodes can be executed simultaneously, then they will be executed simultaneously. For example, if the first three step nodes in sequence use different functional modules, or if the same functional module can handle multiple tasks simultaneously, then these three step nodes can be executed simultaneously.
[0111] At the same time, a self-detection mechanism for functional modules is added. During the execution process, if a functional module completes the currently assigned step node, or if the functional module still has remaining processing capacity, it will detect in real time whether there are step nodes in the current execution layer and subsequent execution layers that call the functional module, satisfy the prerequisite dependencies and have non-exclusive attributes. If they exist, the step node will be scheduled for execution first. After execution, it will return to the original execution layer sorting logic.
[0112] It should be noted that the remaining processing capacity is obtained by combining the maximum processing capacity set by the factory of this functional module with the actual usage of the current functional module.
[0113] S602: When the first step node of the first echelon is completed, establish the execution layer of the second echelon and obtain the estimated start time of all step nodes in the second echelon;
[0114] The estimated startup time is obtained by subtracting the execution time of the current preceding step node from the average execution time of the preceding step node in the historical execution data. If the calculation result is negative, the estimated startup time is directly set to 0.
[0115] S603: Compare the estimated startup times of all step nodes in the second-tier execution layer, set a startup time threshold, select step nodes whose current estimated startup time is within the startup time threshold, and arrange them in ascending order according to the average conflict value as the execution order of this execution layer. The remaining step nodes are not sorted, and the sorted step nodes are executed in the execution order.
[0116] S604: When the first step node of the second echelon is completed, the third echelon is established according to the methods of S602 and S603, and so on.
[0117] S605: Whenever the first echelon completes the execution of a step node, it triggers the reordering of the second echelon execution layer. The reordering method is the same as the sorting method in S603. Whenever the second echelon completes the execution of a step node, it triggers the reordering of the third echelon execution layer, and so on.
[0118] It should be noted that reordering does not affect the already sorted step nodes; it only adds step nodes that meet the startup time threshold, placing them after the previously sorted step nodes.
[0119] In this embodiment, a dynamic mechanism is adopted, where the first echelon is started sequentially according to the execution layer, and the completion of a node triggers the establishment and reordering of the execution layers of subsequent echelons, rather than establishing fixed execution layers for all echelons in advance or proceeding serially in a fixed order. Triggering the establishment of execution layers for subsequent echelons upon node completion ensures that only tasks that have completed or are about to complete in the preceding stages enter the scheduling sequence, strictly adhering to process dependencies. The layer-by-layer triggering reordering method can adapt in real time to changes in the execution status of preceding nodes and module idleness, prioritizing tasks with low average conflict values and high adaptability, while avoiding long-term module idleness. Ultimately, seamless connection between echelons is achieved, fully leveraging the parallel capabilities of functional modules, further reducing the overall processing time of the entire order cluster, and improving the flexibility and accuracy of scheduling.
[0120] Example 2:
[0121] During execution, a window insertion mechanism is established for new orders received.
[0122] The in-window insertion mechanism is used to establish a short insertion window (e.g., 2 seconds) after a step node in the first echelon has been completed. New step nodes that arrive before or within the insertion window are collected.
[0123] For newly added step nodes, first classify them into the corresponding echelon based on their dependencies, then obtain the conflict value of their combination with the step nodes of all step nodes in the execution layer of the current echelon, and classify them into each echelon according to the classification judgment method.
[0124] To prevent the continuous delay in the execution of step nodes due to high average conflict values and the addition of new orders, a step node aging mechanism is introduced.
[0125] The step node aging mechanism is used to gradually increase the sorting priority of a step node when the waiting time exceeds a preset aging threshold.
[0126] The specific method is as follows:
[0127] Each time a reordering is performed due to the addition of a new order, the pending correction value is calculated for each step node that has been queued in a previous order;
[0128] The waiting correction value is calculated based on the waiting time of the step node and a preset aging threshold. The waiting correction value is used to correct the conflict value of the step node combination, thus forming a corrected conflict value, but it does not affect the other step node in the step node combination. For example, if the preset aging threshold is set to 10 seconds, the waiting correction value increases by 0.01 for every second the waiting time of the step node exceeds the preset aging threshold. The maximum waiting correction value is set to 0.5. The corrected conflict value is obtained by subtracting the waiting correction value from the original conflict value of the step node combination, and the conflict value is set to not be lower than 0.01.
[0129] During reordering, the conflict value after waiting for correction is used to give higher execution priority to the step nodes that have been waiting for too long.
[0130] The preset aging threshold is set by those skilled in the art based on their own experience.
[0131] Example 3:
[0132] See Figure 3 As shown, this embodiment provides a parallel execution control system for a modular beverage preparation process, and a method for implementing the parallel execution control of the modular beverage preparation process, including:
[0133] Order breakdown module: Obtains orders and breaks them down into a set of step nodes according to the production process;
[0134] Conflict Detection Module: In the set of step nodes, the step nodes of different orders are combined in pairs and the conflict value is obtained to clarify the degree of conflict between the step nodes of different orders during execution;
[0135] The queue establishment module establishes the first queue during execution and establishes the first execution layer within the first queue, selecting the step node with the lowest degree of conflict with other step nodes as the first step node of the first execution layer;
[0136] Inclusion Judgment Module: Determines whether the remaining step nodes in the first echelon should be included in the first execution layer by using an inclusion judgment method based on conflict value, so as to avoid conflicts between step nodes in the first execution layer due to functional modules competing for them.
[0137] Layered execution module: Continuously build new execution layers until all nodes not yet included in the layers are included, ensuring that highly conflicting step nodes in the first tier are executed in different execution layers to avoid peak execution.
[0138] Tier Trigger Module: The first tier is executed in the order of the execution layer. The execution layer order of the subsequent tier is triggered by the completion of the step node, so that the subsequent tiers that depend on the preceding step node can be connected and started in a timely manner.
[0139] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0140] In conclusion, the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A parallel execution control method for a modular beverage preparation process, characterized in that, include: Obtain orders and break them down into a set of steps based on the production process; In the set of step nodes, the step nodes of different orders are paired up and conflict values are obtained to clarify the degree of conflict between the step nodes of different orders during execution; The method for obtaining the conflict value is as follows: Based on the information of the step nodes, determine whether the step nodes in the combination of step nodes need to use the same functional module. If they do not need to use the same functional module, set the conflict value of the combination of step nodes to 0. If they need to use the same functional module, calculate the conflict value. The method for calculating the conflict value includes: S2021: Preset exclusive conflict value to determine whether the step nodes in the step node combination have exclusive attributes. If both step nodes are marked as exclusive, the exclusive conflict value is included in the initial conflict value calculation; otherwise, it is not included. S2022: If two step nodes belong to different beverage categories and need to be executed sequentially on the same functional module, then obtain the switching cost of the different execution order of these two step nodes, and take the maximum value as the switching conflict value. The switching conflict value of step nodes of the same beverage category is zero. S2023: Add the exclusive conflict value and the switching conflict value to obtain the conflict value of the step node combination; The switching cost is calculated by collecting the historical actual time spent switching from the step node of beverage category x to the step node of beverage category y in the same functional module within the most recent preset time, calculating the average of the historical actual time spent, and finally normalizing and removing the dimensions of the average value, and then using it as the switching cost for switching from the step node of beverage category x to the step node of beverage category y in the functional module. Establish the first echelon for execution and establish the first execution layer in the first echelon. Select the step node with the lowest degree of conflict with other step nodes as the first step node of the first execution layer. The method of determining whether the remaining step nodes in the first echelon should be assigned to the first execution layer is based on the conflict value, so as to avoid conflicts between step nodes in the first execution layer due to functional module contention. Continuously build new execution layers until all steps and nodes not yet included are incorporated, ensuring that highly conflicting steps and nodes in the first tier are executed in different execution layers to avoid peak execution. The first echelon executes in the order of the execution layers, establishing the execution layers for subsequent echelons. The execution layers of subsequent echelons are ordered based on the conditions for the completion of step nodes, allowing subsequent echelons that depend on the preceding step nodes to start in a timely manner.
2. The parallel execution control method for the modular beverage preparation process according to claim 1, characterized in that, The method for obtaining the set of step nodes through decomposition includes: S101: Based on the beverage category of the order, call the corresponding production process pre-stored in the recipe library. This production process is a set of process instructions sorted according to the standard preparation process. S102: Determine the independence of each process instruction. If the execution of a process instruction can be completed independently by a single functional module, then directly treat the process instruction as a step node. S103: If the execution of a certain process instruction requires the use of multiple functional modules, then the process instruction shall be further subdivided into multiple step nodes according to the functional modules, so as to ensure that each step node calls a single functional module; S104: Obtain information about the step node, including the functional modules used by the step node, whether it has exclusive attributes, the beverage category it belongs to, and the order ID it belongs to, and establish a set of step nodes based on the step nodes after all orders are broken down.
3. The parallel execution control method for the modular beverage preparation process according to claim 1, characterized in that, The method for obtaining the first step node of the first execution layer includes: S301: Analyze the dependencies of all step nodes, group step nodes without prerequisite dependencies into the first tier, and group step nodes with prerequisite dependencies into the first tier according to the order of the prerequisite step nodes. S302: Traverse all step nodes in the first echelon. For each step node, count the conflict value of its combination with all other step nodes in the first echelon. Sum the values and divide by the number of step node combinations that include the step node to get the average conflict value of the step node. S303: Establish the first execution layer, sort all step nodes in the first echelon in ascending order of average conflict value, and select the step node with the smallest average conflict value as the first step node of the first execution layer.
4. The parallel execution control method for the modular beverage preparation process according to claim 1, characterized in that, The method for determining whether the remaining step nodes of the first echelon should be assigned to the first execution layer using the conflict value-based assignment judgment method includes: S401: Obtain the conflict value of the combination of the remaining step nodes in the first echelon and all step nodes in the current first execution layer; S402: If all conflict values are less than the preset threshold, then add the remaining step node to the first execution layer; If the conflict value of the remaining step node with any step node in the first execution layer is greater than or equal to a preset threshold, then the remaining step node is considered an unentered step node and is not included in the first execution layer.
5. The parallel execution control method for the modular beverage preparation process according to claim 1, characterized in that, The method for establishing a new execution layer until all non-layered step nodes are included includes: S501: Establish a second execution layer, sort the non-entry step nodes in ascending order of average conflict value, and select the non-entry step node with the smallest average conflict value as the first step node of the second execution layer. S502: Incorporate the remaining unincorporated step nodes according to the incorporation judgment method based on conflict value in S401 to S402; S503: If there are still un-entered step nodes that have not been assigned to the second execution layer, then a third execution layer is established, and the first step node is selected and assigned. The execution layer is established repeatedly until all un-entered step nodes are assigned.
6. The parallel execution control method for the modular beverage preparation process according to claim 1, characterized in that, The method for establishing the execution layer of the subsequent echelon, which triggers the sorting of the execution layer of the subsequent echelon based on the conditions of the completion of the step node, includes: S601: The first echelon is executed in the order of the execution layer, and the step nodes in the same execution layer are executed in order of increasing average conflict value; if the step nodes can be executed at the same time, they are executed at the same time. At the same time, a self-detection mechanism for functional modules is added. During the execution process, if a functional module completes the currently assigned step node, or if the functional module still has remaining processing capacity, it will detect in real time whether there are step nodes in the current execution layer and subsequent execution layers that call the functional module, satisfy the prerequisite dependencies and have non-exclusive attributes. If they exist, the step node will be scheduled for execution first. After execution, it will return to the original execution layer sorting logic. S602: When the first step node of the first echelon is completed, the execution layer of the second echelon is established, and the estimated start time of all step nodes in the second echelon is obtained; the estimated start time is obtained by subtracting the execution time of the current preceding step node from the average execution time of the preceding step node in the historical execution data. If the calculation result is negative, the estimated start time is 0. S603: Compare the estimated start times of all step nodes in the second-tier execution layer, set a start time threshold, select step nodes whose current estimated start time is within the start time threshold, and arrange them in ascending order of average conflict value as the execution order of this execution layer. The remaining step nodes are not sorted, and the sorted step nodes are executed in the execution order. S604: When the first step node of the second echelon is completed, the third echelon is established according to the methods of S602 and S603, and so on. S605: Whenever the first echelon completes the execution of a step node, it triggers the reordering of the second echelon execution layer. The reordering method is the same as the sorting method in S603. Whenever the second echelon completes the execution of a step node, it triggers the reordering of the third echelon execution layer, and so on.
7. The parallel execution control method for the modular beverage preparation process according to claim 1, characterized in that, This also includes establishing a window insertion mechanism for new orders received during the execution process; The in-window insertion mechanism is used to establish a short-term insertion window after a certain step node in the first echelon is completed. Collect new step nodes that arrive before or within the insertion window; For newly added step nodes, first classify them into the corresponding echelon based on their dependencies, then obtain the conflict value of their combination with the step node combinations of all step nodes in the execution layer of the current echelon, and classify each echelon's execution layer according to the classification judgment method.
8. The parallel execution control method for the modular beverage preparation process according to claim 1, characterized in that, This also includes introducing a step node aging mechanism; The step node aging mechanism is used to gradually increase the sorting priority of a step node when the waiting time exceeds a preset aging threshold. Each time a reordering is performed due to the addition of a new order, the pending correction value is calculated for each step node that has been queued in a previous order; The waiting correction value is calculated based on the waiting time of the step node and a preset aging threshold. The waiting correction value is used to correct the conflict value of the step node combination of the step node, thereby forming a corrected conflict value, but without affecting the other step node of the step node combination. Use the conflict value after waiting for correction during reordering.
9. A parallel execution control system for a modular beverage preparation process, implementing the parallel execution control method for the modular beverage preparation process according to any one of claims 1-8, characterized in that, include: Order breakdown module: Obtains orders and breaks them down into a set of step nodes according to the production process; Conflict Detection Module: In the set of step nodes, the step nodes of different orders are combined in pairs and the conflict value is obtained to clarify the degree of conflict between the step nodes of different orders during execution; The queue establishment module establishes the first queue during execution and establishes the first execution layer within the first queue, selecting the step node with the lowest degree of conflict with other step nodes as the first step node of the first execution layer; Inclusion Judgment Module: Determines whether the remaining step nodes in the first echelon should be included in the first execution layer by using an inclusion judgment method based on conflict value, so as to avoid conflicts between step nodes in the first execution layer due to functional modules competing for them. Layered execution module: Continuously build new execution layers until all un-included step nodes are included, ensuring that highly conflicting step nodes in the first tier are executed in different execution layers to avoid peak execution times; Tier Trigger Module: The first tier is executed in the order of the execution layer. The execution layer order of the subsequent tier is triggered by the completion of the step node, so that the subsequent tiers that depend on the preceding step node can be connected and started in a timely manner.
Citation Information
Patent Citations
Control method and system based on intelligent collaborative production
CN120578145A