A personalized public welfare meal matching method and system based on user health portraits

By constructing user health profiles and sets of nutritional complementarity relationships, and combining them with multi-objective genetic optimization algorithms, the problem of personalized nutritional meal planning in traditional public welfare meal planning methods has been solved, achieving efficient, accurate, and intelligent personalized nutritional meal planning, and improving the scientific nature and efficiency of meal planning.

CN122117253APending Publication Date: 2026-05-29深圳市思友科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
深圳市思友科技有限公司
Filing Date
2026-04-28
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Traditional public welfare meal delivery methods are difficult to achieve efficient, accurate, and intelligent personalized nutritional meal planning, and cannot meet the individualized health needs of different individuals. Furthermore, they lack a systematic model of the complementary nutritional relationships between ingredients, resulting in insufficient nutritional balance in the meal plans.

Method used

By constructing user health profiles, using health index values ​​and cluster analysis to generate user-suitable food sets, combining them with a set of nutritional complementarity relationships for optimization, and using a multi-objective genetic optimization algorithm to optimize the food ratios, multiple optional meal combinations that meet personalized nutritional needs are generated.

Benefits of technology

It enables efficient, accurate, and intelligent personalized nutritional meal planning, improves the scientific nature and efficiency of meal planning, ensures food safety and compliance, reduces the complexity of searching for meal combinations, and avoids ineffective combinations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122117253A_ABST
    Figure CN122117253A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of personalized nutrition management, and a personalized public meal serving method and system based on user health portraits, comprising: receiving a meal serving instruction, confirming n user health data nodes based on the meal serving instruction, constructing n user health portraits according to the n user health data node sets, screening and matching a public meal serving material library by using the user health portraits, obtaining a user adaptive material set, constructing a nutrition complementary relationship set based on the user adaptive material set and the user health portraits, combining and optimizing the user adaptive material set by using the nutrition complementary relationship set, obtaining d selectable meal serving combinations, and sending the d selectable meal serving combinations to the originating end of the meal serving instruction, so as to realize personalized public meal serving based on user health portraits. The present application can realize efficient, accurate and intelligent personalized nutrition meal serving.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of personalized nutrition management technology, and in particular to a personalized public welfare meal planning method and system based on user health profiles. Background Technology

[0002] With the aging population and the continuous rise in the prevalence of chronic diseases, public welfare meal delivery services targeting the elderly, low-income families, students, and hospital patients are receiving increasing social attention. Significant differences exist in the physical conditions and nutritional needs of individuals, making it difficult to meet the personalized health needs of users through a standardized meal delivery model. Therefore, developing a personalized public welfare meal delivery method that can combine user health indicators to achieve precise nutritional intervention has significant social and practical value for improving the health of specific populations and optimizing the allocation of public dietary resources.

[0003] Traditional public welfare meal planning methods rely heavily on manual work by nutritionists. When dealing with large user groups, analyzing health data and customizing meal plans for each individual is time-consuming and labor-intensive, making scalability difficult. Furthermore, existing methods lack systematic modeling of the complementary nutritional relationships between ingredients, often relying on matching only single nutrients, resulting in insufficient nutritional balance in the meal plans. In addition, manual meal planning struggles to precisely optimize ingredient ratios, failing to efficiently generate multiple options to meet individual nutritional needs, leading to low overall service efficiency and scalability. Therefore, achieving efficient, accurate, and intelligent personalized meal planning has become an urgent problem to be solved. Summary of the Invention

[0004] This invention provides a personalized public welfare meal planning method based on user health profiles and a computer-readable storage medium. Its main purpose is to achieve efficient, accurate, and intelligent personalized nutritional meal planning.

[0005] To achieve the above objectives, the present invention provides a personalized public welfare meal planning method based on user health profiles, comprising:

[0006] Upon receiving a meal preparation instruction, n user health data nodes are identified based on the meal preparation instruction. Each user health data node includes m health indicator values ​​and m health indicators, wherein the health indicator values ​​and health indicators correspond one-to-one, and each user health data node is identified by a user number.

[0007] Based on a set of n user health data nodes, construct n user health profiles, where each user health profile corresponds one-to-one with a user ID.

[0008] For each user health profile in the set of n user health profiles, perform the following operations:

[0009] Obtain a public welfare meal supply ingredient library, which includes multiple ingredient nutrition nodes, including ingredient identifier, nutrient vector and applicable population tag. Use the user health profile to filter and match the public welfare meal supply ingredient library to obtain a set of ingredients suitable for the user.

[0010] Based on the user-suitable food set and user health profile, a set of nutritional complementarity relationships is constructed. The set of nutritional complementarity relationships is used to optimize the combination of the user-suitable food set to obtain d optional meal combinations, where d is an integer greater than 1.

[0011] The d optional meal combinations are sent to the initiator of the meal preparation instruction to realize personalized public welfare meal preparation based on the user's health profile.

[0012] Optionally, constructing n user health profiles based on a set of n user health data nodes includes:

[0013] Health indicators are extracted sequentially from the m health indicators. Using the health indicators, n health indicator values ​​are retrieved from n user health data nodes. Each health indicator value is identified by a user ID.

[0014] Sort the n health indicator values ​​in ascending order of user ID to obtain a health indicator value sequence. Perform normalization processing on the health indicator value sequence to obtain a normalized indicator value sequence, where the normalized indicator value sequence contains multiple normalized indicator values.

[0015] By summing the normalized index value sequences, we obtain m normalized index value sequences.

[0016] Reorganize m normalized index value sequences according to user IDs to obtain n normalized index vectors, where each normalized index vector corresponds one-to-one with a user ID.

[0017] The target number of clusters is determined based on n normalized index vectors. The target number of clusters is then used to cluster the n normalized index vectors to obtain multiple health feature cluster groups. The number of multiple health feature cluster groups is the target number of clusters.

[0018] For each of the multiple health feature clusters, perform the following operation:

[0019] Calculate the cluster center vector corresponding to the health feature cluster group to obtain the cluster center index vector, where the cluster center vector contains the mean of m normalized indices;

[0020] Based on the cluster center index vector, the health risk coefficient is obtained, and the health risk coefficient is used to identify health feature clusters to obtain identified clusters. The identified clusters are then summarized to obtain multiple identified clusters.

[0021] For each of the n normalized index vectors, perform the following operation:

[0022] Based on the user ID corresponding to the normalized index vector, the identifier cluster group corresponding to the normalized index vector is identified among multiple identifier cluster groups, and the health risk coefficient corresponding to the identifier cluster group is taken as the health risk coefficient corresponding to the normalized index vector.

[0023] By associating the normalized indicator vector, health risk coefficient, and user ID, a user health profile is obtained. By summing the user health profiles, n user health profiles are obtained.

[0024] Optionally, obtaining the health risk coefficient based on the cluster center indicator vector includes:

[0025] The normalized index mean is extracted sequentially from m normalized index mean values. The corresponding index value interval is determined based on the normalized index mean values, resulting in m index value intervals. The normalized index mean values ​​correspond one-to-one with the index value intervals, and the index value intervals include the lower limit and the upper limit of the interval.

[0026] The health risk coefficient is calculated based on the mean of m normalized indicators and the range of m indicator values. The calculation formula is as follows:

[0027]

[0028] in, This represents the health risk coefficient. Indicates shared ownership The normalized index mean, Represents the m-th normalized index mean. The normalized index mean, Indicates the first The upper limit of the interval of the index value corresponding to the mean of each normalized index. Indicates the first The lower limit of the interval of indicator values ​​corresponding to the mean of each normalized indicator. () indicates taking the minimum value. This indicates taking the absolute value. () indicates a preset indicator function that returns 0 if the condition is met, otherwise returns 1.

[0029] Optionally, determining the target cluster size based on n normalized index vectors includes:

[0030] Given a set number of candidate clusters, perform the following operation on each of the a candidate clusters:

[0031] Clustering operations are performed on n normalized index vectors using the number of candidate clusters to obtain multiple candidate cluster groups, where each candidate cluster group contains multiple normalized index vectors.

[0032] For each of the multiple candidate cluster groups, perform the following operation:

[0033] Calculate the cluster center vector of the normalized index vector in the candidate cluster group to obtain the candidate center vector. Calculate the squared distance between each normalized index vector in the candidate cluster group and the candidate center vector to obtain multiple squared distance values. Sum the multiple squared distance values ​​to obtain the sum of squared errors within the group.

[0034] Sum the sums of squared errors within groups to obtain multiple sums of squared errors within groups. Summate these multiple sums of squared errors to obtain the sum of squared clustering errors.

[0035] The sums of the clustering errors are summarized to obtain multiple clustering error sums of squares, wherein each clustering error sum corresponds one-to-one with the number of candidate clusters. The multiple clustering error sums of squares are sorted in ascending order of the number of candidate clusters to obtain a clustering error sum sequence.

[0036] The reference clustering error sum of squares is extracted sequentially from the clustering error sum of squares sequence from front to back. Using the reference clustering error sum of squares, the comparative clustering error sum of squares is identified from the clustering error sum of squares sequence. The comparative clustering error sum of squares is adjacent in the clustering error sum of squares sequence and lags behind the reference clustering error sum of squares in the clustering error sum of squares sequence.

[0037] The absolute difference between the reference clustering error sum of squares and the comparison clustering error sum of squares is calculated to obtain the first-order absolute difference, wherein the number of candidate clusters corresponding to the first-order absolute difference is the number of candidate clusters corresponding to the reference clustering error sum of squares.

[0038] Summarize the first-order absolute differences to obtain a-1 first-order absolute differences. Sort the a-1 first-order absolute differences in order of the number of candidate clusters from smallest to largest to obtain the first-order absolute difference sequence.

[0039] The reference first-order absolute difference is extracted sequentially from the first-order absolute difference sequence in order from front to back. Using the reference first-order absolute difference, the comparison first-order absolute difference is identified from the first-order absolute difference sequence. The comparison first-order absolute difference is adjacent to and lags behind the reference first-order absolute difference in the first-order absolute difference sequence.

[0040] The absolute difference between the reference first-order absolute difference and the comparison first-order absolute difference is calculated to obtain the second-order absolute difference, wherein the number of candidate clusters corresponding to the second-order absolute difference is the same as the number of candidate clusters corresponding to the reference first-order absolute difference.

[0041] By summing the second-order absolute differences, we obtain a-2 cluster absolute differences;

[0042] The largest absolute difference among the a-2 clusters is selected, and the number of candidate clusters corresponding to the largest absolute difference is determined as the target number of clusters.

[0043] Optionally, the step of using the user's health profile to filter and match the public welfare meal preparation ingredient database to obtain a user-suitable ingredient set includes:

[0044] Health risk coefficients are extracted from user health profiles. Based on these health risk coefficients, the applicable population tags corresponding to each nutritional node of the ingredients in the public welfare meal supply ingredient library are matched and screened to obtain the initial screening ingredient library.

[0045] Nutritional constraint nodes are obtained based on user health data nodes. These nodes include a restricted nutrient set and a recommended nutrient set. The restricted nutrient set contains multiple restricted nutrients, and the recommended nutrient set contains multiple recommended nutrients.

[0046] The nutrient vector corresponding to each nutrient node in the initial screening nutrient database is tested using the restricted nutrient set to obtain the test result, which is either pass or fail. If the test result is confirmed to be pass, the nutrient node of the food is confirmed as a compliant food node.

[0047] The compliant food nodes are summarized to obtain a set of compliant food nodes. The suitability of each compliant food node in the set of compliant food nodes is calculated using the recommended nutrient component set to obtain a set of suitability values. The set of suitability values ​​contains multiple suitability values, and each suitability value corresponds one-to-one with a compliant food node.

[0048] Sort the fitness values ​​in the fitness value set in descending order to obtain the fitness value sequence;

[0049] Using a preset adaptation number threshold, e adaptation values ​​are extracted from the adaptation sequence, where e is the adaptation number threshold.

[0050] Using e adaptation values, a set of user-adaptable ingredients is selected from the set of compliant ingredient nodes, wherein the number of compliant ingredient nodes in the set of user-adaptable ingredients is the adaptation quantity threshold.

[0051] Optionally, the step of calculating the fit degree for each compliant food node in the compliant food node set using the recommended nutrient component set to obtain a fit degree value set includes:

[0052] The recommended intake for each recommended nutrient in the recommended nutrient set is determined to obtain the recommended intake set, where the recommended intake corresponds one-to-one with the recommended nutrient.

[0053] The compliant food nodes are extracted sequentially from the compliant food node set, and the nutrient vectors are extracted from the compliant food nodes. Using the recommended nutrient set, the nutrient content of the food is retrieved from the nutrient vector to obtain the nutrient content set of the food, wherein the nutrient content of the food corresponds one-to-one with the recommended nutrient.

[0054] The fitness value is calculated based on the recommended intake set and the nutritional content set of the ingredients. The calculation formula is as follows:

[0055]

[0056] in, This indicates the fitness value. Indicates shared ownership One recommended nutritional component, Indicates the preset first The weighting coefficients for each recommended nutrient component. Indicates the first The recommended nutritional components correspond to the nutritional content of the ingredients. Indicates the first Recommended intake for each of the recommended nutrients. This indicates the preset target serving size.

[0057] Summarize the fit values ​​to obtain a set of fit values.

[0058] Optionally, the step of constructing a set of nutritional complementarity relationships based on the user-adapted food set and the user's health profile includes:

[0059] Extract normalized indicator vectors and health risk coefficients from user health profiles, and obtain nutrient intake range nodes based on the health risk coefficients. The nutrient intake range nodes include the intake ranges of multiple nutrients.

[0060] The nutrient intake range node is adjusted in a personalized manner using a normalized index vector to obtain the adjusted nutrient intake range node.

[0061] Based on the adjusted nutrient intake range node and the nutrient component vectors corresponding to the compliant food node in the user's suitable food set, a set of nutrient complementarity relationships is constructed.

[0062] Optionally, the step of constructing a set of nutritional complementarity relationships based on the nutritional component vectors corresponding to the nodes of the adjusted nutritional intake range and the compliant food nodes in the user-suitable food set includes:

[0063] The target nutrient vector is obtained based on the node of adjusting nutrient intake range. The target nutrient vector is a vector composed of the median of the intake range of each nutrient in the node of adjusting nutrient intake range, and the target nutrient vector contains the median corresponding to each nutrient.

[0064] For each compliant ingredient node in the user-adapted ingredient set, perform the following operations:

[0065] Calculate the difference vector between the nutrient component vector corresponding to the compliant food ingredient node and the target nutrient vector to obtain the nutrient difference vector. Summarize the nutrient difference vectors to obtain the nutrient difference vector set, wherein the nutrient difference vector contains the nutrient difference value corresponding to each nutrient component.

[0066] In a combined manner, the nutrient difference vectors in the nutrient difference vector set are paired up to obtain multiple nutrient difference vector pairs. For each of these multiple nutrient difference vector pairs, the following operation is performed:

[0067] Complementarity is calculated based on the nutrient difference vector;

[0068] By summing up the aforementioned complementarity, a set of nutritional complementarity relationships is obtained.

[0069] Optionally, the step of using a set of nutritionally complementary relationships to optimize the user's suitable food set yields d optional meal combinations, including:

[0070] By using the set of nutritional complementarity relationships, the compliant food nodes in the user's suitable food set are grouped into complementary groups to obtain z food complementary groups, where each food complementary group contains multiple foods.

[0071] Using a preset extraction method, one ingredient is extracted from each of the z complementary ingredient groups to obtain an initial meal combination, wherein the initial meal combination contains z kinds of ingredients;

[0072] Using a pre-constructed multi-objective genetic optimization algorithm, the ratio of z ingredients in the initial meal combination is optimized based on the target nutrient vector to obtain optimized ratio nodes. The optimized ratio nodes include ingredient identifiers and corresponding ratios, and each optimized ratio node corresponds one-to-one with the initial meal combination.

[0073] Once the comprehensive nutrient vector corresponding to the optimized ratio node is identified, the deviation distance between the comprehensive nutrient vector and the target nutrient vector is calculated to obtain the nutrient deviation value.

[0074] If the nutritional deviation value is less than the preset nutritional deviation threshold, the initial meal combination corresponding to the optimized ratio node is the optional meal combination;

[0075] Summarize the available meal combinations to obtain d possible meal combinations.

[0076] To achieve the above objectives, the present invention also provides a personalized public welfare meal delivery system based on user health profiles, comprising:

[0077] The health data acquisition module is used to receive meal preparation instructions and identify n user health data nodes based on the meal preparation instructions. Each user health data node includes m health indicator values ​​and m health indicators. The health indicator values ​​and health indicators correspond one-to-one, and each user health data node is identified by a user number.

[0078] The health profile building module is used to build n user health profiles based on n user health data node sets, where each user health profile corresponds one-to-one with a user ID.

[0079] The user ingredient matching module is used to obtain the public welfare meal ingredient library, which includes multiple ingredient nutrition nodes, and the ingredient nutrition nodes include: ingredient identifier, nutrient component vector and applicable population tag. The public welfare meal ingredient library is filtered and matched using the user health profile to obtain the user-matched ingredient set.

[0080] The meal planning optimization module is used to construct a set of nutritional complementarity relationships based on the user-suitable food set and the user's health profile, and to optimize the combination of the user-suitable food set using the set of nutritional complementarity relationships to obtain d optional meal plans, where d is an integer greater than 1.

[0081] The d optional meal combinations are sent to the initiator of the meal preparation instruction to realize personalized public welfare meal preparation based on the user's health profile.

[0082] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:

[0083] Memory, storing at least one instruction;

[0084] The processor executes the instructions stored in the memory to implement the personalized public welfare meal planning method based on the user's health profile described above.

[0085] To address the aforementioned issues, the present invention also provides a computer-readable storage medium storing at least one instruction, which is executed by a processor in an electronic device to implement the aforementioned personalized public welfare meal planning method based on user health profiles.

[0086] To address the problems described in the background art, this invention receives a meal preparation instruction and identifies n user health data nodes based on the instruction. Each user health data node includes m health indicator values ​​and m health indicators, with a one-to-one correspondence between the health indicator values ​​and health indicators. Each user health data node is also identified by a user ID. Based on the n user health data node sets, n user health profiles are constructed, with each user health profile corresponding to a user ID. This invention uses the second-order difference of the sum of squared clustering errors to determine the optimal target cluster size, reducing grouping bias that may result from manually specifying the cluster size, thus improving the objectivity and accuracy of health risk classification. A public welfare meal preparation ingredient library is obtained, which includes multiple ingredient nutrition nodes, each comprising an ingredient identifier, a nutrient vector, and an applicable population label. The user health profiles are used to filter and match the public welfare meal preparation ingredient library to obtain a user-suitable ingredient set. This invention utilizes the initial health risk coefficient... This invention employs a three-step screening process: screening, restriction component testing, and quantification of recommended component suitability. This ensures food safety and compliance, and prioritizes recommending ingredients that best meet the user's nutritional needs, improving the scientific rigor and efficiency of meal planning and achieving personalized and precise public welfare meal planning. Based on the user-suitable ingredient set and the user's health profile, a set of complementary nutritional relationships is constructed. This set of complementary nutritional relationships is then used to optimize the combination of the user-suitable ingredient set, resulting in d optional meal combinations, where d is an integer greater than 1. These d optional meal combinations are then sent to the initiator of the meal planning instruction, realizing personalized public welfare meal planning based on the user's health profile. It is evident that this invention reduces the search complexity of meal combinations by constructing a set of complementary nutritional relationships to group ingredients, avoiding ineffective combinations. Furthermore, a multi-objective genetic optimization algorithm is used to optimize the ingredient ratios in the initial meal combinations, minimizing the deviation between the comprehensive nutritional vector and the target nutritional vector. Multiple optional meal combinations that meet the requirements are selected through a nutritional deviation threshold, achieving efficient, accurate, and intelligent personalized nutritional meal planning. Therefore, this invention can achieve efficient, accurate, and intelligent personalized nutritional meal planning. Attached Figure Description

[0087] Figure 1 This is a flowchart illustrating a personalized public welfare meal delivery method based on user health profiles, provided in an embodiment of the present invention.

[0088] Figure 2 This is a functional module diagram of a personalized public welfare meal delivery system based on user health profiles provided in an embodiment of the present invention;

[0089] Figure 3 This is a schematic diagram of the structure of an electronic device that implements the personalized public welfare meal delivery method based on user health profile, according to an embodiment of the present invention.

[0090] Explanation of reference numerals in the attached figures:

[0091] 10. Electronic device; 11. Processor; 12. Memory; 13. Bus.

[0092] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0093] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0094] This application provides a personalized public welfare meal delivery method based on user health profiles. The executing entity of this personalized public welfare meal delivery method based on user health profiles includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application embodiment: a server, a terminal, etc. In other words, the personalized public welfare meal delivery method based on user health profiles can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.

[0095] Reference Figure 1 The diagram shown is a flowchart illustrating a personalized public welfare meal planning method based on user health profiles according to an embodiment of the present invention. In this embodiment, the personalized public welfare meal planning method based on user health profiles includes:

[0096] S1. Receive meal preparation instructions and identify n user health data nodes based on the meal preparation instructions. Each user health data node includes m health indicator values ​​and m health indicators. The health indicator values ​​and health indicators correspond one-to-one, and each user health data node is identified by a user number.

[0097] It should be explained that the meal preparation instruction is issued by the individual wishing to receive personalized public welfare meal preparation. The user health data node is the basic unit representing a user's physical health status; each user health data node corresponds to the health data of one user. The health indicator value is the numerical value obtained after testing a specific health indicator of the user. The health indicator is a physiological parameter used to measure a user's physical health status, including but not limited to body mass index, systolic blood pressure, fasting blood glucose, and total cholesterol. The user number is a unique identifier assigned to each user participating in public welfare meal preparation, used to distinguish the health data of different users during the meal preparation process.

[0098] For example, a community-based public meal delivery service center receives a meal delivery instruction and identifies a set of user health data nodes from a health data management platform. This set contains six user health data nodes, corresponding to user numbers 001 to 006. Each user health data node contains four health indicator values: Body Mass Index (BMI), systolic blood pressure, fasting blood glucose, and total cholesterol. Taking user number 001 as an example, the user health data nodes are: BMI -22.1, systolic blood pressure -118 mmHg, fasting blood glucose -5.0 mmol / L, and total cholesterol -4.2 mmol / L.

[0099] S2. Construct n user health profiles based on the set of n user health data nodes, where each user health profile corresponds one-to-one with a user ID.

[0100] It should be understood that the user health profile is the basic unit in the user health profile set, containing the user's normalized indicator vector, health risk coefficient, and user ID, used to characterize the user's overall health status and risk level. Because different health indicators have different dimensions and numerical ranges, it is necessary to normalize the health indicator values ​​to eliminate the influence of dimensions. Then, cluster analysis is used to group users with highly similar health characteristics into the same group, thereby achieving automatic classification of user health risks.

[0101] In detail, the construction of n user health profiles based on a set of n user health data nodes includes:

[0102] Health indicators are extracted sequentially from the m health indicators. Using the health indicators, n health indicator values ​​are retrieved from n user health data nodes. Each health indicator value is identified by a user ID.

[0103] Sort the n health indicator values ​​in ascending order of user ID to obtain a health indicator value sequence. Perform normalization processing on the health indicator value sequence to obtain a normalized indicator value sequence, where the normalized indicator value sequence contains multiple normalized indicator values.

[0104] By summing the normalized index value sequences, we obtain m normalized index value sequences.

[0105] Reorganize m normalized index value sequences according to user IDs to obtain n normalized index vectors, where each normalized index vector corresponds one-to-one with a user ID.

[0106] The target number of clusters is determined based on n normalized index vectors. The target number of clusters is then used to cluster the n normalized index vectors to obtain multiple health feature cluster groups. The number of multiple health feature cluster groups is the target number of clusters.

[0107] For each of the multiple health feature clusters, perform the following operation:

[0108] Calculate the cluster center vector corresponding to the health feature cluster group to obtain the cluster center index vector, where the cluster center vector contains the mean of m normalized indices;

[0109] Based on the cluster center index vector, the health risk coefficient is obtained, and the health risk coefficient is used to identify health feature clusters to obtain identified clusters. The identified clusters are then summarized to obtain multiple identified clusters.

[0110] For each of the n normalized index vectors, perform the following operation:

[0111] Based on the user ID corresponding to the normalized index vector, the identifier cluster group corresponding to the normalized index vector is identified among multiple identifier cluster groups, and the health risk coefficient corresponding to the identifier cluster group is taken as the health risk coefficient corresponding to the normalized index vector.

[0112] By associating the normalized indicator vector, health risk coefficient, and user ID, a user health profile is obtained. By summing the user health profiles, n user health profiles are obtained.

[0113] Understandably, the process of retrieving n health indicator values ​​from n user health data nodes using the aforementioned health indicator is as follows: using the currently extracted health indicator as the retrieval condition, the corresponding health indicator value is extracted from each of the n user health data nodes. Since the user health data node set contains n user IDs, the number of retrieved health indicator values ​​is n, and each health indicator value retains the user ID identifier of its respective user. The purpose of sorting the n health indicator values ​​according to the ascending order of user IDs is to ensure that the health indicator values ​​of all users under the same health indicator are arranged in a unified user ID order, so that when reorganizing the normalized indicator vector later, the normalized indicator values ​​of different health indicators belonging to the same user can be aligned. The health indicator value sequence is an ordered numerical sequence obtained after sorting.

[0114] It should be explained that the normalization process maps health indicator values ​​under the same health indicator to the interval [0, 1]. Optionally, the min-max normalization method can achieve this purpose, which is existing technology and will not be elaborated here. The normalized indicator value sequence is a numerical sequence obtained by performing normalization processing on the health indicator value sequence, wherein each normalized indicator value is consistent with the user ID to which the corresponding health indicator value belongs. The process of reorganizing m normalized indicator value sequences according to user ID to obtain n normalized indicator vectors is as follows: from the m normalized indicator value sequences, the normalized indicator values ​​belonging to the same user ID are extracted and combined into an m-dimensional vector according to the order of health indicators, finally obtaining n normalized indicator vectors.

[0115] Furthermore, the clustering involves grouping the n normalized index vectors using a target number of clusters. Optionally, the K-Means clustering algorithm can be used to achieve this. The specific method for obtaining the target number of clusters is detailed in subsequent embodiments.

[0116] It should be understood that the health feature clustering group is a grouping of normalized indicator vectors obtained after clustering operations. The cluster center indicator vector is the mean vector of each dimension of all normalized indicator vectors in the health feature clustering group, used to characterize the overall health feature level of the health feature clustering group. The health risk coefficient is a risk coefficient determined based on the mean of each indicator of the cluster center indicator vector; the larger the health risk coefficient, the worse the overall health status of the corresponding user. The identifier clustering group is a health feature clustering group associated with a health risk coefficient label. The process of identifying the identifier clustering group corresponding to the normalized indicator vector among multiple identifier clustering groups involves: based on the grouping results of the clustering operation, confirming that each normalized indicator vector is assigned to a certain identifier clustering group, and thus using the health risk coefficient label corresponding to that identifier clustering group as the user's health risk coefficient.

[0117] Specifically, obtaining the health risk coefficient based on the cluster center indicator vector includes:

[0118] The normalized index mean is extracted sequentially from m normalized index mean values. The corresponding index value interval is determined based on the normalized index mean values, resulting in m index value intervals. The normalized index mean values ​​correspond one-to-one with the index value intervals, and the index value intervals include the lower limit and the upper limit of the interval.

[0119] The health risk coefficient is calculated based on the mean of m normalized indicators and the range of m indicator values. The calculation formula is as follows:

[0120]

[0121] in, This represents the health risk coefficient. Indicates shared ownership The normalized index mean, Represents the m-th normalized index mean. The normalized index mean, Indicates the first The upper limit of the interval of the index value corresponding to the mean of each normalized index. Indicates the first The lower limit of the interval of indicator values ​​corresponding to the mean of each normalized indicator. () indicates taking the minimum value. This indicates taking the absolute value. () indicates a preset indicator function that returns 0 if the condition is met, otherwise returns 1.

[0122] It is understood that the range of indicator values ​​is the normal reference range for health indicators corresponding to the normalized mean. The lower limit of the range is the minimum value within the range, and the upper limit is the maximum value. For example, taking the health indicator (fasting blood glucose) as an example: assuming the range of fasting blood glucose is [0.4, 0.7], where 0.4 is the lower limit and 0.7 is the upper limit. It should be clarified that the range of indicator values ​​here is a normalized range, to facilitate comparison with the normalized mean and calculation of the health risk coefficient.

[0123] Furthermore, to make the clustering results more accurate and stable, it is necessary to reasonably determine the number of clusters. Therefore, the step of determining the target number of clusters based on n normalized index vectors includes:

[0124] Given a set number of candidate clusters, perform the following operation on each of the a candidate clusters:

[0125] Clustering operations are performed on n normalized index vectors using the number of candidate clusters to obtain multiple candidate cluster groups, where each candidate cluster group contains multiple normalized index vectors.

[0126] For each of the multiple candidate cluster groups, perform the following operation:

[0127] Calculate the cluster center vector of the normalized index vector in the candidate cluster group to obtain the candidate center vector. Calculate the squared distance between each normalized index vector in the candidate cluster group and the candidate center vector to obtain multiple squared distance values. Sum the multiple squared distance values ​​to obtain the sum of squared errors within the group.

[0128] Sum the sums of squared errors within groups to obtain multiple sums of squared errors within groups. Summate these multiple sums of squared errors to obtain the sum of squared clustering errors.

[0129] The sums of the clustering errors are summarized to obtain multiple clustering error sums of squares, wherein each clustering error sum corresponds one-to-one with the number of candidate clusters. The multiple clustering error sums of squares are sorted in ascending order of the number of candidate clusters to obtain a clustering error sum sequence.

[0130] The reference clustering error sum of squares is extracted sequentially from the clustering error sum of squares sequence from front to back. Using the reference clustering error sum of squares, the comparative clustering error sum of squares is identified from the clustering error sum of squares sequence. The comparative clustering error sum of squares is adjacent in the clustering error sum of squares sequence and lags behind the reference clustering error sum of squares in the clustering error sum of squares sequence.

[0131] The absolute difference between the reference clustering error sum of squares and the comparison clustering error sum of squares is calculated to obtain the first-order absolute difference, wherein the number of candidate clusters corresponding to the first-order absolute difference is the number of candidate clusters corresponding to the reference clustering error sum of squares.

[0132] Summarize the first-order absolute differences to obtain a-1 first-order absolute differences. Sort the a-1 first-order absolute differences in order of the number of candidate clusters from smallest to largest to obtain the first-order absolute difference sequence.

[0133] The reference first-order absolute difference is extracted sequentially from the first-order absolute difference sequence in order from front to back. Using the reference first-order absolute difference, the comparison first-order absolute difference is identified from the first-order absolute difference sequence. The comparison first-order absolute difference is adjacent to and lags behind the reference first-order absolute difference in the first-order absolute difference sequence.

[0134] The absolute difference between the reference first-order absolute difference and the comparison first-order absolute difference is calculated to obtain the second-order absolute difference, wherein the number of candidate clusters corresponding to the second-order absolute difference is the same as the number of candidate clusters corresponding to the reference first-order absolute difference.

[0135] By summing the second-order absolute differences, we obtain a-2 cluster absolute differences;

[0136] The largest absolute difference among the a-2 clusters is selected, and the number of candidate clusters corresponding to the largest absolute difference is determined as the target number of clusters.

[0137] It should be understood that the number of candidate clusters, *a*, is a pre-set set of *a* positive integers, which can be set according to the number of users and the actual application scenario. The candidate cluster group is the grouping result obtained after performing clustering operations on *n* normalized index vectors using the number of candidate clusters. The candidate center vector is the mean vector of each dimension of all normalized index vectors in the candidate cluster group. The squared distance value is the square of the Euclidean distance between a normalized index vector and the candidate center vector of its respective candidate cluster group. The sum of squared errors within a group is the sum of all squared distance values ​​corresponding to a candidate cluster group, used to measure the tightness of the normalized index vectors within that cluster group. The sum of squared clustering errors is the sum of the sum of squared errors within all candidate cluster groups, used to measure the overall clustering effect under the current number of candidate clusters; a smaller sum of squared clustering errors indicates a better clustering effect.

[0138] It should be explained that the clustering error sum of squares sequence is a sequence of clustering error sums calculated under different numbers of candidate clusters, arranged in ascending order of the number of candidate clusters. The first-order absolute difference is the absolute difference between the reference clustering error sum of squares and the comparison clustering error sum of squares. Since the clustering error sum of squares sequence contains *a* elements, adjacent pairings yield *a-1* first-order absolute differences. The first-order absolute difference sequence is an ordered sequence obtained by sorting the *a-1* first-order absolute differences according to the ascending order of the corresponding number of candidate clusters.

[0139] Understandably, the second-order absolute difference is the absolute difference between the reference first-order absolute difference and the comparison first-order absolute difference. Since the first-order absolute difference sequence contains a-1 elements, adjacent pairings yield a-2 second-order absolute differences. The number of candidate clusters corresponding to the second-order absolute difference is the same as the number of candidate clusters corresponding to the reference first-order absolute difference. This is because the second-order absolute difference reflects the degree to which the rate of decrease in the sum of squared clustering errors changes starting from this number of candidate clusters. The number of candidate clusters corresponding to the maximum second-order absolute difference is the position where the rate of decrease in the sum of squared clustering errors changes most drastically on the curve. After this position, further increasing the number of clusters no longer significantly improves the clustering effect; therefore, this number of candidate clusters is identified as the target number of clusters. It should be clarified that when using the second-order absolute difference (elbow method) to determine the target number of clusters in this embodiment of the invention, the sum of squared clustering errors usually shows a monotonically decreasing trend with the increase in the number of candidate clusters, and the maximum value of the second-order absolute difference often corresponds to a unique "elbow point." The embodiments of the present invention determine the optimal number of target clusters by using the second difference of the sum of squared clustering errors, thereby reducing the grouping bias that may be caused by manually specifying the number of clusters and improving the objectivity and accuracy of health risk classification.

[0140] S3. Obtain the public welfare meal supply ingredient library, which includes multiple ingredient nutrition nodes, including ingredient identifier, nutrient vector and applicable population tag. Use the user health profile to filter and match the public welfare meal supply ingredient library to obtain the user-suitable ingredient set.

[0141] It should be explained that the public welfare meal distribution ingredient database is an information database storing multiple nutritional nodes of ingredients. Optionally, the public welfare meal distribution ingredient database can be set based on data from professional dietary nutrition institutions. Each nutritional node is a data unit used to describe the various nutrients contained in a certain ingredient and their corresponding content, including an ingredient identifier, a nutritional component vector, and a suitable population tag. Specifically, the ingredient identifier is a name or code used to uniquely identify a certain ingredient. The nutritional component vector is structured data representing each nutrient (such as protein, fat, carbohydrates, vitamins, etc.) and its content or proportion in the ingredient in vector form, used to quantify the nutritional composition of the ingredient. The suitable population tag is an identifier for the population category to which a certain ingredient is suitable for consumption, which can be used to guide the matching of ingredients with specific user groups.

[0142] For example, chicken breast with ingredient label 001 has a nutritional composition vector of [23.3, 0.06, 1.7, 65, 1.2] (in the order of protein, sodium, fat, water, and carbohydrates, in grams per 100 grams), and is labeled as suitable for fitness enthusiasts and the elderly. Here, 001 is the ingredient label for chicken breast, and [23.3, 1.7, 6.5, 1.2] is the corresponding nutritional composition vector, indicating that every 100 grams of chicken breast contains 23.3 grams of protein, 0.06 grams of sodium, 1.7 grams of fat, 65 grams of water, and 1.2 grams of carbohydrates, making it suitable for fitness enthusiasts and the elderly.

[0143] In detail, the step of using the user's health profile to filter and match the public welfare meal preparation ingredient database to obtain a user-suitable ingredient set includes:

[0144] Health risk coefficients are extracted from user health profiles. Based on these health risk coefficients, the applicable population tags corresponding to each nutritional node of the ingredients in the public welfare meal supply ingredient library are matched and screened to obtain the initial screening ingredient library.

[0145] Nutritional constraint nodes are obtained based on user health data nodes. These nodes include a restricted nutrient set and a recommended nutrient set. The restricted nutrient set contains multiple restricted nutrients, and the recommended nutrient set contains multiple recommended nutrients.

[0146] The nutrient vector corresponding to each nutrient node in the initial screening nutrient database is tested using the restricted nutrient set to obtain the test result, which is either pass or fail. If the test result is confirmed to be pass, the nutrient node of the food is confirmed as a compliant food node.

[0147] The compliant food nodes are summarized to obtain a set of compliant food nodes. The suitability of each compliant food node in the set of compliant food nodes is calculated using the recommended nutrient component set to obtain a set of suitability values. The set of suitability values ​​contains multiple suitability values, and each suitability value corresponds one-to-one with a compliant food node.

[0148] Sort the fitness values ​​in the fitness value set in descending order to obtain the fitness value sequence;

[0149] Using a preset adaptation number threshold, e adaptation values ​​are extracted from the adaptation sequence, where e is the adaptation number threshold.

[0150] Using e adaptation values, a set of user-adaptable ingredients is selected from the set of compliant ingredient nodes, wherein the number of compliant ingredient nodes in the set of user-adaptable ingredients is the adaptation quantity threshold.

[0151] Understandably, the process of matching and filtering the applicable population tags corresponding to each nutritional node of the public welfare meal supply ingredient library is as follows: traverse each nutritional node of the public welfare meal supply ingredient library, determine whether its applicable population tag matches the population corresponding to the health risk coefficient, and if a match is found, include the ingredient corresponding to that nutritional node in the initial screening ingredient library. The initial screening ingredient library is a set of usable ingredients selected after preliminary matching based on the health risk coefficient and the applicable population tags of the ingredients. The nutritional constraint node is a set of nutritional intake constraint rules set according to the user's health data node, including two parts: a set of restricted nutrients and a set of recommended nutrients. Recommended nutrients are those that the user should prioritize supplementing or increasing their intake of. Restricted nutrients are those that the user should control their intake of. For example, user 001's health data node is: (Body Mass Index -22.1, Systolic Blood Pressure -118 mmHg, Fasting Blood Glucose -5.0 mmol / L, Total Cholesterol -4.2 mmol / L). Currently, all health indicators are within the normal range. Therefore, a nutritional constraint node is generated: the restricted nutrient set is: Sodium ≤2000mg / meal, Fat ≤22g / meal, and the recommended nutrient set is: Dietary Fiber ≥25g / meal, High-Quality Protein ≥30g / meal.

[0152] For example, the process of using a restricted nutrient set to verify the nutrient vector corresponding to each nutrient node in the initial screening food ingredient library is as follows: Taking the nutrient node corresponding to chicken breast as an example, its nutrient vector is represented in the order of protein, sodium, fat, water, and carbohydrates as [23.3, 0.06, 1.7, 65, 1.2] (unit: g / 100g). During the verification, the food content needs to be converted into the actual intake based on the preset per-meal amount (e.g., 100g): consuming 100g of chicken breast per meal will result in an intake of 60mg of sodium (less than the single-meal threshold of 2000mg / meal) and 1.7g of fat (less than the single-meal threshold of 22g / meal), both within the limits. The verification result is passed, and the nutrient node corresponding to chicken breast is confirmed as a compliant food ingredient node. The compliant food ingredient node is the nutrient node that has passed the restricted nutrient set verification.

[0153] Furthermore, to quantitatively evaluate the effectiveness of each compliant food ingredient node in meeting users' nutritional needs, and thus select the best-chosen ingredients for user health from among many available ingredients, the following process is employed: The fitness score is calculated for each compliant food ingredient node in the compliant food ingredient node set using a recommended nutrient composition set, resulting in a fitness score set, including:

[0154] The recommended intake for each recommended nutrient in the recommended nutrient set is determined to obtain the recommended intake set, where the recommended intake corresponds one-to-one with the recommended nutrient.

[0155] The compliant food nodes are extracted sequentially from the compliant food node set, and the nutrient vectors are extracted from the compliant food nodes. Using the recommended nutrient set, the nutrient content of the food is retrieved from the nutrient vector to obtain the nutrient content set of the food, wherein the nutrient content of the food corresponds one-to-one with the recommended nutrient.

[0156] The fitness value is calculated based on the recommended intake set and the nutritional content set of the ingredients. The calculation formula is as follows:

[0157]

[0158] in, This indicates the fitness value. Indicates shared ownership One recommended nutritional component, Indicates the preset first The weighting coefficients for each recommended nutrient component. Indicates the first The recommended nutritional components correspond to the nutritional content of the ingredients. Indicates the first Recommended intake for each of the recommended nutrients. This indicates the preset target serving size.

[0159] Summarize the fit values ​​to obtain a set of fit values.

[0160] It should be explained that the recommended intake is the daily recommended intake target value corresponding to the recommended nutrient (e.g., dietary fiber ≥25g / day, calcium ≥800mg / day). The nutrient content of the food is the corresponding content value retrieved from the nutrient vector of the compliant food node according to the recommended nutrient. The fit value is used to quantify the degree of matching between the nutrient content of the compliant food node and the user's recommended nutrient; the higher the fit value, the more it meets the user's nutritional supplementation needs. The weight coefficient is a value used to characterize the importance of a certain recommended nutrient in the user's personalized nutritional needs, and can be set according to the user's health data nodes and in combination with expert rules. The single target consumption amount is the preset planned total amount (unit: grams) of a certain compliant food in a single meal, used to convert the nutrient content of the food (per 100 grams) into the actual intake of a single meal, and can be determined according to the food category, meal arrangement, and public welfare meal standard quota.

[0161] It should be understood that the fitness sequence is an ordered list obtained by arranging the fitness values ​​in the fitness value set from largest to smallest. The fitness quantity threshold is a pre-set upper or lower limit value for the number of ingredients to be output to the user, used to control the size of the final recommended ingredient set. It can be set according to user preferences or business rules (e.g., recommending no more than 5 kinds of ingredients per meal). This embodiment of the invention ensures the safety and compliance of ingredients through a three-step screening process: initial screening of health risk coefficients, testing of restricted components, and quantification of recommended component fitness. It also prioritizes recommending ingredients that best meet the user's nutritional needs, thereby improving the scientific nature and efficiency of meal planning and achieving personalized and precise public welfare meal planning.

[0162] S4. Based on the user-suitable food set and user health profile, construct a set of nutritional complementarity relationships. Use the set of nutritional complementarity relationships to optimize the combination of the user-suitable food set to obtain d optional meal combinations, where d is an integer greater than 1.

[0163] It should be explained that the construction of a set of nutritional complementarity relationships based on the user-adapted food set and the user's health profile includes:

[0164] Extract normalized indicator vectors and health risk coefficients from user health profiles, and obtain nutrient intake range nodes based on the health risk coefficients. The nutrient intake range nodes include the intake ranges of multiple nutrients.

[0165] The nutrient intake range node is adjusted in a personalized manner using a normalized index vector to obtain the adjusted nutrient intake range node.

[0166] Based on the adjusted nutrient intake range node and the nutrient component vectors corresponding to the compliant food node in the user's suitable food set, a set of nutrient complementarity relationships is constructed.

[0167] Understandably, the process of obtaining nutrient intake range nodes based on the health risk coefficient involves: matching the appropriate intake range for each nutrient under the corresponding risk coefficient according to the user's health risk coefficient, forming a structured set of nodes with nutrient type as the dimension and upper and lower limits of intake as values. The nutrient intake range node is a dataset containing intake ranges for multiple nutrients, where each nutrient intake range is a recommended intake range set for different nutrients (such as protein, fat, vitamins, etc.). For example: Suppose a user's health risk coefficient is 0.7, and after risk level mapping, it is determined to be of medium to high risk. Match the baseline intake range corresponding to this risk level, such as the recommended intake of 15 to 25 grams of protein, 10 to 15 grams of fat, and 10 to 20 grams of carbohydrates per meal. That is, the nutrient intake range node is represented as: {protein - [15g, 25g], fat - [10g, 15g], carbohydrates - [10g, 20g]}, where [15g, 25g], [10g, 15g], and [10g, 20g] represent the nutrient intake range corresponding to protein, fat, and sodium, respectively.

[0168] It needs to be explained that the process of using the normalized index vector to personalize the nutrient intake range nodes and obtain the adjusted nutrient intake range nodes is as follows: Based on the positional relationship (high, low, or normal) between each normalized index value in the normalized index vector and its corresponding normal reference range for health indicators, the adjustment direction and magnitude of each nutrient component are determined, thus obtaining the adjusted nutrient intake range node. For example, a user's normalized index vector is blood glucose 0.8 and blood lipid 0.3, where the normal reference range for blood glucose is [0.4, 0.6] and the normal reference range for blood lipid is [0.2, 0.5]. Thus, it is determined that blood glucose is high and blood lipid is normal. Since blood glucose is high, carbohydrate intake needs to be reduced. Since blood lipid is normal, the intake of fat and protein is not adjusted. The nutrient intake range of carbohydrates [15g, 30g] is reduced to [10g, 20g], while the nutrient intake range of fat and protein remains unchanged. It should be clarified that the specific adjustment degree can be set based on the degree to which the normalized index value is higher or lower than the normal reference range for health indicators. For example, when the normalized blood glucose value is 0.8 (normal reference range [0.4, 0.6]), its degree of excess is (0.8-0.6) / 0.6=1 / 3. The carbohydrate intake range can be adjusted downwards proportionally from [15g, 30g]. For example, for every 1 / 3 increase in the normalized index value, the corresponding nutrient intake range should be adjusted downwards by 1 / 3, thus obtaining an adjustment result of [10g, 20g]. The nutrient intake range adjustment node mentioned is the nutrient intake range node corrected using the normalized index vector.

[0169] Specifically, the step of constructing a set of nutritional complementarity relationships based on the nutritional component vectors corresponding to the nodes for adjusting the nutritional intake range and the compliant food nodes in the user-suitable food set includes:

[0170] The target nutrient vector is obtained based on the node of adjusting nutrient intake range. The target nutrient vector is a vector composed of the median of the intake range of each nutrient in the node of adjusting nutrient intake range, and the target nutrient vector contains the median corresponding to each nutrient.

[0171] For each compliant ingredient node in the user-adapted ingredient set, perform the following operations:

[0172] Calculate the difference vector between the nutrient component vector corresponding to the compliant food ingredient node and the target nutrient vector to obtain the nutrient difference vector. Summarize the nutrient difference vectors to obtain the nutrient difference vector set, wherein the nutrient difference vector contains the nutrient difference value corresponding to each nutrient component.

[0173] In a combined manner, the nutrient difference vectors in the nutrient difference vector set are paired up to obtain multiple nutrient difference vector pairs. For each of these multiple nutrient difference vector pairs, the following operation is performed:

[0174] The complementarity is calculated based on the nutrient difference vector, using the following formula:

[0175]

[0176] in, Indicates the degree of complementarity, This represents the total quantity of all nutrients in the target nutrient vector. Indicates the first The compliant food ingredient node at the first Nutritional differences in various nutrients Indicates the first The compliant food ingredient node at the first Nutritional differences in various nutrients This indicates taking the absolute value. () indicates taking the minimum value. () indicates a preset difference indicator function, which returns 1 when the condition is met, and 0 otherwise;

[0177] By summing up the aforementioned complementarity, a set of nutritional complementarity relationships is obtained.

[0178] It should be explained that the target nutrient vector is a vector composed of the median values ​​of the intake ranges of each nutrient. The nutrient difference vector is a vector composed of the differences between the nutrient vectors of the food ingredients and the target nutrient vector in each nutrient dimension. The nutrient difference vector pair is a vector combination composed of any two different nutrient difference vectors in the nutrient difference vector set. The complementarity is a quantitative indicator used to measure the degree to which the two nutrient difference vectors in a nutrient difference vector pair complement each other and match in each nutrient. The greater the complementarity, the stronger the complementarity of the two food ingredients corresponding to the nutrient difference vector pair in terms of nutrient components. The combination of the two can more effectively reduce the overall deviation from the target nutrient vector, resulting in a better nutritional combination effect. The set of nutrient complementarity relationships is a set composed of multiple complementarity degrees. Among them, the difference indicator function is used to determine whether the nutrient difference values ​​of two food ingredients in the same nutrient component meet the complementarity condition. When the positive and negative directions of the two nutrient difference values ​​are opposite and can cancel each other out, it is determined that the complementarity condition is met, and the difference indicator function returns 1; otherwise, it returns 0. This is used to screen out nutrients with nutritional complementarity potential and participate in the complementarity calculation.

[0179] For example, suppose in the node for adjusting nutrient intake range: the nutrient intake range corresponding to the first nutrient is [40g, 60g], and the nutrient intake range corresponding to the second nutrient is [30g, 70g]. After normalization, the nutrient intake range corresponding to the first nutrient is [0.4, 0.6], and the nutrient intake range corresponding to the second nutrient is [0.3, 0.7]. Taking the median of each, we get the target nutrient vector as [0.5, 0.5]. If the nutrient vector of compliant food node A is [0.8, 0.2], subtracting it from the target nutrient vector gives the nutrient difference vector as [0.3, -0.3]. If the nutrient vector of compliant food node B is [0.2, 0.7], subtracting it from the target vector gives the difference vector as [-0.3, 0.2]. When calculating the complementarity between the two components, for the first nutrient, the two difference values ​​0.3 and -0.3 in the nutrient difference vector have opposite signs, so the smaller absolute value of 0.3 is taken. For the second nutrient, the two difference values ​​-0.3 and 0.2 in the nutrient difference vector have opposite signs, so the smaller absolute value of 0.2 is taken. The numerator is the sum of the two, 0.5. The denominator is the sum of the absolute values ​​of all component differences, i.e., (0.3 + 0.3) plus (0.3 + 0.2) equals 1.1. Therefore, the complementarity is 0.5 divided by 1.1, which is approximately 0.455. This means that about 45.5% of the nutrient deviations between compliant ingredient node A and compliant ingredient node B can be offset by pairing them together.

[0180] It is important to clarify that when creating personalized nutritional meal plans for users, simply combining ingredients randomly from a large pool not only offers too many options but also easily leads to nutritional imbalances and failure to meet the user's nutritional needs. Therefore, it is necessary to first group the ingredients according to their complementary nutritional characteristics to reduce ineffective combinations. Then, an optimization algorithm is used to adjust the amount of each ingredient to make the overall nutrition closer to the user's target needs. Finally, multiple relatively suitable meal plans are selected based on the degree of nutritional matching. Therefore, the optimization of the user's suitable ingredient set using a set of complementary nutritional relationships yields d optional meal combinations, including:

[0181] By using the set of nutritional complementarity relationships, the compliant food nodes in the user's suitable food set are grouped into complementary groups to obtain z food complementary groups, where each food complementary group contains multiple foods.

[0182] Using a preset extraction method, one ingredient is extracted from each of the z complementary ingredient groups to obtain an initial meal combination, wherein the initial meal combination contains z kinds of ingredients;

[0183] Using a pre-constructed multi-objective genetic optimization algorithm, the ratio of z ingredients in the initial meal combination is optimized based on the target nutrient vector to obtain optimized ratio nodes. The optimized ratio nodes include ingredient identifiers and corresponding ratios, and each optimized ratio node corresponds one-to-one with the initial meal combination.

[0184] Once the comprehensive nutrient vector corresponding to the optimized ratio node is identified, the deviation distance between the comprehensive nutrient vector and the target nutrient vector is calculated to obtain the nutrient deviation value.

[0185] If the nutritional deviation value is less than the preset nutritional deviation threshold, the initial meal combination corresponding to the optimized ratio node is the optional meal combination;

[0186] Summarize the available meal combinations to obtain d possible meal combinations.

[0187] Understandably, the process of grouping compliant food nodes in the user-suitable food set using a set of complementary nutritional relationships involves: based on the complementarity in the personalized nutritional needs plan, foods with low complementarity are grouped into the same group, and foods with high complementarity are grouped into different groups, forming multiple food complementarity groups. For example, suppose there are food A, food B, food C, food D, and food E. Suppose that the complementarity of food A, food B, food C, food D, and food E is very low, and the complementarity of food A with food B, food B with food C, food A with food B, and food D with food E is relatively high. Therefore, food A, food B, and food C can be grouped into food complementarity group 1, and food D and food E can be grouped into food complementarity group 2. The food complementarity groups are food sets obtained by clustering based on the complementarity between each compliant food node in the user-suitable food set.

[0188] In detail, the extraction method involves extracting one ingredient from each complementary ingredient group. The initial meal combination is formed by selecting one ingredient from each complementary ingredient group. For example, given the above example complementary ingredient group 1 - {Ingredient A, Ingredient B, Ingredient C} and complementary ingredient group 2 - {Ingredient D, Ingredient E}, extracting Ingredient A from complementary ingredient group 1 and Ingredient D from complementary ingredient group 2 yields the initial meal combination [Ingredient A, Ingredient D]. Similarly, other initial meal combinations can be obtained. The multi-objective genetic optimization algorithm is an optimization algorithm used to simultaneously optimize multiple mutually constrained objectives. In this embodiment of the invention, the multi-objective genetic optimization algorithm takes minimizing the deviation between the comprehensive nutrient vector and the target nutrient vector as the core optimization objective, and optimizes the z ingredients in the initial meal combination to obtain the ratio of z ingredients that best matches the target nutrient vector under the constraint of satisfying nutritional balance. The optimized ratio node is a data unit of z ingredients and their corresponding ratio, for example: {Ingredient A - 100g, Ingredient B - 50g, Ingredient C - 50g}. The comprehensive nutrition vector is the sum of the nutrient component vectors of each ingredient in the optimized ratio node. It is used to characterize the overall nutrient content provided by the initial meal combination and corresponds one-to-one with the dimension of the target nutrition vector.

[0189] Furthermore, the nutritional deviation value is a quantitative difference between the comprehensive nutritional vector and the target nutritional vector, used to characterize the degree of deviation between the overall nutritional supply of the initial meal combination and the user's personalized nutritional needs. Optionally, the nutritional deviation value is obtained by calculating the Euclidean distance between the comprehensive nutritional vector and the target nutritional vector. The nutritional deviation threshold is a pre-set upper limit for the nutritional deviation value, used to determine whether the overall nutritional supply of the initial meal combination meets the standard. Optionally, the nutritional deviation threshold can be dynamically set according to the strictness of the user's personalized nutritional needs. The optional meal combination is an initial meal combination with a nutritional deviation value less than the nutritional deviation threshold that meets the user's personalized nutritional needs. It should be noted that in the nutritional intake analysis and personalized adjustment constructed in this embodiment of the invention, the situation of food incompatibility is not considered, that is, it is assumed that there is no interaction between different nutrients or ingredients due to combination, such as absorption inhibition, toxicity enhancement, or nutrient utilization reduction. The adjustment of all nutritional intake range nodes is based on the influence of a single nutrient on health indicators and the degree to which the health indicator deviates from the normal range.

[0190] S5. Send the d optional meal combinations to the initiator of the meal preparation instruction to realize personalized public welfare meal preparation based on the user's health profile.

[0191] It should be explained that the initiator of the meal preparation instruction is a user or APP used to issue the instruction and receive the results (d optional meal combinations). This embodiment of the invention reduces the search complexity of meal combinations by constructing a set of complementary nutritional relationships to group ingredients in a complementary manner, avoiding ineffective combinations. Furthermore, it utilizes a multi-objective genetic optimization algorithm to optimize the ingredient ratios in the initial meal combinations, minimizing the deviation between the comprehensive nutritional vector and the target nutritional vector. By filtering out multiple acceptable optional meal combinations through a nutritional deviation threshold, it achieves efficient, accurate, and intelligent personalized nutritional meal planning.

[0192] To address the problems described in the background art, this invention receives a meal preparation instruction and identifies n user health data nodes based on the instruction. Each user health data node includes m health indicator values ​​and m health indicators, with a one-to-one correspondence between the health indicator values ​​and health indicators. Each user health data node is also identified by a user ID. Based on the n user health data node sets, n user health profiles are constructed, with each user health profile corresponding to a user ID. This invention uses the second-order difference of the sum of squared clustering errors to determine the optimal target cluster size, reducing grouping bias that may result from manually specifying the cluster size, thus improving the objectivity and accuracy of health risk classification. A public welfare meal preparation ingredient library is obtained, which includes multiple ingredient nutrition nodes, each comprising an ingredient identifier, a nutrient vector, and an applicable population label. The user health profiles are used to filter and match the public welfare meal preparation ingredient library to obtain a user-suitable ingredient set. This invention utilizes the initial health risk coefficient... This invention employs a three-step screening process: screening, restriction component testing, and quantification of recommended component suitability. This ensures food safety and compliance, and prioritizes recommending ingredients that best meet the user's nutritional needs, improving the scientific rigor and efficiency of meal planning and achieving personalized and precise public welfare meal planning. Based on the user-suitable ingredient set and the user's health profile, a set of complementary nutritional relationships is constructed. This set of complementary nutritional relationships is then used to optimize the combination of the user-suitable ingredient set, resulting in d optional meal combinations, where d is an integer greater than 1. These d optional meal combinations are then sent to the initiator of the meal planning instruction, realizing personalized public welfare meal planning based on the user's health profile. It is evident that this invention reduces the search complexity of meal combinations by constructing a set of complementary nutritional relationships to group ingredients, avoiding ineffective combinations. Furthermore, a multi-objective genetic optimization algorithm is used to optimize the ingredient ratios in the initial meal combinations, minimizing the deviation between the comprehensive nutritional vector and the target nutritional vector. Multiple optional meal combinations that meet the requirements are selected through a nutritional deviation threshold, achieving efficient, accurate, and intelligent personalized nutritional meal planning. Therefore, this invention can achieve efficient, accurate, and intelligent personalized nutritional meal planning.

[0193] like Figure 2The diagram shown is a functional block diagram of a personalized public welfare meal delivery system based on user health profiles provided in an embodiment of the present invention.

[0194] The personalized public welfare meal distribution system 100 based on user health profiles described in this invention can be installed in an electronic device. Depending on the functions implemented, the personalized public welfare meal distribution system 100 based on user health profiles may include a health data acquisition module 101, a health profile construction module 102, a user ingredient matching module 103, and a meal distribution optimization module 104. The modules described in this invention can also be referred to as units, which are a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.

[0195] The health data acquisition module 101 is used to receive meal preparation instructions and identify n user health data nodes based on the meal preparation instructions. Each user health data node includes m health indicator values ​​and m health indicators. The health indicator values ​​and health indicators correspond one-to-one, and each user health data node is identified by a user number.

[0196] The health profile construction module 102 is used to construct n user health profiles based on n user health data node sets, wherein each user health profile corresponds one-to-one with a user ID.

[0197] The user food ingredient matching module 103 is used to obtain a public welfare meal ingredient library, wherein the public welfare meal ingredient library includes multiple food nutrition nodes, and the food nutrition nodes include: food identifier, nutritional component vector and applicable population tag. The public welfare meal ingredient library is filtered and matched using the user health profile to obtain a user-matched food ingredient set.

[0198] The meal optimization module 104 is used to construct a set of nutritional complementarity relationships based on the user-suitable ingredient set and the user health profile, and to optimize the combination of the user-suitable ingredient set using the set of nutritional complementarity relationships to obtain d optional meal combinations, where d is an integer greater than 1.

[0199] The d optional meal combinations are sent to the initiator of the meal preparation instruction to realize personalized public welfare meal preparation based on the user's health profile.

[0200] In detail, the modules in the personalized public welfare meal delivery system 100 based on user health profiles described in this embodiment of the invention employ the same methods as described above. Figure 1 The method uses the same technical means as the personalized public welfare meal delivery method based on user health profiles described in the article, and can produce the same technical effect, so it will not be elaborated here.

[0201] like Figure 3The diagram shown is a structural schematic of an electronic device that implements a personalized public welfare meal delivery method based on a user's health profile, according to an embodiment of the present invention.

[0202] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and capable of running on the processor 10, such as a personalized public welfare meal planning method program based on a user's health profile.

[0203] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as the portable hard drive of the electronic device 1. In other embodiments, the memory 11 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 1. Furthermore, the memory 11 includes both internal storage units and external storage devices of the electronic device 1. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of a personalized public welfare meal planning method program based on user health profiles, but also to temporarily store data that has been output or will be output.

[0204] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., personalized public welfare meal planning methods based on user health profiles) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0205] The bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 can be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize the connection and communication between the memory 11 and at least one processor 10, etc.

[0206] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0207] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0208] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device 1 and other electronic devices.

[0209] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual user interface.

[0210] The personalized public welfare meal planning method program based on the user's health profile, stored in the memory 11 of the electronic device 1, is a combination of multiple instructions. When run in the processor 10, it can achieve the following:

[0211] Upon receiving a meal preparation instruction, n user health data nodes are identified based on the meal preparation instruction. Each user health data node includes m health indicator values ​​and m health indicators, wherein the health indicator values ​​and health indicators correspond one-to-one, and each user health data node is identified by a user number.

[0212] Based on a set of n user health data nodes, construct n user health profiles, where each user health profile corresponds one-to-one with a user ID.

[0213] For each user health profile in the set of n user health profiles, perform the following operations:

[0214] Obtain a public welfare meal supply ingredient library, which includes multiple ingredient nutrition nodes, including ingredient identifier, nutrient vector and applicable population tag. Use the user health profile to filter and match the public welfare meal supply ingredient library to obtain a set of ingredients suitable for the user.

[0215] Based on the user-suitable food set and user health profile, a set of nutritional complementarity relationships is constructed. The set of nutritional complementarity relationships is used to optimize the combination of the user-suitable food set to obtain d optional meal combinations, where d is an integer greater than 1.

[0216] The d optional meal combinations are sent to the initiator of the meal preparation instruction to realize personalized public welfare meal preparation based on the user's health profile.

[0217] Specifically, the processor 10's implementation method for the above instructions can be found in [reference needed]. Figures 1 to 3 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0218] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0219] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0220] Upon receiving a meal preparation instruction, n user health data nodes are identified based on the meal preparation instruction. Each user health data node includes m health indicator values ​​and m health indicators, wherein the health indicator values ​​and health indicators correspond one-to-one, and each user health data node is identified by a user number.

[0221] Based on a set of n user health data nodes, construct n user health profiles, where each user health profile corresponds one-to-one with a user ID.

[0222] For each user health profile in the set of n user health profiles, perform the following operations:

[0223] Obtain a public welfare meal supply ingredient library, which includes multiple ingredient nutrition nodes, including ingredient identifier, nutrient vector and applicable population tag. Use the user health profile to filter and match the public welfare meal supply ingredient library to obtain a set of ingredients suitable for the user.

[0224] Based on the user-suitable food set and user health profile, a set of nutritional complementarity relationships is constructed. The set of nutritional complementarity relationships is used to optimize the combination of the user-suitable food set to obtain d optional meal combinations, where d is an integer greater than 1.

[0225] The d optional meal combinations are sent to the initiator of the meal preparation instruction to realize personalized public welfare meal preparation based on the user's health profile.

[0226] In the embodiments provided by this invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and actual implementations may have other classification methods.

[0227] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0228] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0229] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0230] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A personalized public welfare meal delivery method based on user health profiles, characterized in that, The method includes: Upon receiving a meal preparation instruction, n user health data nodes are identified based on the meal preparation instruction. Each user health data node includes m health indicator values ​​and m health indicators, wherein the health indicator values ​​and health indicators correspond one-to-one, and each user health data node is identified by a user number. Based on a set of n user health data nodes, construct n user health profiles, where each user health profile corresponds one-to-one with a user ID. For each user health profile in the set of n user health profiles, perform the following operations: Obtain a public welfare meal supply ingredient library, which includes multiple ingredient nutrition nodes, including ingredient identifier, nutrient vector and applicable population tag. Use the user health profile to filter and match the public welfare meal supply ingredient library to obtain a set of ingredients suitable for the user. Based on the user-suitable food set and user health profile, a set of nutritional complementarity relationships is constructed. The set of nutritional complementarity relationships is used to optimize the combination of the user-suitable food set to obtain d optional meal combinations, where d is an integer greater than 1. The d optional meal combinations are sent to the initiator of the meal preparation instruction to realize personalized public welfare meal preparation based on the user's health profile.

2. The personalized public welfare meal delivery method based on user health profiles as described in claim 1, characterized in that, The construction of n user health profiles based on a set of n user health data nodes includes: Health indicators are extracted sequentially from the m health indicators. Using the health indicators, n health indicator values ​​are retrieved from n user health data nodes. Each health indicator value is identified by a user ID. Sort the n health indicator values ​​in ascending order of user ID to obtain a health indicator value sequence. Perform normalization processing on the health indicator value sequence to obtain a normalized indicator value sequence, where the normalized indicator value sequence contains multiple normalized indicator values. By summing the normalized index value sequences, we obtain m normalized index value sequences. Reorganize m normalized index value sequences according to user IDs to obtain n normalized index vectors, where each normalized index vector corresponds one-to-one with a user ID. The target number of clusters is determined based on n normalized index vectors. The target number of clusters is then used to cluster the n normalized index vectors to obtain multiple health feature cluster groups. The number of multiple health feature cluster groups is the target number of clusters. For each of the multiple health feature clusters, perform the following operation: Calculate the cluster center vector corresponding to the health feature cluster group to obtain the cluster center index vector, where the cluster center vector contains the mean of m normalized indices; Based on the cluster center index vector, the health risk coefficient is obtained, and the health risk coefficient is used to identify health feature clusters to obtain identified clusters. The identified clusters are then summarized to obtain multiple identified clusters. For each of the n normalized index vectors, perform the following operation: Based on the user ID corresponding to the normalized index vector, the identifier cluster group corresponding to the normalized index vector is identified among multiple identifier cluster groups, and the health risk coefficient corresponding to the identifier cluster group is taken as the health risk coefficient corresponding to the normalized index vector. By associating the normalized indicator vector, health risk coefficient, and user ID, a user health profile is obtained. By summing the user health profiles, n user health profiles are obtained.

3. The personalized public welfare meal delivery method based on user health profiles as described in claim 2, characterized in that, The process of obtaining the health risk coefficient based on the cluster center indicator vector includes: The normalized index mean is extracted sequentially from m normalized index mean values. The corresponding index value interval is determined based on the normalized index mean values, resulting in m index value intervals. The normalized index mean values ​​correspond one-to-one with the index value intervals, and the index value intervals include the lower limit and the upper limit of the interval. The health risk coefficient is calculated based on the mean of m normalized indicators and the range of m indicator values. The calculation formula is as follows: in, This represents the health risk coefficient. Indicates shared ownership The normalized index mean, Represents the m-th normalized index mean. The normalized index mean, Indicates the first The upper limit of the interval of the index value corresponding to the mean of each normalized index. Indicates the first The lower limit of the interval of indicator values ​​corresponding to the mean of each normalized indicator. () indicates taking the minimum value. This indicates taking the absolute value. () indicates a preset indicator function that returns 0 if the condition is met, otherwise returns 1.

4. The personalized public welfare meal delivery method based on user health profile as described in claim 3, characterized in that, The determination of the target cluster size based on n normalized index vectors includes: Given a set number of candidate clusters, perform the following operation on each of the a candidate clusters: Clustering operations are performed on n normalized index vectors using the number of candidate clusters to obtain multiple candidate cluster groups, where each candidate cluster group contains multiple normalized index vectors. For each of the multiple candidate cluster groups, perform the following operation: Calculate the cluster center vector of the normalized index vector in the candidate cluster group to obtain the candidate center vector. Calculate the squared distance between each normalized index vector in the candidate cluster group and the candidate center vector to obtain multiple squared distance values. Sum the multiple squared distance values ​​to obtain the sum of squared errors within the group. Sum the sums of squared errors within groups to obtain multiple sums of squared errors within groups. Summate these multiple sums of squared errors to obtain the sum of squared clustering errors. The sums of the clustering errors are summarized to obtain multiple clustering error sums of squares, wherein each clustering error sum corresponds one-to-one with the number of candidate clusters. The multiple clustering error sums of squares are sorted in ascending order of the number of candidate clusters to obtain a clustering error sum sequence. The reference clustering error sum of squares is extracted sequentially from the clustering error sum of squares sequence from front to back. Using the reference clustering error sum of squares, the comparative clustering error sum of squares is identified from the clustering error sum of squares sequence. The comparative clustering error sum of squares is adjacent in the clustering error sum of squares sequence and lags behind the reference clustering error sum of squares in the clustering error sum of squares sequence. The absolute difference between the reference clustering error sum of squares and the comparison clustering error sum of squares is calculated to obtain the first-order absolute difference, wherein the number of candidate clusters corresponding to the first-order absolute difference is the number of candidate clusters corresponding to the reference clustering error sum of squares. Summarize the first-order absolute differences to obtain a-1 first-order absolute differences. Sort the a-1 first-order absolute differences in order of the number of candidate clusters from smallest to largest to obtain the first-order absolute difference sequence. The reference first-order absolute difference is extracted sequentially from the first-order absolute difference sequence in order from front to back. Using the reference first-order absolute difference, the comparison first-order absolute difference is identified from the first-order absolute difference sequence. The comparison first-order absolute difference is adjacent to and lags behind the reference first-order absolute difference in the first-order absolute difference sequence. The absolute difference between the reference first-order absolute difference and the comparison first-order absolute difference is calculated to obtain the second-order absolute difference, wherein the number of candidate clusters corresponding to the second-order absolute difference is the same as the number of candidate clusters corresponding to the reference first-order absolute difference. By summing the second-order absolute differences, we obtain a-2 cluster absolute differences; The largest absolute difference among the a-2 clusters is selected, and the number of candidate clusters corresponding to the largest absolute difference is determined as the target number of clusters.

5. The personalized public welfare meal delivery method based on user health profile as described in claim 4, characterized in that, The process of using the user's health profile to filter and match ingredients from the public welfare meal preparation database to obtain a set of suitable ingredients for the user includes: Health risk coefficients are extracted from user health profiles. Based on these health risk coefficients, the applicable population tags corresponding to each nutritional node of the ingredients in the public welfare meal supply ingredient library are matched and screened to obtain the initial screening ingredient library. Nutritional constraint nodes are obtained based on user health data nodes. These nodes include a restricted nutrient set and a recommended nutrient set. The restricted nutrient set contains multiple restricted nutrients, and the recommended nutrient set contains multiple recommended nutrients. The nutrient vector corresponding to each nutrient node in the initial screening nutrient database is tested using the restricted nutrient set to obtain the test result, which is either pass or fail. If the test result is confirmed to be pass, the nutrient node of the food is confirmed as a compliant food node. The compliant food nodes are summarized to obtain a set of compliant food nodes. The suitability of each compliant food node in the set of compliant food nodes is calculated using the recommended nutrient component set to obtain a set of suitability values. The set of suitability values ​​contains multiple suitability values, and each suitability value corresponds one-to-one with a compliant food node. Sort the fitness values ​​in the fitness value set in descending order to obtain the fitness value sequence; Using a preset adaptation number threshold, e adaptation values ​​are extracted from the adaptation sequence, where e is the adaptation number threshold. Using e adaptation values, a set of user-adaptable ingredients is selected from the set of compliant ingredient nodes, wherein the number of compliant ingredient nodes in the set of user-adaptable ingredients is the adaptation quantity threshold.

6. The personalized public welfare meal delivery method based on user health profile as described in claim 5, characterized in that, The process of calculating the fit of each compliant food node in the compliant food node set using the recommended nutrient component set to obtain a fit value set includes: The recommended intake for each recommended nutrient in the recommended nutrient set is determined to obtain the recommended intake set, where the recommended intake corresponds one-to-one with the recommended nutrient. The compliant food nodes are extracted sequentially from the compliant food node set, and the nutrient vectors are extracted from the compliant food nodes. Using the recommended nutrient set, the nutrient content of the food is retrieved from the nutrient vector to obtain the nutrient content set of the food, wherein the nutrient content of the food corresponds one-to-one with the recommended nutrient. The fitness value is calculated based on the recommended intake set and the nutritional content set of the ingredients. The calculation formula is as follows: in, This indicates the fitness value. Indicates shared ownership One recommended nutritional component, Indicates the preset first The weighting coefficients for each recommended nutrient component. Indicates the first The recommended nutritional components correspond to the nutritional content of the ingredients. Indicates the first Recommended intake for each of the recommended nutrients. This indicates the preset target serving size. Summarize the fit values ​​to obtain a set of fit values.

7. The personalized public welfare meal delivery method based on user health profiles as described in claim 6, characterized in that, The construction of a set of nutritional complementarity relationships based on the user-adapted food set and user health profile includes: Extract the normalized indicator vector and health risk coefficient from the user's health profile, and obtain the nutrition intake range node based on the health risk coefficient. The nutrition intake range node includes the intake range of multiple nutrients. The nutrient intake range node is adjusted in a personalized manner using a normalized index vector to obtain the adjusted nutrient intake range node. Based on the adjusted nutrient intake range node and the nutrient component vectors corresponding to the compliant food node in the user's suitable food set, a set of nutrient complementarity relationships is constructed.

8. The personalized public welfare meal delivery method based on user health profile as described in claim 7, characterized in that, The step of constructing a set of complementary nutrition relationships based on the nutritional component vectors corresponding to the nodes for adjusting the nutritional intake range and the compliant food nodes in the user-suitable food set includes: The target nutrient vector is obtained based on the node of adjusting nutrient intake range. The target nutrient vector is a vector composed of the median of the intake range of each nutrient in the node of adjusting nutrient intake range, and the target nutrient vector contains the median corresponding to each nutrient. For each compliant ingredient node in the user-adapted ingredient set, perform the following operations: Calculate the difference vector between the nutrient component vector corresponding to the compliant food node and the target nutrient vector to obtain the nutrient difference vector. Summarize the nutrient difference vectors to obtain the nutrient difference vector set, wherein the nutrient difference vector contains the nutrient difference value corresponding to each nutrient component. In a combined manner, the nutrient difference vectors in the nutrient difference vector set are paired up to obtain multiple nutrient difference vector pairs. For each of these multiple nutrient difference vector pairs, the following operation is performed: Complementarity is calculated based on the nutrient difference vector; By summing up the aforementioned complementarity, a set of nutritional complementarity relationships is obtained.

9. The personalized public welfare meal delivery method based on user health profile as described in claim 8, characterized in that, The method of combining and optimizing the user's suitable food set using a set of nutritional complementarity relationships yields d optional meal combinations, including: By using the set of nutritional complementarity relationships, the compliant food nodes in the user's suitable food set are grouped into complementary groups to obtain z food complementary groups, where each food complementary group contains multiple foods. Using a preset extraction method, one ingredient is extracted from each of the z complementary ingredient groups to obtain an initial meal combination, wherein the initial meal combination contains z kinds of ingredients; Using a pre-built multi-objective genetic optimization algorithm, the ratio of z ingredients in the initial meal combination is optimized based on the target nutrient vector to obtain optimized ratio nodes. The optimized ratio nodes include ingredient identifiers and corresponding ratios, and each optimized ratio node corresponds one-to-one with the initial meal combination. Once the comprehensive nutrient vector corresponding to the optimized ratio node is identified, the deviation distance between the comprehensive nutrient vector and the target nutrient vector is calculated to obtain the nutrient deviation value. If the nutritional deviation value is less than the preset nutritional deviation threshold, the initial meal combination corresponding to the optimized ratio node is the optional meal combination; Summarize the available meal combinations to obtain d possible meal combinations.

10. A personalized public welfare meal delivery system based on user health profiles, characterized in that, The system includes: The health data acquisition module is used to receive meal preparation instructions and identify n user health data nodes based on the meal preparation instructions. Each user health data node includes m health indicator values ​​and m health indicators. The health indicator values ​​and health indicators correspond one-to-one, and each user health data node is identified by a user number. The health profile building module is used to build n user health profiles based on n user health data node sets, where each user health profile corresponds one-to-one with a user ID. The user ingredient matching module is used to obtain the public welfare meal ingredient library, which includes multiple ingredient nutrition nodes, and the ingredient nutrition nodes include: ingredient identifier, nutrient component vector and applicable population tag. The public welfare meal ingredient library is filtered and matched using the user health profile to obtain the user-matched ingredient set. The meal planning optimization module is used to construct a set of nutritional complementarity relationships based on the user-suitable food set and the user's health profile, and to optimize the combination of the user-suitable food set using the set of nutritional complementarity relationships to obtain d optional meal plans, where d is an integer greater than 1. The d optional meal combinations are sent to the initiator of the meal preparation instruction to realize personalized public welfare meal preparation based on the user's health profile.