Beverage garland track generation method and system based on specific pattern

By combining basic geometric primitives and pattern recipe systems with a flow rate model based on multimodal interaction and demonstration learning, the problem of automated coffee machine trajectory generation systems being unable to adapt to diverse inputs and fluid characteristics has been solved. This has enabled efficient and personalized latte art pattern generation and expansion, improving pattern accuracy and system adaptability.

CN120953407APending Publication Date: 2025-11-14SHANGHAI HI DOLPHIN ROBTICS CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511020430.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

The existing trajectory generation systems of automated coffee machines cannot adapt to diverse inputs and lack the algorithmic ability to transform abstract strokes into precise geometric paths. This results in an inability to respond to personalized needs, and the geometric trajectory is disconnected from fluid characteristics, affecting pattern accuracy and pattern library scalability.

Method used

Through the combination of basic geometric primitives, pattern recipe system and user input conversion pipeline, multimodal interaction is realized. Combined with the flow velocity model of demonstration learning and physical constraint perception, accurate and stable trajectory is generated, which is compatible with a variety of actuators and supports autonomous learning and pattern expansion.

Benefits of technology

It has improved the flexibility and precision of automated coffee machines in personalized creation, lowered the technical threshold, improved the efficiency of pattern generation and system scalability, supported multiple input methods, and enhanced the artistic expression and security of patterns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953407A_ABST
    Figure CN120953407A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automatic pattern generation and execution, and provides a beverage garland track generation method based on a specific pattern, which can be widely applied to the fields of beverage garland, food decoration, artistic creation and the like, and comprises the following steps: S1, receiving pattern input; s2, analyzing the pattern input to obtain control parameters; s3, generating an execution path based on the control parameters; and S4, generating a control track according to the execution path and executing the control track. Through the basic geometric primitive combination, the pattern formula system and the user input conversion pipeline, the preset garland pattern and user-defined input are adapted, accurate and stable reproduction and flexible expansion of the garland pattern are realized, and the personalized creation capability of the automatic coffee machine is improved. The system is compatible with multiple types of executing mechanisms such as 4-7-axis mechanical arms, breaks through traditional input limitation, supports multi-mode interaction such as natural languages and gestures, can autonomously learn and evolve, constructs open creative ecology, and has four innovation points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of automated pattern generation and execution, and in particular to a trajectory generation method and system based on a specific pattern, which can be applied to multiple fields such as beverage latte art, food decoration, artistic creation, and industrial processing. Background Technology

[0002] In the technological evolution of automated coffee machines, the automated generation of latte art patterns has become a key link connecting technological performance and user experience. As the consumer market upgrades its demands for both the "functionality" and "emotional value" of beverages, users not only require machines to consistently output standardized flavors, but also expect personalized expression through customized latte art patterns—for example, incorporating exclusive symbols into anniversary drinks, presenting scene-based patterns in themed events, and reflecting personal aesthetic preferences in everyday consumption. This demand is driving the transformation of automated coffee machines from "tools" to "creative carriers," but the limitations of existing pattern generation technology have become a major obstacle to this transformation.

[0003] Current automated coffee machine trajectory generation systems generally employ a "fixed program + limited parameter library" architecture, whose core flaw lies in its extremely poor input compatibility. The pattern library of such systems typically contains only a few classic patterns such as hearts and leaves. The trajectories of these patterns are defined by preset geometric parameters (such as arcs with fixed radii and straight lines of constant length), and the robotic arm can only achieve subtle changes by adjusting limited parameters such as speed and repetition count. For non-standardized user input (such as hand-drawn sketches, uploaded vector graphics, and text-to-image conversions), the system cannot parse or convert them—it lacks both the algorithmic ability to transform abstract strokes into precise geometric paths and the logic for combining graphic elements to adapt to diverse inputs. This closed design limits the device to simply "reproducing preset latte art patterns," failing to respond to ever-changing personalized needs and severely restricting its application in creative scenarios.

[0004] From a technical perspective, existing systems suffer from a core contradiction: a disconnect between geometric trajectory and fluid properties. The essence of automated latte art is to create stable and aesthetically pleasing patterns on the liquid surface through the coordinated control of the robotic arm's movement trajectory and the flow rate of milk foam. However, milk foam, as a typical non-Newtonian fluid, is influenced by multiple factors: its air content determines its fluffiness and fluidity; temperature changes cause significant viscosity fluctuations (e.g., viscosity may increase by 10%-15% for every 5°C decrease in temperature); and changes in shear rate (e.g., sudden changes in local flow rate during rapid robotic arm rotation) trigger shear thinning, leading to an instantaneous increase in the fluidity of the milk foam. However, traditional trajectory generation algorithms only focus on the accuracy of the geometric path (e.g., positional errors of coordinate points) and fail to establish a dynamic matching model between trajectory features (e.g., rate of curvature change, movement speed) and flow rate. For example, when drawing the apex of an arc, if the flow rate is not simultaneously increased to compensate for the milk foam offset caused by centrifugal force, the pattern will exhibit "blurred tips"; at the junction of straight and curved segments, if the flow rate does not smoothly transition with changes in trajectory curvature, "node stacking" will occur. This disconnect between geometry and fluidity means that even if the trajectory planning is mathematically perfect, the actual pattern may still be distorted or deformed, seriously affecting users' trust in the accuracy of automated latte art.

[0005] Furthermore, the existing system lacks sufficient pattern scalability. Due to the lack of standardized primitive definitions and recipe systems, adding new patterns often requires technicians to rewrite the underlying motion code, which is not only time-consuming and labor-intensive but may also affect the stability of existing patterns due to code conflicts. This "one system-level development for every new pattern" model results in slow updates to the device's pattern library, making it difficult to keep up with the market's demand for new patterns and further weakening the competitiveness of automated coffee machines in personalized consumption scenarios.

[0006] Therefore, for the application scenarios of automated coffee machines, there is an urgent need for a trajectory generation algorithm that can deeply adapt to diverse inputs, accurately coordinate geometric trajectories and fluid characteristics, and has flexible scalability, so as to break through the limitations of existing technologies in terms of input compatibility, execution accuracy, and pattern scalability, and truly realize the leap from "standardized reproduction" to "personalized creation" in automated latte art. Summary of the Invention

[0007] To address the aforementioned problems, the present invention aims to provide a method and system for generating beverage latte art trajectories based on specific patterns. By combining basic geometric primitives, a pattern recipe system, and a user input conversion pipeline, it adapts to preset latte art patterns and custom inputs, achieving accurate and stable reproduction and flexible expansion of latte art patterns, thereby enhancing the personalized creation capabilities of automated coffee machines.

[0008] The technical solution of this invention has the following innovative features:

[0009] I. Comprehensive compatibility of implementing agencies

[0010] This invention is not limited to a specific type of actuator; it can be adapted to various types of actuators through a unified trajectory generation interface.

[0011] Serial robotic arms with 4-7 axes and more degrees of freedom;

[0012] High-speed parallel mechanisms such as Delta;

[0013] Lightweight robots that enable human-machine collaboration;

[0014] Complex systems involving multiple machines working together;

[0015] New types of enforcement agencies that may emerge in the future.

[0016] II. A revolutionary breakthrough in input methods

[0017] Breaking through traditional image input limitations, enabling true multimodal interaction:

[0018] Natural language description: "Draw a smiling moon";

[0019] Gesture spatial drawing: creating art by waving your hand in the air;

[0020] Music rhythm mapping: transforming melodies into patterns;

[0021] Emotion recognition generation: Creating content based on user emotions;

[0022] Brain-computer interface: Directly converting imagination into patterns.

[0023] Third, the intelligent, continuously evolving system possesses autonomous learning and innovation capabilities:

[0024] Continuously optimize based on user feedback;

[0025] Independently explore new pattern combinations;

[0026] Aesthetic standards that adapt to different cultural backgrounds;

[0027] Predict trends and prepare in advance.

[0028] IV. Ecological Open Platform

[0029] Building a complete creative ecosystem:

[0030] - Designers upload and share creative designs;

[0031] -Users can purchase and customize exclusive designs;

[0032] -AI-assisted creation lowers the barrier to entry;

[0033] - To form a closed loop of creativity, technology, and business.

[0034] The above-mentioned objective of this invention is achieved through the following technical solution: a method for generating beverage latte art trajectories based on a specific pattern, comprising the following steps:

[0035] S1: Receive pattern input;

[0036] S2: Parse the pattern input to obtain control parameters;

[0037] S3: Generate an execution path based on the control parameters;

[0038] S4: Generate a control trajectory based on the execution path and execute it.

[0039] Furthermore, in step S4, the control trajectory is executed by an actuator, which includes, but is not limited to, the following structures:

[0040] A serial robotic arm with four to seven or more degrees of freedom;

[0041] Parallel mechanisms with three to six degrees of freedom;

[0042] Series-parallel hybrid mechanism;

[0043] The combination of a robotic arm and an auxiliary motion platform;

[0044] Collaborative robot systems;

[0045] The combination of SCARA robots and rotating platforms.

[0046] Further, in step S1, receiving pattern input includes: receiving user pattern input, including selecting a preset latte art pattern or inputting a custom latte art pattern, wherein the preset latte art pattern is a classic preset latte art pattern stored in the system pattern library, and the custom latte art pattern is non-standard graphic information input by the user.

[0047] The methods for inputting patterns include, but are not limited to:

[0048] Touchscreen hand-drawn input;

[0049] Image file upload, supporting bitmap, vector, and CAD graphics;

[0050] Natural language description, generating patterns through NLP parsing;

[0051] Gesture recognition input is captured via a camera or sensor;

[0052] 3D model projection: Projecting a three-dimensional model into a two-dimensional pattern;

[0053] Audio feature mapping converts music rhythms into patterns;

[0054] AR / VR spatial rendering;

[0055] Brainwave pattern recognition.

[0056] Furthermore, the core logic of the beverage latte art trajectory generation method includes three levels:

[0057] Basic Geometric Primitives Library: At its core is a library containing a variety of parametric geometric primitives, which are the most basic building blocks for constructing all complex patterns;

[0058] Pattern Recipe System: Any classic preset latte art pattern is defined as a recipe file. The recipe file is a script that calls the functions corresponding to the geometric primitives in the basic geometric primitive library in a specific order, and assigns precise associated primitive parameters and matching flow rate curves to each geometric primitive;

[0059] User input to primitive conversion pipeline: For custom latte art patterns that are not preset and are input by the user, a conversion pipeline is initiated to parse and approximate the custom latte art pattern as a combination of elements in the basic geometric primitive library, and assign the associated primitive parameters. Once the conversion is complete, the input is regarded as a temporary recipe file and is executed by the subsequent system.

[0060] Furthermore, the basic geometric primitive library includes, but is not limited to:

[0061] Basic geometric primitives: lines, arcs, elliptical arcs, polygons, spirals;

[0062] Parametric curves: spline curves, Bézier curves, B-splines, NURBS curves;

[0063] Advanced primitives: fractal primitives, Lissajous figures, Fourier series curves;

[0064] Three-dimensional space curves;

[0065] User-defined function curves;

[0066] Dynamically expandable primitive plugins.

[0067] Further, in step S2, parsing the pattern input to obtain control parameters specifically involves:

[0068] The input pattern is parsed. If it is the preset latte art pattern, the corresponding recipe file stored in the pattern recipe system is directly called to obtain the geometric primitive sequence, associated primitive parameters, and flow rate curve adapted to the recipe file. If it is the custom image, the input custom image is converted into a geometric primitive sequence and associated primitive parameters through vectorization, path segmentation, and primitive fitting. At the same time, the flow rate curve is obtained based on the flow rate control model of demonstration learning.

[0069] Further, in step S2, if the preset latte art pattern is used, the corresponding recipe file stored in the pattern recipe system is directly called to obtain the geometric primitive sequence, associated primitive parameters, and flow rate curve adapted to the recipe file stored in the recipe file, specifically:

[0070] The user selects a pattern directly from the pattern library, and the system directly loads the corresponding recipe file from the pattern recipe system;

[0071] The recipe file predefines the sequence of geometric primitives to be called, the precise associated primitive parameters of each primitive, and the suitable flow velocity curve to match them. The system directly calls the preset parameters, skipping the time-consuming vectorization and primitive fitting steps in user input processing, and quickly generates the final robot trajectory.

[0072] Further, in step S2, if the input custom image is converted into a geometric primitive sequence and associated primitive parameters through vectorization, path segmentation, and primitive fitting, and a flow velocity curve is obtained based on the flow velocity control model learned through demonstration learning, specifically:

[0073] The system receives the user-inputted custom image and performs operations on the custom image, including denoising, binarization, and skeleton extraction, converting pixelated lines into mathematically precise vector paths.

[0074] The algorithm scans along the vector path and identifies key nodes, including high curvature points and corner points, in the vector path. Using the key nodes as boundaries, the algorithm divides the entire complex vector path into several simple path segments. For each path segment, the system searches for and fits the best matching geometric primitive from the basic geometric primitive library. The original free scribbles are transformed into a series of ordered and standardized geometric primitive sequences and associated primitive parameters.

[0075] The flow rate curve corresponding to the custom image is obtained based on a pre-established flow rate control model. The flow rate control model includes, but is not limited to, demonstration learning models, reinforcement learning models, physical simulation models, deep learning models, or combinations thereof.

[0076] Furthermore, after step S2, the process also includes intelligent recognition and optimization of the input pattern, specifically:

[0077] A feasibility analysis was conducted on the converted geometric primitive sequence.

[0078] Automatically optimize primitive parameters based on the physical constraints of the actuator;

[0079] Multiple optimization options are available for users to choose from;

[0080] Supports real-time preview of optimization effects.

[0081] Furthermore, the flow rate control model includes one or more of the following:

[0082] Demonstration-based learning models;

[0083] An adaptive model based on reinforcement learning;

[0084] Predictive models based on physical simulation;

[0085] Deep learning-based end-to-end models;

[0086] Fuzzy control model;

[0087] Expert system model;

[0088] Hybrid model architecture.

[0089] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes training the flow rate model learned in the demonstration, specifically:

[0090] During the demonstration data collection, a professional latte artist draws basic geometric primitives on an interactive flat panel and controls the milk foam flow rate in real time through a physical slider interactive control. The system synchronously records the path geometric features, including path curvature, path length, and turning angle, and records the flow rate sequence aligned with the geometric path features in time. The geometric features are bound to the corresponding flow rate values ​​to construct feature vectors, forming a set of associated samples of curvature-length-angle → flow rate.

[0091] Data preprocessing includes abnormal sample data cleaning, outlier detection, data normalization, and calculation of features including curvature change rate and angle change rate.

[0092] The model is trained and deployed by using a neural network to learn the mapping relationship between geometric feature sequences and flow velocity sequences. The output layer uses a linear activation function to predict flow velocity values. After training, the model with satisfactory performance is deployed as an inference engine and integrated into the flow velocity control system to support real-time reception of path geometric features and output of flow velocity prediction values.

[0093] During the latte art process, the system continuously evaluates the results and marks new latte art data as incremental learning samples for incremental training to improve the accuracy of flow rate prediction.

[0094] Further, in step S3, generating the execution path based on the control parameters includes generating a Cartesian path for the robotic arm to run based on the geometric primitive sequence and associated primitive parameters, and performing path optimization based on physical constraints, specifically:

[0095] The path planner receives a sequence of geometric primitives, including lines, arcs, and spline curves, and compiles the sequence into continuous path points P(t) = {X(t), Y(t), Z(t)} in Cartesian space ordered by the time axis at the end of the robotic arm. It also parses the associated primitive parameters of each primitive to generate a discrete path point sequence.

[0096] To ensure smooth transition continuity, the initial path primitives are connected using methods including spline curve interpolation to ensure the continuity of velocity and acceleration at the primitive connections, achieving C2 continuity and preventing the robotic arm from shaking.

[0097] Post-path optimization with physical constraint awareness involves fine-tuning the initial path by considering one or more of the following physical constraints:

[0098] Fluid inertia constraint: Considering the inertia of milk foam flow, a transition arc is inserted at sharp turns;

[0099] Surface tension constraint: Optimize path height and velocity to maintain liquid surface stability;

[0100] Temperature-dependent constraints: Adjust flow rate and trajectory parameters based on milk foam temperature;

[0101] Gravity field constraint: to compensate for trajectory deviation due to container tilt angle;

[0102] Container boundary constraints: ensure that the trajectory does not exceed the container boundary;

[0103] Flow conservation constraint: Ensures that the milk foam is distributed reasonably in each part of the pattern.

[0104] Further, in step S4, generating a control trajectory based on the execution path and performing the following steps includes: fusing the Cartesian path with the flow velocity curve, using a synchronous inverse solver to synchronously synthesize an executable control trajectory for the actuator via the time axis, driving the actuator to perform the latte art action according to the trajectory, and dynamically adjusting based on milk foam status feedback to complete the pattern drawing. Specifically:

[0105] The Cartesian path and the flow velocity curve are fused and bound together. The X, Y, and Z coordinate sequences of the Cartesian path are aligned with the tilt angle of the associated flow velocity curve based on the total trajectory duration. Each spatial path point is bound to the corresponding tilt angle at that moment to generate a synchronized trajectory containing position, attitude, and flow velocity information, ensuring that the spatial movement of the robotic arm and the tilt angle change are synchronized and matched.

[0106] The synchronous trajectory is input into the robotic arm motion controller and converted into angle commands for the control degrees of freedom of the actuator through inverse kinematics calculation. During the calculation process, the following safety constraints are simultaneously adapted: the tilting angle is limited to a preset range, the rate of change of flow velocity is controlled within a preset threshold, and milk foam overflow or sudden changes in the flow field are avoided.

[0107] Drive the robotic arm to perform latte art movements according to the joint trajectory to complete the pattern drawing.

[0108] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes innovative pattern generation based on machine learning, specifically:

[0109] Collect user-created patterns as training data;

[0110] Use Generative Adversarial Networks (GANs) to learn pattern styles;

[0111] Generate new creative patterns based on user preferences;

[0112] Supports style transfer and pattern blending;

[0113] Enable human-computer collaborative creation.

[0114] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes multimodal pattern input fusion, specifically:

[0115] Simultaneously accepts multiple input methods, including voice and gesture;

[0116] Cross-modal feature extraction and alignment;

[0117] Feature fusion based on attention mechanism;

[0118] Generate a unified representation of primitive sequences;

[0119] Resolve input ambiguity and conflicts.

[0120] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes adaptive actuator configuration, specifically:

[0121] Automatically detects the type and degrees of freedom of the connected actuators;

[0122] Load the corresponding kinematic model and constraints;

[0123] Optimize trajectory generation strategy based on institutional characteristics;

[0124] Supports hot-swapping and dynamic reconfiguration;

[0125] Compatible with future new types of execution mechanisms.

[0126] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes building a cloud-based pattern ecosystem, specifically:

[0127] Distributed storage of cloud-based pattern libraries;

[0128] Establish a copyright protection mechanism for user-created designs;

[0129] Utilizes blockchain-based transaction and authorization management;

[0130] Utilize community evaluation and recommendation algorithms;

[0131] AI-assisted pattern labeling and classification.

[0132] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes real-time physical simulation and preview, specifically:

[0133] GPU-accelerated fluid dynamics simulation;

[0134] Consider multiphysics coupling effects;

[0135] Real-time rendering preview of the latte art effect;

[0136] Automatically detect potential problems and issue warnings;

[0137] Provide parameter optimization suggestions.

[0138] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes cross-domain application adaptation, specifically:

[0139] Apply latte art trajectory generation technology to other fields;

[0140] It is compatible with the properties of various materials, including chocolate, cream, and pigments.

[0141] Optimization algorithms are used to optimize different application scenarios;

[0142] Supports new applications including 3D printing and laser engraving;

[0143] Maintain the universality of the core algorithm.

[0144] A pattern-based beverage latte art trajectory generation system for performing the above-described pattern-based beverage latte art trajectory generation method includes:

[0145] Pattern input module, used to receive pattern input;

[0146] The pattern parsing module is used to parse the pattern input to obtain control parameters;

[0147] The path generation module is used to generate an execution path based on the control parameters;

[0148] The trajectory execution module is used to generate and execute a control trajectory based on the execution path.

[0149] Compared with the prior art, the present invention has at least one of the following beneficial effects:

[0150] (1) Enhance the flexibility and diversity of pattern customization: Through the basic geometric primitive library, pattern recipe system and user input conversion pipeline, it can not only stably reproduce the classic preset latte art patterns in the system library, but also convert user-defined non-standard graphics (such as hand-drawn sketches) into standardized geometric primitive sequences, so as to achieve full-scene pattern coverage from standardization to personalization and meet diverse latte art needs.

[0151] (2) Improve pattern generation efficiency and stability: Preset patterns directly call the corresponding recipe file, skipping complex processing such as vectorization and primitive fitting, and quickly generate trajectories, which is suitable for efficient and standardized production; Custom patterns ensure stable parsing of non-standard inputs through structured vectorization, path segmentation and primitive fitting process, reducing the uncertainty caused by manual intervention.

[0152] (3) Enhance pattern accuracy and artistic expression: The flow rate model based on demonstration learning integrates the experience of professional latte artists, so that the flow rate curve and geometric primitive features are accurately matched; the path optimization of physical constraint perception (such as C2 continuous processing and fine adjustment against fluid inertia) avoids mechanical arm shaking and sudden changes in milk foam flow field, ensuring "what you draw is what you get", and improving the clarity of pattern edges and the expression of details.

[0153] (4) Ensure the safety and reliability of the latte art process: When synthesizing joint trajectories, the synchronous reverse solver adapts to safety constraints such as the pouring angle range and flow rate change rate to avoid milk foam overflow or damage to the coffee oil layer; combined with the dynamic adjustment mechanism of milk foam state feedback, the stability of the latte art process and the consistency of the final effect are further guaranteed.

[0154] (5) Enhance system scalability and adaptability: Through the parametric geometric primitive library and recipe system, new patterns can be achieved by adding new recipe files without modifying the underlying code, reducing the cost of expansion; the user input conversion pipeline supports a variety of non-standard input forms, enabling the system to flexibly adapt to creative needs in different scenarios.

[0155] (6) Reduces the technical application threshold by 90%: Through multimodal input, especially natural language interaction, users with no technical knowledge can create complex patterns. Compared with traditional systems that require professional training, this invention allows anyone to start creating within 5 minutes.

[0156] (7) Improve creation efficiency by 10 times: Preset patterns directly call recipe files, generating trajectories in just 0.1 seconds; custom patterns, with AI assistance, reduce the average creation time from 30 minutes to 3 minutes. The efficiency improvement is even more significant in batch customization scenarios.

[0157] (8) Exponential growth in innovation capabilities: Through autonomous exploration via reinforcement learning, the system can generate hundreds of innovative patterns per month, equivalent to the output of 10 designers. Moreover, the patterns created by AI have a greater diversity of styles and are not limited by human mindset.

[0158] (9) Value enhancement across the entire industry chain: From upstream pattern design and midstream equipment manufacturing to downstream coffee shop operation, the entire industry chain is upgraded due to this technology. It is expected to drive the scale of related industries to grow by more than 50%.

[0159] (10) Digital inheritance of cultural creativity: Support the digital preservation and revitalization of local cultural symbols and intangible cultural heritage patterns, so that traditional culture can be revitalized in modern beverages. A database containing more than 5,000 cultural patterns has been established.

[0160] (11) Target contribution: Reduce raw material waste by 15% through precise control, reduce energy consumption by 20% through optimized pathways, and support sustainable development goals. After large-scale application, carbon emissions will be reduced by approximately 1,000 tons per year.

[0161] (12) Seamless integration of future technologies: The reserved standardized interface supports cutting-edge technologies such as quantum computing optimization, 6G real-time cloud collaboration, and metaverse virtual-real fusion, ensuring that the system maintains technological leadership in the next 10-20 years. Attached Figure Description

[0162] Figure 1 This invention provides a layered architecture diagram for generating latte art trajectories.

[0163] Figure 2 This is a schematic diagram of the geometric primitive library structure of the present invention;

[0164] Figure 3This is an overall flowchart of the method for generating beverage latte art trajectory based on a specific pattern according to the present invention;

[0165] Figure 4 This is a diagram of the pre-designed pattern formula system architecture of the present invention;

[0166] Figure 5 This invention provides a flowchart for processing user-input patterns.

[0167] Figure 6 This is a schematic diagram of the path segmentation and primitive fitting algorithm of the present invention;

[0168] Figure 7 This is a flowchart of the flow rate model training process based on demonstration learning in this invention;

[0169] Figure 8 This is a diagram of the physical constraint sensing path optimization algorithm of the present invention;

[0170] Figure 9 This is a diagram of the geometry-to-physical action compilation system of the present invention;

[0171] Figure 10 This is a structural diagram of the beverage latte art trajectory generation system based on a specific pattern according to the present invention. Detailed Implementation

[0172] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0173] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0174] The core of this invention is a compilation system that transforms abstract geometry into physical actions.

[0175] Geometric Core: The core of the algorithm is a feature-rich 2D geometry library that supports the creation, transformation (translation, rotation, scaling), and combination of primitives.

[0176] The path planner receives a sequence of geometric primitives (i.e., a "recipe") and "compiles" it into a continuous path P(t) = {X(t), Y(t), Z(t)} in Cartesian space for the robotic arm's end effector. During compilation, it ensures the continuity of velocity and acceleration at primitive connections (achieving C2 continuity) by inserting smooth transitions (such as spline curves), thus preventing the robotic arm from jittering.

[0177] Flow Shaping: This is a standalone module that assigns a desired flow rate Flow(t) to each point on the path based on the characteristics of the geometric path (such as curvature and length) and the artistic requirements of the pattern. Synchronous Synthesizer: Finally, the spatial path P(t) and the flow rate curve Flow(t) are fed into the synchronous inverse solver (see Proposal 2) to generate the final six-axis articulated trajectory.

[0178] Technical difficulty of this invention:

[0179] Robust primitive fitting: User scribbles are full of uncertainty: lines may be thick or thin, have breaks, or overlap. The biggest challenge is how to reliably and accurately identify the user's "intent" from this "dirty" data and fit it into clean geometric primitives.

[0180] Mapping from geometry to art: How can we automatically assign a reasonable flow velocity curve to a geometric path (such as an arc) to make it look aesthetically pleasing? This is an open question. For example, when drawing a heart shape, the flow velocity at the top should be large and full; when drawing leaves and stems, the flow velocity should be thin and uniform. This mapping relationship is difficult to define with simple rules.

[0181] Physical realizability of a trajectory: A geometrically perfect path may not be physically perfectly reproducible. For example, a sharp 90-degree turn, even if the path itself is continuous, may result in a blurred pattern due to the inertia of fluid flow. Geometric planning must take into account the constraints of the underlying fluid dynamics.

[0182] The know-how of this invention:

[0183] Parametric "Recipe" Language: We designed a simple scripting language to define latte art recipes. This allows baristas or technicians to easily create, modify, and combine new latte art patterns, much like writing a program, without altering the underlying code. This flexibility is one of the core advantages of this invention.

[0184] Learning from Demonstration: To address the challenge of mapping "geometry to art," we developed a learning system. We had professional latte artists draw basic primitives on a tablet, simultaneously controlling the desired flow rate in real-time via a physical slider. The system records the relationship between the geometric features of the path (such as curvature) and the flow rate provided by the latte artist, training a model to learn this mapping. In this way, the machine can mimic the flow rate control techniques of a "master" when handling different brushstrokes.

[0185] Physically Constrained Path Optimization: The initial path generated by the geometry planner is merely a "draft." We add a post-optimization step to this. This step fine-tunes the path based on a simplified fluid model. For example, it reduces speed and flow velocity before entering sharp turns and plans a small-radius circular transition at the apex of the turn to counteract the inertia of the fluid. This "predictive" path correction is the key to ensuring "what you draw is what you get."

[0186] Optional GAN ​​stylization module: For user input seeking the ultimate artistic effect, after primitive fitting, we can selectively feed the primitive sequence into a GAN model (as described in the initial version of Proposal 3). However, the role of GAN here is no longer to create from scratch, but to "stylistically refine" the already structured geometric path, making it more consistent with the physical aesthetics of realistic latte art, before finally generating the trajectory. This provides a smooth transition from "stable reproduction" to "artistic creation."

[0187] The technical points of the present invention will be described below through specific embodiments:

[0188] First Embodiment

[0189] This embodiment provides a method for generating beverage latte art trajectories based on specific patterns. It is a scalable latte art pattern generation engine based on the combination of geometric primitives. It decomposes complex latte art patterns into an ordered combination of basic geometric elements, and through precise control of these elements, achieves stable pattern reproduction and free creation.

[0190] like Figure 1 As shown in the hierarchical architecture diagram for generating latte art trajectory, the core logic of the beverage latte art trajectory generation method of the present invention includes three levels:

[0191] (1) Basic geometric primitive library: such as Figure 2 As shown in the schematic diagram of the geometric primitive library structure, the core is a library containing a variety of parametric geometric primitives, which are the most basic building blocks for constructing all complex patterns.

[0192] For example:

[0193] `line(start,end)`: A line primitive defined by the coordinate parameters of its starting point (start) and ending point (end), used to draw a line segment. `start` represents the coordinates of the line's starting point (e.g., X, Y, Z spatial coordinates), and `end` represents the coordinates of the line's ending point. A straight line path is determined by these two points.

[0194] `arc(center, radius, start_angle, end_angle)`: An arc primitive used to draw an arc segment. The parameter `center` is the coordinate of the arc's center, `radius` is the arc's radius, and `start_angle` and `end_angle` are the arc's starting and ending angles, respectively. These four parameters determine the arc's position, size, and range.

[0195] spline(points, tension): A spline curve primitive used to draw a smooth curve. The parameter points is the sequence of control points of the curve (containing the coordinates of at least 3 points), and tension is the tension parameter (usually ranging from 0 to 1), which controls the smoothness of the curve—the smaller the tension value, the smoother the curve; the larger the tension value, the closer the curve is to the broken line trend formed by the control points.

[0196] Furthermore, in this embodiment, the basic geometric primitive library includes, but is not limited to:

[0197] Basic geometric primitives: lines, arcs, elliptical arcs, polygons, spirals;

[0198] Parametric curves: spline curves, Bézier curves, B-splines, NURBS curves;

[0199] Advanced primitives: fractal primitives, Lissajous figures, Fourier series curves;

[0200] Three-dimensional space curves;

[0201] User-defined function curves;

[0202] Dynamically expandable primitive plugins.

[0203] (2) Pattern Recipe System: Any classic preset latte art pattern (such as a heart or wheat leaf) is defined as a recipe file. The recipe file is a script that calls the functions corresponding to the geometric primitives in the basic geometric primitive library in a specific order, and assigns precise associated primitive parameters (such as size and position) and matching flow rate curves to each geometric primitive; for example, a "heart" recipe may consist of three steps: "drawing the left arc (high flow rate)", "drawing the right arc (high flow rate)", and "performing a straight line lift (decreasing flow rate)".

[0204] (3) User input to primitive conversion pipeline: For non-preset custom latte art patterns (such as hand-drawn sketches) input by the user, a conversion pipeline is started to parse and approximate the custom latte art pattern into a combination of elements in the basic geometric primitive library, and assign the associated primitive parameters. Once the conversion is completed, the input is regarded as a temporary recipe file and is executed by the subsequent system.

[0205] Through this layered and decoupled structure, the system not only ensures the stable reproduction of classic patterns, but also provides powerful scalability for handling infinitely diverse user inputs.

[0206] like Figure 3 As shown, the method for generating beverage latte art trajectories based on specific patterns according to the present invention specifically includes the following steps:

[0207] S1: Receive pattern input.

[0208] In step S1, receiving pattern input includes receiving user pattern input, including selecting a preset latte art pattern or inputting a custom latte art pattern, wherein the preset latte art pattern is a classic preset latte art pattern stored in the system pattern library, and the custom latte art pattern is non-standard graphic information input by the user.

[0209] The methods for inputting patterns include, but are not limited to:

[0210] Touchscreen hand-drawn input;

[0211] Image file upload, supporting bitmap, vector, and CAD graphics;

[0212] Natural language description, generating patterns through NLP parsing;

[0213] Gesture recognition input is captured via a camera or sensor;

[0214] 3D model projection: Projecting a three-dimensional model into a two-dimensional pattern;

[0215] Audio feature mapping converts music rhythms into patterns;

[0216] AR / VR spatial rendering;

[0217] Brainwave pattern recognition.

[0218] Step S1, as the starting point of the latte art trajectory generation process, is essentially about building a bridge between user needs and system processing. Its function is not only to simply receive input, but also to perform preliminary identification and classification of pattern types, laying the foundation for subsequent analysis and processing.

[0219] Specifically, for preset latte art patterns, the system's pattern library stores verified classic styles (such as hearts, leaves, etc.). These patterns have been predefined as structured parameterized data through the pattern recipe system, which has the characteristics of high stability and fast recall. Users only need to select through the interface, and the system can directly associate the corresponding recipe file without additional processing of complex graphic analysis, adapting to standardized and efficient latte art scenarios.

[0220] For custom latte art patterns, the core is receiving non-standardized graphic information created by the user. This type of input is highly diverse: it could be freehand strokes drawn by the user on the device's touchscreen (including details such as coordinate trajectories and pressure changes), or bitmap / vector graphics uploaded via mobile terminals (such as personal photos, personalized symbols, and holiday-themed patterns), or even outline graphics converted from text (such as initials of names or short phrase symbols). Because these inputs lack a unified format, they are defined as "non-standardized information." When receiving them, the system needs to adapt to different input formats through the underlying interface (such as image decoding and stroke sampling) and mark their "custom" attribute, providing a basis for initiating dedicated processing flows such as vectorization and primitive fitting in S2.

[0221] In short, by distinguishing between "preset standardized patterns" and "custom non-standardized graphics," S1 ensures both the efficiency of quickly calling up classic patterns and provides an entry point for users' personalized creative needs. It is the primary link in the system to achieve the dual capabilities of "standardized output" and "personalized creation."

[0222] S2: Parse the pattern input to obtain control parameters.

[0223] In step S2, parsing the pattern input to obtain control parameters specifically involves:

[0224] The input pattern is parsed. If it is the preset latte art pattern, the corresponding recipe file stored in the pattern recipe system is directly called to obtain the geometric primitive sequence, associated primitive parameters, and flow rate curve adapted to the recipe file. If it is the custom image, the input custom image is converted into a geometric primitive sequence and associated primitive parameters through vectorization, path segmentation, and primitive fitting. At the same time, the flow rate curve is obtained based on the flow rate control model of demonstration learning.

[0225] In this embodiment, the preset latte art pattern and the custom image are analyzed respectively:

[0226] (1) Preset latte art pattern

[0227] The user directly selects a pattern from the pattern library, such as "three-layered tulip". The system then directly loads the corresponding recipe file from the pattern recipe system.

[0228] The recipe file pre-defines the required geometric primitive sequence, the precise associated primitive parameters for each primitive, and the matching suitable flow rate curve. The system directly calls the preset parameters, skipping the time-consuming vectorization and primitive fitting steps in user input processing, and quickly generates the final robot trajectory. Subsequently, after the robotic arm completes the canvas preparation, it directly executes the preset trajectory to stably and efficiently produce classic latte art patterns. This mode is highly suitable for rapid, standardized production during peak commercial periods.

[0229] like Figure 4 As shown in the system architecture diagram of the preset pattern recipe, when a user selects a preset latte art pattern (such as a three-layer tulip), the system loads the corresponding recipe file, such as tulip.recipe, from the preset pattern library through the recipe parser. This recipe file follows the "recipe script syntax".

[0230] (Starting with BEGIN_PATTERN, the system sequentially calls geometric primitive functions such as line (straight line), arc (arc), and spline (spline curve) via CALL commands, ending with END_PATTERN.) It includes a built-in geometric primitive call sequence, primitive parameters (such as line coordinates, arc center / radius / angle, spline curve control points and tension), and matching flow rate curve parameters. Simultaneously, the parameter manager retrieves preset parameters from the parameter library, such as basic dimensions, flow rate level (high / medium / low), and time rhythm (fast / slow), to supplement the primitive execution details. Subsequently, based on the above information, the execution engine sequentially calls primitive functions, calculates the Cartesian trajectory points at the robotic arm's end effector, synchronously generates an adapted flow rate curve, and quickly synthesizes executable trajectory instructions—by skipping the vectorization and fitting process of custom inputs and directly reusing predefined parameters, it achieves efficient trajectory generation, supporting standardized and rapid latte art production during peak commercial periods.

[0231] (2) Custom Image

[0232] When a user provides a free-form pattern via touchscreen, app, or other means, the control system initiates a fully automated processing flow, transforming the abstract brushstrokes into precise robotic movements:

[0233] The system receives the user-input custom image (e.g., a bitmap image containing hand-drawn lines), performs operations on the custom image including denoising, binarization, and skeleton extraction, and converts the pixelated lines into mathematically precise vector paths.

[0234] The algorithm scans along the vector path and identifies key nodes, including high curvature points and corner points, in the vector path. Using the key nodes as boundaries, the algorithm divides the entire complex vector path into several simple path segments. For each path segment, the system searches for and fits the best matching geometric primitive (straight line, arc, or spline curve) from the basic geometric primitive library. The originally free scribbles are transformed into a series of ordered and standardized geometric primitive sequences and associated primitive parameters.

[0235] The flow rate curve corresponding to the custom image is obtained based on a pre-established flow rate control model. The flow rate control model includes, but is not limited to, demonstration learning models, reinforcement learning models, physical simulation models, deep learning models, or combinations thereof.

[0236] like Figure 5 User input pattern processing flowchart and such Figure 6 As shown in the schematic diagram of the path segmentation and primitive fitting algorithm, when a user inputs a custom pattern (hand-drawn strokes or bitmap images) via a touchscreen or App, the system initiates a fully automatic processing flow: First, the input type is determined—if it is a hand-drawn stroke, the coordinates and pressure timing data of the stroke are directly collected; if it is a bitmap image, it undergoes denoising, binarization, and skeleton extraction preprocessing to convert pixel lines into mathematically precise vector paths. Next, the vector path is scanned and analyzed to identify key nodes such as high curvature points and corner points, thereby segmenting the complex path into several simple segments. Then, a primitive fitting loop is entered: for each path segment, the optimal primitive is matched from the basic geometric primitive library (straight lines, arcs, spline curves), and the primitive parameters (such as line endpoints, arc radii, and spline tension) are iteratively optimized until the fitting accuracy converges. After fitting, a standardized geometric primitive sequence + associated parameters are generated, and based on the flow velocity model learned from the demonstration, an appropriate flow velocity curve is assigned to each primitive. Finally, a latte art trajectory executable by the robotic arm is synthesized, achieving accurate conversion and restoration of the custom pattern.

[0237] Following step S2, the process further includes intelligent recognition and optimization of the input pattern, specifically:

[0238] A feasibility analysis was conducted on the converted geometric primitive sequence.

[0239] Automatically optimize primitive parameters based on the physical constraints of the actuator;

[0240] Multiple optimization options are available for users to choose from;

[0241] Supports real-time preview of optimization effects.

[0242] In this embodiment, the flow rate control model includes one or more of the following:

[0243] Demonstration-based learning models;

[0244] An adaptive model based on reinforcement learning;

[0245] Predictive models based on physical simulation;

[0246] Deep learning-based end-to-end models;

[0247] Fuzzy control model;

[0248] Expert system model;

[0249] Hybrid model architecture.

[0250] In step S2, for example, Figure 7 The flowchart for training the flow rate model based on demonstration learning is shown. It also includes the flow rate model that needs to be pre-trained, specifically:

[0251] During the demonstration data collection, a professional latte artist draws basic geometric primitives on an interactive flat panel and controls the milk foam flow rate in real time through a physical slider interactive control. The system synchronously records the path geometric features, including path curvature, path length, and turning angle, and records the flow rate sequence aligned with the geometric path features in time. The geometric features are bound to the corresponding flow rate values ​​to construct feature vectors, forming a set of associated samples of curvature-length-angle → flow rate.

[0252] Data preprocessing includes abnormal sample data cleaning, outlier detection, data normalization, and calculation of features including curvature change rate and angle change rate.

[0253] The model is trained and deployed by using a neural network to learn the mapping relationship between geometric feature sequences and flow velocity sequences. The output layer uses a linear activation function to predict flow velocity values. After training, the model with satisfactory performance is deployed as an inference engine and integrated into the flow velocity control system to support real-time reception of path geometric features and output of flow velocity prediction values.

[0254] During the latte art process, the system continuously evaluates the results and marks new latte art data as incremental learning samples for incremental training to improve the accuracy of flow rate prediction.

[0255] S3: Generate an execution path based on the control parameters.

[0256] In step S3, generating the execution path based on the control parameters includes generating a Cartesian path for the robotic arm based on the geometric primitive sequence and associated primitive parameters, and performing path optimization based on physical constraints, specifically:

[0257] The path planner performs path compilation of geometric primitives. It receives a sequence of geometric primitives, including lines, arcs, and spline curves, and compiles the sequence into a continuous path of P(t) = {X(t), Y(t), Z(t)} in Cartesian space, ordered by the time axis, for the robotic arm end effector.

[0258] Analyze the associated primitive parameters of each primitive to generate a discrete path point sequence;

[0259] To ensure smooth transition continuity, the initial path primitives are connected using methods including spline curve interpolation to ensure the continuity of velocity and acceleration at the primitive connections, achieving C2 continuity and preventing the robotic arm from shaking.

[0260] Post-path optimization with physical constraint awareness involves fine-tuning the initial path by considering one or more of the following physical constraints:

[0261] Fluid inertia constraint: Considering the inertia of milk foam flow, a transition arc is inserted at sharp turns;

[0262] Surface tension constraint: Optimize path height and velocity to maintain liquid surface stability;

[0263] Temperature-dependent constraints: Adjust flow rate and trajectory parameters based on milk foam temperature;

[0264] Gravity field constraint: to compensate for trajectory deviation due to container tilt angle;

[0265] Container boundary constraints: ensure that the trajectory does not exceed the container boundary;

[0266] Flow conservation constraint: Ensures that the milk foam is distributed reasonably in each part of the pattern.

[0267] like Figure 8 As shown in the diagram of the physics-constrained path optimization algorithm, the initial path generated by the geometry planner is merely a "draft." We add a post-optimization step to this. This step fine-tunes the path based on a simplified fluid model. For example, it reduces speed and flow velocity before entering sharp turns and plans a small-radius circular transition at the apex of the turn to counteract the inertia of the fluid. This "predictive" path correction is the key to ensuring "what you draw is what you get."

[0268] S4: Generate a control trajectory based on the execution path and execute it.

[0269] In step S4, the control trajectory is executed by an actuator, which includes, but is not limited to, the following structures:

[0270] A serial robotic arm with four to seven or more degrees of freedom;

[0271] Parallel mechanisms with three to six degrees of freedom;

[0272] Series-parallel hybrid mechanism;

[0273] The combination of a robotic arm and an auxiliary motion platform;

[0274] Collaborative robot systems;

[0275] The combination of SCARA robots and rotating platforms.

[0276] In this embodiment, as Figure 9 As shown in the geometry-to-physics action compilation system diagram, in step S4, the control trajectory is generated and executed according to the execution path, including: fusing the Cartesian path with the flow velocity curve, using a synchronous inverse solver to synchronously synthesize the executable control trajectory of the actuator through the time axis, driving the actuator to perform the latte art action according to the trajectory, and dynamically adjusting in combination with milk foam state feedback to complete the pattern drawing, specifically:

[0277] The Cartesian path and the flow velocity curve are fused and bound together. The X, Y, and Z coordinate sequences of the Cartesian path are aligned with the tilt angle of the associated flow velocity curve based on the total trajectory duration. Each spatial path point is bound to the corresponding tilt angle at that moment to generate a synchronized trajectory containing position, attitude, and flow velocity information, ensuring that the spatial movement of the robotic arm and the tilt angle change are synchronized and matched.

[0278] The synchronous trajectory is input into the robotic arm motion controller and converted into angle commands for the control degrees of freedom of the actuator through inverse kinematics calculation. During the calculation process, the following safety constraints are simultaneously adapted: the tilting angle is limited to a preset range, the rate of change of flow velocity is controlled within a preset threshold, and milk foam overflow or sudden changes in the flow field are avoided.

[0279] Drive the robotic arm to perform latte art movements according to the joint trajectory to complete the pattern drawing.

[0280] Furthermore, for user input seeking the ultimate artistic effect, after primitive fitting, we can selectively feed the primitive sequence into a GAN model. However, at this point, the GAN's role is no longer to create from scratch, but rather to "stylistically refine" the already structured geometric path, making it more consistent with the physical aesthetics of realistic latte art, before finally generating the trajectory. This provides a smooth transition from "stable reproduction" to "artistic creation."

[0281] Once the user-input custom pattern has completed primitive fitting and formed a structured geometric sequence, if the "Artistic Enhancement" mode is enabled, the system will trigger a GAN-style polishing process. Its core is not to reconstruct the pattern framework, but to inject "the physical beauty of real latte art" into the trajectory while preserving the core structure of the primitive sequence (outline, proportion, key nodes), thus achieving an advancement from "mechanical stable reproduction" to "artistic expression".

[0282] (1) The training logic of GAN: the dual constraints of art and physics

[0283] The training set of GAN deeply integrates the creative trajectory data of professional latte artists, covering the following data dimensions:

[0284] Artistic details: Record the "hidden features" of the latte art master's operation - such as the slight S-shaped vibration of the straight section (amplitude 0.2-0.5mm, frequency 5-10Hz, simulating the natural shaking of the wrist) and the asymmetrical curvature transition of the arc apex (curvature change rate is 10%-15% higher than the mechanical fitting value, reproducing the "smooth edge finishing").

[0285] Physical constraints: synchronous acquisition of flow velocity rhythm (e.g., nonlinear increase of flow velocity with curvature in a circular arc segment, dynamic adaptation of the rate of change to the inertia of milk foam), and robotic arm motion limits (joint acceleration ≤ 1 m / s²). 2 To avoid motor vibration), milk foam flow field parameters (the coupling relationship between air content, surface tension and trajectory, to ensure that the trajectory still meets the physical conditions of "no splashing and no accumulation" after polishing).

[0286] (2) Execution of stylistic refinement: Injecting details within the structured framework

[0287] GAN uses the fitted primitive sequence as the "base" (ensuring the core shape accuracy of the pattern is ≥95%), and achieves "controllable artistic transformation" through adversarial learning:

[0288] Geometric path optimization:

[0289] Straight line segment: Controllable disturbance (deviation ≤ 0.3mm) is superimposed on the endpoint coordinates to simulate the "natural pause when finishing a latte art piece";

[0290] Arc segment: Insert an extremely narrow transition arc (radius ≤ 1mm) to transform the curvature change from a "mechanical abrupt change" to a "smooth gradient drawn by hand";

[0291] Spline curves: Fine-tuning the tension at control points (change ≤ 0.1) enhances the "dynamic rhythm" of the curve.

[0292] (Such as the natural curling of the petal edges and the delicate transition of the leaf veins).

[0293] Collaborative optimization of flow velocity curves:

[0294] The slope gradient of the flow rate change is corrected (turning the "linear abrupt change" of mechanical fitting into "exponential gradual increase / decrease") to reproduce the "light and heavy, fast and slow" operation rhythm of the latte art master.

[0295] Embedded flow velocity abrupt change constraints (≤0.2ml / s) are dynamically adjusted based on the milk foam fluid model to ensure that artistic details do not disrupt the stability of the flow field.

[0296] (3) Smooth transition from “reproduction” to “creation”

[0297] After being refined by GAN, the primitive sequence achieves the dual effect of "structural conservation + artistic enhancement":

[0298] The core framework remains unchanged: the deviation between the pattern outline, key node position and the fitting result is ≤5%, ensuring that the user's design intent is not lost;

[0299] Artistic detail enhancement: The naturalness of line transitions is improved by 30%+, and the flow rhythm is more in line with the logic of handmade creation, giving the mechanical trajectory the "breathing feeling of handmade latte art";

[0300] Flexible scenario adaptation: It not only meets the basic needs of ordinary users for "stable reproduction", but also provides an "artistic upgrade" channel for users who pursue the ultimate, truly achieving a seamless integration of technical rationality and artistic sensibility.

[0301] The essence of this process is to enable automated systems to possess higher-level intelligence, such as "understanding artistic beauty and reproducing humanistic details," on top of their underlying ability of "precise execution."

[0302] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes innovative pattern generation based on machine learning, specifically:

[0303] Collect user-created patterns as training data;

[0304] Use Generative Adversarial Networks (GANs) to learn pattern styles;

[0305] Generate new creative patterns based on user preferences;

[0306] Supports style transfer and pattern blending;

[0307] Enable human-computer collaborative creation.

[0308] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes multimodal pattern input fusion, specifically:

[0309] Simultaneously accepts multiple input methods, including voice and gesture;

[0310] Cross-modal feature extraction and alignment;

[0311] Feature fusion based on attention mechanism;

[0312] Generate a unified representation of primitive sequences;

[0313] Resolve input ambiguity and conflicts.

[0314] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes adaptive actuator configuration, specifically:

[0315] Automatically detects the type and degrees of freedom of the connected actuators;

[0316] Load the corresponding kinematic model and constraints;

[0317] Optimize trajectory generation strategy based on institutional characteristics;

[0318] Supports hot-swapping and dynamic reconfiguration;

[0319] Compatible with future new types of execution mechanisms.

[0320] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes building a cloud-based pattern ecosystem, specifically:

[0321] Distributed storage of cloud-based pattern libraries;

[0322] Establish a copyright protection mechanism for user-created designs;

[0323] Utilizes blockchain-based transaction and authorization management;

[0324] Utilize community evaluation and recommendation algorithms;

[0325] AI-assisted pattern labeling and classification.

[0326] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes real-time physical simulation and preview, specifically:

[0327] GPU-accelerated fluid dynamics simulation;

[0328] Consider multiphysics coupling effects;

[0329] Real-time rendering preview of the latte art effect;

[0330] Automatically detect potential problems and issue warnings;

[0331] Provide parameter optimization suggestions.

[0332] Furthermore, the method for generating beverage latte art trajectories based on specific patterns also includes cross-domain application adaptation, specifically:

[0333] Apply latte art trajectory generation technology to other fields;

[0334] It is compatible with the properties of various materials, including chocolate, cream, and pigments.

[0335] Optimization algorithms are used to optimize different application scenarios;

[0336] Supports new applications including 3D printing and laser engraving;

[0337] Maintain the universality of the core algorithm.

[0338] Second Embodiment

[0339] like Figure 10 As shown, this embodiment provides a system for generating beverage latte art trajectories based on specific patterns for executing the method for generating beverage latte art trajectories based on specific patterns as described in the first embodiment, comprising:

[0340] Pattern input module 1 is used to receive pattern input;

[0341] Pattern parsing module 2 is used to parse the pattern input to obtain control parameters;

[0342] Path generation module 3 is used to generate an execution path based on the control parameters;

[0343] The trajectory execution module 4 is used to generate and execute a control trajectory based on the execution path.

[0344] Third Embodiment

[0345] This embodiment provides an economical solution based on a 4-axis SCARA robot, demonstrating the use of a low-cost SCARA robot to achieve latte art functionality.

[0346] System Configuration:

[0347] The SCARA robot provides XYZ translation + Z-axis rotation (4 degrees of freedom);

[0348] An additional tilting platform is provided to offer pitch angle control;

[0349] The total cost is only 40% of that of a 6-axis robot.

[0350] Trajectory adaptation strategy:

[0351] The algorithm automatically identifies the kinematic constraints of SCARA.

[0352] The 6-DOF trajectory is intelligently decomposed into a 4+1-DOF combination;

[0353] Prioritize ensuring the accuracy of the pattern outline, while moderately sacrificing pose flexibility;

[0354] The lack of degrees of freedom is compensated for by path planning.

[0355] Application effect:

[0356] It can complete more than 80% of common latte art patterns;

[0357] Especially suitable for flat patterns and simple three-dimensional shapes;

[0358] It meets the cost control needs of small and medium-sized coffee shops.

[0359] Fourth embodiment

[0360] This embodiment provides natural language-driven intelligent creation, and demonstrates a revolutionary language interaction mode:

[0361] Interaction flow:

[0362] The user said, "Draw me a happy sun, one that feels warm."

[0363] NLP Module Analysis: Subject = Sun, Emotion = Happiness, Atmosphere = Warmth;

[0364] Semantic mapping: Sun → circle + radiating lines, happy → upward arc (smiley face), warm → dense rays of light;

[0365] Primitive generation: circle(r=30) + arc(smiling eye) + lines(12 rays of light);

[0366] Parameter optimization: The light beams use a gradient length to create a dynamic effect.

[0367] Innovation advantages:

[0368] Zero-barrier creation, even the elderly and children can design;

[0369] Supports abstract concepts: "Draw the feeling of longing";

[0370] Multilingual support, adapting to the global market;

[0371] It can be combined with voice emotion analysis to enhance expressiveness.

[0372] Fifth Embodiment

[0373] This embodiment provides reinforcement learning-driven autonomous innovation, demonstrating the AI's ability to autonomously explore creative patterns:

[0374] Learning framework:

[0375] State space: Current primitive sequence + used primitive types;

[0376] Action Space: Add new primitives / modify parameters / delete primitives;

[0377] Reward function: Aesthetic score (symmetry, complexity, novelty) + user feedback.

[0378] Training process:

[0379] Initially, explore 1000 random pattern combinations;

[0380] Select the top 10% as excellent samples;

[0381] The characteristics of excellent samples guide subsequent exploration;

[0382] The strategy network is updated after every 1000 creations.

[0383] Innovative Achievements:

[0384] Discovering primitive combinations that humans had never imagined;

[0385] For example, the spiral-shaped structure produced by "spiral + fractal";

[0386] The aurora effect created by "Lissajous + gradient";

[0387] More than 50 innovative patterns are generated each month, enriching the pattern library.

[0388] Sixth Embodiment

[0389] This embodiment provides a method for creating large-scale patterns through multi-machine collaboration. This embodiment demonstrates how two 5-axis robots collaborate to create complex patterns:

[0390] Collaborative architecture:

[0391] Main robot: Responsible for the main outline of the pattern and filling large areas;

[0392] From the robot: responsible for detailed depiction and fine textures;

[0393] Central coordinator: Real-time synchronization of the positions of the two machines to avoid collisions.

[0394] Task allocation algorithm:

[0395] The complex pattern is broken down into two layers: "main body" and "decoration".

[0396] The drawing area is allocated based on reachability analysis;

[0397] Timing planning ensures efficient collaboration;

[0398] Supports dynamic task migration (in case of one machine failure).

[0399] Application scenarios:

[0400] Full-coverage pattern for extra-large cup sizes (>300ml);

[0401] Two-color latte art (two machines control different types of milk foam);

[0402] The visual impact of live performances;

[0403] Complex creations at the level of art exhibitions.

[0404] Seventh Embodiment

[0405] This embodiment provides a cross-domain technology migration application, demonstrating the application of the technology in other fields:

[0406] Chocolate carving:

[0407] Suitable for the temperature-sensitive properties of chocolate;

[0408] Track speed is linked to temperature control;

[0409] To prevent melting due to overheating or solidification due to overcooling,

[0410] 3D printing path planning:

[0411] Expand 2D patterns into 2.5D reliefs;

[0412] Layer-by-layer slicing and path optimization;

[0413] Supports switching between multiple materials.

[0414] Laser engraving applications:

[0415] Precise control of power, speed, and depth;

[0416] Parameter libraries for different materials;

[0417] Automatic setting of security boundaries.

[0418] Medical surgery planning:

[0419] High-precision path (error < 0.1mm);

[0420] Multiple security constraints;

[0421] Real-time force feedback integration.

[0422] A computer-readable storage medium stores computer code that, when executed, performs the methods described above. Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. This program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0423] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

[0424] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0425] It should be noted that the above embodiments can be freely combined as needed. The above description is only a preferred embodiment of the present invention. It should be pointed out that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for generating beverage latte art trajectories based on a specific pattern, characterized in that, Includes the following steps: S1: Receive pattern input; S2: Parse the pattern input to obtain control parameters; S3: Generate an execution path based on the control parameters; S4: Generate a control trajectory based on the execution path and execute it.

2. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, In step S4, the control trajectory is executed by an actuator, which includes, but is not limited to, the following structures: A serial robotic arm with four to seven or more degrees of freedom; Parallel mechanisms with three to six degrees of freedom; Series-parallel hybrid mechanism; The combination of a robotic arm and an auxiliary motion platform; Collaborative robot systems; The combination of SCARA robots and rotating platforms.

3. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, In step S1, receiving pattern input includes receiving user pattern input, including selecting a preset latte art pattern or inputting a custom latte art pattern, wherein the preset latte art pattern is a classic preset latte art pattern stored in the system pattern library, and the custom latte art pattern is non-standard graphic information input by the user. The methods of pattern input include, but are not limited to: Touchscreen hand-drawn input; Image file upload, supporting bitmap, vector, and CAD graphics; Natural language description, generating patterns through NLP parsing; Gesture recognition input is captured via a camera or sensor; 3D model projection: Projecting a three-dimensional model into a two-dimensional pattern; Audio feature mapping converts music rhythms into patterns; AR / VR spatial rendering; Brainwave pattern recognition.

4. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, The core logic of the beverage latte art trajectory generation method includes three levels: Basic Geometric Primitives Library: At its core is a library containing a variety of parametric geometric primitives, which are the most basic building blocks for constructing all complex patterns; Pattern Recipe System: Any classic preset latte art pattern is defined as a recipe file. The recipe file is a script that calls the functions corresponding to the geometric primitives in the basic geometric primitive library in a specific order, and assigns precise associated primitive parameters and matching flow rate curves to each geometric primitive; User input to primitive conversion pipeline: For custom latte art patterns that are not preset and are input by the user, a conversion pipeline is initiated to parse and approximate the custom latte art pattern as a combination of elements in the basic geometric primitive library, and assign the associated primitive parameters. Once the conversion is complete, the input is regarded as a temporary recipe file and is executed by the subsequent system.

5. The method for generating beverage latte art trajectories based on a specific pattern according to claim 4, characterized in that, The basic geometric primitive library includes, but is not limited to: Basic geometric primitives: lines, arcs, elliptical arcs, polygons, spirals; Parametric curves: spline curves, Bézier curves, B-splines, NURBS curves; Advanced primitives: fractal primitives, Lissajous figures, Fourier series curves; Three-dimensional space curves; User-defined function curves; Dynamically expandable primitive plugins.

6. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, In step S2, parsing the pattern input to obtain control parameters specifically involves: The input pattern is parsed. If it is the preset latte art pattern, the corresponding recipe file stored in the pattern recipe system is directly called to obtain the geometric primitive sequence, associated primitive parameters, and flow rate curve adapted to the recipe file. If it is the custom image, the input custom image is converted into a geometric primitive sequence and associated primitive parameters through vectorization, path segmentation, and primitive fitting. At the same time, the flow rate curve is obtained based on the flow rate control model of demonstration learning.

7. The method for generating beverage latte art trajectories based on a specific pattern according to claim 6, characterized in that, In step S2, if the preset latte art pattern is used, the corresponding recipe file stored in the pattern recipe system is directly called to obtain the geometric primitive sequence, associated primitive parameters, and flow rate curve adapted to the recipe file stored in the recipe file. Specifically: The user selects a pattern directly from the pattern library, and the system directly loads the corresponding recipe file from the pattern recipe system; The recipe file predefines the sequence of geometric primitives to be called, the precise associated primitive parameters of each primitive, and the suitable flow velocity curve to match them. The system directly calls the preset parameters, skipping the time-consuming vectorization and primitive fitting steps in user input processing, and quickly generates the final robot trajectory.

8. The method for generating beverage latte art trajectory based on a specific pattern according to claim 6, characterized in that, In step S2, if the input custom image is vectorized, path segmented, and primitive fitted, it is converted into a sequence of geometric primitives and associated primitive parameters. Simultaneously, a flow velocity curve is obtained based on the flow velocity control model learned through demonstration learning. Specifically: The system receives the user-inputted custom image and performs operations on the custom image, including denoising, binarization, and skeleton extraction, converting pixelated lines into mathematically precise vector paths. The algorithm scans along the vector path and identifies key nodes, including high curvature points and corner points, in the vector path. Using the key nodes as boundaries, the algorithm divides the entire complex vector path into several simple path segments. For each path segment, the system searches for and fits the best matching geometric primitive from the basic geometric primitive library. The original free scribbles are transformed into a series of ordered and standardized geometric primitive sequences and associated primitive parameters. The flow rate curve corresponding to the custom image is obtained based on a pre-established flow rate control model. The flow rate control model includes, but is not limited to, demonstration learning models, reinforcement learning models, physical simulation models, deep learning models, or combinations thereof.

9. The method for generating beverage latte art trajectories based on a specific pattern according to claim 6, characterized in that, Following step S2, the process further includes intelligent recognition and optimization of the input pattern, specifically: A feasibility analysis was conducted on the converted geometric primitive sequence. Automatically optimize primitive parameters based on the physical constraints of the actuator; Multiple optimization options are available for users to choose from; Supports real-time preview of optimization effects.

10. The method for generating beverage latte art trajectories based on a specific pattern according to claim 6, characterized in that, The flow rate control model includes one or more of the following: Demonstration-based learning models; An adaptive model based on reinforcement learning; Predictive models based on physical simulation; Deep learning-based end-to-end models; Fuzzy control model; Expert system model; Hybrid model architecture.

11. The method for generating beverage latte art trajectories based on a specific pattern according to claim 6, characterized in that, It also includes training the flow rate model learned in the demonstration, specifically: During the demonstration data collection, a professional latte artist draws basic geometric primitives on an interactive flat panel and controls the milk foam flow rate in real time through a physical slider interactive control. The system synchronously records the path geometric features, including path curvature, path length, and turning angle, and records the flow rate sequence aligned with the geometric path features in time. The geometric features are bound to the corresponding flow rate values ​​to construct feature vectors, forming a set of associated samples of curvature-length-angle → flow rate. Data preprocessing includes abnormal sample data cleaning, outlier detection, data normalization, and calculation of features including curvature change rate and angle change rate. The model is trained and deployed by using a neural network to learn the mapping relationship between geometric feature sequences and flow velocity sequences. The output layer uses a linear activation function to predict flow velocity values. After training, the model with satisfactory performance is deployed as an inference engine and integrated into the flow velocity control system to support real-time reception of path geometric features and output of flow velocity prediction values. During the latte art process, the system continuously evaluates the results and marks new latte art data as incremental learning samples for incremental training to improve the accuracy of flow rate prediction.

12. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, In step S3, generating the execution path based on the control parameters includes generating a Cartesian path for the robotic arm based on the geometric primitive sequence and associated primitive parameters, and performing path optimization based on physical constraints, specifically: The path planner receives a sequence of geometric primitives, including lines, arcs, and spline curves, and compiles the sequence into continuous path points P(t) = {X(t), Y(t), Z(t)} in Cartesian space ordered by the time axis at the end of the robotic arm. It also parses the associated primitive parameters of each primitive to generate a discrete path point sequence. To ensure smooth transition continuity, the initial path primitives are connected using methods including spline curve interpolation to ensure the continuity of velocity and acceleration at the primitive connections, achieving C2 continuity and preventing the robotic arm from shaking. Post-path optimization with physical constraint awareness involves fine-tuning the initial path by considering one or more of the following physical constraints: Fluid inertia constraint: Considering the inertia of milk foam flow, a transition arc is inserted at sharp turns; Surface tension constraint: Optimize path height and velocity to maintain liquid surface stability; Temperature-related constraints: Adjust flow rate and trajectory parameters based on milk foam temperature; Gravity field constraint: to compensate for trajectory deviation due to container tilt angle; Container boundary constraints: ensure that the trajectory does not exceed the container boundary; Flow conservation constraint: Ensures that the milk foam is distributed reasonably in each part of the pattern.

13. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, In step S4, generating a control trajectory based on the execution path and performing the following steps includes: fusing the Cartesian path with the flow velocity curve; using a synchronous inverse solver to synchronously synthesize an executable control trajectory for the actuator via the time axis; driving the actuator to perform the latte art action according to the trajectory; and dynamically adjusting based on milk foam status feedback to complete the pattern drawing. Specifically: The Cartesian path and the flow velocity curve are fused and bound together. The X, Y, and Z coordinate sequences of the Cartesian path are aligned with the tilt angle of the associated flow velocity curve based on the total trajectory duration. Each spatial path point is bound to the corresponding tilt angle at that moment to generate a synchronized trajectory containing position, attitude, and flow velocity information, ensuring that the spatial movement of the robotic arm and the tilt angle change are synchronized and matched. The synchronous trajectory is input into the robotic arm motion controller and converted into angle commands for the control degrees of freedom of the actuator through inverse kinematics calculation. During the calculation process, the following safety constraints are simultaneously adapted: the tilting angle is limited to a preset range, the rate of change of flow velocity is controlled within a preset threshold, and milk foam overflow or sudden changes in the flow field are avoided. Drive the robotic arm to perform latte art movements according to the joint trajectory to complete the pattern drawing.

14. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, It also includes innovative pattern generation based on machine learning, specifically: Collect user-created patterns as training data; Use Generative Adversarial Networks (GANs) to learn pattern styles; Generate new creative patterns based on user preferences; Supports style transfer and pattern blending; Enable human-computer collaborative creation.

15. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, It also includes multimodal pattern input fusion, specifically: Simultaneously accepts multiple input methods, including voice and gesture; Cross-modal feature extraction and alignment; Feature fusion based on attention mechanism; Generate a unified representation of primitive sequences; Resolve input ambiguity and conflicts.

16. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, This also includes configuring adaptive actuators, specifically: Automatically detects the type and degrees of freedom of the connected actuators; Load the corresponding kinematic model and constraints; Optimize trajectory generation strategy based on institutional characteristics; Supports hot-swapping and dynamic reconfiguration; Compatible with future new types of execution mechanisms.

17. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, This also includes building a cloud-based pattern ecosystem, specifically: Distributed storage of cloud-based pattern libraries; Establish a copyright protection mechanism for user-created designs; Utilizes blockchain-based transaction and authorization management; Utilize community evaluation and recommendation algorithms; AI-assisted pattern labeling and classification.

18. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, It also includes real-time physics simulation and preview, specifically: GPU-accelerated fluid dynamics simulation; Consider multiphysics coupling effects; Real-time rendering preview of the latte art effect; Automatically detect potential problems and issue warnings; Provide parameter optimization suggestions.

19. The method for generating beverage latte art trajectories based on a specific pattern according to claim 1, characterized in that, This also includes cross-domain application adaptation, specifically: Apply latte art trajectory generation technology to other fields; It is compatible with the properties of various materials, including chocolate, cream, and pigments. Optimization algorithms are used to optimize different application scenarios; Supports new applications including 3D printing and laser engraving; Maintain the universality of the core algorithm.

20. A system for generating latte art trajectories based on a specific pattern for performing the method for generating latte art trajectories based on a specific pattern as described in any one of claims 1-19, characterized in that, include: Pattern input module, used to receive pattern input; The pattern parsing module is used to parse the pattern input to obtain control parameters; The path generation module is used to generate an execution path based on the control parameters; The trajectory execution module is used to generate and execute a control trajectory based on the execution path.

Citation Information

Cited By

  • Robot task processing method and system for coffee latte

    CN121223813A

  • Robot drawing path generation method and system based on image recognition

    CN121424405A