Task processing method and device for intelligent capsule fresh extract beverage machine
By constructing a task model using multimodal recognition technology and the generalized skew spectrum theory of graphs, the resource scheduling and parameter control problems of intelligent capsule beverage machines in multi-task processing are solved, realizing efficient and personalized beverage preparation and improving resource utilization and beverage quality consistency.
Patent Information
- Application Number
- CN202511126136.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Existing smart capsule beverage machines suffer from unintelligent resource scheduling during multitasking, failing to dynamically optimize based on task priority, resource status, and system load, resulting in low resource utilization and excessively long waiting times. Furthermore, their parameter control precision is limited, making it impossible to adjust in real time according to individual capsule characteristics, environmental factors, and user preferences, thus affecting the consistency and personalization of beverage quality.
The initial parameter set is obtained through multimodal recognition technology fusion processing, a two-layer spatial structure task model is constructed, a task scheduling strategy is generated using the generalized skew spectrum theory of graphs, resource demand prediction and conflict resolution are performed, and an environmental factor compensation mechanism is adopted for parameter control, combined with anomaly detection and emergency response processing.
It improves the accuracy and personalization of parameter settings, solves the problems of resource competition and priority allocation in multi-user, multi-task scenarios, achieves efficient task scheduling, and enhances the consistency of beverage preparation quality and system stability.
Smart Images

Figure CN120634193B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent beverage preparation equipment technology, specifically to a task processing method and apparatus for an intelligent capsule fresh-extract beverage machine. Background Technology
[0002] Intelligent capsule fresh-extraction beverage machines represent an important development direction for modern household and commercial beverage preparation equipment. By encapsulating raw materials in capsules and using precisely controlled extraction processes, they enable the rapid and convenient preparation of high-quality beverages.
[0003] Most capsule beverage machines on the market today typically employ a simple single-task processing mode. After inserting a capsule, the user selects preparation parameters via buttons, and the machine executes a fixed process according to a preset program. For example, a certain brand of coffee capsule machine uses preset extraction parameters, controls pressure via a water pump, and controls temperature via a heating system to complete a single coffee preparation task.
[0004] More advanced smart capsule beverage machines introduce basic task queue management, capable of identifying capsule types and recalling corresponding formula 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, cannot dynamically adjust according to real-time conditions, and are inefficient when handling multi-user, multi-task demands.
[0005] The existing technology has two main problems: First, the task scheduling lacks intelligence and cannot be dynamically optimized according to task priority, resource status and system load, resulting in low resource utilization and excessively long waiting time; second, the parameter control precision is limited and 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 this invention is to provide a task processing method and apparatus for an intelligent capsule fresh-extract beverage machine, aiming to solve the technical problems of unintelligent resource scheduling and limited parameter control accuracy in existing capsule beverage machines during multi-task processing.
[0007] To achieve the above objectives, this invention provides a task processing method for an intelligent capsule fresh-extract beverage machine, comprising the following steps: fusing user input commands and capsule labels using multimodal recognition technology to obtain an initial parameter set for beverage preparation containing the capsule's basic formula, wherein the initial parameter set includes temperature, flow rate, and pressure during the extraction process; based on the initial parameter set, constructing a two-layer spatial structure of public and private resource domains using a differential private space efficiency algorithm to generate a task model containing priorities; based on the task model, constructing a task dependency graph using generalized skew spectrum theory of graphs and extracting spectral features, and generating a task scheduling strategy based on the spectral features; based on the task scheduling strategy, performing resource demand prediction and conflict resolution using a dynamic resource allocation algorithm to form a resource allocation plan; based on the resource allocation plan and the initial parameter set, controlling parameters 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 during the execution of the beverage preparation task.
[0008] Furthermore, the user input instructions include voice commands and touch screen operations. The process of fusing the user input instructions and capsule labels using multimodal recognition technology to obtain an initial parameter set for beverage preparation containing the capsule's basic formula includes: processing the user's voice commands using voice recognition technology and processing the user's touch screen operations using image recognition technology to obtain the user's beverage preparation requirements; scanning the capsule labels using RFID or NFC technology to obtain capsule information containing capsule type, specifications, 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 requirements to obtain personalized user preference information; and performing parameter weight calculation and fusion processing on the personalized user preference information and the capsule's basic formula to obtain the initial parameter set.
[0009] Furthermore, a two-layer spatial structure of public and private resource domains is constructed using a differential private space efficiency algorithm to generate a priority-based task model. This includes: constructing a task description structure by combining the initial parameter set with timestamps and user identifiers to obtain a structured task description object; performing resource mapping function calculations on the task description object to obtain a resource demand vector containing water, heat energy, pressure, and time; constructing a two-layer spatial structure containing public and private resource domains based on the revolving door model theory and the resource demand vector; comparing the tasks in the two-layer spatial structure using the differential private space efficiency algorithm to calculate the resource utilization efficiency and conflict impact degree of each task; assigning priority weights to tasks based on the efficiency score and conflict impact degree to obtain the priority-based task model.
[0010] Furthermore, based on the task model, a task dependency graph is constructed using the generalized skew spectrum theory of graphs, and spectral features are extracted. Based on the spectral features, an optimized task scheduling strategy is generated, including: performing resource dependency analysis on the task model to obtain a directed graph structure expressing resource competition and dependency relationships between tasks; performing matrix calculations and generalized skew spectrum calculations on the directed graph structure to obtain spectral features containing eigenvalues and eigenvectors; optimizing task grouping and sorting using heuristic algorithms based on the eigenvalues and eigenvectors to generate a task execution order that maximizes system throughput and minimizes average waiting time; and dividing the scheduling time window based on the task execution order and a system load prediction model established based on historical task execution time data to form the optimized task scheduling strategy.
[0011] Furthermore, based on the task scheduling strategy, a resource allocation plan is formed by predicting resource demand and resolving conflicts through a dynamic resource allocation algorithm. This includes: real-time monitoring and processing of the water tank level, heating system temperature, and pressure pump status of the intelligent capsule fresh-extract beverage machine to obtain the current availability status of key resources; establishing a demand prediction model for each resource within a future time window based on the task scheduling strategy and the current availability status of key resources, and identifying potential resource conflict points; classifying conflicts and selecting resolution strategies based on the potential resource conflict points through a resource competition arbitration algorithm, determining the priority order of resource allocation, and generating conflict resolution results; and allocating specific resource usage time periods and resource quantities to each task based on the conflict resolution results, thus forming 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. This includes: fine-tuning the initial parameter set based on the resource allocation plan, combined with capsule formula library parameters and user personalized preferences, and setting initial target values for control parameters including temperature, flow rate, and pressure; dynamically adjusting the initial target values based on real-time monitored ambient temperature, humidity, and air pressure data, using an environmental factor influence model to calculate compensation coefficients, and obtaining the final target values for the control parameters; and fine-tuning the parameters based on the deviations between real-time temperature sensor data, flow rate sensor data, and pressure sensor data and the final target values, through a closed-loop feedback mechanism and predictive control strategy, to achieve continuous optimization of the control parameters and obtain an optimized parameter set for beverage preparation.
[0013] Furthermore, based on real-time monitored ambient temperature, humidity, and air pressure data, compensation coefficients are calculated using an environmental factor influence model to dynamically adjust the initial target value, thereby obtaining the final target value of the control parameter. This includes: quantitatively analyzing and processing real-time monitoring data of ambient temperature, humidity, and air pressure to obtain a mathematical model of the influence of different environmental conditions on the beverage preparation process; calculating temperature compensation coefficients, pressure compensation coefficients, and time compensation coefficients on the mathematical model to obtain a multi-dimensional compensation coefficient matrix; and, based on the compensation coefficient matrix, real-time correcting and calculating the target value of the control parameter to obtain the final target value of the control parameter.
[0014] Furthermore, anomaly detection and emergency response processing are performed on the beverage preparation task execution process, including: real-time acquisition of temperature, pressure, and flow rate during the beverage preparation process to obtain a multi-dimensional parameter monitoring data stream; based on the multi-dimensional parameter monitoring data stream and historical normal preparation data, an anomaly detection model is trained using a machine learning algorithm, the anomaly detection model being used to identify anomaly patterns including parameter fluctuations and / or equipment failures; based on the analysis results of the multi-dimensional parameter monitoring data stream by the anomaly detection model, an automatic adjustment processing operation for the optimized parameter set is performed.
[0015] Further, according to the instructions, the optimized parameter set, and the task scheduling strategy, the beverage preparation task is executed, including: based on the optimized parameter set, designing dedicated PID controllers with anti-overshoot characteristics for temperature, flow rate, 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 sequentially according to the time window; after each preparation task is started, according to the temperature, flow rate, and pressure parameters in the optimized parameter set, controlling the heating system to reach the target temperature, controlling the water pump to reach the target flow rate, and controlling the pressure pump to reach the target pressure through the multi-level collaborative PID control network respectively.
[0016] This invention also provides a task processing device for an intelligent capsule fresh-extract beverage machine, comprising: a fusion processing module for performing multimodal recognition technology fusion processing on user input commands and capsule labels to obtain an initial parameter set for beverage preparation containing the capsule's basic formula, wherein the initial parameter set includes temperature, flow rate, and pressure during the extraction process; a generation module for constructing a two-layer spatial structure of public and private resource domains 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 and extracting spectral features based on the task model using generalized skew spectrum theory of graphs, and generating a task scheduling strategy based on the spectral features; a prediction and conflict resolution module for predicting resource requirements and resolving conflicts based on the task scheduling strategy using a dynamic resource allocation algorithm to form a resource allocation plan; a control module for controlling parameters 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 anomaly detection and emergency response processing during the execution of the beverage preparation task.
[0017] The beneficial effects of this invention are:
[0018] By fusing user input commands and capsule labels using multimodal recognition technology, an initial parameter set containing the capsule's basic formula is obtained, improving the accuracy and personalization of parameter settings.
[0019] By constructing a two-layer spatial structure of public and private resource domains through a differential private space efficiency algorithm, the problem of resource competition and priority allocation in multi-user, multi-task scenarios is solved, thereby improving the system's resource utilization efficiency.
[0020] By constructing a task dependency graph and extracting spectral features using the generalized skewed spectrum theory of graphs, we can capture the complex dependencies and resource competition patterns between tasks, realize efficient task scheduling strategies, and reduce average waiting time.
[0021] By using dynamic resource allocation algorithms to predict resource demand and resolve conflicts, the rationality of resource allocation and the system response speed are improved.
[0022] By adopting an environmental factor compensation mechanism, precise control and dynamic adjustment of parameters such as temperature, flow rate, and pressure are achieved, thereby improving the consistency of beverage preparation quality.
[0023] Through anomaly detection and emergency response mechanisms, abnormal parameters and equipment malfunctions during the preparation process can be identified in real time, improving the stability and safety of the system. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart of a task processing method for an intelligent capsule fresh-extract beverage machine provided in an embodiment of the present invention;
[0026] Figure 2 This is a flowchart of the multimodal recognition technology fusion processing in an embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram illustrating the construction of a two-layer space structure using the differential private space efficiency algorithm in an embodiment of the present invention.
[0028] Figure 4 This is a diagram illustrating the architecture of a task processing device for an intelligent capsule fresh-extract beverage machine, as provided in an embodiment of the present invention. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0030] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0031] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0033] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0034] like Figure 1 As shown, the present invention provides a task processing method for an intelligent capsule fresh-extract beverage machine, comprising the following steps:
[0035] Step S1: Perform multimodal recognition technology fusion processing on the user input command and capsule label to obtain an initial parameter set for beverage preparation containing the capsule's basic formula. The initial parameter set includes temperature, flow rate, and pressure during the extraction process.
[0036] Specifically, the system first processes the user's voice commands, such as "make a cup of espresso," through a voice recognition module, and simultaneously processes the user's touchscreen operations, such as selecting parameters like coffee concentration and temperature, through an image recognition module on the touchscreen. This information is then integrated to form the user's beverage preparation requirements.
[0037] Meanwhile, by scanning the electronic tag on the capsule with an RFID or NFC reader, or by recognizing the QR code or barcode on the capsule with a camera, detailed information about the capsule can be obtained, including capsule type (such as coffee, tea, juice, etc.), specifications (such as single or double servings), production date, shelf life, etc.
[0038] The system matches users' beverage preparation needs with capsule information and combines this with their historical preparation records to generate personalized user preference information through a parameter fusion algorithm. For example, if a user historically prefers coffee at a higher temperature, the target temperature will be appropriately increased from the standard temperature.
[0039] Finally, personalized user preference information is weighted and integrated with the capsule's basic formula to generate an initial parameter set containing parameters such as temperature, flow rate, and pressure, which serves as the basis for subsequent beverage preparation.
[0040] In this embodiment, the user input instructions include voice commands and touch screen operations, such as... Figure 2 As shown, multimodal recognition technology is used to fuse user input commands and capsule labels to obtain an initial parameter set for beverage preparation containing the capsule's basic formula, including:
[0041] S1.1 processes user voice commands through voice recognition technology and user touchscreen operations through image recognition technology to obtain user beverage preparation requirements information;
[0042] First, the user's voice commands are processed using speech recognition technology. This speech recognition module employs a deep neural network architecture, comprising two core components: an acoustic model and a language model. The acoustic model converts audio signals into phoneme sequences, while the language model converts these phoneme sequences into text commands. It has been specifically optimized for professional terminology and commands in the beverage preparation field, accurately recognizing professional commands such as "make a cup of espresso" and "adjust the temperature to 85 degrees." Simultaneously, it supports multiple languages and dialects, improving the universality of the user experience. During the speech recognition process, emotional and intonation features are also extracted as auxiliary criteria for judging user preferences.
[0043] Meanwhile, image recognition technology is used to process user actions on the touchscreen. The image recognition module on the touchscreen employs a convolutional neural network structure, capable of capturing the user's touch trajectory, click location, and gesture operations in real time. These visual inputs are mapped to interface elements to accurately understand the user's selection intent. For example, when a user slides on the 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 reference indicators of the strength of the user's preference. For complex multi-step operations, sequence models are used for parsing to ensure a correct understanding of the user's complete operational intent.
[0044] S1.2 Scan the capsule label using RFID or NFC technology to obtain capsule information containing capsule type, specifications, and shelf life information;
[0045] A dual identification mechanism is employed to acquire capsule information. Primarily, RFID or NFC technology is used to read the electronic tags on the capsules, obtaining the detailed information encoded within them. The RFID reader operates in the 13.56MHz band, offering a high success rate and strong anti-interference capabilities. As a backup mechanism, a high-resolution camera is also included, capable of recognizing QR codes, barcodes, or text markings on the capsules using computer vision algorithms. This redundancy design ensures that necessary capsule information can still be obtained even if the electronic tag is damaged or reading fails. These technologies accurately acquire key information such as capsule type (e.g., coffee, tea, juice), specifications (e.g., single or double serving), ingredients, production date, and shelf life, providing foundational data for subsequent parameter settings.
[0046] S1.3 Based on the user's beverage preparation needs information, the capsule information and the user's historical preparation records are processed by a parameter fusion algorithm preference matching to obtain personalized user preference information;
[0047] After acquiring user needs and capsule information, the process enters the parameter fusion algorithm preference matching stage. This stage employs a hybrid recommendation algorithm combining collaborative filtering and content filtering to match the current user's preparation needs with their historical records. A multi-dimensional 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 parameter preference patterns. If the user's historical data is insufficient, data from other user groups with similar preference patterns is referenced, and possible preference parameters are inferred through collaborative filtering. This big data-driven preference matching process enables personalized parameter suggestions to be provided to each user, even those using a specific type of capsule for the first time, ensuring they receive relatively ideal preparation parameters.
[0048] S1.4 Perform parameter weight calculation and fusion processing on the personalized user preference information and the capsule basic formula to obtain the initial parameter set.
[0049] The parameter weighting calculation and fusion process employs a multi-level weighted fusion algorithm to achieve optimal integration of personalized user preferences and professional capsule formulations. This process consists of three core steps: parameter importance assessment, user preference intensity calculation, and adaptive weight fusion. In the parameter importance assessment stage, a basic importance coefficient Wi is assigned to each preparation parameter, reflecting the degree of influence of that parameter on beverage quality. For example, for coffee extraction, Wi = 0.4 for pressure, 0.3 for temperature, 0.2 for flow rate, and 0.1 for time. In the user preference intensity calculation stage, a preference intensity index Pi is constructed based on the user's historical behavior. The specific algorithm is: Pi = (average deviation between user's historical settings and the baseline value / adjustable range of the parameter) × (number of times the user repeatedly selected this preference / total number of preparations) × (1 + recentity factor). The recentity factor reflects the weight enhancement effect of the user's most recent selection, and its calculation formula is: Recentness factor = 0.5 × e^(-t / 30), where t is the number of days since the most recent selection. In 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. Here, αi is the adaptive weight coefficient, calculated using the formula αi = Pi × (1-Wi) × (1+Si), and Si is the context-related coefficient, considering 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 increases by 0.2, while when user fatigue is detected, the Si value of the temperature parameter increases by 0.15. Through this multi-factor weight calculation and fusion processing, the basic quality of the beverage can be guaranteed while maximizing the satisfaction of users' personalized preferences.
[0050] The capsule's base formula is a standard parameter set designed by professional beverage designers, ensuring the basic quality of the beverage. A weighted fusion algorithm intelligently integrates user preferences with the base formula. During the fusion process, the adjustability and sensitivity of each parameter are evaluated, assigning different weight coefficients to different parameters. For example, key parameters that may significantly affect the basic quality of the beverage (such as extraction pressure in coffee) are given a higher weight by the base formula; while secondary parameters that mainly affect personal taste (such as temperature fine-tuning) are given a higher weight by user preferences. Through this balancing mechanism, the generated initial parameter set ensures both the basic quality of the beverage and meets the user's personalized needs, providing a scientifically sound parameter basis for subsequent task processing.
[0051] Step S2: Based on the initial parameter set, construct a two-layer space structure of public resource domain and private resource domain through the differential private space efficiency algorithm to generate a task model containing priorities.
[0052] Specifically, the system first receives the initial parameter set from step S1, assigns a unique task identifier to each newly received task, and appends a timestamp to record the precise time of task creation and user identification information. This information is then integrated into a structured task description object, storing all relevant information in a key-value pair format, including task ID, creation time, user ID, beverage type, temperature requirement, water requirement, extraction pressure requirement, and expected preparation time.
[0053] Based on the task description object, the specific resource requirements for each task are calculated using a resource mapping function. For example, temperature requirements are analyzed to calculate the required heating energy and time; water consumption is determined based on water volume requirements; and the workload and duration of the pressure pump are estimated based on extraction pressure requirements. Ultimately, a resource requirement vector is generated, accurately quantifying the requirements of various resources such as water, thermal energy, pressure, and time during the preparation process.
[0054] Based on the revolving door model theory, a two-layer spatial structure is constructed, comprising 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 heater, employing 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 user-specific settings and preferences are not interfered with by the operations of other users.
[0055] Based on the constructed two-layer spatial 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, reflecting the value generated per unit of resource consumption. During calculation, the algorithm considers the task's time urgency, resource utilization, user priority, and dependencies between tasks. Through these multi-dimensional comparisons, a dynamic priority index is assigned to each task, forming a complete task model.
[0056] like Figure 3 As shown, a two-layer spatial structure of public and private resource domains is constructed using the differential private space efficiency algorithm, generating a task model that includes priorities, including:
[0057] S2.1 Combine the initial parameter set with the timestamp and user identifier to construct a task description structure, thereby obtaining a structured task description object;
[0058] Each newly received beverage preparation request is assigned a globally unique task identifier (UUID) to ensure uniqueness in a distributed environment. A timestamp accurate to the millisecond is recorded, marking not only the task creation time but also used for subsequent task priority calculations and timeout handling. User identification information is linked to the user account system, supporting personalized services and permission management in a multi-user environment. This basic information, along with the initial parameter set obtained in step S1, is organized into a structured task description object. This object is stored in JSON format, containing nested key-value pairs that clearly express various dimensions of the task information, including task ID, creation time, user ID, beverage type, temperature requirements, water requirements, extraction pressure requirements, and expected preparation time. This structured task description provides a standardized data foundation for subsequent resource requirement mapping and priority allocation.
[0059] S2.2 Perform resource mapping function calculation on the task description object to obtain a resource demand vector containing water, heat energy, pressure, and time;
[0060] Based on a structured task description object, the specific requirements for various resources are calculated using resource mapping functions. These resource mapping functions are a set of complex mathematical models that transform abstract preparation parameters into concrete resource consumption indicators. For example, for temperature parameters, considering initial water temperature, target water temperature, water volume, and ambient temperature, the required heating energy and time are calculated; for water volume parameters, considering capsule type, soaking characteristics, and user preferences, the actual required water resource volume is calculated; for pressure parameters, analyzing capsule resistance characteristics and extraction requirements, the workload and duration of the pressure pump are calculated. These calculations are not simple linear relationships but take into account the interactions and nonlinear characteristics between resources. For example, an increase in water temperature affects the physical properties of water, which in turn affects the control parameters of flow rate and pressure. Through thermodynamic and fluid dynamic models, these complex relationships are accurately calculated, ultimately generating a multidimensional resource demand vector that precisely quantifies the requirements of various resources such as water, thermal energy, pressure, and time during the preparation process.
[0061] S2.3 Based on the revolving door model theory and the resource demand vector, a two-layer spatial structure containing a public resource domain and a private resource domain is constructed;
[0062] After obtaining the resource demand vector, a two-tiered spatial structure comprising a public resource domain and a private resource domain is constructed based on the revolving door model theory. The revolving door model originates from resource management theory in computer science, and this invention innovatively applies it to resource management in beverage preparation. The public resource domain manages physical resources that need to be shared among multiple tasks, such as the main water tank, main heater, and central pressure pump. These resources employ a resource pooling management strategy, using 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 consistent and predictable user experience, preventing interference from other users' operations. A revolving door mechanism is established between these two domains, allowing resources to flow from one domain to another when specific conditions are met. For example, when a private setting proves beneficial to most users, it can be moved to the public domain to become the default setting; conversely, when a public resource is frequently customized by a specific user, it will be copied to that user's private domain to improve access efficiency. This two-tiered spatial structure significantly improves resource management efficiency and user experience consistency in a multi-user environment.
[0063] S2.4 The differential private space efficiency algorithm is used to compare the tasks in the two-layer space structure to calculate the resource utilization efficiency and conflict impact of each task. Based on the efficiency score and conflict impact, priority weights are assigned to the tasks to obtain the task model containing priorities.
[0064] The Differential Private Space Efficiency Algorithm (DPSEA) is a task priority allocation algorithm specifically designed for resource-contested environments. Based on differential privacy theory and resource efficiency assessment, this algorithm solves 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 needs of individual tasks by establishing resource efficiency indices and conflict impact metrics. The algorithm comprises four key steps: differential resource mapping, efficiency function construction, conflict impact assessment, and priority comprehensive calculation. In the differential resource mapping step, calibration noise is added to the resource requirement vector R of each task to form a differential private version R', ensuring that the specific resource requirements of the task are not fully exposed while preserving the overall distribution characteristics of resource requirements. The efficiency function construction step defines the task efficiency index 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 differential private resource requirement; ti is the resource occupancy 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 competition that may occur when tasks Ti and Tj are executed 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 are the resource requirements of tasks Ti and Tj for resource k, 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 indicators, conflict impact, and task time sensitivity to calculate the final priority P(T) of the task: P(T)=w1×E(T)+w2×(1-∑C(T,Tj) / n)+w3×S(T), where w1,w2,w3 are weighting coefficients, and S(T) is the task's time sensitivity indicator. Through this algorithm that comprehensively considers resource efficiency, conflict impact, and time constraints, the system can assign reasonable priorities to each task, maximizing overall resource utilization efficiency.
[0065] A differential private space efficiency algorithm is used to compare and process tasks in a two-layer spatial structure. This algorithm evaluates the resource utilization efficiency and conflict impact of each task from multiple dimensions. For efficiency evaluation, the algorithm considers the task's resource intensity (resource consumption per unit time), resource utilization rate (the ratio of actual output to resource input), and resource recovery potential (the proportion of resources that can be recycled and reused after task completion). For conflict impact evaluation, the algorithm analyzes the resource competition patterns, time overlap, and resource mutual exclusion among tasks. Based on these evaluation indicators, a comprehensive efficiency score and conflict impact level are calculated for each task. Then, dynamic priority weights are 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 or regular users), and load status. This priority is not static but dynamically adjusted according to changes in state and other tasks, ensuring optimal overall efficiency is maintained at all times. Finally, based on the original task description, resource requirement mapping, and allocated priorities, a complete task model is formed. This model serves as the input for the next step of generalized skewed spectrum task scheduling, laying the foundation for efficient resource scheduling.
[0066] The task model is a structured representation of a beverage preparation task, containing all the key information and control parameters required for task execution. This model employs a multi-layered structured 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 globally unique identifier (UUID), a creation timestamp, a user ID, and a task type label for unique task identification and basic classification. The parameter configuration layer stores control parameters directly related to beverage preparation, including target temperature (degrees Celsius), flow rate (mL / s), pressure (bars), total water volume (mL), and specific process parameters (such as pre-soaking time and extraction curve type). The resource requirement layer quantifies the specific resource requirements during task execution, using 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 the task, including the expected start time, latest completion time, estimated execution duration, interruptibility flag, and task stage division information. The priority control layer stores priority indices calculated by the differential private space efficiency algorithm, including basic priority values, dynamic adjustment factors, resource efficiency scores, and conflict impact measures. The task model is constructed through information aggregation and feature extraction: first, basic parameters are extracted from user requests and capsule information to form a task identification layer and a parameter configuration layer; then, specific resource requirements are calculated using a resource mapping function to construct a resource requirement layer; a time constraint layer is set based on system load status and user expectations; finally, priority indices are calculated using the differential private space efficiency algorithm to complete the construction of the priority control layer. The complete task model is stored in JSON format for efficient access and processing by various system modules. This structured task model enables a comprehensive understanding and precise control of the execution process of each beverage preparation task.
[0067] Step S3: Based on the task model, construct a task dependency graph using the generalized skew spectrum theory of graphs and extract spectral features, and generate a task scheduling strategy based on the spectral features.
[0068] Specifically, the process receives priority-based task models from step S2 and constructs a directed graph structure expressing resource competition and dependencies between tasks based on these models. This graph uses tasks as nodes and resource dependencies as edges, forming a complex network structure. Resource competition and logical dependencies between all tasks to be processed are identified; these competitions and dependencies are transformed into directed edges, with edge weights reflecting the strength of the dependency or competition.
[0069] The dependency graph is transformed into an adjacency matrix, where the matrix elements represent the connections and weights between nodes. Then, the generalized skew spectrum of this adjacency matrix is calculated, yielding a series of eigenvalues and corresponding eigenvectors. These eigenvalues reflect the centrality and importance of nodes in the graph, while the eigenvectors contain task clustering and grouping information.
[0070] Based on the extracted generalized skew spectral features, an optimal task execution order is generated using a heuristic algorithm. The algorithm first groups tasks based on feature vectors, identifying the set of tasks that can be executed in parallel and the sequence of tasks that must be executed sequentially. Then, considering task priority, resource availability, and dependency constraints, the algorithm searches for the optimal task execution order through an iterative optimization method to maximize throughput and minimize average latency.
[0071] Based on the current load status and predictions of future tasks, the generated scheduling policy is refined in terms of the time dimension. The current processing capacity and the number of tasks in the queue are assessed to determine a reasonable scheduling period, which is then divided into multiple time windows, each allocated a specific set of tasks. A certain proportion of resources and time windows are also reserved for handling unforeseen new tasks, especially high-priority urgent tasks. Finally, a complete scheduling policy with a time dimension is output.
[0072] Specifically, based on the task model, a task dependency graph is constructed using the generalized skew spectral theory of graphs, and spectral features are extracted. An optimized task scheduling strategy is then generated based on these spectral features, including:
[0073] S3.1 Perform resource dependency analysis and construction on the task model to obtain a directed graph structure that expresses the resource competition and dependency relationships between tasks;
[0074] First, resource dependency analysis is performed on the task model to generate a directed graph structure expressing resource competition and dependencies between tasks. This directed graph uses tasks as nodes and resource dependencies as edges, forming a complex network structure. Resource competition relationships between tasks are identified through deep analysis of each task's resource requirement vector. For example, when two tasks need to use the same heating at similar times, a directed edge representing "thermal energy resource competition" is established between these two task nodes. The edge direction points from the lower-priority task to the higher-priority task, and the edge weight reflects the competition intensity, calculated as the product of the overlap of the two tasks' resource requirements and the scarcity of the resource. Besides resource competition, logical dependencies between tasks are also identified, such as certain tasks that must begin after other tasks are completed (e.g., the self-cleaning task must be executed after all beverage preparation tasks are completed). These logical dependencies are represented as mandatory directed edges with maximum weights to ensure the scheduling algorithm strictly adheres to these constraints. In this way, a complex dependency graph comprehensively captures task interaction patterns, incorporating not only resource competition information but also multi-dimensional data such as task priority, execution constraints, and state.
[0075] S3.2 Perform matrix calculation and generalized skew spectrum calculation on the directed graph structure to obtain spectral features containing eigenvalues and eigenvectors;
[0076] After constructing the dependency graph, matrix computation and generalized skew spectrum computation are performed on the directed graph structure. First, the dependency graph is converted into an adjacency matrix, where matrix element a... ij This represents the weight of the edge from node i to node j, or 0 if no edge exists. Since dependencies are typically asymmetric (task A depending on task B does not mean task B depends on task A), this adjacency matrix is asymmetric. Traditional spectral graph theory primarily deals with symmetric matrices and is not suitable for this situation; therefore, generalized skew spectrum theory is used for analysis. The eigenvalues and eigenvectors of this asymmetric adjacency matrix are calculated to form its generalized skew spectrum. Unlike traditional spectral theory, generalized skew spectrum is particularly suitable for handling asymmetric relationships in directed graphs, more accurately reflecting unidirectional dependencies and resource competition patterns between tasks. A series of eigenvalues λ are obtained through numerical computation methods (such as power iteration or QR decomposition). i and the corresponding feature vector 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 themselves contain task clustering and grouping information. Elements with similar values in the eigenvectors indicate that there are close relationships between the corresponding tasks, which may be suitable for scheduling together.
[0077] S3.3 Based on the aforementioned feature values and feature vectors, a heuristic algorithm is used to optimize task grouping and sorting, generating a task execution order that maximizes throughput and minimizes average waiting time;
[0078] Based on extracted feature values and eigenvectors, a heuristic algorithm is used to optimize task grouping and sorting. This heuristic algorithm is guided by two key objectives: maximizing throughput (the number of tasks completed per unit time) and minimizing average latency (the average time from task creation to execution). The algorithm first utilizes the clustering properties of feature vectors to divide tasks into multiple groups. Tasks within the same group share similar resource requirements or time constraints, making them suitable for scheduling together. Then, the algorithm prioritizes tasks within each group, considering their original priority, latency, and resource requirements. For task groups that may execute in parallel, the algorithm evaluates the resource efficiency and potential conflicts of parallel execution to determine whether parallelism is allowed. For task sequences that must be executed sequentially, the algorithm searches for the optimal execution order to minimize the overall completion time. In this process, the algorithm employs simulated annealing, using iterative optimization to search for the optimal task execution order and avoid getting trapped in local optima. The algorithm also considers dynamic characteristics such as resource state changes and the possibility of new task arrivals, reserving appropriate flexibility for the scheduling strategy. The final generated task execution order not only theoretically optimizes performance metrics but also possesses practical operability, providing a foundation for the next step of time window partitioning.
[0079] S3.4 Based on the task execution order and the system load prediction model established based on historical task execution time data, the scheduling time window is divided to form the optimized task scheduling strategy.
[0080] The system load prediction model is built upon historical task execution time data, providing forward-looking guidance for task scheduling. This model employs a multi-level time series analysis architecture, comprehensively utilizing statistical learning and deep learning techniques to achieve accurate predictions of 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, after preprocessing, is organized into a structured time series dataset. Preprocessing steps include outlier detection and handling, missing data imputation, 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. The trend component reflects the long-term trend of system load changes, such as the gradually increasing base load as the number of users increases; the seasonal component captures the periodic variation patterns of load, such as peak periods in the morning and afternoon of weekdays, or the difference in usage between weekends and weekdays; and the random component represents unpredictable load fluctuations. The system establishes prediction models for these three components: the trend component uses a regression model, the seasonal component uses Fourier analysis, and the random component is predicted using an ARIMA (autoregressive integral moving average) model.
[0081] Beyond basic time series analysis, this invention also introduces a context-aware mechanism, integrating external information such as environmental factors, user behavior patterns, and special events into the prediction model. For example, the model can identify patterns of increased demand for hot drinks in cold weather or sudden surges in preparation tasks after specific social activities. This context-aware capability significantly improves prediction accuracy, especially for predicting unconventional load changes. To address the different needs of short-term and long-term predictions, a multi-scale prediction framework is implemented. Short-term predictions (future minutes to one hour) primarily rely on recent load data and the current system state, employing a deep learning model based on recurrent neural networks (RNNs) to capture complex short-term dynamic characteristics. Medium-term predictions (future hours) combine time series models and pattern recognition techniques, balancing historical patterns and current trends. Long-term predictions (future day or longer) rely more heavily on periodic patterns and trend analysis in historical data.
[0082] Taking a specific scenario as an example, a smart capsule beverage machine deployed in an office environment can learn from its system load prediction model that the first peak usage period is from 9:00 AM to 10:00 AM (morning coffee time), the second peak period is from 12:00 PM to 2:00 PM (after-lunch drinks), and the third peak period is from 3:00 PM to 4:00 PM (afternoon tea time). The model not only identifies these time patterns but also discovers differences in beverage preferences during different peak periods: espresso is dominant during the morning peak, while tea drinks increase during the afternoon peak. Based on these learned patterns, the system automatically begins preheating and resource preparation at 8:30 AM each morning to prepare for the upcoming morning peak; it adjusts default recipe parameters at different times, such as setting a higher concentration for morning coffee by default; and it even performs water tank replenishment and system self-checks in advance before the predicted peak period, maximizing system availability during high-load periods. When external factors change, such as company event days or abnormal weather, the system can adjust the prediction model based on historical data from similar situations to adapt to unconventional usage patterns. This accurate load prediction capability allows the system to optimize resource allocation in advance, significantly improving service quality and user satisfaction during peak periods.
[0083] In S3.4, the current processing capacity and the amount of tasks in the queue are first assessed. Combined with historical task execution time data, a system load prediction model is established. This model uses time series analysis to predict load levels and resource availability at different future time periods. Based on this prediction 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, with the allocation process considering 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, which can adjust the window size and task allocation according to real-time conditions. Furthermore, a certain proportion of resources and time windows are reserved for handling unforeseen new tasks, especially high-priority urgent tasks. This dynamic time window partitioning strategy enables flexible responses to changing task flows, ensuring scheduling stability while providing necessary responsiveness. Finally, a complete scheduling strategy with a time dimension is output, which clearly specifies the time window in which each task will be executed, which resources will be used, and the specific execution order, providing detailed guidance for the next step of resource allocation and conflict resolution.
[0084] Step S4: Based on the task scheduling strategy, resource demand prediction and conflict resolution are performed using a dynamic resource allocation algorithm to form a resource allocation plan.
[0085] Specifically, a distributed sensor network is used to monitor the real-time status of various key resources in the beverage machine. This sensor network consists of various types of sensors, including water level sensors, temperature sensors, pressure sensors, and flow sensors. Non-invasive sensing technology is employed to ensure that the sensing process does not affect the quality of beverage preparation, while maintaining high-precision data acquisition capabilities. The collected real-time data undergoes preliminary signal processing and noise filtering to form a current status view of each resource.
[0086] Based on the task scheduling strategy generated in step S3, a demand forecasting model for each resource within the future time window is constructed. All tasks planned for execution within the scheduling time window are analyzed, and the demand for various resources and their temporal distribution for each task are extracted to establish a time-series resource demand model. This model allows for the plotting of demand curves for each resource within the future time window, prediction of peak and trough periods of resource demand, and identification of points where resource demand exceeds available supply; these points are marked as potential resource conflict points.
[0087] For predicted resource conflict points, a specialized conflict resolution algorithm is implemented. This algorithm first classifies conflicts into different types, such as temporary conflicts, structural conflicts, or priority conflicts. For each conflict type, a corresponding resolution strategy is applied. For temporary conflicts, resource allocation may be staggered by fine-tuning tasks. For structural conflicts, resource substitution or task splitting strategies may be employed. For priority conflicts, a resource competition arbitration mechanism is implemented, determining the resource allocation order based on a comprehensive score considering task priority, waiting time, and resource utilization efficiency.
[0088] Based on the conflict resolution results, a specific time period is assigned to each task, clearly specifying the task's start time, estimated completion time, and possible pause points. Then, the required resources are allocated to each task within its execution time period, including precise resource usage amounts and methods. These allocation decisions are organized into a structured resource allocation plan, presented in a timeline format, clearly showing the allocation status of each resource and the resource usage of each task within future time windows.
[0089] Furthermore, based on the aforementioned task scheduling strategy, a resource allocation plan is formed through dynamic resource allocation algorithms for resource demand prediction and conflict resolution, including:
[0090] S4.1 monitors and processes the water tank level, heating temperature, and pressure pump status of the intelligent capsule fresh-extract beverage machine in real time to obtain the current availability status of key resources;
[0091] First, the key resources of the intelligent capsule fresh-brewing beverage machine are monitored and processed in real time to obtain their current availability. This monitoring consists of multiple high-precision sensors, forming a complete distributed sensor network. Water tank level monitoring employs a dual mechanism of ultrasonic water level sensors and float-type backup sensors, accurately measuring the remaining water volume in the tank with an accuracy of ±5ml. Heating temperature monitoring uses multi-point thermocouple temperature sensors, with sensing points placed at key locations such as the heating element, water pipes, and water outlet to form a temperature gradient distribution map, not only monitoring the current temperature but also predicting heat conduction trends. Pressure pump status monitoring combines pressure sensors and 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. Non-invasive sensing technology is used to ensure that the sensing process does not affect the beverage preparation quality. After preliminary signal processing and noise filtering, the collected real-time data forms a current status view of each resource. This status view includes not only the static availability of resources (such as the amount of water in the tank) but also dynamic change indicators (such as the rate of water temperature rise and pressure fluctuation trends), providing comprehensive real-time basis for resource allocation decisions.
[0092] S4.2 Based on the task scheduling strategy and the current availability of key resources, establish a demand prediction model for each resource within a future time window and identify potential resource conflict points;
[0093] Demand forecasting models are comprehensive intelligent forecasting systems used to accurately estimate the demand for various resources within a future time window.
[0094] In one example, the model, based on a hierarchical Bayesian network structure and combining deep learning and probabilistic inference techniques, achieves multi-scale, multi-dimensional prediction of resource demand. The model architecture consists of four main parts: a data acquisition layer, a feature extraction layer, a prediction engine layer, and an output adaptation layer. The data acquisition layer collects three types of key inputs: scheduled task information (including type, parameter settings, and estimated execution time), current resource status (such as water tank level, heating temperature, 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 temporal features, task features, and resource status features. This layer uses wavelet transform 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 is the core of the model, employing a hybrid prediction architecture containing three parallel prediction units: a short-term prediction unit (based on an LSTM network, predicting the next 1-5 minutes), a medium-term prediction unit (based on a Transformer architecture, predicting 5-15 minutes), and a long-term prediction unit (based on Gaussian process regression (GPR), predicting 15-30 minutes). The predictions from these three units are weighted and fused using an attention mechanism to form the final prediction. The output adaptation layer converts the prediction 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 time granularity of 5 seconds, and including confidence interval information. The model also implements online learning capabilities, continuously adjusting internal parameters by comparing predicted values with actual consumption values to improve prediction accuracy. The average prediction error of this demand forecasting model is controlled within ±7%, providing a reliable decision-making basis for resource allocation and conflict resolution.
[0095] In another example, the resource demand forecasting model within a future time window is a multi-layered, multi-dimensional forecasting system used to accurately estimate the resource usage demand of a smart capsule fresh-brewing beverage machine over a future time period. This model employs 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 from 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 types of capsules under different parameter settings, including water-time curves, temperature-energy consumption curves, and pressure-power curves. The task feature mapper matches the characteristics of planned tasks with resource consumption patterns to generate specific resource demand forecasts. This model uses a sliding time window technique, dividing the future time axis into 5-second units and accumulating the resource demands of all planned tasks at each time unit to generate time-series demand curves for water, heat, and pressure resources. The model also integrates artificial intelligence prediction algorithms, which can predict peak and trough resource demand within the next 30 minutes based on the characteristics and quantity of currently queued tasks, with an accuracy rate of over 92%. Through this accurate resource demand prediction, the system can identify resource conflict points in advance and optimize resource allocation plans.
[0096] Based on the task scheduling strategy generated in step S3 and the current availability of key resources obtained through real-time monitoring, a demand forecasting model for each resource within a future time window is established to identify potential resource conflict points. First, all tasks planned for execution within the scheduling time window are analyzed, extracting the demand for various resources and their temporal distribution for each task. Then, a time-series resource demand model is established, dividing the future time axis into smaller time units (e.g., seconds or minutes), calculating the cumulative demand for each type of resource at each time unit. This calculation considers the task's start time, duration, and resource consumption pattern (e.g., constant or variable consumption). For example, for thermal energy resources, the heating requirements, thermal loss rate, and thermal inertia of different tasks are considered; for water resources, the water consumption, recycled water volume, and evaporation loss of each task are analyzed. This model allows for the plotting of demand curves for each resource within the future time window, predicting peak and trough periods of resource demand. These demand curves are compared with resource supply capacity curves, and points where demand exceeds supply are marked as potential resource conflict points. It can identify not only simple resource quantity conflicts (such as insufficient water), but also complex quality conflicts (such as unstable temperature) and timing conflicts (such as untimely resource state transitions). This comprehensive conflict identification ensures that various possible resource allocation problems can be anticipated and addressed.
[0097] S4.3 Based on the potential resource conflict points, the resource competition arbitration algorithm is used to classify conflicts and select resolution strategies, determine the priority of resource allocation, and generate conflict resolution results;
[0098] For identified potential resource conflict points, a resource contention arbitration algorithm is used to classify conflicts and select resolution strategies. The algorithm first classifies conflicts into different types: temporary conflicts (resource demand exceeds supply for a short period), structural conflicts (resource bottlenecks in design), or priority conflicts (high- and low-priority tasks simultaneously require the same resources). For each conflict type, a corresponding resolution strategy is applied. For temporary conflicts, a task fine-tuning strategy is used, slightly delaying the start time of some non-urgent tasks to stagger resource usage, or adjusting the resource usage rate of tasks to smooth out peak demand. For structural conflicts, resource substitution strategies are implemented, such as using a backup tank when the main tank is busy, or a task splitting strategy, breaking down large tasks into multiple intermittently executable smaller tasks and inserting them into resource idle periods. For priority conflicts, a multi-factor-based resource contention arbitration mechanism is implemented, comprehensively considering task priority, waiting time, user experience impact, and resource utilization efficiency to calculate a comprehensive score and determine the resource allocation order. In extreme cases, a resource reservation mechanism is also in place 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; when the initial solution is not feasible, it progressively tries alternatives until a viable conflict resolution solution is found. This multi-layered conflict resolution mechanism ensures that various resource contention situations can be handled intelligently.
[0099] S4.4 Based on the conflict resolution results, assign specific resource usage time periods and resource quantities to each task to form the resource allocation plan.
[0100] Finally, based on the conflict resolution results, specific resource usage time periods and resource quantities are assigned to each task, forming the final resource allocation plan. First, precise time periods are assigned to each task, clearly specifying the task's start time, estimated completion time, and possible pause points (such as waiting for resources to become available). These time points are not rough estimates but are calculated based on detailed task execution models and resource status predictions, ensuring high accuracy. Then, the required resources for each task are allocated within its execution time period, including precise resource usage quantities and methods. For example, a coffee preparation task might specify the number of milliliters of water, the required water temperature, the extraction pressure range, and the heating element used. These allocation decisions consider the physical characteristics and state transition constraints of the resources, such as the heating rate and thermal inertia. Monitoring thresholds and adjustment strategies are also set for each resource allocation, allowing for timely adjustments when actual execution deviates from the plan. These allocation decisions are organized into a structured resource allocation plan, presented in a timeline format, clearly showing the allocation status of each resource and the resource usage of each task within future time windows. This resource allocation plan not only considers the needs of currently known tasks but also reserves a certain amount of resource surplus to cope with possible new emergency tasks. The final generated resource allocation plan becomes an important input for the parameter control in step S5. It provides clear guidance, telling the controller which resources need to be activated at what time and how to precisely control the parameters of these resources, thereby achieving efficient resource utilization and high-quality beverage preparation.
[0101] 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.
[0102] In step S5, based on the resource allocation plan in step S4 and the initial parameter set obtained in step S1, initial target values for each control parameter are set. Resource allocation information for the task to be executed is extracted, including key parameters such as allocated water volume, target temperature, and extraction pressure. These parameters are then fine-tuned by combining standard parameters from the capsule formulation library and user-specific preferences. These initial target parameters are converted into specific, understandable control instructions, including power settings for heating elements, flow control values for water pumps, and opening settings for pressure valves.
[0103] Environmental sensors monitor ambient temperature, humidity, air pressure, and other external factors in real time. Based on this data, compensation coefficients are calculated to dynamically adjust the target values of control parameters. An environmental factor influence model is established to quantitatively analyze the impact of different environmental conditions on the beverage preparation process. Based on this influence model, various compensation coefficients are calculated in real time. These coefficients are derived through a complex mathematical model that considers the interactive effects of multiple environmental factors. These compensation coefficients are used to adjust the control target values, ensuring that optimal preparation parameters are maintained under different environmental conditions.
[0104] Through a closed-loop feedback mechanism, control parameters are continuously fine-tuned based on the deviation between real-time sensor data and target values. A high-precision sensor network collects real-time data on key parameters, compares these values with the set target values, and calculates the deviation and its trend. Based on this deviation data, control parameters are dynamically adjusted using complex optimization algorithms. A predictive control strategy is also implemented, which analyzes parameter trends to predict potential future deviations and takes proactive adjustment measures to effectively prevent large fluctuations.
[0105] 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:
[0106] S5.1 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 for control parameters including temperature, flow rate, and pressure.
[0107] First, based on the resource allocation plan in step S4, and combining parameters from the capsule formula library with user personalized preferences, the initial parameter set is fine-tuned to set initial target values for the control parameters. This process begins by extracting detailed resource allocation information for the task to be executed from the resource allocation plan, including key parameters such as allocated water volume, target temperature range, and extraction pressure range. A professional capsule formula library, established and continuously updated by a team of beverage experts, is accessed, containing optimal preparation parameters for various types of capsules. For example, for coffee capsules from a specific origin, the library specifies a water temperature of 92℃, an extraction pressure of 9 bar, and a flow rate of 30 ml / s as the optimal parameter combination. These professional formula parameters are intelligently integrated with user personalized preferences, and the weight allocation is adjusted to reflect the importance and adjustable range of the parameters. For key quality parameters (such as coffee extraction pressure), professional formulas are given higher weights; while for personalized experience parameters (such as beverage temperature), user preferences are given higher weights. The mutual influence between parameters is also considered; for example, when a user prefers a higher temperature, the flow rate is adjusted accordingly to ensure that the extraction quality is not affected. This parameter fine-tuning is not a simple linear adjustment but is based on a non-linear model, considering the comprehensive impact of parameter changes on the final beverage quality. Finally, a set of initial target values is generated, which are then converted into specific, controllable instructions, including power settings for heating elements, flow control values for water pumps, and opening settings for pressure valves. Simultaneously, the allowable fluctuation ranges of these parameters are calculated to determine the required control accuracy, providing a reference benchmark for subsequent real-time control.
[0108] S5.2 Based on real-time monitored ambient temperature, humidity, and air pressure data, the compensation coefficient is calculated through an environmental factor influence model to dynamically adjust the initial target value and obtain the final target value of the control parameter;
[0109] The environmental factor impact model is a specially designed mathematical model used to quantify the influence of environmental conditions on beverage preparation parameters and generate corresponding compensation strategies. Based on thermodynamic and fluid mechanics principles and experimental data analysis, this model constructs a precise mapping relationship between environmental variables and preparation parameters. The model employs a multiple-input multiple-output (MIMO) structure, mapping the environmental temperature (T...) to the preparation parameters. env ), humidity (H) env ), air pressure (P) env ) and altitude (A env The model takes temperature compensation (CT), pressure compensation (CP), flow compensation (CF), and time compensation (Ct) as input variables and outputs these coefficients. The core of the model is a set of nonlinear transformation functions, implemented through a combination of polynomial regression and piecewise functions. The formula for calculating the temperature compensation coefficient CT is: CT = 1 + α1(T) ref -T env )+α2(T ref -Tenv )²+α3(H env - H ref ), where T ref The reference ambient temperature is H_ref (typically 25℃), the reference humidity is H_ref (typically 60%), and α1, α2, and α3 are fitting coefficients, dynamically adjusted according to different capsule types. The pressure compensation coefficient CP considers the influence of air pressure and altitude on the boiling point of water and extraction pressure, and is calculated using the formula: CP = 1 + β1(P ref -P env ) / P ref +β2(A env / 1000), where P ref The standard atmospheric pressure is 101.325 kPa, and β1 and β2 are fitting coefficients. The flow compensation coefficient CF mainly considers the influence of temperature and humidity on water viscosity, and the calculation formula is: CF = 1 + γ1(T ref -T env )+γ2(H env - H ref The model is defined as follows: γ1 and γ2 are fitting coefficients. The time compensation coefficient Ct comprehensively considers the influence of environmental factors on the overall preparation time, and is calculated as: Ct = 1 + δ1CT + δ2CP + δ3CF, where δ1, δ2, and δ3 are weighting coefficients. Furthermore, the model includes an interaction effect processing module, which quantifies the interactions between environmental factors through cross-term coefficients, such as the combined effect of temperature and humidity on water evaporation rate. The model parameters are obtained through extensive experimental data training, covering a temperature range of -10℃ to 40℃, a humidity range of 20% to 90%, an air pressure range of 70 kPa to 105 kPa, and an altitude range of 0 to 3000 meters. This precise modeling of environmental factors allows for automatic adjustment of preparation parameters under various environmental conditions, maintaining consistent beverage quality.
[0110] Subsequently, based on real-time monitored environmental data, compensation coefficients were calculated using an environmental factor influence model to dynamically adjust the initial target value. A high-precision environmental sensor array was equipped to monitor external factors such as temperature, humidity, and air pressure in real time. These sensors adopt industrial-grade precision standards, with temperature sensing accuracy reaching ±0.1℃, humidity sensing accuracy reaching ±2%RH, and air pressure sensing accuracy reaching ±1hPa. An environmental factor influence model was established; this is a complex multivariate mathematical model that quantitatively analyzes the impact of different environmental conditions on the beverage preparation process. For example, model analysis shows that for every 5℃ decrease in ambient temperature, the temperature drop rate of hot water in the pipes increases by approximately 8%, requiring a corresponding increase in the initial water temperature; for every 20% increase in ambient humidity, the evaporative cooling effect is enhanced, affecting the final beverage temperature by approximately 1.2℃; for every 1000-meter increase in altitude, atmospheric pressure decreases by approximately 10%, and the boiling point of water decreases by approximately 3.3℃, requiring adjustments to temperature and pressure parameters. Based on this influence model, various compensation coefficients were calculated in real time. These coefficients were derived through a complex mathematical model, considering 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 compensation, pressure compensation, flow rate compensation, and time compensation coefficients. These compensation coefficients are applied to adjust the control target value. The final control target value, considering the influence of environmental factors, is obtained using the formula: Final Target Value = Initial Target Value × (1 + Corresponding Compensation Coefficient). This intelligent compensation mechanism greatly improves adaptability to various environments, ensuring the consistency and stability of beverage quality.
[0111] S5.3 Based on the deviation between real-time temperature, flow, and pressure sensor data and the final target value, parameters are fine-tuned through a closed-loop feedback mechanism and predictive control strategy to achieve continuous optimization of control parameters and obtain an optimized parameter set for beverage preparation.
[0112] Predictive control strategies transcend the limitations of traditional feedback control by anticipating future state changes and taking control measures in advance, achieving more precise and stable parameter control. This strategy is based on Model Predictive Control (MPC) theory, combining dynamic models, optimization algorithms, and rolling time-domain control concepts. In terms of dynamic modeling, the predictive control strategy establishes accurate mathematical models for each component of the intelligent capsule beverage machine. For example, the thermodynamic 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, considering the changes in the physical properties of water at different temperatures and the dynamic response characteristics of the pipes. These models are obtained through identification techniques; that is, during control operation, input-output data is continuously collected, and model parameters are continuously updated and optimized using algorithms such as recursive least squares, enabling the model to accurately reflect the current dynamic characteristics.
[0113] The thermal model is a multiphysics coupled model that describes the complex dynamic relationship between heating power, water temperature, ambient temperature, and flow rate. Based on the first law of thermodynamics and the law of heat conduction, this model integrates computational fluid dynamics (CFD) principles and neural network technology. The core equations of the model include: the energy balance equation E(t+Δt)=E(t) +Pin(t)×Δt-Pout(t)×Δt, where E represents the system's thermal energy, Pin is the input power, and Pout is the heat loss power; the temperature distribution equation ∂T / ∂t=α∇²T+S(x,y,z,t), describing the spatiotemporal distribution of temperature in the system, where α is the thermal diffusivity coefficient and S is the heat source term; and the heat loss function Pout=k1(T-Tenv)+k2F(T-Tenv)+k3(T 4 -Tenv 4 The values (k1, k2, k3) represent heat losses due to conduction, convection, and radiation, respectively, where F is the flow rate and k1, k2, k3 are the heat transfer coefficients. The model innovatively introduces thermal inertia modeling, capturing the dynamic process of heat storage and release through a recurrent neural network (RNN), thus solving the problem of time-varying characteristics that traditional thermodynamic models cannot accurately describe. This RNN module contains LSTM units, taking historical temperature sequences, power variations, and flow rate data as input, and outputting a temperature prediction for future time points. The model also considers the nonlinear effects of heating elements, such as power saturation and heat conduction delay, establishing a piecewise nonlinear mapping between power and temperature response. The model parameters are continuously optimized through experimental data and an online learning mechanism, achieving a prediction accuracy of ±0.5℃.
[0114] The fluid model describes the relationship between pump power, pipe resistance, pressure, and flow rate, considering the changes in the physical properties of water at different temperatures and the dynamic response characteristics of the pipe. Based on the Bernoulli equation and the Darcy-Weisbach equation, the model incorporates machine learning techniques to capture non-ideal fluid behavior. The fundamental equations of the model include: the pump characteristic equation H = H0 - aQ², where H is the pump head, H0 is the zero-flow head, a is a coefficient, and Q is the flow rate; the pipe resistance equation hf = f(L / D)(v² / 2g), where hf is the friction 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, ensuring 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 correcting for the friction factor f based on this change. To capture the dynamic response characteristics of the pipeline system, the model employs the transfer function method, 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 time delay. The model also considers non-ideal effects such as air entrainment, two-phase flow, and pressure fluctuations, establishing predictive models for these complex phenomena using support vector regression (SVR) technology. Through this composite modeling approach, the fluid model can predict the pressure-flow relationship under different operating conditions with an accuracy of over 95%, providing a reliable basis for precise fluid control.
[0115] The core of predictive control is to predict the trajectory of state changes over a future period based on the current state and a dynamic model. A prediction time domain (typically a few seconds to tens of seconds) is defined, within which the controller simulates the future response under different control inputs using the dynamic model. For example, in water temperature control, the controller predicts the water temperature change curve over the next 10 seconds at the current heating power; it also simulates the temperature change curves after increasing or decreasing the heating power. Based on these predicted trajectories, an optimization objective function is defined, typically including 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). The controller solves this optimization problem to find the control sequence that optimizes the objective function within the prediction time domain.
[0116] Taking temperature control as a specific example, traditional solutions immediately increase heating power when the water temperature is detected to be below the target value, and then reduce power when the temperature approaches the target value. This reactive control is prone to temperature overshoot and fluctuations. Predictive control strategies, however, are different. Assuming the current water temperature is 85℃ and the target temperature is 92℃, a thermodynamic model predicts that if the heating power is immediately increased to maximum, the water temperature will reach 92℃ after 7 seconds. However, due to thermal inertia, the temperature will continue to rise to 94℃ before starting to decrease, resulting in a 2℃ overshoot. The predictive controller calculates an optimal power change curve: first heating with 80% power for 5 seconds, then gradually reducing to 40% power, allowing the temperature to smoothly approach the target value without overshoot. This predictive control is particularly suitable for handling parameters with significant hysteresis and nonlinear characteristics, such as water temperature and pressure control.
[0117] Predictive control strategies also achieve multi-parameter collaborative optimization, not only predicting changes in individual parameters but also simulating the interactions between parameters for overall optimization. For example, in coffee extraction, 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 the extraction effect. The predictive controller coordinates temperature and flow control, appropriately increasing 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 time-domain control method. In 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, but only the first control action in the sequence is executed. This process is then repeated in the next control cycle. This rolling optimization strategy allows for continuous adaptation to changes in actual conditions, such as environmental disturbances or model errors, maintaining control robustness. Through this advanced predictive control strategy, more precise and stable parameter control can be achieved than traditional control methods, significantly improving the consistency of beverage preparation quality and energy efficiency.
[0118] The State Measurement Update Predictive Model (SMPM) is an advanced control architecture combining adaptive Kalman filters and model predictive control (MPC) to integrate the latest state measurement data in real time, update the system predictive model, and optimize control decisions. The model uses state-space representation to describe the dynamic behavior of the system 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 (containing physical quantities such as temperature, pressure, and flow rate), u represents the control input, y represents the measurement output, w and v are the process noise and measurement noise, respectively, and A, B, and C are the system matrices. The core of the model is an 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 innovation of the model lies in its adaptive mechanism, which dynamically adjusts Q and R through residual analysis: Q(k) = λQ(k-1) + (1-λ)q(k)ᵀ, R(k) = λR(k-1) + (1-λ)r(k)ᵀ, where q and r are the state prediction residual and measurement residual, respectively, and λ is the 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 rolling optimization problem min{∑(‖y(k+i|k)-r(k+i)‖²Q1+ ‖Δu(k+i)‖²Q2)}, where r is the reference trajectory, Q1 and Q2 are weight matrices, and the prediction range is typically 520 steps. The model also implements a state-dependent parameter identification (SDPI) mechanism, which automatically adjusts the system matrices A, B, and C in different operating intervals, 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.
[0119] By employing 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℃), flow rate (accuracy ±0.5ml / s), and pressure (accuracy ±0.1bar). These actual values are compared with the final target value set in step two to calculate the deviation value and its trend. A complex closed-loop feedback control algorithm is used to dynamically adjust the control output based on the magnitude, duration, and rate of change of the deviation. For example, when the water temperature is detected to be below the target value and the deviation continues to increase, the heating power is increased and the flow rate is reduced to accelerate temperature recovery. Furthermore, by establishing a dynamic model, future parameter change trends are predicted, allowing for proactive adjustments. For instance, it can predict that heating may lead to thermal saturation due to the continuous preparation of multiple beverages, thus reducing power or inserting a cooling cycle in advance to prevent temperature overshoot. This predictive control is particularly suitable for handling parameters with significant hysteresis characteristics, such as water temperature changes. It also achieves synergistic optimization among parameters. When one parameter needs adjustment, the impact of this adjustment on other parameters is evaluated, and overall optimization is performed. 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 fine-tuning and optimization of parameters, a dynamically changing set of optimized parameters for beverage preparation is generated. These parameters not only meet the basic preparation requirements but also adapt to environmental changes and state fluctuations, ensuring that the final beverage achieves the best quality.
[0120] Step S6: Execute the beverage preparation task according to the optimized parameter set and the task scheduling strategy.
[0121] In one embodiment, based on the optimized parameter set obtained in step S5, dedicated PID controllers are first designed for key parameters such as temperature, flow rate, and pressure. Each controller has anti-overshoot characteristics, enabling it to quickly respond to changes in target values without generating significant overshoot or oscillation. These controllers do not operate independently but form a collaborative control network, capable of coordinating with each other to address the mutual influence between parameters.
[0122] 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, based on the specific parameter values in the optimized parameter set, a multi-level collaborative PID control network precisely controls each actuator. For example, the heating element is controlled to reach and stabilize the water temperature at the target temperature; the water pump is controlled to precisely match the water flow rate to the target value; and the pressure pump is controlled to maintain the extraction pressure within the optimal range.
[0123] Throughout the preparation process, the PID control network continuously receives feedback data from sensors and adjusts the control output in real time to ensure that the deviation between the actual parameter values and the target values is minimized. This precise parameter control ensures the stability and consistency of the beverage preparation process, ultimately producing high-quality beverages.
[0124] According to the instructions, the optimized parameter set, and the task scheduling strategy, the beverage preparation task is executed, including:
[0125] S6.1 Based on the optimized parameter set, design dedicated PID controllers with anti-overshoot characteristics for temperature, flow rate, and pressure respectively, and construct a multi-level collaborative PID control network;
[0126] 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 employs an improved PID structure with predictive compensation, specifically optimized for the high hysteresis characteristics of heat. Controller parameters (proportional coefficient Kp, integral time Ti, derivative time Td) are dynamically adjusted through an adaptive algorithm to achieve the optimal balance between response speed and stability. For example, during rapid heating, the controller uses a larger proportional coefficient and a smaller integral time to accelerate the response; while approaching the target temperature, it automatically switches to a fine control mode, reducing the proportional coefficient and increasing the derivative action to effectively suppress temperature overshoot. The controller also integrates a feedforward compensation mechanism, predicting the required heating time based on water volume and target temperature, and adjusting the heating power in advance to significantly reduce temperature fluctuations. Flow control uses a fast-response PID structure, compensating for the nonlinear characteristics of the water pump. The controller employs a piecewise linearization method, using different control parameters in different flow ranges to ensure accurate control across the entire flow range. The controller also integrates a disturbance suppression algorithm, enabling it to quickly respond to flow rate changes caused by pressure fluctuations and maintain a stable output. Pressure control employs an adaptive PID algorithm, allowing the controller to automatically adjust control parameters based on the resistance characteristics of different capsule types. It identifies the capsule's resistance curve through initial pressure testing and then selects the most suitable set of control parameters to ensure stable pressure during extraction. The controller also implements a pressure gradient control function, smoothly changing the pressure according to a preset curve to simulate the pressure curve of professional manual extraction, thus enhancing the beverage's flavor. These professional PID controllers do not operate in isolation but form a collaborative control network. A data sharing and coordination mechanism has been established between controllers, allowing each controller to sense the status and trends of other parameters and coordinate with each other to address coupling effects between parameters. For example, when the temperature controller detects a slowdown in the rate of temperature increase, it notifies the flow controller to temporarily reduce the flow rate to prevent insufficient outlet water temperature. This multi-level collaborative PID control architecture significantly improves stability and control accuracy, enabling it to handle various complex preparation conditions.
[0127] S6.2 Based on the task execution order determined by the task scheduling strategy, each preparation task is started sequentially according to the time window;
[0128] Following the execution order determined by the task scheduling strategy generated in step S3, each beverage preparation task is launched sequentially according to the time window division. The task launch process employs precise timing control. First, it checks whether the current time has entered the task's designated time window, and then verifies whether the required resources are ready. Resource readiness checks include whether the water tank level is sufficient, whether heating has reached the basic temperature, and whether the pressure is normal. Once all preconditions are met, a task launch signal is issued, activating the relevant execution mechanisms. For each launched task, a dedicated task execution instance is created, containing all parameter settings, control objectives, and monitoring thresholds for the task. A multi-task parallel processing architecture is adopted, enabling the simultaneous management of multiple tasks at different execution stages. For example, while one task is performing the extraction stage, it can simultaneously preheat water and prepare resources for the next task. A smooth transition strategy is used for task launch to avoid shocks caused by abrupt changes in resource usage. For example, heating does not suddenly switch from low power to full power, but rather gradually increases power through a ramp function, reducing current surges and temperature fluctuations. A coordination mechanism between tasks is also implemented. When multiple tasks need to use the same resources, they are scheduled to use resources in a staggered manner or share resources based on priority and resource status. This carefully designed task initiation strategy ensures stable and reliable operation while maximizing resource utilization efficiency. S6.3 After each preparation task is initiated, based on the temperature, flow rate, and pressure parameters in the optimized parameter set, a multi-level collaborative PID control network is used to control heating to reach the target temperature, control the water pump to reach the target flow rate, and control the pressure pump to reach the target pressure.
[0129] After each preparation task is initiated, the various actuators are precisely controlled through a multi-level collaborative PID control network based on the temperature, flow rate, and pressure parameters in the optimized parameter set. In the temperature control stage, the power output of the heating element is precisely controlled to ensure the water temperature reaches and stabilizes at the target temperature. During control, feedback data is continuously acquired from multiple temperature sensors, and the deviation between the current temperature and the target temperature, as well as the rate of temperature change, are calculated in real time. The PID controller calculates the optimal heating power output based on this data, ensuring the temperature quickly approaches the target value without significant overshoot. Heat conduction delay is also considered; a predictive model estimates the time it takes for heat energy to transfer from the heating element to the outlet, and the heating power is adjusted in advance to compensate for this delay effect. In the flow control stage, the water flow rate is precisely matched to the target value by adjusting the pump speed or valve opening. During control, real-time flow data is acquired from the flow sensor, and the PID controller dynamically adjusts the pump output based on the flow deviation. 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 to the standard flow rate. In the pressure control stage, the extraction pressure is maintained within the optimal range by adjusting the pressure pump output and the back pressure valve opening. During control, real-time pressure data is acquired from the pressure sensor, and the PID controller adjusts the pressure output based on pressure deviations. Pressure pulsation control can also be implemented to simulate the pressure fluctuation patterns of professional coffee machines, improving extraction results. Throughout the preparation process, these three control stages do not operate independently but work closely together through a collaborative control network. For example, when an abnormally high pressure is detected, the flow controller automatically reduces the flow rate to prevent excessive pressure from damaging the capsule or affecting the taste. Simultaneously, the temperature controller adjusts the heating strategy accordingly to ensure a stable water temperature even with 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 users' personalized needs and professional quality standards.
[0130] Step S7: Perform anomaly detection and emergency response processing on the beverage preparation task execution process.
[0131] Anomaly detection and emergency response handling are performed on the beverage preparation task execution process, including:
[0132] S7.1 collects temperature, pressure and flow rate in real time during the beverage preparation process, and obtains a multi-dimensional parameter monitoring data stream of the beverage preparation process;
[0133] Specifically, key parameter data during the beverage preparation process are collected in real time using multi-dimensional sensors such as temperature, pressure, and flow rate, forming a continuous multi-dimensional parameter monitoring data stream. This data is collected at a high frequency to ensure that brief parameter fluctuations or anomalies can be detected.
[0134] An anomaly detection model was trained based on historical data. This model can identify various anomaly patterns, including parameter fluctuations (such as sudden temperature drops and abnormal pressure fluctuations) and equipment malfunctions (such as water pump blockages and heating element failures). The anomaly detection model employs various machine learning algorithms, such as outlier detection, time series analysis, and pattern recognition, to distinguish between normal parameter fluctuations and abnormal situations requiring intervention.
[0135] S7.2 Based on the multidimensional parameter monitoring data stream and historical normal preparation data, an anomaly detection model is trained through a machine learning algorithm. The anomaly detection model is used to identify anomaly patterns that include parameter fluctuations and / or equipment failures.
[0136] When an anomaly is detected, an appropriate emergency response mechanism will be 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 paused and an attempt may be made to resume automatically; for severe anomalies, an alarm will be issued and the relevant components will be safely shut down to prevent equipment damage or safety accidents.
[0137] S7.3 Based on the analysis results of the multi-dimensional parameter monitoring data stream by the anomaly detection model, perform automatic adjustment of the optimized parameter set.
[0138] A complete execution log is created by meticulously recording all parameter changes and operation sequences throughout the preparation process. These logs are used not only for 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 problems can be prevented from recurring in future operations.
[0139] The present invention also provides a task processing device for an intelligent capsule fresh-extract beverage machine, such as... Figure 4As shown, the system includes: a fusion processing module for performing multimodal recognition technology fusion processing on user input commands and capsule labels to obtain an initial parameter set for beverage preparation containing the capsule's basic formula, the initial parameter set including temperature, flow rate, and pressure during the extraction process; a generation module for constructing a two-layer spatial structure of public and private resource domains 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 and extracting spectral features based on the task model using generalized skew spectrum theory of graphs, and generating a task scheduling strategy based on the spectral features; a prediction and conflict resolution module for predicting resource requirements and resolving conflicts based on the task scheduling strategy using a dynamic resource allocation algorithm to form a resource allocation plan; a control module for controlling parameters 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 anomaly detection and emergency response processing during the execution of the beverage preparation task.
[0140] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0141] It should be noted that those skilled in the art can make various modifications and variations to this invention without departing from the spirit and scope of this invention. If such modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include such modifications and variations.
[0142] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A task processing method for a smart capsule fresh brew machine, characterized in that, The method comprises the following steps: The multi-modal recognition technology fusion processing of the user input instruction and the capsule label is performed to obtain a beverage preparation initial parameter set containing a capsule basic formula, and the initial parameter set comprises temperature, flow rate and pressure in an extraction process; Based on the initial parameter set, 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 priority; Based on the task model, a task dependency graph is constructed and spectral features are extracted using the generalized skew spectrum theory of graphs, and a task scheduling strategy is generated based on the spectral 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; The beverage preparation task is executed according to the optimized parameter set and the task scheduling strategy; Abnormality detection and emergency response processing are performed on the beverage preparation task execution process; The double-layer space structure of the public resource domain and the private resource domain is constructed through the differential private space efficiency algorithm to generate the task model containing priority, comprising: The initial parameter set is combined with a time stamp and a user identifier to construct a task description structure to obtain a structured task description object; The task description object is subjected to resource mapping function calculation processing to obtain a resource demand vector containing water, heat energy, pressure and time; Based on the rotating door model theory and the resource demand vector, a double-layer space structure containing a public resource domain and a private resource domain is constructed; The tasks in the double-layer space structure are subjected to differential private space efficiency algorithm comparison processing to calculate the resource utilization efficiency and the conflict influence degree of each task, and priority weight is assigned to the tasks based on the efficiency score and the conflict influence degree to obtain the task model containing priority.
2. The task processing method according to claim 1, characterized by, The user input instruction comprises a voice instruction and a touch screen operation, and the multi-modal recognition technology fusion processing of the user input instruction and the capsule label to obtain the beverage preparation initial parameter set containing the capsule basic formula comprises: The user voice instruction is processed through voice recognition technology, and the user touch screen operation is processed through image recognition technology to obtain user beverage preparation demand information; The capsule label is subjected to RFID or NFC technology scanning processing to obtain capsule information containing capsule type, specification and shelf life information; The capsule information and user historical preparation records are subjected to parameter fusion algorithm preference matching processing according to the user beverage preparation demand information to obtain personalized user preference information; The personalized user preference information and the capsule basic formula are subjected to parameter weight calculation and fusion processing to obtain the initial parameter set.
3. The task processing method of claim 1, wherein, Based on the task model, a task dependency graph is constructed and spectral features are extracted using the generalized skew spectrum theory of graphs, and an optimized task scheduling strategy is generated based on the spectral features, comprising: The task model is subjected to resource dependency analysis and construction processing to obtain a directed graph structure expressing the resource competition and dependency relationship between tasks; The directed graph structure is subjected to matrix calculation and generalized skew spectrum calculation processing to obtain spectral characteristics including eigenvalues and eigenvectors; Based on the eigenvalues and eigenvectors, task grouping and ordering optimization are performed through a heuristic algorithm to generate a task execution order that maximizes system throughput and minimizes average waiting time; Based on the task execution order and a system load prediction model established based on historical task execution time data, a scheduling time window is divided to form the optimized task scheduling strategy.
4. The task processing method of claim 1, wherein, 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 level of the water tank, the temperature of the heating system, and the state of the pressure pump of the intelligent capsule fresh extract beverage machine to obtain the current available state of the key resources; Based on the task scheduling strategy and the current available state of the key resources, a demand prediction model for each resource in the future time window is established to identify potential resource conflict points; Based on the potential resource conflict points, conflict classification and solution 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.
5. The task processing method of claim 1, wherein, Based on the resource allocation plan, parameter control is performed through an environmental factor compensation mechanism to obtain a set of beverage preparation optimization parameters, including: Based on the resource allocation plan, the initial parameter set is fine-tuned in combination with the capsule formula library parameters and user individualized preferences to set initial target values for the control parameters including temperature, flow rate, and pressure; Based on real-time monitoring of environmental temperature, humidity, and air pressure data, a compensation coefficient is calculated through an environmental factor influence model to dynamically adjust the initial target values and obtain the final target values of the control parameters; Based on the deviation of real-time temperature, flow rate, and pressure sensor data from the final target values, parameter fine-tuning is performed through a closed-loop feedback mechanism and predictive control strategy to continuously optimize the control parameters and obtain the set of beverage preparation optimization parameters.
6. The task processing method according to claim 5, characterized by, Based on real-time monitoring of environmental temperature, humidity, and air pressure data, a compensation coefficient is calculated through an environmental factor influence model to dynamically adjust the initial target values and obtain the final target values of the control parameters, including: Quantitative analysis and processing of real-time monitoring data of environmental temperature, humidity, and air pressure to obtain a mathematical model of the influence of different environmental conditions on the beverage preparation process; Temperature compensation coefficient, pressure compensation coefficient, and time compensation coefficient calculation and processing of the mathematical model to obtain a multi-dimensional compensation coefficient matrix; According to the compensation coefficient matrix, real-time correction and calculation of the target values of the control parameters are performed to obtain the final target values of the control parameters.
7. The task processing method of claim 1, wherein, Abnormality detection and emergency response processing of the beverage preparation task execution process, including: Real-time acquisition of temperature, pressure, and flow rate during beverage preparation to obtain multi-dimensional parameter monitoring data streams during beverage preparation; training an anomaly detection model for identifying abnormal patterns including parameter fluctuation and / or equipment failure based on the multi-dimensional parameter monitoring data stream and historical normal preparation data through a machine learning algorithm; performing an optimized parameter set automatic adjustment processing operation based on an analysis result of the multi-dimensional parameter monitoring data stream by the anomaly detection model.
8. The task processing method of claim 1, wherein, According to the instructions, the optimized parameter set and the task scheduling strategy, the beverage preparation task is executed, including: Based on the optimized parameter set, a special PID controller with anti-windup characteristics is designed for temperature, flow rate and pressure respectively, and a multi-level collaborative PID control network is constructed; Based on the task execution order determined by the task scheduling strategy, each preparation task is started in turn according to the time window; After starting each preparation task, the heating system is controlled to reach the target temperature, the water pump is controlled to reach the target flow rate, and the pressure pump is controlled to reach the target pressure through the multi-level collaborative PID control network according to the temperature, flow rate and pressure parameters in the optimized parameter set.
9. A task handling device for a smart capsule fresh brew machine, characterized in that, including: The fusion processing module is used for multi-modal recognition technology fusion processing of user input instructions and capsule labels to obtain a beverage preparation initial parameter set containing capsule basic formula, and the initial parameter set includes temperature, flow rate and pressure in the extraction process; The generation module is used for constructing 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 priority; The construction module is used for constructing a task dependency graph and extracting spectral features based on the task model using the generalized skew spectrum theory of graph, and generating a task scheduling strategy based on the spectral features; The prediction and conflict resolution module is used for resource demand prediction and conflict resolution through a dynamic resource allocation algorithm based on the task scheduling strategy to form a resource allocation plan; The control module is used for parameter control through an environmental factor compensation mechanism based on the resource allocation plan and the initial parameter set to obtain a beverage preparation optimized parameter set; The execution module is used for executing a beverage preparation task according to the optimized parameter set and the task scheduling strategy; The anomaly detection module is used for anomaly detection and emergency response processing of the beverage preparation task execution process; The double-layer space structure of public resource domain and private resource domain is constructed through a differential private space efficiency algorithm to generate a task model containing priority, including: The initial parameter set is combined with a timestamp and a user identifier to construct a task description structure to obtain a structured task description object; The resource mapping function calculation processing is performed on the task description object to obtain a resource demand vector containing water, heat energy, pressure and time; Based on the rotating door model theory and the resource demand vector, a double-layer space structure containing public resource domain and private resource domain is constructed; The differential private space efficiency algorithm comparison processing is performed on the tasks in the double-layer space structure to calculate the resource utilization efficiency and conflict influence degree of each task, and the priority weight is assigned to the tasks based on the efficiency score and conflict influence degree to obtain the task model containing priority.
Citation Information
Patent Citations
Beverage selling device and information processing device
CN108877052A
Systems, methods, and apparatuses for implementing a scalable scheduler with heterogeneous resource allocation of large competing workloads types using QOS
US20180321971A1