Diet recommendation method, device and equipment based on large model and storage medium

By integrating multimodal data and large model technology, the system identifies the user's current emotional state and infers the target emotional state, solving the problem of inaccurate dietary recommendations in existing technologies and achieving accurate and personalized dietary recommendations.

CN120998416APending Publication Date: 2025-11-21BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511014499.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In existing technologies, dietary recommendation methods lack a transition step to the target emotional state, resulting in inaccurate recommendations that may not meet health needs.

Method used

By integrating multimodal data (such as voice, text, image, and wearable device data) to identify the user's current emotional state, and combining it with the user's behavioral information, the system uses large-scale model reasoning and knowledge graph technology to deduce the target emotional state and generate dietary recommendation plans.

Benefits of technology

It improves the accuracy and interpretability of dietary recommendations, meets users' emotional regulation needs, and aligns with users' taste preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120998416A_ABST
    Figure CN120998416A_ABST
Patent Text Reader

Abstract

The invention provides a diet recommendation method, device and equipment based on a large model and a storage medium, and relates to the technical field of computers, in particular to the technical fields of large models, data processing, intelligent recommendation and the like. The specific implementation scheme is as follows: determining a current emotional state of a user and behavior information of the user; wherein the behavior information comprises preference information of the user; determining a target emotional state of the user by using a large model based on the current emotional state and the behavior information; and based on the target emotional state and the preference information, generating a diet recommendation scheme by using the large model. According to the invention, the accuracy and interpretability of diet recommendation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to the fields of large models, data processing, and intelligent recommendation. Background Technology

[0002] In recent years, the pace of modern life has accelerated, and people's emotional states have become increasingly complex and volatile. Since there is a close link between emotions and diet, different emotional states can alter the body's needs for various nutrients and food types. Therefore, providing targeted dietary recommendations based on emotional regulation has become an urgent problem to be solved. Summary of the Invention

[0003] This disclosure provides a method, apparatus, device, and storage medium for diet recommendation based on a large model. According to one aspect of this disclosure, a method for diet recommendation based on a large model is provided, comprising:

[0004] Determine the user's current emotional state and behavioral information; the behavioral information includes the user's preference information.

[0005] Based on the current emotional state and behavioral information, a large model is used to determine the user's target emotional state.

[0006] Based on the target's emotional state and preference information, a large model is used to generate dietary recommendation schemes.

[0007] According to another aspect of this disclosure, a diet recommendation device based on a large model is provided, comprising:

[0008] The first determining module is used to determine the user's current emotional state and the user's behavioral information; wherein, the behavioral information includes the user's preference information;

[0009] The second determination module is used to determine the user's target emotional state based on the current emotional state and behavioral information, using a large model.

[0010] The first recommendation module is used to generate dietary recommendation schemes based on the target's emotional state and preference information, using a large model.

[0011] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0012] At least one processor; and

[0013] The memory is communicatively connected to the at least one processor; wherein,

[0014] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the methods described in the present disclosure.

[0015] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods according to embodiments of this disclosure.

[0016] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the methods according to embodiments of this disclosure.

[0017] In determining the target emotional state, this disclosure comprehensively considers both the current emotional state and behavioral information. This multi-dimensional information fusion ensures that information from each dimension can serve as a basis for interpreting the target emotional state, thereby improving the accuracy of its determination. Furthermore, in generating dietary recommendations, this disclosure combines the target emotional state and preference information, enabling the large model to generate recommendations that satisfy both the user's emotional regulation needs and their taste preferences. This ensures that each component of the dietary recommendation solution has a corresponding input basis, enhancing the interpretability of the recommendation path.

[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0019] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0020] Figure 1 This is a schematic diagram illustrating an application scenario according to an embodiment of this disclosure;

[0021] Figure 2 This is a flowchart illustrating the implementation of a large-model-based diet recommendation method according to an embodiment of the present disclosure.

[0022] Figure 3 This is a flowchart illustrating the process of determining behavioral information according to an embodiment of the present disclosure;

[0023] Figure 4 This is a schematic flowchart illustrating a dietary recommendation method implemented according to an embodiment of the present disclosure;

[0024] Figure 5 This is a schematic flowchart illustrating the process of identifying the current emotional state according to an embodiment of the present disclosure;

[0025] Figure 6 This is a flowchart illustrating the process of determining a target emotional state according to an embodiment of the present disclosure;

[0026] Figure 7 This is a schematic diagram of an emotion transfer graph according to an embodiment of the present disclosure;

[0027] Figure 8 This is a schematic diagram of the process for generating a dietary recommendation scheme according to an embodiment of the present disclosure;

[0028] Figure 9 This is a schematic diagram of the process of constructing a model and fine-tuning data samples according to an embodiment of the present disclosure;

[0029] Figure 10 This is a schematic diagram of the structure of a large-model-based diet recommendation device 1000 according to an embodiment of the present disclosure;

[0030] Figure 11 This is a schematic diagram of the structure of a large-model-based diet recommendation device 1100 according to an embodiment of the present disclosure;

[0031] Figure 12 A schematic block diagram of an example electronic device 1200 that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0032] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0033] The term "and / or" in this disclosure indicates that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The term "at least one" in this document means any combination of at least two of a plurality of options, such as including at least one of A, B, and C, which can mean including any one or more elements selected from the set of A, B, and C. The terms "first" and "second" in this document refer to and distinguish multiple similar technical terms, and do not imply a specific order or a limitation to only two. For example, "first feature" and "second feature" refer to two types / two features; the first feature can be one or more, and the second feature can also be one or more.

[0034] In recent years, with the rapid development of the social economy and the ever-changing technology, the pace of social life has been accelerating, which has had a profound impact on people's psychology, making their emotional state increasingly complex and changeable.

[0035] Meanwhile, numerous scientific studies have confirmed a close link between emotions and diet. When the body is in different emotional states, the nervous system undergoes corresponding changes, which in turn affect the body's need for various nutrients or types of food. For example, when a person is anxious, magnesium can play a regulatory role, so eating magnesium-rich foods such as bananas and nuts can soothe the nerves; while when a person is depressed, eating foods rich in B vitamins, such as whole-wheat bread and lean meat, can improve their mood.

[0036] However, current technologies typically rely on establishing a direct mapping between a person's current emotional state and the type of food for dietary recommendations. For example, desserts are recommended when a person is anxious, or comfort foods are recommended when a person is sad. But this method lacks a transitional step to the target emotional state, leading to inaccurate recommendations and potentially even results that do not meet health needs.

[0037] To address the aforementioned issues, this disclosure proposes a large-model-based diet recommendation method. This method identifies a user's current emotional state by fusing multimodal data (e.g., voice, text, images, and wearable device data). Furthermore, by integrating user behavioral information (e.g., schedule information, holiday information, personalized long-term goals) and combining large-model reasoning and knowledge graph techniques, it derives the user's target emotional state. Finally, based on this target emotional state, it provides diet recommendations to the user, thereby achieving the comprehensive goals of alleviating the current emotional state, improving life efficiency, and optimizing dietary structure.

[0038] Figure 1 This is a schematic diagram illustrating an application scenario according to an embodiment of this disclosure, such as... Figure 1As shown in the illustration, the application scenario diagram of this disclosure may include, but is not limited to, a behavior information collection device 110 and a diet recommendation device 120. The information collection device 110 and the diet recommendation device 120 can communicate via any type of wired or wireless network. Specifically, the information collection device 110 can be used to collect and send user information, which may include the user's current emotional state and behavioral information, etc. The diet recommendation device 120 can receive user information and infer the user's target emotional state based on the user information. Furthermore, it generates a corresponding diet recommendation plan based on the target emotional state and the user information. The information collection device 110 proposed in this disclosure includes, but is not limited to, electronic devices such as mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, game consoles, e-book readers, multimedia playback devices, and wearable devices. The diet recommendation device 120 may include electronic devices or servers for providing backend management for the information collection device 110. Furthermore, this disclosure does not specifically limit the number of information collection devices 110. For example, the application scenario diagram of this disclosure may include one or more information collection devices 110.

[0039] Figure 2 This is a flowchart illustrating the implementation of a large-model-based diet recommendation method according to an embodiment of the present disclosure, including:

[0040] S210. Determine the user's current emotional state and the user's behavioral information; wherein, the behavioral information includes the user's preference information;

[0041] S220. Based on the current emotional state and behavioral information, use a large model to determine the user's target emotional state;

[0042] S230. Based on the target's emotional state and preference information, a large model is used to generate a dietary recommendation plan.

[0043] In this embodiment of the disclosure, the current emotional state can be the emotional state comprehensively expressed by a user at a specific moment or time period through multiple dimensions such as verbal expression, body movements, and physiological responses. Here, the current emotional state is dynamic and situational, and is influenced by multiple factors such as external environmental stimuli and personal internal psychological activities. For example, the current emotional state can include anxiety, manifested as excessive worry about future uncertainties; depression, manifested as low mood; and tension, exhibiting characteristics such as muscle tension and accelerated heartbeat.

[0044] In this embodiment of the disclosure, the user's behavioral information may include the user's schedule, holiday information related to the user, long-term goals set by the user in advance, and user preferences.

[0045] Figure 3This is a schematic flowchart illustrating the process of determining behavioral information according to an embodiment of the present disclosure.

[0046] like Figure 3 As shown, the process for determining user behavior information may include the following steps:

[0047] S301, Connect to the task management system.

[0048] S302. Extract the user's recent schedule (such as task assignments or important events).

[0049] Here, the task management system may include a calendar system that can record schedules.

[0050] In one example, a Natural Language Processing (NLP) model, such as the Robustly Optimized BERT Pretraining Approach (RoBERTa), can be used for processing. The RoBERTa model, thanks to its pre-training on large-scale text data, possesses strong language understanding and semantic representation capabilities.

[0051] When analyzing schedules, schedule titles can be used as important input data. After preprocessing the schedule titles, such as word segmentation and part-of-speech tagging, they are fed into the RoBERTa model. The RoBERTa model can extract semantic information from the schedule titles to understand the level of stress implied in the schedule. For example, for a schedule titled "Urgent Project Report," the RoBERTa model can identify the time urgency conveyed by "urgent" and the psychological stress brought about by the specific type of task "report," thus comprehensively judging that the schedule has a high level of stress.

[0052] In addition, the RoBERTa model can also identify the type of schedule, such as interview, exam, business trip, etc., based on keywords and semantic features in the schedule title.

[0053] S303, Get the current date.

[0054] S304. Obtain holiday information related to the user in the current date.

[0055] In this embodiment of the disclosure, the potential impact of holidays on user emotions can be determined in the subsequent target emotion inference process based on holiday information related to the user.

[0056] In one example, this disclosure can infer the potential effect using a pre-defined "holiday-emotion" mapping table. This mapping table can be constructed based on extensive user survey data, psychological research findings, and analysis of historical emotion records. During its construction, the association between various holidays and common emotions can be quantified by collecting user emotion feedback information during different holidays.

[0057] For example, while the Spring Festival, China's most important traditional festival, is filled with the joy of family reunion, it also comes with many sources of stress, such as the social burden of visiting relatives and friends and increased financial expenses. These factors combined make some users prone to anxiety during the Spring Festival. Therefore, in the mapping table, the Spring Festival is marked as having a certain association with anxiety. As another example, during long holidays, people's pace of life slows down significantly, allowing more time for leisure, entertainment, and relaxation. This change in lifestyle makes users more likely to experience a sense of relaxation during long holidays. Therefore, long holidays correspond to relaxation in the mapping table.

[0058] When the system detects that it is currently on a holiday, it queries a preset "holiday-emotion" mapping table to make a preliminary inference about the possible impact on the user's emotions based on the type of holiday.

[0059] S305, Load the user-preset long-term goals.

[0060] S306. Analyze the user's health goals or emotional goals through long-term goals.

[0061] In this embodiment of the disclosure, an NLP model can be used to parse the user's pre-set long-term goals, thereby parsing out the labels corresponding to the user's health goals or emotional goals.

[0062] Specifically, when users input goal expressions such as "I want to maintain high concentration at work" or "I want to achieve my weight loss goals through diet," the NLP model can perform preprocessing operations such as word segmentation and part-of-speech tagging on the text.

[0063] Furthermore, NLP models utilize their linguistic knowledge and semantic representation capabilities, acquired through pre-training on large-scale corpora, to parse text. For example, an NLP model can identify the cognitive state requirement implied by the word "focus" in "high focus" and map it to the label corresponding to "high focus"; for the expression "weight loss," the NLP model can accurately capture its semantic features related to weight management and healthy eating, thus mapping it to the label corresponding to "weight loss."

[0064] S307. Read the user's preference information.

[0065] S308. Based on user preference information, construct a preference model for the user.

[0066] In this embodiment of the disclosure, Natural Language Understanding (NLU) technology can be used to analyze user behavior and intention information generated during daily interactions. Specifically, by constructing an NLU model that includes multiple sub-modules such as semantic parsing, sentiment analysis, and intent recognition, the user's input data in various forms, such as text and speech, is parsed layer by layer to obtain the user's preference information.

[0067] Furthermore, by reading this preference information, machine learning algorithms can be used to build a preference model for the user. This preference model can classify and associate the user's preferences, thereby reflecting the user's personalized needs and providing data support for subsequent personalized diet recommendations.

[0068] S309. Transform schedules, holiday information, users' health or emotional goals, and preference models into structured data.

[0069] S310, Output structured data vector.

[0070] In this embodiment of the disclosure, schedules, holiday information, user health or emotional goals, and preference models can be converted according to a predefined structured data format. For example, schedules can be represented as JavaScript Object Notation (JSON) format data containing fields such as "title," "start time," "end time," "location," and "duration"; holiday information can be represented as key-value pairs containing fields such as "holiday name," "date range," and "type"; user goals are converted into fields such as "goal type," "specific goal," and "goal deadline"; and preference models are presented in the form of "preference dimension" and "preference weight."

[0071] Furthermore, key features are extracted from structured data. For example, for schedules, extracted features may include schedule duration, urgency, and importance; for holiday information, extracted features may include holiday type and duration; features of user goals may include the difficulty of the goal and the gap between the goal and the current state; and features of the preference model may include the weight values ​​of each preference dimension.

[0072] After structuring the data, a suitable vector representation can be chosen to convert the structured data into corresponding vectors. Common methods include word embedding. In one example, for the discrete feature of holiday names, word embedding can be used to convert it into vector form; for numerical features such as start time, end time, and duration of schedules, they can be directly used as a dimension in the vector.

[0073] Furthermore, to eliminate the influence of different dimensions between features, the vectors corresponding to the structured data can be standardized. Commonly used standardization methods include standard deviation standardization and extreme value standardization. The structured data vectors obtained after standardization have values ​​for each dimension within a relatively uniform range, facilitating subsequent processing and analysis by larger models.

[0074] In this embodiment, the structured data vector integrates schedules, holiday information, user health or emotional goals, and preference models, and is uniformly input into the subsequent processing module. It is understood that, since the structured data vector is generated based on user behavioral information, it can represent that information.

[0075] Furthermore, in this embodiment, the user's target emotional state can be determined using a large model based on the current emotional state and behavioral information. Here, the large model can be a deep learning model with a large number of parameters and powerful learning capabilities, such as a Generative Pre-trained Transformer (GPT), BERT, etc. By training the large model on a large-scale dataset, it can be enabled to understand and process complex natural language tasks, achieving tasks such as target emotional state prediction and diet recommendation.

[0076] Here, the target emotional state can be an emotional state that the user is expected to achieve, aiming to guide the user to generate a positive and appropriate emotional state, with emotional characteristics opposite to the current emotional state. For example, if the user's current emotional state is negative emotions such as anxiety, irritability, or frustration, the target emotional state can be positive emotions such as joy, calmness, or exhilaration.

[0077] Furthermore, after determining the user's target emotional state, the algorithm and knowledge within the large model can be used to analyze the dietary needs corresponding to the target emotional state, combined with preference information from the behavioral data, and to select suitable foods to generate a dietary recommendation plan based on reasonable combination principles. Here, the dietary recommendation plan can include meal times, recommended dishes, and reasons for the recommendation.

[0078] By adopting the above method, the current emotional state and behavioral information are comprehensively considered in the process of determining the target emotional state. This multi-dimensional information fusion enables information from each dimension to serve as a basis for interpreting the target emotional state, thereby improving the accuracy of determining the target emotional state.

[0079] Furthermore, the model incorporates the target emotional state and preference information during the generation of dietary recommendations. Since preference information reflects user preferences, and the target emotional state clearly indicates the desired effect through dietary adjustments, the recommendations generated by the large model satisfy both the user's emotional regulation needs and their taste preferences. This improves the accuracy of dietary recommendations and enhances the interpretability of the recommendation path.

[0080] Figure 4 This is a schematic flowchart illustrating a dietary recommendation method implemented according to an embodiment of the present disclosure, as shown below. Figure 4 As shown, the implementation of a dietary recommendation method may include the following steps.

[0081] S401. Send the acquired user emotion data to the emotion recognition module.

[0082] Here, the emotion recognition module is part of the larger model; that is, the larger model includes the emotion recognition module.

[0083] In some implementations, determining the user's current emotional state includes:

[0084] Obtain at least one of the user's facial images, social voice content, social text content, and physiological data;

[0085] The emotion recognition module determines the current emotional state based on at least one of the user's facial image, social voice content, social text content, and physiological data.

[0086] In this embodiment of the disclosure, emotion data may include at least one of the following: a user's facial image, social voice content, social text content, and physiological data. Here, after obtaining user permissions, emotion data can be acquired from the corresponding device or software. For example, a user's facial image can be acquired using an image acquisition device (such as a camera, facial scanner, etc.); social voice content and social text content can be acquired from instant messaging software or social media platforms; and physiological data (such as heart rate, skin conductance response, etc.) can be acquired from the user's wearable device.

[0087] Furthermore, based on emotion data, the user's current emotional state can be obtained using the emotion recognition module in the large model.

[0088] By employing the above methods, multimodal emotion data tailored to users can be obtained, enhancing the flexibility of emotion data acquisition. Furthermore, multimodal emotion data can reflect a user's current emotional state from different perspectives, reducing errors caused by single-emotion data and thus improving the accuracy and reliability of current emotion state identification.

[0089] In some implementations, the current emotional state is determined using an emotion recognition module based on at least one of the user's facial image, social voice content, social text content, and physiological data, including:

[0090] Acquire at least one of the following: facial features of facial images, speech features of social voice content, text features of social text content, and physiological features of physiological data;

[0091] At least one of facial features, voice features, text features, and physiological features is concatenated to obtain an emotion concatenation vector;

[0092] An emotion concatenation vector is input into the emotion recognition module, which then determines the attention distribution weight corresponding to the emotion concatenation vector and determines the current emotion state based on the emotion concatenation vector and the attention distribution weight.

[0093] Figure 5 This is a schematic diagram of a process for identifying the current emotional state according to an embodiment of the present disclosure.

[0094] like Figure 5 As shown, the process for identifying the current emotional state may include the following steps:

[0095] S501, Obtain the user's facial image.

[0096] S502. Extract facial features from the facial image.

[0097] In this embodiment of the disclosure, a convolutional neural network (CNN), such as a residual network (ResNet), can be used to extract facial features from a facial image through structures such as convolutional layers, pooling layers, and fully connected layers.

[0098] Specifically, in the convolutional layer, local features can be extracted from the facial image through convolution operations. Further, the convolutional kernel slides across the facial image, calculating the dot product of local regions to generate a feature map. Then, pooling layers can be used to reduce the spatial dimensionality of the feature map, decreasing computation while preserving important features. Common pooling operations include max pooling and average pooling. In one example, multiple convolutional and pooling layers can be stacked to improve the accuracy of facial feature extraction.

[0099] Furthermore, a fully connected layer can be used to map the extracted high-level features to emotion categories, and the probability of each category can be output through the Softmax activation function. Then, the emotion category with the highest probability can be selected as the feature extraction result of the facial image.

[0100] In one example, the vector of facial features can be denoted as f. I The CNN used to extract facial features is If the facial image is I, then the facial feature vector f is extracted based on the facial image I. I The formula can be:

[0101]

[0102] here, This represents a real vector of dimension d1.

[0103] S503, Obtain social voice content.

[0104] S504. Extract the speech features of social voice content.

[0105] In this embodiment of the disclosure, the Mel-Frequency Cepstral Coefficients (MFCC) feature sequence of social speech content can be processed by a Bidirectional Long Short-Term Memory (BiLSTM) network to capture the dynamic changes of social speech content over time, thereby extracting speech features that can characterize social speech content.

[0106] In one example, the extracted MFCC feature sequence can be used as input to a BiLSTM. The BiLSTM processes the MFCC feature sequence from front to back to capture forward speech feature changes from the past to the present. Simultaneously, the BiLSTM processes the MFCC feature sequence from back to front to capture backward speech feature changes from the future to the present. Further, the forward and backward speech feature changes are concatenated to obtain a speech feature change containing complete information, from which speech features are then extracted.

[0107] In one example, the vector of speech features can be denoted as f. A The deep learning network used to extract speech features is If the social voice content is A, then the vector f for extracting voice features based on the social voice content A is... A The formula can be:

[0108]

[0109] here, This represents a real vector of dimension d2.

[0110] S505, Obtain social text content.

[0111] S506. Extract textual features from social text content.

[0112] In this embodiment of the disclosure, the BERT model can be used to extract textual features from social text content. Specifically, the BERT model can split social text content into a sequence of units (tokens) at the subword or word level, and map each token to a high-dimensional vector.

[0113] Furthermore, a self-attention mechanism is used to calculate the association weights of each token with other tokens, thereby capturing the contextual dependencies of that token within the social text content. Finally, the output is textual features containing semantic information, which can be represented as vectors.

[0114] In one example, we can define the vector of text features as f. T The deep learning network used to extract text features is If the social text content is T, then the vector f for extracting speech features based on the social text content T is... T The formula can be:

[0115]

[0116] here, This represents a real vector of dimension d3.

[0117] S507. Obtain physiological data.

[0118] S508. Extract physiological characteristics from physiological data.

[0119] In this embodiment of the disclosure, a sliding time window can be used to segment physiological data (such as heart rate, blood pressure, brain waves, etc.), and a Long Short-Term Memory (LSTM) network can be used to model the temporal dependencies of these segmented data in order to extract physiological features that can characterize the physiological data.

[0120] Specifically, continuous physiological data can be divided into multiple time segments using a sliding time window, with each segment containing physiological data within a certain time range. These time segments are then sequentially input into an LSTM, which captures the dependencies between them and ultimately outputs the corresponding physiological features for each segment, which can be represented as a vector.

[0121] In one example, we can define the vector of physiological characteristics as f. P The deep learning network used to extract physiological features is If the physiological data is P, then a vector f of physiological features is extracted based on the physiological data P. P The formula can be:

[0122]

[0123] here, This represents a real vector of dimension d4.

[0124] S509. Concatenate at least one of the facial features, voice features, text features, and physiological features to obtain an emotion concatenation vector.

[0125] S510. Input the emotion concatenation vector into the emotion recognition module to obtain the current emotion state.

[0126] In this embodiment of the disclosure, the emotion splicing vector F can be represented as:

[0127]

[0128] here, This represents a real vector of dimension d×4.

[0129] Furthermore, the self-attention mechanism in the emotion recognition module can be used to determine the attention distribution weights corresponding to the emotion concatenation vector. Here, the emotion recognition module can include a Transformer network architecture for processing multimodal data, and the formula for calculating the attention distribution weights is:

[0130]

[0131] In the above formula, W att Let Q be the query vector of the emotion concatenation vector F, K be the key vector of the emotion concatenation vector F, d be the number of rows in the emotion concatenation vector F, and softmax() be the normalized probability distribution function. It should be noted that in the self-attention mechanism, the query vector Q and key vector K can be obtained by performing a linear transformation on the emotion concatenation vector F. This linear transformation can be implemented by the internal algorithm of the emotion recognition module.

[0132] Furthermore, based on the emotion splicing vector F and the attention distribution weights W... att This allows us to obtain the fused emotion vector. The formula for calculating the fused emotion vector is:

[0133] e user =W att ·F (7)

[0134] In the above formula, e user To fuse the emotion vectors, the emotion recognition module can be used to analyze them to determine the current emotional state. Simultaneously, the emotion recognition module can also obtain the confidence score corresponding to the current emotional state. For example, the output of the emotion recognition module could be "anxiety - confidence score 0.78" or "happiness - confidence score 0.63," etc.

[0135] In this embodiment of the disclosure, the emotion recognition module collects multimodal data (i.e., facial images, social voice content, social text content, and physiological data), processes them separately, and then generates a unified fused emotion vector.

[0136] By employing the above method, at least one of facial features, voice features, text features, and physiological features is extracted and concatenated into an emotion concatenation vector. This approach integrates multimodal information to comprehensively represent emotional states. Subsequently, the emotion recognition module calculates attention distribution weights based on the emotion concatenation vector and performs weighted fusion of the multimodal features to obtain a fused emotion vector. Finally, the user's current emotional state is identified based on the fused emotion vector, thus improving the accuracy of emotion recognition.

[0137] like Figure 4 As shown, after identifying the user's current emotional state, the following steps are also included.

[0138] S402. Transmit the current emotional state to the user information acquisition module.

[0139] S403, The user information acquisition module requests user behavior information.

[0140] S404. The user information acquisition module receives the user's behavioral information. Furthermore, the current emotional state and the user's behavioral information can be used to construct the first prompt text.

[0141] S405. Input the first prompt text into the emotion reasoning module, and the emotion reasoning module determines the target emotional state.

[0142] In some implementations, the large model includes an emotion reasoning module, which includes an emotion transfer graph and an emotion reasoning service;

[0143] Among these, based on current emotional state and behavioral information, a large model is used to determine the user's target emotional state, including:

[0144] Based on the current emotional state and behavioral information, the first emotional state related to the current emotional state and behavioral information, as well as the first confidence level of the first emotional state, are determined using the emotion transfer map.

[0145] Based on the current emotional state and behavioral information, the second emotional state and the second confidence level of the second emotional state are determined using the emotional reasoning service.

[0146] Determine the target emotional state based on the first and second emotional states.

[0147] In this embodiment, the emotion reasoning module is the core component for determining the target emotional state. It jointly infers the transformation path from the current emotional state to the target emotional state through an emotion transfer graph and an emotion reasoning service, verifies the rationality of the transformation path, and ultimately determines the target emotional state that meets the requirements.

[0148] By employing the above approach and combining emotion transfer mapping with emotion inference services, it is possible to generate associated first and second emotion states, along with their corresponding confidence levels, based on the current emotional state and behavioral information. This allows for the comprehensive determination of the target emotional state through multi-dimensional inference results. This collaborative inference method improves the accuracy of determining the target emotional state. Furthermore, the quantification of confidence levels enhances the interpretability of the target emotional state, providing a data foundation for subsequent dietary recommendations.

[0149] Figure 6 This is a schematic diagram of a process for determining a target emotional state according to an embodiment of the present disclosure.

[0150] like Figure 6 As shown, the process for determining the target emotional state may include the following steps:

[0151] S601. Obtain the current emotional state.

[0152] S602. Obtain user behavior information.

[0153] S603. Using the emotion transfer map, determine the first emotional state and the first confidence level of the first emotional state.

[0154] In some implementations, the emotion transfer graph includes multiple nodes, each node corresponding to an emotional state, and there are emotion transfer paths between different nodes.

[0155] Figure 7 This is a schematic diagram of an emotion transfer graph according to an embodiment of the present disclosure.

[0156] like Figure 7As shown, the emotion transfer graph includes multiple nodes, each representing an emotional state (such as anxiety, pleasure, focus, excitement, and calmness). The connections between different nodes can be considered as emotion transfer paths between different emotions, representing the accessibility and transfer cost of transitioning from one emotion to another. In one example, the emotion transfer graph can be represented as G = (v, e), where v represents a node in the emotion transfer graph, and e represents the emotion transfer path between nodes.

[0157] In this way, the emotion transfer graph constructs a multi-node network structure, mapping different emotional states to nodes in the graph and defining the emotion transfer paths between nodes, thus achieving structured modeling of dynamic emotion transfer. Furthermore, this graph-based representation can intuitively present the correlations and transfer patterns between various emotional states, providing theoretical support for emotion reasoning and prediction.

[0158] In some implementations, based on the current emotional state and behavioral information, an emotion transfer map is used to determine a first emotional state related to the current emotional state and behavioral information, including:

[0159] Based on current emotional state and behavioral information, using the emotion transfer graph, we determine the semantic distance between the current emotional state and other emotional states in the emotion transfer graph, as well as the fit between the current emotional state and other emotional states and behavioral information.

[0160] Based on semantic distance and fit, the first emotional state is determined from other emotional states.

[0161] In this embodiment of the disclosure, the Word to vector (Word2vec) method can be used to convert the current emotional state and behavioral information into vectors for subsequent semantic distance calculation.

[0162] Furthermore, in one example, based on the vector of the current emotional state and behavioral information and the vectors of other emotional states in the emotional transition graph, cosine similarity can be used to calculate the semantic distance between the current emotional state and other emotional states in the emotional transition graph.

[0163] In this embodiment of the disclosure, the adaptability of the emotion transition path between the current emotional state and other emotional states to behavioral information can be quantified by the stress intensity in the behavioral information. Specifically, firstly, an emotion transition path is generated based on an emotion transition map, and the emotion transition path is feature-encoded by combining real-time user behavioral information (such as quantified values ​​of task stress intensity, heart rate variability, etc.); then, the adaptability of each emotion transition path is quantified by calculating the similarity or matching degree between the path features (such as transition steps, rationality of stress regulation) and the features of the behavioral information.

[0164] Furthermore, based on semantic distance and the adaptability of the emotion transition path, the transfer cost from the current emotional state to other emotional states is calculated. Here, the transfer cost function can be expressed as:

[0165] Cost(v i →v j )=α·D emo (v i ,v j )+β·C ctx (v i ,v j ,c user (8)

[0166] In the above formula, v i v represents the current emotional state. j For other emotional states in the emotion transfer map, D emo (v i ,v j C represents the semantic distance between the current emotional state and other emotional states in the emotional transition map. ctx (v i ,v j ,c user The value of α represents the fit between the current emotional state and other emotional states in terms of emotional transition paths and behavioral information, while α and β are hyperparameter weighting coefficients. In one example, the values ​​of α and β can be preset according to actual needs to improve the accuracy of the calculation of transition costs.

[0167] In this embodiment, the first emotional state can be inferred through the transfer cost. In one example, the transfer cost between the current emotional state and other emotional states in the emotional transfer graph can be calculated, and the emotional state with the lowest transfer cost in the emotional transfer graph is determined as the first emotional state. Simultaneously, while determining the first emotional state, the emotional transfer graph can also determine the first confidence level corresponding to the first emotional state to quantify the rationality and reliability of the first emotional state. It should be noted that the lower the transfer cost from the current emotional state to the first emotional state, the higher the first confidence level of the first emotional state can be considered.

[0168] In one example, an inference engine incorporating graph search algorithms (such as Dijkstra's algorithm or A* algorithm) can be used to compute the optimal emotion transition path to determine the first emotion state based on the current emotion state.

[0169] Using the above method, the semantic distance between the current emotional state and other emotional states is calculated using an emotion transfer graph. This distance is then combined with behavioral information to assess the fit of the emotion transition path. Furthermore, through joint analysis of semantic distance and fit, emotional states with strong semantic relevance and high fit in the emotion transfer graph are identified as the first emotional state. This process enables personalized reasoning for the first emotional state, improving the accuracy of emotion reasoning and providing a data foundation for determining subsequent target emotional states.

[0170] S604. Using emotion reasoning services, determine the second emotional state and the second confidence level of the second emotional state.

[0171] In some implementations, based on the current emotional state and behavioral information, an emotion reasoning service is used to determine a second emotional state related to the current emotional state and behavioral information, including:

[0172] Based on the current emotional state and behavioral information, construct the first prompt text;

[0173] Input the first prompt text into the emotion reasoning service, and the emotion reasoning service will output the second emotion state.

[0174] In this embodiment of the disclosure, the first prompt text can be constructed based on the current emotional state and behavioral information. For example, if the emotion recognition module determines that the current emotional state is anxiety and obtains information that the user has an upcoming exam, the first prompt text could be: "The user is currently in an anxious state and has an upcoming exam. Please recommend a reasonable adjustment goal for the current emotional state."

[0175] Furthermore, the emotion reasoning service can utilize NLP technology to parse key elements (such as the current emotional state and target instructions) in the first prompt text, and dynamically infer the second emotional state based on the knowledge learned during the training phase. For example, for the aforementioned example of the first prompt text, the output of the emotion reasoning service could be "Recommended emotional state: Stable and focused. Reason: Helps improve cognitive ability and task execution."

[0176] In one example, an external mental health model (such as Cognitive Behavior Therapy (CBT)) can be used to validate the output of the emotion reasoning service. If the emotion reasoning service fails to produce high-quality output, a rule-based knowledge graph can be automatically invoked for auxiliary correction. This knowledge graph can combine psychological rules, emotion regulation rules, and domain expert experience to optimize the output results through preset causal chains or constraints, ensuring that the second emotional state and its regulation reasons meet the requirements of scientific rigor and practicality.

[0177] In this embodiment of the disclosure, the emotion reasoning service can also determine a second confidence level for the second emotional state. If the output of the emotion reasoning service references psychological rules as a basis, the second confidence level of the generated second emotional state can be improved.

[0178] Using the above method, a first prompt text is constructed based on the current emotional state and behavioral information, and then input into the emotion inference service to generate a second emotional state. Because the current emotional state and behavioral information are integrated, a high-dimensional input is provided to the emotion inference service, thereby improving the accuracy of emotion recognition and providing a data foundation for determining the subsequent target emotional state.

[0179] S605. Determine whether the first emotional state and the second emotional state are consistent. If yes, proceed to S606; otherwise, proceed to S607.

[0180] S606. When the first emotional state and the second emotional state are consistent, the first emotional state or the second emotional state shall be determined as the target emotional state.

[0181] In this embodiment of the disclosure, the target emotional state can be determined based on the relationship between the first emotional state and the second emotional state. Specifically, if the first emotional state and the second emotional state are consistent, then either the first emotional state or the second emotional state can be directly determined as the target emotional state.

[0182] S607. In cases where the first emotional state and the second emotional state are inconsistent, determine the target emotional state based on the first confidence level and the second confidence level.

[0183] If the first and second emotional states are inconsistent, then the weights corresponding to the first and second emotional states are determined based on the first and second confidence levels. In one example, the weight of the first emotional state can be determined by dividing the first confidence level by the sum of the first and second confidence levels. Correspondingly, the weight of the second emotional state can be the second confidence level divided by the sum of the first and second confidence levels. This weight determination method can be expressed as:

[0184]

[0185] In the above formula, C1 is the first confidence level, C2 is the second confidence level, and λ is the weight of the first emotional state (also known as the fusion weight). Correspondingly, the weight of the second emotional state can be 1-λ.

[0186] Furthermore, the weights of the first emotional state and the second emotional state can be used to weightedly fuse the two emotional states to determine the target emotional state. The formula for determining the target emotional state is as follows:

[0187] e target =λ·e graph +(1-λ)·e llm (10)

[0188] In the above formula, e target For the target emotional state, e graph The first emotional state, e llm This is the second emotional state.

[0189] In this embodiment of the disclosure, the weights of the first emotional state and the second emotional state can be adaptively adjusted according to the complexity of the input data (such as the multimodal data dimension) and the conflicts arising from emotional reasoning (such as consistency differences) to improve the accuracy of the determination of the target emotional state.

[0190] Using the above method, when the first and second emotional states are consistent, the target emotional state can be directly determined, reducing redundant calculations and improving the efficiency of target emotional state determination. Furthermore, when the first and second emotional states are inconsistent, the fusion weight can be determined based on the confidence level, and the target emotional state can be determined based on the fusion weight, thus improving the reliability of the target emotional state determination.

[0191] like Figure 4 As shown, after determining the target emotional state, the following steps are also included.

[0192] S406. The emotion reasoning module sends the target emotional state to the diet recommendation module, which then generates a diet recommendation plan.

[0193] Here, the diet recommendation module is part of the larger model; that is, the larger model includes the diet recommendation module.

[0194] In some implementations, based on the target emotional state and preference information, a large model is used to generate dietary recommendation schemes, including:

[0195] Based on the target's emotional state and preference information, construct a second cue text;

[0196] Input the second prompt text into the diet recommendation module, and the diet recommendation module will output a diet recommendation plan;

[0197] The dietary recommendation plan includes recommended foods and the reasons for recommending them, which are related to the target emotional state.

[0198] Figure 8 This is a schematic diagram of the process for generating a dietary recommendation scheme according to an embodiment of the present disclosure.

[0199] like Figure 8 As shown, generating a dietary recommendation plan may include the following steps:

[0200] S801, Receive the target's emotional state.

[0201] S802, Receive user preference information.

[0202] S803. Construct a second prompt text based on the target's emotional state and preference information.

[0203] In this embodiment, a second prompt text is constructed by receiving the target emotional state and user-related preference information. Based on the second prompt text, a dietary recommendation scheme that aligns with the target emotional state's adjustment direction is generated using the dietary recommendation module's built-in dietary nutrition database and its own reasoning capabilities. Here, the dietary nutrition database may include a smart menu library, a nutrition literature database, a dietary emotion association knowledge graph, etc.

[0204] In one example, the target emotional state could be "focused," "calm," or "momentum enhancement," while preference information could include illness, dietary habits, or food allergies. Furthermore, based on the target emotional state and preference information, a second prompt text can be constructed. For example, the second prompt text could be: "The user's current target emotional state is 'enhanced focus,' and they are a vegetarian. What breakfast combinations are recommended? Please explain your reasoning based on nutritional knowledge."

[0205] S804. Based on the second prompt text, use the diet recommendation module to determine at least one of the nutrients and neurotransmitters.

[0206] S805. Based on at least one of the nutrients and neurotransmitters, combined with preference information, determine a dietary recommendation plan.

[0207] In some implementations, a second prompt text is input to the diet recommendation module, which then outputs a diet recommendation plan, including:

[0208] Based on the target emotional state in the second prompt text, use the diet recommendation module to determine at least one of the nutrients and neurotransmitters;

[0209] Based on at least one of the nutrients and neurotransmitters, combined with preference information in the second prompt text, a dietary recommendation plan is determined using the dietary recommendation module.

[0210] In this embodiment, the diet recommendation module, by parsing the target emotional state (such as focus, calmness, etc.) in the second prompt text, can utilize a preset emotion regulation mechanism to convert the target emotional state into a regulatory need for at least one of the following: nutrients (such as magnesium, B vitamins, etc.) and neurotransmitters (such as serotonin, glutamate, etc.). For example, when the target emotional state is calm, the emotion regulation mechanism can determine that the required nutrients and neurotransmitters are magnesium, B vitamins, and tryptophan.

[0211] Furthermore, by calculating the cosine similarity between the nutrients and neurotransmitters required for the target emotional state and various food nutrients (such as protein, carbohydrates, and tryptophan) in a food nutrition database, the degree of matching between each food and the regulation of the target emotional state can be quantified, thereby selecting recommended foods. The formula for quantifying the degree of matching between each food and the regulation of the target emotional state is as follows:

[0212]

[0213] In the above formula, f i For the i-th type of food, Score(f) i Let be the score of the i-th food, and n be the score of the ith food. j For the j-th nutrient or neurotransmitter in the i-th food, n target Nutrients or neurotransmitters that regulate the target emotional state. It is understandable that in this formula, n... j and n target Operations are usually performed in vector form.

[0214] By using the above formula, a preset number of recommended foods can be selected from all foods based on their scores. In one example, the preset number can be K, so the top K recommended foods with the highest scores can be selected from all foods based on each food's score. Here, K can be an integer greater than or equal to 1.

[0215] Furthermore, after selecting multiple recommended foods, the system combines preference information with the rule engine of the diet recommendation module to further filter and optimize the combinations, ultimately generating a personalized diet recommendation plan that balances the user's emotional state regulation needs with their preferences. For example, if a user prefers low sugar, high-sugar recommended foods can be removed from the list, and the remaining foods can be combined and cooked according to dietary balance principles (such as the protein-carbohydrate-fat ratio).

[0216] By analyzing the regulatory needs of nutritional elements and neurotransmitters based on the target emotional state, the direction of using food to regulate the target emotional state is clarified. Furthermore, by combining user preference information to generate dietary recommendation plans, the dietary recommendation plans can not only meet the needs of emotional state regulation, but also adapt to the user's personalized needs, thereby improving the accuracy and practicality of dietary recommendations.

[0217] Furthermore, based on the second prompt text, the diet recommendation module can output a diet recommendation plan. For example, the diet recommendation plan could be: "Recommended diet: oatmeal, blueberries, walnuts; Reason: oatmeal provides sustained energy, blueberries are rich in antioxidants, and the polyunsaturated fatty acids in walnuts help with concentration."

[0218] Alternatively, in another example, the second prompt text could include a number of dietary recommendations. For instance, the second prompt text could be: "Please recommend two breakfast options suitable for 'shifting focus in an anxious state,' meeting the following criteria: vegetarian, high in polyunsaturated fatty acids, and low in sugar. Please explain the reasons for your recommendations."

[0219] Furthermore, based on the second prompt text, the diet recommendation module can output two diet recommendation plans. For example, the diet recommendation plan could be "Plan 1: Walnut oatmeal porridge and blueberries, because they are rich in polyunsaturated fatty acids and low in carbohydrates, which can help the brain maintain focus; Plan 2: Egg rolls and spinach salad, because tryptophan and folic acid work synergistically to reduce anxiety and improve alertness."

[0220] Using the above method, a second prompt text is constructed based on the target emotional state and the user's preference information. This text drives the diet recommendation module to generate a personalized diet recommendation plan that includes recommended foods and the reasons for those recommendations. This diet recommendation plan not only includes the recommended foods but also the reasons for recommending them, helping users understand the logical connection and scientific basis between diet and the target emotional state, thereby enhancing user trust in the diet recommendation plan.

[0221] like Figure 4 As shown, after generating the dietary recommendation plan, the following steps are also included.

[0222] S407, The diet recommendation module sends a diet recommendation plan to the user.

[0223] In one example, the diet recommendation module can send diet recommendations to the user's front-end device, which will then display and present them to the user. For instance, the front-end device could display a diet recommendation such as, "You are currently in a state of anxiety. The system hopes to help you return to a calm state. We recommend a breakfast consisting of oatmeal, blueberries, and walnuts, which can help stabilize your emotions and improve concentration."

[0224] S408. Users provide feedback on the recommended diet and send the feedback information to the model fine-tuning module.

[0225] In some implementations, it also includes:

[0226] Obtain user feedback on the recommended diet plan;

[0227] The large model is fine-tuned based on dietary recommendations and feedback information.

[0228] In this embodiment, user feedback on the dietary recommendations may include the adoption status of the recommendations, user evaluations, and subsequent records of the user's emotional state. Based on this feedback, model fine-tuning data can be constructed to fine-tune the overall model, improving its accuracy in determining the target emotional state and generating dietary recommendations.

[0229] Figure 9 This is a schematic diagram of the process of fine-tuning data samples in constructing a model according to an embodiment of the present disclosure.

[0230] like Figure 9 As shown, constructing model fine-tuning data samples may include the following steps:

[0231] S901. Obtain information on the user's adoption of dietary recommendations.

[0232] Here, the adoption of dietary recommendations by users can include their acceptance or rejection of dietary recommendations.

[0233] S902. Obtain user feedback and evaluation.

[0234] S903. Utilize NLP technology to perform sentiment analysis on user evaluation feedback.

[0235] Here, user feedback can include textual reviews of recommended diets (e.g., the diet is too greasy). Furthermore, the BERT model or the Robustly Optimized BERT Pretraining Approach (RoBERTa) can be used to analyze the emotional attitudes behind user feedback.

[0236] S904. Obtain data on subsequent changes in the user's emotional state.

[0237] S905. Verify the data on subsequent changes in the user's emotional state to determine the effectiveness of the dietary recommendation plan.

[0238] Here, an emotion recognition module can be used to identify the user's subsequent emotional state, thereby obtaining data on changes in that state. Furthermore, this data can be used to analyze the effect of the dietary recommendation on regulating the target emotional state. In one example, a large model with analytical capabilities can be used to evaluate the effect of the dietary recommendation on regulating the target emotional state.

[0239] S906. Use user adoption of dietary recommendations, sentiment analysis results of evaluation feedback, and the effectiveness of dietary recommendations to construct a data sample for model fine-tuning.

[0240] Here, in the model fine-tuning data sample, by constructing a triplet data structure of "dietary recommendation plan - user feedback information - mood improvement score", the actual impact of the diet plan on the user's emotional state can be clearly quantified. Then, the model fine-tuning data sample can be used to fine-tune the large model and improve its performance.

[0241] Furthermore, such as Figure 4 As shown, the model fine-tuning module uses model fine-tuning data samples to fine-tune the large model, including the following steps.

[0242] S409. Fine-tune the diet recommendation module using model-based data samples.

[0243] S410, Fine-tune the emotion reasoning module using model-based fine-tuning data samples.

[0244] In this embodiment of the disclosure, the model fine-tuning module can continuously collect feedback information from the dietary recommendation scheme, construct model fine-tuning data samples, and use them to fine-tune the large model or optimize the inference strategy of the modules in the large model.

[0245] Taking the fine-tuning of the diet recommendation module as an example, the model fine-tuning data sample can be (x i y i ) = (Recommended dietary combination, mood improvement score). Here, x i This can include dietary recommendations and target emotional states, typically represented as vectors; y i It is a mood improvement score, which can be expressed using specific scores (e.g., 1-5 points) or binary forms (e.g., improved or ineffective). y i It is believed to be the label values ​​in the data samples used for model fine-tuning.

[0246] Furthermore, external learning models (such as binary classifiers or regression models) can be introduced to learn x. i The prediction is made to obtain a predicted mood improvement score. The specific formula can be:

[0247] y′ i =f θ (xi (12)

[0248] In the above formula, y′ i f is the predicted score for mood improvement. θ () represents the external learning model.

[0249] Furthermore, y can be calculated. i and y′ i The loss function is used to fine-tune the large model by minimizing the loss function. The specific formula can be:

[0250]

[0251] In one example, a reinforcement learning strategy can be used to fine-tune a large model. For instance, the mood improvement score can be used as the reward objective. Furthermore, the diet recommendation strategy can be dynamically optimized using a policy gradient algorithm or a human feedback-based reinforcement learning (RLHF) method to maximize the mood improvement score, while simultaneously improving the interpretability and safety of the diet recommendation scheme. In this example, reinforcement learning iterations (such as the Federated Averaging Algorithm (FedAvg)) can be executed on a local client to achieve localized reinforcement training of the large model, supporting the continuous evolution of personalized recommendation strategies.

[0252] In this embodiment of the disclosure, the large model can also be fine-tuned with personalized parameters based on the user's physiological characteristics (such as metabolic indicators, hormone levels, etc.) and psychological state (such as mood fluctuation patterns, stress response types) to adapt to the physical and mental differences of different users.

[0253] By employing the above method, user feedback on dietary recommendations is continuously collected to construct a data sample for model fine-tuning, thereby enabling adjustments to the overall model. The fine-tuned model can then generate more accurate dietary recommendations, thus improving the relevance between the recommendations and the user experience.

[0254] The dietary recommendation method proposed in this disclosure has three core characteristics: emotion perception, goal-oriented optimization, and dynamic adaptability. It can be integrated into scenarios such as smart wearable devices, emotion intervention assistance platforms, and personalized health management systems, and can realize a closed-loop application from data collection to intervention feedback.

[0255] This disclosure also proposes a diet recommendation device based on a large model. Figure 10This is a schematic diagram of the structure of a large-model-based diet recommendation device 1000 according to an embodiment of the present disclosure, including...

[0256] The first determining module 1010 is used to determine the user's current emotional state and the user's behavioral information; wherein, the behavioral information includes the user's preference information;

[0257] The second determination module 1020 is used to determine the user's target emotional state based on the current emotional state and behavioral information, using a large model.

[0258] The first recommendation module 1030 is used to generate dietary recommendation schemes based on the target's emotional state and preference information, using a large model.

[0259] In some implementations, the large model includes an emotion recognition module;

[0260] The first determining module 1010 is used for:

[0261] Obtain at least one of the user's facial images, social voice content, social text content, and physiological data;

[0262] The current emotional state is determined using an emotion recognition module based on at least one of the user's facial image, social voice content, social text content, and physiological data.

[0263] In some implementations, the first determining module 1010 is used for:

[0264] Acquire at least one of the following: facial features of facial images, speech features of social voice content, text features of social text content, and physiological features of physiological data;

[0265] At least one of facial features, voice features, text features, and physiological features is concatenated to obtain an emotion concatenation vector;

[0266] An emotion concatenation vector is input into the emotion recognition module, which then determines the attention distribution weight corresponding to the emotion concatenation vector and determines the current emotion state based on the emotion concatenation vector and the attention distribution weight.

[0267] In some implementations, the large model includes an emotion reasoning module, which includes an emotion transfer graph and an emotion reasoning service;

[0268] The second determining module 1020 is used for:

[0269] Based on the current emotional state and behavioral information, the first emotional state related to the current emotional state and behavioral information, as well as the first confidence level of the first emotional state, are determined using the emotion transfer map.

[0270] Based on the current emotional state and behavioral information, the emotion reasoning service is used to determine the second emotional state related to the current emotional state and behavioral information, as well as the second confidence level of the second emotional state.

[0271] Based on the first emotional state and the second emotional state, the target emotional state is determined.

[0272] In some implementations, the emotion transfer map includes multiple nodes, each node corresponding to an emotional state, and there are emotion transfer paths between different nodes.

[0273] In some implementations, the second determining module 1020 is used for:

[0274] Based on current emotional state and behavioral information, using the emotion transfer graph, we determine the semantic distance between the current emotional state and other emotional states in the emotion transfer graph, as well as the fit between the current emotional state and other emotional states and behavioral information.

[0275] Based on semantic distance and fit, the first emotional state is determined from other emotional states.

[0276] In some implementations, the second determining module 1020 is used for:

[0277] Based on the current emotional state and behavioral information, construct the first prompt text;

[0278] Input the first prompt text into the emotion inference service, and the emotion inference service will output the second emotion state.

[0279] In some implementations, the second determining module 1020 is used for:

[0280] If the first emotional state and the second emotional state are consistent, the first emotional state or the second emotional state shall be determined as the target emotional state.

[0281] When the first emotional state and the second emotional state are inconsistent, the target emotional state is determined based on the first confidence level and the second confidence level.

[0282] In some implementations, the large model also includes a diet recommendation module;

[0283] The first recommended module 1030 is used for:

[0284] Based on the target's emotional state and preference information, construct a second cue text;

[0285] Input the second prompt text into the diet recommendation module, and the diet recommendation module will output a diet recommendation plan;

[0286] The dietary recommendation plan includes recommended foods and the reasons for recommending them, which are related to the target emotional state.

[0287] In some implementations, the first recommendation module 1030 is used for:

[0288] Based on the target emotional state in the second prompt text, use the diet recommendation module to determine at least one of the nutrients and neurotransmitters;

[0289] Based on at least one of the nutrients and neurotransmitters, combined with preference information in the second prompt text, a dietary recommendation plan is determined using the dietary recommendation module.

[0290] In some embodiments, this disclosure also proposes a diet recommendation device based on a large model. Figure 11 This is a schematic diagram of a large-model-based diet recommendation device 1100 according to an embodiment of the present disclosure, which also includes a model fine-tuning module 1140 for:

[0291] Obtain user feedback on the recommended diet plan;

[0292] Based on the dietary recommendations and feedback information, the large model was fine-tuned.

[0293] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.

[0294] The acquisition, storage, and application of personal information by users involved in this technical solution comply with relevant laws and regulations and do not violate public order and good morals.

[0295] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0296] Figure 12 A schematic block diagram of an example electronic device 1200 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0297] like Figure 12As shown, device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1202 or a computer program loaded from storage unit 1208 into random access memory (RAM) 1203. The RAM 1203 may also store various programs and data required for the operation of device 1200. The computing unit 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. Input / output (I / O) interface 1205 is also connected to bus 1204.

[0298] Multiple components in device 1200 are connected to I / O interface 1205, including: input unit 1206, such as keyboard, mouse, etc.; output unit 1207, such as various types of monitors, speakers, etc.; storage unit 1208, such as disk, optical disk, etc.; and communication unit 1209, such as network card, modem, wireless transceiver, etc. Communication unit 1209 allows device 1200 to exchange / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0299] The computing unit 1201 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1201 performs the various methods and processes described above, such as the diet recommendation method. For example, in some embodiments, the diet recommendation method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1200 via ROM 1202 and / or communication unit 1209. When the computer program is loaded into RAM 1203 and executed by the computing unit 1201, one or more steps of the diet recommendation method described above may be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured to perform the diet recommendation method by any other suitable means (e.g., by means of firmware).

[0300] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0301] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0302] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0303] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0304] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0305] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0306] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0307] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A diet recommendation method based on a large model, comprising: Determine the user's current emotional state and the user's behavioral information; wherein, the behavioral information includes the user's preference information; Based on the current emotional state and the behavioral information, the target emotional state of the user is determined using a large model; Based on the target emotional state and the preference information, a dietary recommendation scheme is generated using the large model.

2. The method according to claim 1, wherein, The large model includes an emotion recognition module; Determining the user's current emotional state includes: Acquire at least one of the user's facial image, social voice content, social text content, and physiological data; The current emotional state is determined using the emotion recognition module based on at least one of the user's facial image, social voice content, social text content, and physiological data.

3. The method according to claim 2, wherein, The determination of the current emotional state based on at least one of the user's facial image, social voice content, social text content, and physiological data, using the emotion recognition module, includes: Obtain at least one of the facial features of the facial image, the speech features of the social voice content, the text features of the social text content, and the physiological features of the physiological data; At least one of the facial features, the voice features, the text features, and the physiological features is concatenated to obtain an emotion concatenation vector; The emotion concatenation vector is input into the emotion recognition module, which then determines the attention distribution weight corresponding to the emotion concatenation vector and determines the current emotion state based on the emotion concatenation vector and the attention distribution weight.

4. The method according to any one of claims 1-3, wherein, The large model includes an emotion reasoning module, which includes an emotion transfer graph and an emotion reasoning service. The step of determining the user's target emotional state based on the current emotional state and the behavioral information using a large model includes: Based on the current emotional state and the behavioral information, the emotion transition map is used to determine a first emotional state related to the current emotional state and the behavioral information, as well as a first confidence level of the first emotional state. Based on the current emotional state and the behavioral information, the emotion reasoning service is used to determine a second emotional state related to the current emotional state and the behavioral information, as well as a second confidence level of the second emotional state. The target emotional state is determined based on the first emotional state and the second emotional state.

5. The method according to claim 4, wherein, The emotion transfer graph includes multiple nodes, each node corresponds to an emotional state, and there are emotion transfer paths between different nodes.

6. The method according to claim 5, wherein, The step of determining a first emotional state related to the current emotional state and the behavioral information using the emotional transition map, based on the current emotional state and the behavioral information, includes: Based on the current emotional state and the behavioral information, the semantic distance between the current emotional state and other emotional states in the emotional transition graph is determined using the emotional transition graph, as well as the fit between the emotional transition path between the current emotional state and the other emotional states and the behavioral information. The first emotional state is determined from the other emotional states based on the semantic distance and the fit.

7. The method according to any one of claims 4-6, wherein, The step of determining a second emotional state related to the current emotional state and the behavioral information using the emotional reasoning service includes: Based on the current emotional state and the behavioral information, a first prompt text is constructed; The first prompt text is input into the emotion reasoning service, and the emotion reasoning service outputs the second emotion state.

8. The method according to claim 7, wherein, Determining the target emotional state based on the first emotional state and the second emotional state includes: If the first emotional state and the second emotional state are consistent, the first emotional state or the second emotional state is determined as the target emotional state. If the first emotional state and the second emotional state are inconsistent, the target emotional state is determined based on the first confidence level and the second confidence level.

9. The method according to claim 8, wherein, The large model also includes a diet recommendation module; The step of generating a dietary recommendation plan based on the target emotional state and the preference information using the large model includes: Based on the target emotional state and the preference information, a second prompt text is constructed; Input the second prompt text into the diet recommendation module, and the diet recommendation module will output the diet recommendation plan; The dietary recommendation plan includes recommended foods and the reasons for recommending the foods, and the reasons are related to the target emotional state.

10. The method according to claim 9, wherein, The step of inputting the second prompt text into the diet recommendation module, and having the diet recommendation module output the diet recommendation plan, includes: Based on the target emotional state described in the second prompt text, the diet recommendation module is used to determine at least one of the nutritional elements and neurotransmitters. Based on at least one of the nutritional elements and the neurotransmitters, and in conjunction with the preference information in the second prompt text, the dietary recommendation module is used to determine the dietary recommendation plan.

11. The method according to any one of claims 1-10, further comprising: Obtain feedback from the user regarding the recommended diet; Based on the dietary recommendations and the feedback information, the large model is fine-tuned.

12. A diet recommendation device based on a large model, comprising: The first determining module is used to determine the user's current emotional state and the user's behavioral information; wherein, the behavioral information includes the user's preference information; The second determining module is used to determine the user's target emotional state based on the current emotional state and the behavioral information, using a large model. The first recommendation module is used to generate dietary recommendation schemes based on the target emotional state and the preference information, using the large model.

13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-11.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-11.

15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-11.