CN-121707292-B - Parallel execution control system and method for modularized beverage preparation flow
Abstract
The invention belongs to the technical field of beverage preparation and discloses a parallel execution control system and method of a modularized beverage preparation flow, which comprises the steps of obtaining orders, disassembling the orders according to the preparation flow to obtain a step node set, combining step nodes of different orders two by two in the step node set, obtaining conflict values, establishing a first echelon during execution, establishing a first execution layer in the first echelon, obtaining the step node with the lowest conflict degree with other step nodes as the first step node of the first execution layer, judging whether the remaining step nodes of the first echelon fall into the first execution layer or not according to the conflict values, continuously establishing a new execution layer until all non-entered layer nodes are accommodated, sequentially executing the first echelon according to the execution layers, establishing an execution layer of the subsequent echelon, and triggering the sequence of the execution layers of the subsequent echelon according to the conditions completed by the step nodes.
Inventors
- FANG JIN
- HUANG JIPENG
- LIU BIN
Assignees
- 南京市柠萌机器人有限责任公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260213
Claims (9)
- 1. A method of controlling parallel execution of a modular beverage preparation process, comprising: Acquiring an order, and disassembling according to a manufacturing flow to obtain a step node set; In the step node set, step nodes of different orders are combined pairwise and conflict values are obtained, and the conflict degree of the step nodes of different orders in execution is clear; The conflict value acquisition method comprises the following steps: Judging whether the step nodes in the step node combination need to use the same functional module according to the information of the step nodes, if the step nodes do not need to use the same functional module, directly setting the conflict value of the step node combination to be 0, and if the step nodes need to use the same functional module, calculating the conflict value; The method for calculating the conflict value comprises the following steps: s2021, presetting an exclusive conflict value, judging whether the step nodes in the step node combination have the exclusive attribute, if both the step nodes are marked as the exclusive attribute, counting the exclusive conflict value into an initial conflict value calculation, otherwise, not counting; S2022, if two step nodes belong to different beverage types and are required to be executed on the same functional module, acquiring switching costs of different execution sequences of the two step nodes, and taking the maximum value of the switching costs as a switching conflict value, wherein the switching conflict value of the step nodes of the same beverage type is zero; S2023, adding the exclusive conflict value and the switching conflict value to obtain a conflict value of the step node combination; The switching cost is obtained by collecting the actual time consumption of the history of executing the step node of the beverage category x to the step node of the beverage category y in the same functional module within the latest preset time, calculating the average value of the actual time consumption of the history, and finally normalizing the average value to remove the dimension, and then taking the average value as the switching cost of the step node of the beverage category x to the step node of the beverage category y in the functional module; establishing a first echelon during execution, establishing a first execution layer in the first echelon, and acquiring a step node with the lowest conflict degree with other step nodes as a first step node of the first execution layer; Judging whether the remaining step nodes of the first echelon are classified into the first execution layer or not by a classification judging method based on the conflict value, so that the step nodes in the first execution layer are prevented from conflict due to the contention of the functional modules; Continuously establishing a new execution layer until all non-layered step nodes are stored, and ensuring that step nodes with high conflict in a first echelon enter different execution layers to execute in a peak-shifting manner; The first echelon is executed according to the sequence of the execution layers, the execution layers of the subsequent echelons are established, the sequence of the execution layers of the subsequent echelons is triggered by the condition completed by the step nodes, and the subsequent echelons depending on the pre-step nodes can be timely linked and started.
- 2. The method of parallel execution control of a modular beverage preparation process according to claim 1, wherein the method of disassembling the set of get step nodes comprises: S101, calling a corresponding manufacturing flow pre-stored in a formula library according to the beverage category of the order, wherein the manufacturing flow is a procedure instruction set ordered according to a standard preparation flow; S102, judging the independence of each process command, and if the execution of a certain process command can be independently completed by a single functional module, directly taking the process command as a step node; S103, if a certain procedure instruction needs to be executed by using a plurality of functional modules, the procedure instruction is further subdivided into a plurality of step nodes according to the functional modules, and each step node is ensured to call a single functional module; S104, acquiring information of step nodes, including functional modules used by the step nodes, whether the step nodes have exclusive attributes, belonging beverage types and belonging order IDs, and establishing a step node set based on all the step nodes after order disassembly.
- 3. The method of claim 1, wherein the method of obtaining the first step node of the first execution layer comprises: s301, combing the dependency relationship of all step nodes, classifying the step nodes without pre-dependency into a first echelon, and classifying the step nodes with pre-dependency into a first echelon along with the echelon sequence of the pre-step nodes; S302, traversing all step nodes in a first echelon, counting conflict values of step node combinations of all step nodes in the first echelon and other step nodes in the first echelon for each step node, and dividing the conflict values by the number of step node combinations containing the step node after summation to obtain an average conflict value of the step node; s303, establishing a first execution layer, sorting all step nodes of the first echelon according to the ascending order of average conflict values, and selecting the step node with the smallest average conflict value as the first step node of the first execution layer.
- 4. The method of claim 1, wherein the determining whether the remaining step nodes of the first echelon are classified into the first execution layer by the classifying determination method based on the collision value comprises: S401, obtaining conflict values of step node combinations of the remaining step nodes of the first echelon and all step nodes of the current first execution layer; S402, if all conflict values are smaller than a preset threshold value, adding the rest step nodes into a first execution layer; if the conflict value of the step node combination of the remaining step nodes and any step node of the first execution layer is greater than or equal to a preset threshold value, the remaining step nodes are used as non-layer step nodes and are not included in the first execution layer.
- 5. The method of parallel execution control of a modular beverage preparation process according to claim 1, wherein the method of creating a new execution level until all non-level step nodes are received comprises: S501, establishing a second execution layer, sorting non-layered step nodes according to an ascending order of average conflict values, and selecting the non-layered step node with the smallest average conflict value as the first step node of the second execution layer; s502, performing node classification of the remaining non-layer step according to the classification judging method based on the conflict values of S401 to S402; And S503, if the step nodes without the layers are not classified into the second execution layer, establishing a third execution layer, selecting and classifying the first step node, and repeating the establishment of the execution layer until all the step nodes without the layers are classified.
- 6. The method of parallel execution control of a modular beverage preparation process according to claim 1, the method for establishing the execution layer of the subsequent echelon and triggering the sequence of the execution layer of the subsequent echelon through the condition completed by the step node comprises the following steps: S601, executing the first echelon according to the sequence of the execution layers, and executing step nodes of the execution layers according to the sequence from small average conflict values to large average conflict values; Meanwhile, a function module self-detection mechanism is added, in the execution process, if a certain function module finishes the currently allocated step node or the function module still has residual processing capacity, whether step nodes which call the function module and meet the pre-dependency and non-exclusive attribute exist in the current execution layer and the subsequent execution layer or not is detected in real time, if so, the step nodes are scheduled and executed preferentially, and the original execution layer ordering logic is returned after the execution is finished; s602, when the execution of a first step node of a first echelon is completed, an execution layer of a second echelon is built, and the estimated starting time of all step nodes in the second echelon is obtained by subtracting the executed time of a current pre-step node from the average execution time of the pre-step node of the step node in the historical execution data, and if the calculated result is negative, the estimated starting time is 0; s603, comparing the expected starting time of all the step nodes in the second echelon execution layer, setting a starting time threshold, selecting the step nodes with the current expected starting time within the starting time threshold, arranging the step nodes according to the average conflict value from small to large, taking the step nodes as the execution sequence of the execution layer, and executing the ordered step nodes according to the execution sequence without ordering the rest step nodes; S604, when the first step node execution of the second echelon is completed, establishing a third echelon according to the methods of S602 and S603, and so on; S605 triggers the reordering of the second queue execution layer every time the first queue completes the execution of a step node, the reordering method is the same as the ordering method of S603, triggers the reordering of the third queue execution layer every time the second queue completes the execution of a step node, and so on.
- 7. The method of parallel execution control of a modular beverage preparation process according to claim 1, further comprising, during execution, establishing a window insertion mechanism for the received new order; The window insertion mechanism is used for setting up a short-time insertion window after a certain step of nodes of the first echelon are completed; Collecting newly added step nodes arriving before or within the insertion window; And for the newly added step nodes, classifying the newly added step nodes into corresponding echelons according to the dependency relationship, then acquiring conflict values of the newly added step nodes and step node combinations of all step nodes of the execution layers in the current echelon, and performing classification judgment of the execution layers of each echelon according to the classification judgment method.
- 8. The method of parallel execution control of a modular beverage preparation process according to claim 1, further comprising introducing a step node aging mechanism; the step node aging mechanism is used for gradually increasing the sequencing priority of the step nodes when the waiting time of the step nodes exceeds a preset aging threshold; calculating a waiting correction value for step nodes which are already classified into the echelon in each previous order when the reordering is performed due to the addition of a new order; the waiting correction value is calculated based on the waiting duration of the step node and a preset aging threshold, and the waiting correction value is used for correcting the conflict value of the step node combination of the step node so as to form a corrected conflict value, but does not affect another step node of the step node combination; And adopting the conflict value after waiting for correction in reordering.
- 9. A parallel execution control system of a modular beverage preparation process, implementing a parallel execution control method of a modular beverage preparation process according to any one of claims 1-8, comprising: the order disassembly module is used for obtaining an order and disassembling the order according to the manufacturing flow to obtain a step node set; the conflict acquisition module is used for combining the step nodes of different orders in pairs in the step node set and acquiring conflict values, so as to determine the conflict degree of the step nodes of different orders when the step nodes are executed; The echelon building module is used for building a first echelon during execution and building a first execution layer in the first echelon, and obtaining a step node with the lowest conflict degree with other step nodes as a first step node of the first execution layer; The classifying judging module judges whether the rest step nodes of the first echelon are classified into the first execution layer or not through a classifying judging method based on the conflict value, so that the step nodes in the first execution layer are prevented from conflict due to the contention of the functional modules; the building layer storage module is used for continuously building a new execution layer until all non-layer step nodes are stored, so that high-conflict step nodes in a first echelon are ensured to enter different execution layers to be executed in a peak-shifting mode; the first echelon is executed according to the order of the execution layers, and the conditions completed by the step nodes trigger the subsequent echelon to execute layer sequencing, so that the subsequent echelons depending on the pre-step nodes can be timely linked and started.
Description
Parallel execution control system and method for modularized beverage preparation flow Technical Field The present invention relates to the field of beverage preparation technology, and more particularly, to a system and method for parallel execution control of a modular beverage preparation process. Background In existing beverage preparation environments, beverage preparation is typically handled one by one in order, with the preparation task of each order being completed by a worker on a fixed area or fixture. To improve efficiency, modular beverage preparation systems have been proposed that split different manufacturing links into independent functional modules, such as juice extraction, mixing and heating functional modules, enabling multiple tasks to be processed simultaneously in parallel on different functional modules. The modularized mode can effectively relieve the problem of resource idling caused by sequential processing and improve the overall processing capacity. However, in core application scenes such as overstock peaks in the morning and evening, superposition of off-line and take-out orders and the like, beverage making requirements show remarkable characteristics of concurrency of multiple orders, variety of types and large process difference, the parallel advantages of a modularized system are difficult to fully release all the time, in the existing modularized preparation, a quantitative evaluation system for conflict occupied by different orders is lacking, whether parallel compatibility conditions are provided between process links of different orders cannot be accurately judged, so that the scheduling decision lacks a refined basis, module strives for is caused by blind parallel, or efficiency is reduced due to excessive conservation. In view of the above, the present invention provides a system and a method for controlling parallel execution of a modular beverage preparation process to solve the above-mentioned problems. Disclosure of Invention In order to overcome the defects in the prior art and achieve the above objects, the present invention provides a method for controlling parallel execution of a modular beverage preparation process, comprising: Acquiring an order, and disassembling according to a manufacturing flow to obtain a step node set; In the step node set, step nodes of different orders are combined pairwise and conflict values are obtained, and the conflict degree of the step nodes of different orders in execution is clear; establishing a first echelon during execution, establishing a first execution layer in the first echelon, and acquiring a step node with the lowest conflict degree with other step nodes as a first step node of the first execution layer; Judging whether the remaining step nodes of the first echelon are classified into the first execution layer or not by a classification judging method based on the conflict value, so that the step nodes in the first execution layer are prevented from conflict due to the contention of the functional modules; Continuously establishing a new execution layer until all non-layered step nodes are stored, and ensuring that step nodes with high conflict in a first echelon enter different execution layers to execute in a peak-shifting manner; The first echelon is executed according to the sequence of the execution layers, the execution layers of the subsequent echelons are established, the sequence of the execution layers of the subsequent echelons is triggered by the condition completed by the step nodes, and the subsequent echelons depending on the pre-step nodes can be timely linked and started. Further, the method for disassembling the step node set comprises the following steps: S101, calling a corresponding manufacturing flow pre-stored in a formula library according to the beverage category of the order, wherein the manufacturing flow is a procedure instruction set ordered according to a standard preparation flow; S102, judging the independence of each process command, and if the execution of a certain process command can be independently completed by a single functional module, directly taking the process command as a step node; S103, if a certain procedure instruction needs to be executed by using a plurality of functional modules, the procedure instruction is further subdivided into a plurality of step nodes according to the functional modules, and each step node is ensured to call a single functional module; S104, acquiring information of step nodes, including functional modules used by the step nodes, whether the step nodes have exclusive attributes, belonging beverage types and belonging order IDs, and establishing a step node set based on all the step nodes after order disassembly. Further, the method for acquiring the conflict value comprises the following steps: Judging whether the step nodes in the step node combination need to use the same functional module according to the information of the step nodes, i