Background:
Dietary imbalances among Chinese children and adolescents are prevalent, but most recommender systems are adult-oriented and not adapted to Chinese dietary patterns or school–family meal contexts. This study aims to developed and evaluated an ontology-based dietary recommendation system for Chinese children and adolescents to improve their dietary status.
Methods:
An ontology knowledge base was constructed from dietary guidelines, expert knowledge, and food and meal data. A multi-criteria decision framework generated feasible meal plans, optimized portion sizes with a genetic algorithm, and selected solutions that promote food diversity. We conducted a preliminary evaluation of the system in two pilot settings: (1) a group-level experiment using 30 days of school lunch data from a primary school, and (2) an individual-level experiment using 30 days of dietary records and health check-up data from 30 middle school students. Diet quality was assessed using the Chinese Children Dietary Index (CCDI), nutrient adequacy rates, and food-group diversity.
Results:
In the group experiment, system-recommended lunches achieved a significantly higher average CCDI score (117.39 ± 6.61) than actual school lunches (103.41 ± 9.44, p < 0.001). In the individual experiment, recommended full-day meals scored higher in CCDI (110.91 ± 9.70) compared with self-selected diets (90.61 ± 10.77, p < 0.001). Across both settings, the system reduced deficiencies in vegetables, fruits, and aquatic products with consistent improvements in nutrient adequacy and food diversity, while maintaining alignment with dietary guidelines.
Conclusion:
To the best of our knowledge, this study presents the first ontology-driven dietary recommendation system tailored for Chinese children and adolescents. By integrating structured knowledge representation with advanced decision-making algorithms, the system demonstrates promising improvements in dietary quality, nutritional balance, and food diversity across both school and family scenarios. These findings highlight the system’s potential as a practical tool for promoting healthy eating behaviors, and informing nutrition education.
1 IntroductionDiet and health are intricately interlinked. A balanced diet supplies the body with vital energy and sufficient nutrients necessary for sustaining normal physiological functions, while also mitigating the risk of chronic conditions, including cardiovascular diseases, diabetes, and obesity (1–3). Particularly for children and adolescents undergoing critical growth and developmental phases, a healthy and balanced diet is indispensable. It not only facilitates the realization of their full growth potential (4) but also establishes a robust foundation for cultivating healthy eating behaviors into adulthood (5). Nevertheless, the prevailing dietary and nutritional habits of children and adolescents are worrisome, marked by excessive caloric intake coupled with inadequate nutrients, insufficient consumption of fruits and vegetables, and an over-consumption of salt and sugar (6, 7). The Report on Nutrition and Chronic Diseases of Chinese Residents (2020) reveals that the stunting prevalence among children and adolescents aged 6 to 17 is 2.2%, the anemia rate is 6.1%, and the overweight and obesity prevalence rates are 11.1 and 7.9%, respectively (8). Consequently, concerted efforts are imperative to enhance the dietary patterns of children and adolescents, ensuring they receive adequate and balanced nutritional intake.
Enhancing the dietary nutrition status of children and adolescents necessitates a comprehensive understanding of their population characteristics and daily eating patterns (9). Primarily, children and adolescents experience rapid growth and development, with evolving physiological and nutritional needs that vary with age. Common health concerns, including obesity and anemia, can be directly or indirectly mitigated by optimizing dietary nutrient content and food composition (10–12). Consequently, addressing adolescent dietary health requires a focus on multiple factors, including nutritional balance and food diversity, to develop dietary strategies that adhere to established guidelines. Secondly, unlike Western diets, Chinese diets are based on grains and cereals with moderate amounts of vegetables and meat, emphasizing a balance between meat and vegetables, the integration of diverse ingredients (13, 14), and attention to color, aroma, and flavor, frequently enhanced by a wide range of seasonings. For children and adolescents, prolonged consumption of traditional Chinese diets without professional guidance or appropriate pairing may result in issues such as excessive salt, oil, and sugar intake (15). Consequently, effective dietary guidance for Chinese children and adolescents requires an in-depth understanding of the structure and characteristics of Chinese cuisine, aiming to address dietary health issues by appropriately matching dishes and portions while preserving traditional eating habits.
In addition, adolescents’ dining scenarios are diverse, with schools and homes serving as their primary meal settings (16), each characterized by distinct methods of meal preparation and provision. Family meal settings are typically prepared by parents or grandparents, influenced by family economic conditions, dietary concepts, and cultural traditions, with certain intergenerational differences (17); whereas school meal settings are more influenced by policy regulation and collective meal arrangements, characterized by standardization and bulk provision (18). Compared with meal settings for children and adolescents in other countries or regions, Chinese settings display a distinct collective nature and family involvement. For example, in Europe and the United States, adolescents tend to develop the ability to independently choose their meals at an earlier age and often solve part of their meals through convenience foods, demonstrating stronger individual autonomy and convenience orientation (19, 20). In contrast, in China, families have stronger dietary interventions for adolescents (21), and schools also play an important role in nutritional intervention. Additionally, compared with adults’ diets, children’s and adolescents’ eating behaviors are more susceptible to external influences. Due to their immature cognitive level, dietary self-control, and the formation of dietary preferences, they are more easily affected by advertisements, peers, and family dietary culture, leading to tendencies toward high sugar, high salt, and unbalanced eating habits (22, 23). Adults, on the other hand, have greater dietary freedom and consumer choice, their eating habits are more stable, and they are more likely to be driven by self-managed nutrition motivation or chronic disease management needs. Thus, achieving a balanced diet for children and adolescents necessitates tailoring dietary recommendations to their dining scenarios, emphasizing guidance on eating behaviors and environmental adaptability and crafting personalized meal plans.
2 Related workCurrently, there are various systems in the field of dietary recommendation, with different focuses, application scenarios, and technical architectures. Yet systematic reviews reveal that the field tends to be skewed toward adult users and Western dietary contexts. A recent systematic review of 67 food recommender systems found that most systems are built using content-based filtering approaches with data predominantly sourced from Western recipe databases, and that several studies ignore personal attributes of users when producing recommendations (24). Similarly, a comprehensive review of health recommender systems noted that nutrition-related recommendations constitute a significant category, but the vast majority target general adult populations, with children and adolescents being markedly underrepresented as end users (25). These findings underscore a critical gap: the absence of food recommender systems designed to accommodate the distinctive nutritional needs, dining contexts, and dietary cultures of children and adolescents, particularly in non-Western settings. Representative systems in the field illustrate these limitations concretely. PREFer by Bianchini et al. (26) takes into account food preferences and medical prescriptions to provide users with personalized, healthy meal lists; SousChef by Ribeiro et al. (27) is aimed at the older population and generates personalized meal lists based on body measurements, preferences, and activity levels; and Stefanidis et al. (28)’s PROTEIN AI Advisor combines an expert-validated database with a two-tier architecture to create daily or weekly meal plans for healthy and health-status-specific populations. Despite their technical merit, these systems share three fundamental limitations that preclude their direct application to Chinese children and adolescents. First, they model meals as single-item recommendations or simple item lists, which cannot capture the combinatorial structure of Chinese meals comprising multiple dish types with inter-dish constraints on ingredient diversity and nutritional complementarity. Second, they lack pediatric nutritional modeling that incorporates age- and growth-stage-specific nutrient targets or health-condition-aware adjustments. Third, they do not account for the dual school–family dining context that characterizes Chinese children’s meal environments, where school canteens follow group-level standardized provision while family meals are individually customized.
To build an intelligent dietary recommendation system for children and adolescents first requires an authoritative and comprehensive knowledge base as a decision support. Ontology, as a formalized shared conceptual model, can express object types, attributes and their relationships in a structured and semantic way, enabling the system to process complex information more accurately and flexibly (29–31). Given the structural complexity and nutritional reasoning needs of Chinese diets, ontology is the preferred solution for constructing this type of knowledge base. Existing dietary knowledge bases and ontology studies include Food Ontology (FoodOn) (32), Food Knowledge Graph (FoodKG) (33), Ontology for Nutritional Studies (ONS) (34), etc., all of which achieve unified food terminology, structured nutritional knowledge and support computational reasoning. However, these ontologies are structurally insufficient for dietary recommendation in our target population. First, these ontologies are designed around Western food taxonomies organized at the individual food-item or ingredient level, and lack the hierarchical modeling capacity needed to represent Chinese multi-dish meal structures, where a single meal comprises coordinated combinations of dishes, each composed of multiple ingredients. Second, they do not encode age-stratified nutritional targets or growth-stage-specific dietary requirements; the Dietary Reference Intakes for children and adolescents vary substantially across age groups, yet existing ontologies treat nutritional standards as static adult-oriented values. In addition, these ontologies lack the inferential capacity to reason about health-condition-specific dietary adjustments, which requires not only food–nutrient mappings but also user–health–condition–diet linkage rules. These gaps necessitate the development of a domain-specific, executable ontology that can model population characteristics, dining scenarios, and the complex structure of Chinese cuisine simultaneously.
Secondly, to build an intelligent dietary recommendation system for children and adolescents requires the consideration of demographic and contextual characteristics to address diverse nutritional needs. Thus, the method of multi-criteria decision-making (MCDM) can be introduced, which is a kind of decision-making method to deal with multi-objective conflicts by integrating group opinions, quantifying weights, and using analytical techniques to optimize solution selection (35). It is mainly divided into multi-attribute decision-making (MADM) and multi-objective decision-making (MODM), which can provide more personalized and balanced recommendations for children’s and adolescents’ nutrition. Among the available studies, Gazan et al. (36) summarized the process of applying mathematical optimization methods to develop dietary plans; Salloum et al. (37) used genetic algorithms and particle swarm optimization to create personalized meal plans and compared them with linear programming; Gaál et al. (38) proposed multilevel genetic algorithms to simultaneously satisfy the constraints of nutrition, preferences, and food compatibility. These existing optimization approaches predominantly operate at the food-group or ingredient level, rather than at the dish level that characterizes real meal provision in Chinese dining contexts. This abstraction gap means their outputs cannot be directly translated into actionable, dish-based meal plans without an additional, non-trivial composition step. Moreover, most studies focus exclusively on nutritional adequacy as the optimization objective, treating food diversity as at best a secondary constraint rather than an equally important optimization target. For children and adolescents, however, food diversity is not merely a preference but a nutritional imperative linked to micronutrient adequacy and the development of healthy eating behaviors. Our study addresses these gaps by proposing a unified framework that operates at the dish level, treats food diversity as a co-equal optimization criterion, and integrates MODM and MADM in a coherent two-phase pipeline.
3 Methods3.1 Study overviewTo address the lack of an executable, China-specific knowledge base and algorithmic framework for healthy eating among children and adolescents, this study aims to (1) construct a domain ontology that formalizes demographic characteristics, dining scenarios, foods, and nutrient targets, to adapt to specific populations and scenarios; (2) design a dietary recommendation algorithm that integrates rule-guided meal composition with multi-objective portion optimization and diversity-aware solution selection, to simultaneously satisfy nutritional balance and food diversity; and (3) implement a multi-scenario system, to support both school meal services and family dining. We evaluate effectiveness against real-world baselines using quantifiable endpoints: overall diet quality, nutritional balance, and food diversity. By achieving these outcomes, the study seeks to improve children’s and adolescents’ dietary quality and enable scalable adoption in both institutional and home settings. We did not include head-to-head comparisons with established optimization-based or recommender-system baselines in this study, because most existing approaches operate at the food-group or ingredient level and are not directly compatible with our dish-level, scenario-specific recommendation framework.
The study was designed based on these tasks. Figure 1 illustrates the overall study design. The basis of the recommendation process is a customized ontology called the Child and Adolescent Dietary Recommendation Ontology (CADRO), which consists of dietary guidelines, expert insights, and additional relevant information, and is used to provide rules and data for the recommendation algorithm. The core of the recommendation process is the Child and Adolescent Dietary Recommendation Algorithm (CADRA), which leverages the ontology’s knowledge and employs a multi-criteria decision-making framework to generate personalized recommendation meals for users. Finally, the implementation of the recommendation process is facilitated by the developed Child and Adolescent Dietary Recommendation System (CADRS), which offers users a terminal through which the application of the ontology and algorithms can be executed to evaluate recommendation efficacy.

Overall study design.
3.2 Ontology constructionOntology is a structured approach for organizing and representing knowledge, which helps systems better understand and process complex information by explicitly defining concepts and their relationships within a domain (39). According to the degree of domain dependency, ontologies can be categorized into four types: top-level ontologies, domain ontologies, task ontologies, and application ontologies (40). In Chinese dietary patterns, dishes exhibit diverse structures, flexible combinations, and complex rules, so a knowledge representation method that supports semantic reasoning and interpretability is needed to effectively model the intricate logic among different ingredients, dishes, and nutritional components. Compared with traditional rule tables or relational databases, ontologies have significant advantages in expressing multi-level nutritional knowledge, handling uncertainty and providing interpretable recommendations. Based on this consideration, this study constructed the Child and Adolescent Dietary Recommendation Ontology (CADRO), an application ontology specifically geared toward personalized dietary recommendation scenarios for children and adolescents. The development of this ontology followed the seven-step approach proposed by Stanford University (41) and was completed by this research team in collaboration with nutrition experts. Since CADRO involves sensitive physical examination records and unpublished dietary data, the full ontology populated with instances is not hosted in a public repository to protect privacy. However, the ontology structure and related resources are available for research purposes upon request (see Data Availability Statement).
CADRO’s knowledge comes from two main sources: manual collection and processing, and rule-based reasoning generation. The standard food instances included nearly 5,000 entries provided by the Chinese Food Composition Table (42), with attributes and relationships either directly sourced from the table or verified and refined by nutrition experts. Knowledge related to health issues was derived from various guidelines and books on children’s nutrition to extract dietary recommendations for child and adolescent health issues, which were subsequently converted into relational descriptions between corresponding instances. These sources included the Dietary Care Guidelines for Growth-Stunted Children and Adolescents (43), the Guidelines for Medical Nutrition Treatment of Overweight/Obesity in China (44), and the Chinese Hypertension Prevention and Treatment Guidelines (45).
Considering the diversity of dietary health groups among children and adolescents and the uniqueness of Chinese diets, the knowledge was structured into three primary modules, namely user profiling, dietary health, and dietary goals, and relevant concepts and attributes were systematically summarized for each module. In the user profiling module, two-dimensional features, including basic characteristics and health issues, were summarized and processed based on student physical examination data and expert experience. Six concepts under basic characteristics were defined as its data attributes, and five concepts under health issues were categorized as third-level concepts within the ontology. In the dietary health module, dietary guidelines were organized, field investigations were conducted, and expert advice was gathered to identify eight primary concepts (e.g., food, ingredients, and dishes), six attribute-related concepts, and multiple secondary and tertiary concepts. In the dietary goals module, elements such as set meals, nutrients, dietary pagoda food groups, and food were organized within the dietary health module, while other entity concepts were defined as classes in the ontology. Ultimately, four top-level concepts and 27 subordinate concepts were derived through reasoning. Some of the key concepts of dietary health can be found in the Supplementary File S1.
CADRO was modeled using Protégé software and semantically expressed in the OWL language. Class and attribute naming followed the English CamelCase rules with Chinese labels, identifiers were automatically assigned by Protégé, and some entities reused the standardized descriptions of FoodOn (32), ONS (34), and SNOMED CT (46) to maintain semantic consistency and interoperability. In the ontology relationship design, the core relationships such as containment, correspondence, and concern were defined, and the OWL axiomatic schema was used to express the hierarchical inheritance and constraints.
3.3 Algorithm designDietary recommendations for children and adolescents are highly concerned about nutritional health quality and focus on professionalism and interpretability, and we use a rule-based approach allowing for the integration of expertise to optimize recommendations and can compensate for the shortcomings of the cold-start problem (47). There is a multi-criteria decision-making (MCDM) (33) problem in the process of dietary recommendations, and the rational analysis and adoption of MCDM can help provide more personalized, comprehensive and balanced dietary recommendation suggestions.
CADRA is divided into three steps, each supported by the dietary recommendation knowledge base. According to the analysis of the meal recommendation process for children and adolescents, there are both a multi-objective decision-making (MODM) problem of optimizing from an infinite set of alternatives, and a multi-attribute decision-making (MADM) problem of sorting from a finite number of alternatives. Therefore, the algorithm adopts an integrated MCDM strategy. In this approach, the system first applies MODM to generate a Pareto-optimal set of balanced meal plans under nutritional adequacy and energy sufficiency. Then, MADM methods are used to rank and select the final recommendations that most closely matches food diversity needs. This two-phase “optimization–selection” paradigm has been validated in MCDM and multi-objective optimization research (48) and has demonstrated strong effectiveness in healthcare and food-engineering contexts (49–51).
3.3.1 Dish combinationFor the different dining scenarios of children and adolescents, we formulated the rules for dish combinations based on the Dietary Guidelines for Chinese Residents (52), while also referring to the 30-day actual meal supply data of an elementary school in Pinghu City. Breakfast consists of “1 staple food + 1 main meat dish + 1 soup,” while lunch and dinner are designed with three types of dish combinations: 1 staple food + 1 main meat dish + 1 semi-meat dish + 1 vegetarian dish, 1 staple food + 1 main meat dish + 1 semi-meat dish + 2 vegetarian dishes, and 1 staple food + 1 main meat dish + 1 vegetarian dish. Soup is not a mandatory component, and the staple food may include two dishes. In addition to the rules for the combination of dish types, there are other constraints for the pairing of single meals as well as one-day and one-week set meals.
To implement the dish combination rules, corresponding algorithmic processes are developed for single set meals, one-day set meals, and one-week set meals. The input data for CADRA includes the user’s personalized meal goals, a comprehensive meal library with attributes, and user-defined, partially configurable meal requirements, encompassing meal composition types and meal time. The following describes in detail the combination process for single, 1-day, and 1-week set meals, and the combination rules can be found in Supplementary File S2.
In the single set meal combination process, the algorithm first randomly selects a form of staple food, and then randomly picks a dish from the corresponding category. For example, when choosing “fine grain staple food + coarse grain staple food,” one could get “white rice + steamed sweet potato.” For vegetarian dishes, if the set meal requires two vegetarian dishes, one vegetarian dish is randomly selected first, and then another different dish is chosen based on its main ingredients to ensure variety., e.g., “okra with garlic + green beans and tofu.” Similarly, for meat dishes, the main meat dish is selected first, and then according to the main ingredient category, the semi-meat dish of different food categories is filtered out, like “braised pork chop + stir-fried beef with bamboo shoots.” Through this process, the final combination of staple food, meat and vegetarian dishes for the meal is obtained.
The one-day set meal consists of a combination of three meals. Breakfast has fewer rules and is therefore realized separately. Lunch and dinner are subject to additional requirements, e.g., at least one meal contains a roughage staple and at least one meal contains dark vegetables. The remaining unduplicated requirements are realized by reducing the candidate meal options and selecting them randomly. If the first round of dish combination does not meet the food quantity requirements, the algorithm will proceed with a second round, prioritizing meals with more food items.
The one-week set meal combination process mainly constrains the number of intake of foods such as aquatic products, soy products, and mushrooms and algae. The algorithm first breaks down the food quantity requirements for 7 days according to the dietary guidelines, and then generates a combination plan for each day based on the 1-day set meal pairing process. In particular, the special food categories correspond to specific dish types: aquatic products are included in main meat meals, soybean products are included in vegetarian or semi-vegetarian meals, and mushrooms and algae are featured in vegetarian meals.
3.3.2 Servings calculationAfter completing the dish combination, the algorithm uses multi-objective optimization to calculate the weight of each meal in order to satisfy the nutrient intake requirements specified in the user’s dietary goals. In this problem model, in addition to satisfying the recommended intake of different nutrients, there should also be weight range constraints for each dish to prevent the solution of unreasonable or infeasible weights. The user’s personalized dietary goals specify reference intake quantities for each food group in the dietary pagoda. These are then converted into weight constraint ranges for different dish types. For instance, if a user’s reference intake of cereals and potatoes is 140–160 grams, the corresponding weight constraints for staple foods may be set between 100–200 grams. This range is moderately expanded to prevent imposing excessive constraints on the genetic algorithm’s calculations and to accommodate the flexibility of actual meal preparation.
The mathematical model is illustrated through the calculation of servings in a single set meal. The combination of dishes is defined as staple food + main meat dish + semi-meat dish + vegetarian dish . The nutrient range provided in this meal is determined by the selected meal time and age group, expressed as , where denotes the nutrient type index for fourteen nutrients, including energy, protein, fat, carbohydrate, dietary fiber, vitamin A, vitamin B1, vitamin B2, vitamin C, iron, sodium, calcium, zinc, and potassium. The weight range for each dish type in this meal is defined as , based on the selected meal time and age group, where denotes the dish type index, which can take values of 0, 1, 2, or 3.
Let the raw weight of dish , i.e., standard weight, be , the actual weight in the set meal is also . Here, serves as the independent variable of the optimization model, while the nutrient content provided by each dish is represented as . Consequently, the total content of each nutrient in the entire set meal can be calculated using Equation (1):
For certain nutrients, their content will be constrained not only by nutrient ranges but also by health labels, requiring their intake to meet a specific value, as defined in Equation (2).where denotes the index of the particular nutrient, and represents the prescribed intake for that nutrient. For instance, if the user is anemic, an increased intake of iron is required (53). To ensure that each nutrient provided in the meal remains within the recommended range, i.e., , 14 objective functions can be established to represent each of the 14 nutrients under consideration, as shown in Equation (3):
It can be observed that when the numerator of an objective function is zero, i.e., when the entire objective function value equals zero, the meal supplies that nutrient within the recommended range. Conversely, a larger value of the objective function signifies that the meal supplies that nutrient further away from the recommended range.
In summary, the mathematical model for nutritional calculations includes an independent variable, , and a total of 14 objective functions aimed at minimizing the values of these functions to zero. Furthermore, the independent variables are constrained by the weight ranges of each dish type in a meal, while specific nutrients are regulated by health labels. The overall computational model is illustrated in Equation (4):
Given that a large number of objectives may increase computational complexity and decrease population diversity, thereby affecting the accuracy of results, we merged the relevant nutrients during the actual solving process, ultimately reducing the 14 objective functions to 7.
We used the decomposition-based multi-objective evolutionary algorithm (MOEA/D) to solve this optimization problem. Compared with non-dominated sorting algorithms such as NSGA-II and SPEA2, MOEA/D decomposes a multi-objective problem into several scalar subproblems and evolves them collaboratively. This approach shows superior performance in high-dimensional and constrained domains with lower computational complexity and balanced convergence–diversity (54–56). Specifically, we implemented the optimization algorithm using the MOEA Framework (57), an open-source Java library for multi-objective optimization. The Tchebycheff aggregation function was used as the decomposition method. The initial population size was automatically determined by the weight vector generator, ensuring that the number of subproblems matches the number of weight vectors. The neighborhood size was set to 20, the mating selection probability was set to 0.9, and the maximum replacement count was set to 2. The stopping criterion was set to a maximum of 10,000 function evaluations, a value determined through preliminary convergence testing. Utilizing this algorithm, a non-dominated set of Pareto-optimal solutions can be derived, where the weights of the corresponding dishes meet the recommended range of nutrients in the meal plan to the greatest extent possible.
3.3.3 Meal program generationDue to the characteristics of multi-objective optimization problems, finding a solution that optimally satisfies all objectives is challenging (58). Therefore, after nutritional calculations, several feasible solutions can be obtained, each representing a potential distribution of dish portion sizes in the meal composition. To select one solution as the output, a distance-based decision-making approach is employed (59). From a nutritional perspective, dietary goals encompass two key aspects: nutritional balance, which corresponds to the recommended intake of various nutrients, and food diversity, which corresponds to the recommended intake of dietary pagoda food groups. The feasible solution set for dish portions in the current meal is derived from the calculated nutritional balance results, which are assumed to satisfy the nutritional balance requirements. Decision-making is further guided by considerations of food diversity. Food diversity is represented by 10 dietary pagoda food group subclasses, such as grains, tubers, and vegetables. The algorithm selects the solution with the smallest Euclidean distance to the ideal solution as the final output solution by comparing the gap between the supply and ideal intake of each solution on 10 food groups.
With the above design, the algorithm is able to comprehensively consider the user’s personalized dietary goals, nutritional balance, and food diversity, generating dietary recommendation plans that meet the requirements under multiple constraints.
3.4 System developmentBased on the demand analysis, the multi-scenario meal recommendation system for children and adolescents should consist of a server side, a user terminal for the school feeding scenario, and a user terminal for the family meal scenario. To enhance the user experience, the system adopts differentiated technical solutions for the characteristics of different scenarios. In the school scenario, the main users are cafeteria managers and teachers, who work in a fixed environment, mainly use computers, and need efficient data management and maintenance functions (60), so the terminal is implemented in the form of web pages. In the family scenario, the users are children and parents. Considering the high usage rate of mobile devices and the convenient demand of “use and go” (61), the terminal is implemented by WeChat Mini Program.
Although user terminals are designed for the two main dining scenarios of children and adolescents, their core functions revolve around applying knowledge bases and recommendation algorithms for dietary recommendations. Consequently, a server-side application is developed to provide services for both user terminals through distinct interfaces. To ensure a high degree of code reusability and decoupling, the server-side design adopts a classic layered architecture and introduces modularization and scalability in the knowledge base and inference mechanism (62). Among them, the dietary recommendation knowledge base is constructed with the ontology as the core, and the user profile, dietary health rules, food-nutrient mapping, etc. are modularized and managed so that they can be updated independently. The reasoning and execution of the recommendation rules rely on the rule engine that separates the business rules from the system code, ensuring the system maintains its flexibility and maintainability over long-term use. The server side of the system is built based on Spring Boot framework and provides interfaces to the outside world through RESTful APIs (62). MyBatis Plus serves as the persistence tool, with data stored in a MySQL database. Maven is employed for project construction and dependency management.
3.5 Recommendation capacity assessmentTo evaluate the recommendation capability of the CADRS and verify the accuracy and feasibility of the recommended meal plans, this study analyzed and compared the meal plans from actual scenarios with those recommended by the system based on real data. Nutritional quality and healthfulness of the meals were assessed by constructing relevant evaluation indexes through the direct use of quantitative data, including nutrient content and other metrics. The primary meal scenarios for children and adolescents included school and family. The meal recommendation system was applied in both contexts; thus, this study conducted meal recommendation experiments from both group and individual perspectives. The group recommendation experiment assessed the nutritional quality and healthfulness of meals in school group scenarios, while the individual meal recommendation experiment evaluated personalized health in the context of family-based individual dining scenarios.
3.5.1 Data collectionMeal data and physical examination data were provided by the corresponding school canteens and relevant persons in charge. The data were formatted as Excel tables, which could be directly written as a Java program to manipulate and organize, and carry out conceptual alignment, relational extraction and reasoning. To ensure data quality, a trained research assistant was assigned to perform primary data entry, and a licensed dietitian independently checked the entries against the original records and verified the consistency of mappings. The principles for selecting experimental data were completeness and availability, meaning that the samples must have continuous records with no obvious omissions. As the study did not involve any additional experimental interventions, no inclusion and exclusion criteria were set in the traditional sense. All data were used after obtaining consent from the school and parents of the students and were de-identified.
3.5.2 Assessment indicatorsTo comprehensively assess whether the recommended plan achieves sufficient value for nutritional health compared to real data, the dietary quality was measured across three dimensions: overall dietary quality, nutritional balance, and food diversity, guided by documents such as the Dietary Guidelines for Chinese Residents (52). Specific indicators were established for each dimension to reflect its level. The detailed definitions of these three indicators can be found in Supplementary File S3.
3.5.3 Group recommendation experimentThe group recommendation experiment collected 30 days of lunch supply data from the cafeteria of an elementary school in Pinghu City, Zhejiang Province, China, with the meal program designed by the responsible dietitian. To analyze the nutritional composition of this meal data and recommend a systematic meal plan based on actual dishes, the original meal data was transformed according to the knowledge base framework for children and adolescents’ meal recommendations. The cafeteria supply data included a total of 101 meal instances. Each meal ingredient was matched to specific food item, and the basic attributes of the meals were calculated and verified. In the group recommendation experiment, a 30-day lunch dietary recommendation was conducted for a group of children and adolescents with only age specified, based on the meal library of a certain elementary school cafeteria. The nutritional quality and healthfulness of the recommended lunches were compared with those of the actual lunches served, according to the assessment indicators.
3.5.4 Individual recommendation experimentThe individual recommendation experiment collected physical examination data and 30 days of meal data from 30 students at a middle school in Hangzhou City, Zhejiang Province, China, with meal plans chosen independently by the students. Similarly, the original meal data was transformed according to the knowledge base framework for children and adolescents’ dietary recommendations. The dietary data from 30 students included a total of 502 meal instances. Each meal ingredient was matched with specific food item, and the basic attributes of the meals were calculated and verified. In the individual recommendation experiment, each of the 30 users received a 30-day full-day set meal recommendation based on their personalized dietary goals using the actual dish library. The nutritional quality and healthfulness of the recommended and self-selected set meals were compared for each user, and the results of these comparisons were comprehensively analyzed and evaluated.
3.5.5 Sample size considerationsThe sample sizes used in the two validation experiments were selected to support a pilot validation design. In the group-level experiment, 30 days of cafeteria lunch supply data were used to generate 30 paired daily comparisons between actual and system-recommended lunch plans, with 101 meal instances included in the meal database. In the individual-level experiment, 30 middle-school students each provided 30 days of dietary records and health examination data, yielding 502 meal instances and 30 paired user-level comparisons between self-selected and system-recommended full-day meal plans.
This sample size is consistent with commonly used guidance for pilot studies, in which the primary aims are to assess feasibility, calibrate parameters, evaluate data-processing procedures, and obtain preliminary estimates of effect magnitude. A frequently cited rule of thumb recommends approximately 12 participants or observations per group for pilot studies (63), while other methodological guidance suggests that pilot sample size should be determined according to the expected effect size and the objectives of the future main study (64). Therefore, the use of 30 paired observations in each experiment was considered adequate for preliminary validation and for detecting medium-to-large differences in dietary quality, while remaining feasible for a single-site school-based implementation. As a sensitivity check, we used the standard normal-approximation sample size formula for detecting a standardized paired mean difference (65),Where the effect size is defined as the mean within-pair difference divided by the standard deviation of the within-pair differences. Under a two-sided of 0.05 and power of 0.80 yield, and . With 30 paired observations, the minimum detectable standardized paired effect is approximately 0.51. Thus, the current sample size provides reasonable sensitivity for detecting approximately medium or larger paired effects, according to conventional effect-size interpretation, which is consistent with the pilot nature of this validation study (66).
4 Results4.1 System development results4.1.1 Ontology constructionThe current version of CADRO includes 177 classes, 42 object properties, 15 data properties, and 31 enumerated values for properties, with 138 classes reused from existing ontologies.
To ensure semantic correctness, the ontology was tested for logical consistency, and all classes and relations were verified to be conflict-free. Through this construction method, CADRO not only ensures transparency and reproducibility, but also has good scalability, providing a solid knowledge foundation for subsequent algorithm design and system integration. Figure 2 shows the main core class diagram of CADRO. We have not added all classes and attributes to the diagram for ease of presentation. For clarity, not all classes and attributes are depicted.

Class diagram of the Child and Adolescent Dietary Recommendation Ontology’s main core.
The instance layer of the constructed ontology closely integrates real data with the ontology. In terms of user data, the system reasoned personalized dietary goals based on information such as gender, age, height, weight, activity level, and health status. For example, it dynamically adjusts the priority of iron for users with anemia and generates suitable nutritional intake plans. In terms of meal data, based on the 30-day lunch supply data of an elementary school in Pinghu City, we applied deduplication, ingredient mapping, and rule-based reasoning to obtain each dish’s nutritional components and attributes such as dietary pagoda food group classification. This process ultimately produced a standardized meal database. The instance layer provides high-quality data that can be directly used by the recommendation algorithm.
4.1.2 Algorithm designThe algorithm design is divided into three main phases: dish combination, servings calculation and meal program as shown in Figure 3. The process begins with a rule-guided dish combination stage, where the system generates meal combinations that meet nutritional structure requirements, to reduce the occurrence of unreasonable combinations. Next, in the servings calculation stage, a multi-objective evolutionary algorithm is employed to optimize 14 nutritional targets, ensuring that the energy and micronutrient intake per meal meets established standards. In the final meal program stage, a food group distance-based method is used to prioritize solutions that are closer to the ideal diversity point, effectively preventing the overuse of single food ingredients.

Process and framework for Child and Adolescent Dietary Recommendation Algorithm.
The three design stages of the algorithm work in synergy, leading to improvements in the overall performance of the dietary recommendation system, particularly in terms of nutritional balance and food diversity.
4.1.3 System developmentIn both terminals, users can realize the functions of editing user profiles and obtaining meal recommendations, etc. The web terminal also supports the addition, deletion, checking and modification of food and meal data for easier data management and maintenance, while the mini-program terminal supports the recording of three meal data, which is convenient for individual users to track their diets. All operation data is synchronously uploaded to the server for data persistence storage, and the core business logic processing is undertaken by the backend knowledge base and recommendation algorithm module.
When the user terminal sends a request, it first requests a specific API corresponding to the interface layer. The request is intercepted by the control layer, responsible for preliminary input validation and data parsing, without directly handling business logic. If validation and parsing are successful, the request is passed to the service layer for core business logic processing. If the task involves complex recommendation rules or calculations, it will be processed by the knowledge base rules module and recommendation algorithm module. Next, the data is persistently stored, and operations such as adding, deleting, modifying, and checking are performed on the database. Finally, the results obtained from the service layer and the resource layer are sent back to the control layer in a layered manner, where they are encapsulated in JSON format for highly efficient data interaction by the user terminals. Throughout this process, all requests from the user terminal are executed by calling APIs. The core APIs provided by the server-side correspond to three primary functions of the meal recommendation process: meal target inference, meal collection management, and meal plan recommendation. Figure 4 illustrates the overall architecture of the system.
Comments (0)