Information processing system

CN122800128APending Publication Date: 2026-09-22SOFTBANK GROUP CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610326695.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-03-19
Filing Date
2026-03-17
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0003]现有的饮食推荐及食材管理技术中,通常仅基于用户的基础属性或营养需求提供静态的菜谱推荐,无法同时综合考虑家庭构成、必要营养素、热量目标、个体化的饮食偏好及过敏信息,从而难以及时为家庭整体提供符合健康需求和口味偏好的饮食方案

Benefits of technology

服务器在本发明中通过以下方式对计算机技术进行改进:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122800128A_ABST
    Figure CN122800128A_ABST
Patent Text Reader

Abstract

The present application provides an information processing system. An information processing system, comprising a processor configured to: receive input information including family composition, essential nutrients, calories, user's dietary preference information, user's allergy information, and user's emotional state information; generate prompt information for instructing a generative artificial intelligence model to propose a dietary menu plan based on the input information; determine insufficient ingredients according to the menu plan proposed by the generative artificial intelligence model and the ingredients information held by the user, and automatically place an order for the insufficient ingredients if necessary; and display the generated menu plan through a user interface and provide the menu plan in a form that can be ordered through a take-out service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The technology disclosed herein relates to an information processing system. Background Technology

[0002] Japanese Patent Application Publication No. 2022-180282 discloses a method for controlling a role-based chatbot executed by at least one processor. The method includes the following steps: receiving a user's speech; adding the user's speech to a prompt word, the prompt word containing instruction statements associated with an explanation of the chatbot's role; encoding the prompt word; and inputting the encoded prompt word into a language model to generate a chatbot response to the user's speech.

[0003] Existing dietary recommendation and ingredient management technologies typically provide static recipe recommendations based solely on users' basic attributes or nutritional needs. They fail to comprehensively consider family composition, essential nutrients, calorie targets, individual dietary preferences, and allergy information, making it difficult to provide timely dietary plans that meet the health needs and taste preferences of the entire family. Furthermore, existing systems rely heavily on users manually searching and selecting recipes, lacking automatic comparison of existing ingredient inventory and intelligent replenishment functions for insufficient ingredients. This leads to frequent ingredient shortages or duplicate purchases during actual cooking or ordering, impacting ease of use and ingredient utilization efficiency. Moreover, existing technologies largely neglect users' emotional states, failing to recommend ingredients and menus that help reduce stress or share joy based on factors such as stress levels and happiness, thus hindering their positive role in emotional care and psychological comfort. Additionally, the integration between existing dietary recommendation systems and food delivery services is weak, requiring users to switch between multiple platforms and manually place orders, a cumbersome process that detracts from the overall dining experience. Therefore, there is an urgent need for a system that can integrate multi-dimensional user information, automatically generate personalized menu options, link inventory management and automatic ingredient ordering, and seamlessly connect with food delivery services, while also taking into account the needs of emotional state regulation, in order to improve the intelligence of food recommendations and user experience. Summary of the Invention

[0004] To address the aforementioned issues, this invention provides an information processing system comprising a processor configured to: receive input information including family composition, essential nutrients, calories, user dietary preferences, user allergy information, and user emotional state information; generate prompts based on the input information to instruct a generative artificial intelligence model to propose a menu plan; and input the prompts into the generative artificial intelligence model to obtain a personalized menu plan tailored to a specific user and family situation. The processor is further configured to: compare the menu plan proposed by the generative artificial intelligence model with the user's stored ingredient information, automatically calculating the total amount of ingredients required for each recipe; identify any deficient ingredients in the user's current inventory during the comparison process, determine the corresponding shortage quantity, and automatically send an order request to a pre-set e-commerce platform or fresh food delivery service when the shortage exceeds a predetermined threshold to automatically order the missing ingredients. The processor is also configured to: visualize the generated menu plan through a user interface and convert each dish into structured order information that can be directly ordered through a food delivery service platform, allowing users to view the menu and place orders within the same system interface, thereby achieving linkage between menu recommendations and food delivery services. Furthermore, the processor can enhance the emotional dimension of the prompts provided by the generative AI model based on user input or automatically acquired emotional state information. For example, when a user is under high stress, the model is guided to prioritize ingredients and recipes with soothing, mild, and easily digestible characteristics associated with stress reduction. When a user is in a joyful or celebratory state, the model is guided to prioritize recipes and ingredient combinations suitable for sharing joy and gatherings. Further, the processor can also constrain and optimize menu schemes based on specific goals (such as weight loss, muscle gain, disease recovery, etc.). By adding parameters such as target calorie range, nutrient ratio, and target timeframe to the prompts, the recipes output by the generative AI model not only meet the user's health goals but also take into account family composition, dietary preferences, and emotional state. This enables a unified solution for personalized nutrition management, emotional care, inventory management, and ingredient procurement on a single platform.

[0005] "System" refers to an overall device or platform consisting of one or more hardware and / or software modules, which is capable of performing the functions described in this invention, including information receiving, processing, menu generation, inventory comparison, automatic ordering, and result output.

[0006] A processor is a hardware unit or its logical equivalent unit used to execute computer program instructions to complete data processing and control flow. It can be a single central processing unit, multiple processing cores, application-specific integrated circuits, programmable logic devices, or any combination thereof.

[0007] "Family composition" refers to the collection of information about the number of family members associated with a user, their age, gender, activity level, and other attributes related to dietary needs, which is used to determine overall dietary needs and menu options.

[0008] "Essential nutrients" refer to the nutrients that users and their family members need to consume within a certain period of time to meet their health needs, including but not limited to protein, fat, carbohydrates, dietary fiber, vitamins, minerals, and trace elements.

[0009] "Calories" refer to the energy value obtained from food that can be metabolized and utilized by the human body. They are usually measured in kilocalories (kcal) or kilojoules (kJ) and are used to constrain and evaluate the energy intake level of a diet menu.

[0010] "User's dietary preference information" refers to various information that reflects the degree of dietary preferences of users and their family members, including but not limited to favorite ingredients, disliked ingredients, preferred cooking methods, preferred flavor types, and preferences for specific cuisines.

[0011] "User allergy information" refers to the recorded information about food ingredients, additives and their related components that have caused adverse reactions or allergic reactions in the user or family members. This information is used to exclude food ingredients and recipes containing these allergens during the menu generation process.

[0012] "User's emotional state information" refers to relevant data that reflects the user's current or recent psychological and emotional state, including but not limited to stress level, level of pleasure, level of anxiety, fatigue, and emotional labels such as celebration or sadness, which can be actively input by the user or inferred by an external system.

[0013] "Input information" refers to the general term for various data that are directly input by the user or provided by an external system and received by the processor, including family composition, essential nutrients, calories, user's dietary preferences, user's allergy information, and user's emotional state information, etc.

[0014] "Generative artificial intelligence models" refer to artificial intelligence models that can automatically generate text, structured data, or other forms of output based on input prompts, including but not limited to large language models, generative adversarial network models, variational autoencoder models, and their improved forms.

[0015] "Prompt information" refers to text or structured instructions that are constructed by the processor based on the input information and provided to the generative artificial intelligence model to constrain or guide the generative artificial intelligence model to output a diet menu plan that meets specific conditions.

[0016] A “dietary menu plan” refers to a set of recipes and their arrangement schemes generated by a generative artificial intelligence model or processor to guide users in eating. It includes information such as the name of the dish, the ingredients used, the amount, the expected calories and nutritional composition, and can be arranged by time period or meal.

[0017] "Menu plan" refers to the same concept as "dietary menu plan". It is a dietary arrangement result that is generated based on input information and contains one or more recipes. It is used to provide users with dining references or a basis for placing orders directly.

[0018] "Ingredient information held by the user" refers to a set of data related to the user's current actual food inventory, including the name, quantity, unit of measurement, and optional shelf life or purchase time of each ingredient.

[0019] "Insufficient ingredients" refers to ingredients that are partially or completely missing when the total amount of ingredients required is calculated based on the generated menu and compared with the user's current inventory.

[0020] "Automatic order placement" refers to the process where, without requiring users to manually enter order details one by one, the processor automatically generates an order request based on the determined shortage of ingredients and the quantity needed, and sends the request to a pre-set e-commerce platform, fresh food delivery platform, or supplier system to complete the purchase process of the corresponding ingredients.

[0021] "User interface" refers to the graphical or text interface through which users interact with the system, including but not limited to mobile application interfaces, web page interfaces, desktop application interfaces, and voice interaction interfaces, used to display menu options, inventory information, and order information, and to receive user input.

[0022] "Food delivery service" refers to third-party service platforms or systems that provide food delivery or ready-made meal delivery, including online food ordering platforms, delivery service providers and their related interfaces, used to deliver ready-to-eat or semi-finished food to users according to menu plans.

[0023] "Ordering via food delivery service" refers to converting the generated food menu into structured data compatible with the order format of the food delivery service platform, enabling users to directly generate and submit orders on the platform based on the menu.

[0024] "Specific goals" refer to the health or body shape goals that users hope to achieve through dietary adjustments within a certain period, including but not limited to weight loss, weight gain, maintaining weight, muscle gain, blood sugar control, blood lipid control, or promoting recovery.

[0025] "Ingredient inventory" refers to the collection of all ingredients that a user actually holds at a certain point in time and that can be used for cooking or consumption, including information such as the quantity, unit, and storage status of each ingredient.

[0026] "Ingredient inventory management" refers to the process by which the processor calculates and records the demand, inventory, and shortage of each ingredient based on the menu scheme and the ingredient information held by the user, and makes replenishment suggestions or automatic order control accordingly.

[0027] "Stress-reducing foods" refer to foods that, based on knowledge of nutrition, dietary habits, and mood regulation, are believed to help relieve tension, improve sleep, or reduce anxiety. These include, but are not limited to, foods rich in specific nutrients, with a soothing taste, or foods traditionally considered to have a calming effect.

[0028] "Ingredients for sharing joy" refers to ingredients suitable for use in gatherings, celebrations, or joyful occasions, which can enhance the social atmosphere and improve the pleasant experience, including but not limited to ingredients that are suitable for sharing by many people, have good visual effects, or have festive symbolic meaning. Attached Figure Description

[0029] Figure 1 This is a conceptual diagram illustrating an example of the configuration of the data processing system according to the first embodiment.

[0030] Figure 2 This is a conceptual diagram illustrating an example of the main functions of the data processing apparatus and smart device according to the first embodiment.

[0031] Figure 3 This is a conceptual diagram illustrating an example of the configuration of the data processing system according to the second embodiment.

[0032] Figure 4 This is a conceptual diagram illustrating an example of the main functions of the data processing device and smart glasses according to the second embodiment.

[0033] Figure 5 This is a conceptual diagram illustrating an example of the configuration of the data processing system according to the third embodiment.

[0034] Figure 6 This is a conceptual diagram illustrating an example of the main functions of the data processing apparatus and head-mounted terminal according to the third embodiment.

[0035] Figure 7 This is a conceptual diagram illustrating an example of the configuration of the data processing system according to the fourth embodiment.

[0036] Figure 8 This is a conceptual diagram illustrating an example of the main functions of the data processing device and robot according to the fourth embodiment.

[0037] Figure 9 This represents an emotion map that maps multiple emotions.

[0038] Figure 10 This represents an emotion map that maps multiple emotions.

[0039] Figure 11 This is a sequence diagram illustrating the processing flow of the data processing system of the first embodiment.

[0040] Figure 12 This is a sequence diagram illustrating the processing flow of the data processing system in Application Example 1.

[0041] Figure 13 This is a sequence diagram illustrating the processing flow of the data processing system of the second embodiment.

[0042] Figure 14 This is a sequence diagram illustrating the processing flow of the data processing system in Application Example 2. Detailed Implementation

[0043] Hereinafter, an example of an implementation of the system according to the present disclosure will be described with reference to the accompanying drawings.

[0044] First, let me explain the terminology used in the following instructions.

[0045] In the following embodiments, the processor (hereinafter referred to as "processor") with reference numerals may be a single computing device or a combination of multiple computing devices. Furthermore, the processor may be a single computing device or a combination of multiple computing devices. Examples of computing devices include CPU (Central Processing Unit), GPU (Graphics Processing Unit), GPGPU (General-Purpose computing on Graphics Processing Units), APU (Accelerated Processing Unit), etc.

[0046] In the following embodiments, RAM (Random Access Memory), as indicated in the figures, is a memory that temporarily stores information and is used as working memory by the processor.

[0047] In the following embodiments, the memory, as indicated by the reference numerals, is one or more non-volatile storage devices that store various programs and parameters. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), disks (e.g., hard disks), or magnetic tapes.

[0048] In the following embodiments, the communication I / F (Interface) with reference numerals is an interface that includes a communication processor and an antenna, etc. The communication I / F is responsible for communication between multiple computers. As an example of a communication specification applicable to the communication I / F, wireless communication specifications such as 5G (5th Generation Mobile Communication System), Wi-Fi (wireless fidelity) (registered trademark), or Bluetooth (registered trademark) can be listed.

[0049] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B". That is, "A and / or B" means that it can be only A, only B, or a combination of A and B. Furthermore, in this specification, when "and / or" connects to express more than three items, the same interpretation as "A and / or B" applies.

[0050] First Implementation Method Figure 1 An example of the configuration of the data processing system 10 according to the first embodiment is shown.

[0051] like Figure 1 As shown, the data processing system 10 includes a data processing device 12 and an intelligent device 14. A server can be cited as an example of the data processing device 12.

[0052] The data processing apparatus 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" as understood in this disclosure. The computer 22 includes a processor 28, RAM 30, and memory 32. The processor 28, RAM 30, and memory 32 are connected to a bus 34. Furthermore, the database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0053] The smart device 14 includes a computer 36, a receiving device 38, an output device 40, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, RAM 48, and memory 50. The processor 46, RAM 48, and memory 50 are connected to a bus 52. In addition, the receiving device 38, output device 40, camera 42, and communication I / F 44 are also connected to the bus 52.

[0054] The receiving device 38 includes a touchscreen 38A and a microphone 38B, and receives user input. The touchscreen 38A receives user input via touch by detecting contact with an indicator (e.g., a pen or finger). The microphone 38B receives user input via sound by detecting the user's voice. The control unit 46A in the processor 46 sends data representing the user input received by the touchscreen 38A and microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the data representing the user input.

[0055] The output device 40 includes a display 40A and a speaker 40B, and presents data to the user 20 by outputting data in a form perceptible to the user 20 (e.g., sound and / or text). The display 40A displays visual information such as text and images according to instructions from the processor 46. The speaker 40B outputs sound according to instructions from the processor 46. The camera 42 is a small digital camera equipped with an optical system such as a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.

[0056] Communication I / F44 is connected to network 54. Communication I / F44 and 26 are responsible for sending and receiving various information between processor 46 and processor 28 via network 54.

[0057] Figure 2 The diagram shows an example of the main functions of the data processing device 12 and the smart device 14.

[0058] like Figure 2 As shown, in the data processing apparatus 12, specific processing is performed by the processor 28. A specific processing program 56 is stored in the memory 32. The specific processing program 56 is an example of a "program" as understood in this disclosure. The processor 28 reads the specific processing program 56 from the memory 32 and executes the read specific processing program 56 on the RAM 30. Specific processing is implemented by the processor 28 operating as a specific processing unit 290 according to the specific processing program 56 executed on the RAM 30.

[0059] The memory 32 stores a data generation model 58 and an emotion-specific model 59. The data generation model 58 and the emotion-specific model 59 are used by the specific processing unit 290. The specific processing unit 290 can use the emotion-specific model 59 to infer the user's emotions and perform specific processing based on the user's emotions. In the emotion inference function (emotion-specific function) using the emotion-specific model 59, various inferences and predictions related to the user's emotions are performed, including inferences and predictions of the user's emotions, but this is not limited to this example. Furthermore, emotion inference and prediction may also include, for example, emotion analysis (parsing).

[0060] In the smart device 14, the processor 46 performs the acceptance output processing. The memory 50 stores the acceptance output program 60. The acceptance output program 60 is used in conjunction with the data processing system 10 and the specific processing program 56. The processor 46 reads the acceptance output program 60 from the memory 50 and executes the read acceptance output program 60 on the RAM 48. The acceptance output processing is implemented by the processor 46 acting as the control unit 46A according to the acceptance output program 60 executed on the RAM 48. Furthermore, the smart device 14 has the same data generation model and emotion-specific model as the data generation model 58 and the emotion-specific model 59, and these models can also be used to perform the same processing as the specific processing unit 290. The acceptance output processing is implemented by the processor 46 acting as the control unit 46A according to the acceptance output program 60 executed on the RAM 48.

[0061] Alternatively, other devices besides the data processing device 12 may also have the data generation model 58. For example, a server device (e.g., a generation server) may have the data generation model 58. In this case, the data processing device 12 obtains the processing results (prediction results, etc.) using the data generation model 58 by communicating with the server device that has the data generation model 58. Furthermore, the data processing device 12 may be a server device or a user-held terminal device (e.g., a mobile phone, robot, home appliance, etc.). Next, an example of the processing of the data processing system 10 of the first embodiment will be described.

[0062] Example 1 The flow of a specific process in Example 1 will be described. Each part of the system described below is implemented by the data processing device 12 and the smart device 14. Furthermore, the data processing device 12 is referred to as the "server," and the smart device 14 is referred to as the "terminal."

[0063] In existing technologies, solutions that use computing devices to generate meal plans for users are typically based on simple calorie recommendations or empirical rules. Their ability to comprehensively process multi-source information such as family composition, overall nutritional status, individual energy constraints, dietary preferences, and limitations is limited, making it difficult to reflect this in the specific menu structure in a timely manner. Furthermore, existing systems are mostly based on fixed rule engines, lacking structured analysis and automatic correction mechanisms for the output of generative artificial intelligence models. This results in unreliable guarantees regarding the nutritional balance, total energy control, and consistency with health management goals in the generated menus. Moreover, existing solutions generally fail to incorporate emotional state information into the meal plan generation logic at the system level, making it impossible to adjust the menu structure based on the user's emotional state, thus limiting the improvement of the human-computer interaction experience. Additionally, existing systems lack sufficient linkage between meal plan generation, ingredient inventory management, and automatic ordering processes. They cannot perform refined calculations of ingredient requirements and differential estimations for the generated menus, and lack a unified processing architecture to directly convert the generated results into executable procurement operations.

[0064] From a computer technology perspective, existing technologies suffer from the following main problems: First, the interaction between the server and the generative artificial intelligence model is limited to simple text transmission, lacking mechanisms for programmatic construction, iterative optimization, and linkage with nutritional calculation results for "prompt statements," making it difficult to form a closed-loop optimization in the calculation process. Second, the server lacks a universal structured parsing and data modeling process for generative natural language menus, making it impossible to perform unified data representation and batch calculations on multi-day, multi-meal menus at the computational level, reducing the system's scalability and maintainability. Third, the nutritional component and energy calculation logic on the server side is isolated from the external generation model, failing to establish an automatic feedback path between the nutritional database and the generated results, making it difficult to achieve automatic correction and regeneration control of the model output. Fourth, the server lacks well-coupled algorithms and data flow mechanisms between food inventory data, the total amount of required ingredients, and external supply services, making it impossible to complete the end-to-end processing flow from "conditional input—menu generation—nutritional calculation—inventory difference calculation—automatic ordering—interface presentation" under a unified software architecture. Therefore, it is necessary to provide a new system and its computational processing method to improve the calling strategy of generative artificial intelligence models, text parsing algorithms, nutritional calculation and feedback algorithms, and inventory and order placement linkage logic on the server side, thereby improving the overall technical capabilities and processing efficiency of computing devices in the scenario of diet plan generation and execution.

[0065] The specific processing performed by the specific processing unit 290 of the data processing apparatus 12 in Embodiment 1 is achieved by the following means.

[0066] In this invention, the server includes: a module for receiving user-related information, including family composition information, nutritional condition information, energy condition information, preference condition information, restriction condition information, and emotional state information, via an information processing terminal, and storing the user-related information in a data storage device using a communication device; a module for obtaining the user-related information from the data storage device, automatically constructing prompt statements based on the user-related information to instruct a generative artificial intelligence model to generate a diet plan, sending query data containing the prompt statements to a generative artificial intelligence model providing device, and obtaining natural language text representing candidates for multi-day or predetermined-period diet plans from the generative artificial intelligence model providing device; a module for performing programmed string parsing processing on the natural language text obtained from the generative artificial intelligence model, converting the natural language text into structured menu data that is differentiated by date unit and meal unit and includes meal item information, meal name information, and ingredient information; and a module for performing dosage estimation and nutrient content calculation processing on each ingredient in the structured menu data, referring to an ingredient attribute database containing nutrient content information and energy content information, calculating the total energy content and nutrient content by meal unit and by day unit, and determining the total energy content. A module for determining whether the amount of nutrients falls within the allowable range specified by the nutritional condition information and the energy condition information; a module for automatically correcting the structured menu data according to predetermined adjustment rules by changing the meal item information or ingredient composition information when the total energy amount or the amount of nutrients deviates from the allowable range, based on the determination result; or generating additional prompt statements containing convergence conditions to the allowable range and calling the generative artificial intelligence model again to regenerate part of the diet plan, thereby updating the structured menu data and determining menu data suitable for the user's relevant information; a module for determining whether the amount of nutrients falls within the allowable range specified by the nutritional condition information and the energy condition information based on the determination result; a module for automatically correcting the structured menu data by changing the meal item information or ingredient composition information according to predetermined adjustment rules when the total energy amount or the amount of nutrients deviates from the allowable range, or generating additional prompt statements containing convergence conditions to the allowable range and calling the generative artificial intelligence model again to regenerate part of the diet plan, thereby updating the structured menu data and determining menu data suitable for the user's relevant information based on input from the information processing terminal or based on the data from the information processing terminal. The module includes a product identification information module that registers the user's food inventory information into the data storage device, calculates the required quantity of each food item for a predetermined period based on the determined menu data, compares the required quantity with the food inventory information to calculate the insufficient quantity of each food item and identify the insufficient food item; and a module that generates purchase candidate information containing the insufficient food item and its insufficient quantity, sends the purchase candidate information to an external supply service device via a communication device to automatically or semi-automatically execute the ordering process, and simultaneously displays the menu data and the purchase candidate information through a user interface in a form that can be ordered in the external service.This enables the formation of an end-to-end computing process within the server, encompassing multi-source user-related information collection, intelligent construction of prompt statements, generative artificial intelligence model invocation, natural language menu structured parsing, automatic calculation and feedback correction of nutrition and energy, inventory difference calculation, and automatic ordering of external supply services. This achieves unified modeling and automatic control of the diet plan generation and execution process, thereby substantially improving the data processing capabilities, resource utilization efficiency, and human-computer interaction experience of computing devices in this technological field.

[0067] "User-related information" refers to a collection of various types of information related to a specific user and their family that are used to generate a diet plan. This includes at least information on family composition, nutritional conditions, energy conditions, preferences, limitations, and emotional state.

[0068] "Family composition information" refers to information that describes the overall dietary needs of a family, including the number of family members, their types, age groups, genders, and roles.

[0069] "Nutritional condition information" refers to conditional information used to constrain or guide the intake of various nutrients in a diet plan, including target intakes, recommended ranges, or restrictions for nutrients such as protein, fat, carbohydrates, vitamins, minerals, and dietary fiber.

[0070] "Energy condition information" refers to conditional information used to control the level of food calorie intake, such as the target value, allowable error range, and upper or lower limit of total daily or meal energy intake.

[0071] "Preference information" refers to information that reflects a user's dietary preferences, including preferred cuisine, flavor, cooking methods, and commonly used ingredients.

[0072] "Conditional information" refers to information used to exclude or restrict specific ingredients, components, or cooking methods, including allergy information, religious or ethical taboos, and dietary restrictions due to health reasons.

[0073] "Emotional state information" refers to relevant information that indicates the user's current or recent psychological and emotional state. It is used to consider the emotional regulation needs during the diet plan generation process, such as stress level, mood, anxiety level, or expected emotional effects.

[0074] "Information processing terminal" refers to a computing device used to interact with a server and to present user input and output, including but not limited to smartphones, tablet computers, personal computers and other electronic terminals with network communication and graphical interface functions.

[0075] "Data storage device" refers to a data storage resource used to store user-related information, structured menu data, food inventory information, and other intermediate processing results in a structured or unstructured form, including database systems, storage servers, or other persistent storage media.

[0076] "Communication device" refers to a communication module or communication interface used for sending and receiving data between servers, information processing terminals and external service devices, including network interface cards, communication protocol stacks and software components that work with them.

[0077] "Generative artificial intelligence models" refer to artificial intelligence models that are based on machine learning or deep learning techniques and are able to generate natural language text or other content based on input prompts. These models include at least those that use neural network structures to represent input and output text sequences that meet semantic conditions.

[0078] "Prompt statements" refer to natural language text constructed by the server based on user-related information, used to instruct generative artificial intelligence models to generate diet plans that meet predetermined conditions.

[0079] "Generative AI model provider" refers to a computing device or service system that is deployed and provides generative AI model inference services to external users. It is used to receive query data, perform model inference, and return the generated natural language text.

[0080] "Natural language text" refers to string content expressed in human natural language, output by a generative artificial intelligence model, and in this invention, it specifically includes textual information describing candidate dietary plans for multiple days or a predetermined period.

[0081] "String parsing and processing" refers to the procedural analysis and processing of natural language text, including segmenting, tagging, extracting, and transforming text based on predefined rules or patterns to obtain structured data representations.

[0082] "Structured menu data" refers to the conversion of a meal plan described in natural language into a data structure with clearly defined fields and hierarchical relationships. It includes at least meal item information, meal name information, and ingredient information, which are distinguished by date and meal unit.

[0083] "Meal Item Information" refers to the identification information and related attribute information of specific dishes or combination meals on a specific date and during a specific meal time, used to indicate the specific dietary content provided for a particular meal.

[0084] "Meal name information" refers to the name information used to identify a specific meal item, including dish name, set meal name, or other text labels used to identify the meal item.

[0085] "Ingredient information" refers to the information on the types of ingredients that make up each meal item and their related attributes, including ingredient name, unit, typical dosage, or index information related to nutrient calculation.

[0086] A "food attribute database" refers to a collection of data that stores nutritional and energy information of various food ingredients. It is usually stored in the form of tables or records, showing the energy and nutrient content of each food ingredient per unit weight or volume.

[0087] "Usage estimation" refers to the process of estimating the actual amount of ingredients used in a dish or meal based on typical dining patterns or preset rules when a precise recipe is not available.

[0088] "Nutritional content calculation and processing" refers to the process of calculating the calories and total amount of various nutrients of each ingredient and its combination at the level of a meal or day, based on the amount of ingredients used and the database of ingredient attributes.

[0089] "Permissible range" refers to the acceptable range of values ​​for total energy and the amount of each nutrient, as defined by nutritional and energy information. This includes the fluctuation range around the target value or hard upper and lower limits.

[0090] "Adjustment rules" refer to a set of predefined rules used to automatically modify the information on the menu items or ingredients when the menu data does not meet the allowed range. These rules include strategies such as replacing dishes, adjusting quantities, and adding or removing ingredients with specific nutritional components.

[0091] "Additional prompts" refer to the addition of new natural language text to the initial prompts, including constraints on energy and nutrients, convergence conditions, or local adjustment requirements, to guide the generative artificial intelligence model to regenerate parts of the diet plan.

[0092] "Menu data" refers to the set of data that, after generation, structured parsing, nutritional calculation, and necessary adjustments, is finally determined and used to guide ingredient calculations and to present dietary plans to users.

[0093] "Ingredient inventory information" refers to the inventory data of various ingredients currently held by the user, including the types, quantities, and units, which is used to compare with the required ingredient quantities in the menu data.

[0094] "Required quantity" refers to the total demand calculated cumulatively for each ingredient within a predetermined period based on the defined menu data, used to represent the quantity of ingredients required to implement the aforementioned diet plan.

[0095] "Insufficient quantity" refers to the difference between the required quantity and the inventory quantity of each ingredient after comparing the required quantity with the ingredient inventory information. When the required quantity is greater than the inventory quantity, this difference is used to represent the shortage.

[0096] "Insufficient ingredients" refers to the types of ingredients that are determined to be in short supply based on insufficient quantity calculations, that is, the required quantity of ingredients is greater than the existing inventory quantity.

[0097] "Purchase candidate information" refers to a data set generated based on insufficient ingredients to guide subsequent ordering or procurement operations. It includes at least the identifier of each insufficient ingredient and the corresponding insufficient quantity, and may also include information on suggested packaging specifications or alternative solutions if necessary.

[0098] "External supply service devices" refers to external service systems that provide services such as food or meal delivery and sales, including online shopping platforms, delivery service systems, or other third-party supply service devices.

[0099] "Order processing" refers to the process of converting purchase candidate information into specific order requests, submitting them, and completing order generation and confirmation through data communication with external supply service devices. It can be executed fully automatically or semi-automatically.

[0100] "User interface" refers to the human-computer interaction interface used to present menu data, purchase candidate information and related control options to users, including graphical interfaces, text interfaces or hybrid interfaces displayed on information processing terminals or other display devices.

[0101] This invention will focus on servers, terminals, and users, providing a detailed description of the system composition, data structure, algorithm flow, and specific usage of the generative artificial intelligence model. This invention is not limited to the specific embodiments described below; various modifications and substitutions can be made without departing from the spirit of the invention.

[0102] I. Overall System Composition Servers, as the core processing units, are typically deployed in data centers or cloud computing environments and can consist of multiple processing nodes. A server includes at least one processor, main memory, a network interface, and data storage. The processor can be a combination of a general-purpose central processing unit (CPU) or a graphics processing unit (GPU). The server runs a server operating system and deploys backend applications on it, such as service programs implemented in Python, using backend frameworks like Django, Flask, or FastAPI.

[0103] A terminal, as a user interaction device, can be a smartphone, tablet, or personal computer. The terminal runs a mobile or desktop operating system and executes browser applications or native applications. The terminal communicates bidirectionally with the server via a network.

[0104] The server uses a relational database management system or a document-oriented database as its data storage device to persistently store user-related information, structured menu data, ingredient attribute data, and ingredient inventory data. The server also communicates with external supply service devices via a network interface; these external supply service devices can be service systems that provide ingredient or meal delivery.

[0105] II. Data Structures and Information Management The server uses in-memory data structures and database tables to hierarchically organize the information required for this invention. The server defines data structures for user-related information, including fields such as family composition information, nutritional information, energy information, preference information, restriction information, and emotional state information. The server configures and creates multiple logical tables for users in the database, such as a user basic attribute table, a dietary preference table, a health goal table, and an emotional record table. The server links these tables together at the application layer using a unique user identifier.

[0106] The server defines a hierarchical structure for the structured menu data. The top layer is the date unit, the next layer is the meal unit, and the next layer contains meal item information and ingredient list. The server can represent this structure in memory as a nested dictionary or list, and in the database, it is represented through multi-table relationships, such as a main menu table, a daily menu table, a meal item table, and an ingredient detail table.

[0107] The server builds a nutritional composition database for the food ingredient attribute data. This database records the energy, macronutrients, and several micronutrients per unit weight, using each standardized food ingredient as the record unit. The server also maintains a food ingredient name normalization table, mapping the natural language food ingredient names in user input or model output to standard food ingredient identifiers.

[0108] The server establishes a user inventory table for food ingredient inventory information, which records user identifiers, standard ingredient identifiers, inventory quantities, and units of measurement. The server converts different units of measurement into internal standard units using a unified unit conversion rule.

[0109] III. Structure and Invocation Methods of Generative Artificial Intelligence Models The server in this invention uses a generative artificial intelligence model, which can be an autoregressive language model based on the Transformer architecture. In the description, the server treats this model as an inference service with pre-trained parameters. Internally, the model includes multi-layered self-attention networks and feedforward networks, with each layer using a multi-head attention mechanism to encode and decode the input sequence. The model's input is the tokenized sequence processed by the tokenizer, and the output is the probability distribution of the next token.

[0110] The server inputs the prompts as natural language text into the model. These prompts include the user's family composition, target energy, nutritional priorities, dietary preferences, contraindications, and necessary output formatting requirements. The server calls the model provider via an HTTP interface, sending the prompts and control parameters as a request message to the inference endpoint. Control parameters include upper limits on generation length, temperature, and sampling strategy. These parameters affect the smoothness and diversity of the model's predicted distribution.

[0111] The server receives the natural language text returned by the model and performs structured parsing and subsequent calculations on the text within the processing flow of this invention. This invention does not simply accept the model output, but rather verifies and iteratively corrects the output through a series of procedural rules and nutrient constraints.

[0112] IV. Construction and Feature Fusion of Prompt Statements The server generates prompts based on stored user-related information. When constructing these prompts, the server concatenates various conditional information as explicit text and organizes them in a predetermined order to enable the generative AI model to effectively understand the constraints. The server maps family composition information to natural language descriptions of "number of family members and their characteristics," energy condition information to entries of "daily total energy goals and ranges per person," nutritional condition information to qualifiers such as "high protein, high dietary fiber," and preference and restriction conditions to entries of "preferring a certain cuisine and avoiding certain types of food."

[0113] The server generates a structured prompt statement by standardizing and concatenating these conditions. For example, the server can generate the following prompt statement: Please create a 7-day nutritionally balanced diet plan for a family of four based on the following conditions: 1. The target total energy intake per person per day is approximately 2000 kcal.

[0114] 2. The diet needs to be high in protein and ensure sufficient intake of vegetables and dietary fiber.

[0115] 3. If anyone in your family is allergic to peanuts, please do not use any peanut-containing foods.

[0116] 4. Families prefer Chinese home-style dishes, with cooking methods mainly including steaming, stir-frying, and stewing, using less oil and salt.

[0117] Please list breakfast, lunch, and dinner for each day, including the name of the dish and its main ingredients for each meal. Output the information in the format 'Day X - Breakfast / Lunch / Dinner: Dish Name (Main Ingredients: ...)'. The server adjusts the content and constraints of prompts based on different usage scenarios. For example, in weight loss or children's nutrition scenarios, it adds conditions related to fat control or calcium intake. Through this prompt construction process, the server explicitly encodes multidimensional user features into natural language, which is equivalent to providing structured guidance for the model's input space, thereby improving the matching degree between the generated results and user needs.

[0118] V. Structured Parsing and Rule Constraints of Natural Language Menus After obtaining the natural language text output by the model, the server uses string parsing and pattern matching algorithms to convert the text into structured menu data. The server uses a multi-level parsing strategy: first, it segments the text into day-level segments by "Day X" or similar markers; second, it segments each segment by keywords such as "breakfast," "lunch," and "dinner"; and finally, it extracts the dish names and "main ingredients" list for each meal.

[0119] The server uses regular expressions to match fixed patterns during parsing, such as a comma-separated list following "Main Ingredients:". It also handles cases with incomplete formatting through dictionary matching and similarity calculations. The server organizes the parsed results into structured data and attaches a date and meal index to each dining unit for subsequent batch processing by algorithms.

[0120] At this stage, the server applies a series of rules and constraints, such as detecting whether a meal or day is missing, or whether restricted ingredient names are used. When the server finds an item that violates the constraints, it can either mark the item directly at the structured data level or regenerate additional prompts with error correction conditions, requiring the model to perform a partial regeneration.

[0121] VI. Nutrient Calculus and Energy Constraint Algorithm The server calculates the nutritional content of structured menu data based on a food attribute database. First, the server maps the parsed food names to standard food identifiers. Then, it queries the database to obtain the energy and nutritional content data per 100 grams or per standard serving. Based on preset typical serving sizes or user-defined serving sizes, the server multiplies these unit nutritional values ​​by the estimated serving size to obtain the total energy and nutritional content of each dish.

[0122] The server accumulates the energy of each dish at both the daily and meal levels, calculating the total daily energy and total amount of each major nutrient for each person. The server compares these calculations with the user's energy and nutritional information, using thresholds to determine if they fall within acceptable ranges. The server can be configured with percentage deviations, such as allowing a fluctuation range of ±10%.

[0123] When the server detects a significant deviation in total energy or a particular nutrient content, it can adjust the menu in two ways. One approach is to locally refine the menu rules, such as replacing high-energy ingredients with low-energy ones, or increasing or decreasing the proportion of certain vegetables or proteins. This adjustment is based on a pre-defined substitution rule table and heuristic search methods, finding combinations that better meet the constraints from a limited set of candidates. The other approach is to generate additional prompts, adding conditions such as "energy needs to be reduced" or "protein needs to be increased," and then calling the generative AI model again for partial regeneration. By controlling the scope of the prompts, the server can limit regeneration to a specific day or meal, thereby reducing communication load and computational resource consumption.

[0124] The server forms a closed loop through this nutrient calculation and feedback correction process. Because the server performs mathematical calculations and rule checks on the generated results, the model output is restricted to a nutrient-acceptable solution space. This mechanism is significantly different from the process of simple human reading and subjective judgment, and has the technical characteristics of being repeatable and verifiable.

[0125] VII. Combining Emotional State with Menu Generation When processing user-related information, the server also reads emotional state information. The server can simplify and encode emotional states into several state categories, such as "high stress," "low stress," "stable," and "anticipating social interaction." When constructing prompts, the server maps these states to menu-style natural language requirements, such as "light meals to help relieve stress" or "a dinner menu suitable for sharing with family in a pleasant atmosphere."

[0126] The server can also configure corresponding ingredient or dish tags for different emotional states in its local rules engine. For example, shared dishes with warm colors and high social attributes can be prioritized for selection in the corresponding emotional state. During the structured menu data correction process, the server uses these emotion-related tags as priority conditions to sort and filter candidate menus. This process utilizes the computer's internal feature weights and logical judgments, rather than subjective human selection, to achieve an algorithmic fusion of emotional states and the technical menu generation process.

[0127] VIII. Inventory Information Management and Difference Calculation Users provide food inventory information to the server via their terminals. The terminals collect the food names and quantities using forms or barcode scanning. After receiving the data, the server standardizes the food names. The server then writes the user's inventory record into the database and compares it with the required food items in the structured menu data.

[0128] The server cumulatively calculates the demand for each ingredient during the pre-order period, using simple addition and unit conversion to obtain the total demand for each standard ingredient. The server then reads the existing quantity of the corresponding ingredient from the inventory table, performs a difference calculation, and determines the shortfall. Based on the shortfall, the server generates a list of purchase candidates, including the ingredient identifier, the required replenishment quantity, and the unit.

[0129] The server can further round up any insufficient quantities to a packaging size suitable for actual procurement, thereby reducing communication overhead and computational burden caused by multiple orders and fragmented procurement. This process is completed internally by the server, demonstrating optimization of data processing and resource utilization.

[0130] IX. External Supply Service Linkage and Real-World Effects After generating purchase candidate information, the server calls the interface of the external supply service device through the network interface to convert the list of insufficient ingredients into order information. The server centrally manages order generation, confirmation, and status query, while the terminal is only responsible for displaying the order results. This centralized processing method of the server eliminates the need for the terminal to maintain complex order logic, reducing the terminal's computing and network burden.

[0131] Because the server has already calculated the precise amount of ingredients needed through nutritional calculations and inventory discrepancies, the data received by the external supply service is more accurate, reducing human estimation errors and thus lowering the possibility of food waste and duplicate orders, achieving a technical optimization of the procurement process in the real world.

[0132] X. Improvements and Effects of Computer Technology The server improves computer technology in this invention in the following ways: The server constructs rules using explicit data structures and prompts to map high-dimensional user features into natural language input suitable for generative artificial intelligence models. This mapping process is completed at the program level and involves specific encoding algorithms, ensuring high consistency and controllability of the generated results while satisfying multiple constraints.

[0133] The server performs rigorous mathematical verification and feedback on the model output through structured analysis and nutrient calculations. This closed-loop mechanism avoids subjective fluctuations that are prone to occur during the human reading and judgment stages, making the menu generation process computationally repeatable and thus improving the system's accuracy in energy control and nutrient allocation.

[0134] The server achieves fine-grained control over generative AI model calls through a partial regeneration strategy and additional prompts. Instead of completely recalculating the entire menu, the server locks and regenerates only the local segments with discrepancies, significantly reducing the number of inferences and network data volumes, lowering the consumption of computing resources and communication bandwidth, and improving overall processing speed.

[0135] The server employs a unified data flow design, linking user information collection, prompt generation, model inference, structured parsing, nutritional calculation, inventory difference calculation, and automatic order placement into an end-to-end data path. This path avoids redundant data transmission and format conversion between multiple systems, reduces storage and retrieval overhead, and improves data consistency and fault recovery capabilities.

[0136] By combining emotional states with menu generation algorithms, the server enables the system to generate menus of different styles internally through weight adjustments and rule priority controls, without requiring multiple rounds of trial and error by humans externally. This technically expands the computer system's ability to process human soft conditions.

[0137] XI. Variations and Replacements in Implementation Forms In its implementation, the server can use different database products or different backend frameworks, as long as they can support the aforementioned data structures and algorithms. The generative artificial intelligence model used by the server can also be replaced with a language model with different parameter scales or structural details, as long as the model can accept prompts and output natural language text.

[0138] In the nutrition calculation section, the server can use different numerical calculation libraries or linear programming tools to achieve more complex constraint solving and optimization. In the inventory difference calculation, the server can be configured with different unit conversion rules and packaging specification mapping rules to adapt to different regional or supply chain environments.

[0139] In actual deployment, terminals can use different user interface technologies, such as web front-end frameworks or native interface components, but their core functions are to receive user input and present data returned by the server.

[0140] In summary, under the embodiments of this invention, servers, terminals, and users, through explicit data structure design, controlled invocation of generative artificial intelligence models, closed-loop processing of structured parsing and nutritional calculation, and linkage between inventory and external supply services, realize a diet plan generation and execution system with technological improvement significance within the computer, rather than simply automating manual operations.

[0141] use Figure 11 The processing procedure is explained.

[0142] Step 1: Users input their relevant information via the terminal. Users open the application interface on the terminal and sequentially input or select family composition information, nutritional information, energy information, preference information, restriction information, and emotional state information in the graphical interface.

[0143] Input: Text and option data manually entered or selected by the user, such as "4-person family", "2000 kcal per person per day", "high protein", "avoid peanuts", "current stress level", etc.

[0144] The terminal performs format validation and local processing on the above inputs, encapsulates the information into structured data objects, and sends the structured data to the server in the form of a request through the network communication module.

[0145] Output: The terminal outputs a request data containing user-related information fields to the server.

[0146] Step 2: The server receives and stores user-related information. The server receives request messages from the terminal through the network interface and parses out user-related information fields from them.

[0147] Input: Structured data sent by the terminal, including family composition, nutritional conditions, energy conditions, preference conditions, constraints, and emotional state.

[0148] The server performs data validation on the input data (such as field integrity checks and numerical range checks), then maps each field to the database table structure, and calls the database management software to write the information into the user configuration table, preference table, and emotion record table.

[0149] Output: The server generates or updates a set of user-related information records associated with the user identifier in the data storage device and returns a status message indicating successful storage.

[0150] Step 3: The server reads and integrates user-related information from the data storage device. Before generating a diet plan, the server queries the database for the latest user-related information records corresponding to the target user identifier.

[0151] Input: User ID and multiple user information table records stored in the data storage device.

[0152] The server integrates the query results, merging fields such as family composition, nutritional conditions, energy conditions, preference conditions, restriction conditions, and emotional state scattered across different tables into a unified user configuration object, while performing necessary data type conversions and default value completion.

[0153] Output: The server creates a unified user-related information data structure in memory, which serves as the basic input for generating subsequent prompt statements.

[0154] Step 4: The server generates a prompt statement based on user-related information. Based on a unified user-related information data structure, the server transforms various conditions into natural language descriptions and concatenates them into prompts that can be understood by the generative artificial intelligence model.

[0155] Input: A data structure containing user-related information such as family composition, nutritional goals, energy goals, dietary preferences, contraindications, and emotional state.

[0156] The server maps each field to itemized or paragraph-style text based on a preset template, organizing them in a fixed order. For example, it first describes the number of people and energy, then the nutritional focus, contraindications, and preferences, and finally specifies the output format. During this process, the server performs data processing operations such as string concatenation, placeholder replacement, and encoding standardization.

[0157] Output: The server receives a complete natural language prompt, for example: Please create a 7-day nutritionally balanced diet plan for a family of four based on the following conditions: 1. The target total energy intake per person per day is approximately 2000 kcal.

[0158] 2. The diet needs to be high in protein and ensure sufficient intake of vegetables and dietary fiber.

[0159] 3. If anyone in your family is allergic to peanuts, please do not use any peanut-containing foods.

[0160] 4. Families prefer Chinese home-style dishes, with cooking methods mainly including steaming, stir-frying, and stewing, using less oil and salt.

[0161] Please list breakfast, lunch, and dinner for each day, including the name of the dish and its main ingredients for each meal. Output the information in the format 'Day X - Breakfast / Lunch / Dinner: Dish Name (Main Ingredients: ...)'. Step 5: The server invokes a generative artificial intelligence model to generate natural language menu text. The server uses a network request client module to send inference requests to the generative artificial intelligence model provider, taking the generated prompts as input.

[0162] Input: Prompt text and model call parameters (such as maximum generation length, temperature, sampling strategy, etc.).

[0163] The server encapsulates the prompt statement into a request message body and sends it to the model server endpoint via HTTP or other protocols. Internally, the generative AI model, based on a Transformer architecture, performs word segmentation, vectorization, and multi-layer attention calculations on the prompt statement, progressively outputting a sequence of natural language text representing a multi-day diet plan. The server receives the response message, extracts the model's output fields, and reconstructs the byte stream or tokenized sequence into natural language text.

[0164] Output: The server obtains a natural language menu text in memory that describes meal plan candidates for multiple days or a scheduled period, such as the names of dishes and descriptions of main ingredients listed by day and meal.

[0165] Step 6: The server parses the natural language menu text and generates structured menu data. The server performs programmatic parsing of the natural language menu text obtained from the generative artificial intelligence model.

[0166] Input: Natural language menu text containing multiple descriptions of "Day X", "Breakfast", "Lunch", "Dinner" and "Main Ingredients".

[0167] The server first segments the text using keywords such as "Day X" to extract day-level segments. Then, within each segment, it further subdivides it using tags like "Breakfast," "Lunch," and "Dinner." Finally, it uses regular expressions or pattern matching algorithms to extract the dish names and the ingredient list following "Main Ingredients:" from each meal's text. During the parsing process, the server cleans and standardizes redundant spaces, punctuation marks, and non-standard formatting.

[0168] Output: The server generates structured menu data, including meal item information indexed by date and meal number, meal name information, and ingredient information. Internally, it is represented by a unified data structure to facilitate subsequent nutritional calculations and inventory comparisons.

[0169] Step 7: The server standardizes the names of ingredients and binds them to ingredient attribute data. The server extracts all ingredient names from the structured menu data and performs a standardized mapping.

[0170] Input: A list of ingredient names in free text form from the structured menu data, and standard ingredient names and their identifiers stored in the ingredient attribute database.

[0171] The server maps non-standard expressions (such as place names or abbreviations) to standard ingredient identifiers through string matching, a thesaurus, and necessary similarity calculations. For ingredients that cannot be automatically matched, the server can either use default processing or record them as items requiring manual confirmation. The server writes the matching results back to the structured menu data, so that each ingredient item is associated with a corresponding standard ingredient identifier.

[0172] Output: The server receives a structured menu data with standard ingredient identifiers, providing a clear index for subsequent nutritional calculations based on the ingredient attribute database.

[0173] Step 8: The server performs nutritional and energy calculations based on the food attribute database. The server accesses the food attribute database to obtain information on the unit energy and nutritional components of each standard food ingredient.

[0174] Input: Structured menu data with standard ingredient identifiers, and energy and nutrient records from the ingredient attribute database.

[0175] The server sets or finds typical usage amounts for each ingredient (such as the average number of grams of that ingredient used in each dish), multiplies the unit nutrient value by the corresponding usage amount, and calculates the total energy and various nutrient components of each dish. Subsequently, the server accumulates all dishes by meal and by day to obtain the total energy and nutrient distribution per person per meal and per person per day. This process involves a large number of multiplication and addition operations and unit conversions.

[0176] Output: The server generates nutritional statistics including total energy for each meal and each day, as well as the total amount of each major nutrient, and saves them in association with the corresponding menu structure.

[0177] Step 9: The server compares the nutritional statistics with nutritional and energy conditions to determine the results. The server compares nutritional statistics with the user's nutritional and energy information.

[0178] Input: Total energy and total nutrients for each meal and each day, as well as the user-defined target energy and nutrient ranges.

[0179] The server calculates the deviation value for each indicator, such as the difference and percentage between the target of 2000 kcal and the actual value. Based on preset thresholds, the server determines whether each day is within the allowable range, marking days exceeding the upper limit or falling below the lower limit, and the relevant meals. The server can also perform focused checks on important nutrients (such as protein and fat) and generate deviation reports.

[0180] Output: The server receives a menu and nutritional data with judgment labels, such as "Total energy on day 3 is about 15% too high" and "Protein on day 5 is slightly low", which are used for subsequent adjustments or regeneration decisions.

[0181] Step 10: The server adjusts the menu or generates additional prompts based on the judgment result. The server chooses either a local adjustment or model regeneration strategy based on the deviation.

[0182] Input: Structured menu data and nutritional statistics with nutritional bias markers.

[0183] When the server performs local rule adjustments, it identifies high-energy dishes in meals that exceed the standard, refers to predefined replacement rules, replaces them with low-energy dishes or increases the proportion of vegetables, and recalculates nutritional statistics. If the deviation exceeds a preset threshold or the room for rule adjustment is limited, the server constructs an additional prompt statement, adding conditions such as "reduce the total energy of day X by about 10%" or "increase high-protein ingredients" to the original prompt statement, and sends the additional prompt statement to the generative artificial intelligence model to regenerate only for specific days or specific meals.

[0184] Output: The server receives the revised structured menu data and updated nutrition statistics, making the new menu more closely resemble the user's settings in terms of nutrition and energy.

[0185] Step 11: Users input or update food inventory information via the terminal. Users can enter the ingredients and quantities they currently have at home in the terminal's inventory management interface, or read the identification code of packaged goods through the terminal's barcode scanning function.

[0186] Input: The name, quantity, and unit information of the ingredients entered by the user on the terminal, or the product identification code obtained by scanning the code.

[0187] The terminal organizes this information into an inventory data object and sends it to the server over the network. Users can also update the inventory later (e.g., mark it as purchased or used), and the terminal generates an update request for each change.

[0188] Output: The terminal sends a request to the server for the latest food inventory data.

[0189] Step 12: The server receives, standardizes, and stores food inventory information. The server receives inventory update requests sent by the terminal and parses out fields such as ingredient name, quantity, and unit.

[0190] Input: Inventory data containing multiple ingredient names, quantities, and units.

[0191] The server uses the same nomenclature normalization process as the menu to map ingredient names to standard ingredient identifiers and converts different units to internal standard units (such as grams or milliliters). Then, the server inserts or updates corresponding records in the database's inventory table to ensure that each user has an accurate inventory record for each standard ingredient.

[0192] Output: The server obtains a structured and standardized set of user food inventory information and stores it in a data storage device.

[0193] Step 13: The server calculates the total amount of each ingredient needed based on the structured menu data. The server uses the determined structured menu data and the typical amount of each dish to calculate the total demand for each standard ingredient during the reservation period.

[0194] Input: Structured menu data (containing a list of ingredients and quantities for each meal) and typical quantity rules.

[0195] The server iterates through all days, all meals, and all dishes, performing an additive calculation on each standard ingredient and summing the quantities used in each meal to obtain the total demand for the period. During the calculation, the server ensures all quantities are measured within the same unit system, performing unit conversions when necessary.

[0196] Output: The server generates a summary table of food ingredient requirements, which includes the total required quantity and unit of each standard food ingredient.

[0197] Step 14: The server compares the total demand with the inventory information, calculates the shortage quantity, and identifies the missing ingredients. The server reads the user's current inventory quantity from the inventory table and compares it with the demand summary table.

[0198] Input: The total demand for each standard ingredient over the cycle and the current inventory of the same ingredient.

[0199] The server calculates the difference for each ingredient: Shortage quantity = max(Demand quantity) Inventory level (0). When the difference is zero, the item is marked as fully stocked; when the difference is greater than zero, the item is marked as insufficient. The server can round up the insufficient quantity based on the difference and preset packaging specifications to obtain the actual purchase recommendation quantity.

[0200] Output: The server generates a list of insufficient ingredients, where each item includes an ingredient identifier, a suggested purchase quantity, and a unit.

[0201] Step 15: The server generates purchase candidate information and links with external supply service devices. The server constructs purchase candidate information based on the list of insufficient ingredients, and converts the ingredient identifiers and suggested quantities into product or category identifiers that can be identified by external supply services.

[0202] Input: List of insufficient ingredients and commodity mapping rules for external supply services.

[0203] The server associates each standard ingredient with one or more purchasable products based on a mapping table or product retrieval interface, and selects appropriate combinations of specifications to meet the recommended quantity. Subsequently, the server encapsulates the purchase candidate information into a draft order or shopping list, and sends it to an external supply service device via a network interface to initiate an automatic or semi-automatic ordering process.

[0204] Output: The server outputs a set of structured purchase candidate information to external supply services, while recording the order status locally for subsequent querying and synchronization.

[0205] Step 16: The server provides menu data and purchase candidate information to the terminal and controls its display. After the server completes the menu confirmation and purchase candidate generation, it returns this data to the terminal via the network.

[0206] Input: Finalized structured menu data, nutritional statistics, purchase candidate information, and order status information.

[0207] The server serializes its internal data structure into a response format that the terminal can parse, along with necessary identification and grouping information. Upon receiving this information, the terminal displays the menu in the user interface, organized by date and meal, and shows the ingredients and quantities to be purchased in a list or card format. Users can view the menu for each day, the main ingredients for each meal, and approximate energy content on the terminal; they can also view or confirm automatically generated shopping lists and order suggestions.

[0208] Output: The server outputs complete menu display data and shopping list data to the terminal. The terminal presents a visual interface based on this data, and the user makes actual cooking arrangements and purchasing operations accordingly.

[0209] Application Example 1 The process flow corresponding to the specific processing in Use Case 1 will be described below. The various parts of the system described below are implemented by the data processing device 12 and the intelligent device 14. Furthermore, the data processing device 12 is referred to as the "server" and the intelligent device 14 is referred to as the "terminal".

[0210] In existing technologies, computer-based diet management systems mostly only perform simple calculations of nutrient intake or recommend fixed menus based on preset rules, lacking the ability to comprehensively model, infer, and adaptively optimize multi-source health-related data over time. Specifically, the following technical problems exist: (1) At the data processing level, traditional systems usually process family composition information, nutritional needs information, energy intake information, user activity information, emotional state information, etc. in a scattered manner, lacking a unified numerical modeling and feature extraction mechanism, which makes it difficult to perform joint operation and comprehensive evaluation of these heterogeneous data in the same computing framework, thus limiting the accuracy and efficiency of subsequent automatic planning and optimization.

[0211] (2) At the algorithm level of generating menus, many systems only use fixed rules or simple recommendation algorithms. They cannot dynamically construct suitable model input text based on the user's individual health status, emotional state and long-term change trend. As a result, they cannot give full play to the generative artificial intelligence model's ability in natural language generation and combinatorial optimization, making it difficult for the generated menu to achieve overall optimality in terms of nutritional balance, intake restrictions and user preferences.

[0212] (3) At the system level of inventory management and automatic ordering, existing systems often separate menu generation from inventory comparison and automatic ordering processes. They do not form an integrated data path and feedback loop around "calculation results - natural language menu - inventory data - ordering behavior". They lack a fine mapping and difference calculation mechanism between menu-level nutritional structure and item-level inventory data, resulting in crude ordering decisions, untimely inventory updates, resource waste, or increased risk of stockouts.

[0213] (4) In terms of time-dimensional adaptability, traditional systems mostly generate short-term suggestions based on one-time input, without associating and storing the structured calculation results of mathematical models with the natural language text output by generative artificial intelligence models, and without using this association to dynamically optimize subsequent requests. They are unable to generate diet menus and inventory management strategies with historical memory and trend prediction capabilities based on changes in users' health status, emotional state and dietary behavior over time.

[0214] (5) In terms of human-computer interaction and overall system performance, existing related systems usually require users to switch between multiple interfaces and applications. The server side lacks a unified processing flow to manage health-related data, prompts, menu generation, inventory comparison and automatic ordering end-to-end. This not only increases the user's operational burden, but also leads to redundant overhead in data flow and task scheduling on the server, making it difficult to achieve an efficient and scalable computer implementation solution.

[0215] Therefore, it is necessary to provide a new server-based system and its computer implementation. By establishing a unified mathematical model calculation module, prompt statement generation module, generative artificial intelligence model interface module, inventory comparison and automatic ordering module, and result association storage and time series optimization module within the server, the computer system can be improved from the perspective of computing architecture and data flow control. This will enable the system to efficiently transform multi-source health-related information into executable menus and ordering decisions, and to perform adaptive optimization in the time dimension, thereby substantially improving the computer's processing power and resource utilization efficiency in the fields of personalized diet planning and inventory management.

[0216] The specific processing performed by the specific processing unit 290 of the data processing apparatus 12 in Application Example 1 is achieved by the following means.

[0217] In this invention, the server includes a processing unit for receiving health-related information from a user, including family composition information, required nutrient information, energy intake information, intake object attribute information, activity level information, preference information, restriction information, and emotional state information; converting the health-related information into numerical data; and inputting the numerical data into a mathematical model for nutritional assessment to calculate nutritional goals and dietary structure information corresponding to the health-related information. The server also includes a processing unit for generating prompt statements based on the nutritional goals and dietary structure information and inputting them into a generative artificial intelligence model; obtaining natural language text related to the diet menu by inputting the prompt statements into the generative artificial intelligence model; and parsing the natural language text to determine the intake items constituting the diet menu and the types and quantities of items corresponding to the intake items. The system includes a processing unit for retrieving item inventory information from a storage device based on the item type and quantity, extracting insufficient items through comparison calculations and generating order information, and sending the order information to an external service via a communication network to automatically order items and update the item inventory information; a processing unit for presenting the diet menu and order result information through a user interface on a terminal device, receiving confirmation or change information from the user, and updating the diet menu, item inventory information, and order information based on the confirmation or change information; and a processing unit for associating and storing the calculation results of the mathematical model with natural language text obtained from the generative artificial intelligence model, and generating a diet menu and item inventory management strategy that takes into account time changes based on the association relationship for subsequent health-related information or prompts from the user. This allows for the formation of an integrated data processing chain within the server, encompassing "numericalization of multi-source health-related data—mathematical model calculation—prompt statement construction—generative artificial intelligence model generation—structured parsing of natural language results—inventory difference calculation and automatic ordering—historical association storage and time series optimization." This improves the modeling accuracy and computational efficiency of health-related information from the perspectives of computer architecture and algorithm collaboration, enabling automated and adaptive control of the menu generation, inventory management, and automatic ordering processes. Consequently, it enhances the overall performance and resource utilization of computers in personalized diet planning and inventory management tasks.

[0218] "Health-related information" refers to a collection of data related to the physical condition, lifestyle, and mental state of a user or their family members, including but not limited to family composition information, required nutrient information, energy intake information, intake object attribute information, activity level information, preference information, restriction information, and emotional state information, which can be used for nutritional assessment and diet planning.

[0219] "Family composition information" refers to data used to represent the structure of a user's family members, including but not limited to the number of family members, their age, gender, height, weight, kinship, and whether they eat together.

[0220] "Required nutrient information" refers to data that characterizes the types and target intake of nutrients that a user should consume to maintain or improve bodily functions, including but not limited to protein, fat, carbohydrates, dietary fiber, vitamins, minerals, and trace elements.

[0221] "Energy intake information" refers to data used to define or represent a user's target energy intake over a certain period of time. It is usually expressed in kilocalories or kilojoules and may include the total daily energy target and the energy distribution target for each meal.

[0222] "Intake subject attribute information" refers to personal attribute data related to the dietary intake subject, including but not limited to age, gender, body weight, height, body mass index, basal metabolic rate, health status, and special physiological conditions.

[0223] "Activity data" refers to information used to characterize a user's energy expenditure level in daily life and exercise, including but not limited to activity intensity, activity duration, occupation type, exercise frequency and exercise type, which can be used to estimate energy requirements.

[0224] "Preference information" refers to data that reflects a user's subjective preferences and tendencies in terms of food, including but not limited to favorite ingredients, cuisines, flavors, cooking methods, and the degree of liking or disliking certain foods.

[0225] "Restriction information" refers to data that indicates the restrictions that users need to follow in their dietary intake, including but not limited to allergen restrictions, dietary restrictions related to chronic diseases, religious or cultural taboos, requirements for reducing salt, sugar and fat intake, and restrictions on the intake of specific ingredients.

[0226] "Emotional state information" refers to data related to a user's current or periodic psychological and emotional state, including but not limited to emotional labels such as tension, stress, anxiety, depression, pleasure, and relaxation, or emotional levels inferred from physiological signals, questionnaires, or behavioral data.

[0227] "Numerical data" refers to digital data that can be used for arithmetic or logical operations by converting non-numerical health-related information such as text, symbols, and classification labels through predetermined quantification rules. This includes, but is not limited to, integers, floating-point numbers, encoded category indexes, and vector representations.

[0228] A “mathematical model” refers to a computational model built based on mathematical statistics, optimization theory, machine learning or other mathematical methods. This model takes numerical data as input and outputs nutritional goals, dietary structure information and other evaluation indicators through processes such as function operations, optimization solutions or probabilistic inference.

[0229] "Nutritional goals" refer to the target description of a user's nutritional intake status within a certain time period, calculated by a mathematical model based on health-related information. These goals include, but are not limited to, target energy intake, target intake ranges for various nutrients, the proportions of the three macronutrients, and target parameters related to changes in body weight or maintenance of health.

[0230] "Dietary structure information" refers to the result data of the allocation and combination of diet in terms of time and content based on nutritional goals, including but not limited to the allocation of energy and nutrients per day or per meal, the number of meals, the type of meal, and the types of dishes or intake items corresponding to each meal.

[0231] "Generative AI models" refer to AI models that can automatically generate natural language text or other forms of content based on input prompts or conditional information, including but not limited to deep learning-based language models, text generation models, or multimodal generation models.

[0232] "Prompt statements" refer to text information or its structured representation that serves as input to a generative artificial intelligence model. These statements describe user needs, constraints, nutritional goals, dietary requirements, or psychological effects, guiding the generative artificial intelligence model to output natural language text that aligns with these conditions.

[0233] "Natural language text" refers to text data generated by generative artificial intelligence models that conforms to the grammar and semantic rules of natural language, used to describe food menus, dish contents, ingredient quantities, nutritional characteristics, and related descriptions.

[0234] A “dietary menu” refers to a meal plan generated based on nutritional goals and dietary structure information, consisting of one or more intake items, including but not limited to a list of dishes for each meal, a basic description of each dish, and the corresponding intake items.

[0235] "Intake items" refer to the specific items used for actual consumption in a diet menu. These can be single foods, combination dishes, beverages, or snacks, and correspond to the relevant item types and quantities.

[0236] "Item type" refers to the identification of the specific type of substance required to achieve an intake item, including but not limited to food types, beverage types, or types of consumer goods related to diet.

[0237] "Item quantity" refers to the quantity information required to generate or provide an ingested item, corresponding to the type of item. It may include mass, volume, number of servings, or number of packaging units.

[0238] "Item inventory information" refers to data recorded in the storage device regarding the current stock status of items, including but not limited to item identification, available quantity, unit, batch information, shelf life, and storage location.

[0239] "Insufficient items" refers to items whose inventory quantity is lower than the required quantity, determined by comparing the quantity of items needed for the menu with the inventory information.

[0240] "Ordering information" refers to the data set used to initiate an order request for items from an external service, including but not limited to item identifier, order quantity, delivery address, expected delivery time, payment-related information, and parameters required by the agreement with the service provider.

[0241] "Automatic ordering" refers to the process by which the system, without requiring manual operation by the user, sends a request to an external service through a communication network based on the shortage of items and the order information, and completes the ordering process.

[0242] "Terminal device" refers to an information processing device used to interact with users and communicate with servers, including but not limited to smartphones, tablets, personal computers, wearable devices or other electronic devices with display and input functions.

[0243] "Order result information" refers to data returned by external services or generated by the server that reflects the order processing status, including but not limited to order identifier, order status, estimated delivery time, actual delivery information, and cost information.

[0244] "Confirmation information" refers to the user's agreement or acceptance instruction to the menu and ordering plan generated by the system after viewing the food menu and ordering results information, including but not limited to overall confirmation, partial confirmation, or implicit confirmation based on default options.

[0245] "Change information" refers to data on user requests for modifications based on the diet menu and ordering plan, including but not limited to instructions to replace intake items, adjust the quantity of items, cancel the order, or change delivery conditions.

[0246] "Associative storage" refers to the process of recording different types of data in a storage device in an associative manner. This includes establishing and storing a mapping relationship between the calculation results of mathematical models and the natural language text generated by generative artificial intelligence models in a searchable and reusable manner.

[0247] "Emotional load index" refers to a parameter calculated by a mathematical model based on emotional state information to quantify the degree of psychological or emotional stress of users. It can be used to adjust the direction or intensity of the psychological effects of dietary menus.

[0248] "Psychological effect conditions" refer to requirements in prompt statements that are used to constrain or guide the output of generative artificial intelligence models and are related to the user's psychology, emotion regulation, or emotional experience, including but not limited to goals such as reducing stress, relaxing emotions, enhancing pleasure, or improving the social atmosphere.

[0249] "Inventory management strategy" refers to a set of rules or plans that plan and adjust the timing, quantity, order of use, and priority of replenishment of items based on historical data, current inventory status, and expected menus. This is used to optimize inventory utilization efficiency and reduce the risk of stockouts or waste.

[0250] The embodiments of this invention will be described focusing on the collaborative processing of the server, terminal, and user. The following embodiments are merely illustrative examples, and those skilled in the art can make various modifications and substitutions without departing from the basic idea of ​​this invention.

[0251] In this invention, the server typically comprises one or more computing devices, which may include a general-purpose processor, a graphics processor, a storage device, and a network interface. The server can run an operating system-based software platform on which software components for implementing the functions of this invention are deployed, including a web application framework built on a scripting language, libraries for numerical computation and machine learning, a relational database management system, and a generative artificial intelligence model inference interface, etc. The terminal is typically a smartphone, tablet computer, or personal computer, running a mobile operating system or desktop operating system, and equipped with a browser or client application for data interaction with the server and providing a user interface.

[0252] I. Overall System Composition In one implementation, the server includes: a processing module for receiving and preprocessing health-related information; a computation module for executing mathematical models; a generation module for generating prompts and invoking generative artificial intelligence models; a database access module for accessing and updating inventory information; a communication module for communicating with external ordering services; a historical management module for result association storage and time series optimization; and an interface module for interacting with terminals. The server can use scripting languages ​​and web frameworks to implement the business logic between these modules; use machine learning libraries to perform mathematical model calculations and invoke generative artificial intelligence models; and use a relational database system to store user information, health-related information, inventory information, menu schemes, and order information.

[0253] In one embodiment, the terminal runs a mobile application or browser page and communicates with the server via a secure version of Hypertext Transfer Protocol (HTTP). In this invention, the terminal does not perform complex numerical calculations but is primarily responsible for collecting user input, displaying server-generated menus, inventory, and order results, and converting user confirmations or changes into structured data for transmission to the server. Users input personal and family health-related information through the terminal interface and view and adjust server-generated dietary menus.

[0254] II. Acquisition and Numerical Modeling of Health-Related Information Users can input or select information on the terminal, including family composition (number of family members, age and gender of each member), required nutrients (high protein requirement, low fat requirement), energy intake (daily target of 2000kcal), attributes of the user (height, weight, body mass index), activity level (sedentary, light, moderate, high intensity), preferences (preferred cuisine, preferred ingredients, taste preferences), restrictions (allergies to certain foods, dietary restrictions related to illness, religious taboos), and emotional state (tension, stress, depression, happiness). The terminal encodes all this information into structured data and sends it to the server via the network.

[0255] After receiving health-related information, the server performs data cleaning and numerical transformation through a preprocessing module. For example, the server can use feature engineering methods to map text labels (such as "moderate exercise level" and "high protein preference") to numerical codes; convert height and weight to body mass index; divide age into age group codes; convert activity levels to metabolic equivalents; and convert emotional state information into discrete levels or continuous emotion scores. The server combines these numerical data into feature vectors in vector form, which are then used as input for subsequent mathematical models.

[0256] The server can use machine learning libraries to implement multivariate functions related to nutrition in its mathematical model calculation module. The mathematical model can employ multi-layer feedforward neural networks, linear programming models, or gradient boosting tree-based regression models, among others. In a preferred embodiment, the server uses a multi-layer feedforward neural network as the mathematical model. This network includes an input layer, multiple hidden layers, and an output layer. The input layer receives the aforementioned feature vectors, the hidden layers employ non-linear activation functions, and the output layer generates nutritional goals and dietary structure information. During the training phase, the server can use mean squared error or cross-entropy as the loss function, and employ batch gradient descent or adaptive learning rate optimization algorithms to update the weights. Data augmentation (e.g., small-scale perturbations to calorie goals and activity levels) can improve the model's generalization ability. Using such a mathematical model, the server can output daily total energy goals, the proportions of the three macronutrients, energy allocation for each meal, and recommended weights for various food categories with high accuracy, given health-related information.

[0257] III. Prompt Statement Generation and Generative Artificial Intelligence Model Invocation In the generation module, the server constructs prompt statements based on the nutritional goals and dietary structure information output by the mathematical model. Instead of simply feeding user input directly into the generative AI model, the server employs a non-traditional two-stage construction method: In the first stage, the mathematical model outputs structured nutritional parameters, such as "total calories = 2000 kcal, protein ratio = 30%, fat ratio = 20%, carbohydrate ratio = 50%, energy distribution for three meals is 500 / 700 / 800 kcal"; in the second stage, the server converts these parameters into natural language descriptions and merges them with explanations related to user preferences, constraints, and emotional states to form complete prompt statements. Therefore, the prompt statements not only contain surface-level demand text but also embed fine-grained nutritional constraints from the mathematical model.

[0258] For example, a user can enter the following prompt in the terminal: "Based on the requirements of a 30-year-old male with moderate exercise, a daily intake of 2000kcal, and a high-protein, low-fat diet, please generate a detailed menu for three meals a day, and explain the approximate nutritional structure of each dish." or: "For a 30-year-old male with moderate exercise, 2000kcal daily, high protein and low fat, generate a week's worth of dinner menus, and try to use chicken breast and vegetables as much as possible." Internally, the server combines the user's original text with the precise nutritional parameters and emotion-related conditions output by the mathematical model to form a more machine-processable prompt, which is then used as input to the generative artificial intelligence model.

[0259] In a preferred implementation, the generative artificial intelligence model is an autoregressive language model based on the Transformer architecture, which is invoked by the server through a model inference interface. The model receives prompts in the form of word vectors, transforms them into internal representations within a multi-layer self-attention network, and captures the associations between nutritional constraints, emotional conditions, and dish descriptions within the prompts using a multi-head attention mechanism. The server can control the diversity and stability of the generated results by adjusting temperature parameters and sampling strategies (such as top-k and top-p sampling).

[0260] After receiving the menu in natural language text format, the server uses rule parsing algorithms and dictionary mapping mechanisms to transform it into structured data. For example, the server can identify the meal time (breakfast, lunch, dinner), dish names, main ingredients, cooking methods, and approximate quantities from the text. The server can maintain an ingredient name dictionary and a recipe template table, mapping the ingredient names appearing in the text to internal item category identifiers, thereby establishing a relationship between ingested items and their types and quantities.

[0261] This three-stage process—"structured computation using mathematical models + text generation using generative AI models + structured text parsing"—enables the server to accurately map high-dimensional health-related data to natural language menus, and then reconstruct the natural language results into executable item-level data structures, thus achieving a complete data pathway from abstract requirements to specific item orders. This structured-unstructured-restructured processing flow is difficult to implement in traditional rule-based systems, and it helps improve the flexibility and stability of menu generation.

[0262] IV. Inventory Information Management and Automatic Ordering Control The server manages item inventory information using a relational database management system through a database access module. The server can set up data tables such as item tables, inventory tables, menu scheme tables, and order tables in the database, defining primary keys, indexes, and foreign key constraints to achieve efficient querying and updating. For example, the inventory table can contain fields such as item identifier, current quantity, unit, shelf life, batch number, and location identifier; the menu scheme table can contain menu identifier, date, meal time, list of items to be included, and corresponding item types and quantities; the order table can contain fields such as order identifier, external service identifier, order time, status, and delivery time.

[0263] Based on structured menu data generated by a generative artificial intelligence model, the server summarizes the required quantity for each item type, forming a demand vector, and calculates the difference between this vector and the current quantity vector in the inventory table. The server can set safety stock thresholds for different items, taking these thresholds into account when calculating insufficient items to prevent excessively low inventory. Through this vectorized difference calculation method, the server can leverage a linear algebra library to improve computational efficiency, reducing the number of queries when batch processing multiple menu schemes, thereby reducing database access and network transmission load.

[0264] For items in short supply, the server can generate order information based on a rule engine or strategy model. Rules may include: prioritizing replacements with items nearing their expiration date but still available; ensuring a stable supply of ingredients related to mood regulation based on user emotional load indicators; and adjusting order quantities based on historical consumption patterns. The server converts the order information into the request format required by external services via a communication module and sends it to the e-commerce or delivery platform's application interface through a network interface. After receiving the returned order confirmation information, the server updates its local order and inventory tables.

[0265] Through the above processing, the server does not simply replicate the manual ordering process, but achieves a more efficient calculation model at the inventory management level through high-dimensional vectorized calculations, batch differential calculations, and rule-based priority decisions. This model can maintain consistency between inventory status and menu generation results while reducing database I / O and network interactions, thereby reducing errors and latency.

[0266] V. Historical Association Storage and Time Series Optimization In the history management module, the server associates and stores the calculation results of each mathematical model (including nutritional goals, dietary structure information, emotional load indicators, etc.) with the corresponding natural language text output by the generative artificial intelligence model (menu description), as well as the actual execution status (user confirmation or change operations, actual order and consumption data). The server can assign a unique identifier to each generation process and maintain a relational table in the database to achieve a one-to-one or one-to-many mapping between structured results and text results.

[0267] When processing subsequent requests, the server can query historical records to construct time-series features. For example, the server can calculate the user's acceptance of a certain type of dish or ingredient over a past period (based on confirmation rate, replacement rate, cancellation rate, etc.), calculate the deviation between actual energy intake and target energy, and calculate the correlation between emotional state and the frequency of certain dishes. These time-series features are then fed back into the input features of new mathematical models. The server can introduce recursive structures or time window features into the mathematical models, enabling the output nutritional goals and dietary structures to adapt to the user's long-term changing trends.

[0268] This time-series optimization not only enhances personalization but also creates a closed loop at the computer level: "historical data—feature update—model retraining or re-inference—output optimization," improving overall prediction accuracy and stability. Compared to simple one-off recommendations, this approach, based on associative storage and time-series modeling, achieves dynamic adaptation of computational paths at the algorithm level, reducing redundant computations and improving the model's generalization ability under changing conditions over time.

[0269] VI. Technical Effects and Improvements in Computer Technology The server employs a collaborative structure combining mathematical models and generative artificial intelligence models, enabling unified modeling of multi-source, heterogeneous health-related data within the same computational framework. The mathematical model focuses on numerical constraints and optimization computation, while the generative artificial intelligence model focuses on natural language generation and creative composition. The server couples these two aspects through the prompt construction process, ensuring that the generated menus not only meet strict nutritional constraints but also possess diversity and readability at the natural language level. Compared to solutions relying solely on rule systems or natural language models, the server improves generation efficiency and expressiveness while maintaining computational accuracy.

[0270] The server employs vectorized difference calculation and batch query optimization strategies in its inventory calculation section. Through reasonable index design and transaction control in the relational database, it reduces lock contention and latency caused by frequent updates to single items, thereby improving the throughput of large-scale inventory data processing. By directly coupling ordering decisions with menu schemes, the server avoids manual transcription or repetitive input between multiple systems, significantly reducing the probability of transmission errors and synchronization delays.

[0271] In terms of historical correlation management and time series optimization, the server uses a two-way association between structured results and natural language text. This allows the system to not only output readable menus but also utilize implicit information in the text (such as cooking methods and dish combination features) for model iteration. Unlike traditional systems that treat textual results as the endpoint, this approach incorporates them into the feedback loop, thereby fundamentally improving the adaptive capabilities of the model and the system.

[0272] Overall, this invention achieves automation and technical collaboration across the entire process of health-related information—menu—inventory—ordering by designing specific data structures (feature vectors, demand vectors, inventory vectors, time series features, etc.) and specific algorithmic processes (mathematical model optimization, prompt statement construction, generative model reasoning, text parsing, difference calculation, time series feedback, etc.) within the server. It represents an improvement on the data processing methods and algorithmic structures within a computer system, rather than a simple automation of existing manual business processes.

[0273] VII. Other Implementation Forms and Variations In other implementations, the server's mathematical model can be replaced with other forms of optimization models. For example, nutritional goals and dietary structure optimization can be modeled as constrained programming problems and solved using linear programming or integer programming solvers. Generative artificial intelligence models can also use language models of different sizes or architectures, but the mathematical model output is still embedded in them through prompt statement construction modules.

[0274] In one implementation, the server can offload some inference tasks to edge computing nodes, such as caching local menu templates and inventory data on a small server in the local network. This allows for a faster response to terminal requests even when network bandwidth is limited, further reducing communication latency and bandwidth consumption.

[0275] In some implementations, the terminal can support offline browsing, meaning that when the network is temporarily unavailable, it caches the most recently retrieved menu and inventory information from the server, allowing users to still refer to relevant suggestions. When the network is restored, the terminal sends the user's operation records to the server so that the server can update the time-series features and historical associations.

[0276] Through these variations and extensions, the present invention provides a flexible architecture that can adapt to different hardware conditions, different network environments and different service requirements, further enhancing the applicability and robustness of the system in actual deployment and operation.

[0277] use Figure 12 The processing procedure is explained.

[0278] Step 1: Users input health-related information on the terminal. Users manually input or select information such as family composition, required nutrients, energy intake, nutrient attributes, activity level, preferences, restrictions, and emotional state through the terminal's graphical interface. Users can fill in information such as age, gender, height, weight, daily exercise intensity, target calorie intake (e.g., "2000kcal per day"), whether their diet is high in protein and low in fat, whether they have any food allergies, and their current emotional state through text input boxes, drop-down options, radio buttons, or sliders.

[0279] Input: The raw text and selections entered by the user on the terminal interface.

[0280] Output: A set of structured key-value pairs generated internally by the terminal.

[0281] Based on the user's actions, the terminal maps each input to a predefined field name and encapsulates it into a structured data object. For example, it associates internal encoding with "moderate exercise" and adds a Boolean tag to "high protein preference" so that the server can parse and process it later.

[0282] Step 2: The terminal sends health-related information to the server. After completing basic checks locally (such as whether required fields are empty), the terminal serializes the structured key-value pair data into a data packet and sends the request to the server via network communication protocols. Before sending, the terminal can add timestamps, user identifiers, and device identifiers to different data fields to enable the server to perform session management and logging.

[0283] Input: Structured health-related information data within the terminal.

[0284] Output: A health-related information request message transmitted over the network to the server.

[0285] The terminal calls the network communication interface, sends the request message to the network address specified by the server, and waits for the server to return a response.

[0286] Step 3: The server receives and parses health-related information. The server receives request messages from the terminal at the network interface. First, the server verifies the message format and integrity (e.g., check length, signature, or simple checksum), then passes the message content to the application layer processing module. The server parses fields such as user identifier, household composition information, energy intake information, and activity level information from the message and checks whether the field types meet expectations.

[0287] Input: A health-related information request message sent by the terminal.

[0288] Output: Raw health-related information records used for calculations within the server.

[0289] The server writes the parsed information into the current session record of the corresponding user in the temporary storage area or database, in preparation for subsequent numerical and modeling operations.

[0290] Step 4: The server quantifies health-related information and constructs feature vectors. In the preprocessing module, the server cleans and converts raw health-related information into numerical values. Based on predefined mapping rules, the server converts text labels into numerical codes, calculates body mass index (BMI) for height and weight, converts activity levels into numerical levels, and maps mood state labels to mood scores. The server arranges each numerical field into a one-dimensional feature vector in a fixed order, performing normalization or standardization as needed (e.g., dividing calories by 1000, normalizing age to the 0-1 range).

[0291] Input: Original health-related information records stored internally on the server.

[0292] Output: The numerical feature vectors input to the mathematical model.

[0293] The server generates feature vectors through arithmetic operations (addition, subtraction, multiplication, division, logarithms, standardization, etc.) and table lookup operations, thereby unifying heterogeneous text data into a numerical form that can be used for mathematical model calculations.

[0294] Step 5: The server executes mathematical models to calculate nutritional goals and dietary information. The server reads feature vectors in the mathematical model calculation module and feeds them as input into a pre-built mathematical model (such as a multilayer feedforward neural network or an optimization model). The server performs matrix multiplication, nonlinear activation, loss evaluation, and other operations on the feature vectors. During the inference phase, it directly calculates nutritional goals and dietary structure information using the trained parameters.

[0295] Input: Numerical feature vector.

[0296] Output: A set of nutritional target parameters and a set of dietary structure information (including total energy, macronutrient ratios, energy distribution for each meal, and weighting of dish categories).

[0297] The server obtains structured results such as "total energy = 2000 kcal, protein 30%, fat 20%, carbohydrates 50%, energy distribution for three meals 500 / 700 / 800 kcal" through linear algebra operations and model forward propagation, providing precise constraints for the subsequent generation of prompt statements.

[0298] Step 6: The server outputs a construction prompt statement based on a mathematical model. The server reads nutritional goals and dietary structure information in the generation module, converts it into natural language fragments, and combines them with the user's preference information, constraint information, and emotional state information. Following a pre-defined template, the server assembles these fragments into prompts for the generative artificial intelligence model, ensuring that the prompts include specific nutritional constraints, dietary structure requirements, and psychological effects.

[0299] Inputs: Nutritional target parameter set, dietary structure information set, user preference information, restriction information, and emotional state information.

[0300] Output: A text message containing the structured constraints.

[0301] The server performs string concatenation and template filling operations to format the numerical parameters into readable text, such as "daily total calories 2000kcal, protein ratio approximately 30%, fat ratio approximately 20%", and adds the user's input requirements, such as "high protein, low fat, suitable for men with moderate exercise levels, currently under high stress, and needs to have a relaxing effect", to form a complete prompt statement.

[0302] Step 7: The server invokes a generative artificial intelligence model to generate a natural language menu. The server passes the constructed prompts as input to the generative AI model. At the model interface, the server converts the prompts into the input format required by the model (e.g., word segmentation, encoding into word vectors or sub-word indexes) and initiates the model's inference process. Internally, the generative AI model uses multi-layered attention mechanisms and autoregressive generation to semantically understand the prompts and progressively generate a natural language description of the menu.

[0303] Input: The prompt text generated by the server.

[0304] Output: Natural language text of the food menu output by the generative artificial intelligence model.

[0305] The server receives a text sequence generated by the model, such as the names of dishes, main ingredients, and nutritional information for each meal of the day, and saves the text as the original menu description in memory or a database.

[0306] Step 8: The server parses the natural language menu and extracts information on the ingested items and products. The server performs structured processing on the natural language menu output by the generative artificial intelligence model in the text parsing module. Through keyword matching, sentence segmentation analysis, and rule parsing, the server determines the meal to which each text segment belongs, identifies the dish name, main ingredients, and possible quantities. The server maps the identified text components to internal intake item and item type identifiers, and estimates the quantity of each item based on preset recipes or default serving sizes.

[0307] Input: Natural language text of the food menu output by the generative artificial intelligence model.

[0308] Output: Structured menu data consisting of a list of ingested items and their corresponding types and quantities.

[0309] The server performs string matching, pattern recognition, table lookup operations, and simple numerical inference to restore the natural language results into structured records such as "Breakfast contains dish X, requiring items A and B; Lunch contains dish Y, requiring items C and D," providing accurate information for inventory comparison.

[0310] Step 9: The server queries inventory information and calculates the demand difference for items. The server queries the database access module for current item inventory information, retrieving information such as the current quantity, unit, and shelf life of all item types related to the structured menu data. The server summarizes the demand quantity of each item in the menu into a demand vector and performs element-by-element subtraction with the inventory vector to obtain the quantity difference for each item. Based on the difference result, the server determines which items are in short supply, and may simultaneously consider safety stock thresholds and shelf life.

[0311] Input: Structured menu data (item types and quantities), and item inventory information from the database.

[0312] Output: List of missing items and the corresponding missing quantities.

[0313] The server uses vector operations and conditional judgments to calculate "demand quantity - inventory quantity" for each item, and filters out items with positive results to form a list of items to be ordered.

[0314] Step 10: The server generates order information and executes automatic ordering. The server generates order information based on the list of insufficient items, including item identifier, order quantity, target delivery address, expected delivery time, and other parameters required by the external service. The server formats the order information into the message structure required by the external service interface in the communication module and sends the order request via the network interface. The server receives the order number and status information returned by the external service and records this information in the order table, while simultaneously updating the expected inbound quantity in the inventory table.

[0315] Input: List of items in short supply and user's shipping information.

[0316] Output: Order request messages sent to external services, as well as order records and updated inventory expectations within the server.

[0317] The server uses network transmission and database write operations to fully implement the automatic ordering process, ensuring that the items required for the menu can be actually purchased in the real world.

[0318] Step 11: The server returns the food menu and order results to the terminal. The server packages the structured menu data, natural language menu text, and order result information into response data and sends it to the terminal. The response data may include details of each menu item, main ingredients and nutritional information for each dish, inventory status and order status for each item, order number, and estimated delivery time.

[0319] Inputs: Structured menu data, natural language menu text, order status and inventory update information.

[0320] Output: Menu and order result response messages sent to the terminal.

[0321] Before sending, the server can format and compress the response data to reduce bandwidth usage and improve transmission efficiency.

[0322] Step 12: The terminal displays the menu and order results and receives user feedback. The terminal receives the response message returned by the server and parses the menu data and order result information. The terminal displays the daily menu, corresponding dishes, and nutritional information for each meal in a graphical and textual format, and marks items already in stock and ordered items. Users can view menu details, browse order information, and perform confirmation or modification operations (such as replacing a dish or canceling certain orders) through the terminal interface.

[0323] Input: The structured menu and order result data returned by the server.

[0324] Output: Visual display on the terminal interface and subsequent confirmation or change information from the user.

[0325] The terminal converts the user's clicks, selections, or inputs into new instruction data, providing input for the next round of interaction with the server.

[0326] Step 13: The server adjusts the menu, inventory, and ordering information based on user feedback. The server receives confirmation or change information from the terminal and determines whether to regenerate parts of the menu, recalculate item requirements, adjust order information, or cancel the order based on the feedback. If necessary, the server can re-invoke mathematical and generative AI models, or only partially replace the existing menu. The server simultaneously updates inventory and order information to ensure the system state is consistent with the user's final decision.

[0327] Input: Confirmation or change information submitted by the user through the terminal.

[0328] Output: Updated menu scheme, inventory information, and order status information.

[0329] The server avoids repeating the entire process by using differential updates and local recalculation mechanisms, thereby improving processing efficiency and reducing computational and communication overhead while ensuring accuracy.

[0330] Alternatively, an emotion engine for inferring user emotions can be combined. That is, the specific processing unit 290 can also use the emotion-specific model 59 to infer user emotions and perform specific processing using user emotions.

[0331] Example 2 The flow of a specific process in Example 2 will be described. Each part of the system described below is implemented by the data processing device 12 and the smart device 14. The data processing device 12 will be referred to as the "server," and the smart device 14 as the "terminal."

[0332] In recent years, the application of generative artificial intelligence models to automatically generate meal plans has gradually increased. However, existing technologies mainly remain at the level of "providing a general recipe," and the following technical problems still exist in terms of computer system architecture and data processing flow: (1) In the existing scheme, the prompts are often manually written by the user or simply pieced together from templates. There is a lack of unified modeling and automatic fusion of multi-source heterogeneous data such as user attributes, nutritional needs, energy constraints, preference restrictions and emotional state. As a result, the generative artificial intelligence model is difficult to stably output dietary plan information that meets multiple constraints, and the overall intelligence of the system is limited.

[0333] (2) Existing menu generation and food inventory management processes are mostly implemented separately. The computer system lacks a unified calculation process that automatically associates and compares the "generated diet plan data structure" and the "user inventory data structure" within the machine. It cannot automatically complete the aggregation calculation of the demand for items, the difference calculation with the inventory data, and the generation of procurement candidates at the same time as the menu is generated. This results in the need for repeated manual table lookups and adjustments, low system resource utilization efficiency, and complex interaction.

[0334] (3) For items nearing their expiration date, traditional inventory management often relies on simple reminders. It is impossible to feed the "near-expiration item information" into the menu generation logic within the computer. There is a lack of a technical path to automatically convert inventory shelf-life data into new prompt statements and drive the generative artificial intelligence model to generate "change candidate menus for prioritizing the consumption of near-expiration items". As a result, the system is not intelligent enough in terms of reducing waste and dynamically adjusting diet plans.

[0335] (4) For users’ emotional state, existing systems usually only display simple labels. The computer system fails to embed emotional state information as a structured input into the prompt statement construction and menu generation process, which makes the generative artificial intelligence model unable to comprehensively consider “nutritional / energy constraints” and “emotional regulation needs” in the underlying reasoning process, resulting in a discrepancy between dietary recommendations and actual psychological needs.

[0336] (5) At the system architecture level, there is a lack of a unified design for the entire pipeline from “input information collection → automatic generation of conditional information and prompt statements → generative artificial intelligence model invocation → menu data structuring → inventory difference calculation and purchase request generation → menu adjustment driven by near-expiry items → multi-dimensional display of results”. This results in the existing system being insufficient in terms of scalability, automation and maintainability, and it is difficult to stably support complex usage scenarios without increasing human intervention.

[0337] Therefore, it is necessary to provide a new system that improves the process of food planning and inventory management from a computer technology perspective by introducing an automatic generation mechanism for conditional information specified for generative artificial intelligence models, a linkage calculation mechanism for menu data and inventory data, and a feedback control mechanism based on shelf life and emotional state on the server side, so as to improve the degree of automation, data processing efficiency and overall user experience.

[0338] The specific processing performed by the specific processing unit 290 of the data processing apparatus 12 in Embodiment 2 is achieved by the following means.

[0339] In this invention, the server includes: a device for acquiring various input information, including user attribute information, nutrition-related information, energy-related information, preference-related information, restriction-related information, and status-related information, from a processor in an information processing device, and automatically generating conditional specification information based on the input information to instruct a generative artificial intelligence model to generate diet plan information; a device for sending the conditional specification information containing the prompts to the generative artificial intelligence model, and parsing and structuring the diet plan information received from the generative artificial intelligence model corresponding to the conditional specification information into menu data of a predetermined format; and a device for retrieving, according to the food ingredient information contained in the menu data, storing item information by user from a storage device, and calculating the shortfall between the required item quantity and the inventory item quantity within the diet plan period by performing summary processing and comparison processing on the item information, and specifying the shortfall. The device comprises: an apparatus for accommodating insufficient items; an apparatus for generating procurement candidate information related to the insufficient items and automatically or semi-automatically sending a request for obtaining the insufficient items to an external supply service via a communication device; an apparatus for generating display control information containing the menu data, inventory item information, insufficient item information, and the result of the request, and sending the display control information to a terminal device with a display device so that the information is presented in a form in which the user can view the diet plan information and the insufficient item information by date or time period and choose whether to execute the request; and an apparatus for calculating the predetermined consumption time point and the remaining number of days related to the shelf life of each item based on the diet plan information and the inventory item information, extracting items whose shelf life arrives within the predetermined period as near-expiration items, and generating a change candidate menu for prioritizing the consumption of the near-expiration items by sending additional prompt statements to the generative artificial intelligence model. This allows for the formation of a complete technical chain within the server, encompassing automatic extraction and fusion of multi-source input information, dynamic construction of prompt statements and conditional information, invocation of generative artificial intelligence models and structured processing of results, linkage and difference calculation of menu data and inventory data, feedback-based menu adjustment based on near-expiry items and emotional states, and finally, multi-dimensional display output. This reduces reliance on manually written prompt statements and manual inventory comparison, improves data processing efficiency and automation in the process of meal plan generation and inventory management, and achieves overall performance improvement in computer technology aspects such as prompt generation, intelligent reasoning invocation, and inventory linkage control.

[0340] "Information processing device" refers to an electronic device, including a processor, memory, and communication interface, used to execute program instructions and process input data, and can be a server, terminal device, or a combination thereof.

[0341] A "processor" refers to a hardware circuit unit in an information processing device that executes program code, performs calculations, and controls the coordinated operation of various functional units, including but not limited to a central processing unit or a graphics processing unit.

[0342] "User attribute information" refers to basic characteristic information related to an individual user or group, including but not limited to age, gender, weight, height, family composition, and activity level, which are used as constraints for generating diet plans.

[0343] "Nutrition-related information" refers to data related to nutrient intake requirements, including but not limited to target intake or priority settings for nutrients such as protein, fat, carbohydrates, vitamins, minerals, and dietary fiber.

[0344] "Energy-related information" refers to data related to energy intake or expenditure, including but not limited to information such as daily total calorie goals, calorie distribution per meal, and the energy difference required for weight loss or gain.

[0345] "Preference-related information" refers to information that reflects a user's likes or dislikes in terms of food, including but not limited to taste preferences, cooking method preferences, and preferences or aversions to specific foods.

[0346] "Restriction-related information" refers to restrictions imposed on ingredients or cooking methods based on factors such as health status, religious beliefs, or personal choices. These restrictions include, but are not limited to, allergenic ingredients, prohibited ingredients, vegetarian restrictions, and low-salt, low-sugar, and other constraints.

[0347] "Status-related information" refers to data that reflects a user's current or periodic physiological or psychological state, including but not limited to emotional state, stress level, sleep status, and fatigue level.

[0348] "Emotional state information" refers to a category of state-related information used to indicate the type and intensity of a user's emotions at a specific time, including but not limited to emotional labels such as tension, anxiety, depression, pleasure, and relaxation.

[0349] "Generative artificial intelligence models" refer to algorithmic models trained through machine learning methods that can automatically generate text or structured data based on input conditions, and are used to output dietary plan information and related suggestions based on prompts.

[0350] "Prompt statements" refer to conditional descriptions in natural language or structured text, used to explicitly indicate the goals, constraints, and output formats to generative artificial intelligence models, thereby guiding the models to generate corresponding dietary plan information.

[0351] "Conditional information" refers to a comprehensive set of parameters generated based on multiple input information, containing at least one prompt statement. It is used as input conditions for generative artificial intelligence models to control the model's reasoning process and output content.

[0352] "Dietary planning information" refers to dietary arrangement data generated for a certain time period, including the composition of dishes, ingredient requirements, and estimated energy and nutrient distribution for each meal within at least one day or multiple days.

[0353] "Menu data" refers to the internal data representation of meal plan information after parsing and structuring, including fields such as date, meal, dish name, main ingredients and corresponding nutrition and energy information.

[0354] "Food ingredient information" refers to information in the menu data such as the name, type, and optional quantity units of each ingredient that makes up the dish, which is used for subsequent item demand calculations and inventory comparisons.

[0355] "Inventory information" refers to recorded data about the food or related items currently held by the user, including item name, quantity, unit, storage conditions and shelf life, etc., used to indicate inventory status.

[0356] "Inventory information" refers to a set of data obtained from the inventory information that represents the inventory status of items recorded in the system at a specific time, and is used to compare with the required quantity of items.

[0357] "Dietary plan cycle" refers to the time range set for dietary plan information, including but not limited to continuous time intervals such as one day, several days, one week, or one month.

[0358] "Insufficient items" refers to items for which the required quantity is greater than the inventory quantity, calculated by comparing the total quantity of items needed during the food planning cycle with the quantity of items in stock.

[0359] "Insufficient quantity" refers to the difference between the required quantity of a certain item and the stock quantity during the food planning cycle. When the difference is greater than zero, it indicates that an additional quantity needs to be obtained.

[0360] "Procurement candidate information" refers to suggested data generated based on the shortage of items and their insufficient quantities, used to guide or drive external supply services to replenish items, including item names, suggested procurement quantities, and possible supply channels.

[0361] "External supply services" refers to external information systems that can respond to acquisition requests sent by the system and provide goods delivery or purchase services, including but not limited to e-commerce service platforms or delivery service platforms.

[0362] A "request" is a request message sent by the server to an external supply service, containing information such as the shortage of items and their quantities, used to initiate an order or reservation process for items.

[0363] "Display control information" refers to formatted data generated by the server and sent to the terminal device, used to control the presentation of menu data, inventory information, shortage information, and request results on the display device.

[0364] "Terminal device" refers to user-side equipment with display and communication functions, including but not limited to smartphones, tablets, personal computers or home information terminals.

[0365] "Items nearing their expiration date" refers to inventory items whose expiration date is determined to arrive within a predetermined time window after calculating the remaining storage days. These items are used to prompt priority consumption and drive menu adjustments.

[0366] "Change candidate menu" refers to a new menu plan generated by a generative artificial intelligence model, based on additional conditions such as items nearing their expiration date or emotional state information, to replace or adjust some dishes in the original diet plan.

[0367] "Inventory management information" refers to a comprehensive data set generated based on the difference between dietary plan information and inventory information, used to represent the demand, inventory status, and replenishment suggestions for each item.

[0368] "Energy intake conditions" refers to the parameter settings used in the prompt statement to constrain the total energy or meal energy range in the diet plan, such as the maximum daily energy value or the target energy range for each meal.

[0369] "Nutrient allocation conditions" refer to the parameter settings used in the prompt statements to constrain the proportion or target intake of protein, fat, carbohydrates and other nutrients, in order to guide the generative artificial intelligence model to output dietary plan information that meets specific nutritional structures.

[0370] "Emotional relief conditions" refer to constraints in prompt statements that instruct generative AI models to prioritize dish types, ingredient varieties, or styles that help alleviate negative emotions or reduce stress.

[0371] "Emotion-enhancing conditions" refer to constraints in prompt statements that instruct generative AI models to prioritize dish types, ingredient varieties, or styles that contribute to enhancing feelings of pleasure, satisfaction, or social atmosphere.

[0372] In one embodiment of the present invention, the server, as the core execution unit of the information processing device, is equipped with a multi-core central processing unit, semiconductor memory, persistent storage device, and network interface. The server runs a general-purpose operating system, such as a Unix-based server operating system, and a backend application framework, such as a scripting language-based web framework, to implement the collaborative processing of the various functional modules of the present invention. The terminal is an electronic device with display and communication functions, such as a smartphone, tablet computer, or personal computer. The terminal runs a mobile operating system or desktop operating system and communicates with the server through an application or browser. The user inputs information through the terminal and views the results output by the server.

[0373] The server in this invention includes multiple logical modules, each of which is executed on the processor as a specific set of data processing and calculation processes. The server includes an input information acquisition module, a condition specification information and prompt statement generation module, a generative artificial intelligence model invocation module, a menu data structuring and validation module, an inventory difference calculation module, a procurement candidate generation module, a near-expiry item-driven menu adjustment module, and a display control information generation module, among others.

[0374] The server first receives various user-related information from the terminal through the input information acquisition module. Users input user attribute information, nutrition-related information, energy-related information, preference-related information, restriction-related information, and status-related information through a graphical interface on the terminal. The terminal encapsulates this information into structured data and sends it to the server via a secure communication protocol. Upon receiving the data, the server maps it into multiple internal data structures in memory, such as user configuration objects, nutritional requirement objects, and emotional state objects, and stores them in a relational or document-oriented database for subsequent processing. During this process, the server performs format and constraint validation, such as verifying that the energy target is positive, the date format is valid, and the allergy food list is a valid string set, thereby implementing error filtering at the data entry point and improving the stability and accuracy of subsequent calculations.

[0375] The server then uses a conditional information and prompt generation module to convert the aforementioned multi-source input information into conditional information used to control the inference behavior of the generative artificial intelligence model. Internally, the server maintains a set of prompt templates, each with predefined text structures and placeholders for different goal types (e.g., fat loss, muscle gain, blood sugar control, children's nutrition). Based on the user's input of goal achievement information and timeframe, the server selects an appropriate template and uses a string template engine to populate it in the following order: family composition, total energy goal, energy constraints per meal, nutrient allocation conditions, list of allergies and contraindicated foods, food preferences, and conditions for emotional relief or mood enhancement. In this way, the server automatically generates highly structured natural language prompts, rather than relying on manual editing by the user.

[0376] For example, given the user's settings of "losing 2kg in a month, controlling daily total calories to 1800 kcal, one family member being allergic to peanuts and shrimp, and overall low-oil and low-salt diet," the server can generate the following prompt: "You are a nutritionist and family meal planning assistant. Please develop a 30-day diet plan for a family of four to reduce their daily calorie intake at dinner. The general requirements are as follows: 1. The total daily calorie intake for the whole family at dinner should not exceed 1800 kcal; 2. Ensure high protein, low fat, and low oil and salt content; 3. One family member is allergic to peanuts and shrimp, so please completely exclude any dishes containing peanuts and shrimp; 4. Please provide a daily dinner menu, including the name of each dish, its main ingredients, and the approximate calorie content." For example, when the server detects that a user is in a state of high stress for an extended period, the server can add emotional relief conditions to the prompt statement, generating a prompt statement like the following: "You are a nutritionist and mood management consultant. Please create a 7-day dinner plan for a stressed office worker while meeting the requirements of weight loss and high protein, low fat. Please prioritize dishes that help relax the mind and avoid overly stimulating foods, such as mild flavors, appealing colors, and easily digestible dishes. Please list the name of each day's dinner, the main ingredients, and approximate calories." Through the aforementioned automated prompt generation process, the server maps the originally scattered structured parameters into natural language descriptions suitable for generative artificial intelligence models to understand and process. This achieves efficient conversion from multi-source data to model input, reduces human editing errors, and improves the completeness and consistency of prompts.

[0377] After generating the specified information, the server communicates with the generative AI model deployed on the computing resource cluster through the generative AI model invocation module. This generative AI model runs on one or more computing nodes with GPUs and employs a deep neural network based on the Transformer architecture, including multi-layered self-attention encoding and decoding units. The model's input is the prompt statement generated by the server. The encoding part maps the natural language sequence into a high-dimensional context vector, while the decoding part progressively generates the diet plan text given the context and historical outputs. Internally, the model uses a multi-head self-attention mechanism to weighted model the dependencies between different words and utilizes a feedforward network to perform non-linear transformations on the features, thus simultaneously considering multiple conditions such as energy constraints, nutrient distribution, allergy restrictions, and mood regulation.

[0378] During model training, the server constructs a training set using a large amount of manually reviewed diet plan data, nutritional database data, and user feedback data. The server employs a combination of supervised and reinforcement learning to train the model. In the supervised learning phase, the server uses the cross-entropy loss function to compare each step of the model's output with the actual diet plan text, and updates the model parameters through backpropagation. In the reinforcement learning phase, the server introduces a reward-based fine-tuning mechanism, using the degree to which energy constraints, nutritional constraints, taboo constraints, and user satisfaction are met as reward signals, and further optimizes the model parameters using the policy gradient method. The server can use data augmentation techniques during training, such as synonym substitution of ingredient names and slight perturbations of nutritional conditions, to ensure the model maintains stable output even when faced with diverse inputs.

[0379] During runtime, the server sends prompts from the specified conditions to the model's inference service via an API, specifying inference parameters such as maximum generation length and sampling temperature. The generative AI model then generates a multi-day, multi-meal meal plan text based on these prompts. Unlike traditional rule-based recommendation systems, this model internally encodes global constraints in the prompts into vector representations and processes them uniformly in a self-attention layer. This allows for the simultaneous satisfaction of multi-dimensional conditions such as energy, nutrition, limitations, and mood within a single inference process.

[0380] After receiving the model's output, the server parses the text using a menu data structuring and validation module. The server employs pattern matching, regular expressions, and lightweight semantic parsing methods to extract key information such as date, meal number, dish name, main ingredients, and estimated calories from continuous text, converting it into a unified menu data structure. When needed, the server can also request the generative AI model to directly output text in a near-structured format (e.g., lines with fixed markers) to simplify parsing.

[0381] During the structuring process, the server incorporates nutritional verification and energy compliance checks. The server queries the local nutrition database table, linking the names of the food ingredients used in the dish to retrieve the energy and major nutrient content per 100 grams of ingredients. Based on the ingredient quantity estimates generated by the model, the server recalculates the energy and nutrients of the entire dish through linear calculations, correcting or checking the model's estimate of "approximately x kcal". When the server detects that the total energy intake for a particular day significantly exceeds the user-defined limit, it can trigger a secondary prompt process, sending supplementary prompts to the generative AI model, such as: "In the previously generated 30-day dinner plan, the total calories on days 10 and 15 exceeded 1800 kcal. Please regenerate the dinner plan only for these two days, so that the total calories for each dinner are controlled between 1500 and 1800 kcal, and continue to maintain the requirements of high protein, low fat, and low oil and salt." Through this "detection-feedback-regeneration" loop, the server ensures that the menu data not only meets the requirements at the text level, but also strictly aligns with the user's goals in terms of energy and nutritional indicators, thereby achieving higher quantitative accuracy than human experience.

[0382] After structuring the menu data, the server uses the inventory difference calculation module and the purchase candidate generation module to associate the diet plan with the user's actual inventory. The server reads the current inventory from the stock information table and uses aggregation operations to calculate the total demand for each food ingredient within the diet plan period. The server establishes a key-value mapping for each ingredient, representing the total demand and inventory in a unified unit (such as grams or milliliters), and then calculates the shortage through numerical subtraction. For items with a shortage greater than zero, the server generates a list of shortage items and converts the shortage into a suitable purchase recommendation quantity based on preset packaging specifications and commonly used purchasing units. For example, when the diet plan requires a total of 1800 grams of chicken breast but the inventory is only 800 grams, the server calculates the shortage as 1000 grams and can generate purchase candidate information of "recommended purchase of 2 packs of chicken breast" based on the specification of 500 grams per pack.

[0383] The server further utilizes the "Near Expiry Items" menu adjustment module to retrieve items from inventory whose shelf life is approaching. The server calculates the remaining shelf life of each inventory record by subtracting the date; when the remaining days are less than a threshold, the item is marked as nearing its expiry. The server then constructs appended prompts, embedding these near-expiry items as priority items into the text, for example: "Please readjust the menu based on the original weekly dinner plan, prioritizing the use of the following ingredients within the next 3 days: 400g chicken breast (expiring in 2 days) and 300g broccoli (expiring in 1 day). Please keep the total calories and nutritional composition roughly the same." The server, by re-invoking the generative AI model, obtains optimized candidate menus for near-expiry items. Internally, the server compares the lists of dishes with relevant dates in the old and new menus, selecting the option that meets energy and nutritional constraints while making full use of near-expiry items. This avoids food waste and maintains consistency with the overall dietary plan goals. This process, driven by inventory shelf-life data feedback, is not a simple "expiration reminder," but rather, through the interaction between prompts and the generative AI model, substantially embeds the inventory status into the plan generation algorithm.

[0384] In this invention, the terminal is primarily responsible for interacting with the user. After receiving display control information from the server, the terminal presents menu data, inventory status, insufficient items, and the results of executed or pending retrieval requests in the user interface in the form of a calendar view, list view, etc. Users can view all dishes for a given day and their approximate calories on the terminal, as well as a shopping list related to that period. The terminal allows users to manually confirm or modify purchase candidate information, such as merging purchase items or changing brands. The terminal returns the user's selection results to the server, which then updates the inventory data and retrieval request status accordingly. In this way, the server and terminal collaborate, enabling the system to not only complete abstract planning calculations but also form a closed-loop technical process through linkage with external supply services and actual physical food inventory.

[0385] From a computer technology perspective, this invention does not merely transfer the task of manually creating menus to a machine. Instead, it internally implements a mechanism for constructing conditional information for generative artificial intelligence models, an automatic verification and regeneration mechanism under multi-dimensional constraints, and a menu adjustment mechanism deeply coupled with inventory and shelf-life information. The server encapsulates input information into prompts, using these to control the Transformer-based generative AI model. This allows the model to satisfy multiple constraints simultaneously during a single inference process, reducing the complex computational steps of traditional methods based on multiple rule matching and iterative optimization, thus improving overall processing speed. Through a combination of structured parsing and cross-validation with a nutrition database, the server significantly reduces potential energy estimation biases in the model's output text, improving the numerical accuracy of the diet plan. By integrating inventory aggregation and difference calculation algorithms on the server side, and using efficient data structures and aggregation queries to achieve the required item statistics, this invention reduces the number of round-trip interactions between the terminal and the server, lowering communication load and terminal-side computational pressure.

[0386] Furthermore, when training the generative AI model, the server introduces a comprehensive loss function that addresses energy constraints, nutrient allocation, and emotional satisfaction, ensuring that the model's internal weight updates align with the overall system objective. This training strategy enables the model to possess inherent "multi-objective optimization" capabilities during generation, eliminating the need for extensive rule-based corrections after inference. This improves the effectiveness and throughput of each inference attempt within a given hardware resource limit. The server can select different scales of model parameters based on the deployment environment, allowing for a controllable trade-off between inference speed and output quality.

[0387] In other implementations, the server can replace the generative AI model with a smaller language model, or deploy a lightweight inference engine locally to adapt to scenarios with high real-time requirements or limited network conditions. The server can also be modularly designed, making the prompt generation module, inventory calculation module, and menu validation module independent and replaceable components to support different algorithm implementations. For example, prompt generation can use a rule-based template system or directly encode structured input into model input vectors; inventory difference calculation can use aggregate queries from relational databases or in-memory hash mapping and vectorized operations; the threshold condition for near-expiration items can be changed from a fixed number of days to dynamic adjustment based on historical waste rates.

[0388] In summary, by introducing the aforementioned modular data structure design, prompt statement generation strategy, generative artificial intelligence model invocation and training mechanism, inventory linkage algorithm, and terminal display and interaction mechanism on the server side, this invention provides a technical solution that enables collaborative optimization of diet plan generation and inventory management under multi-dimensional constraints within a computer. This achieves substantial technical improvements over traditional systems that rely on human experience and simple rules in terms of processing speed, planning accuracy, storage management efficiency, and communication load.

[0389] use Figure 13 The processing procedure is explained.

[0390] Step 1: The user enters basic information on the terminal. Users launch the application on their devices and enter the diet plan settings interface. In the interface, users input or select the number of family members and their basic attributes, nutrition-related information (target nutrients), energy-related information (daily target calories, approximate calories per meal), preference-related information (taste preferences, cooking method preferences), restriction-related information (allergenic foods, prohibited foods, religious or health restrictions), and status-related information (current emotional state, stress level, etc.).

[0391] Input: Various information fields entered by the user in the terminal interface.

[0392] The specific actions of the terminal are as follows: organize these fields into structured data objects, perform local mandatory field checks (e.g., cannot be empty, must be positive), and then send a request to the server using a security protocol through the communication module.

[0393] Output: Request data sent to the server containing user attribute information, nutrition-related information, energy-related information, hobby-related information, restriction-related information, and status-related information.

[0394] Step 2: The server receives and stores user input information. The server receives requests from the terminal and performs format parsing and field validation on the request body through the parsing module, verifying the field type and value range (e.g., calories are positive, date format is valid, allergy list is a string array).

[0395] Input: The structured request data sent by the terminal in step 1.

[0396] The server's specific data processing involves mapping the original request data to internal data structures (such as user configuration objects and target configuration objects), persisting these objects to the database, and generating a unique plan identifier for each setting.

[0397] Output: User settings records stored in the database and the plan identifier (plan_id) returned to the terminal.

[0398] Step 3: Server construction conditions specified information and prompts The server reads the corresponding user attribute information, nutrition-related information, energy goals, constraints, and status-related information from the database based on the plan_id.

[0399] Input: User settings records stored in the database (including family composition, target calories, nutritional needs, food allergies, emotional state, etc.).

[0400] The specific data processing by the server is as follows: The server first normalizes various input information into a set of internal parameters, such as standardizing energy units and mapping emotional states to labels (e.g., "high stress" or "depressed"). Then, the server selects a prompt template that matches the user's goal, uses a string template engine to fill the template with the above parameters, generates a complete natural language prompt statement, and combines it with other inference parameters (e.g., planning period, output format requirements) to form conditional information.

[0401] Output: Conditional information containing at least one prompt statement to control the generative artificial intelligence model to generate diet plan information.

[0402] Step 4: The server invokes a generative artificial intelligence model to generate a diet plan text. The server sends the specified conditions to the inference service port of the generative artificial intelligence model via the network interface, and sets inference parameters such as maximum generation length and sampling temperature.

[0403] Input: The condition specification information generated in step 3 (including prompt statements) and inference control parameters.

[0404] The server's specific data processing involves encoding the specified information into a request message, selecting the specified model version, recording the call time and tracking identifier, and then sending the request to the model service via the communication module. Internally, the generative AI model uses a Transformer structure to encode the prompts, performs matrix multiplication, self-attention weighting, and nonlinear transformations based on trained weights, and progressively outputs a multi-day, multi-meal meal plan text. The server receives this text result from the model service.

[0405] Output: The original meal plan text returned from the generative AI model (multiple lines or paragraphs of text describing the dishes, ingredients, and approximate calories for each day).

[0406] Step 5: The server parses and structures the diet plan text into menu data. The server parses the diet plan text output by the model, converting the natural language content into a standardized menu data structure.

[0407] Input: The diet plan text obtained in step 4.

[0408] The specific data processing by the server is as follows: The server uses pattern matching and regular expressions to identify and extract information such as date, meal marker (e.g., "Day 1 Dinner"), dish name, main ingredients, and calorie count. It assigns a unique ID to each record, standardizes the date to a uniform format, and converts calorie values ​​to numeric types. The server then constructs a collection of menu records containing fields such as date, meal number, dish name, ingredient list, and estimated calories.

[0409] Output: A structured set of menu data (menu data), which can be used for subsequent nutrition verification and inventory calculation.

[0410] Step 6: The server performs nutrition and energy checks and necessary regeneration controls. The server uses a local nutrition database to perform numerical verification on the menu data, checking whether the total energy and major nutrient distribution for each meal and each day meet the user-defined conditions.

[0411] Input: Menu data generated in step 5 and nutrition database table (ingredient-nutrient and energy mapping table).

[0412] The server's specific data processing is as follows: For each dish, the server retrieves the energy and nutrient content of each ingredient from the nutrition database based on the ingredient list and approximate quantities (if any) in the menu. It then calculates the total energy and major nutrients for each dish and the daily intake using linear calculations. The server compares these results with the user's energy intake and nutrient allocation criteria to determine if they exceed the upper or lower limits. If a significant discrepancy is found, the server generates additional prompts (e.g., requesting regeneration of the menu for certain days or adjustments for days with high calorie content) and invokes the generative AI model again for partial regeneration.

[0413] Output: Final menu data that has been verified and meets energy and nutrient constraints, as well as updated local menu data generated if necessary.

[0414] Step 7: The server calculates the total food requirements within the dietary plan period. The server summarizes the total usage of various ingredients within the dietary plan period based on the final menu data, forming an ingredient requirement table.

[0415] Input: The final menu data obtained in step 6.

[0416] The specific data processing by the server is as follows: The server iterates through all menu records, accumulating statistics on the ingredient list for each dish. For records containing quantity information, the server first standardizes the units (e.g., to grams or milliliters), then calculates the total demand for each ingredient throughout the entire planning period using aggregation operations (e.g., hash table summation or database aggregation query). For cases where the quantity is not specified, the server can estimate the usage based on preset default serving rules.

[0417] Output: A table of total food requirements, categorized by ingredient name and standard unit, including the total quantity required for each ingredient during the planning period.

[0418] Step 8: The server reads inventory information and performs difference calculation. The server reads the current inventory data from the inventory information table and compares it with the total food demand table to calculate the insufficient and surplus quantities.

[0419] Input: The total food demand table from step 7 and the current inventory information recorded in the database.

[0420] The server's specific data processing is as follows: The server establishes two mappings for each ingredient: a total demand mapping and an inventory mapping. The server matches ingredients by name and performs a difference calculation for each: Deficiency = Total Demand Total inventory. When the shortage is greater than zero, it is recorded as a shortage item; when the shortage is less than or equal to zero, it is recorded as sufficient inventory or possible remaining quantity. The server can also track food items with zero demand but existing inventory, preparing for subsequent near-expiry disposal.

[0421] Output: List of items in short supply (including ingredient name, total demand, inventory, and shortage) and inventory status information (including ingredient name, inventory, and possible remaining quantity).

[0422] Step 9: The server generates procurement candidate information and constructs the acquisition request data. The server generates specific procurement candidate information based on the list of insufficient items and prepares acquisition request data that can be sent to external supply services.

[0423] Input: The list of insufficient items in step 8, as well as the system's preset packaging specifications, commonly used purchasing units, and supply service parameters.

[0424] The specific data processing by the server is as follows: The server rounds up the quantity of each missing ingredient based on preset packaging specifications, for example, calculating the required number of packages in 500-gram units. According to the supply service interface requirements, the server maps ingredient names to standard category identifiers and constructs request entries containing fields such as category ID, quantity, and target delivery time. The server combines multiple entries into a single request data structure for subsequent automatic or semi-automatic transmission to the external supply service.

[0425] Output: Purchase candidate information to be displayed to the user (e.g., "Recommend purchasing 2 packs of chicken breast") and a data structure for sending retrieval requests.

[0426] Step 10: The server detects items nearing their expiration date and generates a menu adjustment prompt. The server identifies ingredients whose shelf life is about to expire from the inventory information, classifies them as near-expiration items, and constructs additional prompts for menu adjustments accordingly.

[0427] Input: Inventory information (including shelf life) recorded in the database and the current system time.

[0428] The server's specific data processing is as follows: The server calculates the remaining shelf life (expiration date minus the current date) for each inventory item and marks items with less than a preset threshold as nearing their expiration date. Then, based on the name and quantity of these items, the server synthesizes additional prompts, instructing the generative AI model to prioritize using these near-expiration items while maintaining a relatively stable overall energy and nutrient structure. For example: "Based on the existing 7-day dinner plan, please adjust the dinners for the next 3 days to ensure that the following ingredients are used up within 3 days: 400g chicken breast (expiring in 2 days) and 300g broccoli (expiring in 1 day). Please keep the total daily calories and nutritional composition roughly the same." The server uses the appended prompt as part of the new condition specification information and calls the generative artificial intelligence model again to generate a change candidate menu.

[0429] Output: A list of items nearing their expiration date, along with additional prompts and corresponding change candidate menu data for these items.

[0430] Step 11: The server integrates menu data, inventory and procurement information, and generates display control information. The server integrates the final menu data, inventory status, list of insufficient items, information on items nearing their expiration date, and procurement candidate information to generate control information for terminal display.

[0431] Input: The final menu data obtained in step 6, the inventory status information generated in step 8, the purchase candidate information generated in step 9, and the near-expiry items and change candidate menu generated in step 10.

[0432] The specific data processing by the server is as follows: The server sorts the menu data according to a timeline and adds corresponding inventory consumption and shortage information for each day. The server organizes insufficient items and procurement candidates into a shopping list structure, and associates near-expiry items with relevant change candidate menus. All of this data is encoded into a unified display control structure, indicating the content and layout of different areas (such as calendar area, inventory area, and shopping list area).

[0433] Output: Includes display control information for menu view, inventory view, shopping list view, and menu adjustment suggestions.

[0434] Step 12: The terminal displays the results and receives user feedback. The terminal obtains display control information from the server and presents it visually on the interface. Users can then make operation selections based on the displayed content.

[0435] Input: The display control information sent by the server in step 11.

[0436] The terminal's specific actions are: parsing and displaying control information, drawing the daily menu on the calendar or list interface, displaying insufficient items and procurement candidates in a list format, and highlighting items nearing their expiration date and corresponding menu adjustment suggestions in a separate area. Users can check on the terminal whether they agree to send an acquisition request and whether they accept certain change candidate menus. The terminal then repackages the user's choices and feedback into structured data and submits it to the server.

[0437] Output: A complete diet plan and inventory information interface displayed to the user, as well as feedback data generated by user actions (such as confirming an order, rejecting certain alternative menu items, etc.), which are used by the server to further update inventory records and request status.

[0438] Application Example 2 The process flow corresponding to the specific processing in Use Case 2 will be described below. The various parts of the system described below are implemented by the data processing device 12 and the intelligent device 14. In addition, the data processing device 12 is referred to as the "server" and the intelligent device 14 is referred to as the "terminal".

[0439] Existing computer technologies related to diet management suffer from the following problems: First, traditional systems typically make recommendations based solely on pre-defined rules or static recipe libraries. The computing devices do not fully utilize the user's multidimensional information (such as family composition, nutritional needs, calorie goals, dietary preferences, allergies, and emotional state) when generating menus, resulting in insufficient personalization and recommendations that deviate significantly from the user's actual needs. Second, even when some systems incorporate machine learning or recommendation algorithms, their processing flows are often scattered across multiple independent modules. There is a lack of unified data flow control between menu generation, nutritional calculations, inventory verification, and external ordering, leading to low efficiency in computer resource utilization. Developers need to write extensive glue code to move and convert data between different services, increasing system complexity and maintenance costs.

[0440] In addition, when calling generative artificial intelligence models, most existing systems simply send the user's text input directly to the model without an automatic mechanism for constructing targeted prompts. This makes it impossible to fully constrain energy conditions, nutritional conditions, user history behavior, and emotional state on the model input side, resulting in unstable model output and poor controllability. The system has to perform a lot of remedial filtering and correction after the output, which increases the computational burden and prolongs the response time.

[0441] Furthermore, regarding inventory and order processing, traditional solutions often separate menu generation from inventory management and external ordering services: the menu module only generates dish names or ingredient lists, while other independent programs or manual interfaces are used to connect to the inventory system and e-commerce platform. This decentralized architecture results in data redundancy, duplicate interface calls, and complex error handling. Computing devices struggle to achieve closed-loop automation of the entire process from "multi-dimensional user information input" to "structured menu output," "out-of-stock ingredient identification," and "automatic ordering," leading to a poor user experience.

[0442] Furthermore, existing technologies mostly utilize "emotional states" at the level of simple label display or statistics, without being tightly coupled with menu generation algorithms and prompt statement construction processes. Computer systems cannot adjust the content of prompt statements and the set of candidate ingredients through emotion-driven adjustments, thereby failing to achieve optimized control of emotional goals such as "relieving stress" and "sharing joy" at the generative artificial intelligence model level.

[0443] Therefore, it is evident that designing a unified data processing flow within a computer, enabling the server to: (1) Automatically acquire and comprehensively utilize the user's multidimensional information (including family structure, nutrition and calorie goals, preferences, allergies, emotional state and historical behavior); (2) Based on this, the nutritional data are processed to generate a candidate diet group that meets the constraints; (3) Automatically construct high-quality, controllable prompt statements and call generative artificial intelligence models to obtain structured menu output; (4) Tightly couple the menu output with inventory data and external item service interfaces to automatically complete out-of-stock identification and ordering; (5) Dynamically adjust subsequent prompts based on users' historical selections and evaluations, thereby continuously optimizing the model output; Achieving integrated control and optimization of menu generation, nutrition calculation, emotional response, inventory management, and external ordering within the same computing system is a technical challenge that urgently needs to be addressed in this field.

[0444] The specific processing performed by the specific processing unit 290 of the data processing apparatus 12 in Application Example 2 is achieved by the following means.

[0445] In this invention, the server includes: a device for acquiring user-related information, including family composition, essential nutrients, calories, user preference information, restriction information, and emotional state; a device for filtering and calculating candidate diet data based on the user-related information and referring to a dataset containing nutritional information, extracting and generating a group of candidate diets that meet predetermined energy and nutritional conditions; a device for automatically generating prompts based on the user-related information and the candidate diets, inputting the prompts into a generative artificial intelligence model, and inputting the prompts into the generative artificial intelligence model to obtain output information, including diet menus and their descriptions; and a device for calculating the required types and quantities of ingredients for each diet menu in the output information and comparing them with... A device for comparing user food inventory information to determine insufficient ingredients and generating a list of insufficient ingredients; a device for generating and sending order data through a communication interface for external items to provide services based on the list of insufficient ingredients, thereby automatically executing item acquisition processing and obtaining order information and delivery information; a device for displaying the menu, list of insufficient ingredients and order information on a user terminal with an operable interface, and receiving menu change instructions or order content change instructions to recalculate and update the menu, list of insufficient ingredients and order data; and a device for accumulating user menu selection history and evaluation information, and adjusting the content of subsequent prompts based on the accumulated information, so that the menu proposals of the generative artificial intelligence model gradually adapt to user preferences and behavioral history. This allows for the formation of an end-to-end data processing chain within the same server, encompassing multi-dimensional user information collection, nutrition and energy constraint calculations, automatic construction of prompt statements, invocation of generative artificial intelligence models, structured menu generation, inventory comparison, and external order execution. This reduces redundant data transmission and manual integration between modules, enhancing the automation, controllability, and processing efficiency of the computer system in menu generation and material management tasks. Furthermore, by optimizing prompt statements driven by emotional states and user historical behavior, the relevance and stability of the generative artificial intelligence model's output are improved, thereby achieving an improvement in computer technology itself.

[0446] A "system" refers to a collection consisting of at least one server, at least one user terminal, and a communication network for transmitting data between them, which performs processes such as menu generation, inventory management, and order control through hardware and software collaboration.

[0447] A "server" is a computing device equipped with a processor, memory, and communication interface, and used to execute programs such as user information processing, data computation, generative artificial intelligence model invocation, inventory comparison, and external service communication.

[0448] "User terminal" refers to an electronic device operated by a user for inputting user-related information and displaying server output results, including but not limited to smartphones, tablet computers, personal computers or other information processing devices with graphical user interfaces.

[0449] "User-related information" refers to a set of data related to a specific user and their family, including at least family composition, essential nutrients, calories, user preference information, restriction information, and emotional state, which is used to guide the generation and subsequent processing of diet menus.

[0450] "Family composition" refers to structured information representing the number of family members, their age groups, relationship attributes, and their individual dietary needs, used to determine the number of diners, portion sizes, and nutritional distribution.

[0451] "Essential nutrients" refers to the types of nutrients recommended for maintaining health and their target intake levels, including but not limited to protein, fat, carbohydrates, vitamins, minerals, and dietary fiber.

[0452] "Calories" refers to numerical information related to the amount of energy contained in food, used to measure and control the total energy intake within a predetermined time period.

[0453] "User preference information" refers to various data that reflect users' preferences and tendencies in terms of food, including ingredients that users like or dislike, cooking methods, taste preferences, and commonly used dishes.

[0454] "Restriction information" refers to information regarding the prohibition or restriction of intake of specific foods or nutrients based on factors such as health status, religious beliefs, lifestyle, or doctor's advice.

[0455] "Emotional state" refers to the identifying information of a user's psychological or emotional state at a specific point in time, including but not limited to stress, pleasure, sadness, fatigue, etc., which is used to adjust the selection and recommendation of diet menus.

[0456] A “dataset” refers to a collection of multiple records stored in a database or other searchable storage structure, used to store structured data such as nutritional information, food information, and the mapping between emotions and food.

[0457] "Nutritional information" refers to data on the nutritional components of ingredients or dishes, including the quantity and energy value of various nutrients per unit mass or per serving of food.

[0458] "Dietary candidates" refers to a selection of individual meals or dish combinations that can be chosen within a specified time period, based on preliminary screening of user-related and nutritional information.

[0459] "Reserved time period" refers to the time range set by the system when planning menus and calculating nutrition, including but not limited to one meal, one day, multiple days, or one week.

[0460] "Energy quantity" refers to the total energy value obtained by summing or converting the calories of the ingredients or dishes that make up a dietary candidate.

[0461] "Nutrient quantity" refers to the quantity information of each nutrient in a dietary candidate in a specific unit of measurement, including the total amount of a single nutrient or multiple nutrients.

[0462] "Energy conditions" refer to constraints set for energy levels, including maximum intake, minimum intake, or target range, used to control the energy levels of dietary candidates.

[0463] "Nutritional conditions" refer to the constraints set for essential nutrients, including the target intake range, upper and lower limits, and proportion requirements for each nutrient.

[0464] A “dietary candidate group” refers to a set of multiple dietary candidates that meet predetermined energy and nutritional conditions, which serves as the basis for generative artificial intelligence models to select and optimize menus.

[0465] "Generative artificial intelligence models" refer to artificial intelligence models that use machine learning and deep learning techniques to generate corresponding text or other output results based on input text or structured data.

[0466] "Prompt statements" refer to natural language or structured text inputs constructed to guide generative artificial intelligence models to output results according to predetermined intentions. These inputs contain user-related information, constraints, and generation requirements.

[0467] "Output information" refers to the result data generated and returned by the generative artificial intelligence model after receiving prompts, including menus, explanations, and other relevant text or structured content.

[0468] A “meal menu” is a combination plan consisting of one or more dishes for one or more meal times, and may include information on time, portion size and nutritional content.

[0469] "Explanatory information" refers to the written explanations related to the food menu or its constituent dishes, including reasons for recommendation, nutritional advantages, and descriptions of suitability for emotional states.

[0470] "Ingredients" refers to the raw materials or semi-finished products used in cooking and preparing dishes on a menu, including agricultural products, livestock products, aquatic products, seasonings, and processed foods.

[0471] "Food inventory information" refers to the recorded data about the types, quantities, shelf life, and storage status of the food items currently held by the user.

[0472] "Insufficient ingredients" refers to a situation where the required quantity of ingredients calculated based on the menu is greater than the user's available inventory.

[0473] The "List of Insufficient Ingredients" refers to a structured list of all insufficient ingredients, including information such as ingredient name, required quantity, current quantity, and quantity shortfall.

[0474] "External goods providing services" refers to external service systems that provide the sale and delivery of goods through the internet, including e-commerce platforms, fresh food delivery services, and other logistics supply services.

[0475] "Communication interface" refers to the hardware and software interface through which a server provides services and exchanges data with external devices, including network protocol interfaces, application programming interfaces, and message transmission channels.

[0476] "Ordering data" refers to structured data generated to complete the ordering of goods in the service of external goods, including product identification, quantity, delivery address, delivery time and payment information.

[0477] "Item acquisition processing" refers to the entire process of actually obtaining the required items by sending order data to external items and receiving their responses.

[0478] "Order information" refers to structured data returned by external services that corresponds to the order request, including order number, status, details, and amount.

[0479] "Delivery information" refers to data related to the transportation and delivery of ordered items, including delivery method, estimated delivery time, logistics trajectory, and receipt status.

[0480] "User display screen" refers to the graphical user interface that presents the food menu, list of unavailable ingredients, order information, and related operation elements sent by the server on the user's terminal.

[0481] "Interactive elements" refer to interface components in the user's display screen that allow users to interact and control them, including buttons, checkboxes, lists, sliders, and input boxes.

[0482] "Menu change command" refers to the input command that the user uses to modify the generated food menu through operation elements, including replacing dishes, adjusting portion sizes, or changing dining time.

[0483] "Order content change instruction" refers to the input instruction that a user enters to modify or cancel order data that has already been generated or sent.

[0484] "Recalculation and Update" refers to the process of recalculating, replacing, writing, and synchronizing relevant data and calculation results after receiving menu change instructions or order content change instructions.

[0485] "Menu selection history" refers to the user's selection record of the food menus provided by the system over a period of time, including adopted menus, replaced dishes, and actual execution status.

[0486] "Evaluation information" refers to subjective feedback data from users on the generated food menu or individual dishes, including ratings, tags, reviews, or preference markers.

[0487] "Accumulated information" refers to the sum of information about user menu selection history and evaluations stored and gradually expanded by the system over a long period of operation, which is used for subsequent analysis and model optimization.

[0488] "Adapting to user preferences and behavioral history" refers to using accumulated information to adjust prompts and menu generation logic so that the output of generative artificial intelligence models gradually approaches the selection patterns and taste preferences exhibited by users over a long period of time.

[0489] In one embodiment of the present invention, the server is a computer system, including a processor, main memory, non-volatile storage device, and network interface. The server interacts with multiple terminals via a communication network. The terminals can be smartphones, tablets, personal computers, etc., and internally include a display device, input device (touchscreen, keyboard, microphone, camera, etc.), and a communication module for communicating with the server. Users input food-related information through the terminal and receive menus and order results.

[0490] I. Hardware and Software Composition At the hardware level, the server can utilize a general-purpose server hardware platform, including a multi-core central processing unit, dynamic random access memory (DRAM), large-capacity solid-state storage (SSD), and a network adapter. At the software level, the server can run a general-purpose operating system and deploy server-side applications on it. Server-side applications can be implemented using the Python language, and the middleware used can include web application frameworks, application servers, and database management systems.

[0491] For data management, the server can use a relational database management system, such as a general relational database, to store user-related information, nutritional information, menu history, ingredient inventory information, and order information. For data analysis, the server can use a data processing library, such as a data table processing library, to filter, aggregate, and statistically analyze nutritional tables, ingredient tables, and historical records.

[0492] In terms of sentiment analysis and generative AI processing, the server can invoke external AI service interfaces. Sentiment analysis can utilize general natural language processing services or sentiment analysis APIs to parse user text or analysis results uploaded by the terminal. Generative AI models can be deep learning-based language models, such as generative AI models based on the Transformer architecture. The server sends prompts to this model service via a network interface and receives the generated results in text form.

[0493] The terminal can be a mobile terminal or a desktop terminal in terms of hardware architecture. The terminal runs terminal applications, which can be native applications or browser-based web applications. The terminal applications are responsible for presenting the input interface and menu interface to the user and communicating with the server via protocols such as HTTP or WebSocket.

[0494] Users input information such as family composition, essential nutrients, calorie goals, dietary preferences, restrictions (e.g., allergies), emotional state, and whether auto-ordering is allowed via the terminal. After basic validation of the user input, the terminal sends the structured data to the server via the network.

[0495] II. Functional Modules and Data Structures of the Server-Side Program In one implementation, the program modules inside the server can be divided into: The server includes a user information management module.

[0496] The server uses a user information management module to receive user-related information from the terminal and stores it in the database. User-related information can be organized according to a data table structure, such as: family table, nutrition goal table, preference table, restriction table, mood log table, inventory table, and historical menu table. Each data table has primary key and foreign key fields to enable the server to efficiently access user data when performing queries and join operations.

[0497] The server includes a nutrient calculation module.

[0498] The server uses a nutrition calculation module to reference a pre-stored nutrition database. This database contains the energy value, nutrient content, and allergen markers for each ingredient or dish. The nutrition database can be stored in a relational table format, with indexes for ingredient IDs and nutrient composition fields. The server executes multi-field conditional queries through the nutrition calculation module to filter out candidate records that do not contain restricted ingredients and calculates the total energy and major nutrients for each candidate dish.

[0499] The server includes a diet candidate generation module.

[0500] The server uses a diet candidate generation module to perform combined calculations on a nutrition database based on the user's calorie and essential nutrient goals. The server can allocate the total daily energy goal across multiple meals, such as breakfast, lunch, and dinner, and generate candidate combinations that meet the corresponding energy and nutritional requirements for each meal period. Internally, the server uses data structures (such as lists and dictionaries) to record the set of dishes, total energy, and key nutritional indicators for each candidate combination, providing a basic candidate set for subsequent calls to generative artificial intelligence models.

[0501] The server includes a prompt statement generation module.

[0502] The server uses a prompt generation module to construct prompts in natural language based on user-related information and dietary candidate groups. These prompts include: family composition, total energy limit, energy goals for each meal, user preferences and restrictions, emotional state, and candidate dish names. By converting this structured information into natural language text, the server provides explicit instructions to the generative AI model on the input side, enabling it to more consistently generate menus that meet the constraints on the output side.

[0503] For example, the server can generate the following Chinese prompt: User family composition: 2 adults and 1 10-year-old child.

[0504] Health goal: The whole family will lose an average of 2kg within one month.

[0505] Daily total calorie restriction: approximately 1800 kcal.

[0506] Dietary preferences: Likes chicken breast and broccoli, dislikes animal offal.

[0507] Allergy information: Allergic to nuts and seafood.

[0508] Current emotional state: High work pressure, hoping for a comforting dinner that isn't too greasy.

[0509] Please consider the following optional dishes under these conditions: 1. Stir-fried broccoli and chicken breast 2. Tomato and Egg Soup 3. Cucumber Salad 4. Roasted Pumpkin Salad Generate a complete menu for today's dinner, including: 1 main course, 1-2 side dishes, and 1 soup.

[0510] Please provide the name of each dish, its main ingredients, estimated calories, and a brief explanation in Chinese as to why it is suitable for your current mood and weight loss goals.

[0511] The server can also generate prompts tailored to weight loss goals, such as: The user's weight loss goal is to lose 2kg within one month.

[0512] Current weight: 60kg, height: 160cm.

[0513] Recommended daily calorie intake: approximately 1500 kcal.

[0514] Users like: vegetable salads, roast chicken, and soy products.

[0515] Users dislike: Offal food.

[0516] Please design a low-calorie three-day meal plan, with three meals a day, and provide an approximate calorie estimate for each meal.

[0517] The server includes a generative artificial intelligence invocation module.

[0518] The server sends prompts to the language model service via a generative AI invocation module. This language model can be implemented as a deep neural network based on the Transformer architecture, consisting of multiple layers of self-attention layers, feedforward layers, and normalization layers. The model input is a segmented text sequence, represented as an embedding vector. The model calculates the dependencies between words at different positions using a multi-head self-attention mechanism and performs a non-linear transformation on each position using a feedforward network. During training, the model can use the cross-entropy loss function, employing a large amount of natural language corpus and domain-specific corpus as training data, and updates the network weights through backpropagation and gradient descent algorithms.

[0519] In this embodiment, the server does not train the model parameters online. Instead, it uses pre-trained weights to adjust the structure and content of the prompts based on a small number of samples and system feedback. When calling the generative AI model, the server can set temperature parameters and maximum output length to balance the diversity and controllability of the generated results.

[0520] The server includes an output parsing module.

[0521] The server uses an output parsing module to parse the text returned by the generative AI model. This module uses regular expression matching, segmentation rules, or keyword-based segmentation methods to extract fields such as dish name, main ingredients, estimated calories, and reasons for recommendation from the generated text. The server then converts the parsed results into structured data records for subsequent inventory comparison and display.

[0522] The server includes an inventory comparison module.

[0523] The server uses an inventory comparison module to calculate the total demand for each ingredient based on the parsed menu list. The server can use a data structure to map ingredient names to uniform ingredient IDs, maintain the serving size for each ID, and then multiply by a corresponding coefficient based on the number of family members to obtain the total ingredient demand for each menu item and the daily menu. The server reads the current ingredient inventory from the inventory database (or an inventory data source interfaced with spreadsheet software), performs a difference calculation on each ingredient, and determines the quantity of insufficient ingredients and the shortfall.

[0524] The server includes an external ordering module.

[0525] The server communicates with external goods services using an external ordering module. These external goods services can be provided by a general online goods supply system, offering interfaces for querying product information, placing orders, and checking order status. The server maps internal ingredient IDs to external product IDs and generates order data based on the list of unavailable ingredients, including product ID, order quantity, delivery address, and expected delivery time. The server sends order requests via HTTP or a message queue and receives order confirmation and delivery information. The server stores the order number, expected delivery time, and real-time status in the database.

[0526] The server includes a module for optimizing historical feedback and prompt statements.

[0527] The server uses a historical feedback and prompt optimization module to record user acceptance of generated menus, including whether users selected the menu, replaced a dish, and user ratings and reviews. The server periodically or after a certain number of interactions analyzes this historical data to construct user preference statistics, such as frequently selected dishes, frequently replaced dishes, and preference trends. When generating subsequent prompts, the server incorporates these statistical results into the prompt conditions, for example, explicitly stating, "Historical feedback shows that a certain dish has a very high rating, and a certain type of dish is frequently replaced; please prioritize the former and reduce the latter in the new menu."

[0528] III. Terminal-side program functions and user interaction The terminal includes a user interface module.

[0529] The terminal uses a user interface module to present users with a configuration interface and a menu interface. In the configuration interface, users can input family composition, daily calorie limit, nutrients requiring special attention, preferred dishes, allergy information, and whether to use the automatic ordering function. The terminal can provide an emotion input interface, allowing users to describe their mood for the day in a text box, or select from preset options such as "stressed," "happy," or "fatigued."

[0530] The terminal includes a communication module.

[0531] The terminal uses its communication module to structure the above information into a request message and sends it to the server via the network. After receiving the menu, inventory shortage, and order information returned by the server, the terminal parses the response and displays the corresponding content on the interface according to meal time and dishes.

[0532] The terminal includes a feedback input module.

[0533] The terminal uses a feedback input module to receive user actions on the recommended menu, such as confirming use, replacing individual dishes, adjusting the number of people and portion sizes, and rating and commenting on the dishes. The terminal sends this feedback back to the server, which then updates the user's historical data and subsequent prompts accordingly.

[0534] When using the terminal system, users only need to input natural language and select simple options, and the system will automatically complete complex nutrition calculations, menu generation, and inventory ordering operations.

[0535] IV. Technical Effects and Improvements in Computer Technology By implementing a unified data structure and processing flow internally, the server integrates modules such as "user multidimensional information," "nutrition database," "generative artificial intelligence model interface," "inventory system interface," and "order interface" into an end-to-end data stream. Compared to traditional distributed implementations, the server reduces the number of times data formats are converted back and forth between different systems, thereby reducing communication overhead and serialization / deserialization burden, and improving overall processing speed.

[0536] Before generating dietary candidate groups, the server preprocesses the data using a nutrition calculation module and constraints, ensuring that the candidate range entering the generative AI model already meets calorie and nutritional constraints, thus narrowing the search space the model needs to process. This pre-filtering process reduces the number of results in the model output that do not meet the hard conditions, shortens post-processing time, and reduces the number of adjustments required by the user.

[0537] The server uses a prompt generation module to encode structured constraints (energy conditions, nutritional conditions, preferences, historical feedback, and emotional states) into natural language prompts. Because the prompts explicitly express the constraints and optimization objectives, the generative AI model internally assigns higher weights to these keywords through an attention mechanism. This results in generated results that are more focused on regions that meet the conditions, significantly improving output accuracy compared to simply inputting user text.

[0538] The server uses a historical feedback and prompt optimization module to convert users' past selection history and evaluation information into periodic adjustments to the prompts. This "online adaptation at the prompt level" avoids frequent fine-tuning of model parameters. Without changing the model weights, it can gradually approximate individual user preferences by changing the input commands, thus reducing training costs and operational complexity from a system architecture perspective.

[0539] Furthermore, the server embeds a mapping table between emotional states and ingredient types into the menu generation process, rather than simply displaying emotional labels. When generating food candidates and constructing prompts, the server explicitly incorporates emotion-related constraints and preferences; for example, it favors including ingredients with a calming effect when the user is under stress. This emotion-driven rule is not simply an automated version of human intuition, but rather, through collaboration with a nutrition database and historical feedback, it forms a computationally repeatable set of non-conventional rules. This helps to systematically improve the match between the menu and the user's psychological state in actual operation.

[0540] The server employs a modular data flow and caching strategy. When frequently accessing the nutrition and inventory databases, indexes and caching reduce redundant queries, improving database access efficiency. Menus generated in the same batch can share some nutrition calculation results, avoiding duplicate calculations in different modules and thus improving computational efficiency.

[0541] Through the above-described structure, the system of this invention not only integrates menu proposal and inventory ordering at the business process level, but also organically integrates data flow, algorithms, and artificial intelligence model invocation methods at the internal computer structure level, achieving technical effects such as improved processing speed, enhanced result accuracy, optimized database access, and reduced communication load. These effects stem from the introduction of specific data structures, prompt generation strategies, and pre-filtering algorithms within the server, rather than simply automating existing manual operations.

[0542] V. Other Implementation Forms In another implementation, the server can deploy a local language generation model instead of calling external generative AI services. In this case, the server can store model parameters locally and perform inference via a graphics processing unit or dedicated accelerated hardware. The server can fine-tune the model for its domain and further train it using food-related dialogue corpora to better adapt it to the menu generation task. Model training can employ supervised learning, updating weights by minimizing the cross-entropy loss function between the predicted and reference texts.

[0543] In another implementation, the server can use a graph or tree structure to represent the relationship between menu items and ingredients, and perform a graph search on that structure to calculate certain nutritional indicators or alternatives. For example, when a user replaces a dish, the server can search the graph structure for neighboring nodes that are "nutritionalally similar but lower in calories" to quickly provide alternative suggestions.

[0544] In another variation, the terminal can integrate a local lightweight emotion recognition module to preprocess user facial expressions or speech, obtain simple emotion tags, and then transmit them to the server. This reduces the burden on the server in raw signal processing and lowers network bandwidth usage.

[0545] This invention can also be applied to different usage scenarios, such as providing customized dietary plans for special groups (e.g., the elderly, patients with chronic diseases, athletes, etc.). The server only needs to add the corresponding health indicators and restrictions to the user's relevant information, and the nutrition calculation module and prompt statement generation module can adjust according to these parameters to generate corresponding candidate groups and prompt statements.

[0546] Through the description of the above embodiments, it can be seen that the system of the present invention forms a continuous technical processing chain from multi-dimensional user information to structured food menus, and then to inventory management and item ordering through the cooperation of the server, terminal and user. Furthermore, it achieves technical improvements in menu generation quality and overall system performance through generative artificial intelligence models and prompt statement strategies.

[0547] use Figure 14 The processing procedure is explained.

[0548] Step 1: Users enter basic configuration information on the terminal.

[0549] Users use the graphical interface on the terminal to enter information in the form, such as family composition, daily calorie target, essential nutrients to watch out for, dietary preferences (favorite / disliked ingredients and dishes), restrictions (allergies or religious taboos), health goals (e.g., weight loss goals), and whether to allow automatic ordering.

[0550] Input: The raw text and option data that the user enters item by item in the interface.

[0551] The terminal performs format validation and mandatory field checks on the input, converts each field into structured data (for example, splits "family of 3: 2 adults and 1 child" into number of people and age range fields), and encapsulates it into a request message.

[0552] Output: Structured data containing user configuration information, ready to be sent to the server over the network.

[0553] Step 2: The terminal sends the user's basic configuration information to the server.

[0554] The terminal uses the communication module to send the structured user configuration data generated in step 1 to the server's predetermined interface address via a network protocol (e.g., HTTPS POST).

[0555] Input: User configuration data object.

[0556] Before sending, the terminal adds a user identifier and timestamp to the data, encodes the message (e.g., JSON), and writes it into the HTTP request body.

[0557] Output: The request message transmitted to the server, and a "configuration sent" status recorded locally on the terminal.

[0558] Step 3: The server receives and stores basic user configuration information.

[0559] The server receives request messages from the terminal at the application layer, parses the HTTP headers and message bodies, and maps the JSON content to the internal user configuration model.

[0560] Input: A request message containing user configuration information.

[0561] Based on the data table structure, the server writes information such as family composition, nutritional goals, calorie goals, preferences, and restrictions into the corresponding database tables, and generates or updates user IDs and foreign key associations for each user. The server performs integrity checks before writing, such as checking numerical ranges and field types.

[0562] Output: User configuration records persisted to the database, and confirmation responses (such as status codes and success messages) returned to the terminal.

[0563] Step 4: Users input their mood and special needs for the day on the terminal.

[0564] Users can enter a text describing their mood for the day in the terminal interface (e.g., "I'm very tired and stressed today"), or select tags such as "stressed", "happy", or "sad" from preset options. They can also add special requests for the day (e.g., "I want to eat something light tonight").

[0565] Input: The user's emotional text, emotional options, and special request text.

[0566] The terminal integrates text and options into a structured object and can optionally invoke local or cloud-based emotion recognition services to convert text or multimodal information into emotion tags (such as "stress") and confidence levels.

[0567] Output: Emotional information data including emotion tags, emotion scores, and original descriptions, ready to be sent to the server.

[0568] Step 5: The terminal sends the emotion information to the server.

[0569] The terminal uses the communication module to package the emotion information object obtained in step 4 into a request message and send it to the specified interface of the server (e.g., ` / api / user / emotion / today`).

[0570] Input: emotion tag, emotion score, original description, and user identifier.

[0571] The terminal appends the current date when constructing the request, so that the server can keep daily records.

[0572] Output: The emotion information message that arrives at the server.

[0573] Step 6: The server records the user's emotional state for the day and updates the user's emotional log.

[0574] The server parses the emotion information request and extracts the user ID, date, emotion tag, emotion score, and original text.

[0575] Input: Emotional information message.

[0576] The server inserts a new record into the emotion log table, or updates an existing record based on the user ID and date; at the same time, the server can label emotion tags with categories (such as "negative emotion" or "positive emotion") according to preset rules.

[0577] Output: The updated emotion log record, and the emotion status field that can be used for subsequent queries.

[0578] Step 7: The server reads user configurations and the nutrition database to generate preliminary diet candidates.

[0579] The server reads the user's family composition, calorie goals, essential nutrient goals, dietary preferences, and restriction information from the database.

[0580] Input: User configuration records and nutrition database records.

[0581] The server uses a nutrition calculation module to filter and calculate the energy value, nutrient content, and allergy labels of each ingredient or dish in the nutrition database: filtering out records containing allergens or ingredients that the user dislikes; allocating the total daily calories to different meal times based on the number of family members and the target calorie intake, and selecting several dish combinations that meet the energy and nutritional constraints for each time period to form a dietary candidate list.

[0582] Output: Dietary candidate groups divided by meal time period, each candidate containing a list of dishes and their total energy and major nutrient indicators.

[0583] Step 8: The server generates prompts based on user information and dietary options.

[0584] The server uses a prompt statement generation module to combine the dietary candidate groups obtained in step 7 with the user's family composition, calorie restrictions, preferences, restriction information, and emotional state, and convert them into natural language descriptions.

[0585] Input: User-related information (including mood), dietary candidate groups.

[0586] The server concatenates text within the program, explicitly listing constraints and candidate dish names, and then uses imperative statements to request the generative AI model to output the complete menu and explanation. For example: "User family composition: 2 adults and 1 10-year-old child."

[0587] Health goal: The whole family will lose an average of 2kg within one month.

[0588] Daily total calorie restriction: approximately 1800 kcal.

[0589] Dietary preferences: Likes chicken breast and broccoli, dislikes animal offal.

[0590] Allergy information: Allergic to nuts and seafood.

[0591] Current emotional state: High work pressure, hoping for a comforting dinner that isn't too greasy.

[0592] Please consider the following optional dishes under these conditions: 1. Stir-fried broccoli and chicken breast 2. Tomato and Egg Soup 3. Cucumber Salad 4. Roasted Pumpkin Salad Generate a complete menu for today's dinner, including: 1 main course, 1-2 side dishes, and 1 soup.

[0593] Please provide the name of each dish, its main ingredients, estimated calories, and a brief explanation in Chinese as to why it is suitable for your current mood and weight loss goals. Output: The complete text of the prompts for generative artificial intelligence models.

[0594] Step 9: The server calls a generative artificial intelligence model to obtain the menu output.

[0595] The server uses the generative artificial intelligence invocation module to send the prompt statement generated in step 8 to the generative artificial intelligence model (e.g., a language model based on the Transformer architecture) through the model service interface.

[0596] Input: Prompt text.

[0597] The server sets parameters such as model name, maximum generation length, and generation temperature in the request. The generative artificial intelligence model is based on an internal multi-layer self-attention network structure. It performs attention calculations on the constraints and candidate list in the prompt statement, uses the trained parameters to predict the probability distribution of the next word, and gradually generates text paragraphs containing menu options, dish names, main ingredients, estimated calories, and reasons for recommendation.

[0598] Output: Generated text containing a complete menu description.

[0599] Step 10: The server parses the model output and structures the menu information.

[0600] The server uses the output parsing module to segment the natural language text returned in step 9 according to keywords (such as "main dish:", "side dish:", "soup:") and uses rules to extract the dish name, main ingredients and calorie value.

[0601] Input: Text output by the generative artificial intelligence model.

[0602] The server will construct a structured record for each dish it parses, uniformly map the ingredient name as the ingredient ID, convert the calories into a numerical field, and mark the meal and type (main dish, side dish, soup) to which each dish belongs.

[0603] Output: A structured collection of menu data for subsequent inventory calculations and display.

[0604] Step 11: The server calculates the total amount of ingredients required based on the menu.

[0605] The server extracts the required ingredients and single-serving reference quantities for each dish from the structured menu data, and calculates the total ingredient requirements for each dish by multiplying the number of family members by a number coefficient.

[0606] Input: Structured menu data, family composition information, and single-serving dosage parameters.

[0607] The server aggregates the ingredient requirements for all dishes, sums the ingredients by weight or quantity for the same ingredient ID, and generates a list of ingredient requirements for the whole meal or the whole day.

[0608] Output: A total demand list sorted by ingredient ID, including ingredient name, quantity, and unit.

[0609] Step 12: The server compares the demand for ingredients with the available inventory to generate a list of insufficient ingredients.

[0610] The server reads the quantity and unit of each ingredient currently held by the user from the inventory database, and matches these inventory records with the demand list in step 11 using the ingredient ID.

[0611] Input: Total ingredient demand list, ingredient inventory record.

[0612] The server calculates the difference between "demand quantity and inventory quantity" for each ingredient. If the result is greater than zero, the ingredient is considered insufficient and the shortage quantity is recorded. Ingredients with a result less than or equal to zero are marked as having sufficient inventory.

[0613] Output: A list of insufficient ingredients, with each record including the ingredient name, required quantity, inventory quantity, and shortage quantity.

[0614] Step 13: The server generates and sends order data to external items to provide services.

[0615] The server determines whether the user has enabled the automatic ordering function. If enabled, it maps the insufficient ingredient list to product IDs, converting the internal ingredient IDs to product IDs used by the external service.

[0616] Input: List of insufficient ingredients, user's delivery address information, and service mapping table.

[0617] The server constructs an order data object containing the product ID, quantity ordered, shipping address, and expected delivery time, and sends the order request through the communication interface of the external service provider (such as a REST API). The external service returns the order number, price, and estimated delivery time.

[0618] Output: The formally submitted order request, along with the corresponding order and delivery information, is stored in the server's order table.

[0619] Step 14: The server integrates the menu, insufficient ingredients, and order information and returns them to the terminal.

[0620] The server integrates the structured menu data, the list of insufficient ingredients, and the generated order information into a single response data object.

[0621] Input: Menu data, list of missing ingredients, order records.

[0622] During integration, the server adds a recommendation text to each dish, marks the "order placed" or "user confirmation required" status for insufficient ingredients, and includes the order number and delivery time in the order information.

[0623] Output: A response message sent to the terminal, containing comprehensive information on the menu, inventory, and orders.

[0624] Step 15: The terminal displays menus and order information and receives user feedback.

[0625] The terminal receives the response message from the server and parses out the menu list, the status of insufficient ingredients, and the order information. The menu is displayed on the graphical interface by meal, and the insufficient ingredients and delivery status are listed in a separate area.

[0626] Input: Server's overall response data.

[0627] The terminal provides operation elements for each dish (such as "Replace," "Adjust Portion," and "Rate" buttons) and "Confirm" and "Cancel" entry points for orders. Users can make minor adjustments to the recommended menu or rate certain recommended dishes. The terminal collects user operations and feedback and converts them into structured feedback data.

[0628] Output: Structured data mapping user feedback, ready to be sent back to the server.

[0629] Step 16: The server receives user feedback and updates the history and prompt message strategy.

[0630] The server parses the feedback messages sent by the terminal, including the user's final menu selection, the replaced dishes, user ratings, and reviews.

[0631] Input: User feedback data.

[0632] The server writes this feedback into the historical menu table and evaluation table, calculates the frequency of each dish being adopted and discarded, and adds constraint text to the subsequent generated prompts, such as stating "a certain type of dish has been frequently replaced historically and should be recommended less frequently." Based on this, the server dynamically adjusts the description and order of candidate dishes in the prompts, so that the next time the generative AI model is called, it is more likely to output a menu that conforms to the user's long-term preferences.

[0633] Output: Updated history and new prompt parameters, used for the next round of menu generation processing.

[0634] The specific processing unit 290 sends the result of the specific processing to the smart device 14. In the smart device 14, the control unit 46A causes the output device 40 to output the result of the specific processing. The microphone 38B acquires sound representing user input regarding the result of the specific processing. The control unit 46A sends the sound data representing user input acquired by the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the sound data.

[0635] Data generation model 58 is a so-called generative AI (Artificial Intelligence). Examples of data generation models 58 include ChatGPT (registered trademark) (accessible via the internet (URL: https: / / openai.com / blog / chatgpt)). Data generation model 58 is obtained through deep learning on a neural network. Input to data generation model 58 are prompt words containing instructions, and inference data such as sound data representing sound, text data representing text, and image data representing images (e.g., still image data or animation data). Data generation model 58 infers from the input inference data based on the instructions represented by the prompt words and outputs the inference result in one or more data forms, such as sound data, text data, and image data. Data generation model 58 includes, for example, text generation AI, image generation AI, and multimodal generation AI. Here, inference refers to, for example, analysis, classification, prediction, and / or induction. The specific processing unit 290 performs the aforementioned specific processing while using data generation model 58. The data generation model 58 can also be a model finely tuned to output inference results from prompts that do not contain instructions. In this case, the data generation model 58 can output inference results based on prompts that do not contain instructions. The data processing apparatus 12, etc., includes various data generation models 58, including AI other than the generation AI. AI other than the generation AI can be, for example, linear regression, logistic regression, decision trees, random forests, support vector machines (SVM), k-means clustering, convolutional neural networks (CNN), recurrent neural networks (RNN), generative adversarial networks (GAN), or Naive Bayes, and can perform various processes, but is not limited to this example. Furthermore, the AI ​​can also be an AI agent. Furthermore, when the processing of the above-mentioned parts is performed by AI, the processing can be performed partially or entirely by AI, but is not limited to this example. Furthermore, the processing performed by the AI ​​including the generation AI can be replaced by processing in the rule base, and the processing in the rule base can also be replaced by processing performed by the AI ​​including the generation AI.

[0636] Furthermore, the processing of the aforementioned data processing system 10 is performed by the specific processing unit 290 of the data processing device 12 or the control unit 46A of the smart device 14, but it can also be performed by both the specific processing unit 290 of the data processing device 12 and the control unit 46A of the smart device 14. Additionally, the specific processing unit 290 of the data processing device 12 acquires or collects information required for processing from the smart device 14 or external devices, and the smart device 14 acquires or collects information required for processing from the data processing device 12 or external devices.

[0637] For example, the collection unit is implemented by the control unit 46A of the smart device 14 or the specific processing unit 290 of the data processing device 12. For example, the acquisition unit uses the camera 42 or communication I / F 44 of the smart device 14 to acquire step data, which is then processed by the specific processing unit 290 of the data processing device 12. For example, the analysis unit is implemented by the specific processing unit 290 of the data processing device 12, which analyzes the data from the collection unit and the acquisition unit. For example, the generation unit is implemented by the specific processing unit 290 of the data processing device 12, which uses a generation AI to generate a menu. For example, the serving unit is implemented by the output device 40 of the smart device 14 or the specific processing unit 290 of the data processing device 12, which provides the generated menu to the user. The correspondence between each unit and the device or control unit is not limited to the above examples and various changes can be made.

[0638] In the above embodiments, examples of specific processing by the data processing device 12 are given, but the technology disclosed herein is not limited to this, and specific processing may also be performed by the smart device 14.

[0639] Second Implementation Method Figure 3 An example of the configuration of the data processing system 210 according to the second embodiment is shown.

[0640] like Figure 3 As shown, the data processing system 210 includes a data processing device 12 and smart glasses 214. A server can be cited as an example of the data processing device 12.

[0641] The data processing apparatus 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" as understood in this disclosure. The computer 22 includes a processor 28, RAM 30, and memory 32. The processor 28, RAM 30, and memory 32 are connected to a bus 34. Furthermore, the database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0642] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, RAM 48, and memory 50. The processor 46, RAM 48, and memory 50 are connected to a bus 52. Furthermore, the microphone 238, speaker 240, camera 42, and communication I / F 44 are also connected to the bus 52.

[0643] Microphone 238 receives instructions from user 20 by receiving sounds emitted by user 20. Microphone 238 captures sounds emitted by user 20 and converts the captured sounds into sound data, which is then output to processor 46. Speaker 240 outputs sound according to instructions from processor 46.

[0644] Camera 42 is a small digital camera equipped with an optical system such as a lens, aperture and shutter, and imaging elements such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, which captures images of the user 20's surroundings (e.g., the field of view defined by an angle equivalent to the field of vision of an average healthy person).

[0645] Communication I / F44 is connected to network 54. Communication I / F44 and 26 are responsible for the transmission and reception of various information between processor 46 and processor 28 via network 54. The transmission and reception of various information between processor 46 and processor 28 using communication I / F44 and 26 is performed in a secure state.

[0646] Figure 4 This illustrates an example of the main functions of the data processing device 12 and the smart glasses 214. For example... Figure 4 As shown, in the data processing device 12, specific processing is performed by the processor 28. The specific processing program 56 is stored in the memory 32.

[0647] The specific processing program 56 is an example of a "program" involved in the technology of this disclosure. The processor 28 reads the specific processing program 56 from the memory 32 and executes the read specific processing program 56 on the RAM 30. Specific processing is implemented by the processor 28 operating as a specific processing unit 290 according to the specific processing program 56 executed on the RAM 30.

[0648] The memory 32 stores a data generation model 58 and an emotion-specific model 59. The data generation model 58 and the emotion-specific model 59 are used by the specific processing unit 290. The specific processing unit 290 can use the emotion-specific model 59 to infer the user's emotions and perform specific processing based on the user's emotions. In the emotion inference function (emotion-specific function) using the emotion-specific model 59, various inferences and predictions related to the user's emotions are performed, including inferences and predictions of the user's emotions, but this is not limited to this example. Furthermore, emotion inference and prediction may also include, for example, emotion analysis (parsing).

[0649] In the smart glasses 214, the processor 46 performs reception and output processing. The memory 50 stores the reception and output program 60. The processor 46 reads the reception and output program 60 from the memory 50 and executes the read reception and output program 60 on the RAM 48. The reception and output processing is implemented by the processor 46 operating as a control unit 46A according to the reception and output program 60 executed on the RAM 48. Furthermore, the smart glasses 214 has the same data generation model and emotion-specific model as the data generation model 58 and the emotion-specific model 59, and these models can also be used to perform the same processing as the specific processing unit 290.

[0650] Next, the specific processing of the specific processing unit 290 of the data processing device 12 will be described. Each part of the system described below is implemented by the data processing device 12 and the smart glasses 214. In the following description, the data processing device 12 will be referred to as the "server" and the smart glasses 214 will be referred to as the "terminal".

[0651] Example 1 The process is the same as that of the specific process described in Embodiment 1 in the first embodiment above, so the description is omitted.

[0652] Application Example 1 The process is the same as that in the specific processing described in Application Example 1 of the first embodiment above, so the description is omitted.

[0653] Example 2 The process is the same as that of the specific process in Embodiment 2 described in the first embodiment above, so the description is omitted.

[0654] Application Example 2 The process is the same as that in the specific processing described in Application Example 2 of the first embodiment above, so the description is omitted.

[0655] The specific processing unit 290 sends the result of the specific processing to the smart glasses 214. In the smart glasses 214, the control unit 46A outputs the result of the specific processing to the speaker 240. The microphone 238 acquires sound input representing the user's input regarding the result of the specific processing. The control unit 46A sends the sound data representing the user's input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the sound data.

[0656] Data generation model 58 is a so-called generative AI (Artificial Intelligence). Examples of data generation models 58 include ChatGPT (registered trademark) (accessible via the internet (URL: https: / / openai.com / blog / chatgpt)). Data generation model 58 is obtained through deep learning on a neural network. Input to data generation model 58 are prompt words containing instructions, and inference data such as sound data representing sound, text data representing text, and image data representing images (e.g., still image data or animation data). Data generation model 58 infers from the input inference data based on the instructions represented by the prompt words and outputs the inference result in one or more data forms, such as sound data, text data, and image data. Data generation model 58 includes, for example, text generation AI, image generation AI, and multimodal generation AI. Here, inference refers to, for example, analysis, classification, prediction, and / or induction. The specific processing unit 290 performs the aforementioned specific processing while using data generation model 58. The data generation model 58 can also be a model finely tuned to output inference results from prompts that do not contain instructions. In this case, the data generation model 58 can output inference results based on prompts that do not contain instructions. The data processing apparatus 12, etc., includes various data generation models 58, including AI other than the generation AI. AI other than the generation AI can be, for example, linear regression, logistic regression, decision trees, random forests, support vector machines (SVM), k-means clustering, convolutional neural networks (CNN), recurrent neural networks (RNN), generative adversarial networks (GAN), or Naive Bayes, and can perform various processes, but is not limited to this example. Furthermore, the AI ​​can also be an AI agent. Furthermore, when the processing of the above-mentioned parts is performed by AI, the processing can be performed partially or entirely by AI, but is not limited to this example. Furthermore, the processing performed by the AI ​​including the generation AI can be replaced by processing in the rule base, and the processing in the rule base can also be replaced by processing performed by the AI ​​including the generation AI.

[0657] Furthermore, the processing of the aforementioned data processing system 10 is performed by the specific processing unit 290 of the data processing device 12 or the control unit 46A of the smart glasses 214, but it can also be performed by both the specific processing unit 290 of the data processing device 12 and the control unit 46A of the smart glasses 214. Additionally, the specific processing unit 290 of the data processing device 12 acquires or collects information required for processing from the smart glasses 214 or external devices, and the smart glasses 214 acquires or collects information required for processing from the data processing device 12 or external devices.

[0658] For example, the collection unit is implemented by the control unit 46A of the smart glasses 214 or the specific processing unit 290 of the data processing device 12. For example, the acquisition unit uses the camera 42 or communication I / F 44 of the smart glasses 214 to acquire step data, which is then processed by the specific processing unit 290 of the data processing device 12. For example, the analysis unit is implemented by the specific processing unit 290 of the data processing device 12, which analyzes the data from the collection unit and the acquisition unit. For example, the generation unit is implemented by the specific processing unit 290 of the data processing device 12, which uses a generation AI to generate a menu. For example, the serving unit is implemented by the speaker 240 of the smart glasses 214 or the specific processing unit 290 of the data processing device 12, which provides the generated menu to the user. The correspondence between each unit and the device or control unit is not limited to the above examples and various changes can be made.

[0659] In the above embodiments, examples of specific processing by the data processing device 12 are given, but the technology disclosed herein is not limited to this, and specific processing may also be performed by the smart glasses 214.

[0660] Third Implementation Method Figure 5 An example of the configuration of the data processing system 310 according to the third embodiment is shown.

[0661] like Figure 5 As shown, the data processing system 310 includes a data processing device 12 and a head-mounted terminal 314. A server can be cited as an example of the data processing device 12.

[0662] The data processing apparatus 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" as understood in this disclosure. The computer 22 includes a processor 28, RAM 30, and memory 32. The processor 28, RAM 30, and memory 32 are connected to a bus 34. Furthermore, the database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0663] The head-mounted terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a display 343. The computer 36 includes a processor 46, RAM 48, and memory 50. The processor 46, RAM 48, and memory 50 are connected to a bus 52. Furthermore, the microphone 238, speaker 240, camera 42, display 343, and communication I / F 44 are also connected to the bus 52.

[0664] Microphone 238 receives instructions from user 20 by receiving sounds emitted by user 20. Microphone 238 captures sounds emitted by user 20 and converts the captured sounds into sound data, which is then output to processor 46. Speaker 240 outputs sound according to instructions from processor 46.

[0665] Camera 42 is a small digital camera equipped with an optical system such as a lens, aperture and shutter, and imaging elements such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, which captures images of the user 20's surroundings (e.g., the field of view defined by an angle equivalent to the field of vision of an average healthy person).

[0666] Communication I / F44 is connected to network 54. Communication I / F44 and 26 are responsible for the transmission and reception of various information between processor 46 and processor 28 via network 54. The transmission and reception of various information between processor 46 and processor 28 using communication I / F44 and 26 is performed in a secure state.

[0667] Figure 6 This illustrates an example of the main functions of the data processing device 12 and the head-mounted terminal 314. For example... Figure 6 As shown, in the data processing device 12, specific processing is performed by the processor 28. The specific processing program 56 is stored in the memory 32.

[0668] The specific processing program 56 is an example of a "program" involved in the technology of this disclosure. The processor 28 reads the specific processing program 56 from the memory 32 and executes the read specific processing program 56 on the RAM 30. Specific processing is implemented by the processor 28 operating as a specific processing unit 290 according to the specific processing program 56 executed on the RAM 30.

[0669] The memory 32 stores the data generation model 58 and the emotion-specific model 59. The data generation model 58 and the emotion-specific model 59 are used by the specific processing unit 290.

[0670] In the head-mounted terminal 314, the processor 46 performs the acceptance / output processing. The memory 50 stores the acceptance / output program 60. The processor 46 reads the acceptance / output program 60 from the memory 50 and executes the read acceptance / output program 60 on the RAM 48. The acceptance / output processing is implemented by the processor 46 operating as a control unit 46A according to the acceptance / output program 60 executed on the RAM 48.

[0671] Next, the specific processing of the specific processing unit 290 of the data processing device 12 will be described. Each part of the system described below is implemented by the data processing device 12 and the head-mounted terminal 314. In the following description, the data processing device 12 will be referred to as the "server" and the head-mounted terminal 314 will be referred to as the "terminal".

[0672] Example 1 The process is the same as that of the specific process described in Embodiment 1 in the first embodiment above, so the description is omitted.

[0673] Application Example 1 The process is the same as that in the specific processing described in Application Example 1 of the first embodiment above, so the description is omitted.

[0674] Example 2 The process is the same as that of the specific process in Embodiment 2 described in the first embodiment above, so the description is omitted.

[0675] Application Example 2 The process is the same as that in the specific processing described in Application Example 2 of the first embodiment above, so the description is omitted.

[0676] The specific processing unit 290 sends the result of the specific processing to the head-mounted terminal 314. In the head-mounted terminal 314, the control unit 46A outputs the result of the specific processing to the speaker 240 and the display 343. The microphone 238 acquires sound input representing the user's input regarding the result of the specific processing. The control unit 46A sends the sound data representing the user's input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the sound data.

[0677] Data generation model 58 is a so-called generative AI (Artificial Intelligence). Examples of data generation models 58 include ChatGPT (registered trademark) (accessible via the internet (URL: https: / / openai.com / blog / chatgpt)). Data generation model 58 is obtained through deep learning on a neural network. Input to data generation model 58 includes prompt words containing instructions, and inference data such as sound data representing sound, text data representing text, and image data representing images (e.g., still image data or animation data). Data generation model 58 infers the input inference data based on the instructions represented by the prompt words and outputs the inference result in one or more data forms such as sound data, text data, and image data. Data generation model 58 includes, for example, text generation AI, image generation AI, and multimodal generation AI. Here, inference refers to, for example, analysis, classification, prediction, and / or induction. The specific processing unit 290 performs the aforementioned specific processing while using data generation model 58. The data generation model 58 can also be a model finely tuned to output inference results from prompts that do not contain instructions. In this case, the data generation model 58 can output inference results based on prompts that do not contain instructions. The data processing apparatus 12, etc., includes various data generation models 58, including AI other than the generation AI. AI other than the generation AI can be, for example, linear regression, logistic regression, decision trees, random forests, support vector machines (SVM), k-means clustering, convolutional neural networks (CNN), recurrent neural networks (RNN), generative adversarial networks (GAN), or Naive Bayes, and can perform various processes, but is not limited to this example. Furthermore, the AI ​​can also be an AI agent. Furthermore, when the processing of the above-mentioned parts is performed by AI, the processing can be performed partially or entirely by AI, but is not limited to this example. Furthermore, the processing performed by the AI ​​including the generation AI can be replaced by processing in the rule base, and the processing in the rule base can also be replaced by processing performed by the AI ​​including the generation AI.

[0678] Furthermore, the processing of the aforementioned data processing system 10 is performed by the specific processing unit 290 of the data processing device 12 or the control unit 46A of the head-mounted terminal 314, but it can also be performed by both the specific processing unit 290 of the data processing device 12 and the control unit 46A of the head-mounted terminal 314. Additionally, the specific processing unit 290 of the data processing device 12 acquires or collects information required for processing from the head-mounted terminal 314 or external devices, and the head-mounted terminal 314 acquires or collects information required for processing from the data processing device 12 or external devices.

[0679] For example, the collection unit is implemented by the control unit 46A of the head-mounted terminal 314 or the specific processing unit 290 of the data processing device 12. For example, the acquisition unit uses the camera 42 or communication I / F 44 of the head-mounted terminal 314 to acquire step data, which is then processed by the specific processing unit 290 of the data processing device 12. For example, the analysis unit is implemented by the specific processing unit 290 of the data processing device 12 to analyze the data from the collection unit and the acquisition unit. For example, the generation unit is implemented by the specific processing unit 290 of the data processing device 12 to generate a menu using a generation AI. For example, the serving unit is implemented by the speaker 240 and display 343 of the head-mounted terminal 314 or the specific processing unit 290 of the data processing device 12 to provide the generated menu to the user. The correspondence between each unit and the device or control unit is not limited to the above examples and various changes can be made.

[0680] In the above embodiments, examples of specific processing by the data processing device 12 are given, but the technology disclosed herein is not limited to this, and specific processing may also be performed by the head-mounted terminal 314.

[0681] Fourth Implementation Method Figure 7 An example of the configuration of the data processing system 410 according to the fourth embodiment is shown.

[0682] like Figure 7 As shown, the data processing system 410 includes a data processing device 12 and a robot 414. A server can be cited as an example of the data processing device 12.

[0683] The data processing apparatus 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" as understood in this disclosure. The computer 22 includes a processor 28, RAM 30, and memory 32. The processor 28, RAM 30, and memory 32 are connected to a bus 34. Furthermore, the database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).

[0684] Robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a controlled object 443. The computer 36 includes a processor 46, RAM 48, and memory 50. The processor 46, RAM 48, and memory 50 are connected to a bus 52. Furthermore, the microphone 238, speaker 240, camera 42, controlled object 443, and communication I / F 44 are also connected to the bus 52.

[0685] Microphone 238 receives instructions from user 20 by receiving sounds emitted by user 20. Microphone 238 captures sounds emitted by user 20 and converts the captured sounds into sound data, which is then output to processor 46. Speaker 240 outputs sound according to instructions from processor 46.

[0686] Camera 42 is a small digital camera equipped with an optical system such as a lens, aperture and shutter, and imaging elements such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, to photograph the area around robot 414 (e.g., the field of view defined by a perspective equivalent to the field of vision of an average healthy person).

[0687] Communication I / F44 is connected to network 54. Communication I / F44 and 26 are responsible for the transmission and reception of various information between processor 46 and processor 28 via network 54. The transmission and reception of various information between processor 46 and processor 28 using communication I / F44 and 26 is performed in a secure state.

[0688] The controlled object 443 includes a display device, LEDs (light-emitting diodes) for the eyes, and motors for driving the arms, hands, and feet. The posture or movement of the robot 414 is controlled by controlling the motors in the arms, hands, and feet. Some of the robot 414's emotions can be expressed by controlling these motors. In addition, the robot 414's facial expressions can also be expressed by controlling the illumination state of the LEDs in its eyes.

[0689] Figure 8 This illustrates an example of the main functions of the data processing device 12 and the robot 414. For example... Figure 8 As shown, in the data processing device 12, specific processing is performed by the processor 28. The specific processing program 56 is stored in the memory 32.

[0690] The specific processing program 56 is an example of a "program" involved in the technology of this disclosure. The processor 28 reads the specific processing program 56 from the memory 32 and executes the read specific processing program 56 on the RAM 30. Specific processing is implemented by the processor 28 operating as a specific processing unit 290 according to the specific processing program 56 executed on the RAM 30.

[0691] The memory 32 stores the data generation model 58 and the emotion-specific model 59. The data generation model 58 and the emotion-specific model 59 are used by the specific processing unit 290.

[0692] In robot 414, the processor 46 performs the acceptance and output processing. The memory 50 stores the acceptance and output program 60. The processor 46 reads the acceptance and output program 60 from the memory 50 and executes the read acceptance and output program 60 on RAM 48. The acceptance and output processing is implemented by the processor 46 acting as the control unit 46A according to the acceptance and output program 60 executed on RAM 48.

[0693] Next, the specific processing of the specific processing unit 290 of the data processing device 12 will be described. Each part of the system described below is implemented by the data processing device 12 and the robot 414. In the following description, the data processing device 12 will be referred to as the "server" and the robot 414 will be referred to as the "terminal".

[0694] Example 1 The process is the same as that of the specific process described in Embodiment 1 in the first embodiment above, so the description is omitted.

[0695] Application Example 1 The process is the same as that in the specific processing described in Application Example 1 of the first embodiment above, so the description is omitted.

[0696] Example 2 The process is the same as that of the specific process in Embodiment 2 described in the first embodiment above, so the description is omitted.

[0697] Application Example 2 The process is the same as that in the specific processing described in Application Example 2 of the first embodiment above, so the description is omitted.

[0698] The specific processing unit 290 sends the result of the specific processing to the robot 414. In the robot 414, the control unit 46A outputs the result of the specific processing to the speaker 240 and the controlled object 443. The microphone 238 acquires sound input representing the result of the specific processing. The control unit 46A sends the sound data representing the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the sound data.

[0699] Data generation model 58 is a so-called generative AI (Artificial Intelligence). Examples of data generation models 58 include ChatGPT (registered trademark) (accessible via the internet (URL: https: / / openai.com / blog / chatgpt)). Data generation model 58 is obtained through deep learning on a neural network. Input to data generation model 58 are prompt words containing instructions, and inference data such as sound data representing sound, text data representing text, and image data representing images (e.g., still image data or animation data). Data generation model 58 infers from the input inference data based on the instructions represented by the prompt words and outputs the inference result in one or more data forms, such as sound data, text data, and image data. Data generation model 58 includes, for example, text generation AI, image generation AI, and multimodal generation AI. Here, inference refers to, for example, analysis, classification, prediction, and / or induction. The specific processing unit 290 performs the aforementioned specific processing while using data generation model 58. The data generation model 58 can also be a model finely tuned to output inference results from prompts that do not contain instructions. In this case, the data generation model 58 can output inference results based on prompts that do not contain instructions. The data processing apparatus 12, etc., includes various data generation models 58, including AI other than the generation AI. AI other than the generation AI can be, for example, linear regression, logistic regression, decision trees, random forests, support vector machines (SVM), k-means clustering, convolutional neural networks (CNN), recurrent neural networks (RNN), generative adversarial networks (GAN), or Naive Bayes, and can perform various processes, but is not limited to this example. Furthermore, the AI ​​can also be an AI agent. Furthermore, when the processing of the above-mentioned parts is performed by AI, the processing can be performed partially or entirely by AI, but is not limited to this example. Furthermore, the processing performed by the AI ​​including the generation AI can be replaced by processing in the rule base, and the processing in the rule base can also be replaced by processing performed by the AI ​​including the generation AI.

[0700] Furthermore, the processing of the aforementioned data processing system 10 is performed by the specific processing unit 290 of the data processing device 12 or the control unit 46A of the robot 414, but it can also be performed by both the specific processing unit 290 of the data processing device 12 and the control unit 46A of the robot 414. Additionally, the specific processing unit 290 of the data processing device 12 acquires or collects information required for processing from the robot 414 or external devices, and the robot 414 acquires or collects information required for processing from the data processing device 12 or external devices.

[0701] For example, the collection unit is implemented by the control unit 46A of the robot 414 or the specific processing unit 290 of the data processing device 12. For example, the acquisition unit uses the camera 42 or communication I / F 44 of the robot 414 to acquire step data, which is then processed by the specific processing unit 290 of the data processing device 12. For example, the analysis unit is implemented by the specific processing unit 290 of the data processing device 12, which analyzes the data from the collection unit and the acquisition unit. For example, the generation unit is implemented by the specific processing unit 290 of the data processing device 12, which uses a generation AI to generate a menu. For example, the serving unit is implemented by the speaker 240 of the robot 414 and the control object 443 or the specific processing unit 290 of the data processing device 12, which provides the generated menu to the user. The correspondence between each unit and the device or control unit is not limited to the above examples and various changes can be made.

[0702] In the above embodiments, examples of specific processing by the data processing device 12 are given, but the technology disclosed herein is not limited to this, and specific processing may also be performed by the robot 414.

[0703] Furthermore, the emotion-specific model 59, acting as an emotion engine, can determine a user's emotion based on a specific mapping. Specifically, the emotion-specific model 59 can determine a user's emotion based on an emotion graph that serves as a specific mapping (see [reference]). Figure 9 The emotion-specific model 59 can also determine the robot's emotion, and the specific processing unit 290 performs specific processing based on the robot's emotions.

[0704] Figure 9 This is a diagram representing an emotion map 400 that maps multiple emotions. In the emotion map 400, emotions are arranged in concentric circles radiating from the center. The closer to the center of the concentric circles, the more primitive the emotion is. On the outer side of the concentric circles, emotions representing states or behaviors arising from mood are arranged. Emotions are concepts that include feelings and mental states. Emotions generated by reactions occurring in the brain are arranged roughly to the left of the concentric circles. Emotions derived from situational judgments are arranged roughly to the right of the concentric circles. Emotions generated by reactions occurring in the brain and derived from situational judgments are arranged roughly above and below the concentric circles. Furthermore, "pleasant" emotions are arranged above the concentric circles, and "unpleasant" emotions are arranged below them. Thus, in the emotion map 400, multiple emotions are mapped based on the structure that generates emotions, and emotions that are likely to occur simultaneously are mapped close to each other.

[0705] These emotions are distributed at the three o'clock position of the emotion map 400, typically fluctuating between peace and anxiety. In the right half of the emotion map 400, situational awareness dominates over internal sensation, thus resulting in an impression of calm.

[0706] The inner side of the emotion map 400 represents the inner state, while the outer side represents behavior. Therefore, the further outward you are from the emotion map 400, the more visible the emotion becomes (manifested in behavior).

[0707] Here, human emotions are based on various balances such as posture and blood sugar levels. When these balances deviate from an ideal state, it indicates an unpleasant state; when they approach the ideal state, it indicates a pleasant state. Emotions in robots, cars, motorcycles, etc., can also be created in the following way: based on various balances such as posture and remaining battery power, when these balances deviate from an ideal state, it indicates an unpleasant state; when they approach the ideal state, it indicates a pleasant state. Emotion maps can be generated, for example, based on Dr. Mitsuyoshi's emotion map (Research on a Brain Physiological Signal Analysis System for Voice Emotion Recognition and Emotion, Tokushima University, Doctoral Dissertation: https: / / ci.nii.ac.jp / naid / 500000375379). In the left half of the emotion map, emotions belonging to the sensory-dominated region, called "response," are arranged. Furthermore, in the right half of the emotion map, emotions belonging to the situational cognition-dominated region, called "situation," are arranged.

[0708] In the emotion map, two types of emotions that promote learning are defined. One is a negative emotion on the situational side, in the middle or peripheral region of "repentance" or "reflection." This occurs when the robot experiences negative emotions such as "I don't want to experience this feeling again" or "I don't want to be blamed again." The other is a positive emotion on the response side, near the "desire" region. This occurs when there are positive feelings such as "wanting more" or "wanting to know more."

[0709] The emotion-specific model 59 inputs user input into a pre-trained neural network to obtain emotion values ​​representing each emotion shown in the emotion map 400, thereby determining the user's emotion. This neural network is pre-trained based on multiple training data sets, which are combinations of user input and emotion values ​​representing each emotion shown in the emotion map 400. Furthermore, this neural network... Figure 10 As shown in the sentiment graph 900, it was trained in a way that sentiments that are configured close to each other have similar values. Figure 10 The text shows examples of emotions such as "peace of mind", "stability", and "reassurance" that have similar emotion values.

[0710] The above description focuses on the functions of the data processing device 12, but the system of this disclosure is not necessarily installed on a server. The system of this disclosure can also be installed as a general information processing system. This disclosure can also be installed, for example, as a software program running on a personal computer, an application running on a smartphone, etc. The method of this disclosure can also be provided to users in the form of SaaS (Software as a Service).

[0711] In the above embodiments, an example of a specific process being performed by a single computer 22 is given. However, the technology disclosed herein is not limited to this, and the specific process can also be distributed among multiple computers, including computer 22. For example, the data generation model 58 can be located on an external device of the data processing apparatus 12, where data is generated based on the input data.

[0712] In the above embodiments, examples of storing a specific processing program 56 in the memory 32 have been described, but the technology disclosed herein is not limited thereto. For example, the specific processing program 56 may also be stored in a portable computer-readable non-transitory storage medium such as a USB (Universal Serial Bus) memory. The specific processing program 56 stored in the non-transitory storage medium is installed into the computer 22 of the data processing device 12. The processor 28 executes specific processing according to the specific processing program 56.

[0713] Alternatively, a specific processing program 56 may be pre-stored in a storage device such as a server connected to the data processing device 12 via the network 54, and the specific processing program 56 may be downloaded and installed on the computer 22 according to the requirements of the data processing device 12.

[0714] In addition, it is not necessary to store all the specific processing program 56 in the storage device such as the server connected to the data processing device 12 via the network 54 or in the memory 32; a portion of the specific processing program 56 may be stored in advance.

[0715] As hardware resources for performing specific processes, various processors, as shown below, can be used. For example, a CPU can be listed as a processor, which functions as a general-purpose processor that performs specific processes by executing software, i.e., a program. Furthermore, processors can be listed as special-purpose circuits such as FPGAs (Field-Programmable Gate Arrays), PLDs (Programmable Logic Devices), or ASICs (Application-Specific Integrated Circuits), which are processors with circuitry specifically designed to perform specific processes. Each processor has built-in or connected memory, and each processor executes specific processes using that memory.

[0716] The hardware resources for performing a specific process can consist of one of these various processors, or a combination of two or more processors of the same or different types (e.g., a combination of multiple FPGAs, or a combination of a CPU and an FPGA). Alternatively, the hardware resources for performing a specific process can be a single processor.

[0717] As an example of a single processor, there are two approaches: First, a processor is composed of a combination of one or more CPUs and software, which functions as a hardware resource to perform a specific process; second, as represented by a SoC (System-on-a-chip), a processor is used to implement the functionality of the entire system, which includes multiple hardware resources for performing a specific process, using a single IC (Integrated Circuit) chip. In this way, the specific process is implemented by using one or more of the aforementioned processors as hardware resources.

[0718] Furthermore, the hardware architecture of these various processors, more specifically, can utilize circuits that combine semiconductor elements and other circuit components. Moreover, the specific process described above is just one example. Therefore, without departing from the main point, unnecessary steps can certainly be deleted, new steps added, or the processing order changed.

[0719] The descriptions and illustrations above are detailed explanations of a portion of the technology disclosed herein, and are merely one example of the technology disclosed herein. For example, the above descriptions of the structure, function, effect, and results are just one example of the structure, function, effect, and results of a portion of the technology disclosed herein. Therefore, without departing from the spirit of the technology disclosed herein, unnecessary parts may be deleted, new elements added, or replacements may be made to the descriptions and illustrations above. Furthermore, to avoid confusion and facilitate understanding of a portion of the technology disclosed herein, explanations of common technical knowledge that do not require special explanation under the premise of being able to implement the technology disclosed herein have been omitted from the descriptions and illustrations above.

[0720] All documents, patent applications and technical specifications set forth in this specification are incorporated herein by reference to the same extent that each document, patent application and technical specification is specifically and individually described therein and referenced by reference.

[0721] In addition, the following notes are provided in response to the above explanation.

[0722] Example 1 (Note 1) An information processing system, characterized in that it comprises: An apparatus for receiving user-related information, including family composition information, nutritional condition information, energy condition information, preference condition information, restriction condition information and emotional state information, through an information processing terminal, and storing the user-related information in a data storage device using a communication device. A device for obtaining user-related information from the data storage device, constructing a prompt statement based on the user-related information to instruct a generative artificial intelligence model to generate a diet plan, sending query data containing the prompt statement to a generative artificial intelligence model providing device, and obtaining natural language text representing diet plan candidates for multiple days or a predetermined period from the generative artificial intelligence model providing device. An apparatus for performing string parsing processing on the natural language text obtained from the generative artificial intelligence model, converting the natural language text into structured menu data that is distinguished by date units and meal units and contains meal item information, meal name information and ingredient information; A device for performing quantity estimation and nutrient content calculation on each ingredient in the structured menu data, with reference to a food attribute database containing nutrient content information and energy content information, calculating the total energy content and nutrient content by meal unit and by day unit, and determining whether the total energy content and nutrient content fall within the allowable range specified by the nutrient condition information and the energy condition information. An apparatus for determining menu data suitable for the user's relevant information, based on the determination result, when the total energy or nutrient content deviates from the allowable range, automatically correcting the structured menu data by changing the meal item information or ingredient composition information according to a predetermined adjustment rule, or generating additional prompt statements containing convergence conditions to the allowable range, and requesting the generative artificial intelligence model to regenerate part of the diet plan to obtain new natural language text and thereby update the structured menu data; An apparatus for registering a user’s food inventory information into a data storage device based on input from an information processing terminal or based on product identification information, calculating the required quantity of each food item for a predetermined period based on the determined menu data, comparing the required quantity with the food inventory information, thereby calculating the insufficient quantity of each food item and identifying the insufficient food item. A device for generating purchase candidate information containing the insufficient ingredients and their insufficient quantities, and sending the purchase candidate information to an external supply service device via a communication device to automatically or semi-automatically perform ordering for the insufficient ingredients, and simultaneously displaying the menu data and the purchase candidate information through a user interface in a form that can be ordered in the external service.

[0723] (Note 2) The information processing system according to Appendix 1 is characterized in that, The apparatus for acquiring user-related information and generating prompt statements, and the apparatus for performing nutrient content calculation processing, further modify the content of the prompt statements sent to the generative artificial intelligence model and the evaluation conditions in the nutrient content calculation processing according to specific health management target information or body composition management target information, so that the generation of menu data and the specific handling of insufficient ingredients in the ingredient inventory information are consistent with the health management target information or the body composition management target information.

[0724] (Note 3) The information processing system according to Appendix 1 is characterized in that, Based on the emotional state information contained in the user's relevant information, the system will presume that the dining items or ingredients are conducive to emotional relief, emotional enhancement, or social sharing, and attach them as conditions to the prompt statements sent to the generative artificial intelligence model, or as priority selection conditions when modifying the structured menu data, thereby generating a diet plan corresponding to the emotional state information.

[0725] Application Example 1 (Note 1) An information processing system, characterized in that it comprises: An apparatus for receiving health-related information from a user, including family composition information, required nutrient information, energy intake information, intake object attribute information, activity level information, preference information, restriction information, and emotional state information; converting the health-related information into numerical data; and inputting the numerical data into a mathematical model for nutritional assessment to calculate nutritional goals and dietary structure information corresponding to the health-related information. A device for generating prompt statements based on the nutritional goals and dietary structure information and inputting them into a generative artificial intelligence model; obtaining natural language text related to a diet menu that conforms to nutritional balance, intake restrictions and preferences by inputting the prompt statements into the generative artificial intelligence model; parsing the natural language text to determine the intake items that constitute the diet menu and the types and quantities of items corresponding to the intake items. An apparatus for retrieving item inventory information stored in a storage device based on the type and quantity of the items, extracting insufficient items by comparing and calculating with the item inventory information, generating order information related to the insufficient items, and sending the order information to an external service via a communication network to automatically order items, while simultaneously updating the item inventory information; A device for presenting the food menu and order result information related to the automatic ordering through the display interface of a terminal device, receiving confirmation information or change information from the user, and updating the food menu, the item inventory information, and the order information according to the confirmation information or change information; An apparatus for associating and storing the calculation results of the mathematical model with natural language text obtained from the generative artificial intelligence model, and for generating diet menus and inventory management strategies that take into account time changes based on the association with subsequent health-related information or prompts from the user.

[0726] (Note 2) The information processing system according to Appendix 1 is characterized in that, The mathematical model is constructed as follows: nutritional goals are set as target parameters including changes in body weight, maintenance of bodily functions, energy allocation based on activity level, intake frequency, and number of meals; the target parameters are calculated; the combination of intake items constituting the diet menu is optimized based on the target parameters; and the prompt statement is generated using the optimization results.

[0727] (Note 3) The information processing system according to Appendix 1 is characterized in that, The emotional state information included in the health-related information is used by the mathematical model to calculate the emotional load index, and by attaching psychological effect conditions corresponding to the emotional load index to the prompt statements input to the generative artificial intelligence model, a diet menu containing intake items aimed at reducing stress or evoking positive emotions is generated, and items corresponding to the diet menu are selected as priority targets for the automatic ordering.

[0728] Example 2 (Note 1) An information processing system, characterized in that it comprises: An apparatus for acquiring various input information, including user attribute information, nutrition-related information, energy-related information, preference-related information, restriction-related information, and status-related information, from a processor in an information processing device, and generating conditional specification information based on the input information to instruct a generative artificial intelligence model to generate diet plan information. An apparatus for sending conditional specification information containing the prompt statement to the generative artificial intelligence model, and for parsing and structuring the diet plan information received from the generative artificial intelligence model corresponding to the conditional specification information into menu data in a predetermined format. An apparatus for obtaining, based on the food ingredient information contained in the menu data, information on stored items divided by user from a storage device, and calculating the shortage between the required quantity of items and the quantity of stored items within a dietary planning cycle by performing summary processing and comparison processing on the stored item information, and specifying the missing items. An apparatus for generating procurement candidate information related to the shortage of items and for automatically or semi-automatically sending a request for the acquisition of the shortage of items to an external supply service via a communication device; A device for generating display control information that includes the menu data, inventory information, shortage information, and the result of the request, and sending the display control information to a terminal device with a display device, so as to present the information in a form in which the user can view the diet plan information and the shortage information by date or time period and choose whether to execute the request; An apparatus for calculating the predetermined consumption time and remaining days related to the shelf life of each item based on the diet plan information and the stored item information, extracting items whose shelf life is due within the predetermined period as near-expiration items, and generating a change candidate menu for prioritizing the consumption of the near-expiration items by sending additional prompts to the generative artificial intelligence model.

[0729] (Note 2) According to the information processing system described in Appendix 1, the processor is further configured to add energy intake conditions and nutrient allocation conditions as conditions for achieving the target to the prompt statement based on the user-input target achievement information and period information, so that the generative artificial intelligence model generates the diet plan information, performs summary processing on the required quantity of each item according to the diet plan information and comparison processing with the information of the items in stock, thereby generating inventory management information, and presenting the inventory management information to a terminal device with a display device.

[0730] (Note 3) According to the information processing system described in Appendix 1, the processor is further configured to, based on the user's emotional state information obtained as state-related information, add emotional relief conditions or mood enhancement conditions to the prompt statement, instruct the generative artificial intelligence model to generate ingredient candidate information and diet plan information adapted to the emotional state information, and include the food ingredients or dish candidates corresponding to the emotional state information in the menu data for presentation.

[0731] Application Example 2 (Note 1) An information processing system, characterized in that it comprises: Device for acquiring user-related information, including family composition, essential nutrients, calories, user preferences, restrictions, and emotional state. An apparatus for extracting multiple dietary candidates for a predetermined time period based on the user-related information and referring to a dataset containing nutritional information, and for calculating the energy and nutrient content of each dietary candidate to generate a group of dietary candidates that meet predetermined energy and nutritional conditions. An apparatus for generating prompt statements for inputting into a generative artificial intelligence model based on the user-related information and the dietary candidate group, and inputting the prompt statements into the generative artificial intelligence model to obtain output information including dietary menus selected from the dietary candidate group and their descriptions. An apparatus for calculating the types and quantities of required ingredients for each food menu contained in the output information, comparing them with the ingredient inventory information held by the user, in order to determine the lack of ingredients and generate the list of lacking ingredients. An apparatus for generating and sending order data for the insufficient ingredients based on the list of insufficient ingredients through a communication interface for providing services through external items, thereby automatically performing item acquisition processing and obtaining the resulting order information and delivery information; An apparatus for displaying the menu, the list of insufficient ingredients, and the order information contained in the output information in association with operation elements on the user display screen of a user terminal, and for receiving menu change instructions or order content change instructions from the user, and for recalculating and updating the menu, the list of insufficient ingredients, and the order data according to the change instructions. A device for accumulating a user's past menu selection history and evaluation information, and adjusting the content of subsequently generated prompts based on the accumulated information, so that the menu proposals of the generative artificial intelligence model tend to adapt to user preferences and behavioral history.

[0732] (Note 2) The information processing system according to Appendix 1 is characterized in that, The apparatus for generating the dietary candidate group based on the user-related information is configured to: calculate the total energy amount within a predetermined time period based on the target information contained in the user-related information; allocate the total energy amount to multiple dietary opportunities to determine the target energy amount for each dietary opportunity; and combine the target energy amount with the nutritional conditions to generate the dietary candidate group.

[0733] (Note 3) The information processing system according to Appendix 1 is characterized in that, The device for generating prompt statements and inputting them into the generative artificial intelligence model is configured to: select candidate ingredients to be included in the diet menu and candidate ingredients to be excluded based on the emotional state contained in the user's relevant information and by referring to a data set representing the correspondence between emotional state and food categories, and reflect the selection results in the prompt statements, thereby controlling the generative artificial intelligence model to generate a diet menu suitable for relieving stress or sharing joy.

Claims

1. An information processing system, characterized in that, Includes a processor, the processor being configured to: It receives input information including family composition, essential nutrients, calories, user's dietary preferences, user's allergy information, and user's emotional state information. Based on the input information, prompts are generated to instruct the generative artificial intelligence model to propose dietary menu solutions; Based on the menu scheme proposed by the generative artificial intelligence model, the system compares it with the ingredient information held by the user to determine the missing ingredients and automatically places an order for the missing ingredients when necessary. as well as The generated menu scheme is displayed through a user interface and made available for ordering via food delivery service.

2. The information processing system according to claim 1, characterized in that, The processor is further configured to: propose a dietary menu plan based on a specific objective, and manage the food inventory according to the dietary menu plan.

3. The information processing system according to claim 1, characterized in that, The processor is further configured to suggest ingredients for stress relief and / or for sharing joy, based on the user's emotional state.

Citation Information

Patent Citations

  • Persona chatbot control method and system

    JP2022180282A