Chinese medicine diet therapy community user generated content (ugc) personalized recommendation method based on user's traditional chinese medical constitution

By constructing constitution vectors and retrieval vectors, calculating deviation coefficients, and dynamically allocating weights, the problem of inaccurate recommendations in TCM dietary therapy communities has been solved, achieving personalized and safe recommendations of dietary therapy content.

CN122157987APending Publication Date: 2026-06-05CHANGSHA FOUR SEASONS HEALTH BIOTECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHANGSHA FOUR SEASONS HEALTH BIOTECHNOLOGY CO LTD
Filing Date
2026-03-05
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing TCM dietary therapy communities are unable to accurately recommend matching content to users, which may exacerbate users' physical imbalances.

Method used

We construct constitution vectors and retrieval vectors, obtain the probability of a user's TCM constitution and the relevance of keyword text, calculate the deviation coefficient, dynamically allocate individual weights and quality weights, and recommend ranking by score.

Benefits of technology

It enables personalized recommendations for UGC content in the TCM dietary therapy community, improving the accuracy and security of recommendations and meeting the diverse needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157987A_ABST
    Figure CN122157987A_ABST
Patent Text Reader

Abstract

The application discloses a traditional Chinese medicine diet therapy community UGC personalized recommendation method based on user traditional Chinese medicine constitution, and relates to the technical field of big data mining. The method comprises the following steps: obtaining a constitution vector and a keyword text; obtaining a retrieval vector based on the keyword text; obtaining a deviation coefficient based on the constitution vector and the retrieval vector; obtaining recommendation scores of a plurality of target contents based on the deviation coefficient; and performing sorting recommendation on each target content based on each recommendation score. The application breaks through the limitation that traditional recommendation only depends on keyword semantic similarity, and integrates traditional Chinese medicine constitution core adaptation factors throughout the whole recommendation process, thereby significantly improving the personalization and accuracy of UGC content recommendation, guaranteeing the safety and effectiveness of diet therapy regulation, fully utilizing community UGC resources to meet the differentiated needs of users, and effectively solving the problem of insufficient recommendation accuracy in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of big data mining technology, specifically a personalized recommendation method for UGC in a TCM dietary therapy community based on users' TCM constitution. Background Technology

[0002] Traditional Chinese medicine (TCM) constitution is an important component of TCM's fundamental theories. TCM dietary therapy, based on TCM theory and the medicinal properties of food, uses rational food combinations to regulate and treat various ailments. In TCM dietary therapy communities, user-generated content (UGC) refers to content created and shared by users, such as dietary therapy experiences, recipe recommendations, and personal health stories. UGC provides a rich data source for recommendation systems, reflecting user interests, needs, and feedback.

[0003] Traditional Chinese medicine (TCM) dietary therapy communities, when providing search results (i.e., the target content mentioned below) based on users' keyword text, only consider the semantic similarity between the search results and the keyword text, failing to fully consider the core influencing factor of users' TCM constitution differences. Since the effectiveness of TCM dietary therapy highly depends on the compatibility between "constitution" and "dietary therapy," if the recommended content does not match the user's constitution, it not only fails to achieve the goal of regulating the body but may also exacerbate the constitution imbalance. For example, recommending heat-clearing and cooling dietary therapies to a user with a Yang deficiency constitution may lead to discomfort such as chills and diarrhea. In other words, current technology cannot accurately recommend target content to users. Summary of the Invention

[0004] The purpose of this application is to provide a personalized recommendation method for UGC in TCM dietary therapy communities based on users' TCM constitution, in order to solve the technical problem that existing technologies cannot accurately recommend target content to users.

[0005] To achieve the above objectives, this application provides the following technical solution: Personalized recommendation methods for TCM dietary therapy communities based on users' TCM constitution include: Obtain a constitution vector and keyword text; the constitution vector includes a first element value that corresponds one-to-one with each TCM constitution; the first element value is used to characterize at least the probability that the user belongs to the corresponding TCM constitution; the keyword text is obtained based on the user's search; the TCM constitution is a user's preset tag; Based on the keyword text, a retrieval vector is obtained; the retrieval vector includes a second element value that corresponds one-to-one with each TCM constitution; the second element value is used at least to characterize the correlation between the keyword text and the corresponding TCM constitution; Based on the body mass vector and the retrieval vector, a deviation coefficient is obtained; the deviation coefficient is used at least to characterize the magnitude of the difference between each first element value in the body mass vector and the corresponding second element value in the retrieval vector; Based on the deviation coefficient, recommendation scores are obtained for multiple target contents; each target content is obtained based on the keyword text retrieval. The content is ranked and recommended based on the recommendation scores.

[0006] As a specific solution in the technical solution of this application, the step of obtaining the body mass vector includes: Obtain a constitution score that corresponds one-to-one with various TCM constitutions; the constitution score is obtained based on the standard TCM constitution questionnaire filled out by the user. Based on the scores of each physical condition, a first score is obtained; the first score is the maximum value among the scores of each physical condition. Based on the first score and each physical fitness score, obtain the score ratio corresponding to each physical fitness score; the score ratio is the ratio of the corresponding physical fitness score to the first score; The physical fitness vector is obtained based on each score ratio.

[0007] As a specific solution in the technical solution of this application, the step of obtaining the retrieval vector based on the keyword text includes: Based on each target content, obtain the first quantity that corresponds one-to-one with each TCM constitution; the first quantity is the number of target contents that correspond to the TCM constitution in each target content. Iterate through all TCM constitutions and obtain the first constitution; the first constitution is any constitution among all TCM constitutions for which the corresponding second element value has not been obtained. Based on the first constitution, a second quantity and a third quantity are obtained; the second quantity is the first quantity corresponding to the first constitution; the third quantity is the sum of the first quantities corresponding to each TCM constitution; Based on the second quantity and the third quantity, a pointing weight is obtained; the pointing weight is positively correlated with a first ratio; the first ratio is the ratio of the second quantity to the third quantity. Based on the pointing weight, obtain the second element value corresponding to the first physique; After each TCM constitution has obtained its corresponding second element value, the retrieval vector is obtained.

[0008] As a specific solution in the technical solution of this application, the step of obtaining the pointing weight based on the second quantity and the third quantity includes: Obtain the second ratio and the coefficient of variation; the second ratio is the ratio of the third quantity to the quantity of each TCM constitution; the coefficient of variation is the coefficient of variation of the first quantity corresponding to each TCM constitution; Based on the second quantity and the second ratio, a first difference is obtained; the first difference is equal to the second quantity minus the second ratio; Based on the first difference and the third quantity, a third ratio is obtained; the third ratio is the ratio of the first difference to the third quantity. The pointing weight is obtained based on the coefficient of variation and the third ratio; the pointing weight is positively correlated with both the coefficient of variation and the third ratio.

[0009] As a specific solution in this application, the step of obtaining the second element value corresponding to the first physique based on the pointing weight includes: Based on the first constitution, a fourth quantity is obtained; the fourth quantity is the total number of all UGC content related to the first constitution in the TCM dietary therapy community. Based on the second quantity and the fourth quantity, a fourth ratio is obtained; the fourth ratio is the ratio of the second quantity to the fourth quantity. Based on the fourth ratio, a targeting coefficient is obtained; the targeting coefficient is positively correlated with the fourth ratio. Based on the pointing weight and the targeting coefficient, the second element value corresponding to the first physique is obtained.

[0010] As a specific solution in this application, obtaining the coefficient based on the fourth ratio includes: Obtain the fifth quantity; the fifth quantity is the sum of all UGC content corresponding to each TCM constitution in the TCM dietary therapy community; A fifth ratio is obtained based on the third quantity and the fifth quantity; the fifth ratio is the ratio of the third quantity to the fifth quantity. Based on the fourth ratio and the fifth ratio, a targeting coefficient is obtained; the targeting coefficient is positively correlated with the fifth ratio.

[0011] As a specific solution in this application, the values ​​of each element in the body mass vector are normalized; the values ​​of each element in the retrieval vector are also normalized; the step of obtaining the deviation coefficient based on the body mass vector and the retrieval vector includes: Based on the physical characteristics vector and the retrieval vector, the cosine similarity is obtained; Based on the cosine similarity, a deviation coefficient is obtained; the deviation coefficient and the cosine similarity are negatively correlated.

[0012] As a specific solution in this application, the step of obtaining the deviation coefficient based on the cosine similarity includes: Traverse the physical constitution vector and obtain the third element value; the third element value is any element value in the physical constitution vector for which no corresponding element difference value has been obtained. Based on the third element value, a fourth element value is obtained; the fourth element value is the element value in the retrieval vector that corresponds to the third element value. Based on the third element value and the fourth element value, a second difference is obtained; the second difference is equal to the absolute value of the difference between the third element value and the fourth element value. Based on the second difference and the sixth ratio, the element difference value corresponding to the third element value is obtained; the element difference value is positively correlated with the second difference and the sixth ratio; the sixth ratio is equal to the ratio of the fourth element value and the element average value; the element average value is equal to the average value of each element value in the retrieval vector. After each element value in the physical vector has a corresponding element difference value, the deviation coefficient is obtained based on the cosine similarity and the element difference values.

[0013] As a specific solution in this application, obtaining recommendation scores for multiple target contents based on the deviation coefficient includes: Based on the deviation coefficient, a personality weight and a quality weight are obtained; the personality weight is negatively correlated with the deviation coefficient, the quality weight is positively correlated with the deviation coefficient, and the sum of the personality weight and the quality weight is equal to 1. Iterate through each target content and obtain the current content; the current content is any content for each target content that has not obtained the corresponding recommendation score; Based on the current content, obtain relevant evaluation values ​​and quality evaluation values; the relevant evaluation values ​​are used at least to characterize the semantic similarity between the current content and the keyword text; the quality evaluation values ​​are used at least to characterize the degree to which the current content is recognized by other users; Based on the personality weight, the quality weight, the relevance evaluation value, and the quality evaluation value, a recommendation score for the current content is obtained; the recommendation score is positively correlated with the product of the personality weight and the relevance evaluation value; the recommendation score is also positively correlated with the product of the quality weight and the quality evaluation value.

[0014] As a specific solution in this application, based on the current content, obtaining a quality evaluation value includes: Based on the current content, obtain the number of likes, favorites, and comments; A quality evaluation value is obtained based on the number of likes, the number of favorites, and the number of comments.

[0015] Compared with the prior art, the beneficial effects of this application are: This application constructs a constitution vector to accurately quantify the probability that a user belongs to various TCM constitutions. It then combines this with the user's search keyword text to generate a search vector representing the relevance to the constitution, achieving a deep binding between "user constitution" and "search needs." By calculating the deviation coefficient between the two, the degree of difference is captured, and personalized and quality weights are dynamically allocated. When the search results have a low match with the constitution, the semantic relevance weight between the content and the constitution is strengthened to avoid recommending contradictory dietary therapy content; when the match is high, the user's acceptance of the content is emphasized. This method breaks through the limitations of traditional recommendations that rely solely on keyword semantic similarity, integrating core TCM constitution adaptation factors throughout the entire recommendation process. This significantly improves the personalization and accuracy of UGC content recommendations, ensures the safety and effectiveness of dietary therapy, fully utilizes community UGC resources to meet users' differentiated needs, and effectively solves the problem of insufficient recommendation accuracy in existing technologies. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating a UGC personalized recommendation method for a TCM dietary therapy community based on a user's TCM constitution, as proposed in an embodiment of this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] The terms "first," "second," etc., in the specification and accompanying drawings of the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. For example, the first element value and the second element value mentioned below belong to different element values. It should be understood that such names can be used interchangeably where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or devices. The division of modules appearing in the embodiments of this application is merely a logical division. In actual applications, there may be other division methods. For example, multiple modules may be combined into or integrated into another system, or some features may be ignored or not performed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interface, and the indirect coupling or communication connection between modules may be electrical or other similar forms. None of these are limited in the embodiments of this application. Furthermore, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed among multiple circuit modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of this application.

[0019] To address the technical problem mentioned in the background that existing technologies cannot accurately recommend targeted content to users, this application proposes a personalized recommendation method for UGC in a TCM dietary therapy community based on the user's TCM constitution. For example... Figure 1 As shown, the personalized recommendation method for TCM dietary therapy community UGC based on user TCM constitution includes steps S100 to S500.

[0020] Step S100: Obtain the body mass vector and keyword text.

[0021] In this embodiment, the constitution vector includes a first element value that corresponds one-to-one with each TCM constitution. The first element value at least represents the probability that the user belongs to the corresponding TCM constitution. The keyword text is obtained based on the user's search query.

[0022] It is important to understand that Traditional Chinese Medicine (TCM) constitution refers to the relatively stable characteristics of the human body in terms of morphological structure, physiological function, and psychological state, formed under the combined effects of innate endowment and acquired conditioning. It is a core summary of individual differences in the human body within TCM theory. Its core characteristics are stability (meaning that once formed, the constitution is not easily changed within a certain period), specificity (meaning that different individuals have inherent differences in metabolism, immunity, and organ function), and adjustability (meaning that it can be appropriately regulated through acquired methods such as diet therapy, exercise, and lifestyle). The classification of TCM constitutions follows the holistic concept and syndrome differentiation of TCM. Common standard classifications include nine categories: balanced constitution, qi deficiency constitution, yang deficiency constitution, yin deficiency constitution, phlegm-dampness constitution, damp-heat constitution, blood stasis constitution, qi stagnation constitution, and special constitution (also known as the nine basic constitution types in the "Classification and Judgment of TCM Constitutions" standard). Each constitution corresponds to unique physiological manifestations, susceptibility to diseases, and dietary conditioning principles.

[0023] In this embodiment, TCM constitution can be obtained based on user input or derived by analyzing relevant user data using a TCM constitution detection model. The TCM constitution detection model can be pre-trained based on a large amount of sample data labeled with constitution types. This sample data can include multi-dimensional data such as user lifestyle information (e.g., dietary preferences, sleep patterns, exercise frequency), physical symptoms (e.g., whether the user is sensitive to cold, prone to dry mouth and throat, or frequently feels fatigued), and past health records. Specifically, data such as basic health records filled out by users in TCM dietary therapy communities, descriptions of physical conditions mentioned in daily interactions, and key indicators from authorized uploaded medical examination reports can be input into the trained TCM constitution detection model. The model then outputs the matching probability of the user for various TCM constitution types, thereby determining the user's constitution-related data and providing support for the subsequent construction of constitution vectors. This approach reduces the operational cost of users actively filling out questionnaires and improves the comprehensiveness and accuracy of constitution judgment by combining multi-source data. It is particularly suitable for users who have not fully completed the standard TCM constitution questionnaire but have engaged in some community interaction.

[0024] In one specific embodiment of this application, obtaining the body mass vector includes steps S110 to S140.

[0025] Step S110: Obtain the constitution score corresponding to each of the various TCM constitutions.

[0026] In this embodiment, the constitution score is obtained based on the standard TCM constitution questionnaire filled out by the user.

[0027] It is important to understand that the Standard TCM Constitution Questionnaire is a standardized assessment tool developed based on the national standard "Classification and Determination of TCM Constitutions" (GB / T24391-2009), serving as a core reference for TCM constitution identification. This questionnaire uses a scientifically quantifiable approach, combining descriptions of the core characteristics of nine constitution types in TCM theory, and designs a series of targeted questions covering multiple dimensions such as physical symptoms, lifestyle habits, psychological state, and dietary preferences. Users complete the questionnaire, rating each question according to their own situation (usually using a 5-level rating system, e.g., "never," "rarely," "sometimes," "frequently," and "always" correspond to different scores). After the questionnaires are collected, the specific scores for each user's corresponding constitution type are calculated using preset scoring rules and judgment standards, thereby clarifying the user's constitution type (single or complex) and the degree of imbalance, providing objective and standardized constitution data support for TCM dietary therapy and health maintenance. Its core characteristics are standardization, practicality, and accuracy, making it the most widely used and recognized standardized tool in the field of TCM constitution assessment. In other words, in this embodiment, the TCM constitution refers to a user's preset label.

[0028] In this embodiment, the constitution scores corresponding one-to-one with various TCM constitutions can be directly used as constitution vectors. In order for the constitution vectors to more intuitively reflect the probability of a user belonging to a corresponding TCM constitution, eliminate the interference of the magnitude difference between different constitution scores on subsequent vector calculations, and highlight the proportion of the user's core constitution characteristics, in this embodiment, the constitution scores can be further optimized through normalization processing, specifically implemented through steps S120 to S140 below.

[0029] Step S120: Obtain the first score based on the scores of each physical condition.

[0030] In this embodiment, the first score is the maximum value among all physical fitness scores.

[0031] Step S130: Based on the first score and each physical fitness score, obtain the score ratio corresponding to each physical fitness score.

[0032] In this embodiment, the score ratio is the ratio of the corresponding physical fitness score to the first score. Specifically, the calculation formula is as follows: in, This represents the score ratio corresponding to the i-th TCM constitution, where i is a positive integer greater than or equal to 1. If there are 9 types of TCM constitutions, then i is a positive integer greater than or equal to 1 and less than or equal to 9. This represents the constitution score corresponding to the i-th TCM constitution; This represents the first score, which is the maximum value among all physical fitness scores. In this embodiment, the maximum score cannot be zero.

[0033] Step S140: Obtain the physical fitness vector based on each score ratio.

[0034] In other words, in this embodiment, the physical fitness vector is a vector formed by the ratios of each score.

[0035] Step S200: Obtain the retrieval vector based on the keyword text.

[0036] In this embodiment, the retrieval vector includes a second element value that corresponds one-to-one with each TCM constitution. The second element value is used at least to characterize the relevance between the keyword text and the corresponding TCM constitution.

[0037] In this embodiment, the retrieval vector can be obtained in any reasonable way. For example, a semantic similarity algorithm can be used to obtain the semantic similarity between the keyword text and each TCM constitution, and then each semantic similarity can be used as the second element value corresponding to each TCM constitution.

[0038] In this embodiment, the semantic similarity algorithm can be any algorithm capable of obtaining the semantic similarity between keyword text and various TCM constitutions. For example, the semantic similarity algorithm can be a cosine similarity calculation method based on a pre-trained language model, a Word2Vec word vector space similarity matching method, a weighted similarity algorithm combining TF-IDF and BM25, or an ontology semantic matching algorithm based on a TCM domain knowledge base. These algorithms are all mature technologies and will not be elaborated here.

[0039] In a specific embodiment of this application, if the keyword text entered by the patient is "cold body with cold hands and feet", the semantic similarity between the keyword text and the balanced constitution, qi deficiency constitution, yang deficiency constitution, yin deficiency constitution, phlegm-dampness constitution, damp-heat constitution, blood stasis constitution, qi stagnation constitution, and special constitution obtained by the Word2Vec word vector space similarity matching method are as follows: 0.12, 0.38, 0.89, 0.07, 0.25, 0.09, 0.21, 0.18, and 0.15, respectively.

[0040] It is important to note that in this embodiment, constructing the retrieval vector is one of the core steps in realizing personalized recommendations for UGC in the TCM dietary therapy community. Its core objective is to accurately quantify the correlation between keyword text and various TCM constitutions, providing data support for subsequent matching of user constitutions and dynamically adjusting recommendation strategies. The second element value in the retrieval vector, which corresponds one-to-one with each TCM constitution, directly determines the adaptation of keyword retrieval results to users with different constitutions. Therefore, it is necessary to perform scientific calculations based on the actual distribution characteristics of the community's UGC content, rather than simply relying on traditional methods such as semantic similarity.

[0041] In the context of traditional Chinese medicine dietary therapy, the correlation between keywords and body constitution is not only reflected at the semantic level, but also hidden in the distribution patterns of body constitution in community UGC content. For example, some keywords may appear frequently in content related to Yang deficiency constitution, but rarely mentioned in content related to Yin deficiency constitution. This distribution difference is an important manifestation of the body constitution orientation of keywords. Therefore, constructing a retrieval vector requires starting with the target content corresponding to the keywords, first counting the distribution of each body constitution in the target content, and then quantifying this orientation through multi-dimensional indicators. Based on this, in one embodiment of this application, step S200, obtaining a retrieval vector based on the keyword text, includes steps S210 to S260.

[0042] Step S210: Based on each target content, obtain the first quantity corresponding to each TCM constitution.

[0043] In this embodiment, the first quantity is the number of target contents that correspond to the TCM constitution in each target content.

[0044] In this embodiment, each target content is multiple pieces of content retrieved by the user from the TCM dietary therapy community based on keyword text. The appearance of a corresponding TCM constitution in the target content means that the core theme, descriptive object, or applicable population of the target content (e.g., dietary therapy recipes, constitution conditioning experience, health tips, etc., UGC content) clearly points to a specific TCM constitution. Specifically, this includes the following situations: the content text directly mentions the name of the corresponding TCM constitution (e.g., "Yang deficiency constitution," "phlegm-dampness constitution," etc.), or clearly indicates the constitution type to which the content is applicable; the content describes in detail the typical characteristics and common symptoms of the corresponding TCM constitution (e.g., mentioning "fear of cold, cold hands and feet" corresponding to Yang deficiency constitution, "dry mouth," etc.). The content should address symptoms such as "dry tongue, hot flashes, and night sweats," which correspond to a Yin deficiency constitution. Furthermore, the core treatment approach should align with the dietary needs of this constitution. Recommended ingredients and dietary therapies should be verified by Traditional Chinese Medicine (TCM) theory or based on user feedback, demonstrating that their medicinal properties and efficacy match the corresponding TCM constitution's treatment principles (e.g., recommending astragalus and yam recipes for Qi deficiency to "tonify Qi and strengthen the spleen," or winter melon and red beans for damp-heat constitution to "clear heat and promote diuresis"). The content should also include tags and classifications indicating the corresponding TCM constitution, or be categorized within a dedicated section for that constitution within the community's classification system. In short, determining whether target content "corresponds to a specific TCM constitution" hinges on whether there is a clear and direct correspondence between the content and a particular TCM constitution in terms of thematic suitability, symptom relevance, and dietary therapy targeting, rather than merely mentioning constitution-related terms sporadically without substantial connection.

[0045] It is important to note that in this embodiment, a specific target content may correspond to only one TCM constitution or multiple TCM constitutions. For example, a user's shared "Experience in Making and Eating Angelica and Ginger Lamb Soup" clearly states that the soup is warm in nature and specifically designed for the core symptoms of Yang deficiency constitution, such as aversion to cold, cold hands and feet, without mentioning compatibility with other constitutions. This type of content only corresponds to the Yang deficiency constitution in TCM. Alternatively, a community expert's "Yam and Millet Porridge" can be suitable for people with multiple TCM constitutions, such as phlegm-dampness, qi deficiency, and damp-heat.

[0046] Step S220: Traverse all TCM constitutions and obtain the first constitution.

[0047] In this embodiment, the first constitution refers to any constitution among the various TCM constitutions that has not yet obtained a corresponding second element value. That is, in this embodiment, when constructing the retrieval vector, a traversal iterative approach is needed to calculate the corresponding second element value for each of the nine TCM constitutions, ensuring that all constitution types are covered without omission. Specifically, initially, none of the TCM constitutions have generated a corresponding second element value. First, one of the nine constitutions is randomly selected as the first first constitution. After calculating its second element value, the next first constitution is selected from the remaining uncalculated constitutions, and the above calculation process is repeated until all nine TCM constitutions, such as balanced constitution, qi deficiency constitution, and yang deficiency constitution, have obtained corresponding second element values. At this point, all the second element values ​​are arranged and combined according to a preset constitution order (e.g., the standard classification order of the nine constitutions) to finally form a complete retrieval vector. This traversal calculation method ensures that the relevance between each TCM constitution and the keyword text is accurately quantified, avoiding the retrieval vector failing to fully reflect the constitution-related characteristics of the keywords due to omissions or selective calculations. This lays a complete data foundation for subsequent comparative analysis of constitution vectors and retrieval vectors.

[0048] In other embodiments, the number of TCM constitutions may not be divided into 9 categories, for example, 8 or 12 categories. To avoid redundancy, the following explanation will only focus on 9 categories of TCM constitutions (i.e., balanced constitution, qi deficiency constitution, yang deficiency constitution, yin deficiency constitution, phlegm-dampness constitution, damp-heat constitution, blood stasis constitution, qi stagnation constitution, and special constitution). The implementation logic of other number of constitution classifications can refer to the core idea of ​​this embodiment. Only the dimensions of the constitution vector, the number of TCM constitution traversals, and the number statistics need to be adjusted accordingly (for example, if there are 8 types of constitutions, the constitution vector is 8-dimensional, the second element value is calculated 8 times, and the second ratio is calculated according to the number of 8 types of constitutions, etc.). The core "constitution-retrieval" matching logic, deviation coefficient calculation method, and recommendation score calculation rules remain the same and do not need to be repeated.

[0049] Step S230: Based on the first physical condition, obtain the second quantity and the third quantity.

[0050] In this embodiment, the second quantity is the first quantity corresponding to the first constitution. The third quantity is the sum of the first quantities corresponding to each TCM constitution. Specifically, the formula for calculating the third quantity is as follows: in, Indicates the third quantity; This indicates the number corresponding to the constitution in Traditional Chinese Medicine. This represents the first quantity corresponding to the i-th TCM constitution.

[0051] Step S240: Obtain the pointing weight based on the second quantity and the third quantity.

[0052] In this embodiment, the pointing weight is positively correlated with the first ratio. The first ratio is the ratio of the second quantity to the third quantity. That is, in this embodiment, the pointing weight can be directly equal to the first ratio.

[0053] It is important to note that while determining the targeting weight solely based on the first ratio can initially reflect the targeting trend of keyword text to a specific TCM constitution, it does not fully consider the overall distribution characteristics of the first quantity corresponding to each TCM constitution. For example, the first quantity for some constitutions may be abnormally high or low due to data fluctuations. Relying solely on a single ratio can easily lead to bias in the targeting weight calculation, failing to accurately characterize the true correlation between keywords and constitutions. To address this issue, statistical dimension feature parameters can be introduced to optimize the targeting weight calculation logic, which can be implemented through steps S241 to S244 below.

[0054] In one embodiment of this application, step S240, obtaining the pointing weight based on the second quantity and the third quantity, includes steps S241 to S244.

[0055] Step S241: Obtain the second ratio and coefficient of variation.

[0056] In this embodiment, the second ratio is the ratio of the third quantity to the quantity of each TCM constitution. The coefficient of variation is the coefficient of variation of the first quantity corresponding to each TCM constitution.

[0057] Step S242: Obtain the first difference based on the second quantity and the second ratio.

[0058] In this embodiment, the first difference is equal to the second quantity minus the second ratio.

[0059] Step S243: Obtain a third ratio based on the first difference and the third quantity.

[0060] In this embodiment, the third ratio is the ratio of the first difference to the third quantity.

[0061] Step S244: Obtain the pointing weight based on the coefficient of variation and the third ratio.

[0062] In this embodiment, the pointing weight is positively correlated with both the coefficient of variation and the third ratio. Specifically, in step S244, based on the coefficient of variation and the third ratio, the calculation formula for the pointing weight can be obtained as follows: in, This represents the pointing weight corresponding to the i-th TCM constitution (i.e., the first constitution); This represents a normalization function, such as maximum and minimum value normalization, used to normalize the values ​​within the parentheses to the range [0, 1]. The coefficient of variation represents the first quantity corresponding to each TCM constitution. This represents the first quantity (or second quantity) corresponding to the i-th TCM constitution (i.e., the first constitution). Indicates the second ratio; It indicates the third quantity; adding 1 to the denominator is to avoid extreme cases where the denominator of the fraction may be zero.

[0063] In this embodiment, the pointing weight represents the pointing trend between the keyword text and the corresponding constitution distribution. The larger the pointing weight, the more obvious the pointing trend of the keyword text on the corresponding TCM constitution, that is, the greater the correlation between the keyword text and the TCM constitution. When the keyword text is widely used in multiple constitutions, the pointing weight values ​​of each constitution are similar and tend to be 0.

[0064] Step S250: Based on the pointing weight, obtain the second element value corresponding to the first physique.

[0065] In this embodiment, the pointing weight can be directly used as the second element value corresponding to the first constitution. It is important to note that while the pointing weight alone can reflect the distribution trend of keywords within constitution-related content, it does not fully consider the actual frequency of keyword occurrences in the corresponding constitution's UGC content. This may lead to the retrieval vector failing to accurately depict the deep association between keywords and constitutions. For example, if the total amount of UGC content for a certain constitution is extremely small, even if keywords are concentrated in the content related to that constitution (i.e., the pointing weight is high), insufficient sample size may result in misjudgments of relevance. Conversely, if the total amount of UGC content for a certain constitution is large, the distribution trend of keywords needs to be combined with their proportion within the content of that constitution to more objectively reflect targeting. Therefore, to further improve the accuracy of the retrieval vector, a targeting coefficient can be introduced to correct the pointing weight. By integrating the proportion of keyword occurrences in the corresponding constitution's UGC, a multi-dimensional quantification of the relevance between keywords and constitutions can be achieved, making the second element value more accurately reflect the suitability of keywords for a specific constitution. Based on this, in one embodiment of this application, step S250, based on the pointing weight, obtains the second element value corresponding to the first physique, including steps S251 to S254.

[0066] Step S251: Based on the first physical condition, obtain the fourth quantity.

[0067] In this embodiment, the fourth quantity is the total number of UGC contents of the first constitution in the TCM dietary therapy community.

[0068] In this embodiment, the total number of UGC contents for a specific constitution (i.e., the first constitution) in the TCM dietary therapy community refers to the cumulative number of all user-generated content (UGC) within the TCM dietary therapy community platform that is explicitly labeled, corely adapted to, or substantially related to the first constitution. This UGC content must have a direct and clear association with the first constitution, specifically including: the content text directly mentions the name of the first constitution (e.g., "Yang deficiency constitution" or "phlegm-dampness constitution") or explicitly labels it as suitable for the constitution; the core of the content revolves around the typical symptoms and conditioning needs of the first constitution (e.g., sharing experiences related to "tonifying Qi and strengthening the spleen" for the Qi deficiency constitution); the dietary therapy recipes and ingredients recommended in the content are verified by TCM theory or community practice and are consistent with the conditioning principles of the first constitution; the content's tags and classification attributes contain the identifier of the first constitution, or it is categorized into a content section specifically for that constitution.

[0069] Step S252: Obtain a fourth ratio based on the second quantity and the fourth quantity.

[0070] In this embodiment, the fourth ratio is the ratio of the second quantity to the fourth quantity.

[0071] Step S253: Based on the fourth ratio, obtain the coefficient.

[0072] In this embodiment, the targeting coefficient is positively correlated with the fourth ratio. That is, the fourth ratio can be directly used as the targeting coefficient. It should be noted that when calculating the targeting coefficient solely based on the fourth ratio (the proportion of the target content corresponding to the keyword in the UGC of this type), the overall coverage of the target content obtained by the keyword retrieval in all UGC of the community is not fully considered. If the proportion of the third quantity corresponding to the keyword in all UGC of the community is extremely low, even if the fourth ratio of a certain type is high, it may be due to the small total amount of target content leading to a localized high proportion, which cannot objectively reflect the true targeting of the keyword to that type; conversely, if the proportion of the third quantity in all UGC of the community is high, it indicates that the content corresponding to the keyword has a wide range of attention in the community, and the reference value of the fourth ratio is higher in this case. Therefore, in order to quantify the targeting coefficient more accurately, in one embodiment of this application, step S253, based on the fourth ratio, obtains the targeting coefficient, including steps S253a to S253c.

[0073] Step S253a: Obtain the fifth quantity.

[0074] In this embodiment, the fifth quantity is the sum of all UGC content corresponding to each TCM constitution in the TCM dietary therapy community. Specifically, the formula for calculating the fifth quantity is as follows: in, Indicates the fifth quantity; This indicates the number corresponding to the constitution in Traditional Chinese Medicine. This represents the total number of all UGC contents corresponding to the i-th TCM constitution.

[0075] Step S253b: Obtain the fifth ratio based on the third quantity and the fifth quantity.

[0076] In this embodiment, the fifth ratio is the ratio of the third quantity to the fifth quantity.

[0077] Step S253c: Based on the fourth ratio and the fifth ratio, obtain the coefficient.

[0078] In this embodiment, the targeting coefficient is positively correlated with the fifth ratio. In one embodiment of this application, step S253c, based on the fourth ratio and the fifth ratio, obtains the calculation formula for the targeting coefficient as follows: in, This represents the targeting coefficient corresponding to the i-th TCM constitution (i.e., the first constitution); Indicates the third quantity; Indicates the fifth quantity; Indicates the fifth ratio; This represents the first quantity (or second quantity) corresponding to the i-th TCM constitution (i.e., the first constitution). This represents the total number of all UGC contents corresponding to the i-th TCM constitution (i.e., the fourth quantity). This represents the fourth ratio.

[0079] In this embodiment, to avoid data fluctuations and increase the rationality of the above calculation formula, it is specified here that when When the value is less than the first preset value, it can be considered that the sample is insufficient to highlight the targeting. In this case, the targeting coefficient can be adjusted. The value is denoted as the second preset value. For example, in one embodiment of this application, if the first preset value is 20, the second preset value is 0.0001, and... If the value is less than 20 (i.e., the first preset value), then the formula for calculating the coefficient can be as follows: In this embodiment, the first preset value and the second preset value can be set according to requirements. For example, the first preset value can be 20 or 30, and the second preset value can be 0.001 or 0.0001.

[0080] Step S254: Based on the pointing weight and the targeting coefficient, obtain the second element value corresponding to the first physique.

[0081] In embodiments of this application, the second element value corresponding to the first constitution can be obtained in any reasonable manner based on the pointing weight and the targeting coefficient. For example, the second element value can be the sum or product of the pointing weight and the targeting coefficient.

[0082] In one embodiment of this application, step S254, based on the pointing weight and the targeting coefficient, the calculation formula for obtaining the second element value corresponding to the first physique can be as follows: in, This represents the value of the second element corresponding to the i-th TCM constitution (i.e., the first constitution); This represents the pointing weight corresponding to the i-th TCM constitution; This represents the targeting coefficient corresponding to the i-th TCM constitution.

[0083] Step S260: After obtaining the corresponding second element value for each TCM constitution, obtain the retrieval vector.

[0084] In this embodiment, the sequence formed by arranging the values ​​of each second element according to a preset order of TCM constitution (such as the standard classification order of balanced constitution, qi deficiency constitution, yang deficiency constitution, etc., special constitution) can be used as the retrieval vector. To ensure that the element values ​​of the retrieval vector and the constitution vector are of the same order of magnitude, to ensure the accuracy and rationality of subsequent deviation coefficient calculations, to eliminate calculation biases caused by differences in data magnitude, and to make the proportion of each element in the vector more intuitively reflect the strength of the correlation, the values ​​of each second element can be normalized. After normalization, all second element values ​​will be mapped to... Within the specified range, the relative differences in the relevance between different TCM constitutions and keyword texts are preserved, while data standardization is achieved. This lays a unified data foundation for subsequent operations such as cosine similarity calculation and deviation coefficient derivation with constitution vectors that have also undergone normalization.

[0085] In this embodiment, there are no restrictions on the normalization method for each second element value. For example, maximum and minimum value normalization or L2 normalization can be used to normalize each second element value.

[0086] Step S300: Obtain the deviation coefficient based on the body mass vector and the retrieval vector.

[0087] In this embodiment, the deviation coefficient is used at least to characterize the magnitude of the difference between each first element value in the body mass vector and the corresponding second element value in the retrieval vector. That is, in this embodiment, any reasonable method can be used to obtain the deviation coefficient based on the body mass vector and the retrieval vector, as long as the deviation coefficient can characterize the magnitude of the difference between each first element value in the body mass vector and the corresponding second element value in the retrieval vector.

[0088] In a specific embodiment of this application, the values ​​of each element in the body mass vector are normalized. The values ​​of each element in the retrieval vector are also normalized. Step S300 involves obtaining the deviation coefficient based on the body mass vector and the retrieval vector, including steps S310 and S320.

[0089] Step S310: Obtain cosine similarity based on the body mass vector and the retrieval vector.

[0090] In the field of data processing, obtaining the cosine similarity between two vectors (i.e., the body vector and the retrieval vector) is a mature technique.

[0091] Step S320: Obtain the deviation coefficient based on the cosine similarity.

[0092] In this embodiment, the deviation coefficient and the cosine similarity are negatively correlated. That is, in this embodiment, the larger the cosine similarity, the higher the overall fit between the constitution vector and the retrieval vector, and the smaller the corresponding deviation coefficient; the smaller the cosine similarity, the more significant the overall difference between the constitution vector and the retrieval vector, and the larger the corresponding deviation coefficient. However, relying solely on cosine similarity can only reflect the overall matching trend of the two vectors and cannot accurately capture the local differences between corresponding elements in the vectors. For example, there may be cases where the overall cosine similarity is high, but some key constitution dimensions (e.g., the element values ​​corresponding to the user's core constitution) differ significantly, and such local differences are crucial to the accuracy of TCM dietary therapy recommendations (the adaptation deviation of the core constitution may directly affect the dietary therapy effect). Therefore, in order to more comprehensively and meticulously quantify the differences between the constitution vector and the retrieval vector, in one embodiment of this application, step S320, based on the cosine similarity, obtains the deviation coefficient, including steps S321 to S325.

[0093] Step S321: Traverse the body mass vector and obtain the value of the third element.

[0094] In this embodiment, the third element value is any element value in the body mass vector for which no corresponding element difference value has been obtained.

[0095] Step S322: Obtain the fourth element value based on the third element value.

[0096] In this embodiment, the fourth element value is the element value in the retrieval vector that corresponds to the third element value.

[0097] It is important to understand that the element value corresponding to the third element value in the retrieval vector (i.e., the fourth element value) refers to the second element value in the retrieval vector that is completely consistent with the TCM constitution to which the third element value belongs. In other words, both the constitution vector and the retrieval vector follow the same TCM constitution ranking rules (e.g., the standard classification order of balanced constitution, Qi deficiency constitution, Yang deficiency constitution, etc.). The third element value, as the first element value corresponding to a certain TCM constitution in the constitution vector, has a position in the constitution vector that completely corresponds to the position of the fourth element value in the retrieval vector; both point to the same TCM constitution. For example, if the third element value is the first element value corresponding to the Qi deficiency constitution, which is ranked second in the constitution vector, then the fourth element value is the second element value in the retrieval vector, representing the relevance between the keyword text and the Qi deficiency constitution. Through this positional correspondence, a precise comparison of the user's constitution probability and the keyword constitution relevance under the same TCM constitution dimension is achieved.

[0098] Step S323: Obtain the second difference based on the third element value and the fourth element value.

[0099] In this embodiment, the second difference is equal to the absolute value of the difference between the third element value and the fourth element value.

[0100] Step S324: Based on the second difference and the sixth ratio, obtain the element difference value corresponding to the third element value.

[0101] In this embodiment, the element difference value is positively correlated with the second difference value and the sixth ratio value. The sixth ratio value is equal to the ratio of the fourth element value to the element average value. The element average value is equal to the average value of all element values ​​in the retrieval vector.

[0102] In a specific embodiment of this application, step S324, based on the second difference and the sixth ratio, the formula for calculating the elemental difference value corresponding to the third element value can be as follows: in, This represents the element difference value corresponding to the i-th element value (i.e., the third element value) in the body mass vector; This represents the value of the i-th first element in the body mass vector; This represents the value of the i-th second element in the retrieval vector; This indicates the absolute value; This represents the average value of each second element in the retrieval vector.

[0103] In this embodiment, This represents the difference between the first and second element values ​​corresponding to the user's i-th type of TCM constitution, i.e., the second difference value. The larger this value, the greater the difference (i.e., the greater the element difference value). As a weight, namely the sixth ratio, the larger the value, the stronger the correlation between the keyword text and the i-th type of TCM constitution, that is, the greater the influence on the difference (i.e., the greater the element difference value).

[0104] To avoid averaging the values ​​of each second element in the retrieval vector A value of 0 can lead to meaningless division of the sixth ratio (denominator being 0) or cause data oscillations and distorted element difference values ​​due to an excessively small average. To address this, the values ​​of each second element in the search vector can be smoothed before calculating the element average. For example, a very small positive value (e.g., 0.001 or 0.01) can be added to each second element value before calculating the average; alternatively, when all second element values ​​in the search vector are 0, the element average can be directly set to a preset minimum value (e.g., 0.001 or 0.01). This ensures that the calculation process for the sixth ratio and subsequent element difference values ​​and deviation coefficients is legal and the results are stable, preventing recommendation logic interruptions or decreased recommendation accuracy due to data anomalies.

[0105] Step S325: After each element value in the body mass vector has a corresponding element difference value, obtain the deviation coefficient based on the cosine similarity and the element difference values.

[0106] In this embodiment, the deviation coefficient is positively correlated with the difference values ​​of each element. For example, the deviation coefficient can be positively correlated with the product or sum of the difference values ​​of each element.

[0107] In a specific embodiment of this application, the formula for calculating the deviation coefficient can be as follows: in, Indicates the deviation coefficient; Indicates cosine similarity; This represents the quantity corresponding to the TCM constitution (i.e., the number of corresponding elements in the constitution vector). This represents the element difference value corresponding to the i-th element value (i.e., the third element value) in the body mass vector.

[0108] In this embodiment, The deviation is dynamically modulated based on the cosine similarity between the body mass vector and the standard pattern: the higher the similarity, the more the overall deviation is suppressed; the lower the similarity, the more the local differences are enhanced. Step S400: Based on the deviation coefficient, recommendation scores for multiple target contents are obtained.

[0109] In this embodiment, each target content is obtained based on the keyword text retrieval.

[0110] It is important to note that when a user performs a search, the search vector can represent the relevance between the user's search keywords and various TCM constitutions. For some widely distributed keywords, when recommending search results to users, priority should be given to recommending UGC content that is more aligned with their constitution characteristics, thereby providing users with more personalized content tailored to their individual conditions. If the keyword text is highly specific to the user's constitution, then most of the search results will be related to the user's constitution. In this case, when recommending search results, more emphasis can be placed on content quality, providing users with higher-quality content while maintaining relevance. Based on this, in one embodiment of this application, step S400, based on the deviation coefficient, obtains recommendation scores for multiple target contents, including steps S410 to S440.

[0111] Step S410: Based on the deviation coefficient, obtain the individual weight and the quality weight.

[0112] In this embodiment, the personality weight is negatively correlated with the deviation coefficient, the quality weight is positively correlated with the deviation coefficient, and the sum of the personality weight and the quality weight is equal to 1. Specifically, the formula for calculating the personality weight is as follows: in, Indicates individual weight; This represents an exponential function with base e, which will multiply the expression within the parentheses. Monotonic mapping to Within the specified range, ensure that the larger the deviation coefficient, the smaller the individual weight, thereby achieving a negative correlation between individual weight and deviation coefficient; This represents the deviation coefficient; in this embodiment, if the deviation coefficient... The larger the value, the closer the personality weight is to 0; if the deviation coefficient is... The smaller the value, the closer the personality weight is to 1.

[0113] The formula for calculating quality weight is as follows: in, Indicates quality weight; This indicates the individual weight.

[0114] Step S420: Traverse each target content and obtain the current content.

[0115] In this embodiment, the current content refers to any content for which no target content has received a corresponding recommendation score. In other words, in this embodiment, the method for obtaining the recommendation score for any target content can refer to the processing logic of the current content, and will not be elaborated further.

[0116] Step S430: Based on the current content, obtain the relevant evaluation value and quality evaluation value.

[0117] In this embodiment, the relevant evaluation value is used at least to characterize the semantic similarity between the current content and the keyword text. As mentioned above, obtaining the semantic similarity between two types of data (i.e., the current content and the keyword text) is a mature technology in the field of data processing, and will not be elaborated here. For example, the cosine similarity calculation method or the Word2Vec word vector space similarity matching method can be used to obtain the semantic similarity between the current content and the keyword text.

[0118] In this embodiment, the quality evaluation value is used to characterize at least the degree to which the current content is recognized by other users. For example, the quality evaluation value may be the number of likes or favorites mentioned below. In order to obtain the quality evaluation value of the current content more accurately, in one embodiment of this application, step S430, based on the current content, obtains the quality evaluation value, including steps S431 and S432.

[0119] Step S431: Based on the current content, obtain the number of likes, favorites, and comments.

[0120] In this embodiment, the interaction data records of the current content can be retrieved through the backend data interface of the TCM dietary therapy community, from which the number of likes, favorites, and comments on the content can be extracted. Specifically, the backend system stores the interaction behavior logs of each UGC content in real time, including statistical data on key behaviors such as clicking the like button, triggering the favorite operation, and submitting comment information. By calling the preset data query interface and passing in the unique identifier of the current content (e.g., content ID), the corresponding number of likes, favorites, and comments can be accurately matched and obtained from the interaction log database. This is a mature technology and will not be elaborated further.

[0121] Step S432: Obtain a quality evaluation value based on the number of likes, the number of favorites, and the number of comments.

[0122] In this embodiment, the quality evaluation value can be the sum of the number of likes, the number of favorites, and the number of comments. Alternatively; in step S432, based on the number of likes, the number of favorites, and the number of comments, the calculation formula for the quality evaluation value is as follows: in, Indicates the quality evaluation value; Indicates the first coefficient. Indicates the second coefficient. This indicates the third coefficient. The first, second, and third coefficients are all preset according to requirements. For example, the first coefficient can be 0.8, the second coefficient can be 1.0, and the third coefficient can be 1.2. This indicates the number of likes; Indicates the number of favorites; This indicates the number of comments.

[0123] Step S440: Based on the personality weight, the quality weight, the relevant evaluation value, and the quality evaluation value, obtain the recommendation score for the current content.

[0124] In this embodiment, the recommendation score is positively correlated with the product of the personality weight and the relevant evaluation value. The recommendation score is also positively correlated with the product of the quality weight and the quality evaluation value.

[0125] In a specific embodiment of this application, step S440, the formula for calculating the recommendation score of the current content based on the personality weight, the quality weight, the relevance evaluation value, and the quality evaluation value, can be as follows: in, This indicates the recommendation score for the current content; Indicates individual weight; This represents the average value of the quality evaluation score for each target content. Indicates the relevant evaluation value; Indicates quality weight; Indicates the quality evaluation value; This represents an exponential function with base e, used to express the function within parentheses. Monotonic mapping to Within the specified range. In this embodiment, when the deviation coefficient is large, it indicates that there is a conflict between the user's current search intent and their physical characteristics (for example, a user with Yang deficiency searching for cold-natured foods). In this case, the system determines that the user's search intent has higher priority than physical suitability, and therefore increases the weight of the relevant evaluation value (semantic similarity) to ensure that the recommended content accurately responds to the user's query. Conversely, when the deviation coefficient is small, it indicates that the search intent matches the physical condition. In this case, high-quality content with better user feedback, such as likes, favorites, and comments, is prioritized to push, so as to balance the practicality and acceptance of the recommendations.

[0126] Step S500: Rank and recommend each target content based on its recommendation score.

[0127] In this embodiment, target content can be sorted and recommended from high to low according to recommendation scores, prioritizing the display of UGC content with higher recommendation scores that better match the user's physical characteristics and search needs, thus ensuring the personalized adaptability and practicality of the recommendation results.

[0128] This application presents an embodiment of a personalized recommendation method for TCM dietary therapy communities based on user TCM constitution. By constructing a constitution vector to accurately quantify the probability that a user belongs to various TCM constitutions, and combining this with user search keyword text to generate a search vector representing the relevance to the constitution, a deep binding between "user constitution" and "search needs" is achieved. By calculating the deviation coefficient between the two, the degree of difference is captured, and personalized and quality weights are dynamically allocated. When the search results have a low match with the constitution, the semantic relevance weight between the content and the constitution is strengthened to avoid recommending contradictory dietary therapy content; when the match is high, the user's acceptance of the content is emphasized. This method breaks through the limitations of traditional recommendations that rely solely on keyword semantic similarity, integrating core TCM constitution adaptation factors throughout the entire recommendation process. This significantly improves the personalization and accuracy of UGC content recommendations, ensures the safety and effectiveness of dietary therapy, fully utilizes community UGC resources to meet users' differentiated needs, and effectively solves the problem of insufficient recommendation accuracy in existing technologies.

[0129] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0130] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the methods, apparatuses, and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0131] In the several embodiments provided in this application, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or modules may be electrical, mechanical, or other forms.

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

[0133] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0134] In the above embodiments, the implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, in the form of a computer program product.

[0135] The computer program product includes one or more computer instructions. When the computer program is loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video optical disc), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0136] Although embodiments of this application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles of this application.

Claims

1. A personalized recommendation method for TCM dietary therapy communities based on users' TCM constitution, characterized in that: include: Obtain body mass vector and keyword text; The constitution vector includes a first element value that corresponds one-to-one with each TCM constitution. The first element value is used to characterize at least the probability that the user belongs to the corresponding TCM constitution; the keyword text is obtained based on the user's search; the TCM constitution is a user-preset tag; Based on the keyword text, a retrieval vector is obtained; the retrieval vector includes a second element value that corresponds one-to-one with each TCM constitution; the second element value is used at least to characterize the correlation between the keyword text and the corresponding TCM constitution; Based on the body mass vector and the retrieval vector, a deviation coefficient is obtained; the deviation coefficient is used at least to characterize the magnitude of the difference between each first element value in the body mass vector and the corresponding second element value in the retrieval vector; Based on the deviation coefficient, recommendation scores for multiple target contents are obtained; Each target content is obtained based on the keyword text retrieval; The content is ranked and recommended based on the recommendation scores.

2. The method for personalized recommendation of TCM dietary therapy community UGC based on user's TCM constitution as described in claim 1, characterized in that, The process of obtaining the body mass vector includes: Obtain a constitution score that corresponds one-to-one with various TCM constitutions; the constitution score is obtained based on the standard TCM constitution questionnaire filled out by the user. Based on the scores of each physical condition, a first score is obtained; the first score is the maximum value among the scores of each physical condition. Based on the first score and each physical fitness score, obtain the score ratio corresponding to each physical fitness score; the score ratio is the ratio of the corresponding physical fitness score to the first score; The physical fitness vector is obtained based on each score ratio.

3. The method for personalized recommendation of TCM dietary therapy community UGC based on user's TCM constitution as described in claim 1, characterized in that, The step of obtaining the retrieval vector based on the keyword text includes: Based on each target content, obtain the first quantity that corresponds one-to-one with each TCM constitution; the first quantity is the number of target contents that correspond to the TCM constitution in each target content. Iterate through all TCM constitutions and obtain the first constitution; the first constitution is any constitution among all TCM constitutions for which the corresponding second element value has not been obtained. Based on the first constitution, a second quantity and a third quantity are obtained; the second quantity is the first quantity corresponding to the first constitution; the third quantity is the sum of the first quantities corresponding to each TCM constitution; Based on the second quantity and the third quantity, a pointing weight is obtained; the pointing weight is positively correlated with a first ratio; the first ratio is the ratio of the second quantity to the third quantity. Based on the pointing weight, obtain the second element value corresponding to the first physique; After each TCM constitution has obtained its corresponding second element value, the retrieval vector is obtained.

4. The method for personalized recommendation of TCM dietary therapy community UGC based on user TCM constitution as described in claim 3, characterized in that, The step of obtaining the pointing weight based on the second quantity and the third quantity includes: Obtain the second ratio and the coefficient of variation; the second ratio is the ratio of the third quantity to the quantity of each TCM constitution; the coefficient of variation is the coefficient of variation of the first quantity corresponding to each TCM constitution; Based on the second quantity and the second ratio, a first difference is obtained; the first difference is equal to the second quantity minus the second ratio; Based on the first difference and the third quantity, a third ratio is obtained; the third ratio is the ratio of the first difference to the third quantity. The pointing weight is obtained based on the coefficient of variation and the third ratio; the pointing weight is positively correlated with both the coefficient of variation and the third ratio.

5. The method for personalized recommendation of TCM dietary therapy community UGC based on user's TCM constitution according to claim 4, characterized in that, The step of obtaining the second element value corresponding to the first physique based on the pointing weight includes: Based on the first constitution, a fourth quantity is obtained; the fourth quantity is the total number of all UGC content related to the first constitution in the TCM dietary therapy community. Based on the second quantity and the fourth quantity, a fourth ratio is obtained; the fourth ratio is the ratio of the second quantity to the fourth quantity. Based on the fourth ratio, a targeting coefficient is obtained; the targeting coefficient is positively correlated with the fourth ratio. Based on the pointing weight and the targeting coefficient, the second element value corresponding to the first physique is obtained.

6. The method for personalized recommendation of TCM dietary therapy community UGC based on user TCM constitution as described in claim 5, characterized in that, The step of obtaining the coefficient based on the fourth ratio includes: Obtain the fifth quantity; the fifth quantity is the sum of all UGC content corresponding to each TCM constitution in the TCM dietary therapy community; Based on the third quantity and the fifth quantity, a fifth ratio is obtained; the fifth ratio is the ratio of the third quantity to the fifth quantity. Based on the fourth ratio and the fifth ratio, a targeting coefficient is obtained; the targeting coefficient is positively correlated with the fifth ratio.

7. The method for personalized recommendation of TCM dietary therapy community UGC based on user TCM constitution as described in any one of claims 1 to 6, characterized in that, The values ​​of each element in the body mass vector were normalized; The values ​​of each element in the retrieval vector were also normalized; the step of obtaining the deviation coefficient based on the body mass vector and the retrieval vector includes: Based on the physical characteristics vector and the retrieval vector, the cosine similarity is obtained; Based on the cosine similarity, a deviation coefficient is obtained; the deviation coefficient and the cosine similarity are negatively correlated.

8. The method for personalized recommendation of TCM dietary therapy community UGC based on user TCM constitution as described in claim 7, characterized in that, The step of obtaining the deviation coefficient based on the cosine similarity includes: Traverse the physical constitution vector and obtain the third element value; the third element value is any element value in the physical constitution vector for which no corresponding element difference value has been obtained. Based on the third element value, a fourth element value is obtained; the fourth element value is the element value in the retrieval vector that corresponds to the third element value. Based on the third element value and the fourth element value, a second difference is obtained; the second difference is equal to the absolute value of the difference between the third element value and the fourth element value. Based on the second difference and the sixth ratio, the element difference value corresponding to the third element value is obtained; the element difference value is positively correlated with the second difference and the sixth ratio; the sixth ratio is equal to the ratio of the fourth element value and the element average value; the element average value is equal to the average value of each element value in the retrieval vector. After each element value in the physical vector has a corresponding element difference value, the deviation coefficient is obtained based on the cosine similarity and the element difference values.

9. The method for personalized recommendation of TCM dietary therapy community UGC based on user TCM constitution as described in any one of claims 1 to 6, characterized in that, The step of obtaining recommendation scores for multiple target contents based on the deviation coefficient includes: Based on the deviation coefficient, a personality weight and a quality weight are obtained; the personality weight is negatively correlated with the deviation coefficient, the quality weight is positively correlated with the deviation coefficient, and the sum of the personality weight and the quality weight is equal to 1. Iterate through each target content and obtain the current content; the current content is any content for each target content that has not obtained the corresponding recommendation score; Based on the current content, obtain relevant evaluation values ​​and quality evaluation values; the relevant evaluation values ​​are used at least to characterize the semantic similarity between the current content and the keyword text; the quality evaluation values ​​are used at least to characterize the degree to which the current content is recognized by other users; Based on the personality weight, the quality weight, the relevance evaluation value, and the quality evaluation value, a recommendation score for the current content is obtained; the recommendation score is positively correlated with the product of the personality weight and the relevance evaluation value; the recommendation score is also positively correlated with the product of the quality weight and the quality evaluation value.

10. The method for personalized recommendation of TCM dietary therapy community UGC based on user's TCM constitution according to claim 9, characterized in that, Based on the current content, a quality evaluation value is obtained, including: Based on the current content, obtain the number of likes, favorites, and comments; A quality evaluation value is obtained based on the number of likes, the number of favorites, and the number of comments.