Task processing method and device for intelligent capsule fresh extraction beverage machine
Through multimodal recognition, double-layer spatial structure and intelligent scheduling of task dependency graphs, the problems of unintelligent resource scheduling and insufficient parameter control accuracy of smart capsule beverage machines are solved, achieving efficient and personalized beverage preparation.
Patent Information
- Application Number
- CN202511126136.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Existing intelligent capsule beverage machines have unintelligent resource scheduling and limited parameter control accuracy in multi-tasking processing, resulting in low resource utilization and poor beverage quality consistency.
The initial parameter set is obtained through the fusion processing of multimodal recognition technology, a two-layer spatial structure and task dependency graph are constructed, and the dynamic resource allocation and environmental factor compensation mechanism are used to generate the optimized parameter set and perform anomaly detection to achieve dynamic scheduling and parameter control.
It improves resource utilization efficiency, reduces waiting time, ensures consistency and personalization of beverage preparation quality, and enhances system stability and safety.
Smart Images

Figure CN120634193A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent beverage preparation equipment, and in particular to a task processing method and device for an intelligent capsule fresh-brew beverage machine. Background Art
[0002] Smart capsule fresh-extracted beverage machines are an important development direction of modern household and commercial beverage preparation equipment. Through the raw materials encapsulated in the capsule and the precisely controlled extraction process, high-quality beverage preparation can be achieved quickly and conveniently.
[0003] Common capsule beverage machines currently on the market typically employ a simple, single-task processing model. After the user inserts a capsule and selects the preparation parameters via a button, the machine executes a fixed process according to a pre-set program. For example, a certain brand of coffee capsule machine uses preset extraction parameters, with a water pump controlling pressure and a heating system controlling temperature to complete a single coffee preparation task.
[0004] More advanced smart capsule beverage machines incorporate basic task queue management, capable of identifying capsule types and invoking corresponding recipe parameters. However, their scheduling systems employ a simple first-in, first-out (FIFO) principle, lacking the ability to effectively handle resource conflicts. These systems use a fixed set of parameters to control the extraction process, unable to dynamically adjust to real-time conditions. Furthermore, they are inefficient when handling the demands of multiple users and multiple tasks.
[0005] There are two major problems with existing technologies: first, task scheduling lacks intelligence and cannot be dynamically optimized based on task priority, resource status, and system load, resulting in low resource utilization and long waiting times; second, parameter control accuracy is limited, and it cannot be adjusted in real time according to individual capsule characteristics, environmental factors, and user preferences, affecting the consistency and personalization of the final beverage quality. Summary of the Invention
[0006] The purpose of the present invention is to provide a task processing method and device for an intelligent capsule fresh-brew beverage machine, aiming to solve the technical problems of the existing capsule beverage machine in multi-tasking processing, such as unintelligent resource scheduling and limited parameter control accuracy.
[0007] To achieve the above-mentioned objectives, the present invention provides a task processing method for an intelligent capsule fresh-brew beverage machine, comprising the following steps: performing multimodal recognition technology fusion processing on user input instructions and capsule labels to obtain an initial parameter set for beverage preparation containing a basic capsule formula, wherein the initial parameter set includes temperature, flow rate and pressure during the extraction process; based on the initial parameter set, constructing a double-layer space structure of a public resource domain and a private resource domain through a differential private space efficiency algorithm to generate a task model containing priorities; based on the task model, constructing a task dependency graph and extracting spectral features using the generalized skew spectrum theory of graphs, and generating a task scheduling strategy based on the spectral features; based on the task scheduling strategy, performing resource demand prediction and conflict resolution through a dynamic resource allocation algorithm to form a resource allocation plan; based on the resource allocation plan and the initial parameter set, performing parameter control through an environmental factor compensation mechanism to obtain an optimized parameter set for beverage preparation; executing the beverage preparation task according to the optimized parameter set and the task scheduling strategy; and performing anomaly detection and emergency response processing on the execution process of the beverage preparation task.
[0008] Furthermore, the user input instructions include voice instructions and touch screen operations, and the multimodal recognition technology fusion processing of the user input instructions and the capsule label to obtain an initial parameter set for beverage preparation including a basic capsule formula includes: processing the user's voice instructions through voice recognition technology and processing the user's touch screen operation through image recognition technology to obtain user beverage preparation demand information; scanning the capsule label using RFID or NFC technology to obtain capsule information including capsule type, specification and shelf life information; performing parameter fusion algorithm preference matching processing on the capsule information and the user's historical preparation records based on the user's beverage preparation demand information to obtain personalized user preference information; and performing parameter weight calculation and fusion processing on the personalized user preference information and the basic capsule formula to obtain the initial parameter set.
[0009] Furthermore, a double-layer space structure of a public resource domain and a private resource domain is constructed through a differential private space efficiency algorithm to generate a task model containing priorities, including: constructing a task description structure for the initial parameter set in combination with a timestamp and a user identifier to obtain a structured task description object; performing resource mapping function calculation processing on the task description object to obtain a resource demand vector containing water, heat energy, pressure, and time; constructing a double-layer space structure containing a public resource domain and a private resource domain based on the revolving door model theory and the resource demand vector; performing differential private space efficiency algorithm comparison processing on the tasks in the double-layer space structure to calculate the resource utilization efficiency and conflict impact degree of each task, and assigning priority weights to the tasks based on the efficiency score and conflict impact degree to obtain the task model containing priorities.
[0010] Furthermore, based on the task model, the generalized skew spectrum theory of graphs is used to construct a task dependency graph and extract spectral features, and an optimized task scheduling strategy is generated based on the spectral features, including: performing resource dependency analysis and construction processing on the task model to obtain a directed graph structure that expresses resource competition and dependency relationships between tasks; performing matrix calculation and generalized skew spectrum calculation processing on the directed graph structure to obtain spectral features including eigenvalues and eigenvectors; based on the eigenvalues and eigenvectors, performing task grouping and sorting optimization through a heuristic algorithm to generate a task execution sequence that maximizes system throughput and minimizes average waiting time; based on the task execution sequence and a system load prediction model established based on historical task execution time data, scheduling time windows are divided to form the optimized task scheduling strategy.
[0011] Furthermore, based on the task scheduling strategy, resource demand prediction and conflict resolution are performed through a dynamic resource allocation algorithm to form a resource allocation plan, including: real-time monitoring and processing of the water tank water level, heating system temperature, and pressure pump status of the smart capsule fresh beverage machine to obtain the current available status of key resources; based on the task scheduling strategy and the current available status of key resources, a demand prediction model for each resource in a future time window is established to identify potential resource conflict points; based on the potential resource conflict points, conflict classification and resolution strategy selection are performed through a resource competition arbitration algorithm to determine the resource allocation priority and generate a conflict resolution result; based on the conflict resolution result, a specific resource usage time period and resource amount are allocated to each task to form the resource allocation plan.
[0012] Furthermore, based on the resource allocation plan, parameter control is performed through an environmental factor compensation mechanism to obtain an optimized parameter set for beverage preparation, including: based on the resource allocation plan, combined with the capsule formula library parameters and user personalized preferences, the initial parameter set is fine-tuned to set initial target values of control parameters including temperature, flow, and pressure; based on real-time monitored ambient temperature, humidity, and air pressure data, the compensation coefficient is calculated through an environmental factor influence model, and the initial target value is dynamically adjusted to obtain the final target value of the control parameter; based on the deviation between the real-time temperature sensor data, flow sensor data, and pressure sensor data and the final target value, the parameter is fine-tuned through a closed-loop feedback mechanism and a predictive control strategy to achieve continuous optimization of the control parameters and obtain an optimized parameter set for beverage preparation.
[0013] Furthermore, based on the real-time monitored ambient temperature, humidity and air pressure data, the compensation coefficient is calculated through the environmental factor influence model, and the initial target value is dynamically adjusted to obtain the final target value of the control parameter, including: quantitative analysis and processing of the real-time monitoring data of ambient temperature, humidity and air pressure to obtain a mathematical model of the impact of different environmental conditions on the beverage preparation process; calculating and processing the temperature compensation coefficient, pressure compensation coefficient and time compensation coefficient of the mathematical model to obtain a multi-dimensional compensation coefficient matrix; according to the compensation coefficient matrix, the target value of the control parameter is corrected and calculated in real time to obtain the final target value of the control parameter.
[0014] Furthermore, the beverage preparation task execution process is subjected to abnormality detection and emergency response processing, including: real-time collection of temperature, pressure and flow during the beverage preparation process to obtain a multi-dimensional parameter monitoring data stream during the beverage preparation process; based on the multi-dimensional parameter monitoring data stream and historical normal preparation data, an abnormality detection model is trained through a machine learning algorithm, and the abnormality detection model is used to identify abnormal patterns including parameter fluctuations and / or equipment failures; based on the analysis results of the multi-dimensional parameter monitoring data stream by the abnormality detection model, an automatic adjustment processing operation of the optimized parameter set is performed.
[0015] Furthermore, according to the instructions, the optimization parameter set and the task scheduling strategy, the beverage preparation task is executed, including: based on the optimization parameter set, designing special PID controllers with anti-overshoot characteristics for temperature, flow and pressure respectively, and constructing a multi-level collaborative PID control network; based on the task execution order determined by the task scheduling strategy, starting each preparation task in sequence according to the time window; after each preparation task is started, according to the temperature, flow and pressure parameters in the optimization parameter set, controlling the heating system to reach the target temperature, controlling the water pump to reach the target flow, and controlling the pressure pump to reach the target pressure through the multi-level collaborative PID control network.
[0016] The present invention also provides a task processing device for an intelligent capsule fresh-brew beverage machine, comprising: a fusion processing module for performing multimodal recognition technology fusion processing on user input instructions and capsule labels to obtain an initial parameter set for beverage preparation containing a basic capsule formula, wherein the initial parameter set includes temperature, flow rate, and pressure during the extraction process; a generation module for constructing a double-layer space structure of a public resource domain and a private resource domain based on the initial parameter set using a differential private space efficiency algorithm to generate a task model containing priorities; a construction module for constructing a task dependency graph based on the task model using the generalized skew spectrum theory of graphs and extracting spectral features, and generating a task scheduling strategy based on the spectral features; a prediction and conflict resolution module for performing resource demand prediction and conflict resolution based on the task scheduling strategy using a dynamic resource allocation algorithm to form a resource allocation plan; a control module for performing parameter control based on the resource allocation plan and the initial parameter set using an environmental factor compensation mechanism to obtain an optimized parameter set for beverage preparation; an execution module for executing the beverage preparation task according to the optimized parameter set and the task scheduling strategy; and an anomaly detection module for performing anomaly detection and emergency response processing on the execution process of the beverage preparation task.
[0017] The beneficial effects of the present invention are: By fusing user input instructions and capsule labels using multimodal recognition technology, an initial parameter set containing the basic capsule formula is obtained, which improves the accuracy and personalization of parameter settings.
[0018] A dual-layer spatial structure of public resource domain and private resource domain is constructed through the differential private space efficiency algorithm, which solves the resource competition and priority allocation problems in multi-user and multi-task scenarios and improves the system resource utilization efficiency.
[0019] By using the generalized skew spectrum theory of graphs to construct task dependency graphs and extract spectral features, we can capture the complex dependencies and resource competition patterns between tasks, implement efficient task scheduling strategies, and reduce average waiting time.
[0020] Resource demand prediction and conflict resolution are performed through dynamic resource allocation algorithms, which improves the rationality of resource allocation and system response speed.
[0021] The environmental factor compensation mechanism is adopted to achieve precise control and dynamic adjustment of parameters such as temperature, flow, and pressure, thereby improving the consistency of beverage preparation quality.
[0022] Through anomaly detection and emergency response processing mechanisms, parameter anomalies and equipment failures in the preparation process can be identified in real time, improving the stability and safety of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without inventive effort.
[0024] Figure 1 A flowchart of a task processing method for a smart capsule fresh beverage machine provided by an embodiment of the present invention; Figure 2 This is a flowchart of the fusion processing of multimodal recognition technology in an embodiment of the present invention; Figure 3 A schematic diagram of a dual-layer space structure constructed by the differential private space efficiency algorithm in an embodiment of the present invention; Figure 4 This is an architecture diagram of a task processing device for a smart capsule fresh beverage machine provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the disclosure for which protection is sought, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present disclosure.
[0026] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0027] The term "and / or" herein simply describes an association relationship, indicating that three relationships can exist. For example, A and / or B can represent the existence of three situations: A alone, A and B simultaneously, and B alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.
[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0029] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0030] like Figure 1 As shown, the present invention provides a task processing method for an intelligent capsule fresh beverage machine, comprising the following steps: Step S1: Perform multimodal recognition technology fusion processing on the user input instruction and the capsule label to obtain an initial parameter set for beverage preparation containing the basic capsule formula, wherein the initial parameter set includes the temperature, flow rate and pressure during the extraction process.
[0031] Specifically, the voice recognition module first processes the user's voice commands, such as "make a cup of espresso." Simultaneously, the image recognition module on the touch screen processes the user's touch screen operations, such as selecting parameters such as coffee strength and temperature. This information is integrated to form the user's drink preparation requirements.
[0032] At the same time, the electronic tag on the capsule is scanned by an RFID or NFC reader, or the QR code or barcode on the capsule is recognized by a camera to obtain detailed information about the capsule, including capsule type (such as coffee, tea, juice, etc.), specifications (such as single serving, double serving), production date, shelf life, etc.
[0033] The system matches the user's beverage preparation requirements with the capsule information and combines this with the user's historical preparation history to generate personalized user preference information through a parameter fusion algorithm. For example, if the user has historically preferred higher-temperature coffee, the target temperature will be appropriately raised from the standard temperature.
[0034] Finally, the personalized user preference information is weighted and fused with the basic capsule formula to generate an initial parameter set containing parameters such as temperature, flow, and pressure, which serves as the basis for subsequent beverage preparation.
[0035] In this embodiment, the user input instructions include voice instructions and touch screen operations, such as Figure 2 As shown, the user input command and the capsule label are fused using multimodal recognition technology to obtain an initial parameter set for beverage preparation containing the basic capsule recipe, including: S1.1 processes user voice commands through voice recognition technology and user touch screen operations through image recognition technology to obtain user beverage preparation demand information; First, the user's voice commands are processed through speech recognition technology. This speech recognition module utilizes a deep neural network architecture and consists of two core components: an acoustic model and a language model. The acoustic model converts the audio signal into a sequence of phonemes, while the language model converts the phoneme sequence into text instructions. It has been specially optimized for specialized terms and instructions in the beverage preparation field, accurately recognizing specialized commands such as "make an espresso" and "adjust the temperature to 85 degrees." It also supports recognition of multiple languages and dialects, enhancing the user experience's universality. During the speech recognition process, emotional and intonation features are extracted from the speech to assist in determining user preferences.
[0036] At the same time, image recognition technology is used to process user actions on the touchscreen. The image recognition module on the touchscreen utilizes a convolutional neural network architecture, capturing the user's touch trajectory, click location, and gestures in real time. This visual input is mapped to interface elements to accurately understand the user's intended choices. For example, when a user slides a temperature adjustment slider, not only is the final selected temperature value recorded, but the user's adjustment process and hesitation patterns are also analyzed as indicators of the strength of the user's preference. For complex multi-step actions, a sequence model is used to analyze them, ensuring a complete understanding of the user's intended actions.
[0037] S1.2 Scan the capsule label using RFID or NFC technology to obtain capsule information including capsule type, specifications, and shelf life; A dual identification mechanism is used to obtain capsule information. RFID or NFC technology is primarily used to read the electronic tag on the capsule, retrieving the detailed information encoded within. The RFID reader operates in the 13.56MHz frequency band, offering a high read success rate and robust interference resistance. As a backup mechanism, a high-resolution camera is also equipped, capable of using computer vision algorithms to identify the QR code, barcode, or text logo on the capsule. This redundant design ensures that even if the electronic tag is damaged or fails to read, the necessary capsule information can still be obtained. These technologies accurately capture key information such as capsule type (e.g., coffee, tea, juice), size (e.g., single serving, double serving), ingredient composition, production date, and expiration date, providing foundational data for subsequent parameter settings.
[0038] S1.3 Based on the user's beverage preparation demand information, a parameter fusion algorithm preference matching process is performed on the capsule information and the user's historical preparation records to obtain personalized user preference information; After obtaining user needs and capsule information, the parameter fusion algorithm preference matching processing stage begins. This stage uses a hybrid recommendation algorithm that combines collaborative filtering with content filtering to match the current user's preparation needs with historical records. A multidimensional user preference database is maintained, recording each user's historical preparation parameters, feedback evaluations, and usage habits. When a new preparation need arises, similar cases are first searched in the user's own historical records to extract the parameter preference patterns. If the user's historical data is insufficient, data from other user groups with similar preference patterns will be drawn on to infer possible preference parameters through collaborative filtering technology. This big data-based preference matching process enables personalized parameter recommendations for each user, allowing even first-time users of a specific capsule type to obtain relatively ideal preparation parameters.
[0039] S1.4 performs parameter weight calculation and fusion processing on the personalized user preference information and the basic capsule formula to obtain the initial parameter set.
[0040] Parameter weight calculation and fusion utilize a multi-level weighted fusion algorithm to optimally integrate personalized user preferences with professional capsule recipes. This process consists of three core steps: parameter importance assessment, user preference strength calculation, and adaptive weight fusion. During the parameter importance assessment phase, each preparation parameter is assigned a baseline importance coefficient, Wi, reflecting its impact on beverage quality. For example, for coffee extraction, Wi for pressure is 0.4, Wi for temperature is 0.3, Wi for flow rate is 0.2, and Wi for time is 0.1. During the user preference strength calculation phase, a preference strength index, Pi, is constructed based on historical user behavior. The specific algorithm is: Pi = (average deviation of the user's historical settings from the baseline value / parameter adjustable range) × (number of times the user has repeatedly selected this preference / total number of preparations) × (1 + recency factor). The recency factor reflects the weighting effect of the user's most recent selections and is calculated as: recency factor = 0.5 × e^(-t / 30), where t is the number of days since the last selection. During the adaptive weight fusion stage, a nonlinear weighted average method is used to calculate the final parameter value: Final parameter value = basic recipe parameter value × (1-αi) + user preference parameter value × αi. αi is the adaptive weight coefficient, calculated using the formula αi = Pi × (1-Wi) × (1+Si), and Si is the context-related coefficient, which takes into account the correlation between the current usage scenario and the parameter. For example, when used in the morning, the Si value of the coffee concentration parameter will increase by 0.2, and when the user's fatigue state is detected, the Si value of the temperature parameter will increase by 0.15. Through this multi-factor weight calculation and fusion processing, it is possible to meet the user's personalized preferences to the greatest extent while ensuring the basic quality of the beverage.
[0041] The capsule base recipe is a standard parameter set designed by professional beverage designers to ensure the basic quality of the beverage. A weighted fusion algorithm is used to intelligently integrate user preferences with the base recipe. During this fusion process, the adjustable range and sensitivity of each parameter are evaluated, and different parameters are assigned different weight coefficients. For example, key parameters that can significantly affect the basic quality of the beverage (such as coffee extraction pressure) are given a higher weight based on the base recipe; secondary parameters that primarily affect individual taste (such as fine-tuning the temperature) are given a higher weight based on user preferences. Through this balancing mechanism, the generated initial parameter set both ensures the basic quality of the beverage and meets the user's personalized needs, providing a scientific and reasonable parameter foundation for subsequent task processing.
[0042] Step S2: Based on the initial parameter set, a double-layer space structure of a public resource domain and a private resource domain is constructed by a differential private space efficiency algorithm to generate a task model including priorities.
[0043] Specifically, the initial parameter set from step S1 is received. Each newly received task is assigned a unique task identifier and a timestamp is appended to record the precise time the task was created, along with the user's identification information. This information is then integrated into a structured task description object, which uses a key-value pair format to store all relevant information, including the task ID, creation time, user ID, beverage type, required temperature, required water volume, required extraction pressure, and expected preparation time.
[0044] Based on the task description object, the resource mapping function calculates the specific resource requirements for each task. For example, the temperature requirement is analyzed to calculate the required heating energy and time; the water consumption is determined based on the water volume requirement; and the pressure pump workload and duration are calculated based on the extraction pressure requirement. Ultimately, a resource requirement vector is generated, accurately quantifying the task's requirements for various resources during the preparation process, including water, heat, pressure, and time.
[0045] Based on the revolving door model, a two-layer spatial structure is constructed, consisting of a public resource domain and a private resource domain. The public resource domain manages physical resources that need to be shared among multiple tasks, such as the main water tank and main heating system, using a resource pooling management strategy. The private resource domain, on the other hand, creates an isolated resource space for each user or task, ensuring that a user's personalized settings and preferences are not interfered with by other users' operations.
[0046] Based on the constructed two-layer space structure, a differential private space efficiency algorithm is used to compare the efficiency of different tasks and assign priorities. This algorithm calculates a resource utilization efficiency index for each task, which reflects the value generated per unit of resource consumption. This calculation takes into account the task's time urgency, resource utilization, user priority, and inter-task dependencies. Through these multi-dimensional comparisons, a dynamic priority index is assigned to each task, forming a complete task model.
[0047] like Figure 3 As shown in the figure, a dual-layer space structure of public resource domain and private resource domain is constructed through the differential private space efficiency algorithm to generate a task model with priority, including: S2.1 constructing a task description structure for the initial parameter set in combination with a timestamp and a user identifier to obtain a structured task description object; Each newly received beverage preparation request is assigned a globally unique task identifier (UUID) to ensure uniqueness in the distributed system. Timestamps accurate to the millisecond level are recorded, which not only marks the task creation time, but is also used for subsequent task priority calculation and timeout processing. User identification information is associated with the user account system to support personalized services and permission management in a multi-user environment. These basic information, together with the initial parameter set obtained in step S1, are organized into a structured task description object. This object is stored in JSON format and contains a nested key-value pair structure that clearly expresses the various dimensional information of the task, including task ID, creation time, user ID, beverage type, temperature requirements, water requirements, extraction pressure requirements, expected preparation time, etc. This structured task description provides a standardized data foundation for subsequent resource demand mapping and priority allocation.
[0048] S2.2 performs resource mapping function calculation processing on the task description object to obtain a resource demand vector including water, heat energy, pressure, and time; Based on structured task description objects, resource mapping functions are used to calculate the specific resource requirements for each type of resource. These resource mapping functions are complex mathematical models that convert abstract preparation parameters into specific resource consumption metrics. For example, for temperature parameters, the required heating energy and time are calculated by considering the initial water temperature, target water temperature, water volume, and ambient temperature. For water volume parameters, the actual water resource requirements are calculated by considering capsule type, soaking characteristics, and user preferences. For pressure parameters, the pressure pump workload and duration are calculated by analyzing capsule resistance characteristics and extraction requirements. These calculations are not simple linear relationships but take into account the interactions and nonlinear characteristics of resources. For example, rising water temperature affects the physical properties of water, which in turn affects the control parameters for flow and pressure. Using thermodynamic and fluid dynamics models, these complex relationships are accurately calculated, ultimately generating a multidimensional resource demand vector that precisely quantifies the demand for various resources, including water, heat, pressure, and time, during the preparation process.
[0049] S2.3 Based on the revolving door model theory and the resource demand vector, a two-layer spatial structure including a public resource domain and a private resource domain is constructed; After obtaining the resource demand vector, a two-layer spatial structure consisting of a public resource domain and a private resource domain is constructed based on the revolving door model. The revolving door model originates from resource management theory in computer science, and embodiments of the present invention innovatively apply it to beverage preparation resource management. The public resource domain manages physical resources that need to be shared among multiple tasks, such as the main water tank, main heating, and central pressure pump. These resources are managed using a resource pooling strategy, leveraging resource virtualization technology to enable multiple tasks to share these resources without conflict. The private resource domain creates an isolated resource space for each user or task, managing user-specific settings, personalized configurations, and dedicated resources. This isolation ensures a consistent and predictable user experience and prevents other users' operations from interfering with the current user. A revolving door mechanism is established between the two domains, allowing resources to flow from one domain to the other when specific conditions are met. For example, if a private setting proves to be beneficial to a large number of users, it can be transferred to the public domain and become the default setting. Conversely, if a public resource is frequently customized by a specific user, it is copied to that user's private domain to improve access efficiency. This two-layer spatial structure significantly improves resource management efficiency and user experience consistency in multi-user environments.
[0050] S2.4 performs differential private space efficiency algorithm comparison processing on the tasks in the double-layer space structure, calculates the resource utilization efficiency and conflict impact degree of each task, assigns priority weights to the tasks based on the efficiency score and conflict impact degree, and obtains the task model containing priority.
[0051] The Differential Private Space Efficiency Algorithm (DPSEA) is a task priority allocation algorithm designed specifically for resource-competitive environments. Based on differential privacy theory and resource efficiency evaluation, it addresses the resource allocation problem in multi-task parallel processing. The core of the DPSEA algorithm is to optimize overall resource allocation efficiency while protecting the private resource requirements of individual tasks by establishing resource efficiency metrics and conflict impact metrics. The algorithm consists of four key steps: differential resource mapping, efficiency function construction, conflict impact evaluation, and comprehensive priority calculation. In the differential resource mapping step, calibration noise is added to each task's resource requirement vector R to form a differentially private version R'. This ensures that the task's specific resource requirements are not fully exposed while preserving the overall distribution of resource requirements. The efficiency function construction step defines the task efficiency metric E(T), calculated as: E(T) = V(T) / (∑R'i×ti×ci), where V(T) is the task value function, reflecting the expected value of task completion; R'i is the differentially private resource requirement; ti is the resource occupation time; and ci is the resource unit cost factor. The conflict impact assessment step calculates the conflict impact C(Ti,Tj) between tasks, quantifying the degree of resource contention that may arise when tasks Ti and Tj execute in parallel. The calculation formula is: C(Ti,Tj) = ∑(min(R'i,k,R'j,k) × sk × ok), where R'i,k and R'j,k represent the demand for resource k by tasks Ti and Tj, respectively; sk is the scarcity coefficient of resource k; and ok is the conflict sensitivity of resource k. The priority comprehensive calculation step combines efficiency metrics, conflict impact, and task time sensitivity to calculate the final task priority P(T): P(T) = w1 × E(T) + w2 × (1-∑C(T,Tj) / n) + w3 × S(T), where w1, w2, and w3 are weight coefficients, and S(T) is the task's time sensitivity. By comprehensively considering resource efficiency, conflict impact, and time constraints, the system can assign a reasonable priority to each task, maximizing overall resource utilization.
[0052] A comparative analysis of tasks in a two-layer space structure using differentially private space efficiency algorithms was performed. The differentially private space efficiency algorithm uses a multi-dimensional evaluation to calculate the resource utilization efficiency and conflict impact of each task. In terms of efficiency evaluation, the algorithm considers the task's resource intensity (resource consumption per unit time), resource utilization (the ratio of actual output to resource input), and resource recovery potential (the proportion of resources that can be recovered and reused after task completion). In terms of conflict impact assessment, the algorithm analyzes the resource competition pattern, temporal overlap, and resource mutual exclusivity between tasks. Based on these evaluation metrics, an overall efficiency score and conflict impact score are calculated for each task. Then, a dynamic priority weight is assigned to each task, taking into account the task's time urgency (e.g., whether there are waiting users), user priority (e.g., VIP users vs. regular users), and load conditions. This priority is not static but dynamically adjusts as its status and other tasks change, ensuring optimal overall efficiency. Ultimately, a complete task model is formed based on the original task description, resource demand mapping, and assigned priorities. This model serves as input for the next step of generalized skewed spectrum task scheduling, laying the foundation for efficient resource scheduling.
[0053] The task model is a structured representation of a beverage preparation task, encompassing all key information and control parameters required for task execution. The model utilizes a multi-layered design consisting of five core components: a task identification layer, a parameter configuration layer, a resource requirement layer, a time constraint layer, and a priority control layer. The task identification layer includes a universally unique identifier (UUID), a creation timestamp, a user ID, and a task type tag, providing unique identification and basic categorization of tasks. The parameter configuration layer stores control parameters directly related to beverage preparation, including target temperature (°C), flow rate (ml / s), pressure (bar), total water volume (ml), and special process parameters (such as pre-infusion time and extraction curve type). The resource requirement layer quantifies the specific resource requirements for task execution, employing a resource-time matrix structure to record the demand and usage curves for water, heat, and pressure resources at each stage of the task lifecycle. The time constraint layer defines the time-related attributes of a task, including the expected start time, latest completion time, estimated execution duration, interruptibility flag, and task phase division information. The priority control layer stores priority metrics calculated using a differentially private space efficiency algorithm. These metrics include a base priority value, a dynamic adjustment factor, a resource efficiency score, and a conflict impact metric. The task model is constructed through information aggregation and feature extraction. First, basic parameters are extracted from user requests and capsule information to form the task identification layer and the parameter configuration layer. Then, specific resource requirements are calculated using a resource mapping function to construct the resource requirement layer. A time constraint layer is defined based on system load and user expectations. Finally, priority metrics are calculated using a differentially private space efficiency algorithm to complete the priority control layer. The complete task model is stored in JSON format, facilitating efficient access and processing across all system modules. This structured task model enables comprehensive understanding and precise control of the execution of each beverage preparation task.
[0054] Step S3: Based on the task model, the generalized skew spectrum theory of graphs is used to construct a task dependency graph and extract spectrum features, and a task scheduling strategy is generated based on the spectrum features.
[0055] Specifically, the task models containing priorities from step S2 are received and, based on these task models, a directed graph is constructed to represent resource competition and dependencies between tasks. This graph uses tasks as nodes and resource dependencies as edges, forming a complex network structure. Resource competition and logical dependencies between all pending tasks are identified and converted into directed edges, with edge weights reflecting the strength of the dependency or competition.
[0056] The dependency graph is converted into an adjacency matrix, where the matrix elements represent the connection relationships and weights between nodes. The generalized skew spectrum of the adjacency matrix is then calculated to obtain a series of eigenvalues and corresponding eigenvectors. These eigenvalues reflect the centrality and importance of nodes in the graph, while the eigenvectors contain information about task clustering and grouping.
[0057] Based on the extracted generalized skew spectrum features, a heuristic algorithm is used to generate the optimal task execution sequence. The algorithm first groups tasks based on their feature vectors, identifying sets of tasks that can be executed in parallel and sequences of tasks that must be executed serially. Then, the algorithm uses an iterative optimization method to search for the optimal task execution sequence to maximize throughput and minimize average waiting time, taking into account task priorities, resource availability, and dependency constraints.
[0058] Based on the current load status and predictions for future tasks, the generated scheduling policy is refined with respect to the time dimension. The current processing capacity and the number of tasks in the queue are evaluated to determine a reasonable scheduling period. This period is then divided into multiple time windows, each of which is assigned a specific set of tasks. A certain percentage of resources and time windows are also reserved for handling unforeseen new tasks, particularly high-priority, urgent tasks. Ultimately, a complete scheduling policy with respect to the time dimension is output.
[0059] The method comprises the following steps: based on the task model, constructing a task dependency graph and extracting spectral features using the generalized skew spectrum theory of graphs; and generating an optimized task scheduling strategy based on the spectral features. The method comprises the following steps: S3.1 performs resource dependency analysis and construction processing on the task model to obtain a directed graph structure that expresses resource competition and dependency relationships between tasks; First, the task model undergoes resource dependency analysis and construction, generating a directed graph structure that represents resource competition and dependencies between tasks. This directed graph uses tasks as nodes and resource dependencies as edges, forming a complex network structure. By deeply analyzing each task's resource requirement vector, resource competition relationships between tasks are identified. For example, when two tasks require the same heating element at similar times, a directed edge representing "heating resource competition" is established between the two task nodes, from the lower-priority task to the higher-priority task. The edge weight reflects the intensity of the competition, calculated as the product of the overlap in resource requirements between the two tasks and the scarcity of the resource. In addition to resource competition relationships, logical dependencies between tasks are also identified, such as when some tasks must complete before others can begin (for example, the self-cleaning task must execute after all beverage preparation tasks have completed). These logical dependencies are represented as mandatory directed edges with maximum weights to ensure that the scheduling algorithm strictly adheres to these constraints. In this way, a complex dependency graph is constructed that comprehensively captures the interaction patterns of tasks. This graph not only contains information about resource competition but also incorporates multi-dimensional data such as task priorities, execution constraints, and status.
[0060] S3.2 performing matrix calculation and generalized skew spectrum calculation on the directed graph structure to obtain spectrum features including eigenvalues and eigenvectors; After the dependency graph is constructed, matrix calculation and generalized skew spectrum calculation are performed on the directed graph structure. First, the dependency graph is converted into an adjacency matrix, where the matrix element a ij Represents the weight of the edge from node i to node j, and is 0 if there is no edge. Since dependencies are usually asymmetric (task A depends on task B does not mean that task B depends on task A), this adjacency matrix is asymmetric. Traditional spectral graph theory mainly deals with symmetric matrices and is not applicable to this case, so the generalized skew spectrum theory is used for analysis. Calculate the eigenvalues and eigenvectors of the asymmetric adjacency matrix to form its generalized skew spectrum. Unlike traditional spectral theory, the generalized skew spectrum is particularly suitable for dealing with asymmetric relationships in directed graphs, and can more accurately reflect the unidirectional dependencies and resource competition patterns between tasks. Through numerical calculation methods (such as power iteration method or QR decomposition), a series of eigenvalues λ are obtained. i and the corresponding eigenvector v i These eigenvalues reflect the centrality and importance of nodes in the graph. The eigenvectors corresponding to larger eigenvalues contain key information about the graph structure. The eigenvectors contain information about task clustering and grouping. Elements with close values in the eigenvectors indicate that there is a close connection between the corresponding tasks and they may be suitable for scheduling together.
[0061] S3.3 performing task grouping and sorting optimization using a heuristic algorithm based on the eigenvalues and eigenvectors to generate a task execution sequence that maximizes throughput and minimizes average waiting time; Based on the extracted eigenvalues and eigenvectors, a heuristic algorithm is used to optimize task grouping and sequencing. This heuristic algorithm is guided by two key objectives: maximizing throughput (the number of tasks completed per unit time) and minimizing average waiting time (the average time from task creation to execution). The algorithm first leverages the clustering properties of eigenvectors to divide tasks into multiple groups. Tasks within the same group share similar resource requirements or time constraints and are therefore suitable for scheduling together. The algorithm then prioritizes tasks within each group, taking into account their original priorities, waiting times, and resource requirements. For task groups that can potentially execute in parallel, the algorithm evaluates the resource efficiency and potential conflicts of parallel execution and decides whether to allow parallel execution. For task sequences that must execute serially, the algorithm searches for the optimal execution order to minimize overall completion time. This process employs a simulated annealing strategy, using iterative optimization methods to search for the optimal task execution order and avoid falling into local optima. The algorithm also considers dynamic characteristics, such as resource state changes and the possibility of new tasks arriving, allowing for appropriate flexibility in the scheduling strategy. The resulting task execution order not only optimizes performance metrics theoretically but also demonstrates practical feasibility, providing a foundation for the subsequent time window partitioning.
[0062] S3.4 divides the scheduling time window based on the task execution sequence and the system load prediction model established based on historical task execution time data to form the optimized task scheduling strategy.
[0063] The system load forecasting model is built based on historical task execution time data, providing forward-looking guidance for task scheduling. This model utilizes a multi-level time series analysis architecture, combining statistical learning and deep learning techniques to accurately predict future system load. At the data collection level, detailed execution data for each beverage preparation task is continuously recorded, including multi-dimensional information such as task type, start time, end time, resource usage, and environmental conditions. This raw data is preprocessed and organized into a structured time series dataset. Preprocessing steps include outlier detection and handling, missing data interpolation, and time alignment to ensure data quality and consistency. At the model construction level, time series decomposition techniques are first applied to decompose historical load data into three components: trend, seasonal, and random terms. The trend term reflects long-term trends in system load, such as a base load that gradually increases with increasing user numbers. The seasonal term captures cyclical load patterns, such as peak hours in weekday mornings and afternoons, or differences in usage between weekends and weekdays. The random term represents unpredictable load fluctuations. The system establishes prediction models for these three components respectively: the trend item adopts regression model, the seasonal item uses Fourier analysis, and the random item is predicted through ARIMA (autoregressive integrated moving average) model.
[0064] In addition to basic time series analysis, embodiments of the present invention also incorporate context-aware mechanisms to integrate external information such as environmental factors, user behavior patterns, and special events into the prediction model. For example, the model might identify patterns such as increased demand for hot drinks in cold weather or a surge in preparation tasks after specific social events. This context-aware capability significantly improves prediction accuracy, particularly for unconventional load changes. To address the varying needs of short-term and long-term forecasting, a multi-scale forecasting framework is implemented. Short-term forecasts (for the next few minutes to an hour) rely primarily on recent load data and current system status, employing a deep learning model based on a recurrent neural network (RNN) to capture complex short-term dynamics. Medium-term forecasts (for the next few hours) combine time series models and pattern recognition techniques to balance historical patterns and current trends. Long-term forecasts (for the next day or longer) rely more heavily on periodic patterns and trend analysis in historical data.
[0065] For example, a smart capsule beverage dispenser deployed in an office environment can learn that weekday usage peaks from 9:00 AM to 10:00 AM (morning coffee), 12:00 PM to 2:00 PM (after-lunch drinks), and 3:00 PM to 4:00 PM (afternoon tea). The model not only identifies these time patterns but also identifies differences in beverage preferences during these peak periods: espresso is the primary drink during the morning peak, while tea increases in popularity during the afternoon peak. Based on these learned patterns, the system automatically begins preheating and preparing resources at 8:30 AM each day to address the upcoming morning peak. It also adjusts default recipe parameters for different times, such as setting a higher strength for morning coffee. It even performs water tank refills and system self-tests in advance of predicted peaks, maximizing system availability during periods of high load. When external factors change, such as company events or unusual weather, the prediction model can be adjusted based on historical data from similar situations to accommodate unusual usage patterns. This precise load forecasting capability enables the system to optimize resource allocation in advance, significantly improving service quality and user satisfaction during peak periods.
[0066] In S3.4, the current processing capacity and the number of tasks in the queue are first assessed. Combined with historical task execution time data, a system load forecasting model is established. This model uses time series analysis to predict load levels and resource availability at different time periods in the future. Based on this forecasting model, a reasonable scheduling period (typically ranging from a few minutes to tens of minutes) is determined and divided into multiple time windows. Each window is assigned a specific set of tasks, and the allocation process takes into account task urgency, resource utilization efficiency, and volatility. For example, urgent tasks are scheduled in the nearest time window, while tasks with similar resource requirements are grouped into the same time window to improve resource utilization. A dynamic window adjustment mechanism is also implemented to adjust window size and task allocation based on real-time conditions. Furthermore, a certain percentage of resources and time windows are reserved to handle unforeseen new tasks, particularly high-priority urgent tasks. This dynamic time window division strategy enables flexible response to changing task flows, ensuring scheduling stability while providing necessary responsiveness. Ultimately, a complete scheduling strategy with a time dimension is output, which clearly specifies in which time window each task is executed, which resources are used, and the specific execution order, providing detailed guidance for the next step of resource allocation and conflict resolution.
[0067] Step S4: Based on the task scheduling strategy, resource demand prediction and conflict resolution are performed through a dynamic resource allocation algorithm to form a resource allocation plan.
[0068] Specifically, a distributed sensor network monitors the real-time status of each key resource in the beverage dispenser. This network comprises a variety of sensors, including water level, temperature, pressure, and flow sensors. Non-invasive sensing technology ensures that the sensing process does not affect beverage preparation quality while maintaining high-precision data collection. After preliminary signal processing and noise filtering, the collected real-time data forms a current status view of each resource.
[0069] Based on the task scheduling strategy generated in step S3, a demand forecast model for each resource within the future time window is constructed. All tasks scheduled for execution within the scheduling window are analyzed, and the demand and time distribution of each task for various resources are extracted to establish a time-series resource demand model. This model can be used to plot the demand curve for each resource within the future time window, predict peak and trough periods of resource demand, and identify points where resource demand exceeds available supply. These points are marked as potential resource conflict points.
[0070] A specialized conflict resolution algorithm is implemented for predicted resource conflicts. This algorithm first categorizes conflicts into different types, such as temporary, structural, or priority. For each conflict type, a corresponding resolution strategy is applied. For temporary conflicts, task fine-tuning may be used to stagger resource usage. For structural conflicts, resource substitution or task splitting may be employed. For priority conflicts, a resource contention arbitration mechanism is implemented, determining the order of resource allocation based on a comprehensive score of task priority, wait time, and resource utilization efficiency.
[0071] Based on the conflict resolution results, each task is assigned a specific time slot, clearly specifying its start time, expected completion time, and possible pause points. Each task is then allocated the resources it needs during its execution window, including the precise amount and method of resource usage. These allocation decisions are organized into a structured resource allocation plan, presented as a timeline that clearly shows the allocation status of each resource and the resource usage of each task within the future time window.
[0072] In addition, based on the task scheduling strategy, resource demand prediction and conflict resolution are performed through a dynamic resource allocation algorithm to form a resource allocation plan, including: S4.1 monitors the water level, heating temperature, and pressure pump status of the smart capsule fresh beverage machine in real time to obtain the current availability of key resources; First, key resources in the smart capsule fresh-brew beverage machine are monitored in real time to obtain their current availability. This monitoring system is comprised of multiple high-precision sensors, forming a complete distributed sensor network. Water tank level monitoring utilizes a dual mechanism consisting of an ultrasonic water level sensor and a float-type backup sensor, accurately measuring the remaining water volume in the tank with an accuracy of ±5ml. Heating temperature monitoring utilizes multiple thermocouple temperature sensors, placed at key locations such as the heating element, water pipes, and water outlet. This creates a temperature gradient distribution map, not only monitoring current temperature but also predicting heat transfer trends. Pressure pump status monitoring combines pressure sensors with current sensors. The former directly measures the liquid pressure, while the latter monitors the operating current of the pressure pump. These two data points can be used to assess the pump's operating status and efficiency. These sensors collect data at a high frequency (typically multiple times per second) and transmit it to the central processing unit via a low-latency data bus. The use of non-invasive sensing technology ensures that the sensing process does not affect beverage preparation quality. The collected real-time data undergoes preliminary signal processing and noise filtering to form a current status view of each resource. This status view not only includes the static availability of resources (such as the amount of water in the tank), but also includes dynamic change indicators (such as the rate of water temperature rise and pressure fluctuation trends), providing a comprehensive real-time basis for resource allocation decisions.
[0073] S4.2 Based on the task scheduling strategy and the current availability of key resources, establish a demand forecast model for each resource in a future time window and identify potential resource conflict points; The demand forecasting model is a comprehensive intelligent forecasting system used to accurately estimate the usage demand of various resources in the future time window.
[0074] In one example, the model, based on a hierarchical Bayesian network structure, combines deep learning and probabilistic reasoning techniques to achieve multi-scale and multi-dimensional prediction of resource demand. The model architecture consists of four main components: a data acquisition layer, a feature extraction layer, a prediction engine layer, and an output adaptation layer. The data acquisition layer collects three key inputs: scheduled task information (including type, parameter settings, and estimated execution time), current resource status (such as water tank levels, heating temperatures, and pressure system status), and historical execution data (such as actual resource consumption records for similar tasks). The feature extraction layer processes the input data, extracting time series features, task features, and resource status features. This layer uses wavelet transforms to analyze the time-frequency characteristics of historical resource usage, convolutional neural networks to extract task features, and principal component analysis to compress resource status features. The prediction engine layer, the core of the model, employs a hybrid prediction architecture consisting of three parallel prediction units: a short-term prediction unit (based on an LSTM network, forecasting 1-5 minutes into the future), a medium-term prediction unit (based on a Transformer architecture, forecasting 5-15 minutes into the future), and a long-term prediction unit (based on GPR Gaussian process regression, forecasting 15-30 minutes into the future). The prediction results of these three units are weighted and fused through an attention mechanism to form the final forecast. The output adaptation layer converts the forecast results into a resource demand time series curve, quantifying the demand for each key resource (water, heat, and pressure) within a future time window with high precision, at a 5-second granularity, and including confidence interval information. The model also implements online learning, continuously adjusting internal parameters to improve forecast accuracy by comparing predicted values with actual consumption. The average forecast error of this demand forecast model is kept within ±7%, providing a reliable decision-making basis for resource allocation and conflict resolution.
[0075] In another example, the resource demand forecasting model for a future time window is a multi-level, multi-dimensional forecasting system used to accurately estimate resource usage requirements for a smart capsule fresh-brew beverage dispenser within a future timeframe. This model utilizes a hybrid forecasting architecture, combining statistical analysis, time series forecasting, and machine learning techniques. Its core components include a historical load analysis module, a resource consumption pattern library, a task feature mapper, and a dynamic update mechanism. The historical load analysis module analyzes resource usage data for all beverage preparation tasks over the past six months to identify typical usage patterns and peak periods. The resource consumption pattern library stores resource consumption curves for different capsule types under different parameter settings, including water volume-time curves, temperature-energy consumption curves, and pressure-power curves. The task feature mapper matches the characteristics of scheduled tasks with resource consumption patterns to generate specific resource demand forecasts. Using a sliding time window technique, the model divides the future timeline into 5-second units. The resource requirements of all scheduled tasks are accumulated within each time unit to generate time-series curves for water, heat, and pressure resources. The model also incorporates an AI-powered forecasting algorithm that predicts resource demand peaks and valleys within the next 30 minutes based on the characteristics and volume of currently queued tasks, with over 92% accuracy. This precise resource demand forecasting enables the system to proactively identify resource conflicts and optimize resource allocation plans.
[0076] Based on the task scheduling strategy generated in step S3 and the current availability of key resources obtained through real-time monitoring, a demand forecast model for each resource within a future time window is established to identify potential resource conflict points. First, all tasks scheduled for execution within the scheduling window are analyzed to extract the demand and time distribution of each resource for each task. Next, a temporal resource demand model is developed, dividing the future timeline into small time units (such as seconds or minutes) and calculating the cumulative demand for each resource within each time unit. This calculation takes into account the task's start time, duration, and resource consumption pattern (e.g., constant or variable consumption). For example, for thermal energy resources, the heating demand, heat loss rate, and thermal inertia of different tasks are considered. For water resources, the water consumption, recycled water volume, and evaporation losses of each task are analyzed. This model enables the generation of demand curves for each resource within the future time window, predicting peak and trough periods for resource demand. These demand curves are compared with the resource supply capacity curves, and points where demand exceeds supply are marked as potential resource conflict points. It not only identifies simple resource quantity conflicts (e.g., insufficient water), but also complex quality conflicts (e.g., unstable temperature) and timing conflicts (e.g., untimely resource status transitions). This comprehensive conflict identification ensures that all possible resource allocation issues can be anticipated and addressed.
[0077] S4.3 Based on the potential resource conflict points, conflict classification and resolution strategy selection are performed using a resource competition arbitration algorithm to determine resource allocation priorities and generate conflict resolution results; For identified potential resource conflicts, a resource contention arbitration algorithm is used to classify and select a resolution strategy. This algorithm first categorizes conflicts into different types: temporary (resource demand exceeds supply within a short period of time), structural (designed resource bottlenecks), or priority (high- and low-priority tasks simultaneously require the same resources). A corresponding resolution strategy is applied for each conflict type. For temporary conflicts, a task fine-tuning strategy is employed to stagger resource usage by slightly delaying the start times of non-urgent tasks, or to adjust the resource usage rate of tasks to smooth out demand peaks. For structural conflicts, resource substitution strategies are implemented, such as using a backup tank when the primary tank is busy, or task splitting strategies are implemented, breaking large tasks into multiple smaller tasks that can be executed intermittently and inserted into periods of idle resources. For priority conflicts, a multi-factor resource contention arbitration mechanism is implemented, taking into account task priority, wait time, user experience impact, and resource utilization efficiency. A comprehensive score is calculated to determine the order of resource allocation. In extreme cases, a resource reservation mechanism is implemented to reserve necessary resources for critical tasks, ensuring that high-priority tasks are not delayed due to resource shortages. The algorithm also includes a fallback mechanism that, when the initial solution is not feasible, gradually tries alternative solutions until a feasible conflict resolution is found. This multi-level conflict resolution mechanism ensures that various resource contention situations can be handled intelligently.
[0078] S4.4 Based on the conflict resolution result, a specific resource usage time period and resource amount are allocated to each task to form the resource allocation plan.
[0079] Finally, based on the conflict resolution results, each task is assigned specific resource usage time periods and resource amounts, forming the final resource allocation plan. First, a precise time period is assigned to each task, clearly specifying the task's start time, expected completion time, and possible pause points (such as waiting for resource availability). These time points are not rough estimates, but rather calculated based on a detailed task execution model and resource status predictions, resulting in high accuracy. Then, each task is allocated the required resources within its execution period, including the precise resource usage and usage methods. For example, the coffee preparation task specifies how many milliliters of water to use, the required water temperature, the extraction pressure range, and which heating element to use. These allocation decisions take into account the physical properties of resources and state transition constraints, such as the heating rate and thermal inertia. Monitoring thresholds and adjustment policies are also set for each resource allocation, enabling timely adjustments if actual execution deviates from the plan. These allocation decisions are organized into a structured resource allocation plan, presented as a timeline, clearly showing the allocation status of each resource and the resource usage of each task over the future time window. This allocation plan not only considers the needs of currently known tasks but also reserves a certain amount of resource margin to cope with possible new urgent tasks. The resulting resource allocation plan becomes an important input for the parameter control in step S5. It provides clear guidance on which resources to activate at what time and how to precisely control the parameters of these resources, thereby achieving efficient resource utilization and high-quality beverage preparation.
[0080] Step S5: Based on the resource allocation plan and the initial parameter set, parameter control is performed through an environmental factor compensation mechanism to obtain an optimized parameter set for beverage preparation.
[0081] In step S5, initial target values for each control parameter are set based on the resource allocation plan from step S4 and the initial parameter set obtained from step S1. Resource allocation information for the upcoming task is extracted, including key parameters such as the allocated water volume, target temperature, and extraction pressure. These parameters are fine-tuned based on standard parameters from the capsule recipe library and user preferences. These initial target parameters are converted into specific instructions that the controller can understand, including settings for heating element power, pump flow control values, and pressure valve opening settings.
[0082] Environmental sensors monitor external factors such as ambient temperature, humidity, and air pressure in real time. Compensation coefficients are calculated based on this data, dynamically adjusting target control parameters. An environmental factor impact model was established to quantitatively analyze the impact of different environmental conditions on the beverage preparation process. Based on this impact model, various compensation coefficients are calculated in real time. These coefficients are derived through complex mathematical models that account for the interactive effects of multiple environmental factors. These compensation coefficients are applied to adjust target control values, ensuring optimal preparation parameters are consistently maintained under varying environmental conditions.
[0083] A closed-loop feedback mechanism continuously fine-tunes control parameters based on the deviation between real-time sensor data and target values. A high-precision sensor network collects the actual values of key parameters in real time, compares these values with the set target values, and calculates the deviation and deviation trend. Based on this deviation data, a complex optimization algorithm dynamically adjusts control parameters. A predictive control strategy is also implemented. By analyzing parameter trends, it predicts potential future deviations and takes proactive adjustments to effectively prevent significant fluctuations.
[0084] Based on the resource allocation plan, parameter control is performed through an environmental factor compensation mechanism to obtain an optimized beverage preparation parameter set, including: S5.1 fine-tuning the initial parameter set based on the resource allocation plan, combined with capsule formula library parameters and user personalized preferences, to set initial target values for control parameters including temperature, flow rate, and pressure; First, based on the resource allocation plan from step S4, the initial parameter set is fine-tuned, combining capsule recipe library parameters and user preferences, to set initial target values for the control parameters. This process begins by extracting detailed resource allocation information for the upcoming task from the resource allocation plan, including key parameters such as the allocated water volume, target temperature range, and extraction pressure range. A professional capsule recipe library, established and continuously updated by a team of beverage experts, is accessed, containing optimal preparation parameters for various capsule types. For example, for coffee capsules from a specific origin, the recipe library specifies a water temperature of 92°C, an extraction pressure of 9 bar, and a flow rate of 30 ml / s as the optimal parameter combination. These professional recipe parameters are intelligently integrated with the user's personalized preferences, and weighting is adjusted to reflect the parameter's importance and adjustable range. Key quality parameters (such as coffee extraction pressure) are given a higher weight based on the professional recipe, while personalized experience parameters (such as beverage temperature) are given a higher weight. Interactions between parameters are also considered. For example, if a user prefers a higher temperature, the flow rate is adjusted accordingly to ensure that extraction quality is not affected. This parameter fine-tuning is not a simple linear adjustment, but rather based on a nonlinear model that considers the comprehensive impact of parameter changes on the final beverage quality. Ultimately, a set of initial target values is generated, which are then converted into specific instructions understandable by the controller. These include power settings for heating elements, flow control values for water pumps, and pressure valve opening settings. The allowable fluctuation ranges for these parameters are also calculated to determine control accuracy requirements, providing a reference benchmark for subsequent real-time control.
[0085] S5.2 Based on the real-time monitored ambient temperature, humidity, and air pressure data, a compensation coefficient is calculated using an environmental factor impact model, and the initial target value is dynamically adjusted to obtain a final target value of the control parameter; The environmental factor impact model is a specially designed mathematical model used to quantitatively analyze the impact of environmental conditions on beverage preparation parameters and generate corresponding compensation strategies. Based on the principles of thermodynamics, fluid mechanics, and experimental data analysis, the model establishes a precise mapping relationship between environmental variables and preparation parameters. The model uses a multi-input multi-output (MIMO) structure to convert ambient temperature (T env ), humidity (H env ), air pressure (P env ) and altitude (A env ) as input variables, and outputs temperature compensation coefficient (CT), pressure compensation coefficient (CP), flow compensation coefficient (CF) and time compensation coefficient (Ct). The core of the model is a set of nonlinear conversion functions, which are implemented by combining polynomial regression and piecewise functions. The calculation formula of temperature compensation coefficient CT is: CT=1+α1(T ref -T env )+α2(T ref -T env)²+α3(H env -H ref ), where T ref is the reference ambient temperature (usually 25°C), H_ref is the reference humidity (usually 60%), α1, α2, α3 are fitting coefficients, which are dynamically adjusted according to different capsule types. The pressure compensation coefficient CP takes into account the influence of air pressure and altitude on water boiling point and extraction pressure. The calculation formula is: CP =1+β1(P ref -P env ) / P ref +β2(A env / 1000), where P ref is the standard atmospheric pressure (101.325kPa), β1 and β2 are fitting coefficients. The flow compensation coefficient CF mainly considers the influence of temperature and humidity on water viscosity. The calculation formula is: CF=1+γ1(T ref -T env )+γ2(H env -H ref )², where γ1 and γ2 are fitting coefficients. The time compensation coefficient Ct comprehensively considers the impact of environmental factors on the overall preparation time, and the calculation formula is: Ct =1+δ1CT+δ2CP+δ3CF, where δ1, δ2, and δ3 are weighting coefficients. In addition, the model also includes an interaction effect processing module, which quantifies the interaction between environmental factors through cross-term coefficients, such as the joint impact of the interaction between temperature and humidity on the water evaporation rate. The model parameters are obtained through training with a large amount of experimental data, covering a temperature range of -10°C to 40°C, a humidity range of 20% to 90%, an air pressure range of 70kPa to 105kPa, and an altitude range of 0 to 3000 meters. Through this precise modeling of the impact of environmental factors, preparation parameters can be automatically adjusted under various environmental conditions to maintain consistency in beverage quality.
[0086] Subsequently, based on real-time environmental data, compensation coefficients are calculated using an environmental factor impact model, dynamically adjusting the initial target value. Equipped with an array of high-precision environmental sensors, the system monitors external factors such as ambient temperature, humidity, and air pressure in real time. These sensors utilize industrial-grade precision standards, achieving a temperature sensing accuracy of ±0.1°C, a humidity sensing accuracy of ±2%RH, and an air pressure sensing accuracy of ±1hPa. A complex multivariate environmental factor impact model was established to quantitatively analyze the impact of different environmental conditions on the beverage preparation process. For example, the model analysis shows that for every 5°C decrease in ambient temperature, the temperature drop of hot water in the pipe increases by approximately 8%, necessitating a corresponding increase in the initial water temperature. For every 20% increase in ambient humidity, the evaporative cooling effect increases, affecting the final beverage temperature by approximately 1.2°C. For every 1000-meter increase in altitude, atmospheric pressure decreases by approximately 10%, lowering the boiling point of water by approximately 3.3°C, necessitating adjustments to temperature and pressure parameters. Based on this impact model, various compensation coefficients are calculated in real time. These coefficients are derived using a complex mathematical model that accounts for the interactive effects and nonlinear relationships of multiple environmental factors. For example, the temperature compensation coefficient considers not only ambient temperature but also humidity, airflow velocity, and the machine's own thermal state. A multi-dimensional compensation coefficient matrix is generated, including temperature, pressure, flow, and time compensation coefficients. These compensation coefficients are applied to adjust the control target value. The final control target value, accounting for environmental factors, is calculated using the formula: Final Target Value = Initial Target Value × (1 + corresponding compensation coefficient). This intelligent compensation mechanism significantly improves adaptability in various environments, ensuring consistent and stable beverage quality.
[0087] S5.3 is based on the deviation between the real-time temperature sensor data, flow sensor data and pressure sensor data and the final target value. It fine-tunes the parameters through a closed-loop feedback mechanism and predictive control strategy to achieve continuous optimization of the control parameters and obtain the optimized parameter set for beverage preparation.
[0088] Predictive control strategies transcend the limitations of traditional feedback control by predicting future state changes and taking preemptive control measures, achieving more precise and stable parameter control. This strategy, based on model predictive control (MPC) theory, combines dynamic models, optimization algorithms, and the concept of rolling horizon control. In terms of dynamic modeling, the predictive control strategy establishes precise mathematical models for each component of the smart capsule beverage dispenser. For example, the thermal model describes the dynamic relationship between heating power, water temperature, ambient temperature, and flow rate. This model not only considers the basic physical laws of heat conduction but also captures unique nonlinear characteristics and time-varying parameters through machine learning methods. The fluid model describes the relationship between pump power, pipe resistance, pressure, and flow rate, accounting for the changes in the physical properties of water at different temperatures and the dynamic response characteristics of the pipe. These models are derived through identification techniques. During control operation, input and output data are continuously collected and model parameters are continuously updated and optimized using algorithms such as recursive least squares, ensuring that the models accurately reflect the current dynamic characteristics.
[0089] The thermal model is a multi-physics field coupling model that describes the complex dynamic relationship between heating power, water temperature, ambient temperature and flow rate. The model is based on the first law of thermodynamics and the law of heat conduction, and integrates the principles of computational fluid dynamics (CFD) and neural network technology. The core equation combination of the model includes: energy balance equation E(t+Δt)=E(t) +Pin(t)×Δt-Pout(t)×Δt, where E represents the thermal energy of the system, Pin is the input power, and Pout is the heat loss power; temperature distribution equation ∂T / ∂t=α∇²T+S(x,y,z,t), which describes the spatiotemporal distribution of temperature in the system, α is the thermal diffusion coefficient, and S is the heat source term; heat loss function Pout=k1(T-Tenv)+k2F(T-Tenv)+k3(T 4 -Tenv 4 ), corresponding to conduction, convection and radiation heat losses respectively, F is the flow rate, k1, k2, k3 are heat transfer coefficients. The model innovatively introduces thermal inertia characteristic modeling, and captures the dynamic process of thermal energy storage and release through a recurrent neural network (RNN), solving the time-varying characteristics that traditional thermodynamic models cannot accurately describe. The RNN module contains LSTM units, and its input is historical temperature series, power changes and flow data, and its output is the temperature prediction at a future time point. The model also takes into account the nonlinear effects of the heating element, such as power saturation and heat conduction delay, and establishes a piecewise nonlinear mapping of the power-temperature response. The model parameters are continuously optimized through experimental data and online learning mechanisms, and the prediction accuracy reaches ±0.5℃.
[0090] The fluid model describes the relationship between pump power, pipe resistance, pressure, and flow rate, taking into account the changes in water's physical properties at different temperatures and the dynamic response of the pipe. The model is based on the Bernoulli and Darcy-Weisbach equations and incorporates machine learning techniques to capture non-ideal fluid behavior. The model's basic equations include: the pump characteristic equation H = H0 - aQ², where H is the pump head, H0 is the zero-flow head, a is the coefficient, and Q is the flow rate; the pipe resistance equation hf = f(L / D)(v² / 2g), where hf is the longitudinal loss, f is the friction factor, L is the pipe length, D is the pipe diameter, v is the flow velocity, and g is the acceleration due to gravity; and the node continuity equation ∑Qin = ∑Qout ensures flow balance at each node. The model innovatively introduces a temperature-dependent correction, describing the relationship between water viscosity and temperature using the formula μ(T) = μ0exp[-b(T-T0)], and using this change to correct the friction factor f. To capture the dynamic response characteristics of the pipeline system, the model uses a transfer function approach, expressing the relationship between pressure input and flow output as G(s) = Q(s) / P(s) = K / (τs+1)e^(-θs), where K is the gain, τ is the time constant, and θ is the delay time. The model also accounts for non-ideal effects such as air entrainment, two-phase flow, and pressure fluctuations, using support vector regression (SVR) technology to establish a predictive model for these complex phenomena. This composite modeling approach enables the fluid model to predict the pressure-flow relationship under various operating conditions with over 95% accuracy, providing a reliable basis for precise fluid control.
[0091] The core of predictive control is to predict the trajectory of state changes over a period of time in the future based on the current state and dynamic models. A prediction horizon is defined (typically a few seconds to tens of seconds), within which the controller uses the dynamic model to simulate future responses under different control inputs. For example, in water temperature control, the water temperature curve is predicted over the next 10 seconds at the current heating power; the temperature curve after increasing or decreasing the heating power is also simulated. Based on these predicted trajectories, an optimization objective function is defined, which typically includes multiple aspects such as control accuracy (minimizing the deviation between the actual value and the target value), control stability (avoiding drastic parameter fluctuations), and energy efficiency (minimizing resource consumption). By solving this optimization problem, the controller finds a control sequence that optimizes the objective function within the prediction horizon.
[0092] Taking temperature control as a specific example, traditional solutions immediately increase heating power when the water temperature drops below the target, then reduce it once the temperature approaches the target. This reactive control approach can easily lead to temperature overshoot and fluctuation. Predictive control strategies, however, are different: Assuming the current water temperature is 85°C and the target temperature is 92°C, a thermodynamic model predicts that if the heating power is immediately increased to maximum, the water temperature will reach 92°C after 7 seconds. However, due to thermal inertia, the temperature will continue to rise to 94°C before beginning to decline, resulting in a 2°C overshoot. The predictive controller calculates an optimal power profile: heating at 80% power for 5 seconds, then gradually reducing the power to 40%, allowing the temperature to steadily approach the target without overshoot. This predictive control approach is particularly well-suited for parameters with significant hysteresis and nonlinear characteristics, such as water temperature and pressure control.
[0093] The predictive control strategy also enables multi-parameter collaborative optimization, not only predicting individual parameter changes but also simulating the interactions between them for overall optimization. For example, during the coffee extraction process, it is predicted that if the current flow rate is maintained, the water temperature will drop by 3°C after passing through the extraction head, affecting extraction quality. The predictive controller coordinates temperature and flow control, appropriately raising the water temperature and fine-tuning the flow rate to ensure that the final extraction temperature remains within the optimal range. Predictive control is implemented using a rolling horizon control method. During each control cycle (typically 100-500 milliseconds), the predictive model is updated based on the latest state measurements, and the optimal control sequence is recalculated. Only the first control action in the sequence is executed, and the process is repeated in the next control cycle. This rolling optimization strategy continuously adapts to changes in the actual situation, such as environmental disturbances or model errors, maintaining robust control. This advanced predictive control strategy achieves more precise and stable parameter control than traditional control methods, significantly improving beverage preparation consistency and energy efficiency.
[0094] The state measurement update prediction model is an advanced control architecture that combines an adaptive Kalman filter with model predictive control (MPC). It is used to integrate the latest state measurement data in real time, update the system prediction model, and optimize control decisions. This model uses a state-space representation to describe the system's dynamic behavior as x(k+1) = A(k)x(k) + B(k)u(k) + w(k) and y(k) C(k)x(k) + v(k), where x represents the state vector (including physical quantities such as temperature, pressure, and flow), u represents the control input, y represents the measurement output, w represents process noise, and v represents measurement noise. A, B, and C represent system matrices. The core of the model is the adaptive Kalman filter, which achieves state estimation through a two-step recursive process: the prediction step and P(k|k-1)=A(k-1)P(k-1|k-1)A(k-1)ᵀ+Q(k-1); the update step K(k)=P(k|k-1)C(k)ᵀ[C(k)P(k|k-1)C(k)ᵀ+R(k)]⁻¹, and P(k|k)= [I -K(k)C(k)]P(k|k-1), where P is the state estimation error covariance matrix, K is the Kalman gain, and Q and R are the process noise and measurement noise covariance matrices, respectively. The model's innovation lies in its adaptive mechanism, which dynamically adjusts Q and R through residual analysis: Q(k) = λQ(k-1) + (1-λ)q(k)q(k)ᵀ, and R(k) = λR(k-1) + (1-λ)r(k)r(k)ᵀ, where q and r are the state prediction and measurement residuals, respectively, and λ is a forgetting factor (0.95–0.99). The state estimation results are directly used to update the internal model in the model predictive controller, which determines the optimal control sequence by solving the regressive optimization problem min{∑(‖y(k+i|k)-r(k+i)‖²Q1+ ‖Δu(k+i)‖²Q2)}, where r is the reference trajectory and Q1 and Q2 are weight matrices. The prediction horizon is typically 520 steps. The model also implements a state-dependent parameter identification (SDPI) mechanism to automatically adjust the system matrices A, B, and C across different operating ranges, improving the model's applicability to nonlinear systems. Through this model update mechanism based on the latest state measurements, the system can adapt to equipment aging, environmental changes and parameter drift, and always maintain high-precision prediction and control performance.
[0095] Through a closed-loop feedback mechanism and predictive control strategy, parameters are continuously fine-tuned based on the deviation between real-time sensor data and the final target value, achieving continuous optimization of control parameters. A high-precision sensor network is deployed to collect real-time actual values of key parameters, such as current water temperature (accuracy ±0.2°C), flow rate (accuracy ±0.5 ml / s), and pressure (accuracy ±0.1 bar). These actual values are compared with the final target value set in step two to calculate the deviation and its trend. A sophisticated closed-loop feedback control algorithm dynamically adjusts the control output based on the magnitude, duration, and rate of change of the deviation. For example, if the water temperature is detected to be below the target and the deviation continues to increase, the heating power is increased and the flow rate is reduced to accelerate temperature recovery. In addition, a dynamic model is established to predict future parameter trends, allowing proactive adjustments to be taken. For example, it can predict the potential for thermal saturation due to the continuous preparation of multiple beverages, and thus reduce the power or insert a cooling cycle in advance to prevent temperature overshoot. This predictive control method is particularly suitable for parameters with significant hysteresis, such as water temperature. It also achieves collaborative optimization between parameters. When one parameter needs to be adjusted, the impact of this adjustment on other parameters is evaluated and optimized as a whole. For example, when the water temperature needs to be increased, the flow rate and pressure are adjusted simultaneously to maintain optimal extraction conditions. Through this continuous parameter fine-tuning and optimization, a set of dynamically changing optimized beverage preparation parameters is generated. These parameters not only meet basic preparation requirements but also adapt to environmental changes and state fluctuations, ensuring that the final beverage is of the highest quality.
[0096] Step S6: executing the beverage preparation task according to the optimized parameter set and the task scheduling strategy.
[0097] In one embodiment, based on the optimized parameter set obtained in step S5, dedicated PID controllers are designed for key parameters such as temperature, flow rate, and pressure. Each controller has an anti-overshoot feature, enabling rapid response to changes in the target value without significant overshoot or oscillation. These controllers do not operate independently, but rather form a collaborative control network that coordinates with each other to address the mutual influence of parameters.
[0098] Following the execution order determined by the task scheduling strategy generated in step S3, each beverage preparation task is initiated sequentially according to the time window. For each initiated task, a multi-level coordinated PID control network precisely controls the various actuators based on the specific parameter values in the optimized parameter set. For example, the heating element is controlled to ensure that the water temperature reaches and stabilizes at the target temperature; the water pump is controlled to ensure that the water flow precisely matches the target value; and the pressure pump is controlled to maintain the extraction pressure within the optimal range.
[0099] Throughout the entire preparation process, the PID control network continuously receives feedback from sensors and adjusts the control output in real time to minimize the deviation between the actual parameter value and the target value. This precise parameter control ensures the stability and consistency of the beverage preparation process, ultimately producing high-quality beverages.
[0100] Executing a beverage preparation task according to the instruction, the optimized parameter set, and the task scheduling strategy includes: S6.1 Based on the optimized parameter set, design dedicated PID controllers with anti-overshoot characteristics for temperature, flow, and pressure, respectively, and construct a multi-level collaborative PID control network; First, based on the optimized parameter set obtained in step S5, dedicated PID controllers with anti-overshoot characteristics are designed for key parameters such as temperature, flow rate, and pressure, constructing a multi-level collaborative PID control network. Temperature control utilizes an improved PID structure with predictive compensation, specifically optimized for the high hysteresis characteristics of heat. Controller parameters (proportional coefficient Kp, integral time Ti, and derivative time Td) are dynamically adjusted using an adaptive algorithm to achieve an optimal balance between response speed and stability. For example, during rapid temperature rise, the controller uses a larger proportional coefficient and a smaller integral time to accelerate response. When approaching the target temperature, it automatically switches to fine control mode, reducing the proportional coefficient and increasing the derivative action to effectively suppress temperature overshoot. The controller also incorporates a feedforward compensation mechanism that predicts the required heating time based on the water volume and target temperature, adjusting the heating power in advance and significantly reducing temperature fluctuations. Flow control utilizes a fast-response PID structure that compensates for the nonlinear characteristics of the pump. The controller employs a piecewise linearization approach, using different control parameters for different flow ranges to ensure precise control across the entire flow range. The controller also integrates a disturbance rejection algorithm, enabling rapid response to flow changes caused by pressure fluctuations to maintain a stable water output. Pressure control utilizes an adaptive PID algorithm, automatically adjusting control parameters based on the resistance characteristics of different capsule types. An initial pressure test identifies the capsule's resistance profile and selects the most appropriate set of control parameters to ensure stable pressure throughout the brewing process. The controller also implements a pressure gradient control function, smoothly varying pressure according to a preset curve, simulating the pressure curve of professional hand-brewing and enhancing beverage flavor. These specialized PID controllers do not operate in isolation, but rather form a collaborative control network. A data sharing and coordination mechanism is established between the controllers, enabling each controller to perceive the status and changing trends of other parameters and coordinate with each other to address inter-parameter coupling effects. For example, when the temperature controller detects a slowdown in the temperature rise rate, it notifies the flow controller to temporarily reduce the flow rate to prevent insufficient water temperature at the outlet. This multi-stage collaborative PID control architecture significantly improves stability and control accuracy, enabling it to cope with a variety of complex preparation conditions.
[0101] S6.2 Based on the task execution order determined by the task scheduling strategy, start each preparation task in sequence according to the time window; Each beverage preparation task is initiated sequentially according to the execution order determined by the task scheduling strategy generated in step S3, based on time window divisions. The task initiation process employs precise timing control. It first checks whether the current time has fallen within the task's designated time window, and then verifies the availability of the required resources. Resource readiness checks include ensuring the water tank's water level is sufficient, heating has reached the base temperature, and pressure is normal. Once all prerequisites are met, a task initiation signal is issued, activating the relevant actuators. For each initiated task, a dedicated task execution instance is created, containing all task parameter settings, control objectives, and monitoring thresholds. A multi-task parallel processing architecture enables simultaneous management of multiple tasks in different execution stages. For example, while one task is executing the brewing phase, it can simultaneously preheat water and prepare resources for the next task. Task initiation utilizes a smooth transition strategy to avoid sudden resource usage shocks. For example, heating power is not abruptly switched from low to full power. Instead, it gradually increases power through a ramp function, minimizing current surges and temperature fluctuations. An inter-task coordination mechanism is also implemented. When multiple tasks require the same resources, they are arranged to stagger their use or share resources based on priority and resource status. This carefully designed task initiation strategy ensures smooth and reliable operation while maximizing resource utilization. After each preparation task is initiated, S6.3 uses a multi-stage collaborative PID control network to control the heating to the target temperature, the water pump to the target flow, and the pressure pump to the target pressure, based on the temperature, flow, and pressure parameters in the optimization parameter set.
[0102] After each preparation task is initiated, a multi-level coordinated PID control network precisely controls each actuator based on the temperature, flow, and pressure parameters in the optimized parameter set. The temperature control phase precisely controls the power output of the heating element to ensure that the water temperature reaches and stabilizes at the target temperature. During the control process, feedback data is continuously collected from multiple temperature sensors, and the deviation between the current temperature and the target temperature, as well as the temperature change rate, are calculated in real time. The PID controller uses this data to calculate the optimal heating power output, ensuring that the temperature quickly approaches the target value without significant overshoot. Heat conduction delay is also taken into account. A predictive model estimates the time it takes for heat energy to transfer from the heating element to the water outlet, and the heating power is adjusted in advance to compensate for this delay. The flow control phase precisely adjusts the pump speed or valve opening to accurately match the water flow rate to the target value. During the control process, real-time flow data is obtained from the flow sensor, and the PID controller dynamically adjusts the pump output based on flow deviations. A flow curve control function is also implemented, which can smoothly change the flow rate according to a preset curve, for example, using a low flow rate for pre-infusion at the beginning of coffee extraction and then gradually increasing it to a standard flow rate. The pressure control link keeps the extraction pressure within the optimal range by adjusting the pressure pump output and the back-pressure valve opening. During the control process, real-time pressure data is obtained from the pressure sensor, and the PID controller adjusts the pressure output according to the pressure deviation. It can also achieve pressure pulsation control, simulating the pressure fluctuation pattern of professional coffee machines to improve the extraction effect. Throughout the preparation process, these three control links do not operate independently, but work closely together through a collaborative control network. For example, when an abnormal increase in pressure is detected, the flow controller will automatically reduce the flow rate to prevent excessive pressure from damaging the capsule or affecting the taste. At the same time, the temperature controller will adjust the heating strategy accordingly to ensure that a stable water outlet temperature can be maintained despite changes in flow rate. This precise parameter control and collaborative working mechanism ensures the stability and consistency of the beverage preparation process, ultimately producing high-quality beverages that meet the user's personalized needs and professional quality standards.
[0103] Step S7: performing abnormality detection and emergency response processing on the beverage preparation task execution process.
[0104] Perform abnormality detection and emergency response processing on the beverage preparation task execution process, including: S7.1 collects temperature, pressure, and flow rate in real time during beverage preparation to obtain a multi-dimensional parameter monitoring data stream during beverage preparation; Specifically, multi-dimensional sensors such as temperature, pressure, and flow rate collect real-time data on key parameters during the beverage preparation process, forming a continuous multi-dimensional parameter monitoring data stream. This data is collected at a high frequency to ensure that even brief parameter fluctuations or anomalies can be captured.
[0105] An anomaly detection model, trained on historical data, can identify a variety of abnormal patterns, including parameter fluctuations (such as sudden temperature drops and unusual pressure fluctuations) and equipment failures (such as clogged pumps and failed heating elements). The anomaly detection model utilizes a variety of machine learning algorithms, including outlier detection, time series analysis, and pattern recognition, to distinguish between normal parameter fluctuations and abnormalities requiring intervention.
[0106] S7.2 training an anomaly detection model using a machine learning algorithm based on the multi-dimensional parameter monitoring data stream and historical normal production data, wherein the anomaly detection model is used to identify abnormal patterns including parameter fluctuations and / or equipment failures; When an anomaly is detected, a corresponding emergency response mechanism is triggered based on the type and severity of the anomaly. For minor anomalies, control parameters may be automatically adjusted to compensate for the deviation. For moderate anomalies, the current task may be suspended and an automatic recovery attempt may be made. For severe anomalies, an alarm is issued and the relevant components are safely shut down to prevent equipment damage or safety incidents.
[0107] S7.3 Based on the analysis results of the multi-dimensional parameter monitoring data stream by the anomaly detection model, an automatic adjustment processing operation of the optimization parameter set is performed.
[0108] Detailed records of all parameter changes and operation sequences during the preparation process form a complete execution log. These logs not only enable real-time anomaly detection but also provide valuable data support for subsequent fault diagnosis and optimization. By analyzing these logs, potential problem patterns can be identified and similar issues prevented in future operations.
[0109] The present invention also provides a task processing device for an intelligent capsule fresh beverage machine, such as Figure 4As shown, it includes: a fusion processing module, which is used to perform multimodal recognition technology fusion processing on user input instructions and capsule labels to obtain an initial parameter set for beverage preparation containing a basic capsule recipe, wherein the initial parameter set includes temperature, flow rate and pressure during the extraction process; a generation module, which is used to construct a double-layer space structure of public resource domain and private resource domain based on the initial parameter set through a differential private space efficiency algorithm to generate a task model containing priorities; a construction module, which is used to construct a task dependency graph based on the task model and extract spectrum features using the generalized skew spectrum theory of the graph, and generate a task scheduling strategy based on the spectrum features; a prediction and conflict resolution module, which is used to perform resource demand prediction and conflict resolution based on the task scheduling strategy through a dynamic resource allocation algorithm to form a resource allocation plan; a control module, which is used to perform parameter control through an environmental factor compensation mechanism based on the resource allocation plan and the initial parameter set to obtain an optimized parameter set for beverage preparation; an execution module, which is used to execute the beverage preparation task according to the optimized parameter set and the task scheduling strategy; and an anomaly detection module, which is used to perform anomaly detection and emergency response processing on the execution process of the beverage preparation task.
[0110] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
[0111] It should be noted that those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. If these changes and modifications fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these changes and modifications.
[0112] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The scope of protection of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-mentioned embodiments within the technical scope disclosed in the present disclosure, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. A task processing method for an intelligent capsule fresh beverage machine, characterized in that: The following steps are involved: Performing multimodal recognition technology fusion processing on the user input command and the capsule label to obtain an initial parameter set for beverage preparation containing the capsule basic recipe, the initial parameter set including temperature, flow rate and pressure during the extraction process; Based on the initial parameter set, a dual-layer space structure of a public resource domain and a private resource domain is constructed by a differential private space efficiency algorithm to generate a task model including priorities; Based on the task model, a task dependency graph is constructed using the generalized skew spectrum theory of graphs and spectrum features are extracted, and a task scheduling strategy is generated based on the spectrum features; Based on the task scheduling strategy, resource demand prediction and conflict resolution are performed through a dynamic resource allocation algorithm to form a resource allocation plan; Based on the resource allocation plan and the initial parameter set, parameter control is performed through an environmental factor compensation mechanism to obtain an optimized parameter set for beverage preparation; executing a beverage preparation task according to the optimized parameter set and the task scheduling strategy; Abnormal detection and emergency response processing are performed on the beverage preparation task execution process.
2. The task processing method according to claim 1, characterized in that: The user input instruction includes a voice instruction and a touch screen operation. The user input instruction and the capsule label are fused using a multimodal recognition technology to obtain an initial parameter set for beverage preparation containing a basic capsule formula, including: The user's voice commands are processed through voice recognition technology, and the user's touch screen operations are processed through image recognition technology to obtain the user's beverage preparation demand information; Scan the capsule label with RFID or NFC technology to obtain capsule information including capsule type, specifications and shelf life; According to the user's beverage preparation demand information, the capsule information and the user's historical preparation records are subjected to parameter fusion algorithm preference matching processing to obtain personalized user preference information; Parameter weight calculation and fusion processing are performed on the personalized user preference information and the basic capsule formula to obtain the initial parameter set.
3. The task processing method according to claim 1, characterized in that: A dual-layer spatial structure consisting of public and private resource domains is constructed through a differential private spatial efficiency algorithm to generate a task model with priorities, including: Constructing a task description structure for the initial parameter set in combination with a timestamp and a user identifier to obtain a structured task description object; Performing resource mapping function calculation processing on the task description object to obtain a resource demand vector including water, heat energy, pressure, and time; Based on the revolving door model theory and the resource demand vector, a two-layer space structure including a public resource domain and a private resource domain is constructed; The tasks in the two-layer space structure are compared using a differential private space efficiency algorithm to calculate the resource utilization efficiency and conflict impact of each task, and priority weights are assigned to the tasks based on the efficiency scores and conflict impact levels to obtain the task model containing priorities.
4. The task processing method according to claim 1, characterized in that: Based on the task model, the generalized skew spectrum theory of graphs is used to construct a task dependency graph and extract spectrum features. Based on the spectrum features, an optimized task scheduling strategy is generated, including: Performing resource dependency analysis and construction processing on the task model to obtain a directed graph structure that expresses resource competition and dependency relationships between tasks; Performing matrix calculation and generalized skew spectrum calculation on the directed graph structure to obtain spectrum features including eigenvalues and eigenvectors; Based on the eigenvalues and eigenvectors, performing task grouping and sorting optimization by a heuristic algorithm to generate a task execution sequence that maximizes system throughput and minimizes average waiting time; Based on the task execution sequence and a system load prediction model established based on historical task execution time data, scheduling time windows are divided to form the optimized task scheduling strategy.
5. The task processing method according to claim 1, characterized in that: Based on the task scheduling strategy, resource demand prediction and conflict resolution are performed through a dynamic resource allocation algorithm to form a resource allocation plan, including: Real-time monitoring and processing of the water tank level, heating system temperature, and pressure pump status of the smart capsule fresh beverage machine to obtain the current availability status of key resources; Based on the task scheduling strategy and the current availability of key resources, a demand forecast model for each resource in a future time window is established to identify potential resource conflict points; Based on the potential resource conflict points, conflict classification and resolution strategy selection are performed through a resource competition arbitration algorithm to determine resource allocation priorities and generate conflict resolution results; Based on the conflict resolution result, a specific resource usage time period and resource amount are allocated to each task to form the resource allocation plan.
6. The task processing method according to claim 1, characterized in that: Based on the resource allocation plan, parameter control is performed through an environmental factor compensation mechanism to obtain an optimized beverage preparation parameter set, including: Based on the resource allocation plan, combined with the capsule formula library parameters and the user's personalized preferences, the initial parameter set is fine-tuned to set initial target values of control parameters including temperature, flow rate, and pressure; Based on the real-time monitored ambient temperature, humidity, and air pressure data, a compensation coefficient is calculated through an environmental factor impact model, and the initial target value is dynamically adjusted to obtain a final target value of the control parameter; Based on the deviation between the real-time temperature sensor data, flow sensor data and pressure sensor data and the final target value, parameter fine-tuning is performed through a closed-loop feedback mechanism and predictive control strategy to achieve continuous optimization of the control parameters and obtain the optimized parameter set for beverage preparation.
7. The task processing method according to claim 6, characterized in that: Based on the real-time monitored ambient temperature, humidity, and air pressure data, the compensation coefficient is calculated through the environmental factor impact model, and the initial target value is dynamically adjusted to obtain the final target value of the control parameter, including: Quantitatively analyze and process real-time monitoring data of ambient temperature, humidity, and air pressure to obtain a mathematical model of the impact of different environmental conditions on the beverage preparation process; Calculating the temperature compensation coefficient, the pressure compensation coefficient and the time compensation coefficient of the mathematical model to obtain a multi-dimensional compensation coefficient matrix; According to the compensation coefficient matrix, the target value of the control parameter is corrected and calculated in real time to obtain the final target value of the control parameter.
8. The task processing method according to claim 1, characterized in that: Perform abnormality detection and emergency response processing on the beverage preparation task execution process, including: Real-time collection of temperature, pressure and flow during beverage preparation to obtain multi-dimensional parameter monitoring data streams during beverage preparation; Based on the multi-dimensional parameter monitoring data stream and historical normal production data, an anomaly detection model is trained by a machine learning algorithm, wherein the anomaly detection model is used to identify abnormal patterns including parameter fluctuations and / or equipment failures; Based on the analysis results of the anomaly detection model on the multi-dimensional parameter monitoring data stream, an automatic adjustment processing operation of the optimization parameter set is performed.
9. The task processing method according to claim 1, characterized in that: Executing a beverage preparation task according to the instruction, the optimized parameter set, and the task scheduling strategy includes: Based on the optimized parameter set, dedicated PID controllers with anti-overshoot characteristics are designed for temperature, flow, and pressure, respectively, to construct a multi-level collaborative PID control network; Based on the task execution order determined by the task scheduling strategy, each preparation task is started in sequence according to the time window; After each preparation task is started, according to the temperature, flow and pressure parameters in the optimization parameter set, the heating system is controlled to reach the target temperature, the water pump is controlled to reach the target flow, and the pressure pump is controlled to reach the target pressure through a multi-level collaborative PID control network.
10. A task processing device for an intelligent capsule fresh beverage machine, characterized in that: include: a fusion processing module for performing multimodal recognition technology fusion processing on the user input instruction and the capsule label to obtain an initial parameter set for beverage preparation containing the basic capsule recipe, wherein the initial parameter set includes temperature, flow rate, and pressure during the extraction process; A generation module is used to construct a double-layer space structure of a public resource domain and a private resource domain based on the initial parameter set by using a differential private space efficiency algorithm to generate a task model including priorities; A construction module is used to construct a task dependency graph based on the task model and extract spectrum features using the generalized skew spectrum theory of graphs, and generate a task scheduling strategy based on the spectrum features; A prediction and conflict resolution module, configured to perform resource demand prediction and conflict resolution based on the task scheduling strategy and a dynamic resource allocation algorithm to form a resource allocation plan; a control module, configured to perform parameter control based on the resource allocation plan and the initial parameter set through an environmental factor compensation mechanism to obtain an optimized parameter set for beverage preparation; an execution module, configured to execute the beverage preparation task according to the optimized parameter set and the task scheduling strategy; The anomaly detection module is used to perform anomaly detection and emergency response processing on the execution process of the beverage preparation task.
Citation Information
Patent Citations
Smart water dispenser control system based on cloud task scheduling
CN106131117A
Beverage selling device and information processing device
CN108877052A
Intelligent tea extraction machine application method and system, terminal and storage medium
CN117297337A
Coffee and water dispenser integrated water resource regional allocation method and system
CN118303759A
Systems, methods, and apparatuses for implementing a scalable scheduler with heterogeneous resource allocation of large competing workloads types using QOS
US20180321971A1
Cited By
Thermoelectric power generation material demand quantity prediction system and method based on artificial intelligence
CN121328851A
Method and device for preset raw material extraction optimization, electronic equipment, storage medium and computer program product
CN122528464A