Method for automatically judging pre-packaged food label based on large language model

By constructing a domain-knowledge-enhanced discriminant model and a food ingredient knowledge graph, the problem of lacking contextual logical reasoning in existing technologies is solved, enabling accurate discrimination and misleading identification of food labels, and improving the accuracy and interpretability of the discrimination results.

CN121117221AActive Publication Date: 2025-12-12SCIENCE & TECHNOLOGY RESEARCH CENTER OF CHINA CUSTOMS

Patent Information

Application Number
CN202511657429.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2025-12-12
Estimated Expiration
2045-11-13

AI Technical Summary

Technical Problem

Existing technologies lack the ability to reason logically within the context of food labels, and cannot identify implicit misleading information and deep semantic contradictions, resulting in the inability to recognize misleading statements to consumers.

Method used

We employ a large language model-based approach to construct a domain knowledge-enhanced discriminative model. By acquiring structured food label data, we generate a final focus statement and utilize a food component knowledge graph for deep semantic reasoning and multi-dimensional evidence fusion to generate a logical consistency score for discrimination.

Benefits of technology

It enables accurate identification of label information on prepackaged foods, improving the accuracy, efficiency, and interpretability of the identification results, and can identify compliance with implicit misleading claims and numerical claims.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121117221A_ABST
    Figure CN121117221A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of food label discrimination, in particular to a prepackaged food label automatic discrimination method based on a large language model. The method comprises the following steps: obtaining structured food label data which comprises a separated product claim text and a component list text, inputting the product claim text into a domain knowledge enhanced discrimination model, generating a final focus declaration for verifying the authenticity of the claim, and outputting the final focus declaration. The discrimination model retrieves components related to the focus declaration in a component list text, and assists in obtaining an evidence classification result by using a pre-constructed food component knowledge graph; and based on an evidence classification result and a claim classification result, generating a logic consistency score by using a domain knowledge enhanced discrimination model, and outputting a discrimination result about the authenticity of the claim. According to the method, the recessive misleading and numerical value claim compliance in the label information are accurately judged, and the accuracy and interpretability of food label review are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of food label identification, in particular to an automatic identification method for pre-packaged food labels based on a large language model. BACKGROUND

[0002] In recent years, with the excellent performance of large-scale pre-training language models in natural language understanding and reasoning tasks, automatic methods based on large language models have been gradually introduced into the field of food label identification. The advantage of the method based on large language models in food label identification lies in its strong semantic understanding and reasoning ability. The large language model can analyze the natural language claims into structured verification propositions, identify phrase variants and generate specific verification conditions. In addition, the large language model is easy to be linked with domain knowledge base, named entity recognition and rule template, so as to realize cross-paragraph association and reasoning of claims, ingredients and measurement information at the semantic level.

[0003] In the prior art, the automatic identification of pre-packaged food label claims mainly relies on optical character recognition to extract label text, and then uses keyword matching, rule-based pattern recognition or simple numerical threshold comparison to determine the claims and label content.

[0004] The core defect of the above prior art is the lack of the ability to perform dynamic logical reasoning based on context, so it cannot find "implicit misleading" or deep semantic / common sense contradictions. The specific manifestations are as follows:

[0005] 1. The system can identify the claims on the label and some ingredients in the ingredient list at the same time, but cannot infer the logical conflict between them based on the functional attributes of the ingredients and common sense, so it cannot identify the expressions that are misleading to consumers;

[0006] 2. The existing method can identify numbers and keywords, but cannot determine whether the numerical value is sufficient to support the claim described in the text;

[0007] Therefore, an automatic identification method for pre-packaged food labels based on a large language model is provided. SUMMARY

[0008] The purpose of the present application is to provide an automatic identification method for pre-packaged food labels based on a large language model to solve the problems raised in the background art.

[0009] To achieve the above purpose, the present application provides an automatic identification method for pre-packaged food labels based on a large language model, comprising the following steps:

[0010] S1, obtaining structured food label data, the food label data at least containing separated product claim text and ingredient list text;

[0011] S2, a domain knowledge enhanced discriminant model is constructed, the product claim text is input into the domain knowledge enhanced discriminant model, the discriminant model can analyze the semantics of the product claim text and classify, and the final focus statement for verifying the authenticity of the claim is generated;

[0012] S3, the final focus statement and the ingredient list text are jointly input into the domain knowledge enhanced discriminant model, the discriminant model retrieves the ingredients related to the focus statement in the ingredient list text, and obtains the evidence classification result by using the pre-constructed food ingredient knowledge graph;

[0013] S4, based on the evidence classification result and the claim classification result, a logic consistency score is generated by using the domain knowledge enhanced discriminant model, a judgment result about the authenticity of the claim is output based on the logic consistency score, and an explainability report is generated.

[0014] As a further improvement of the technical solution, in S2, the specific steps of constructing the domain knowledge enhanced discriminant model are as follows:

[0015] A preset base model is selected, and a structured domain knowledge base is constructed, the content in the knowledge base includes the application conditions of the functional claims of nutritional ingredients and the functional attribute classification of key ingredients, training data is generated based on the domain knowledge base, and the base model is modified using the training data, thereby generating the domain knowledge enhanced discriminant model.

[0016] As a further improvement of the technical solution, in S2, the specific steps of generating the final focus statement for verifying the authenticity of the claim are as follows:

[0017] S21, the discriminant model classifies the input product claim text according to the intention, maps it to a plurality of predefined claim types, and generates a claim classification result;

[0018] S22, according to the classification result, the discriminant model retrieves the corresponding abstract verification rule from the preset claim type and abstract verification rule mapping table;

[0019] S23, the discriminant model substitutes the specific entities and context information in the current claim into the retrieved abstract verification rule, generates a preliminary focus statement of the current claim which can be verified, and introduces a semantic consistency checking loop for optimization to generate the final focus statement.

[0020] As a further improvement of the technical solution, in S23, the specific steps of introducing the semantic consistency checking loop for optimization to generate the final focus statement are as follows:

[0021] S231, after generating the preliminary focus statement, the discriminant model compares the preliminary focus statement with the product claim text for semantic consistency, and calculates a semantic consistency score;

[0022] S232. If the semantic consistency score is lower than the semantic consistency threshold, the discriminant model will reclassify and validate the initial focus statement until the semantic consistency score is not lower than the semantic consistency threshold or the maximum number of iterations is reached. Then the loop ends and the current optimal focus statement is output as the final focus statement.

[0023] S233. When outputting the final focus statement, determine the reason for generating the focus statement by the model.

[0024] As a further improvement to this technical solution, in step S3, the evidence classification results include supporting evidence, neutral evidence, and contradictory evidence.

[0025] As a further improvement to this technical solution, in step S3, the specific steps of the discriminative model retrieving components related to the focus statement from the ingredient list text and using a pre-constructed food ingredient knowledge graph to assist in obtaining evidence classification results are as follows:

[0026] S31. Take the final focus statement and ingredient list text as input, use named entity recognition to extract initial candidate ingredient entities from the ingredient list text, and map them to candidate ingredient entities in the food ingredient knowledge graph;

[0027] S32. Based on candidate component entities, retrieve several evidence items related to the final focus statement in a domain knowledge-enhanced discriminative model;

[0028] S33. Construct an evidence feature vector for each evidence item, and calculate the local support for each evidence item based on the feature vector. ;

[0029] S34. Generate a local support set based on the local support of all evidence items, and calculate the global consistency score of the focus claims using a hierarchical aggregation strategy. ;

[0030] S35. Determine the first support decision threshold. The first contradiction threshold Global consistency score With the first support threshold The first contradiction threshold Comparison:

[0031] like If so, it is considered supporting evidence; if If the evidence is contradictory, it is considered contradictory; otherwise, it is considered neutral.

[0032] As a further improvement to this technical solution, the evidence feature vector includes a semantic entailment component. , atlas relationship support component , measurement consistency component , source credibility component , and time traceability component .

[0033] As a further improvement of the technical solution, in the S34, a hierarchical aggregation strategy is adopted to calculate the global consistency score of the focus statement The specific implementation steps are as follows:

[0034] S341, group all evidence items according to the credibility level of their evidence sources, and form several evidence groups;

[0035] S342, aggregate the local support degree of all evidence items in each evidence group, and calculate the intra-group aggregated support degree of the evidence group ;

[0036] S343, aggregate the intra-group aggregated support degrees of the evidence groups As input, a model based on Bayesian opinion updating is used for inter-group aggregation to calculate the global consistency score .

[0037] As a further improvement of the technical solution, in the S4, based on the evidence classification result and the claimed classification result, the specific steps of generating the logical consistency score by using the domain knowledge enhanced discriminant model are as follows:

[0038] S41, map the evidence classification result to a basic score ;

[0039] S42, generate a corresponding adjustment factor according to the claimed classification result Adjust the basic score to obtain an adjusted score ;

[0040] S43, based on the adjusted score , introduce an evidence strength integral term , to obtain the final logical consistency score ;

[0041] S44, determine a second support determination threshold and a second contradiction determination threshold Compare the logical consistency score with the second support determination threshold and the second contradiction determination threshold :

[0042] If , it is determined that the claim is true; if If yes, then the claim is determined as doubtful; otherwise, the claim is determined as indeterminable.

[0043] As a further improvement of the technical solution, the explainability report includes the accusation and focus statement summary, evidence discovery and evaluation details, result determination logic and score traceability, and final determination result and uncertainty explanation.

[0044] Compared with the prior art, the present application has the following advantages:

[0045] 1. In the automatic discrimination method of pre-packaged food label based on large language model, the fuzzy product claim is converted into a verifiable specific proposition by introducing the focus statement generation mechanism and the domain knowledge enhanced discrimination model, and deep semantic reasoning and multi-dimensional evidence fusion are performed using the pre-constructed food ingredient knowledge graph, thereby realizing accurate discrimination of implicit misleading and numerical claim compliance in label information, effectively solving the defects of lack of context logical reasoning ability and inability to identify deep semantic contradictions in the prior art, and significantly improving the accuracy, efficiency and explainability of food label review.

[0046] 2. The first layer threshold is used to micro-evaluate each piece of evidence, converting it into a standardized evidence classification result, ensuring the preliminary reliability of data processing; then the second layer threshold is used for macro-decision, comprehensively considering the strength of all evidence, the strictness of the claim type, and the possible evidence conflict or deficiency, etc., for weighted fusion and final determination, thereby effectively solving the evidence conflict or evidence deficiency that cannot be handled by a single threshold, and significantly improving the accuracy of the discrimination result. BRIEF DESCRIPTION OF DRAWINGS

[0047] Figure 1 The overall method flowchart of the present application. DETAILED DESCRIPTION

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

[0049] Embodiment:

[0050] Please refer to Figure 1 The present embodiment provides an automatic discrimination method of pre-packaged food label based on large language model, which includes the following steps:

[0051] S1, obtaining structured food label data, the food label data at least containing separated product claim text and ingredient list text; specifically, the full text of the label is extracted by optical character recognition technology, and then the claim paragraph and the ingredient list paragraph are recognized and separated based on natural language processing rules or a sequence labeling model (BiLSTM-CRF), and the separated text is stored in a structured format (such as JSON) to ensure that the subsequent processing steps can be accurately accessed.

[0052] S2, constructing a domain knowledge enhanced discriminant model, inputting the product claim text into the domain knowledge enhanced discriminant model, the discriminant model can analyze the semantics of the product claim text and classify it, and generate a final focus statement for verifying the authenticity of the claim, the focus statement is a natural language proposition that converts ambiguous claims into specific verification conditions;

[0053] In S2, the specific steps of constructing the domain knowledge enhanced discriminant model are as follows:

[0054] A preset base model is selected, and a structured domain knowledge base is constructed, the content in the knowledge base includes the application conditions of the functional claims of nutritional ingredients and the functional attribute classification of key ingredients, training data is generated based on the domain knowledge base, and the base model is modified using the training data, wherein the training data is composed of a plurality of paired samples (input food label claim text, output corresponding standard focus statement template), the base model learns the mapping relationship from the claim to the verification logic to generate the domain knowledge enhanced discriminant model. The preset base model is a sequence-to-sequence or classification generation type large language model based on Transformer, using an encoder-decoder architecture. The domain knowledge base is stored in the form of a relational database, including but not limited to:

[0055] Application conditions of functional claims of nutritional ingredients (quantitative standards for claims such as "high calcium" and "low fat");

[0056] Functional attribute classification of key ingredients (such as sweeteners, preservatives, and nutritional enhancers);

[0057] Abstract verification rule templates (such as verification logic corresponding to non-additive type and content claim type);

[0058] Food ingredient knowledge graph, including physical properties, functional categories, detection methods, and regulatory basis of ingredients.

[0059] In S2, the specific steps of generating a final focus statement for verifying the authenticity of the claim are as follows:

[0060] S21, the discriminant model classifies the input product claim text according to the intention, maps it to a predefined number of claim types, and generates a claim classification result; the predefined number of claim types includes no-addition type, source type, content claim type, and comparison claim type; wherein the no-addition type means that a certain or certain type of specific ingredient is not added. For example, "no added sucrose" and "no artificial colorants". The verification core of this type of claim is to check whether the ingredient or its functional substitute exists.

[0061] The source type means that the ingredients or the product itself of the product are derived from a certain specific raw material or process. For example, "derived from nature" and "100% imported milk source". The verification core of this type of claim is to trace whether the original attribute of the ingredient meets the claim.

[0062] The content claim type means that it claims to contain or not contain a certain nutrient ingredient, and the claim usually has a clear content standard, for example, "high calcium" and "low fat". The verification core of this type of claim is to check whether the value in the nutrient ingredient table meets the quantitative requirements of the relevant national standards for the claim.

[0063] The comparison claim type means that the content of a certain nutrient ingredient is increased or decreased compared with the conventional product of the same type. For example, "30% less salt" and "50% more protein content". The verification core of this type of claim is to confirm whether the comparison benchmark is reasonable and clear, and the current content meets the regulatory requirements.

[0064] S22, according to the classification result, the discriminant model retrieves the corresponding abstract verification rule from the preset claim type and abstract verification rule mapping table;

[0065] The claim type and abstract verification rule mapping table is a key data structure stored in the knowledge base, which associates each claim type with a guiding verification logic template.

[0066] The abstract verification rule is a parameterizable verification condition description without specific entities, which is used to generate specific verification conditions by substituting entities and context by the discriminant model. It is usually expressed in the form of a template sentence or a structured condition. Each type of claim should correspond to at least one abstract rule template (preferably multiple to cover different contexts).

[0067] No-addition type template: verify whether the detection result of the product on [ingredient X] under the recommended detection method is within the 'no-addition' definition range allowed by the regulations; the evidence classification result is product ingredient table, detection report, and formula declaration.

[0068] Content type template: verify whether the content of [nutrient Y] meets [quantitative relationship] (for example, ≥ / ≤ value), the unit of measurement is [unit], the measurement method is [method], and the evidence classification result is nutrient ingredient table or detection report.

[0069] Comparative template: verification and comparison of the basis for comparison of the reference [reference item]: reference source, sample ratio, statistical method, and whether the comparison caliber is consistent (such as dry basis / wet basis), and the evidence classification result is the detection report of two samples and the comparison calculation file.

[0070] S23, the discriminant model substitutes the specific entity and context information in the current claim into the retrieved abstract verification rule to generate a preliminary focus statement of the current claim that is verifiable, and introduces a semantic consistency checking loop for optimization to generate a final focus statement.

[0071] For the above-mentioned example of "no added sucrose", the discriminant model fills in "sucrose" in the variable [X], and obtains the "functional substitution category of sucrose" information from the knowledge base, and finally generates the preliminary focus statement: "verify whether sucrose or any ingredient belonging to high-intensity sweeteners and sugar alcohols is not added in the product". In order to ensure that the generated focus statement is highly consistent with the semantics of the original claim, a semantic consistency checking loop is introduced for optimization.

[0072] In S23, the specific steps for generating the final focus statement by introducing the semantic consistency checking loop for optimization are as follows:

[0073] S231, after generating the preliminary focus statement, the discriminant model compares the preliminary focus statement with the product claim text for semantic consistency, and calculates the semantic consistency score; any one or a combination of the following methods can be used to calculate the score: the inclusion probability based on natural language inference (NLI), the normalized value of sentence vector cosine similarity, or the similarity score obtained by using a question and answer model;

[0074] S232, if the semantic consistency score is lower than the semantic consistency threshold, the discriminant model reclassifies and verifies the preliminary focus statement, until the semantic consistency score is not lower than the semantic consistency threshold or the maximum number of iterations is reached, then the loop ends and outputs the current optimal focus statement as the final focus statement; the semantic consistency threshold is preferably in the range [0.70, 0.90], and the preferred value is 0.80;

[0075] S233, when outputting the final focus statement, the discriminant model simultaneously generates the generation reason of the focus statement, and transmits the generation reason to the explainability report, and the generation reason needs to quote the regulatory provisions or knowledge base entries relied on;

[0076] S3, input the final focus statement and the ingredient list text into the discriminant model enhanced by domain knowledge, the discriminant model retrieves the ingredients related to the focus statement in the ingredient list text, and obtains the evidence classification result by using the pre-constructed food ingredient knowledge graph;

[0077] This food composition knowledge graph is a pre-built semantic network. Nodes represent food ingredients or nutrients, and edges represent relationships between ingredients (such as substitution relationships, functional similarity, and correlation of detection methods). The graph data comes from public databases, industry standards, and scientific literature. The graph is constructed using entity linking and relation extraction techniques and is updated regularly to ensure timeliness.

[0078] In S3, the evidence classification results include supporting evidence, neutral evidence, and contradictory evidence;

[0079] In S3, the discriminative model retrieves ingredients related to the focus statement from the ingredient list text and uses a pre-built food ingredient knowledge graph to assist in obtaining the evidence classification results. The specific steps are as follows:

[0080] S31. Take the final focus statement and ingredient list text as input, use named entity recognition to extract initial candidate ingredient entities from the ingredient list text, and map them to candidate ingredient entities in the food ingredient knowledge graph;

[0081] S32. Based on candidate component entities, retrieve several evidence items related to the final focus statement in a domain knowledge-enhanced discriminative model; the evidence items include, but are not limited to: label component items, nutrition facts record, formula record fragments, third-party testing report metadata, and external regulatory / knowledge base entries.

[0082] S33. Construct an evidence feature vector for each evidence item, and calculate the local support for each evidence item based on the feature vector. ;

[0083] Evidence feature vectors include semantic entailment components. Graph relation support components Measurement of consistency components Source credibility component and time traceability components ;

[0084] The semantic entailment component is generated by at least one natural language inference model, which is fine-tuned by contrastive learning on domain-annotated corpora to improve the ability to distinguish "verifiable" semantics, and the confidence of the model output is calibrated for use in threshold determination.

[0085] The graph relation support component is calculated by graph embedding or graph neural network running on the food composition knowledge graph, representing the strength or support of the relationship between the evidence entity and the focus claim entity in the knowledge graph;

[0086] The measurement consistency component comprises a unit-standardized subcomponent and a statistical consistency subcomponent. The unit-standardized subcomponent is responsible for converting the physical quantities involved in the evidence to a unified unit of measurement. The statistical consistency subcomponent compares the numerical distributions among several test reports (e.g., using...). The test or robust statistic is used to assess numerical consistency and the results are normalized and then incorporated into the measurement consistency component.

[0087] The source credibility component is calculated by combining the following indicators: testing organization qualification score (range 0–1), testing method compliance score (range 0–1), and document verifiability score (range 0–1). These indicators are then fused using a weighted average or multiplicative confidence model to obtain the source credibility component.

[0088] The time-based traceability component considers the time decay factor of the evidence and the depth of supply chain traceability. The time decay factor is implemented using an exponential decay function, for example... ,in The time difference between the evidence sampling and the present. (for decay rate), and the traceability depth is calculated based on the reachable path length or the number of verification nodes from the final product to the raw material node in the knowledge graph;

[0089] Local support It is obtained by combining the components linearly or nonlinearly according to their weights, specifically as follows:

[0090]

[0091] in, Let be the local support of the i-th evidence item; For normalization operations, the Min-Max linear normalization method is used to map the linearly weighted result to the interval [-1, 1]. The weighting coefficients for the semantic entailment component; Weighting coefficients for supporting components of the spectral relationship; Weighting coefficients for measuring consistency components; The weighting coefficients for the source credibility component; The weighting coefficients for the time-tracing components;

[0092] S34. Generate a local support set based on the local support of all evidence items, and calculate the global consistency score of the focus claims using a hierarchical aggregation strategy. ;

[0093] In S34, a hierarchical aggregation strategy is used to calculate the global consistency score of the focus declaration. The specific implementation steps are as follows:

[0094] S341. Group all evidence items according to the credibility level of their sources, forming several evidence groups; the credibility level is pre-set based on the authority and objectivity of the evidence source, and the credibility level includes, but is not limited to:

[0095] High credibility group: Includes numerical evidence derived from official nutrition facts tables and with clearly defined units of measurement;

[0096] Medium confidence level group: contains evidence derived from standardized ingredient list descriptions and that can be identified through entity normalization using a food composition knowledge graph;

[0097] Low credibility group: contains evidence derived from product marketing texts that requires complex semantic reasoning to relate to the focus statement.

[0098] S342. Aggregate the local support of all evidence items within each evidence group and calculate the intra-group aggregated support for that evidence group. ;

[0099] To avoid score inflation caused by high correlation of evidence within a single group, the within-group aggregation uses a weighted, debiased average method, the calculation formula of which is:

[0100]

[0101] in, For the first The weight of each piece of evidence (which can be further defined based on the credibility of its source). For the first The weight of each piece of evidence; As evidence With evidence Semantic relevance or source dependency between them This is an adjustment parameter used to control the strength of the correlation penalty;

[0102] S343. Aggregate the support within each evidence group. As input, a model based on Bayesian perspective updates is used for inter-group aggregation to calculate the global consistency score;

[0103] The Bayesian perspective-based update model treats evidence from the high-confidence group as information with high prior weights, and its update process is as follows:

[0104] Initialization: Set a prior global view (usually set to neutral, such as 0.5);

[0105] Sequential Update: Based on the confidence level from highest to lowest, the aggregate support of each evidence group is updated sequentially. Perform a Bayesian update on the current global perspective;

[0106] Final score: The posterior probability obtained after updating all evidence sets is the global consistency score. ;

[0107] S35. Determine the first support decision threshold. The first contradiction threshold Global consistency score With the first support threshold The first contradiction threshold Comparison:

[0108] like If so, it is considered supporting evidence; if If the evidence is contradictory, it is considered contradictory; otherwise, it is considered neutral evidence. The first support threshold is... The first contradiction threshold Used for evidence classification, usually set , It can be dynamically adjusted according to the type of claim.

[0109] S4. Based on the results of evidence classification and claim classification, generate a logical consistency score using a domain knowledge-enhanced discriminant model, output the judgment result on the truthfulness of the claim based on the logical consistency score, and generate an interpretability report.

[0110] In S4, the specific steps for generating a logical consistency score using a domain-knowledge-enhanced discriminative model based on the evidence classification results and the claim classification results are as follows:

[0111] S41. Map the evidence classification results to basic scores. ;

[0112] The mapping rule is: if the evidence is classified as supporting evidence, then Initialize to a positive value (e.g., +1.0); if the evidence is contradictory, initialize it to a negative value. (e.g., -1.0); if it is neutral evidence, initialize it to a small random value near zero or zero;

[0113] S42. Based on the claimed classification results, generate the corresponding adjustment factors. Adjust the base score to obtain the adjusted score. ;

[0114] The moderating factor is used to reflect the difference in stringency between different types of claims:

[0115] For absolute claims (such as "additive-free" or "source-based"), due to their stringent requirements, contradictory evidence has a strong veto power; therefore, a [specific requirement] is set. This is to amplify the negative impact of contradictory evidence.

[0116] For descriptive or comparative claims (such as "content claims" or "comparative claims"), because they allow for a certain degree of error tolerance, [the following settings are provided]. The fraction remains linearly unchanged.

[0117] The adjusted score is ;

[0118] S43, Based on Adjusted Score Introducing an integral term for the strength of evidence The final logical consistency score is obtained. ;

[0119]

[0120] in, It is a preset integral strength coefficient used to balance the contribution ratio between the base classification result and the overall evidence strength. This score is normalized to the interval [-1, +1], where -1 represents complete contradiction and +1 represents complete agreement.

[0121] S44. Determine the second support threshold. Second contradiction judgment threshold Logical consistency score With the second support threshold Second contradiction judgment threshold Comparison:

[0122] like If, then it is determined to be true; if If the claim is true, it is deemed questionable; otherwise, it is deemed uncertain; the second support threshold. Second contradiction judgment threshold For final determination, it is usually set as follows: , The scope can be automatically relaxed when the claim is complex.

[0123] The values ​​of the two thresholds mentioned above are dynamically adjusted based on the complexity of the current focus statement and the total amount of available evidence: when the focus statement is complex (such as involving multiple logical relationships) or evidence is scarce, the judgment threshold is automatically relaxed (i.e., the second support judgment threshold is lowered). Raise the threshold for determining the second contradiction. This is to avoid making arbitrary conclusions and outputting results such as "insufficient evidence, unable to determine" or "neutral" when information is insufficient.

[0124] The interpretability report includes a summary of the allegations and key statements, a detailed list of evidence findings and assessments, the logic behind the outcome determination and the source of the scores, and an explanation of the final determination and uncertainties.

[0125] The summary of the allegations and key statements includes:

[0126] (1) Product claim text: directly quotes the original claim to be verified;

[0127] (2) The final focus statement generated: presents the specific propositions generated by the model for validation;

[0128] (3) Claim type classification result: Indicate the type of the claim (e.g., no addition) and attach the classification confidence level.

[0129] Details of evidence discovery and assessment include:

[0130] (1) Evidence List: Display all retrieved and used evidence items in the judgment in a list format. For each piece of evidence, list the evidence content (such as the ingredient names in the ingredient list), its evidence classification result (supportive / contradictory / neutral), its local support, and the key components of its evidence feature vector;

[0131] (2) Key evidence analysis: Specifically point out the top K pieces of evidence that contribute the most (positive or negative) to the final judgment, and explain their importance.

[0132] The logic for determining the result and the tracing of the score include:

[0133] (1) Composition of the global consistency score: Explain how the score is derived from various pieces of evidence through a hierarchical aggregation strategy. The calculations include, but are not limited to, evidence grouping and intra-group aggregate support. And inter-group aggregation methods (such as Bayesian update);

[0134] (2) Decomposition of logical consistency score: The calculation process of the score is shown in a formula or structured manner, and the base score is clearly listed. Application claim type adjustment factor and the reasons for their values, and the strength of evidence integral. The value, its calculation basis, and the final score ;

[0135] (3) Threshold determination process: Clearly list the second supporting threshold used for the final determination. Second contradiction judgment threshold and show The comparison result with the threshold.

[0136] The final judgment and explanation of uncertainties include:

[0137] (1) Final judgment conclusion: clearly state the conclusion of "claim is true", "claim is doubtful" or "cannot be determined";

[0138] (2) Explanation of uncertainty or limitations: If the determination is "cannot be determined", the report must explain the reasons, such as insufficient evidence, conflict of evidence, or low confidence of classification.

[0139] Example 1:

[0140] For automatic identification of claims of no added sugar, input the following data:

[0141] Product claim text: "This product contains no sucrose";

[0142] Ingredient list text: "Ingredients: water, fructose syrup, sucrose, food additives";

[0143] Structured data source: Extracted from pre-packaged food label images using OCR technology, and the claim text and ingredient list are separated.

[0144] Process execution steps:

[0145] The system obtains the structured claim text and ingredient list text mentioned above as input.

[0146] The discriminative model classifies the intent of the claim text and outputs the following probability distribution:

[0147] P = {No additives: 0.45, Source: 0.38, Content claim: 0.10, Comparison claim: 0.07}, the classification result is No additives.

[0148] Based on the "no additives" classification result, the model retrieves the corresponding abstract verification rule from the preset mapping table, such as: "Verify whether [X] or any ingredient belonging to [X's functional alternative category] has not been added to the product."

[0149] The model substitutes the entity "sucrose" into the rules and generates a preliminary focus statement: "Verify whether sucrose or any ingredients that are high-intensity sweeteners and sugar alcohols have been added to the product."

[0150] The discriminant model calculates the semantic consistency score between the preliminary focus statement and the original claim "This product contains no sucrose," and the score is... The set semantic consistency threshold is ,because The model triggers an optimization loop, fine-tuning the initial focus statement and generating a new focus statement: "Verify whether the sucrose content is lower than..." "and did not use its functional sweetener alternatives";

[0151] Calculate the semantic consistency score between the new statement and the original claim; the score for this instance is... ,because Once the threshold condition is met, the loop ends. Output this claim as the final focus claim and generate the reason: "Based on the verification rules for additive-free claims, sucrose and its functional substitutes need to be verified."

[0152] NER (Network Entity Retrieval) is used to extract candidate entities from the ingredient list, such as "sucrose" and "fructose corn syrup," and mapped to nodes in the knowledge graph. Evidence items (such as "sucrose" in the ingredient list) are retrieved, and evidence feature vectors are constructed.

[0153] (Low semantic implication, directly contradictory to "sucrose") (In the graph, "sucrose" is strongly associated with the focus declaring entity.) (Inconsistent numerical values) (The source of the ingredient list is reliable) (High timeliness).

[0154] Calculate local support:

[0155]

[0156] The weighting coefficients take the default value ( , , , , ),Score (Negative values ​​indicate contradictions).

[0157] The evidence was assigned to the "high credibility group," and the aggregate support within the group was... (Weighted average calculation). Global consistency score. (After Bayesian update) It is below the first contradiction detection threshold. This was deemed contradictory evidence.

[0158] The evidence is classified as contradictory, which maps to the base score. .

[0159] The type is claimed to be "additive-free", and a regulatory factor is applied. ,have to .

[0160] Evidence strength score Logical consistency score (based on the quantity and relevance of evidence) (After normalization);

[0161] The claim was deemed questionable.

[0162] Output an interpretability report, including a focus statement, a list of evidence (highlighting "sucrose" as contradictory evidence), and score tracing (displaying...). The calculation process and knowledge graph path (showing the association between "sucrose" and sweetener categories) are presented, and manual review of the test report is recommended.

[0163] Example 2:

[0164] For automatic identification of protein content claims, input the following data:

[0165] Product claim text: "Protein" ”;

[0166] Nutrition Facts label text: "Protein: ”;

[0167] Third-party testing report: includes the test number and test value. .

[0168] The system receives the claim text and nutrition facts table text as structured input;

[0169] The discriminant model classifies the claim text and outputs a probability distribution: P={content claim type:0.93,...}, with the classification result being "content claim type".

[0170] Based on the classification results, the corresponding abstract verification rules are retrieved, such as: "Verify whether the content of [nutrient Y] satisfies [quantitative relationship], with the unit of measurement being [unit]".

[0171] The discriminant model will use "protein", " Substituting entities and information into the rules, a preliminary focus statement is generated: "Verify whether the protein content is..." ,unit Calculate the semantic consistency score between the initial focus statement and the original claim, and the score is... ,because If the condition is met directly, there is no need to enter the optimization loop. The declaration is directly output as the final focus declaration, and a reason is generated.

[0172] Retrieve evidence items (nutrition facts records and test reports) and construct a feature vector:

[0173] Nutrition Facts Evidence: , , (Value 12.5 ≥ 10) , ; .

[0174] Test report evidence: , , (Value 12.3 ≥ 10) (Third-party organization) ; .

[0175] The evidence was evenly distributed into the "high credibility group," and aggregation occurred within the group. Global score It was determined to be supporting evidence.

[0176] The evidence is classified as supportive. ;

[0177] The claim type is "content claim type". ,have to ;

[0178] Evidence strength score , (After normalization, ≈0.95);

[0179] The claim was deemed true.

[0180] Output an interpretability report, listing the focus statement, detailed evidence (nutrition facts and test reports), and score breakdown (display). The report should include calculations, legal basis (protein content claim standards), and the test report number and method basis.

[0181] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.

Claims

1. An automatic identification method for prepackaged food labels based on a large language model, characterized in that, Includes the following steps: S1. Obtain structured food label data, which must contain at least the separated product claim text and ingredient list text; S2. Construct a domain knowledge-enhanced discriminant model. Input the product claim text into the domain knowledge-enhanced discriminant model. The discriminant model can parse the semantics of the product claim text and classify it, and generate the final focus statement used to verify the authenticity of the claim. S3. Input the final focus statement and the ingredient list text together into the domain knowledge-enhanced discriminant model. The discriminant model retrieves the ingredients related to the focus statement from the ingredient list text and uses a pre-built food ingredient knowledge graph to assist in obtaining the evidence classification result. S4. Based on the results of evidence classification and claim classification, generate a logical consistency score using a domain knowledge-enhanced discriminant model. Based on the logical consistency score, output the judgment result on the authenticity of the claim and generate an interpretability report.

2. The automatic identification method for prepackaged food labels based on a large language model according to claim 1, characterized in that: In step S2, the specific steps for constructing the domain knowledge-enhanced discriminative model are as follows: A preset base model is selected, and a structured domain knowledge base is constructed. The content of the knowledge base includes the applicable conditions for functional claims of nutritional components and the functional attribute classification of key ingredients. Training data is generated based on the domain knowledge base, and the base model is corrected using the training data, thereby generating a discriminative model enhanced with domain knowledge.

3. The automatic identification method for prepackaged food labels based on a large language model according to claim 2, characterized in that: In step S2, the specific steps for generating the final focus statement used to verify the authenticity of the claim are as follows: S21. The discriminant model performs intent classification on the input product claim text, maps it to several predefined claim types, and generates claim classification results. S22. Based on the classification results, the discrimination model retrieves the corresponding abstract verification rule from the preset claim type and abstract verification rule mapping table; S23. The discriminative model substitutes the specific entities and contextual information in the current claim into the retrieved abstract verification rules to generate a preliminary focus claim that is currently claimed and verifiable. It then introduces a semantic consistency verification loop for optimization to generate the final focus claim.

4. The automatic identification method for prepackaged food labels based on a large language model according to claim 3, characterized in that: In step S23, a semantic consistency check loop is introduced for optimization. The specific steps for generating the final focus declaration are as follows: S231. After generating the preliminary focus statement, the discriminant model compares the preliminary focus statement with the product claim text for semantic consistency and calculates the semantic consistency score. S232. If the semantic consistency score is lower than the semantic consistency threshold, the discriminant model will reclassify and validate the initial focus statement until the semantic consistency score is not lower than the semantic consistency threshold or the maximum number of iterations is reached. Then the loop ends and the current optimal focus statement is output as the final focus statement. S233. When outputting the final focus statement, determine the reason for generating the focus statement by the model.

5. The automatic identification method for prepackaged food labels based on a large language model according to claim 4, characterized in that: In S3, the evidence classification results include supporting evidence, neutral evidence, and contradictory evidence.

6. The automatic identification method for prepackaged food labels based on a large language model according to claim 5, characterized in that: In step S3, the specific steps by which the discriminative model retrieves components related to the focus statement from the ingredient list text and uses a pre-constructed food ingredient knowledge graph to assist in obtaining evidence classification results are as follows: S31. Take the final focus statement and ingredient list text as input, use named entity recognition to extract initial candidate ingredient entities from the ingredient list text, and map them to candidate ingredient entities in the food ingredient knowledge graph; S32. Based on candidate component entities, retrieve several evidence items related to the final focus statement in a domain knowledge-enhanced discriminative model; S33. Construct an evidence feature vector for each evidence item, and calculate the local support for each evidence item based on the feature vector. ; S34. Generate a local support set based on the local support of all evidence items, and calculate the global consistency score of the focus claims using a hierarchical aggregation strategy. ; S35. Determine the first support decision threshold. The first contradiction threshold Global consistency score With the first support threshold The first contradiction threshold Comparison: like If so, it is considered supporting evidence; if If the evidence is contradictory, it is considered contradictory; otherwise, it is considered neutral.

7. The automatic identification method for prepackaged food labels based on a large language model according to claim 6, characterized in that: The evidence feature vector includes a semantic entailment component. Graph relation support components Measurement of consistency components Source credibility component and time traceability components .

8. The automatic identification method for prepackaged food labels based on a large language model according to claim 7, characterized in that: In step S34, a hierarchical aggregation strategy is used to calculate the global consistency score of the focus declaration. The specific implementation steps are as follows: S341. Group all evidence items according to the credibility level of their sources to form several evidence groups; S342. Aggregate the local support of all evidence items within each evidence group and calculate the intra-group aggregated support for that evidence group. ; S343. Aggregate the support within each evidence group. As input, a Bayesian view update-based model is used for inter-group aggregation to calculate the global consistency score. .

9. The automatic identification method for prepackaged food labels based on a large language model according to claim 8, characterized in that: In step S4, the specific steps for generating a logical consistency score using a domain-knowledge-enhanced discriminant model based on the evidence classification results and the claim classification results are as follows: S41. Map the evidence classification results to basic scores. ; S42. Based on the claimed classification results, generate the corresponding adjustment factors. Adjust the base score to obtain the adjusted score. ; S43, Based on Adjusted Score Introducing an integral term for the strength of evidence The final logical consistency score is obtained. ; S44. Determine the second support threshold. Second contradiction judgment threshold Logical consistency score With the second support threshold Second contradiction judgment threshold Comparison: like If, then it is determined to be true; if If the claim is true, it is deemed questionable; otherwise, it is deemed uncertain.

10. The automatic identification method for prepackaged food labels based on a large language model according to claim 9, characterized in that: The interpretability report includes a summary of the allegations and key statements, a detailed list of evidence findings and assessments, the logic behind the outcome determination and the source of the scores, and an explanation of the final determination and uncertainties.

Citation Information

Patent Citations

  • Food product creative concept generation and verification method based on knowledge graph

    CN116992959A

  • Drug knowledge graph clustering construction method based on artificial intelligence

    CN117540226A

  • Medical product consistency verification

    US20210103936A1

  • KR20240080056A

Cited By

  • Premix packaging label automatic verification method and system based on image recognition

    CN121963237A

  • An image recognition-based premix packaging label automatic verification method and system

    CN121963237B