Data processing system and method for restaurant nutrition scoring, electronic equipment and medium

By designing a data processing system based on online menu information and user reviews, and combining large language models and the multi-armed Bandit algorithm, the system addresses the issues of manual reliance and limited information in existing restaurant nutrition rating systems. This enables the generation of high-precision nutrition labels and personalized advertising content, thereby enhancing the system's automation and adaptability.

CN120994817APending Publication Date: 2025-11-21CHINA AGRI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing restaurant nutrition rating systems rely on manual intervention, making them difficult to adapt to the high-frequency calls in online scenarios. They have limited information dimensions, lack multimodal data fusion and have a low degree of automation, failing to achieve full-process integration from data collection to content output, and lack personalized recommendations and health guidance.

Method used

Design a data processing system based on online menu information and user reviews. Through user interaction modules, data collection modules, nutrition perception tag construction modules, retrieval enhancement modules, nutrition scoring and report generation modules, combined with large language models and the multi-armed Bandit algorithm, realize the automation and personalization of nutrition scoring and advertising content generation.

Benefits of technology

It achieves high-precision generation of structured nutrition labels, information fusion of multimodal data, and generation of personalized advertising content, improving the automation level and versatility of the nutrition assessment system, and supporting automatic adaptation and personalized recommendations for multiple nutrition scoring systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994817A_ABST
    Figure CN120994817A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer language models, and provides a data processing system and method for restaurant nutrition scoring, electronic equipment and a medium. A user interaction module is used for obtaining keywords of a user input request; the data acquisition module is used for acquiring dish information and user comments according to keywords; the nutrition perception label construction module is used for calling nutrition related perception words according to keywords, dish information and user comments, and constructing a nutrition perception label quintuple; the retrieval enhancement module is used for identifying a searchable entity item from the nutrition perception tag quintuple, and accessing a knowledge enhancement retrieval library according to the searchable entity item to obtain a semantic context of nutrition background knowledge and tag content; and the nutrition scoring and report generation module is used for calling a large language model according to the semantic context and outputting a nutrition scoring table and a nutrition health report. According to the scheme, a new method for automatic nutrition scoring and advertisement content generation is realized, so that intelligent analysis, personalized recommendation and health guidance of catering nutrition information are realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer language models, and particularly relates to a data processing system and method for generating a restaurant nutrition score based on online dish new information and user comments, an electronic device and a medium. BACKGROUND

[0002] With the continuous enhancement of people's health awareness, the nutritional status of diet is gradually becoming the focus of consumers. Especially in the dining-out scenario, consumers often have difficulty in intuitively obtaining the nutritional structure, oil and salt usage, and overall health level of the dishes provided by a restaurant. At the same time, online catering platforms (such as Meituan, Dianping, etc.) accumulate a large amount of real comment data from users, menu content, and image information of dishes and environment, providing a new data basis for intelligent analysis of restaurant nutrition environment.

[0003] Some existing health evaluation systems, such as NESC-CC (Nutrition Environment Scoring for Chinese Catering) and OS-VAS (Oil-Salt Visual Analogue Scoring), mainly rely on expert scoring or questionnaire methods for construction, although they are scientific, but in practical application, there are generally problems such as high labor cost, low update frequency, lack of large-scale deployment capability, etc., which are difficult to adapt to high-frequency, diversified online catering data. In addition, existing nutrition scoring researches are mostly focused on menu structure or nutrition component analysis, and there is still a lack of comprehensive automatic scoring mechanism based on consumer real feedback and multi-modal data.

[0004] In terms of technical implementation, there is currently no mature system that can effectively integrate online comments, menu texts, dish photos, dining environment images, and other heterogeneous information, and automatically generate a structured nutrition perception label system. In addition, traditional nutrition scoring models also lack an automatic matching mechanism with user perception data, making it difficult to realize its potential in public dietary behavior guidance, health recommendation, and food environment supervision.

[0005] At the same time, with the diversification of information dissemination channels, the catering industry has put forward higher requirements for the shaping and precise promotion of healthy image. When choosing a restaurant, consumers not only pay attention to taste and service, but also increasingly value whether it meets their own healthy dietary preferences (such as low oil and low salt, sugar control, high protein, etc.). However, most of the current online advertisements and recommendation contents still focus on subjective evaluation or popular sorting, lacking personalized presentation mechanisms based on real nutrition characteristics of restaurants and health needs of target users.

[0006] The mainstream method for evaluating the nutritional environment of a restaurant at present is mainly based on a questionnaire model, such as NESC-CC (Chinese Catering Nutrition Scoring) and OS-VAS (Oil-Salt Visual Analogue Scoring), which quantitatively scores the menu structure, healthy dish supply, oil and salt control measures and environmental support of a restaurant through artificial field investigation, expert scoring or questionnaire form. These models are scientific in construction, have certain interpretability and practical value, and are often used in health intervention research and public policy making. Some studies attempt to introduce natural language processing and image recognition technology to extract emotional attitudes from user comments or estimate nutritional composition from dish images to assist health judgment. However, these studies are mostly limited to the processing of a single data modality, have not yet formed a unified structured perception label system, and lack an automatic mapping mechanism with the questionnaire scoring model. At present, there is no systematic method that can automatically extract nutritional features from multi-source data such as online text, pictures and menus of catering platforms, and realize the integration process of nutritional scoring, result generation and visual output.

[0007] Existing nutritional scoring methods generally rely on manual intervention, have high data collection costs, and are difficult to adapt to the high-frequency calling needs in online scenarios; the information dimension used is relatively single, and it is difficult to fully tap the nutritional perception signals contained in multi-modal data such as comment text, dish images and dining environment. User-generated content is generally unstructured data, and existing methods lack a unified mechanism in feature extraction, label construction and scoring mapping, resulting in low automation, limited accuracy and interpretability of the output results. At the same time, the current system generally lacks extension design from nutritional scoring results to personalized recommendation, generation of graphic and video advertisements, etc., and the application range is limited. In addition, most of the existing systems are bound to fixed scoring frameworks, and lack the ability to adapt to different nutritional evaluation models. Therefore, the existing technology is difficult to realize the full-process integration and automation from data collection, feature analysis, scoring modeling to content output.

[0008] Therefore, it is urgent to provide a data processing system, method, electronic device and medium for generating restaurant nutritional scoring based on online dish new information and user comments, which can fully utilize existing platform data resources and realize automatic nutritional scoring and advertisement content generation by combining artificial intelligence technology, to realize intelligent analysis, personalized recommendation and health guidance of catering nutrition information.

[0009] The above information disclosed in the background section is only used to strengthen the understanding of the background of the present application, and therefore it can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY

[0010] The main purpose of the present application is to overcome the problem that the full-process fusion and automation of restaurant nutrition score from data collection, feature analysis, score modeling to content output is difficult to achieve in the prior art, and to provide a data processing system, method, electronic device and medium for generating a restaurant nutrition score based on online dish new information and user comments, which can fully utilize existing platform data resources and realize automatic nutrition scoring and advertisement content generation by combining artificial intelligence technology, so as to realize intelligent analysis, personalized recommendation and health guidance of catering nutrition information.

[0011] To achieve the above-mentioned purpose, the present application provides a data processing system for generating a restaurant nutrition score based on online dish information and user comments in a first aspect, comprising: a user interaction module, a data collection module, a nutrition perception label construction module, a retrieval enhancement module, a nutrition score and report generation module;

[0012] The user interaction module is used to obtain the keywords of the user input request;

[0013] The data collection module is connected with the user interaction module, and is used to collect dish information and user comments according to the keywords;

[0014] The nutrition perception label construction module is connected with the user interaction module and the data collection module, and is used to call nutrition-related perception words according to the keywords, dish information and user comments, and construct a nutrition perception label five-tuple according to the perception words;

[0015] The retrieval enhancement module is connected with the nutrition perception label construction module, and is used to identify retrievable entity items from the nutrition perception label five-tuple, access a knowledge enhancement retrieval library according to the retrievable entity items, and obtain the semantic context of the nutrition background knowledge and label content;

[0016] The nutrition score and report generation module is connected with the retrieval enhancement module, and is used to call a large language model according to the semantic context, and output a nutrition score table and a nutrition health report.

[0017] According to an example embodiment of the present application, the data processing system further comprises an advertisement content generation module connected with the nutrition score and report generation module, which is used to generate advertisements according to the nutrition score table.

[0018] According to an example embodiment of the present application, the data processing system further comprises a Bandit feedback optimization module located between the advertisement content generation module and the nutrition score and report generation module, which is used to optimize the advertisement content structure and expression strategy based on a multi-armed Bandit algorithm.

[0019] According to an example embodiment of the present application, the data processing system further comprises an offline data index module, which is located between the data collection module and the nutrition perception tag construction module.

[0020] The offline data index module is used to crawl dish information and user comments, and construct a tag index.

[0021] According to an example embodiment of the present application, the data processing system further comprises a knowledge enhancement retrieval library, which is connected with the retrieval enhancement module and used to store nutrition knowledge data.

[0022] According to a second aspect of the present application, the present application provides a data processing method for generating a restaurant nutrition score based on online dish information and user comments, comprising the following steps:

[0023] Obtaining a keyword input by a user; collecting dish information and user comments;

[0024] Calling nutrition-related perception words according to the keyword, dish information and user comments, and constructing a nutrition perception tag five-tuple according to the perception words;

[0025] Identifying retrievable entity items from the nutrition perception tag five-tuple, accessing a knowledge enhancement retrieval library according to the retrievable entity items, and obtaining semantic context of nutrition background knowledge and tag content;

[0026] Calling a large language module according to the semantic context, and outputting a nutrition score table and a nutrition health report.

[0027] According to an example embodiment of the present application, the calling of nutrition-related perception words according to the keyword, dish information and user comments, and the construction of a nutrition perception tag five-tuple according to the perception words comprise:

[0028] Designing perception dimensions and constructing a tag dictionary;

[0029] Extracting nutrition perception tags of social comments and menus to obtain nutrition-related perception words;

[0030] According to the nutrition-related perception words, enhancing multi-modal tags, and constructing a nutrition perception tag five-tuple.

[0031] According to an example embodiment of the present application, the identification of retrievable entity items from the nutrition perception tag five-tuple, the access to the knowledge enhancement retrieval library according to the retrievable entity items, and the obtaining of semantic context of nutrition background knowledge and tag content comprise:

[0032] Constructing a knowledge corpus;

[0033] Identifying retrievable entity items and constructing a query method from the nutrition perception tag five-tuple;

[0034] Return semantic retrieval and knowledge fragment;

[0035] Knowledge fusion and context construction according to the nutritional perception tag five-tuple;

[0036] According to the constructed context, the prompt sentence construction is enhanced, so that the nutrition score and report generation module are connected, and the semantic context of the nutritional background knowledge and tag content is obtained.

[0037] As a third aspect of the present application, the present application provides an electronic device comprising:

[0038] One or more processors;

[0039] Storage device for storing one or more programs;

[0040] When the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method for generating restaurant nutrition score based on online menu information and user comments.

[0041] As a fourth aspect of the present application, the present application provides a computer readable medium having a computer program stored thereon, the program being executed by a processor to implement the data processing method for generating restaurant nutrition score based on online menu information and user comments.

[0042] The advantage of the present application is:

[0043] The present scheme forms a synergistic innovation in four aspects of nutritional information understanding, automatic scoring, multi-modal enhancement and advertising optimization, breaks through the bottleneck problems of poor scalability, weak generation ability, difficult content delivery adaptation and other problems of traditional nutrition scoring system, and has significant theoretical promotion value and engineering landing potential. Specifically, it includes the following points:

[0044] 1. Nutritional label construction and automatic scoring model adaptation mechanism based on semantic understanding: The present application first proposes a label construction and automatic scoring mechanism that combines the nutritional questionnaire index system (such as NESC-CC, OS-VAS) and semantic analysis capability. By abstracting a highly comprehensive nutritional perception dimension, combined with the semantic understanding capability of large language models for user comments, menu information and other unstructured text, high-precision structured label generation is achieved. Further through the mapping relationship between the label and the questionnaire model, automatic form filling and adaptation of multiple types of nutrition scoring systems are supported, significantly improving the universality and automation level of the nutrition assessment system.

[0045] 2. Nutrition score enhancement mechanism for fusion of multi-modal data: The present invention breaks through the traditional scoring strategy relying only on text, and innovatively introduces platform multi-modal data (such as real photos of dishes, environmental images, short videos, etc.), extracts additional nutrition-related features including oiliness, tableware hygiene, environmental cleanliness, etc. through image recognition, visual style analysis and scene analysis technology. The visual clues and text labels are jointly input into the scoring system to improve the accuracy of scoring and enhance the explanatory power of the results, effectively meeting the information fusion needs in the multi-element dietary evaluation scene.

[0046] 3. Nutrition-driven personalized advertisement content generation and feedback optimization mechanism: The present invention constructs a content generation mechanism with "nutrition evaluation + user portrait" as the core variable, which can generate adaptive health promotion content according to the target population (such as young people / middle-aged people / fitness population, etc.) and the form of advertisement (text or video). The system supports output of social platform dissemination posters, short video scripts and visual materials, and through the introduction of multi-armed Bandit algorithm, it performs online learning on feedback behaviors such as advertisement click rate and dwell time, dynamically optimizes content strategy and generation preferences, forming an efficient closed loop of "content generation - user feedback - strategy update". BRIEF DESCRIPTION OF DRAWINGS

[0047] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description of example embodiments thereof taken in conjunction with the accompanying drawings. The drawings described below are only some embodiments of the present application, and other drawings can be obtained from these drawings by those of ordinary skill in the art without creative labor.

[0048] Figure 1 The structure diagram of a data processing system for generating restaurant nutrition scores based on online dish information and user comments is shown.

[0049] Figure 2 The step diagram of a data processing method for generating restaurant nutrition scores based on online dish information and user comments is shown.

[0050] Figure 3 The structure diagram of an electronic device is schematically shown.

[0051] Figure 4 The structure diagram of a computer medium is schematically shown. DETAILED DESCRIPTION

[0052] Example embodiments now will be described more fully hereinafter with reference to the accompanying drawings; however, the example embodiments can be implemented in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the example embodiments to those skilled in the art. Like reference numerals refer to like elements throughout the several views. Like components will not be repeated in their descriptions.

[0053] Moreover, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the

[0054] The block diagrams in the drawings show only the functionality of the embodiments and do not imply that the embodiments will take the form discussed in connection therewith. As illustrated in the drawings, the enclosed blocks can be functional blocks that can be implemented in software or with hardware such as a processor of a mobile terminal or similar device. It will be apparent that elements of one embodiment can be employed with any other embodiments described herein. It will also be apparent that features described for one embodiment can be incorporated into other embodiments.

[0055] The flow diagrams depicted involve only the functional operations of the embodiments and do not necessarily imply a sequence of operations, or the necessity of each illustrated operation. Some operations can be deleted, others can be added, and the order of the operations can be altered, depending on the implementation.

[0056] It is to be understood that although the terms first, second, third, etc. can be used herein to describe various components, these components should not be limited by these terms. These terms are only used to distinguish one component from another. Thus, a first component discussed below could be termed a second component without departing from the teachings of the present application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0057] Those skilled in the art will understand that the drawings described are merely illustrative and should not be construed as a limitation to the scope of the present application. The modules or flowcharts in the drawings should not be understood as necessarily representing the implementation of the present application.

[0058] According to the first specific embodiment of the present application, the present application provides a data processing system for generating a restaurant nutrition score based on online dish information and user reviews, such as Figure 1As shown, it includes: a user interaction module C1, a data acquisition module C2, an offline data indexing module C8, a nutrition perception label construction module C3, a retrieval enhancement module C4, a nutrition score and report generation module C5, a Bandit feedback optimization module C7, an advertisement content generation module C6, and a knowledge-enhanced retrieval library. Figure 1 In the middle, the left data acquisition module C2, the offline data indexing module C8, and the knowledge-enhanced retrieval library are offline modules, and the modules on the right are online modules. The user interaction module C1 is an online task responsible for accepting user requests and triggering subsequent processes.

[0059] The user interaction module (User Interaction Module) C1 is used to obtain the keywords of user input requests. The user interaction module C1 is responsible for receiving user input query instructions, completing format analysis and structured processing, and taking it as a core context variable throughout the whole process of data acquisition, label construction, Prompt design, and content generation. Its functions include: user request input, semantic structured analysis, system task triggering, and user intent injection.

[0060] The data acquisition module (Data Acquisition Module) C2 is connected with the user interaction module C1, and is used to collect dish information and user comments according to the keywords. The data acquisition module C2 is responsible for automatically obtaining the multi-modal public information of the target restaurant on the third-party platform according to the user input query instruction, including comment text, menu content, dish pictures, dining environment photos, short videos, etc., to provide original data support for subsequent label extraction and score analysis. The acquisition process has dynamic, structured, and deduplication capabilities to ensure rich data sources and accurate content.

[0061] The offline data indexing module (Offline Indexing Module) C8 is located between the data acquisition module C2 and the nutrition perception label construction module C3. The offline data indexing module C8 is used to collect dish information and user comments and construct label indexes. The offline data indexing module C8 is used to structure the label information, score results, report texts, and advertisement scripts generated by each stage of the system, and save them by restaurant, support historical review, content reuse, and system optimization. The data acquisition module C2 regularly crawls platform comments, menus, images, videos, and other heterogeneous data, and the offline data indexing module C8 archives them uniformly and constructs a restaurant-level indexing system. This structured offline archive can be quickly retrieved and called in the online stage, supporting score and recommendation context construction, and providing original input for subsequent processes.

[0062] The nutrition tag construction module C3 is connected with the user interaction module C1 and the data collection module C2 through the offline data index module C8, and is used to call nutrition-related perception words according to keywords, dish information and user comments, and construct a nutrition perception tag five tuple. The nutrition tag construction module C3 aims to realize deep semantic analysis of health-related clues hidden in user comment texts and menu information, construct a structured and quantifiable nutrition perception tag matrix, and serve as a semantic basis for subsequent nutrition scoring and content generation modules. The core of this module is based on a large language model driven semantic understanding mechanism, and multi-modal data (images, menu structures, etc.) are introduced for auxiliary enhancement to ensure the scientificity, extractability and universality of the tag system.

[0063] The retrieval-augmented generation module C4 is connected with the nutrition tag construction module C3, and is used to identify retrievable entity items from the nutrition tag five tuple, access a knowledge-enhanced retrieval library according to the retrievable entity items, and obtain the semantic context of the nutrition background knowledge and the tag content. The retrieval-augmented generation module C4 is based on entity words in the nutrition perception tag that have professional extension, introduces external authoritative nutrition knowledge resources, and through a structured retrieval and large model generation collaborative mechanism, enhances the semantic background information of the tag, and provides more scientific and explainable semantic support for subsequent scoring reasoning.

[0064] Regarding the relationship between the nutrition tag construction module C3 and the retrieval-augmented generation module C4, the system takes user comments and restaurant menu texts as the main information source, uses a large language model to analyze the semantics of the texts, identifies keyword items with nutrition perception significance such as “slightly light” “less oil and salt” “nutritionally balanced” “appropriate portion” and the like, and combines pre-set semantic classification rules to generate a multi-dimensional nutrition perception tag matrix. To improve the knowledge completeness of the tag, the system extracts entity items (such as specific dish names, core ingredients, and health keywords) from the tag through the retrieval-augmented generation module C4, accesses a knowledge-enhanced retrieval library to complete background information supplementation, and finally constructs a structured tag and external knowledge into a semanticized Prompt context that can be understood by a large language model, which is used to guide scoring.

[0065] The knowledge-enhanced retrieval library is connected with the retrieval-enhanced module C4, and is used for storing nutritional knowledge data. Specifically, the knowledge-enhanced retrieval library is used to provide structured knowledge resources such as dish ingredients and raw material attributes, as a supplement and expansion of the semantic background of the nutrition label. The retrieval-enhanced module C3 can extract searchable entities (such as “fish-flavored shredded pork” and “kung pao chicken”) from the nutrition perception label quintuple label constructed by the nutrition perception label construction module C3, locate the dish ingredients (such as “pork, fungus, bamboo shoots, carrots, and green onions”) in the knowledge base, and splice them into the scoring context, thereby improving the understanding ability and professional accuracy of the large model on the scoring dimension.

[0066] The nutrition scoring and report generation module (Nutrition Scoring & Report Generation Module) C5 is connected with the retrieval-enhanced module C4, and is used for calling a large language model according to a semantic context, and outputting a nutrition scoring table and a nutrition health report. The nutrition scoring and report generation module C5 is responsible for driving a large language model (LLM) to perform structured scoring and report generation on the overall nutrition level of a target restaurant, by taking structured nutrition labels (output by the nutrition perception label construction module C3) and external complementary knowledge (provided by the retrieval-enhanced module C4) as scoring basis. The module supports automatic adaptation of mainstream nutrition scoring systems (such as NESC-CC, OS-VAS, etc.), and has the characteristics of traceable scoring process and interpretable report content. The scoring process is carried out in a “sub-table Agent + parallel scoring + unified summary” mode, which improves the execution efficiency and scoring stability of the large model. On the basis of the above-mentioned constructed semantic Prompt, the system calls a large language model to perform scoring reasoning, automatically scores the performance of a restaurant on multiple nutrition dimensions according to the selected nutrition evaluation system (such as NESC-CC, OS-VAS, HEI, etc.), and generates a textual nutrition report containing multi-dimensional scores, itemized explanations, and health suggestions, which has strong readability and interpretability, and can be used as a platform recommendation basis or a reference basis for consumers.

[0067] The bandit feedback optimization module (Bandit Feedback Optimization Module) C7 is located between the advertisement content generation module C6 and the nutrition scoring and report generation module C5, and is used for optimizing the structure and expression strategy of the advertisement content based on a multi-armed bandit algorithm. After the advertisement content is launched, the bandit feedback optimization module C7 continuously monitors user interaction data (such as clicks, dwell time, forwarding behavior, etc.), inputs the data as a reward signal into the bandit algorithm model, dynamically adjusts the advertisement structure and recommendation strategy through an online learning mechanism, and realizes an adaptive content optimization closed loop of generation-feedback-regeneration.

[0068] The advertisement content generation module (Ad Content Generation Module) C6 is connected with the nutrition score and report generation module C5 through the Bandit feedback optimization module C7, and is used to generate advertisements according to the nutrition score table. The advertisement content generation module C6 automatically generates picture-text or video advertisement contents (including picture-text recommended contents, theme posters, short video scripts, etc. promotional materials) facing target users according to the restaurant name and target population (such as young people, middle-aged people, and old people) input by the user, in combination with the nutrition score, label report and customer portrait information generated by the system, serving multiple scene applications such as healthy diet recommendation and business marketing promotion, and realizing personalized optimization and feedback learning of content style and style by means of the Bandit algorithm.

[0069] According to the second specific embodiment of the present application, the present application provides a data processing method for generating a restaurant nutrition score based on online dish information and user comments, which adopts the data processing system for generating a restaurant nutrition score based on online dish information and user comments according to the first specific embodiment. As shown in Figure 2 The data processing method comprises the following steps:

[0070] S1: obtaining the keywords input by the user; collecting dish information and user comments.

[0071] The user interaction module C1 is used to obtain the keywords input by the user.

[0072] The keywords are query instructions. The user interaction module C1 is responsible for receiving the query instructions input by the user, completing format analysis and structured processing, and taking them as core context variables throughout the whole process of data collection, label construction, prompt design and content generation.

[0073] Specifically, obtaining the keywords input by the user comprises:

[0074] S11: user query input.

[0075] The purpose of the user query input is to build a multi-terminal portal to receive the user's active query on the nutrition level of the restaurant and capture their personalized expression or focus.

[0076] The implementation steps are:

[0077] (1) Support web search box, applet portal, voice question and answer Agent, etc. forms to receive the query instructions input by the user, including target restaurant name, geographical location, query intention or preference focus (such as “How is a certain restaurant in Beijing Sanlitun?” “Is this store healthy?” “Want to recommend low oil and low salt” “Generate a promotional poster and video for the restaurant”).

[0078] (2) Then, the query instruction is preprocessed to remove stop words and noise characters, and only the effective components that can be used for intent recognition and keyword matching are retained.

[0079] S12: Semantic structure analysis (Query Understanding & Normalization).

[0080] The purpose of semantic structure analysis is to convert user input into a standardized structured variable and identify the implied nutritional focus or generate intent.

[0081] The implementation steps are:

[0082] (1) Call the natural language understanding module (such as lightweight LLM) for named entity recognition (such as restaurant name, dish category), sentiment preference recognition (such as "want to eat healthy" "not greasy"), and task type judgment (such as "only look at ratings" "generate promotional graphics");

[0083] (2) Construct a structured interactive instruction object, for example: {"restaurant_name": "a Sichuan restaurant", "location": "Haidian District, Beijing", "user_focus": ["low oil", "low salt", "environmental health"], "request_type": "generate graphic recommendation card", "timestamp": "2025-07-01 15:12:00"};

[0084] Cache the above structured interactive instruction object in the session context for the label extraction, Prompt construction, and advertisement content generation module C6 to call.

[0085] S13: System task triggering and user intent injection (Trigger Dispatch & Context Embedding).

[0086] The purpose of system task triggering and user intent injection is to serve as the starting point of the system scoring process, link the subsequent component processing process, and embed user intent into the generation logic.

[0087] The implementation steps are:

[0088] (1) Mark the user_focus and request_type fields in the above structured interactive instruction object as explicit semantic variables that must be embedded in the subsequent Prompt construction. For example, insert "the user is particularly concerned about whether the restaurant is 'low oil and low salt' and 'environmental health', please give an explanatory score considering the following labels" in the LLM-oriented scoring Prompt. user_focus is the user focus recognized by the natural language understanding module (such as lightweight LLM), and request_type is the task type.

[0089] (2) If a user's request involves the advertising content generation module C6, their semantic preferences will also be used in the content customization logic. For example, when generating promotional cards, the dishes that best match the tags "healthy combination" and "nutritious" will be selected and highlighted in the prompt template.

[0090] The data acquisition module C2 is used to collect menu information and user reviews. It gathers this information from third-party platforms. Based on user-input queries, C2 automatically retrieves multimodal publicly available information about the target restaurant from these platforms, including review text, menu content, food images, dining environment photos, and short videos. This provides raw data support for subsequent tag extraction and rating analysis. The data collection process is dynamic, structured, and deduplicated, ensuring rich and accurate data sources.

[0091] The collection of menu information and user reviews includes:

[0092] S14: Restaurant Matching & URL Construction.

[0093] The purpose of restaurant information matching and entry point construction is to identify the specific restaurant entity referred to in the user's request instructions and construct its unique link entry point in the platform.

[0094] The implementation steps are as follows:

[0095] Read the restaurant name and address keywords extracted from the user interaction module C1, and use rule matching or fuzzy search to obtain the corresponding merchant unique identifier ID from the platform index library;

[0096] Dynamically combine the URLs or API request parameters of the target platform (i.e., third-party platforms such as Meituan and Dianping) to construct a list of restaurant information collection entry points.

[0097] S15: Multi-Modal Crawling & Raw Structuring.

[0098] The purpose of modal data crawling and structured caching is to acquire and organize various types of content resources publicly released by restaurants on the platform, covering textual and visual information.

[0099] The implementation steps are as follows:

[0100] (1) Use web crawling technology (Scrapy, Selenium, etc.) or official open APIs to automatically crawl the following data types:

[0101] A. User review text (including rating, time, dish name, and review body);

[0102] B. Restaurant menu text (including dish names, categories, prices, and brief reviews);

[0103] C. Food photos, photos of the environment, and menu images;

[0104] D. Short video clips uploaded by users (such as restaurant reviews, food preparation process);

[0105] (2) Perform preliminary structuring on the above data and design a data structure that is easy to search, analyze and call. The abstracted entities and their relationships are shown below:

[0106]

[0107]

[0108] Example data storage information:

[0109]

[0110] (3) Add source platform identifier, timestamp, and image format verification information to each data item and store them in a unified cloud data warehouse for downstream use.

[0111] After data collection is complete, the data is stored in a structured format using the offline data indexing module C8 for easy indexing. Specific steps include:

[0112] (1) Archive the analysis results. Summarize the nutrition perception labels, rating tables, score explanations, nutrition reports, advertising copy, etc.; organize them in JSON or database structure to ensure consistent fields and standardized format; create an index according to "restaurant name + timestamp" to facilitate subsequent querying and comparison.

[0113] (2) Historical Record Management. Provides an interface for retrieving historical records by restaurant name, analysis date, and other criteria; supports using existing results for modules such as ad generation and recommendation sorting to avoid duplicate analysis.

[0114] S2: Retrieve nutrition-related perceptual words based on keywords, dish information, and user reviews, and construct a quintuple of nutrition perceptual tags based on the perceptual words.

[0115] The nutrition perception tagging module C3 aims to perform deep semantic analysis on health-related clues hidden in user review texts and menu information, constructing a structured and quantifiable nutrition perception tag matrix as the semantic foundation for subsequent nutrition scoring and content generation modules. This module is based on a semantic understanding mechanism driven by a large language model, and incorporates multimodal data (images, menu structures, etc.) for enhancement, ensuring the scientific rigor, extractability, and universality of the tagging system.

[0116] Large Language Model (LLM) refers to a natural language processing model trained on a large-scale corpus. It has powerful contextual understanding, semantic generation and knowledge integration capabilities. Representative models include GPT, Claude and Wenxin Yiyan.

[0117] Multimodal data refers to information sources that include multiple modalities such as text, images, audio, and video. In nutrition computing tasks, it mainly includes menu text, comment corpora, food images, and short videos of dining.

[0118] Based on keywords, dish information, and user reviews, nutrition-related perceptual terms are retrieved, and a five-tuple of nutrition perceptual tags is constructed, including:

[0119] S21: Design Perception Dimensions and Building a Tag Dictionary.

[0120] The purpose of designing the perception dimension and building the label dictionary is to construct a label dimension system that conforms to the nutrition rating system and has extractability and universality.

[0121] Nutrition scoring systems often refer to systems such as NESC-CC (Nutrition Environment Scoring for Chinese Catering) and HEI (Healthy Eating Index), which are used to quantitatively assess the health and nutrition aspects of restaurants, menus, or dietary structures.

[0122] To ensure the scientific rigor and adaptability of the labeling system, this proposal suggests a labeling construction method that integrates authoritative nutrition scoring systems and national dietary guidelines. The implementation steps are as follows:

[0123] (1) Nutritional dimension abstraction and perceptible feature mapping.

[0124] First, we conduct a structural analysis of the scoring dimensions and indicators in typical nutritional evaluation systems (including NESC-CC, OS-VAS, HEI, etc.) and abstract health-related elements that can be perceived through information channels such as user reviews, menu text, and images, such as oil usage, vegetable supply, staple food composition, and protein structure, to form the theoretical basis for candidate label composition.

[0125] (2) Authoritative guidance integration and dimensional expansion.

[0126] Incorporating the core health advocacy principles of the "Six Principles of Balanced Diet," "Salt and Oil Limitation," "Rational Food Combination," and "No Waste" from the "2022 Chinese Dietary Guidelines," the label dimensions have been further supplemented and expanded to ensure that the system covers the dietary characteristics of domestic residents and has both promotional and scientific guidance value.

[0127] (3) Dimensional filtering and label standardization.

[0128] Ultimately, a tag dictionary system was constructed, consisting of 9 primary categories and 32 high-frequency, highly relevant nutrition perception tag dimensions with clear semantic boundaries. This system possesses cross-platform transferability and structural compatibility with various nutrition scoring models, supporting tag-level semantic extraction and automated structure generation in multimodal intelligent environments such as large language models and image recognition models. The constructed tags cover, but are not limited to, the core dimension categories in Table 1.

[0129]

[0130]

[0131] Table 1 Core Dimensions

[0132] S22: Extract nutrition perception tags from editorials and menus to obtain nutrition-related perception words.

[0133] The purpose of extracting nutrition perception tags from editorials and menus is to transform the nutrition-related expressions implicit in unstructured texts into structured tag forms, supporting subsequent rating reasoning and interpretable output.

[0134] Nutrition-related perceptual words serve as intermediate semantic units or fundamental features for constructing the structured quintuple of nutrition perceptual tags. Their relationship to the final "nutrition perceptual tag" is one of progressive abstraction, but they form the foundation for its construction. Examples of nutrition-related perceptual words include: "low oil," "light," "not salty," "low sugar," "whole grains," "high protein," "just the right portion," and "low calories." They can also refer to health-related ingredients or cooking methods, such as "steamed," "stewed," "purple rice," and "kidney beans." These perceptual words are used to construct the subsequent quintuple of nutrition perceptual tags, also known as the nutrition tag quintuple.

[0135] The implementation steps are as follows:

[0136] (1) Construct a prompt word template to guide the Large Language Model (LLM) to extract nutrient-related perceptual expressions.

[0137] This step guides the LLM to identify and structurally annotate nutrition-related content from input user comments and menu text using a multi-level prompt structure that conforms to prompt engineering standards. The prompt structure includes:

[0138] A. System-level role definition: Fixed LLM simulation of the role of "nutrition label analysis expert", focusing on healthy eating content, for example: "System: You are a nutrition analysis expert who is good at identifying health-related descriptions in food texts".

[0139] B. Contextual Input Embedding: Embed the original text of the editorial / menu into the prompt word structure, distinguishing the style of the source text, for example:

[0140] "Input (Review): The portions here are moderate, the stir-fried vegetables are light and not greasy, and there is also a fruit platter, which is very suitable for controlling your diet."

[0141] C. Task Instructions: Specify the structured extraction format and labeling standards. The LLM should output a list of five-tuple labels, for example:

[0142] "Instruction: Please identify information related to nutrition perception from the following text and convert it into a structured label quintuple. The output format is as follows: [(Label name, label value, confidence level (0-1), source type, source example)].

[0143] [Label Name] Please select from the following 9 primary categories and a total of 32 nutrition perception labels:

[0144] 1. Staple Food Health; 1.1 Quantity of Additive-Free Staple Foods; 1.2 Quantity of Whole Grain / Tuber Staple Foods; 1.3 Number of Varieties of Coarse Grain Rice; 1.4 Staple Food Diversity Score; 2. Vegetable Supply; 2.1 Quantity of Vegetable Dishes; 2.2 Varieties of Dark Green Vegetables; 2.3 Healthiness of Vegetable Processing Methods; 3. Animal Protein Supply; 3.1 Quantity of Non-Fried Fish and Poultry Dishes; 3.2 Healthiness of Red Meat Processing Methods; 3.3 Egg Supply Forms; 4. Plant Protein and Nuts; 4.1 Quantity of Non-Fried Bean Products Dishes; 4.2 Quantity of Other Plant Protein Dishes; 4.3 Supply of Sugar-Free Nuts / Whole Grain Mixed Foods; 5. Fruit and Beverage Supply; 5.1 Quantity of Fresh Fruit Supply; 5.2 Supply of Dried Fruit Snacks; 5.3 Sugar-Free Beans 5.4 Milk / Dairy Beverage Supply; 5.5 Sugary Beverage Supply (Penalty); 6. Menu and Information Quality; 6.1 Completeness of Menu Nutritional Information; 6.2 Visibility of Health Tips or Guidance Signs; 6.3 Healthiness of Recommended Dishes; 6.4 Diversity of Dishes; 6.5 Dishe Names; 7. Cooking and Context Perception; 7.1 Perception of Oil and Salt Usage; 7.2 Food Temperature and Freshness of Preparation; 7.3 Support for Separate Serving and Hygiene Measures; 7.4 Environmental Hygiene and Dining Impression; 8. Health Services and Interventions; 8.1 Proactive Nutrition Service Signs; 8.2 Support for Personalized Menu Adjustments; 8.3 Support for Flexible Set Menu / Portion Options; 9. Conservation and Sustainability; 9.1 Perception of Food Waste Behavior.

[0145] [Label Value] Please fill in the value based on the semantic recognition results, such as natural language phrases like "rich," "oily," "≥3 kinds," "no serving chopsticks," and "calorie information is listed," which should be categorizable and interpretable. [Confidence Level] Please provide your confidence level for each label judgment (e.g., 0.80 represents 80% confidence). [Source Type] Please indicate the information source: comments / menu. [Source Example] Please paste the original statement, short phrase, or image / text content of the label as the basis for judgment, such as: "Most recommended dishes are spicy chicken and stir-fried shrimp," etc.

[0146] Using the above Prompt template, the model can be stably guided to output the following structure:

[0147] [("Healthiness of Vegetable Processing Methods", "Mostly Steamed or Boiled", 0.92, "Comments", "Most vegetables are not greasy, and there are many boiled green vegetables"),

[0148] ("Recommended dishes are healthy", "Recommended dishes are oily", 0.81, "Menu", "Recommended: Spicy Chicken, Spicy Fish Fillets")

[0149] ("Support for separate serving and hygiene measures", "No serving chopsticks", 0.75, "Comments", "I didn't see any serving chopsticks, and there were no signs reminding me to use them"),

[0150] To further enhance robustness, a multi-template prompting polling extraction mechanism can be supported, which calls multiple sub-task prompt words for a single text and integrates the confidence-weighted results; it also supports the introduction of chain-of-thought promoting and multi-round question-and-answer prompts to improve recognition recall and context parsing capabilities.

[0151] S23: Based on nutrition-related perceptual words, enhance multimodal tags and construct a quintuple of nutrition perceptual tags.

[0152] The purpose of enhancing multimodal labels is to utilize visual content such as user-uploaded food images, environmental photos, promotional images, or short video screenshots to construct multimodal prompts. This allows the use of large language models with visual understanding capabilities to identify nutrition-related information contained in the images, supplementing perceptual labels that are difficult to cover with traditional text.

[0153] The implementation steps are as follows:

[0154] (1) Construct a multimodal prompt word template to guide LLM to extract image nutrient tags.

[0155] This module employs a multimodal prompting engineering strategy, combining image and text task descriptions as input into a large multimodal model to guide it to focus on observable nutritional cues in vision. The prompt word structure is as follows:

[0156] A. System Role Definition: The guiding model assumes the role of a "food image health assessment expert," for example: "You are a nutrition expert specializing in extracting dietary health information from food and restaurant images."

[0157] B. Image Input: Upload user-provided images of dishes, environment, or menu screenshots as visual input.

[0158] C. Task Description (Instruction): Input specific label dimensions and structured output requirements, for example: "Please identify any visual features related to the following nutritional aspects and extract them as structured labels. Use the following format: [(Label Name, Label Value, Confidence (0-1), Source Type, Source Example)]."

[0159] D. Dimension Range Constraint Scope): The prompt embeds descriptions of 32 visually relevant label dimensions, such as: "Please prioritize the following nutritional perception dimensions: 1. Number of additive-free staple foods (e.g., menus labeled "oil-free," "salt-free," "sugar-free"); 2. Number of whole grain / potato staple foods (e.g., labels like "whole wheat," "brown rice," "purple sweet potato," etc.); 3. Number of whole grain rice varieties (e.g., menu items like "black rice," "corn rice," etc.); 4. Staple food diversity score (e.g., menus displaying multiple staple food types); 5. Healthiness of vegetable processing methods (e.g., dishes presented as boiled, steamed, etc.); 6. Number of non-fried fish / poultry dishes (e.g., fish, chicken, and duck dishes without a burnt appearance); 7. Healthiness of red meat processing methods (e.g., red meat presented as steamed, stewed, or roasted); 8. Egg supply format (e.g., images of boiled eggs, steamed eggs, and egg custard are recognizable); 9. Number of non-fried bean products (e.g., stir-fried tofu, cold bean curd salad, etc.); 10. Supply of sugar-free nuts / whole grain mixed foods (e.g., non-fried, 11. Quantity of fresh fruit (e.g., clearly visible slices of oranges, watermelon, and apples); 12. Supply of dried fruit snacks (e.g., small packages of plain raisins and dried apricots); 13. Supply of complimentary healthy drinks (e.g., water, tea, and clear soup available on-site); 14. Provision of sugary drinks (e.g., clearly displayed images of sweet drinks and milk tea); 15. Completeness of nutritional information on the menu (e.g., calorie and ingredient information listed on the menu); 16. Visibility of health tips or guidance signs (e.g., "low-salt" or "recommended dishes"); 17. Healthiness of recommended dishes (e.g., images showing non-fried dishes with a high proportion of vegetables); 18. Variety of dishes (e.g., multiple main dishes / side dishes displayed on-site or on the menu); 19. Support for separate serving and hygiene measures (e.g., facilities such as serving chopsticks and spoons, and separate serving signs); 20. Environmental hygiene and dining impression (e.g., clean tables and no stains on the floor); 21. Proactive nutrition service signage (e.g., nutritional advice and posters displayed in the restaurant).

[0160] (2) The model outputs a structured label quintuple.

[0161] Guided by multimodal cue words, the model will output a quintuple of labels with consistent structure:

[0162] [("Healthiness of Red Meat Processing Methods", "Steaming", 0.90,"Image", "The braised beef in the image is stewed, without any burnt appearance"),

[0163] ("Egg Supply Methods", "Boiled Eggs", 0.85, "Image", "Recipe Image Showing a Whole Boiled Egg")

[0164] ("Visibility of health tips or guidance signs", "Presence", 0.88, "Image", "Wall-posted 'Low Salt, Low Oil' health tips")

[0165] ("Sugary beverage offerings", "Clearly present", 0.92, "Image", "Beverage counter displays milk tea, juice, and sweet drinks")

[0166] ("Environmental hygiene and dining impression", "Relatively clean", 0.89, "Image", "Dining area floor is clean, tables are free of oil stains")

[0167] ("Number of non-fried bean curd dishes", "Provided", 0.84,"Image", "The image shows cold tofu salad and stir-fried dried tofu"),]

[0168] (3) Supports multi-round question answering and sub-task refinement to improve recall and accuracy.

[0169] For complex or information-dense images, chain-of-thought and subtask-decomposition prompts are supported, such as: "First identify the type of dish, then determine the cooking method and visual oiliness." This approach can improve the ability to extract ambiguous or implicit information.

[0170] (4) Combined with text tags to form a unified tag pool.

[0171] The final tag quintuple output by this module will be merged with the results from the commentary and menu tag modules, and used as the unified input for the nutrition score in the scoring module.

[0172] S3: Identify searchable entity items from the 5-tuple of nutrition perception tags, access the knowledge enhancement retrieval library based on the searchable entity items, and obtain the semantic context of nutrition background knowledge and tag content.

[0173] Step S3 is implemented through the retrieval enhancement module C4, and includes the following steps:

[0174] S31: Corpus Construction.

[0175] Construct a nutrition knowledge base adapted to the semantics of food and health, supporting multi-source fusion, specifically including:

[0176] A. Structured items from the "Chinese Dietary Guidelines (2022)" (such as food recommendations and intake suggestions);

[0177] B. Fields such as energy, fat, and protein content in the "Chinese Food Composition Table";

[0178] C. The main ingredients of dishes in the "Recipe Encyclopedia".

[0179] Then, the knowledge is segmented into granularities, with the item level (Topic Entry) or paragraph level as the smallest retrieval unit.

[0180] Example of knowledge entry format:

[0181] {"entry":"Fish-flavored Shredded Pork","category":"Dish Name","embedding":[...],

[0182] "text":"Fish-flavored shredded pork is typically made by stir-frying pork tenderloin, wood ear mushrooms, carrots, green peppers, and other ingredients. The seasoning primarily consists of soy sauce, sugar, vinegar, minced garlic, and fermented bean paste. It is rich in animal protein and a certain amount of dietary fiber, with a moderate to high calorie content. Note that the sugar and sodium content in the seasonings is relatively high, so it should be consumed in moderation."}

[0183] S32: Identify the searchable entities and construct the query method from the 5-tuple of nutrition perception tags.

[0184] Based on the tag quintuples output by the nutrition perception tag building module C3, the system identifies searchable entity items with professional knowledge extension value: dish name (e.g., "fish-flavored shredded pork"); ingredient composition (e.g., "cauliflower" and "chicken breast"); cooking method (e.g., "frying" and "steaming").

[0185] For the aforementioned entities, a prompt template is set to guide the Large Language Model (LLM) to perform semantic expansion or automatically construct retrieval queries. For example: "Please generate a natural language question suitable for querying a professional nutrition knowledge base to obtain background information about 'Fish-flavored Shredded Pork'."

[0186] S33: Return semantic retrieval and knowledge fragments (Retrieval).

[0187] Use embedding matching (such as FAISS) or keyword matching (such as BM25 / Elasticsearch) to retrieve the top-k recall count (e.g., 3-5 items). Obtain knowledge fragment information. For example:

[0188] {"entry":"Fish-flavored shredded pork",

[0189] "category":"dish name",

[0190] "Fish-fragrant shredded pork is a Chinese stir-fry dish with pork as the main ingredient, and side ingredients include wood ear mushrooms, carrots, and green peppers. It is cooked by stir-frying and seasoned with Pixian chili bean paste, soy sauce, sugar, and vinegar. This dish contains high levels of animal protein and fat, and the sodium and sugar content of the seasonings is relatively high. It is recommended that people with high blood pressure consume it in moderation."

[0191] S34: Perform knowledge fusion and construct contextual fusion based on the nutrient perception tag quintuple.

[0192] The search results are then combined with the original tag information (nutrition perception tag quintuples) to construct a structured context completion block. An example is shown below:

[0193] [Original tags: ("Dish Name", "Fish-Flavored Shredded Pork", 0.92, "Menu", "Recommended Dish: Fish-Flavored Shredded Pork")

[0194] Complete the knowledge:

[0195] "Fish-fragrant shredded pork is a Chinese stir-fry dish with pork as the main ingredient, accompanied by ingredients such as wood ear mushrooms, carrots, and green peppers. It is cooked by stir-frying and seasoned with Pixian chili bean paste, soy sauce, sugar, and vinegar. This dish is high in animal protein and fat, and the sodium and sugar content of the seasonings is relatively high. It is recommended that people with high blood pressure consume it in moderation."

[0196] Synthesizing context fragments:

[0197] "The recommended dish on the user menu is 'Fish-flavored Shredded Pork.' This dish uses pork as the main protein source, paired with various vegetables, and is stir-fried. It is seasoned with Pixian chili bean paste, sugar, and vinegar, and while the overall calorie content is moderate, the sodium and sugar content is relatively high. The 'Dietary Guidelines for Chinese Residents' recommends controlling the frequency of intake of high-sodium and high-sugar seasonings; therefore, the potential impact of such dishes on cardiovascular and metabolic risks should be considered in the nutritional assessment."

[0198] S35: Based on the constructed context-enhanced prompts, construct the interface with the nutrition scoring and report generation module C5 (LLM Prompt Integration) to obtain the semantic context of nutrition background knowledge and label content.

[0199] Finally, the module combines the completed knowledge fragment (i.e. the synthesized context fragment) with the nutrition tag information generated by the nutrition perception tag construction module C3 as the input to the nutrition scoring and report generation module C5, effectively improving the credibility and professional consistency of the scoring reasoning.

[0200] This solution adopts the RAG (Retrieval-Augmented Generation) method, which combines the input query with an external knowledge base and provides background material through the information retrieval module to enhance the accuracy and interpretability of the language model's generated results.

[0201] The user first sends a query request, then the nutrition-aware tag building module C3 obtains a quintuple of nutrition-aware tags for a specific restaurant. Next, the retrieval enhancement module C4 identifies entity tags with professional knowledge extension value based on the content of the tag quintuple. For example, the quintuple ("dish name", "Fish-flavored shredded pork", 0.92, "menu", "recommended dish: Fish-flavored shredded pork") will query the knowledge corpus "Recipe Encyclopedia" based on "Fish-flavored shredded pork" in the "dish name", and then return the completed knowledge.

[0202] "Fish-fragrant shredded pork is a Chinese stir-fry dish with pork as the main ingredient, accompanied by ingredients such as wood ear mushrooms, carrots, and green peppers. It is cooked by stir-frying and seasoned with Pixian chili bean paste, soy sauce, sugar, vinegar, etc." This completes the knowledge and combines it with the five elements of nutrition perception tags to form a contextual fragment, and then proceeds to the next nutrition scoring and report generation module C5.

[0203] S4: Call the large language module based on the semantic context to output a nutrition score sheet and a nutrition and health report.

[0204] Step S4 is implemented by the nutrition scoring and report generation module C5, and specifically includes the following steps:

[0205] S41: Scoring Schema Adaptation.

[0206] The purpose of matching scoring dimensions and rules is to construct a standardized scoring sub-table and dimension mapping relationship based on the target scoring system, and to clarify the nutritional label input requirements and judgment logic for each sub-item.

[0207] The implementation steps are as follows:

[0208] (1) Taking the NESC-CC scoring system as an example, we extracted its 11 sub-scoring tables (such as Staple Food, Beverage, and Dining Environment) and analyzed the scoring items and scoring rules contained in each sub-table.

[0209] Nutrition Environment Scoring for Chinese Catering (NESC-CC) refers to a scoring method for the nutritional environment of canteens in China. It originates from the paper "Development and Validation of Nutrition Environment Scoring for Chinese Style University / Work-Site Canteens (NESC-CC) and Oil–Salt Visual Analogue Scale (OS-VAS)". This is the scoring model proposed in that paper.

[0210] (2) The scoring rule parsing agent (scoring master agent) constructs a corresponding Prompt based on each sub-table, including system roles, scoring instructions, scoring item format specifications, etc., to clarify the task objectives and output standards, and finally outputs a structured scoring Prompt for subsequent Sub-Agent to call and execute.

[0211] The Agent (the main scoring agent) is the main control logic unit responsible for coordinating and scheduling scoring tasks. It divides scoring sub-tasks according to a pre-defined scoring system (such as different scoring sub-tables in NESC-CC), and then distributes each sub-task to multiple Sub-Agents for parallel processing. A Sub-Agent, literally meaning a subsequent sub-agent, refers to a sub-module responsible for performing scoring judgments based on various scoring dimensions or sub-tables (such as staple foods, oils, and environments). Its responsibilities include: receiving the structured scoring prompt constructed by the Agent (the main scoring agent); independently calling a large language model (such as GPT) to score the specified dimensions; and outputting structured scoring results and explanatory text.

[0212] The meta-Prompt (scoring task meta-prompt template) is a "standard template for scoring tasks" built by the main agent to guide sub-agents in correctly executing scoring tasks. The purpose of the meta-Prompt is to clarify the "scoring objectives, input content, and output format" before the sub-agent takes over the scoring task, ensuring consistency and controllability in LLM execution.

[0213] The following is an example of the meta-Prompt structure:

[0214] [You are a nutrition expert specializing in healthy eating assessments. Based on the sub-scoring tables specified in the NESC-CC Nutrition Environment Assessment System, you will provide a structured score and explanation of the specific food offerings in a restaurant.]

[0215] Please automatically construct a scoring task based on the following input:

[0216] [Sub-table Name] <Sub-table name, e.g., "Staple Food Sub-table">

[0217] [Rating Dimensions in English] <Dimension identifiers in English, such as "Staple Food">

[0218] [Scoring Rules] <List each scoring item and scoring standard clearly, maintaining a clear format>

[0219] [Information Source]

[0220] - [Nutrition Perception Tags]: Includes structured tags extracted from menus and user reviews, such as staple food type, additives, cooking methods, and ingredient composition;

[0221] - [Enhanced Knowledge Search]: Includes supplementary common knowledge such as definitions of key ingredients and explanations of cooking methods;

[0222] - [Menu Summary]: This provides an example of the restaurant's menu and actual main dishes.

[0223] Please automatically generate a prompt for a scoring task, the purpose of which is to guide the system:

[0224] 1. Score the sub-dimension based on the scoring rules, and determine the score for each item;

[0225] 2. Clearly cite nutrition awareness labels, enhanced knowledge, or menu items as scoring criteria;

[0226] 3. Output the total score (the full score must match the sub-table);

[0227] 4. Output an explanation of each score item;

[0228] 5. Finally, output a summary evaluation of each dimension.

[0229] The output Prompt should include the following modules:

[0230] -System Settings

[0231] -Input: Structured data input requirements

[0232] -Instructions: Scoring Guidelines and Output Format Requirements

[0233] Please organize your content logically, use clear and professional language, and output in the format shown in the JSON example.

[0234] S42: Sub-Agent Prompt Construction.

[0235] The goal of constructing sub-table scoring agents and designing prompt words is to configure an independent scoring agent for each scoring sub-table, thereby achieving structured and modular execution of the scoring process.

[0236] The implementation steps are as follows:

[0237] (1) Each sub-table is processed independently by a scoring agent, which receives the corresponding scoring prompt and performs item-by-item judgment and scoring based on the nutrition perception tags and contextual corpus. For example, for the StapleFood sub-table in the NESC-CC scoring system, the corresponding scoring prompt is as follows:

[0238] [System: You are a nutrition expert specializing in healthy eating scores. You are responsible for scoring a restaurant's staple food offerings in a structured manner based on the "staple food scoring sub-table" in the NESC-CC Nutrition Environment Scoring System, and providing the scoring basis and summary report.]

[0239] Rating Dimensions: "Staple Food" Sub-Rating Table

[0240] The rules for the sub-table are as follows (12 points in total):

[0241] 1. Provide ≥5 types of staple foods without added oil, salt, or sugar – 1 point;

[0242] 2. Provide ≥3 types of staple foods containing whole grains / potatoes / starchy legumes – 1 point; ≥6 types – 2 points;

[0243] 3. Provide ≥3 types of whole grain rice-based staple foods (≥20% whole grain) – 1 point; ≥3 types, each ≥50% whole grain – 2 points;

[0244] 4. Provide at least one type of starchy legume (red bean, mung bean, kidney bean, etc.) as a staple food – 1 point;

[0245] 5. Provide at least one type of steamed / boiled / baked sweet potato, yam, taro, or potato staple food – 1 point;

[0246] 6. Provide at least one type of steamed or boiled corn kernels or whole ears of corn – 1 point;

[0247] 7. Provide at least one type of staple food containing dairy or soy products (such as soy milk and rice) – 1 point;

[0248] 8. Provide at least one "whole grain mix" or "grain platter" main dish - 1 point;

[0249] 9. Provide ≥5 types of staple food ingredients – 1 point; ≥8 types – 2 points;

[0250] The scoring information is sourced from the following sources; please make your judgments based on this information:

[0251] Input: [Nutrition Perception Label]

[0252] [("Dish Name","Purple Rice",0.92,"Menu","Purple Rice"),

[0253] ("Dish Name", "Sweet Potato", 0.89,"Menu", "Roasted Sweet Potato")

[0254] ("Cooking Method", "Steaming", 0.91, "Menu", "Steamed Sweet Potato")

[0255] ("Dish Name", "Eight Treasure Rice", 0.83, "Menu", "Contains Kidney Beans and Lotus Seeds"),...]

[0256] [Enhanced Knowledge Retrieval]

[0257] Purple rice is a whole grain.

[0258] - Sugar-roasted sweet potatoes are a common high-fiber tuber variety;

[0259] - The kidney beans contained in Eight Treasure Rice are a type of starchy bean;

[0260] Steaming and boiling are low-fat and healthy cooking methods.

[0261] [Menu Excerpt] "Our restaurant offers staple foods such as purple rice, steamed sweet potato, millet porridge, eight-treasure rice, corn kernel rice, buckwheat noodles, brown rice, soy milk rice, and black rice porridge."

[0262] Instructions: Based on the scoring rules above, please provide a structured score for the "Main Courses" category of this restaurant, outputting the total score (out of 12), and provide the basis for your judgment for each score (referencing tags / knowledge content / menu examples). Finally, please provide a summary report evaluating the overall nutritional composition of the restaurant's main courses.

[0263] Output format example:

[0264] {"Rating Dimensions":"Staple Food","Total Score":11,"Maximum Score":12,"Score Explanation":[

[0265] {"Scoring Item":"≥5 kinds of staple foods without added oil, salt, or sugar","Score":1,"Basis":"Purple rice, millet porridge, brown rice, steamed sweet potatoes, etc. are all light staple foods"}

[0266] {"Scoring Item":"≥6 types containing whole grains / root vegetables / legumes","Score":2,"Basis":"Purple rice, black rice, millet, corn, sweet potato, kidney beans"},

[0267] {"Scoring Items":"≥3 types of whole grain rice with ≥20% whole grain content","Score":1,"Basis":"Purple rice, brown rice, corn rice"},...],

[0268] Summary: "The restaurant offers a wide selection of staple foods, with a good balance of whole grains, beans, and tubers. The steaming and boiling cooking methods are healthy, and the overall dietary composition is conducive to blood sugar and fat control, with a high degree of nutritional diversity."

[0269] (2) All sub-Agents execute the scoring task in parallel and return information including sub-item scores, score explanation text, reference tags / opinions, etc.

[0270] (3) Summarize the output results of each sub-Agent to form the final multi-dimensional scoring table.

[0271] S43: Scoring Report & Summary Generation.

[0272] The purpose of generating comprehensive reports and outputting summaries is to transform structured scoring sheets and content elements into readable and shareable nutrition and health report texts.

[0273] The implementation steps are as follows:

[0274] (1) The large-scale text generation model is invoked to interpretively reorganize the scoring results, outputting a nutrition dimension interpretation paragraph, representative evaluation sentences and health advice paragraphs, suggestions for improving scores, as well as extracting key highlighted tags, user opinion quotations, and restaurant features to generate a report summary. An example of the generated report prompt is as follows:

[0275]

[0276] Instruction: Please generate a professional yet accessible nutrition commentary paragraph based on the above input, with the following structure:

[0277] 1. Overall evaluation (offering positive feedback or suggestions regarding the score level);

[0278] 2. High-scoring section highlights and comments (can incorporate "score explanations");

[0279] 3. Health implications (from the perspectives of blood sugar control, lipid control, and balanced nutrition);

[0280] 4. Consumer recommendations and suggestions (e.g., suitable target audience, scenarios, etc.);

[0281] 5. Suggestions for improving scores (e.g., tailoring evaluation scores to suit specific business needs)

[0282] The language is concise and natural, suitable for general reading, and can be used as health recommendation copy or report content.

[0283] (2) To achieve comprehensive report and summary output based on restaurants.

[0284] (3) The C6 module for generating advertising content outputs content styles for different scenarios.

[0285] S5: Push advertisements based on nutrition score sheets and nutrition and health reports.

[0286] Step S5 is implemented by the Bandit feedback optimization module C7 and the ad content generation module C6. The Bandit feedback optimization module C7 obtains the optimal combination of ad versions, and the ad content generation module C6 generates the ad content.

[0287] The specific steps to obtain the optimal ad version combination include:

[0288] (1) Problem modeling and context definition.

[0289] View ad content delivery as a Contextual Multi-Armed Bandit (CMAB) problem.

[0290] Context information includes: target user group (e.g., youth / middle-aged / elderly); advertising format (text / image / video); restaurant feature summary (highly rated items, signature dishes, customer preferences); and historical feedback data (e.g., click-through rate, number of favorites, number of shares).

[0291] Optional actions (Arms) represent a combination of multiple ad generation strategies. Based on the nutrition score and audience profile output by the nutrition score and report generation module C5, the system generates multiple ad candidate versions in the ad content generation module C6. For example: image and text templates A / B / C; video script styles X / Y; different images (healthy dishes / customer reviews / environmental images); and title styles (rational / emotional / practical recommendations).

[0292] Reward signals can be defined as: click-through rate (CTR); collection / sharing / commenting behavior; page dwell time, user likes, and other comprehensive behavioral indicators.

[0293] (2) Deployment of the Bandit algorithm engine.

[0294] The Multi-armed Bandit Algorithm is a classic online decision-making model in reinforcement learning. It maximizes long-term rewards by dynamically balancing "exploration" and "exploitation," and is often used in scenarios such as advertising recommendation and A / B testing.

[0295] The following typical Bandit algorithm strategies can be used for deployment: (See Table 2 for examples)

[0296]

[0297] Table 2 Candidate Bandit Algorithm Strategies

[0298] (3) Data feedback and reward update mechanism.

[0299] Bandit's feedback optimization module C7 controls the delivery of only one candidate content (image / text or video) to real users per round. After each ad delivery, the system records user interaction feedback in real time, including but not limited to: click-through rate (CTR), share rate, and dwell time. A reward function is then constructed, for example:

[0300] reward = CTR weight *click+Share weight *share+DwellTime weight *time

[0301] The actual feedback rewards are logged and used as input for the next round of ad generation strategy optimization.

[0302] In the reward function, reward represents the overall performance evaluation score of this round of advertising in the actual user environment, serving as the input for strategy optimization; CTR weight This indicates the weight of the click-through rate (CTR) metric in the total reward; "click" represents the score of the click behavior for that content (e.g., the proportion of clicks to impressions); Share weight This indicates the importance of user sharing behavior in the evaluation; "share" refers to the frequency or ratio of sharing. (DwellTime) weight This indicates the contribution of page dwell time to the overall evaluation, where time is the average duration of user dwell time on the content page (which can be standardized). All feedback behaviors and reward results will be written to log data, serving as training samples for the next round of ad generation and delivery strategies. This enables multiple rounds of adaptive updates and personalized content optimization, forming a dynamic closed loop of "generation—feedback—learning".

[0303] (4) Ad version management and experimental design

[0304] It supports parallel A / B testing of multiple content versions. Each ad content is bound to and managed with the Prompt used, the target audience, and the generated model parameters. An example of the log structure is shown below:

[0305] {"ad_id":"20250701001","prompt_type":"Blood sugar control enhancement graphic",

[0306] "target_group":"middle-aged people","ad_variant":"B","click":1,

[0307] "share":0,"reward":0.85,"timestamp":"2025-07-01T14:10:00"}

[0308] (5) Module integration and closed-loop optimization

[0309] Record campaign history and reward feedback. Bandit's feedback optimization module C7 will dynamically adjust the generated strategy combinations based on feedback, controlling the output frequency of different strategies.

[0310] The specific steps for generating ad content include:

[0311] S521: User Intent & Context Construction.

[0312] The purpose of user goal setting and context preparation is to automatically construct the contextual input required for ad generation tasks based on information actively input by users (such as restaurant name, target audience, and ad format). This includes restaurant nutritional profile data, customer group characteristics and preferences, and implicit user intent in social media reviews. By accurately organizing user intent and data context, a semantically complete and goal-oriented input foundation is provided for subsequent ad copy and multimodal content generation.

[0313] The implementation steps are as follows:

[0314] (1) Task parameter reception and structured parsing.

[0315] Receive the following fields from the user input in the user interaction module C1: "restaurant_name" (target restaurant name); "target_audience_type" (ad audience type: youth / middle-aged / senior, etc.); "ad_content_type" (ad format: text / image / video). Construct a task description data structure, such as:

[0316] {"Restaurant":"Green Sprout Health Restaurant","Target Audience":"Middle-aged people",}

[0317] "Ad format":"Image and text","Generation time":"2025-07-01 13:52:00"}.

[0318] (2) Nutritional score and report information retrieval.

[0319] The offline data index module C8 is queried, indexed by restaurant_name, to retrieve the following already generated data for that restaurant: a structured nutrition score (score tables for each dimension); and a comprehensive nutrition and health report (dimension summary, dish highlights, suggestions, etc.). If the score information is empty, the nutrition score and report generation module C5 is automatically invoked to complete the score and report generation.

[0320] (3) Customer profile extraction (customer group feature identification Agent).

[0321] Based on the review text data, the Large Language Model (LLM) agent is invoked again to analyze the main characteristics and scenarios of the restaurant's customers, including but not limited to: age group preferences (e.g., "often ordered by the elderly," "suitable for young people's fitness meals"); typical consumption scenarios (e.g., "business lunch," "family gathering," "post-workout protein supplementation"); and customer demand keywords (e.g., "low oil," "high protein," "good fruit pairing"). Finally, a customer profile structure is constructed, such as:

[0322] {"Target audience keywords":["office workers","middle-aged people controlling blood sugar"],

[0323] "Dining Scenario": ["Weekday Lunch", "Light and Healthy Diet"]

[0324] Frequently mentioned characteristics: ["Stir-fried dishes tend to be bland", "Tofu is a staple food", "Abundant fruits"]}.

[0325] (4) Context summarization to build a unified input carrier.

[0326] The task parameters, nutrition score report, and customer profile content are combined into a unified context for subsequent advertising copy or video script generation. The input carrier structure is as follows:

[0327] {"Task Parameters":{"Restaurant":"Green Sprout Health Restaurant","Target Audience":"Middle-aged People","Advertisement Format":"Image and Text","Generation Time":"2025-07-01 13:52:00"},

[0328] "Nutrition Rating Report":{"Rating Dimensions":"Staple Food","Total Score":11,"Maximum Score":12,"Nutritional Interpretation":{"1. Overall Evaluation":"This restaurant performs exceptionally well in terms of staple food selection, achieving a high score of 11 / 12, demonstrating a strong awareness of nutritional balance and a healthy eating orientation. The overall quality of its staple foods is among the best in its category."

[0329] "2. High-scoring section commentary": "The menu offers a variety of light staple foods without added oil, salt, or sugar, such as purple rice, millet porridge, and steamed sweet potatoes, meeting the requirements for low processing; it also contains a variety of whole grains and legumes, including purple rice, black rice, corn, and kidney beans, meeting the requirement of ≥6 kinds of coarse grains, thus earning full marks for this section."

[0330] 3. Health Benefits: "Rich whole grains and legumes help slow down the rise in blood sugar, increase satiety, and provide high-quality dietary fiber, which is beneficial for controlling weight, blood sugar, and blood lipid levels. They are an important part of the 'blood sugar and lipid control' diet."

[0331] 4. Consumer Recommendations: "Especially suitable for middle-aged people who are concerned about controlling blood sugar and fat, fitness enthusiasts who want to consume natural carbohydrate sources, and families seeking balanced nutrition. A top choice for light health maintenance and everyday healthy lunches."

[0332] 5. Suggestions for Improving Scores: "It is recommended to appropriately introduce pastries rich in whole grains or rice balls / cornbread with added legumes to further enhance the diversity of staple foods; the proportion of whole grains and nutritional characteristics of staple foods should be clearly indicated in the menu to help consumers identify and align with the scoring system."

[0333] Customer Profile: {"Target Audience Keywords": ["Office workers", "Middle-aged people controlling blood sugar"],

[0334] "Dining Scenario": ["Weekday Lunch", "Light and Healthy Diet"]

[0335] Frequently mentioned characteristics: ["Stir-fried dishes tend to be bland", "Tofu is a staple food", "Abundant fruits"]}}.

[0336] S522: Ad Copy & Multimodal Content Generation.

[0337] The purpose of advertising copy generation and multimodal content output is to automatically generate suitable graphic or video advertising content based on nutrition rating results, restaurant customer profiles, and user target preferences (such as target audience / advertising format), highlighting the restaurant's health advantages and improving promotional effectiveness and user click-through rates.

[0338] The implementation steps are as follows:

[0339] (1) Personalized copywriting content generation.

[0340] First, prepare the input. Extract high-scoring dimensions, health summaries, and suggestions from the nutrition assessment report; call the results from the customer profile module, such as typical tags ("cooking is too bland", "abundant fruits"), target audience characteristics ("middle-aged people controlling blood sugar"), etc.; combine user-defined parameters, such as advertising format (text / image / video) and target audience (young people / middle-aged people / elderly people).

[0341] Next, we design the copywriting prompt template. The guiding language model outputs text and image titles, sub-copy, slogans, recommendations, and introductory phrases based on the target audience and restaurant characteristics. For example, the Prompt structure:

[0342]

[0343]

[0344] Finally, the large model is invoked to generate personalized copywriting content.

[0345] (2) Multimodal advertising content generation and Prompt design.

[0346] Based on the personalized copy content generated in the previous step, a multimodal ad prompt generation mechanism with generalizability and dynamic adaptability is designed to guide the automatic generation of downstream image and video content.

[0347] A. Image and text ad generation.

[0348] First, construct a structured semantic prompt template containing elements such as "recommended dishes + nutritional highlights + target user group (e.g., fitness enthusiasts / weight loss group) + scenario applicability," and then inject high-weighted tags from nutritional rating results (e.g., "low-salt," "high-fiber," "low-oil and low-fat") as visual guidance content descriptions. Prompt template example:

[0349]

[0350]

[0351] The formatted prompt is then input into an image generation model (such as Keling, DALL·E, etc.) to generate images that highlight the theme and have a clear health orientation. At the same time, it can provide a variety of graphic and text advertising template strategies (such as nutrition radar chart + copy + dish image), and supports the adaptation of images for social media platforms, health corner display images for menus, online recommendation cards, and other formats.

[0352] B. Short video ad generation.

[0353] Based on a three-part advertising logic structure, a corresponding Prompt template was designed (structure: introductory opening → dish presentation → health recommendation), embedding the following information variables: representative dishes of the restaurant and their nutritional highlights (e.g., "low-sugar rice," "whole grain staple food"); user profile and target audience (e.g., "suitable for patients with hypertension"); and recommendation statements (e.g., "professional nutrition score of 9.3"). An example of the Prompt template is shown below:

[0354]

[0355] Finally, the processed prompt is input into the video script generation model, which automatically generates corresponding subtitles, visual switching suggestions, and dubbing scripts. It also supports integration with services such as Runway and Pika Labs to generate short video drafts of 15 to 60 seconds, suitable for dissemination on platforms such as Douyin and Xiaohongshu.

[0356] This invention proposes an automated adaptation method for constructing nutrition perception tags and rating models based on semantic understanding. First, relying on nutrition rating systems (such as NESC-CC and OS-VAS) and the *Dietary Guidelines for Chinese Residents*, the method systematically abstracts 32 highly relevant and comprehensive nutrition perception dimensions. Then, combining a large language model, it performs semantic parsing and content recognition on various inputs, including user comments and menu text, automatically generating structured five-tuple nutrition perception tags. Based on this, a mapping mechanism between tags and dietary rating models is constructed, enabling automatic filling and score calculation of various nutrition questionnaire indicators, and achieving rapid adaptation to different dietary health rating models.

[0357] This invention further proposes a nutrition scoring enhancement mechanism that integrates multimodal platform data, including: acquiring multimodal content such as food images, dining environment photos, store promotional images, and short videos uploaded by users from platforms such as Meituan and Dianping; extracting information such as food composition, environmental health tips, and visual greasiness based on technologies such as visual recognition, text detection, image style analysis, and scene understanding; and using this information, together with information formed from user reviews and menu text, as enhanced inputs for various indicators of restaurant nutrition scoring to improve scoring accuracy and interpretability.

[0358] This invention introduces a novel automatic advertising content generation mechanism based on nutritional scores and user profiles. It can utilize a large-scale model to generate health promotional copy and content tailored to different consumer groups, according to the user-defined target audience and advertising format. This mechanism supports the integration of high-scoring nutritional scores from restaurants, representative reviews, and health advice, improving the efficiency of health information dissemination and user acceptance. Simultaneously, it incorporates the multi-armed Bandit algorithm to dynamically learn from post-advertising click behavior and user responses, achieving closed-loop optimization of nutritional recommendations in personalized health guidance and efficient ad conversion.

[0359] Based on the above, this solution can achieve the following beneficial effects:

[0360] 1. Semantic Understanding-Based Nutrition Tag Construction and Automatic Scoring Model Adaptation Mechanism: This invention proposes for the first time a tag construction and automatic scoring mechanism that integrates nutrition questionnaire indicator systems (such as NESC-CC and OS-VAS) with semantic parsing capabilities. By abstracting comprehensive nutrition perception dimensions and combining the semantic understanding capabilities of a large language model for unstructured text such as user comments and menu information, high-precision structured tag generation is achieved. Furthermore, through the mapping relationship between tags and questionnaire models, automatic form filling and adaptation to multiple nutrition scoring systems are supported, significantly improving the versatility and automation level of the nutrition assessment system.

[0361] 2. Nutritional Score Enhancement Mechanism Integrating Multimodal Data: This invention breaks through the traditional text-only scoring strategy by innovatively introducing multimodal data from the platform (such as real-life photos of dishes, environmental images, and short videos). Through image recognition, visual style analysis, and scene analysis, it extracts additional nutritionally relevant features, including the greasiness of the food, the hygiene of tableware, and the cleanliness of the environment. By jointly inputting visual cues and text labels into the scoring system, it improves scoring accuracy while enhancing the interpretability of results, effectively meeting the information fusion needs in diverse dietary evaluation scenarios.

[0362] 3. Nutrition-Driven Personalized Advertising Content Generation and Feedback Optimization Mechanism: This invention constructs a content generation mechanism with "nutritional assessment + user profile" as the core variables. It can generate highly adaptable health promotion content based on the target audience (e.g., young adults / middle-aged adults / fitness enthusiasts) and advertising format (text / image or video). The system supports outputting posters, short video scripts, and visual materials for social media platforms. By introducing the multi-armed Bandit algorithm, it learns online from feedback behaviors such as ad click-through rates and dwell time, dynamically optimizing content strategies and generation preferences to form a highly efficient closed loop of "content generation—user feedback—strategy update."

[0363] This application achieves synergistic innovation in four areas: nutritional information understanding, automated scoring, multimodal enhancement, and optimized advertising. It overcomes the bottlenecks of traditional nutritional scoring systems, such as poor scalability, weak generation capabilities, and difficulty in adapting content delivery. It has significant theoretical promotion value and engineering implementation potential.

[0364] According to a third specific embodiment of the present invention, the present invention provides an electronic device, such as... Figure 3 As shown, Figure 3 This is a block diagram illustrating an electronic device according to an exemplary embodiment.

[0365] The following reference Figure 3 To describe an electronic device 300 according to this embodiment of the present application.Figure 3 The electronic device 300 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0366] like Figure 3 As shown, the electronic device 300 is presented in the form of a general-purpose computing device. The components of the electronic device 300 may include, but are not limited to: at least one processing unit 310, at least one storage unit 320, a bus 330 connecting different system components (including storage unit 320 and processing unit 310), a display unit 340, etc.

[0367] The storage unit stores program code that can be executed by the processing unit 310, causing the processing unit 310 to perform the steps described in this specification according to various exemplary embodiments of this application. For example, the processing unit 310 can perform the steps shown in the second specific embodiment.

[0368] The storage unit 320 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 3201 and / or a cache storage unit 3202, and may further include a read-only memory unit (ROM) 4203.

[0369] The storage unit 320 may also include a program / utility 3204 having a set (at least one) program module 3205, such program module 3205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0370] Bus 330 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0371] Electronic device 300 can also communicate with one or more external devices 300' (e.g., keyboard, pointing device, Bluetooth device, etc.), enabling users to communicate with devices that interact with electronic device 300, and / or any device (e.g., router, modem, etc.) that allows electronic device 300 to communicate with one or more other computing devices. This communication can be performed via input / output (I / O) interface 350. Furthermore, electronic device 300 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 360. Network adapter 360 can communicate with other modules of electronic device 300 via bus 330. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0372] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware.

[0373] Therefore, according to a fourth specific embodiment of the present invention, the present invention provides a computer-readable medium. For example... Figure 4 As shown, the technical solution according to the embodiments of the present invention can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.) or on a network, and includes several instructions to cause a computing device (such as a personal computer, server, or network device, etc.) to execute the above-described method according to the embodiments of the present invention.

[0374] The software product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0375] The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0376] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0377] The aforementioned computer-readable medium carries one or more programs, which, when executed by a device, cause the computer-readable medium to perform the functions of the second specific embodiment.

[0378] Those skilled in the art will understand that the above modules can be distributed in the device as described in the embodiments, or they can be modified accordingly and placed in one or more devices that are unique to this embodiment. The modules in the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.

[0379] Through the description of the above embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions of the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of the present invention.

[0380] Exemplary embodiments of the present invention have been specifically shown and described above. It should be understood that the present invention is not limited to the detailed structures, arrangements, or implementations described herein; rather, the present invention is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended claims.

Claims

1. A data processing system for generating restaurant nutrition scores based on online menu information and user reviews, characterized in that, include: The module includes a user interaction module, a data acquisition module, a nutrition perception tag construction module, a search enhancement module, and a nutrition scoring and report generation module. The user interaction module is used to obtain keywords from user input requests; The data acquisition module is connected to the user interaction module and is used to collect dish information and user comments based on keywords. The nutrition perception tag construction module is connected to the user interaction module and the data acquisition module. It is used to call nutrition-related perception words based on keywords, dish information and user comments, and construct a 5-tuple of nutrition perception tags based on the perception words. The retrieval enhancement module is connected to the nutrition perception tag construction module and is used to identify retrieval entities from the nutrition perception tag quintuple, access the knowledge enhancement retrieval library based on the retrieval entities, and obtain the semantic context of nutrition background knowledge and tag content. The nutrition scoring and report generation module is connected to the retrieval enhancement module and is used to call the large language model according to the semantic context to output a nutrition scoring table and a nutrition and health report.

2. The data processing system for generating restaurant nutrition scores based on online menu information and user reviews as described in claim 1, characterized in that, It also includes an advertising content generation module, which is connected to the nutrition score and report generation module and is used to generate advertisements based on the nutrition score table.

3. The data processing system for generating restaurant nutrition scores based on online menu information and user reviews according to claim 2, characterized in that, It also includes a Bandit feedback optimization module, located between the advertising content generation module and the nutrition scoring and report generation module, which is used to optimize the advertising content structure and expression strategy based on the multi-armed Bandit algorithm.

4. The data processing system for generating restaurant nutrition scores based on online menu information and user reviews as described in claim 1, characterized in that, It also includes an offline data indexing module, which is located between the data acquisition module and the nutrition sensing label construction module; The offline data indexing module is used to capture dish information and user reviews to build a tag index.

5. The data processing system for generating restaurant nutrition scores based on online menu information and user reviews according to claim 1, characterized in that, It also includes a knowledge-enhanced retrieval library, which is connected to the retrieval enhancement module and is used to store nutritional knowledge data.

6. A data processing method for generating restaurant nutrition scores based on online menu information and user reviews, characterized in that, Includes the following steps: Obtain keywords from user input requests; collect menu information and user reviews; Nutrition-related perceptual terms are retrieved based on keywords, dish information, and user reviews, and a quintuple of nutrition perceptual tags is constructed based on these perceptual terms. Retrievable entity items are identified from the quintuple of nutrition perception tags. Based on the retrievable entity items, the knowledge enhancement retrieval library is accessed to obtain the semantic context of nutrition background knowledge and tag content. The large language model is invoked based on the semantic context to output a nutrition score sheet and a nutrition and health report.

7. The data processing method for generating restaurant nutrition scores based on online menu information and user reviews according to claim 6, characterized in that, The process of calling nutrition-related perceptual terms based on keywords, dish information, and user reviews, and constructing a five-tuple of nutrition-perceptual tags based on these perceptual terms, includes: Design perception dimensions and build a tag dictionary; Nutrition perception tags were extracted from editorials and menus to obtain nutrition-related perception words; Based on nutrition-related perceptual words, enhance multimodal tags and construct a quintuple of nutrition perceptual tags.

8. The data processing method for generating restaurant nutrition scores based on online menu information and user reviews according to claim 6, characterized in that, The process of identifying retrieveable entity items from the 5-tuple of nutrition-sensory tags, accessing the knowledge-enhanced retrieval database based on the retrieveable entity items, and obtaining the semantic context of nutrition background knowledge and tag content includes: Construct a knowledge corpus; Identify searchable entities and construct query methods from the 5-tuple of nutrition perception tags; Returning to semantic retrieval and knowledge fragments; Knowledge integration and context construction are performed based on the five elements of nutrition labels; The constructed context-enhanced prompts enable the connection with the nutrition scoring and report generation module to obtain the semantic context of nutrition background knowledge and tag content.

9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method for generating restaurant nutrition scores based on online menu information and user reviews as described in any one of claims 6-8.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the data processing method for generating restaurant nutrition scores based on online menu information and user reviews as described in any one of claims 6-8.