Dairy product similarity quantitative evaluation method and system
By obtaining the content value, weight and fluctuation range of nutrients in dairy products and calculating the weighted deviation value, the problem of not considering the importance of nutrients in the existing technology is solved, and a more accurate dairy product similarity assessment is achieved.
Patent Information
- Application Number
- CN202511225536.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-29
AI Technical Summary
The existing dairy product similarity assessment methods use fixed standard values and fail to consider the importance of different nutrients, resulting in low assessment accuracy.
By obtaining the content value, impact weight and content fluctuation range of the reference dairy products in the dairy products to be evaluated, the weighted deviation value is calculated, and the final similarity score is determined by combining the feature importance score and cumulative density distribution curve.
The accuracy of dairy product similarity assessment has been improved, and it can more comprehensively reflect the overall similarity between the dairy product to be evaluated and the reference dairy product.
Smart Images

Figure CN120724178A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for quantitatively evaluating similarity of dairy products. Background Art
[0002] In the dairy industry, product development often targets the nutritional profile of a reference dairy product. To measure the similarity between the dairy product under evaluation and the reference product and provide a basis for product optimization, the industry requires a similarity assessment of the nutritional profiles of the two.
[0003] The existing technical solution first obtains the content values of various nutrients in the dairy product to be evaluated through analysis and testing. Subsequently, the content values are compared one by one with a set of pre-set standard values of the nutrients of the reference dairy products, and the degree of deviation of the content of each nutrient from the corresponding standard value is calculated to determine the similarity between the dairy product to be evaluated and the reference dairy product. However, the content of nutrients in the reference dairy product is not constant, and using a fixed standard value as the basis for judgment cannot reflect this objective situation. Secondly, when comparing the similarity, the existing technical solution does not take into account the influence of different nutrients on the similarity of dairy products, which leads to a low accuracy of the final evaluation. Summary of the Invention
[0004] The present invention provides a method, system, electronic device, storage medium and computer program product for quantitatively evaluating the similarity of dairy products, which are used to address the defects in the existing technology that the evaluation criteria are fixed and the importance of different nutrients is not distinguished, thereby improving the evaluation accuracy of dairy product similarity.
[0005] The present invention provides a method for quantitatively evaluating similarity of dairy products, comprising the following steps: Obtaining the content value of each nutrient in the dairy product to be evaluated, the influence weight used to characterize the importance of each nutrient, and the content fluctuation range of each nutrient in the reference dairy product; For any of the nutrients, a weighted deviation value is obtained based on the content value, the content fluctuation range, and the influence weight; the weighted deviation value is used to characterize the degree of deviation between the content of the nutrient in the dairy product to be evaluated and the reference dairy product; According to all the weighted deviation values, a final similarity score between the dairy product to be evaluated and the reference dairy product is determined.
[0006] According to a method for quantitatively evaluating similarity of dairy products provided by the present invention, a reference nutritional data sample of a reference dairy product sample and a nutritional data sample to be compared of a dairy product sample to be compared are obtained; the reference nutritional data sample and the nutritional data sample to be compared both include a content value of at least one nutrient; Training a classification model for distinguishing sample sources based on the reference nutritional data sample and the nutritional data sample to be compared; extracting a feature importance score for each of the nutrients from the classification model; For any of the nutrients, the feature importance score is used as the impact weight.
[0007] A method for quantitatively evaluating similarity of dairy products provided by the present invention further comprises: For any of the nutrients, constructing a cumulative density distribution curve based on the content value distribution of the nutrient in the reference nutrient data sample; Determining the slope of each data point on the cumulative density distribution curve; The content value corresponding to the first data point is used as the lower limit of the content fluctuation range, and the content value corresponding to the second data point is used as the upper limit of the content fluctuation range; Among them, the first data point is the data point where the slope is greater than the first preset threshold for the first time starting from the low value end of the cumulative density distribution curve; the second data point is the data point where the slope is less than the second preset threshold for the first time after the first data point.
[0008] According to a method for quantitatively evaluating similarity of dairy products provided by the present invention, obtaining a weighted deviation value based on the content value, the content fluctuation range, and the influence weight includes: Obtaining a content deviation distance based on a comparison between the content value and the content fluctuation range; The influence weight is multiplied by the content deviation distance to obtain the weighted deviation value.
[0009] According to a method for quantitatively evaluating similarity of dairy products provided by the present invention, the content fluctuation range includes a lower limit value and an upper limit value; and obtaining the content deviation distance based on a comparison relationship between the content value and the content fluctuation range includes: When the content value is between the lower limit value and the upper limit value, the content deviation distance is zero; When the content value is less than the lower limit, the content deviation distance is the absolute value of the difference between the content value and the lower limit; When the content value is greater than the upper limit value, the content deviation distance is the absolute value of the difference between the content value and the upper limit value.
[0010] According to a method for quantitatively evaluating similarity of dairy products provided by the present invention, determining a final similarity score between the dairy product to be evaluated and the reference dairy product based on all the weighted deviation values includes: Performing an aggregation operation on all the weighted deviation values to obtain a comprehensive deviation value; The comprehensive deviation value is mapped to the final similarity score through a preset scoring function, wherein the final similarity score decreases as the comprehensive deviation value increases.
[0011] The present invention also provides a dairy product similarity quantitative evaluation system, comprising the following modules: An acquisition module, configured to acquire the content value of each nutrient in the dairy product to be evaluated, an influence weight for characterizing the importance of each nutrient, and a content fluctuation range of each nutrient in the reference dairy product; A first processing module is configured to obtain, for any of the nutrients, a weighted deviation value based on the content value, the content fluctuation range, and the impact weight; the weighted deviation value is used to represent the degree of deviation between the content of the nutrient in the dairy product to be evaluated and the reference dairy product; The second processing module is used to determine a final similarity score between the dairy product to be evaluated and the reference dairy product according to all the weighted deviation values.
[0012] The present invention also provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-described methods for quantitatively evaluating similarity of dairy products is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for quantitatively evaluating similarity of dairy products.
[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for quantitatively evaluating similarity of dairy products.
[0015] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: By obtaining the content value of the dairy product to be evaluated, the influence weight representing the degree of importance, and the content fluctuation range of the reference dairy product, the three key dimensions of actual value, importance, and target range are simultaneously prepared for the similarity assessment, overcoming the one-sidedness problem caused by the single evaluation dimension of the traditional method. By calculating the weighted deviation value based on the content value, content fluctuation range, and influence weight, the degree of deviation of the nutrient content is combined with its own importance, so that the difference measurement of a single nutrient is no longer a simple numerical distance, but a comprehensive indicator that can reflect its key influence. By determining the final similarity score based on all weighted deviation values, the comprehensive deviation of all nutritional dimensions is aggregated into an intuitive quantitative score. Because the calculation basis of this score incorporates weights and ranges, it can more comprehensively reflect the overall similarity between the dairy product to be evaluated and the reference dairy product, thereby significantly improving the accuracy of the evaluation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 This is one of the flow charts of the method for quantitatively evaluating similarity of dairy products provided by the present invention.
[0018] Figure 2 This is the second flow chart of the method for quantitatively evaluating similarity of dairy products provided by the present invention.
[0019] Figure 3 This is the third flow chart of the method for quantitatively evaluating similarity of dairy products provided by the present invention.
[0020] Figure 4 This is the fourth flow chart of the method for quantitatively evaluating similarity of dairy products provided by the present invention.
[0021] Figure 5 This is the fifth flow chart of the method for quantitatively evaluating similarity of dairy products provided by the present invention.
[0022] Figure 6 This is the sixth flow chart of the method for quantitatively evaluating similarity of dairy products provided by the present invention.
[0023] Figure 7 It is a structural diagram of the dairy product similarity quantitative evaluation system provided by the present invention.
[0024] Figure 8It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0025] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field without making creative efforts based on the embodiments of the present invention are within the scope of protection of the present invention.
[0026] It should be noted that, in the description of the present invention, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. The orientation or positional relationship indicated by the terms "upper" and "lower" is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the system or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0027] The terms "first," "second," and so forth, used herein are used to distinguish similar objects, not to describe a specific order or precedence. It should be understood that such terms are interchangeable where appropriate, allowing embodiments of the present invention to be implemented in an order other than that illustrated or described herein. Furthermore, the terms "first," "second," and so forth generally distinguish objects of a single type, and do not limit the number of objects. For example, the first object may be one or more. Furthermore, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the connected objects.
[0028] The following combination Figures 1 to 8 The present invention describes the method, system, electronic device, storage medium and computer program product for quantitatively evaluating similarity of dairy products.
[0029] Reference Figure 1 , Figure 1 This is one of the flow charts of the method for quantitatively evaluating similarity of dairy products provided by the present invention, such as Figure 1 As shown, it includes steps 101 to 103: Step 101: Obtain the content value of each nutrient in the dairy product to be evaluated, the influence weight used to characterize the importance of each nutrient, and the content fluctuation range of each nutrient in the reference dairy product.
[0030] Specifically, in the present invention, the dairy product to be evaluated is preferably infant formula, and the reference dairy product is preferably breast milk. Furthermore, the dairy product to be evaluated can also include functional dairy products such as children's or middle-aged and elderly formula, as well as plant-based dairy products. The reference dairy product can also be a specific stage (e.g., colostrum, mature milk), bovine or goat milk, or a theoretical formula standard for specific nutritional requirements published by an authoritative organization.
[0031] In step 101, first obtain the content value of each nutrient in the dairy product to be evaluated. This content value is the direct basis for subsequent comparison and can be obtained by measuring the actual dairy sample through standard detection means. At the same time, it is also necessary to obtain the influence weight used to characterize the importance of each nutrient. The influence weight is a quantitative indicator that reflects the criticality of a certain nutrient in distinguishing dairy products from different sources. The higher the influence weight of a nutrient, the greater the impact of the matching degree of its content on the overall similarity. In addition, it is also necessary to obtain the content fluctuation range of each nutrient in the reference dairy product. This content fluctuation range is not a single value, but an interval, which represents the most common concentration range of the nutrient that naturally exists in a large number of reference dairy samples, providing a target range that conforms to biological reality for evaluation.
[0032] In a specific implementation scenario, for a dairy product to be evaluated, the content of key nutrients such as various amino acids and high-abundance proteins contained therein can be measured through laboratory analysis techniques such as liquid chromatography. These measurement results are the content values of each nutrient in the dairy product to be evaluated. For each nutrient, such as lysine, the corresponding impact weight and content fluctuation range can be queried and retrieved from a pre-built database or parameter table. These impact weights and content fluctuation ranges are predetermined based on the analysis of a large amount of data on reference dairy products.
[0033] Step 102: For any nutrient, a weighted deviation value is obtained based on the content value, content fluctuation range, and impact weight; the weighted deviation value is used to represent the degree of deviation between the content of the nutrient in the dairy product to be evaluated and the reference dairy product.
[0034] After obtaining the basic data required for evaluation, the degree of match for individual nutrients needs to be quantified. Simply determining whether a content value falls within the content fluctuation range fails to distinguish the impact of deviations from the importance of nutrients. Therefore, a calculation method that comprehensively considers content deviation and importance is needed to more accurately measure differences in a single nutrient dimension.
[0035] In step 102, a weighted deviation value is a comprehensive indicator calculated based on the three input data obtained in the previous step. This weighted deviation value is used to indicate the degree of deviation between the nutrient content of the evaluated dairy product and the reference dairy product. A higher weighted deviation value indicates that the nutrient content of the evaluated dairy product deviates significantly or critically from the ideal content of the reference dairy product.
[0036] In practice, a pre-defined calculation process is performed for each nutrient in the dairy product being evaluated, such as tryptophan. This process comprehensively analyzes the deviation between its content value and the corresponding content fluctuation range, and then calculates the weight of the substance's impact. This calculation results in a weighted deviation value for tryptophan. The same calculation process is repeated for each other nutrient in the analysis list, generating a corresponding weighted deviation value for each nutrient.
[0037] By performing this step, a standardized deviation metric is generated for each nutrient. This weighted deviation value not only reflects the difference in content, but also incorporates the importance of the nutrient, making the deviation assessment of individual nutrients more accurate, and further making the final similarity score more accurate.
[0038] Step 103: Determine the final similarity score between the dairy product to be evaluated and the reference dairy product based on all weighted deviation values.
[0039] After calculating the corresponding weighted deviation value for each nutrient, a set of discrete deviation indicators is obtained. While this data set reflects the differences in each individual dimension, it cannot provide an intuitive conclusion about the overall similarity between the dairy product being evaluated and the reference dairy product. To facilitate horizontal comparison of different products or evaluate the overall formulation level, this multi-dimensional deviation information must be integrated into a single final evaluation result.
[0040] In step 103, the final similarity score is a summary value. Through a comprehensive calculation, it aggregates the deviation information represented by the weighted deviation values of all individual nutrients into a final score that represents the overall similarity level. This score can be designed on an easily understood scale, such as 0 to 100.
[0041] In one specific embodiment, all weighted deviation values calculated in the previous steps for all selected key nutrients in the dairy product being evaluated are first aggregated. This set of weighted deviation values is then applied as a single input to a pre-defined determination rule or algorithm. This process processes these values and outputs a single value, which serves as the final similarity score for the dairy product being evaluated.
[0042] Through the above steps, the overall closeness of the key nutritional composition of the dairy product to be evaluated to the reference dairy product can be accurately and comprehensively reflected, thereby providing a direct and effective basis for judgment on the formula optimization and quality control of the dairy product to be evaluated.
[0043] In one possible implementation, the method further includes: Step 201: Obtain a reference nutritional data sample of a reference dairy product sample and a nutritional data sample to be compared of a dairy product sample to be compared; the reference nutritional data sample and the nutritional data sample to be compared both include a content value of at least one nutrient.
[0044] Step 202: Based on the reference nutritional data sample and the nutritional data sample to be compared, a classification model for distinguishing the source of the samples is trained.
[0045] Step 203: Extract the feature importance score of each nutrient from the classification model.
[0046] Step 204: For any nutrient, the feature importance score is used as the influence weight.
[0047] Specifically, a reference nutritional data sample for a reference dairy product sample and a comparison nutritional data sample for a comparison dairy product sample are first obtained. These reference nutritional data samples and the comparison nutritional data samples serve as the foundation for subsequent training of the machine learning model. They both contain values for the content of at least one nutrient. In one specific embodiment, the reference dairy product is breast milk, and the comparison dairy product is infant formula. Researchers collect and integrate large-scale nutritional testing data, for example, 2,000 broadly representative breast milk samples to form the reference nutritional data sample. Simultaneously, detailed testing data for 22 mainstream commercially available infant formulas is collected to form the comparison nutritional data sample. Both data samples contain precise values for a range of common key nutrients, such as the content of multiple amino acids and high-abundance proteins. This data is organized into a structured format, and each data sample is annotated with its source (breast milk or infant formula). This step constructs a high-quality, high-dimensional labeled dataset, providing a solid foundation for subsequent machine learning to discover the inherent differences between the two dairy products.
[0048] After obtaining the dataset, a tool is needed that can automatically learn and quantify these complex differences. Therefore, the next step is to train a classification model for distinguishing the source of samples based on the reference nutritional data sample and the nutritional data sample to be compared. This classification model is an algorithmic model whose goal is to learn a decision rule so that when a new nutritional data sample is given, it can accurately determine whether the sample comes from the reference dairy product or the dairy product to be compared. In a preferred embodiment, the random forest algorithm is selected to construct this classification model. During the training process, the labeled dataset prepared in the previous step is input into the random forest model. The model makes judgments by constructing a large number of decision trees and combining the classification results of all decision trees. The training process continuously adjusts the parameters within the model to maximize its accuracy in distinguishing the reference nutritional data sample from the nutritional data sample to be compared. The execution of this step results in a fully trained classification model. The model solidifies the complex nonlinear relationship that distinguishes the nutritional composition profiles of the two types of dairy products, thereby being able to objectively identify the source of the samples.
[0049] After model training is complete, it's like a "black box." While accurate in classification, further investigation is needed to understand the basis for its decisions. To determine which nutrients are most critical for distinguishing between the two dairy product categories, the feature importance score for each nutrient is extracted from the classification model. The feature importance score is a numerical value that quantifies the contribution of each input feature (i.e., each nutrient) to the classification model's accurate prediction. A higher score indicates a more critical role for the nutrient in the differentiation process. In practice, after training the random forest model, its internal algorithm can be directly called to calculate the contribution of each feature. This calculation is typically based on the average reduction in impurity achieved by a feature across all decision trees within the model. After calculation, the model outputs a list with a specific feature importance score for each nutrient. This step generates an objective ranking of the importance of all nutrients, providing a direct numerical basis for scientifically assigning weights.
[0050] Finally, for any nutrient, the characteristic importance score is used as the impact weight. This is an assignment step, which confirms the objective quantitative score calculated in the previous step as the impact weight used in the final evaluation model. In the specific operation, the name of each nutrient is bound to its corresponding characteristic importance score and stored in a parameter table or database. For example, if the characteristic importance score of lysine is calculated to be 0.15, then 0.15 is determined as the impact weight of lysine. When any dairy product to be evaluated needs to be evaluated later, this parameter table can be directly queried to obtain the impact weight corresponding to each nutrient. It ensures that the impact weight used in subsequent similarity calculations is objectively determined based on large-scale real data, thereby fundamentally solving the technical problem of subjective weight setting and lack of basis in traditional evaluation methods.
[0051] In one possible implementation, the method further includes: Step 301: For any nutrient, construct a cumulative density distribution curve based on the content value distribution of the nutrient in the reference nutrient data sample; Step 302: Determine the slope of each data point on the cumulative density distribution curve; Step 303: The content value corresponding to the first data point is used as the lower limit of the content fluctuation range, and the content value corresponding to the second data point is used as the upper limit of the content fluctuation range; wherein, the first data point is the data point starting from the low end of the cumulative density distribution curve and the slope is greater than the first preset threshold for the first time; the second data point is the data point after the first data point and the slope is less than the second preset threshold for the first time.
[0052] Specifically, for any nutrient, a cumulative density distribution curve is constructed based on the content value distribution of the nutrient in the reference nutrient data sample. The cumulative density distribution curve is a curve that shows how the cumulative proportion of the number of samples below the content value changes as the nutrient content value increases. In a specific embodiment, for a certain amino acid in a reference dairy product (such as breast milk), its content value in all 2000 reference nutrient data samples is first obtained. Then, the content value range of the amino acid is divided into 100 intervals of equal width. By counting the number of samples falling in each interval, its frequency distribution can be obtained. Based on this frequency distribution, a cumulative density distribution curve can be drawn, whose horizontal axis is the nutrient content value and the vertical axis is the cumulative percentage of samples less than or equal to the content value. Through this step, a large number of discrete original data points can be converted into a continuous curve that can intuitively reflect the data distribution density and trend, providing the necessary basis for subsequent quantitative analysis.
[0053] After obtaining the cumulative density distribution curve, a quantitative method is needed to analyze the curve's shape, specifically to identify areas with the highest concentration of data points. The steepness of the curve is a key indicator of data density. Therefore, the next step is to determine the slope of each data point on the cumulative density distribution curve. The slope here, in a physical sense, represents the density or probability density of the data sample near a specific content value. The larger the slope, the more concentrated the data points are at that location; the smaller the slope, the sparser the data points are at that location. In specific implementation, for each data point (or the center point of each interval) on the cumulative density distribution curve generated in the previous step, its local slope can be calculated using numerical differentiation. For example, the slope of a point can be approximated by calculating the ratio of the difference between the ordinate and the abscissa between the point and its adjacent points. Repeating this process for all points on the curve yields a set of slope values that correspond one-to-one to the content value.
[0054] After calculating the slopes of all points, the core range where the data is most concentrated can be accurately defined based on the variation pattern of the slopes. The ultimate goal is to use the content value corresponding to the first data point as the lower limit of the content fluctuation range, and the content value corresponding to the second data point as the upper limit of the content fluctuation range. The boundary point here is determined based on the comparison relationship between the slope and the preset threshold. Among them, the first data point is the data point starting from the low value end of the cumulative density distribution curve, and the slope is greater than the first preset threshold for the first time; and the second data point is the data point after the first data point, and the slope is less than the second preset threshold for the first time. In a preferred embodiment, the first preset threshold and the second preset threshold can be determined based on experience or optimization experiments, for example, the first preset threshold is set to 1, and the second preset threshold is set to -1. During specific operation, the program will start from the lowest content value and check its corresponding slope point by point. When the first data point with a slope greater than 1 is found, the content value corresponding to the data point is recorded and used as the lower limit of the content fluctuation range. The program then continues its search from that point toward higher values. When it finds the first data point with a slope less than -1, it records the corresponding value and uses it as the upper limit of the content fluctuation range. This provides the fluctuation range for that nutrient. This step avoids the limitations of manually setting fixed target values by determining the typical content range for each nutrient in the reference dairy product.
[0055] In a possible implementation, step 102 specifically includes: Step 401: Obtaining a content deviation distance based on a comparison between the content value and the content fluctuation range.
[0056] Step 402: Multiply the impact weight by the content deviation distance to obtain a weighted deviation value.
[0057] Specifically, the content deviation distance is a non-negative value that directly measures the absolute magnitude of a single nutrient's content deviation from its ideal target range. When the content value falls exactly within the target range, the deviation is considered zero.
[0058] In specific implementation, for a specific nutrient in the dairy product being evaluated, such as lysine, its content value is first obtained, and its corresponding content fluctuation range (including a lower limit and an upper limit) is retrieved from the preset parameters. The program then compares the content value with this range. If the content value is between the lower limit and the upper limit (inclusive of the boundaries), its content deviation distance is determined to be 0. If the content value is less than the lower limit, the content deviation distance is determined as the absolute value of the difference between the lower limit and the content value. If the content value is greater than the upper limit, the content deviation distance is determined as the absolute value of the difference between the content value and the upper limit.
[0059] After determining the content deviation distance, this value only reflects the absolute magnitude of the deviation and does not yet capture the importance of the nutrient itself. To prioritize the assessment of key nutrient compatibility, the magnitude of the deviation must be considered alongside its importance. Therefore, the impact weight is multiplied by the content deviation distance to produce a weighted deviation value. This calculation is the core step in generating the weighted deviation value. Through a simple multiplication operation, it amplifies or minimizes the impact of a nutrient's relative importance on the content deviation.
[0060] In a specific embodiment, continuing with lysine as an example, the program will obtain the lysine content deviation distance calculated in the previous step. At the same time, the impact weight of lysine is obtained from the preset parameter table. Then, these two values are directly multiplied together, and the result is the weighted deviation value of lysine. For example, if the lysine content deviation distance is 5 units and its impact weight is 0.15, its weighted deviation value is 5 multiplied by 0.15, which equals 0.75. This calculation process is performed once for each selected key nutrient.
[0061] The technical benefit of this step is that it successfully integrates two different dimensions of information—degree of deviation and importance—into a single indicator. This allows a small deviation in a high-impact nutrient to produce a more significant weighted deviation than a large deviation in a low-impact nutrient. This makes the subsequent comprehensive assessment more sensitive to changes in key nutrients and significantly improves the accuracy of the assessment method.
[0062] In a possible implementation, step 401 specifically includes: Step 501: When the content value is between the lower limit and the upper limit, the content deviation distance is zero.
[0063] Step 502: When the content value is less than the lower limit, the content deviation distance is the absolute value of the difference between the content value and the lower limit.
[0064] Step 503: When the content value is greater than the upper limit value, the content deviation distance is the absolute value of the difference between the content value and the upper limit value.
[0065] Specifically, the implementation of this method is a conditional judgment process. For a given nutrient, its content value and the content fluctuation range defined by the lower limit and upper limit are first obtained. The first step of the process is to determine whether the content value is within the ideal range. Specifically, when the content value is between the lower limit and the upper limit, the content deviation distance is zero. This includes cases where the content value is exactly equal to the lower limit or the upper limit. For example, if the content fluctuation range of a nutrient is [10,20], and the content value of the substance in the dairy product to be evaluated is 15, since 15 is between 10 and 20, its content deviation distance is determined to be 0. This rule reflects the recognition of content values that fall within the natural fluctuation range of the reference dairy product, without taking into account any deviation.
[0066] If the first condition is not met, the content value falls outside the ideal range. The direction of deviation and the magnitude of the deviation must be determined. This leads to the second decision branch. Specifically, when the content value is less than the lower limit, the content deviation distance is the absolute value of the difference between the content value and the lower limit. Continuing with the above example, if the measured content value is 8, since 8 is less than the lower limit of 10, the content deviation distance is calculated as |8-10|, which equals 2. This calculation accurately quantifies the extent of the content deficiency.
[0067] If neither of the first two conditions is met, only the last possibility remains. The process then executes the third calculation rule. Specifically, when the content value is greater than the upper limit, the content deviation distance is the absolute value of the difference between the content value and the upper limit. Using the same example, if the measured content value is 25, since 25 is greater than the upper limit of 20, the content deviation distance is calculated as |25-20|, which equals 5. This calculation also accurately quantifies the extent of the content exceeding the standard. Using the absolute value ensures that the content deviation distance is always a non-negative number, indicating only the magnitude of the deviation.
[0068] In a possible implementation, step 103 specifically includes: Step 601: Perform aggregation operation on all weighted deviation values to obtain a comprehensive deviation value.
[0069] Step 602: Map the comprehensive deviation value to a final similarity score using a preset scoring function, wherein the final similarity score decreases as the comprehensive deviation value increases.
[0070] Specifically, the first step of this embodiment is to perform an aggregation operation on all weighted deviation values to obtain a comprehensive deviation value. The comprehensive deviation value here is a single summary value, which is intended to comprehensively reflect the overall deviation degree of the dairy product to be evaluated in all nutrients under investigation. Aggregation operation is a calculation operation that combines multiple values into one value. In a specific embodiment, the aggregation operation can be a summation operation. The calculation process collects each weighted deviation value calculated for all key nutrients (such as all amino acids and high-abundance proteins) in the previous step, and then adds all these values. The sum obtained is the comprehensive deviation value of the dairy product to be evaluated.
[0071] After obtaining the comprehensive deviation value, while it reflects the overall deviation, it is not intuitive enough, and larger values indicate lower similarity, which does not conform to conventional scoring logic. To obtain a final result that is easy to understand and compare, a conversion step is required. Therefore, the next step in this embodiment is to map the comprehensive deviation value into a final similarity score using a preset scoring function. The key point here is that the final similarity score decreases as the comprehensive deviation value increases. This preset scoring function is a mathematical conversion formula that converts the non-intuitive comprehensive deviation value into a standardized, easy-to-interpret score. In a preferred embodiment, the preset scoring function can be a linear conversion function, for example: Final Similarity Score = 100 - K × Comprehensive Deviation Value. K is a preset scaling factor used to adjust the sensitivity of the score to ensure that the final score falls within an appropriate range (e.g., 0-100). For example, if the calculated comprehensive deviation value is 2.5 and the scaling factor K is set to 20, the final similarity score is 100 - (20 × 2.5) = 100 - 50 = 50.
[0072] By performing these two steps sequentially, a complex, multi-dimensional set of weighted deviation values can be first aggregated into a comprehensive deviation value that represents the overall deviation level. This is then converted, through a reverse mapping function, into a standardized final similarity score. The higher the final similarity score, the closer the nutritional profile of the product is to that of the reference dairy product, providing a clear, reliable, and highly sensitive final evaluation basis for product development and quality control.
[0073] Reference Figure 7 , Figure 7 Schematic diagram of the structure of the dairy product similarity quantitative evaluation system provided by the present invention, the system includes: An acquisition module is used to obtain the content value of each nutrient in the dairy product to be evaluated, the influence weight used to characterize the importance of each nutrient, and the content fluctuation range of each nutrient in the reference dairy product; The first processing module is used to obtain a weighted deviation value for any nutrient based on the content value, content fluctuation range, and impact weight; the weighted deviation value is used to represent the degree of deviation between the content of the nutrient in the dairy product to be evaluated and the reference dairy product; The second processing module is used to determine a final similarity score between the dairy product to be evaluated and the reference dairy product according to all weighted deviation values.
[0074] In a possible implementation, the acquisition module is further configured to: Obtaining a reference nutritional data sample of a reference dairy product sample and a comparative nutritional data sample of a dairy product sample to be compared; wherein both the reference nutritional data sample and the comparative nutritional data sample include a content value of at least one nutrient; Based on the reference nutritional data sample and the nutritional data sample to be compared, a classification model is trained to distinguish the sources of the samples; Extracting feature importance scores for each nutrient from the classification model; For any nutrient, the feature importance score is used as the impact weight.
[0075] In a possible implementation, the acquisition module is further configured to: For any nutrient, a cumulative density distribution curve is constructed based on the content value distribution of the nutrient in the reference nutrient data sample; Determine the slope of each data point on the cumulative density distribution curve; The content value corresponding to the first data point is used as the lower limit of the content fluctuation range, and the content value corresponding to the second data point is used as the upper limit of the content fluctuation range; The first data point is the data point starting from the low end of the cumulative density distribution curve and at which the slope is greater than the first preset threshold for the first time; the second data point is the data point after the first data point and at which the slope is less than the second preset threshold for the first time.
[0076] In a possible implementation, the first processing module is further configured to: According to the comparison between the content value and the content fluctuation range, the content deviation distance is obtained; Multiply the impact weight by the content deviation distance to obtain the weighted deviation value.
[0077] In a possible implementation, the first processing module is further configured to: When the content value is between the lower limit and the upper limit, the content deviation distance is zero; When the content value is less than the lower limit, the content deviation distance is the absolute value of the difference between the content value and the lower limit; When the content value is greater than the upper limit value, the content deviation distance is the absolute value of the difference between the content value and the upper limit value.
[0078] In a possible implementation, the second processing module is further configured to: Perform aggregation operation on all weighted deviation values to obtain the comprehensive deviation value; The comprehensive deviation value is mapped to a final similarity score through a preset scoring function, wherein the final similarity score decreases as the comprehensive deviation value increases.
[0079] It should be noted that the dairy product similarity quantitative evaluation system provided by the present invention can execute the dairy product similarity quantitative evaluation method of any of the above embodiments during specific operation, which will not be described in detail in this embodiment.
[0080] Figure 8 Schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call logic instructions in the memory 830 to execute a method for quantitatively evaluating similarity of dairy products. The method includes: obtaining the content value of each nutrient in the dairy product to be evaluated, the influence weight used to represent the importance of each nutrient, and the content fluctuation range of each nutrient in the reference dairy product; for any nutrient, obtaining a weighted deviation value based on the content value, content fluctuation range, and influence weight; the weighted deviation value is used to represent the degree of deviation between the content of the dairy product to be evaluated and the reference dairy product in terms of the nutrient; and determining a final similarity score between the dairy product to be evaluated and the reference dairy product based on all weighted deviation values.
[0081] Furthermore, the logic instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0082] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the dairy product similarity quantitative evaluation method provided by the above-mentioned embodiments, the method including: obtaining the content value of each nutrient in the dairy product to be evaluated, the influence weight used to characterize the importance of each nutrient, and the content fluctuation range of each nutrient in the reference dairy product; for any nutrient, according to the content value, the content fluctuation range and the influence weight, a weighted deviation value is obtained; the weighted deviation value is used to characterize the degree of deviation of the content of the nutrient between the dairy product to be evaluated and the reference dairy product; based on all weighted deviation values, the final similarity score of the dairy product to be evaluated and the reference dairy product is determined.
[0083] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the method for quantitatively evaluating the similarity of dairy products provided in the above-mentioned embodiments, the method comprising: obtaining the content value of each nutrient in the dairy product to be evaluated, the influence weight used to characterize the importance of each nutrient, and the content fluctuation range of each nutrient in the reference dairy product; for any nutrient, obtaining a weighted deviation value based on the content value, the content fluctuation range and the influence weight; the weighted deviation value is used to characterize the degree of deviation of the content of the nutrient between the dairy product to be evaluated and the reference dairy product; and determining the final similarity score between the dairy product to be evaluated and the reference dairy product based on all weighted deviation values.
[0084] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units 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 may be selected based on actual needs to achieve the objectives of this embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0085] Through the description of the above embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods of each embodiment or certain portions of the embodiments.
[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for quantitatively evaluating similarity of dairy products, characterized in that: include: Obtaining the content value of each nutrient in the dairy product to be evaluated, the influence weight used to characterize the importance of each nutrient, and the content fluctuation range of each nutrient in the reference dairy product; For any of the nutrients, a weighted deviation value is obtained based on the content value, the content fluctuation range, and the influence weight; the weighted deviation value is used to characterize the degree of deviation between the content of the nutrient in the dairy product to be evaluated and the reference dairy product; According to all the weighted deviation values, a final similarity score between the dairy product to be evaluated and the reference dairy product is determined.
2. The method for quantitatively evaluating dairy product similarity according to claim 1, wherein: Also includes: Obtaining a reference nutritional data sample of a reference dairy product sample and a to-be-compared nutritional data sample of a to-be-compared dairy product sample; The reference nutritional data sample and the nutritional data sample to be compared both include a content value of at least one nutrient; Training a classification model for distinguishing sample sources based on the reference nutritional data sample and the nutritional data sample to be compared; extracting a feature importance score for each of the nutrients from the classification model; For any of the nutrients, the feature importance score is used as the impact weight.
3. The method for quantitatively evaluating similarity of dairy products according to claim 2, wherein: Also includes: For any of the nutrients, constructing a cumulative density distribution curve based on the content value distribution of the nutrient in the reference nutrient data sample; Determining the slope of each data point on the cumulative density distribution curve; The content value corresponding to the first data point is used as the lower limit of the content fluctuation range, and the content value corresponding to the second data point is used as the upper limit of the content fluctuation range; Among them, the first data point is the data point where the slope is greater than the first preset threshold for the first time starting from the low value end of the cumulative density distribution curve; the second data point is the data point where the slope is less than the second preset threshold for the first time after the first data point.
4. The method for quantitatively evaluating similarity of dairy products according to claim 1, wherein: Obtaining a weighted deviation value according to the content value, the content fluctuation range, and the impact weight includes: Obtaining a content deviation distance based on a comparison between the content value and the content fluctuation range; The influence weight is multiplied by the content deviation distance to obtain the weighted deviation value.
5. The method for quantitatively evaluating similarity of dairy products according to claim 4, wherein: The content fluctuation range includes a lower limit value and an upper limit value; and obtaining the content deviation distance based on the comparison relationship between the content value and the content fluctuation range includes: When the content value is between the lower limit value and the upper limit value, the content deviation distance is zero; When the content value is less than the lower limit, the content deviation distance is the absolute value of the difference between the content value and the lower limit; When the content value is greater than the upper limit value, the content deviation distance is the absolute value of the difference between the content value and the upper limit value.
6. The method for quantitatively evaluating similarity of dairy products according to claim 1, wherein: Determining a final similarity score between the dairy product to be evaluated and the reference dairy product based on all the weighted deviation values comprises: performing an aggregation operation on all the weighted deviation values to obtain a comprehensive deviation value; The comprehensive deviation value is mapped to the final similarity score through a preset scoring function, wherein the final similarity score decreases as the comprehensive deviation value increases.
7. A dairy product similarity quantitative evaluation system, characterized in that: include: An acquisition module, configured to acquire the content value of each nutrient in the dairy product to be evaluated, an influence weight for characterizing the importance of each nutrient, and a content fluctuation range of each nutrient in the reference dairy product; A first processing module is configured to obtain, for any of the nutrients, a weighted deviation value based on the content value, the content fluctuation range, and the impact weight; the weighted deviation value is used to represent the degree of deviation between the content of the nutrient in the dairy product to be evaluated and the reference dairy product; The second processing module is used to determine a final similarity score between the dairy product to be evaluated and the reference dairy product according to all the weighted deviation values.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method for quantitatively evaluating the similarity of dairy products according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for quantitatively evaluating similarity of dairy products according to any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for quantitatively evaluating similarity of dairy products according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Similarity evaluation method of human milk replacement fat
CN108132338A
Comprehensive similarity measurement and evaluation method based on data driving
CN116662825A
Method for assessing the stability and quality of dairy products and plant based dairy alternatives over the storage period
EP4528269A1
Nutritive Fragments, Proteins and Methods
US20150080296A1
Consistency evaluation method for traditional extraction process and modern extraction process of traditional chinese medicine compound preparation
US20230223156A1
Cited By
Whole milk powder production optimization method and device, electronic equipment and storage medium
CN121809783A
