Formula analysis method based on multi-stage knowledge base constraint and heuristic logic
By employing a multi-stage knowledge base constraint and heuristic logic approach, this method performs quantitative and qualitative analysis on skincare product formulation ingredients, generates structured knowledge fragments, and outputs product efficacy vectors. This addresses the analytical bias and insufficient evidence quantification issues inherent in general large language models within the skincare formulation field, thereby enhancing scientific rigor and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI CHAOGUI BIOTECHNOLOGY DEVELOPMENT CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-17
AI Technical Summary
The generalized large language model suffers from factual bias and illusion when dealing with the professional field of skincare formulation, lacks in-depth mechanistic connections, and lacks the ability to quantify the strength of evidence.
Employing a multi-stage knowledge base constraint and heuristic logic approach, the product undergoes quantitative and qualitative analysis of its components through parallel processing channels. It calculates quality scores based on the authority of evidence and the strength of literature support, extracts mechanistic pathways and efficacy endpoints, generates structured knowledge fragments, and uses a large language model to generate summary text, outputting a product efficacy vector.
It enables refined analysis and quantitative evaluation of skincare product formula ingredients, ensuring the objectivity and accuracy of the analysis, generating objective efficacy evaluations based on the strength of scientific evidence, and avoiding the limitations of simply relying on the amount of ingredients added.
Smart Images

Figure CN121885016A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of general large language model application technology, and in particular to a recipe parsing method based on multi-stage knowledge base constraints and heuristic logic. Background Technology
[0002] Generalized Large Language Models (LLMs) typically employ a Transformer architecture, capturing long-distance dependencies through self-attention mechanisms. When processing domain-specific information, the model first needs to be pre-trained on a large-scale general corpus (such as web pages, books, etc.) to learn the basic rules of language. Subsequently, through domain adaptation or instruction fine-tuning, specialized corpora related to skincare product formulations (such as ingredient databases, research papers, industry reports, etc.) are introduced, enabling the model to grasp the following structured information: the chemical properties of ingredients (such as the stability of niacinamide, the photosensitivity of retinol); synergistic / antagonistic effects in the formulation (such as the antioxidant synergy between vitamin C and vitamin E); and restrictions on prohibited ingredients by regulations and safety standards. Generalized Large Language Models (LLMs) suffer from three major technical flaws when processing structured information in specialized domains such as skincare product formulations: 1. Factual bias and illusions: LLM generation is essentially probabilistic output, lacking factual constraints; this leads to frequent illusions in the model, such as exaggerating non-existent efficacy, fabricating ingredient conflicts, or incorrectly attributing the mechanism of ingredient A to ingredient B, resulting in unreliable analysis results. 2. Lack of in-depth mechanistic association: Existing search-enhanced RAG generation methods can only retrieve and list ingredient lists, failing to establish in-depth and professional associations between ingredients and their corresponding biological targets, mechanisms of action, and efficacy endpoints. This results in superficial analysis and fails to provide the necessary structured input for subsequent accurate calculations. 3. Existing technologies lack the ability to quantify the strength of evidence: Conventional RAGs treat authoritative journal articles and brand technical documents as search results with equal weight, leading to a lack of scientific rigor in the final efficacy analysis and difficulty in distinguishing empirically proven efficacy.
[0003] Current technologies suffer from factual biases and illusions, lack deep mechanistic connections, and lack the ability to quantify the strength of evidence. Therefore, this invention provides a recipe analysis method based on multi-stage knowledge base constraints and heuristic logic. Summary of the Invention
[0004] To achieve the above objectives, the present invention adopts the following technical solution: One aspect of the present invention provides a recipe parsing method based on multi-stage knowledge base constraints and heuristic logic, comprising the following steps: Each component in the ingredient list is processed in parallel using two collaborative parsing channels; the mass fraction corresponding to each component is fused with the mechanism coverage description and efficacy endpoint coverage description to output a weighted efficacy object containing quantitative and qualitative assessments. The system aggregates factual benchmarks and weighted efficacy objects, along with their associated mechanisms and risk data, and serializes them into structured knowledge fragments. It then constructs prompts containing strict meta-instructions, and a large language model paraphrases the content of the structured knowledge fragments into summary text. Simultaneously, it extracts quality scores as weighting coefficients, performs weighted summation on the efficacy primitives contributed by each component, generates a product efficacy power vector, and outputs a structured product analysis report containing the product efficacy power vector and controlled generated text.
[0005] In one optional implementation, in the evidence confidence quantification channel of the parsing channel, the potential efficacy association of each component is submitted to a second knowledge base for retrieval; the evidence scoring engine calculates a quantified quality score for each component-efficacy pair using a weighted algorithm based on the preset authority level of the data source and the number of supporting documents in the retrieval results; in the mechanism coverage parsing channel of the parsing channel, semantic parsing is performed on the same retrieval result text to extract the path information of the component acting on the biological target, and a mechanism coverage description describing the integrity of the action path and an efficacy endpoint coverage description describing the final effect range are generated.
[0006] In one alternative implementation, the process of outputting a weighted efficacy object that includes both quantitative and qualitative assessments includes the following steps: Receive quality scores, as well as mechanism coverage descriptions and efficacy endpoint coverage descriptions generated by the mechanism coverage resolution channel for the same ingredient-efficacy pair; pair them according to the identifier data of ingredients and efficacy, and encapsulate them into evidence-mechanism pairs; Using a pre-defined quantitative calibration framework and quality score values, the credibility of the mechanism coverage description and efficacy endpoint coverage description contained therein is assessed, and an auxiliary qualitative description confidence statement is generated. The qualitative description confidence statement is then merged with the evidence-mechanism pair to form a fusion element tuple. Following a predefined structural template, the identifiers, efficacy keywords, quality scores, and qualitative descriptions of the qualitative description confidence statements in the fusion element tuples are organized to generate a structured efficacy entry. This operation is repeated for all related component-efficacy pairs of the component, and all entries are packaged and encapsulated into a weighted efficacy object of the component.
[0007] In one alternative implementation, the process by which a large language model paraphrases the content of structured knowledge fragments into summarizing text includes the following steps: Based on the unique identifier of each component, each weighted efficacy object is matched to the corresponding component entry in the factual baseline. After a successful match, all data within the weighted efficacy object, including quality score, mechanism coverage description, efficacy endpoint coverage description, and associated risk data, are treated as supplementary information and bound to the baseline component entry to generate an enhanced component entry. After completing the operation on all components, an aggregated dataset composed of all enhanced component entries is obtained. The text representation method, hierarchical markers, and field separators are used, based on the product and factual benchmarks as root nodes, each component as branch nodes, and all subordinate data fields of efficacy, score, and description. The aggregated dataset is serialized and structured, and structured knowledge fragments containing complete structured information are output. Structured knowledge fragments are used as data payloads and filled into the reserved insertion area of the instruction template; the instruction prefix, data payload, and instruction suffix are assembled together and submitted to the large language model to perform a controlled text generation task; the instruction template consists of an instruction prefix, a reserved data insertion area, and an instruction suffix; the instruction prefix contains mandatory operation instructions.
[0008] In one optional implementation, the process of serializing and assembling the aggregated dataset includes the following steps: The text representation method defined for the root node field is applied to convert the overall information of the product and factual benchmark into a text sequence, forming the root node text unit. For each component entry in the aggregated dataset, the text representation method defined for the branch node field is applied to convert the component name itself into a text sequence. For each auxiliary data field under the component entry, including efficacy name, quality score, and mechanism coverage description, the corresponding text representation method defined for the auxiliary data field is applied to convert them one by one into a text string with type labels. The set of all branch node field texts and all auxiliary data field text strings under a component constitutes the component's primary text unit set. Using root node start and end symbols, the root node text unit is encapsulated into a root node encapsulation block; for each component primary text unit set, using branch node start symbols, then arranging all text strings in the set in a fixed order, and finally using branch node end symbols, the entire sequence is encapsulated into a component encapsulation block. Place the root node encapsulation block, and then add a structure block separator after it; arrange all component encapsulation blocks in the original order of the components in the aggregated dataset, and insert the same main structure block separator between every two component encapsulation blocks; connect the root node encapsulation block, the separator, and all component encapsulation blocks with the separator to generate a structured knowledge fragment.
[0009] In one optional implementation, the process of concatenating the root node encapsulation block, the separator, and all component encapsulation blocks with the separator includes the following steps: Create a temporary initialization structured context container to temporarily store text components in sequence; write the generated root node encapsulation block as the first text component into the initialization structured context container; Write the predefined structure block separator as the second text component into the initialized structured context container, immediately after the root node encapsulation block; traverse each component encapsulation block in the determined order; for each component encapsulation block encountered, write it as a text component into the initialized structured context container, and write the same structure block separator into the initialized structured context container, placing it after the component encapsulation block; perform this process on all component encapsulation blocks except the last one. After all root node encapsulation blocks, all delimiters, and all component encapsulation blocks are written into the initialized structured context container according to the above rules, sequential context serialization assembly is performed on the contents of the initialized structured context container to seamlessly combine all text components into a text string in the order in which they were written; the generated text string is a structured knowledge fragment.
[0010] In one alternative implementation, the process of creating a temporary, initialized structured context container includes the following steps: The initial operation instruction is to generate structured knowledge fragments. Based on the initial operation instruction, an initial structured context container of a specified size is allocated in the internal working memory, and all storage units of the initial structured context container are initialized to an empty state. After the initialization of the structured context container is completed, a buffer descriptor is generated. The buffer descriptor contains two key attributes: one is a memory address reference pointing to the starting position of the initialized structured context container; the other is a key-value pair assembly used to identify the current write position, and the initial value of the key-value pair assembly is set to zero. The created resource combination, consisting of an initialized structured context container and a buffer descriptor, is marked as writable; a defined initialized structured context container is then ready and serves as the target container for writing text components.
[0011] In one alternative implementation, the process of generating a buffer descriptor includes the following steps: Perform a memory address retrieval operation to obtain the storage address value of the initial location of the structured context container in the system memory space; encapsulate the storage address value into an immutable memory address reference object; Perform pointer structure creation operations to generate a key-value pair assembly structure; perform data object instantiation and parameter validation; The generated memory address reference object and the created and initialized key-value pair assembly structure are taken as input to perform a descriptor assembly operation, creating a new data structure instance. The two key attribute slots of the data structure instance are assigned to the memory address reference object and the key-value pair assembly structure, respectively. After assembly, a buffer descriptor is generated.
[0012] In one alternative implementation, the process of creating a new data structure instance includes the following steps: Based on the names and data types of the two attribute slots required by the defined buffer descriptor, generate an uninitialized instance frame in memory that conforms to the type constraints and whose attribute slots have been allocated but not yet assigned values; Instantiation is performed on the uninitialized instance framework. Based on the memory layout defined by the structure type, the alignment and construction space of the specific vector dimension occupied by the instance is allocated and fixed, generating a blank structure instance that can be addressed and operated independently; the attribute slots of the blank structure instance are in a state of waiting to be filled. Perform the property assignment operation, writing the memory address reference object to the specified first property slot and the key-value pair assembly structure to the specified second property slot.
[0013] In one optional implementation, the method further includes receiving the product name, querying a first knowledge base, obtaining the officially registered ingredient list of the product, and establishing the ingredient list as the factual benchmark.
[0014] This invention achieves refined analysis and quantitative efficacy evaluation of formulation ingredients by combining multi-stage knowledge base constraints with heuristic logic. First, officially registered ingredients serve as the factual benchmark, ensuring the objectivity and accuracy of the analysis. Then, parallel processing channels perform quantitative and qualitative analysis of the ingredients: on one hand, quality scores are calculated based on the authority of evidence and the strength of literature support to quantify the scientific confidence of the efficacy association; on the other hand, text mining extracts the mechanism pathway and efficacy endpoint, forming a qualitative description of the mechanism of action and the range of effects. Finally, the factual benchmark, weighted efficacy objects, and related mechanism risk data are integrated to construct structured knowledge fragments, and a summary text is generated using a large language model; simultaneously, efficacy primitives are weighted and summed using quality scores to generate a product efficacy vector; this vector represents an objective efficacy evaluation based on the strength of scientific evidence, avoiding the limitations of simply relying on the amount of ingredients added. Attached Figure Description
[0015] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of the recipe parsing method based on multi-stage knowledge base constraints and heuristic logic provided in Embodiment 1 of the present invention; Figure 2 The principle of the recipe parsing method based on multi-stage knowledge base constraints and heuristic logic provided in Embodiment 1 of this invention. Figure 1 ; Figure 3 This describes the principle of the recipe parsing method based on multi-stage knowledge base constraints and heuristic logic provided in Embodiment 1 of the present invention. Figure 2 ; Figure 4 This is a process diagram of establishing the ingredient list as a factual basis as provided in Embodiment 2 of the present invention; Figure 5 This is a process diagram for outputting a weighted efficacy object that includes quantitative and qualitative assessments, as provided in Embodiment 4 of the present invention. Figure 6 This is a diagram illustrating the process by which the large language model provided in Embodiment 6 of the present invention transposes the content of structured knowledge fragments into summary text. Figure 7 This is a schematic diagram of the recipe parsing system based on multi-stage knowledge base constraints and heuristic logic provided in Embodiment 12 of the present invention. Figure 8 A block diagram of the electronic device provided by the present invention; Figure 9 A block diagram of a computer-readable storage medium provided for this invention.
[0016] Reference numerals in the attached diagram: 1. Fact benchmark determination module; 2. Content description fusion module; 3. Weighted summation module; 4. Central processing unit / microprocessor / main control chip; 5. Storage medium; 6. Data bus; 7. Input / output bus / external bus / device bus; 8. Display; 9. Input / output device; 10. Computer-readable instructions; 11. Non-transitory computer-readable storage medium. Detailed Implementation
[0017] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0018] Hereinafter, the terms "first," "second," etc., are used for descriptive convenience only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "multiple" means two or more.
[0019] In this invention, unless otherwise explicitly specified and limited, the term "connection" should be interpreted broadly. For example, a connection can be a fixed mechanical connection, a detachable mechanical connection, or an integral part; or, a connection can be a direct connection or an indirect connection through an intermediate medium. Furthermore, unless otherwise explicitly specified and limited, the term "coupling" should be interpreted broadly. For example, coupling can be a direct electrical connection, such as physical contact and electrical conduction between two components; it can also be understood as an electrical connection between different components in a circuit structure through physical lines capable of transmitting electrical signals, such as copper foil or wires on a printed circuit board (PCB), to transmit electrical signals; or, coupling can be an indirect electrical connection between two components through an intermediate medium; or, coupling can be an electrical connection between two components in a non-contact manner, such as an electrical connection between two components using capacitive coupling to transmit electrical signals.
[0020] In this embodiment of the invention, directional terms such as up, down, left, and right may be defined relative to the orientation of the components shown in the accompanying drawings. It should be understood that these directional terms can be relative concepts, used for relative description and clarification, and can change accordingly depending on the orientation of the components in the accompanying drawings.
[0021] Example 1: As Figure 1 As shown, this embodiment of the invention provides a recipe parsing method based on multi-stage knowledge base constraints and heuristic logic, comprising the following steps: Step S100: Receive the product name, call the first knowledge base to query, obtain the officially filed ingredient list of the product, and establish the ingredient list as the factual benchmark; Step S200: For each component in the ingredient list, two collaborative parsing channels are used for parallel processing; the mass fraction corresponding to each component is fused with the mechanism coverage description and efficacy endpoint coverage description to output a weighted efficacy object containing quantitative and qualitative assessments. In the evidence confidence quantification channel, the potential efficacy association of each component is submitted to the second knowledge base for retrieval; the evidence scoring engine calculates a quantified quality score for each component-efficacy pair based on the preset authority level of the data source and the number of supporting documents in the retrieval results through a weighted algorithm; in the mechanism coverage analysis channel, semantic analysis is performed on the same retrieval result text to extract the path information of the component acting on the biological target, and to generate a mechanism coverage description describing the integrity of the action path and an efficacy endpoint coverage description describing the final effect range. Step S300: Aggregate the factual benchmarks and weighted efficacy objects and their associated mechanism and risk data, and serialize them to construct structured knowledge fragments; construct prompts containing strict meta-instructions, and the large language model paraphrases the content in the structured knowledge fragments into summary text; simultaneously extract quality scores as weight coefficients, perform weighted summation on the efficacy primitives contributed by each component, generate a product efficacy power vector, and output a structured product analysis report including the product efficacy power vector and controlled generated text; the product efficacy power vector represents an objective efficacy assessment based on the strength of scientific evidence rather than simply the amount of added ingredients. Here, the efficacy primitive is a minimized, structured efficacy quantification unit created by the system for each verified ingredient-efficacy association; it includes the specific efficacy claim associated with the association, the strength of scientific evidence supporting the claim, quantified by a quality score, and an optional mechanistic pathway description; the efficacy primitive refers to a pre-defined set of standardized biological or chemical evaluation dimensions, including but not limited to: tyrosinase inhibition rate, matrix metalloproteinase-1 (MMP-1) expression level, or stratum corneum moisture content enhancement value; in the process of generating the product efficacy power vector, the heuristic logic also includes: performing non-linear weight correction on specific ingredient combinations (such as vitamin C and ferulic acid) based on the synergistic / antagonistic rule set in the second knowledge base; when a synergistic effect confirmed by scientific literature is detected between ingredients, the efficacy primitive weight corresponding to the combination is heuristically enhanced; the product efficacy power vector generation process also includes: extracting risk data from structured knowledge fragments, correcting the product efficacy power vector based on a pre-defined negative weight matrix, thereby outputting a comprehensive evaluation vector that takes into account both safety constraints and the strength of scientific evidence.
[0022] For details on the principles described in the above embodiments, please refer to the appendix. Figure 2 and attached Figure 3 This embodiment combines multi-stage knowledge base constraints with heuristic logic to achieve refined analysis and quantitative efficacy evaluation of formulation ingredients. First, officially registered ingredients serve as the factual benchmark, ensuring the objectivity and accuracy of the analysis. Then, a parallel processing channel performs quantitative and qualitative analysis of the ingredients: on one hand, quality scores are calculated based on the authority of evidence and the strength of literature support to quantify the scientific confidence of the efficacy association; on the other hand, text mining extracts the mechanism path and efficacy endpoint, forming a qualitative description of the mechanism of action and the range of effects. Finally, the factual benchmark, weighted efficacy objects, and related mechanism risk data are integrated to construct structured knowledge fragments, and a summary text is generated using a large language model; simultaneously, efficacy primitives are weighted and summed using quality scores to generate a product efficacy vector; this vector represents an objective efficacy evaluation based on the strength of scientific evidence, avoiding the limitations of simply relying on the amount of ingredients added. This embodiment achieves automated and structured transformation from ingredient lists to efficacy evaluation, improving the scientific rigor, interpretability, and reliability of formulation analysis.
[0023] The recipe parsing method based on multi-stage knowledge base constraints and heuristic logic provided in this embodiment includes the following two stages: Phase 1: The factual benchmark calibration system receives the product name and forcibly calls the first knowledge base, such as the drug regulatory authority's ingredient database; Objective: To obtain the officially filed ingredient list (List_A), establish the sole factual basis for analysis, and rule out the possibility of ingredient illusion caused by LLM.
[0024] Phase Two: Heuristic Mechanism Retrieval, comprising three key steps: 1. Evidence confidence quantification, Channel A: Introducing an evidence scoring engine, for each ingredient-efficacy pair, the system calculates a quality score of 0-100 based on the authority of the data source in the knowledge base (papers / patents > brand technical data) and the number of supporting documents through a weighted algorithm; 2. Mechanism Coverage Analysis Channel B: Introduces a coverage analysis module; performs semantic analysis on the retrieved text, extracts and generates mechanism coverage descriptions and efficacy endpoint coverage descriptions, which are used to qualitatively describe the integrity of the component's action pathway to a specific target; 3. Weighted Power Object Generation: Outputs a weighted power object (WEO) containing quality score and coverage description, replacing the traditional simple query object.
[0025] Phase Three: Translation and Generation of Fact Bindings 1. Structured Context Construction: Aggregate the official component table with the retrieved mechanism / risk data and serialize it into a unique structured knowledge fragment Context_RAG; 2. Context-locked prompts: Construct a strongly constrained Prompt containing meta-instructions. The instruction LLM is strictly limited to paraphrasing Context_RAG as a summary and prohibits calling its own parameterized knowledge. 3. Controlled Generation and Weighted Vectorization: The LLM executes a prompt to generate parsed text; simultaneously, the system uses the quality score calculated in Phase 2 as a weighting coefficient to perform a weighted summation of the efficacy primitives of each ingredient, generating a high-precision product efficacy force vector (Force_Vector); this vector reflects the objective efficacy based on the strength of scientific evidence, rather than just an estimate based on the amount added; the output is a structured product parsing report (Report_F) containing the product efficacy force vector (Force_Vector).
[0026] This embodiment forms a dual fact lock through fact benchmark calibration and fact binding translation, forcing the model to generate content solely based on officially filed data, fundamentally solving the illusion problem of LLM; the unique heuristic logic preprocessing and multi-predicate deep retrieval achieve a deep association from ingredients to targets / mechanisms, ensuring the high professionalism of the analysis results; the final output includes a standardized product efficacy vector, not only generating text, but also providing an indispensable computable data foundation for downstream recommendation algorithms; through QualityScore, it achieves a leap from qualitative analysis to quantitative evidence evaluation, ensuring that the final output efficacy vector is based on rigorous scientific evidence strength, rather than merely on ingredient list ranking.
[0027] Example 2: As Figure 4 As shown, based on Example 1, the process of establishing the ingredient list as a factual basis in step S100 of this embodiment of the invention specifically includes the following steps: Step S101: Receive the input product name, initiate a mandatory query request to the first knowledge base, the mandatory query request is solely for obtaining all officially registered ingredient information under the product name, and initialize the query results as an ingredient data set; Step S102: Apply the preset adjudication logic. When there are multiple registered versions of the product, select the only valid version based on the latest registration date. Format the ingredient information of the selected version, remove auxiliary information that is not relevant to ingredient identification, and generate a standardized ingredient list with a unique identifier. Step S103: Mark the internal state of the standardized ingredient list as a read-only factual baseline, and build a data interface for reading official ingredient data.
[0028] In the above embodiments, the process of establishing the ingredient list as the factual benchmark involves receiving the product name and forcibly querying a first knowledge base to ensure the acquisition of all officially registered ingredient information, forming an initial ingredient data set. Subsequently, adjudication logic is applied to filter out the only valid version based on the latest registration date when multiple registered versions of the product exist. Irrelevant auxiliary information is removed through formatting, generating a standardized ingredient list with a unique identifier. Finally, this list is marked as a read-only factual benchmark, and a data interface is constructed to enable reliable access to official ingredient data. This embodiment ensures the authority, timeliness, and consistency of the ingredient data, providing an accurate and tamper-proof benchmark for subsequent operations.
[0029] Example 3: Based on Example 2, the process of generating a standardized component list with unique identifiers in step S102 of this embodiment of the invention specifically includes the following steps: Step S1021: Perform component extraction and semantic normalization operations on the component information of the version: Based on the predefined component field pattern, extract all original name entries identified as components from the structured or semi-structured version component information to form an original component name set; map and compare each item in the original component name set with the authoritative component thesaurus, and uniformly convert various synonyms, common names or trade names into the standard academic names or official names specified in the thesaurus to generate a semantically normalized component set composed of standardized names; Step S1022: Apply the formula-irrelevant information filtering rule set to scan and strip the additional information attached to each component name in the semantically normalized component set; the formula-irrelevant information filtering rule set predefines a series of information patterns unrelated to component identification, such as concentration range, supplier code, processing aid labeling and process notes, etc.; according to the formula-irrelevant information filtering rules, remove all matching auxiliary information fields and retain only the standardized names used to characterize the chemical or biological nature of the components to obtain the core component identification list; Step S1023: Arrange all standardized component names in the core component identification list according to a preset sorting rule to generate an ordered string sequence; apply a cryptographic hash function to the ordered string sequence to generate a hash digest value, which is defined as the unique identifier of the core component identification list; bind and encapsulate the core component identification list with the unique identifier to output the standardized component list.
[0030] In the above embodiments, the process of generating a standardized ingredient list with a unique identifier involves performing ingredient extraction and semantic normalization operations on the version ingredient information. The original ingredient names are extracted according to predefined ingredient field patterns and compared with an authoritative ingredient thesaurus. Various synonyms, common names, or trade names are uniformly converted into standard academic names or official names, forming a semantically normalized ingredient set. Subsequently, a set of formula-irrelevant information filtering rules is applied to scan and strip away additional information associated with each ingredient name in the set. Information patterns irrelevant to ingredient identification, such as concentration ranges, supplier codes, processing aid labels, and process notes, are removed, retaining only the standardized names that characterize the chemical or biological essence of the ingredients, resulting in a core ingredient identification list. All standardized ingredient names in the core ingredient identification list are arranged according to a preset sorting rule to generate an ordered string sequence. A cryptographic hash function is applied to this sequence to generate a hash digest value, which serves as the unique identifier for the core ingredient identification list. Finally, the core ingredient identification list and the unique identifier are bound and encapsulated to output the standardized ingredient list. This embodiment achieves authoritative unification and information purification of component names, eliminates differences in expression and redundant interference, and ensures the accuracy and comparability of the list content. At the same time, through deterministic sorting and cryptographic hash binding, it gives the list an immutable and unique identity, providing a reliable technical foundation for the integrity verification, version tracking and cross-system interoperability of component data.
[0031] Example 4: Figure 5 As shown, based on Example 1, the process of outputting a weighted efficacy object including quantitative and qualitative assessments in step S200 of this embodiment of the invention specifically includes the following steps: Step S201: Receive the quality score, and the mechanism coverage description and efficacy endpoint coverage description generated by the mechanism coverage resolution channel for the same component-efficacy pair; pair them according to the identifier data of the component and efficacy, and encapsulate them into evidence-mechanism pairs; Step S202: Using a pre-defined quantitative calibration framework and the numerical value of the quality score, assess the credibility of the mechanism coverage description and efficacy endpoint coverage description contained therein, and generate an auxiliary qualitative description confidence statement; merge the qualitative description confidence statement with the evidence-mechanism pair to form a fusion element tuple; Step S203: According to the predefined structure template, organize the identifiers, efficacy keywords, quality scores and qualitative descriptions of the qualitative description confidence statements in the fusion element tuple to generate a structured efficacy entry; repeat this operation for all related component-efficacy pairs of the component, and then package all entries into a weighted efficacy object of the component.
[0032] In the above embodiments, this embodiment outputs a weighted efficacy object containing quantitative and qualitative assessments. It receives quality scores, mechanism coverage descriptions, and efficacy endpoint coverage descriptions, pairs them according to component and efficacy identifiers, and encapsulates them into evidence-mechanism pairs. Subsequently, using a preset quantitative calibration framework, the credibility of the mechanism coverage description and efficacy endpoint coverage description is assessed using the quality score values, generating an accompanying qualitative description confidence statement. This statement is then merged with the evidence-mechanism pair to form a fusion element tuple. Following a predefined structural template, the identifiers, efficacy keywords, quality scores, and two qualitative descriptions from the qualitative description confidence statement in the fusion element tuple are organized to generate structured efficacy entries. This operation is repeated for all relevant component-efficacy pairs, and all entries are packaged into a weighted efficacy object for the component. This embodiment achieves structured integration and credible quantification of evidence data, systematically associating quantitative scores with qualitative descriptions to ensure the interpretability and comparability of efficacy assessments. Simultaneously, through a standardized encapsulation format, it provides a unified and scalable data foundation for multi-dimensional analysis, weight calculation, and decision support.
[0033] Example 5: Based on Example 4, the process of evaluating the credibility of the mechanism coverage description and efficacy endpoint coverage description included in step S202 of this embodiment of the invention specifically includes the following steps: Step S2021: Invoke the preset mapping relationship between continuous quality score ranges and discrete confidence levels; compare the quality score values with the ranges to determine the specific range to which it belongs, and generate a level label representing the absolute confidence level. Step S2022: Obtain a predefined confidence phrase template for each possible rank marker to be applied before the descriptive text; select the corresponding confidence phrase template according to the rank marker, and append it to the beginning position of the original mechanism coverage description and efficacy endpoint coverage description text respectively to generate the confidence-modified mechanism coverage description and the confidence-modified efficacy endpoint coverage description. Step S2023: Organize and encapsulate the grading label, the confidence-modified mechanism coverage description, and the confidence-modified efficacy endpoint coverage description according to the structured declaration format: the grading label serves as the core conclusion of the declaration, and the two modified description texts serve as the specific application of the core conclusion; the encapsulated whole is a qualitative description confidence statement.
[0034] In the above embodiments, the process of credibility assessment for mechanism coverage description and efficacy endpoint coverage description in this embodiment involves comparing the quality score values with the numerical ranges by invoking a preset mapping relationship between continuous quality score ranges and discrete credibility levels, determining the specific range to which the quality score belongs, and generating a level label representing the absolute credibility level. Subsequently, a predefined confidence phrase template is obtained for each possible level label and applied before the descriptive text. The corresponding confidence phrase template is selected based on the level label and appended to the beginning of the original mechanism coverage description and efficacy endpoint coverage description text, respectively, to generate confidence-modified mechanism coverage description and confidence-modified efficacy endpoint coverage description. Then, the level label, confidence-modified mechanism coverage description, and confidence-modified efficacy endpoint coverage description are organized and encapsulated according to a structured declaration format: the level label serves as the core conclusion of the declaration, and the two modified descriptive texts serve as the specific application of the core conclusion; the encapsulated whole is a qualitative descriptive confidence statement. This embodiment achieves an objective mapping from quantitative scores to qualitative confidence levels, avoiding the arbitrariness of subjective judgment; it standardizes and modifies the original descriptive text through confidence phrases, forming an explicit and consistent association between qualitative statements and quantitative evidence; and finally, it outputs a statement in a structured encapsulation format, ensuring the clarity, traceability, and direct usability of the evaluation conclusions in subsequent processes.
[0035] Example 6: As Figure 6 As shown, based on Example 1, the process of the large language model transcribing the content of structured knowledge fragments into summary text in step S300 of this embodiment of the invention specifically includes the following steps: Step S301: Based on the unique identifier of the component, match each weighted efficacy object to the corresponding component entry in the factual baseline; after successful matching, bind all data in the weighted efficacy object, including quality score, mechanism coverage description, efficacy endpoint coverage description and associated risk data, as supplementary information to the baseline component entry to generate enhanced component entries; after completing the operation on all components, an aggregated dataset composed of all enhanced component entries in an ordered manner is obtained. Step S302: Using the product and fact benchmark as the root node, each component as a branch node, and the text representation method, hierarchical markers, and field separators for all subordinate data fields of efficacy, score, and description under them; serialize and structure the aggregated dataset to output a structured knowledge fragment containing complete structured information; Step S303: The structured knowledge fragment is used as the data payload and filled into the reserved insertion area of the instruction template; the instruction prefix, data payload and instruction suffix are assembled together and submitted to the large language model to perform a controlled text generation task; the instruction template consists of an instruction prefix, a reserved data insertion area and an instruction suffix; the instruction prefix contains mandatory operation instructions.
[0036] In the above embodiments, this embodiment describes the process of transcribing the content of structured knowledge fragments into summary text. It matches each weighted efficacy object to the corresponding component entry in the factual baseline based on the unique identifier of each component. Upon successful matching, all data within the weighted efficacy object, including quality scores, mechanism coverage descriptions, efficacy endpoint coverage descriptions, and associated risk data, are treated as supplementary information and bound to the baseline component entry to generate enhanced component entries. After completing the operation on all components, an aggregated dataset composed of all enhanced component entries is obtained. Subsequently, following the text representation method of the product and factual baseline as root nodes, each component as a branch node, and all its subordinate efficacy, score, and description supplementary data fields, hierarchical markers, and field separators, the aggregated dataset is serialized and structurally assembled to output a structured knowledge fragment containing complete structured information. This structured knowledge fragment is then used as a data payload and filled into the reserved insertion area of the instruction template. The instruction prefix, data payload, and instruction suffix are assembled together and submitted to the large language model to perform a controlled text generation task. The instruction template consists of an instruction prefix, a reserved data insertion area, and an instruction suffix; the instruction prefix contains mandatory operation instructions. This embodiment achieves system integration from scattered weighted efficacy objects to a unified aggregated dataset, ensuring accurate correlation and integrity between data and benchmark items; by defining well-defined text representation methods and structural tags, complex hierarchical data is transformed into machine-parsable and human-readable structured knowledge fragments, laying the foundation for automated processing; finally, through the standardized encapsulation of instruction templates, the input format and task objectives of the large language model are constrained, enabling it to generate compliant, accurate, and stylistically consistent summary text based on structured data, thereby improving the reliability, repeatability, and output quality of the knowledge transformation process.
[0037] Example 7: Based on Example 6, the process of serializing and assembling the aggregated dataset in step S302 of this embodiment of the invention specifically includes the following steps: Step S3021: Apply the text representation method defined for the root node field to convert the overall information of the product and factual benchmark into a text sequence, forming the root node text unit; for each component entry in the aggregated dataset, apply the text representation method defined for the branch node field to convert the component name itself into a text sequence; for each auxiliary data field under the component entry, including efficacy name, quality score, and mechanism coverage description, apply the corresponding text representation method defined for the auxiliary data field to convert them one by one into a text string with type labels; the set of all branch node field texts and all auxiliary data field text strings under a component constitutes the component's primary text unit set; Step S3022: Use the root node start symbol and end symbol to encapsulate the root node text unit into a root node encapsulation block; for each component primary text unit set, use the branch node start symbol, then arrange all the text strings in the set in a fixed order, and then use the branch node end symbol to encapsulate the entire sequence into a component encapsulation block. Step S3023: Place the root node encapsulation block, and then add a structure block separator after it; arrange all component encapsulation blocks in the original order of the components in the aggregated dataset, and insert the same main structure block separator between every two component encapsulation blocks; connect the root node encapsulation block, the separator, and all component encapsulation blocks with the separator to generate a structured knowledge fragment.
[0038] In the above embodiments, this embodiment defines text representation methods for different level fields, converting product information, ingredient entries, and their associated data into a unified text sequence, ensuring the standardization and normalization of the original data and providing a foundation for structured processing. It establishes a clear hierarchical structure by using root node start and end symbols to encapsulate overall information and branch node start and end symbols to encapsulate ingredient data. Combining this with a fixed-order arrangement of text strings ensures consistency in the internal format of each data unit. By placing root node encapsulation blocks, adding structure block separators, arranging ingredient encapsulation blocks in their original order, and inserting unified separators between each ingredient encapsulation block, a clear division of data hierarchy and order is achieved. Finally, connecting all encapsulation blocks and separators generates a structured knowledge fragment with strict hierarchical relationships and sequential logic.
[0039] In summary, this embodiment achieves the transformation from unstructured or semi-structured aggregated data to normalized, parsable structured text, ensuring accurate preservation of data hierarchy, order, and relevance, and providing directly usable structured input for downstream knowledge storage, retrieval, or further processing.
[0040] Example 8: Based on Example 7, the process of connecting the root node encapsulation block, the separator, and all component encapsulation blocks with the separator in step S3023 of this embodiment of the invention specifically includes the following steps: Step S30231: Create a temporary initialization structured context container to temporarily store text components in sequence; write the generated root node encapsulation block as the first text component into the initialization structured context container; Step S30232: Write the predefined structure block separator as the second text component into the initialized structured context container, immediately after the root node encapsulation block; traverse each component encapsulation block in the determined order; for each component encapsulation block encountered, write it as a text component into the initialized structured context container, and write the same structure block separator into the initialized structured context container, placing it after the component encapsulation block; perform this step on all component encapsulation blocks except the last one. Step S30233: After all root node encapsulation blocks, all delimiters and all component encapsulation blocks are written into the initialized structured context container according to the above rules, sequential context serialization assembly is performed on the contents of the initialized structured context container to seamlessly combine all text components into a text string in the order in which they were written; the generated text string is a structured knowledge fragment.
[0041] In the above embodiments, this embodiment creates a temporary initialization structured context container to ensure that text components are temporarily stored and arranged in a predetermined order, avoiding order disorder or omission during the splicing process. The root node encapsulation block is written as the first component, establishing the basic framework and logical starting point of the structured knowledge fragment. Predefined structure block separators are inserted as fixed intervals to clearly distinguish the hierarchy and boundaries between the root node and each component encapsulation block, ensuring structural clarity and parsability. Component encapsulation blocks and their subsequent separators are traversed and written sequentially, so that each component unit obtains an independent identifier while maintaining the ordered association between components. Separators are added to all units except the last component encapsulation block to avoid redundant symbols at the end, improving the regularity of the string and storage efficiency. Finally, sequential context serialization assembly is performed on the buffer content to seamlessly combine all text components into a single text string, forming a complete and uniformly formatted structured knowledge fragment. This ensures the integrity of knowledge representation, the coherence of serialized storage, and the reliability of subsequent parsing processing. This embodiment reflects a specific data organization method adopted to solve the technical problems of limited LLM input window (TokenLimit) or sensitivity to input format.
[0042] Example 9: Based on Example 8, the process of creating a temporary initialization structured context container in step S30231 of this embodiment of the invention specifically includes the following steps: Step S302311: The requirement to generate structured knowledge fragments is used as the initial operation instruction; according to the initial operation instruction, an initialized structured context container of a specified size is allocated in the internal working memory, and all storage units of the initialized structured context container are initialized to an empty state; the initialized structured context container is specifically designated for the sequential temporary storage of text components. Step S302312: After completing the initialization of the structured context container reservation, a buffer descriptor is generated; the buffer descriptor contains two key attributes: one is a memory address reference pointing to the starting position of the initialized structured context container; the other is a key-value pair assembly used to identify the current write position, and the initial value of the key-value pair assembly is set to zero; the buffer descriptor serves as the sole control handle for managing this temporary storage area. Step S302313: The created resource combination consisting of an initialized structured context container and a buffer descriptor is marked as writable; an initialized structured context container that conforms to the definition is officially ready and serves as the target container for writing text components.
[0043] In the above embodiments, this embodiment uses the need to generate structured knowledge fragments as the initial operation instruction to ensure that the creation of the buffer has a clear purpose and contextual relevance, avoiding blind resource allocation. According to this instruction, a specified-size initialization structured context container is allocated in the internal working memory, providing physically contiguous and capacity-controlled storage space for the sequential storage of text components, which is beneficial for improving data locality and access efficiency. All storage units of the initialization structured context container are initialized to an empty state to eliminate interference from residual data on subsequent operations, ensuring the purity and consistency of the initial state of the buffer. After the initialization of the structured context container is completed, a buffer descriptor is generated. This descriptor contains a memory address reference pointing to the beginning of the memory segment and a key-value pair assembly identifying the current write position. The memory address reference provides an accurate location entry for subsequent read and write operations, and the initial value of the key-value pair assembly is zero, enabling controllable tracking and management of the write position. As the sole control handle for managing the temporary storage area, the buffer descriptor unifies all access and control operations on the buffer, enhancing the encapsulation and security of resource management. The resource combination consisting of the initialized structured context container and the buffer descriptor is marked as writable, making it a ready-to-use initialized structured context container, which can then be used as the target container for subsequent text component writing. This embodiment implements a complete initialization process from memory resource allocation to logical container readiness, ensuring that the buffer has sequential storage capability in its structure and is in a ready state that can be used immediately, providing a stable and efficient infrastructure for the sequential temporary storage and splicing of subsequent text components.
[0044] Example 10: Based on Example 9, the process of generating a buffer descriptor in step S302312 of this embodiment of the invention specifically includes the following steps: Step S3023121: Perform a memory address acquisition operation to obtain the storage address value of the starting position of the initialized structured context container in the system memory space; encapsulate the storage address value into an immutable memory address reference object; Step S3023122: Perform pointer structure creation operation to generate a key-value pair assembly structure; perform data object instantiation and parameter validation; Step S3023123: Take the generated memory address reference object and the created and initialized key-value pair assembly structure as input, perform the descriptor assembly operation, create a new data structure instance, and assign the two key attribute slots of the data structure instance to the memory address reference object and the key-value pair assembly structure respectively; after assembly, a buffer descriptor is generated.
[0045] In the above embodiments, this embodiment obtains the absolute address value of the starting position of the initialized structured context container in the system memory space and encapsulates it into an immutable memory address reference object, ensuring the stability and immutability of the reference to the memory region and providing reliable basic positioning information for subsequent operations; by creating a key-value pair assembly structure containing an internal storage unit of integer value and initializing the value of the storage unit to zero, a dynamically adjustable data write starting position identifier is established, thereby achieving precise control and flexible management of the internal offset of the buffer; by assembling the memory address reference object and the initialized key-value pair assembly structure into a new data structure instance and assigning both to key attribute slots, a complete buffer descriptor is constructed; by integrating the fixed starting address and variable internal offset of the memory region to form a unified management unit, the system can efficiently and securely access and operate the initialized structured context container, while supporting sequential writing and random access requirements of data, improving the reliability and execution efficiency of memory operations.
[0046] Example 11: Based on Example 10, the process of creating a new data structure instance in step S3023123 of this embodiment of the invention specifically includes the following steps: Step S30231231: Based on the names and data types of the two attribute slots required by the defined buffer descriptor, generate an uninitialized instance frame in memory that conforms to the type constraints and whose attribute slots have been allocated but not yet assigned values; Step S30231232: Perform instantiation operation on the uninitialized instance framework. According to the memory layout defined by the structure type definition, allocate and fix the alignment and construction space of the specific vector dimension occupied by the instance, and generate a blank structure instance with independent addressing and operation; the attribute slots of the blank structure instance are in a state of waiting to be filled. Step S30231233: Perform the attribute assignment operation, write the memory address reference object to the specified first attribute slot, and write the key-value pair assembly structure to the specified second attribute slot.
[0047] In the above embodiments, this embodiment generates an uninitialized instance framework in memory that conforms to type constraints and has allocated but not assigned values for the attribute slots, based on the names and data types of the two attribute slots required by the buffer descriptor. This ensures that the internal composition and type specifications of the data structure are clearly defined before creation, providing a strict type safety foundation for instantiation. By performing an instantiation operation on the uninitialized instance framework, the alignment and construction space of the specific vector dimension occupied by the instance are allocated and fixed according to the memory layout specified by the structure type definition, generating a blank structure instance with independent addressing and operation. This allows the instance to obtain a definite and continuous space allocation in memory, with independent address identification and operability, while keeping the attribute slots in a state of waiting to be filled, preparing for attribute assignment. By performing attribute assignment operations, the memory address reference object is written to the specified first attribute slot, and the key-value pair assembly structure is written to the specified second attribute slot, completing the filling of the key attributes of the blank structure instance. This operation transforms the instance from a blank state into a fully functional data structure, integrating memory address references and key-value pair assembly to form a valid descriptor instance that can be directly used for buffer management. This ensures that the data structure instance can accurately identify the buffer location and support offset control during memory operations, thereby improving the accuracy of memory access and the reliability of system execution.
[0048] Example 12: As Figure 7 As shown, based on Examples 1-11, the recipe parsing system based on multi-stage knowledge base constraints and heuristic logic provided in this embodiment of the invention includes: The Fact Baseline Determination Module 1 is responsible for receiving the product name, querying the first knowledge base, obtaining the officially filed ingredient list of the product, and establishing the ingredient list as the fact baseline. Content description fusion module 2 is responsible for processing each component in the ingredient list in parallel using two collaborative parsing channels; it fuses the quality score corresponding to each component with the mechanism coverage description and efficacy endpoint coverage description, and outputs a weighted efficacy object containing quantitative and qualitative assessments. In the evidence confidence quantification channel, the potential efficacy association of each component is submitted to the second knowledge base for retrieval; the evidence scoring engine calculates a quantified quality score for each component-efficacy pair based on the preset authority level of the data source and the number of supporting documents in the retrieval results through a weighted algorithm; in the mechanism coverage analysis channel, semantic analysis is performed on the same retrieval result text to extract the path information of the component acting on the biological target, and to generate a mechanism coverage description describing the integrity of the action path and an efficacy endpoint coverage description describing the final effect range. The weighted summation module 3 is responsible for aggregating factual benchmarks and weighted efficacy objects, along with their associated mechanisms and risks, and serializing them into structured knowledge fragments. It constructs prompts containing strict meta-instructions, and the large language model paraphrases the content of the structured knowledge fragments into summary text. Simultaneously, it extracts quality scores as weighting coefficients, performs weighted summation on the efficacy primitives contributed by each component, generates a product efficacy power vector, and outputs a structured product analysis report containing the product efficacy power vector and controlled generated text. The product efficacy power vector represents an objective efficacy assessment based on the strength of scientific evidence rather than simply the amount of added ingredients. Here, efficacy primitives are the minimized, structured efficacy quantification units created by the system for each verified ingredient-efficacy association; they include the specific efficacy claim associated with the association, the strength of scientific evidence supporting the claim, quantified by quality scores, and an optional description of the mechanism pathway; efficacy primitives refer to a pre-defined set of standardized biological or chemical evaluation dimensions, including but not limited to: tyrosinase inhibition rate, matrix metalloproteinase-1 (MMP-1) expression level, or stratum corneum moisture content enhancement value; in the process of generating product efficacy power vectors, the heuristic logic also includes: performing non-linear weight correction on specific ingredient combinations (such as vitamin C and ferulic acid) based on the synergistic / antagonistic rule set in the second knowledge base; when a synergistic effect confirmed by scientific literature is detected between ingredients, the efficacy primitive weights corresponding to the combination are heuristically enhanced.
[0049] In the above embodiments, the fact benchmark determination module of this embodiment obtains the official registered ingredient list of the product by receiving the product name and querying the first knowledge base, thus establishing the fact benchmark. This process ensures that the analysis process is based on accurate registered ingredient information, avoiding benchmark bias caused by subjective assumptions or unreliable sources, and providing a credible data starting point for subsequent analysis. The content description fusion module uses dual-channel parallel processing for each ingredient to achieve deep integration of quantitative assessment and qualitative description. The evidence confidence quantification channel calculates a quality score for each ingredient-efficacy pair through retrieval from the second knowledge base and a weighted algorithm based on preset authority levels and the number of documents, assigning quantifiable scientific evidence strength to the efficacy association. The mechanism coverage analysis channel analyzes the same search results, extracts the action path information, and generates mechanism coverage and efficacy endpoint coverage descriptions, revealing the biological path and effect range of the ingredient's action. The outputs of the two channels are fused into a weighted efficacy object, forming a complete ingredient efficacy profile that simultaneously includes quantitative scores and qualitative path descriptions. The weighted summation module aggregates the fact benchmark, weighted efficacy object, and related mechanism and risk data, and serializes and constructs structured knowledge fragments. By constructing a prompt-driven large language model with strict meta-instructions, structured content is transformed into summary text, achieving a reliable conversion from machine-readable data to natural language descriptions. Simultaneously, a weighted summation of the efficacy primitives contributing each ingredient is performed, using quality scores as weighting coefficients, to generate a product efficacy vector. This vector represents an objective efficacy assessment based on the strength of scientific evidence rather than simply the amount of ingredients added. The output is a structured product analysis report containing the efficacy vector and controlled generated text, ensuring that the evaluation results are both computationally rigorous and readable.
[0050] Figure 8 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present invention is shown.
[0051] The electronic device may include a central processing unit / microprocessor / main control chip 4; and a storage medium 5 coupled to the central processing unit / microprocessor / main control chip 4 and storing computer-executable instructions therein for performing the steps of various methods of embodiments of the present invention when executed by the processor.
[0052] The central processing unit / microprocessor / main control chip 4 may include, but is not limited to, one or more processors or microprocessors.
[0053] Storage medium 5 may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, computer storage media (e.g., hard disk, floppy disk, solid-state drive, removable disk, CD-ROM, DVD-ROM, Blu-ray disc, etc.).
[0054] In addition, the electronic device may include (but is not limited to) a data bus 6, an input / output bus / external bus / device bus 7, a display 8, and input / output devices 9 (e.g., keyboard, mouse, speaker, etc.).
[0055] The central processing unit / microprocessor / main control chip 4 can communicate with external devices (8, 9, etc.) via wired or wireless networks (not shown) through the input / output bus / external bus / device bus 7.
[0056] The storage medium 5 may also store at least one computer-executable instruction for performing the steps of various functions and / or methods in the embodiments described herein when run by the central processing unit / microprocessor / main control chip 4.
[0057] In one embodiment, the at least one computer-executable instruction may also be compiled into or comprise a software product, wherein one or more computer-executable instructions are executed by a processor to perform the steps of the various functions and / or methods in the embodiments described herein.
[0058] Figure 9 A schematic diagram of a computer-readable storage medium according to an embodiment of the present invention is shown.
[0059] like Figure 9 As shown, the non-transitory computer-readable storage medium 11 stores instructions, such as computer-readable instructions 10. When the computer-readable instructions 10 are executed by a processor, the various methods described above can be performed. The non-transitory computer-readable storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-transitory non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. For example, the non-transitory computer-readable storage medium 11 can be connected to a computing device such as a computer, and then, when the computing device executes the computer-readable instructions 10 stored on the non-transitory computer-readable storage medium 11, the various methods described above can be performed.
[0060] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0061] The units described as separate components may or may not be physically separate. 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 units can be selected to achieve the purpose of this embodiment according to actual needs.
[0062] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0063] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for executing all or part of the steps of the methods of the various embodiments of this invention through a computer device (which may be a personal computer, server, or network device, etc.). The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0064] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A recipe parsing method based on multi-stage knowledge base constraints and heuristic logic, characterized by, Includes the following steps: Each component in the ingredient list is processed in parallel using two collaborative parsing channels; the mass fraction corresponding to each component is fused with the mechanism coverage description and efficacy endpoint coverage description to output a weighted efficacy object containing quantitative and qualitative assessments. The system aggregates factual benchmarks and weighted efficacy objects, along with their associated mechanisms and risk data, and serializes them into structured knowledge fragments. It then constructs prompts containing strict meta-instructions, and a large language model paraphrases the content of the structured knowledge fragments into summary text. Simultaneously, it extracts quality scores as weighting coefficients, performs weighted summation on the efficacy primitives contributed by each component, generates a product efficacy power vector, and outputs a structured product analysis report containing the product efficacy power vector and controlled generated text.
2. The multi-stage knowledge base constraint and heuristic logic based recipe resolution method of claim 1, wherein, in, In the evidence confidence quantification channel of the analytical channel, the potential efficacy association of each component is submitted to the second knowledge base for retrieval; the evidence scoring engine calculates a quantitative quality score for each component-efficacy pair through a weighted algorithm based on the preset authority level of the data source and the number of supporting documents in the retrieval results. In the mechanism coverage parsing channel of the parsing channel, semantic parsing is performed on the same search result text to extract the path information of the component acting on the biological target, and to generate a mechanism coverage description describing the integrity of the action path and an efficacy endpoint coverage description describing the final effect range.
3. The multi-stage knowledge base constraint and heuristic logic based recipe resolution method of claim 1, wherein, The process of outputting a weighted efficacy object that includes both quantitative and qualitative assessments includes the following steps: Receive quality scores, as well as mechanism coverage descriptions and efficacy endpoint coverage descriptions generated by the mechanism coverage resolution channel for the same ingredient-efficacy pair; pair them according to the identifier data of ingredients and efficacy, and encapsulate them into evidence-mechanism pairs; Using a pre-defined quantitative calibration framework and quality score values, the credibility of the mechanism coverage description and efficacy endpoint coverage description contained therein is assessed, and an auxiliary qualitative description confidence statement is generated. The qualitative description confidence statement is then merged with the evidence-mechanism pair to form a fusion element tuple. Following a predefined structural template, the identifiers, efficacy keywords, quality scores, and qualitative descriptions of the qualitative description confidence statements in the fusion element tuples are organized to generate a structured efficacy entry. This operation is repeated for all related component-efficacy pairs of the component, and all entries are packaged and encapsulated into a weighted efficacy object of the component.
4. The recipe parsing method based on multi-stage knowledge base constraints and heuristic logic as described in claim 1, characterized in that, The process by which a large language model paraphrases structured knowledge fragments into summary text includes the following steps: Based on the unique identifier of each component, each weighted efficacy object is matched to the corresponding component entry in the factual baseline. After a successful match, all data within the weighted efficacy object, including quality score, mechanism coverage description, efficacy endpoint coverage description, and associated risk data, are treated as supplementary information and bound to the baseline component entry to generate an enhanced component entry. After completing the operation on all components, an aggregated dataset composed of all enhanced component entries is obtained. The text representation method based on the product and factual benchmarks as the root node, with each component as a branch node and all its subordinate data fields of efficacy, score and description, hierarchical markers and field separators; The aggregated dataset is serialized and structurally assembled to output structured knowledge fragments containing complete structured information; Structured knowledge fragments are used as data payloads and filled into the reserved insertion area of the instruction template; the instruction prefix, data payload, and instruction suffix are assembled together and submitted to the large language model to perform a controlled text generation task; the instruction template consists of an instruction prefix, a reserved data insertion area, and an instruction suffix; the instruction prefix contains mandatory operation instructions.
5. The recipe parsing method based on multi-stage knowledge base constraints and heuristic logic as described in claim 4, characterized in that, The process of serializing and assembling aggregated datasets into structures includes the following steps: The text representation method defined for the root node field is applied to convert the overall information of the product and factual benchmark into a text sequence, forming the root node text unit. For each component entry in the aggregated dataset, the text representation method defined for the branch node field is applied to convert the component name itself into a text sequence. For each auxiliary data field under the component entry, including efficacy name, quality score, and mechanism coverage description, the corresponding text representation method defined for the auxiliary data field is applied to convert them one by one into a text string with type labels. The set of all branch node field texts and all auxiliary data field text strings under a component constitutes the component's primary text unit set. Using root node start and end symbols, the root node text unit is encapsulated into a root node encapsulation block; for each component primary text unit set, a branch node start symbol is used, then all text strings in the set are arranged in a fixed order, and finally a branch node end symbol is used to encapsulate the entire sequence into a component encapsulation block. Place the root node encapsulation block, and then add a structure block separator after it; arrange all component encapsulation blocks in the original order of the components in the aggregated dataset, and insert the same main structure block separator between every two component encapsulation blocks; connect the root node encapsulation block, the separator, and all component encapsulation blocks with the separator to generate a structured knowledge fragment.
6. The recipe parsing method based on multi-stage knowledge base constraints and heuristic logic as described in claim 5, characterized in that, The process of concatenating the root node encapsulation block, the delimiter, and all component encapsulation blocks with the delimiter includes the following steps: Create a temporary initialization structured context container to temporarily store text components in sequence; write the generated root node encapsulation block as the first text component into the initialization structured context container; Write the predefined structure block separator as the second text component into the initialized structured context container, immediately following the root node encapsulation block; In the predetermined order, traverse each component encapsulation block; for each component encapsulation block encountered, write it as a text component into the initialized structured context container, write the same structure block separator into the initialized structured context container, and place it after the component encapsulation block; perform this process on all component encapsulation blocks except the last one. After all root node encapsulation blocks, all delimiters, and all component encapsulation blocks are written into the initialized structured context container according to the rules, sequential context serialization assembly is performed on the contents of the initialized structured context container to seamlessly combine all text components into a text string in the order they were written; the generated text string is a structured knowledge fragment.
7. The recipe parsing method based on multi-stage knowledge base constraints and heuristic logic as described in claim 6, characterized in that, The process of creating a temporary, initialized structured context container includes the following steps: The initial operation instruction is to generate structured knowledge fragments. Based on the initial operation instruction, an initial structured context container of a specified size is allocated in the internal working memory, and all storage units of the initial structured context container are initialized to an empty state. After the initialization of the structured context container is completed, a buffer descriptor is generated. The buffer descriptor contains two key attributes: one is a memory address reference pointing to the starting position of the initialized structured context container; the other is a key-value pair assembly used to identify the current write position, and the initial value of the key-value pair assembly is set to zero. The created resource combination, consisting of an initialized structured context container and a buffer descriptor, is marked as writable; a defined initialized structured context container is then ready and serves as the target container for writing text components.
8. The recipe parsing method based on multi-stage knowledge base constraints and heuristic logic as described in claim 7, characterized in that, The process of generating a buffer descriptor includes the following steps: Perform a memory address retrieval operation to obtain the storage address value of the initial location of the structured context container in the system memory space; encapsulate the storage address value into an immutable memory address reference object; Perform pointer structure creation operations to generate a key-value pair assembly structure; perform data object instantiation and parameter validation; The generated memory address reference object and the created and initialized key-value pair assembly structure are taken as input. The descriptor assembly operation is performed to create a new data structure instance. The two key attribute slots of the data structure instance are assigned to the memory address reference object and the key-value pair assembly structure, respectively. After assembly, a buffer descriptor is generated.
9. The recipe parsing method based on multi-stage knowledge base constraints and heuristic logic as described in claim 8, characterized in that, The process of creating a new data structure instance includes the following steps: Based on the names and data types of the two attribute slots required by the defined buffer descriptor, generate an uninitialized instance frame in memory that conforms to the type constraints and whose attribute slots have been allocated but not yet assigned values; Instantiation is performed on the uninitialized instance framework. Based on the memory layout defined by the structure type, the alignment and construction space of the specific vector dimension occupied by the instance is allocated and fixed, generating a blank structure instance that can be addressed and operated independently; the attribute slots of the blank structure instance are in a state of waiting to be filled. Perform the property assignment operation, writing the memory address reference object to the specified first property slot and the key-value pair assembly structure to the specified second property slot.
10. The recipe parsing method based on multi-stage knowledge base constraints and heuristic logic as described in claim 1, characterized in that, It also includes receiving the product name, querying the first knowledge base, obtaining the officially registered ingredient list of the product, and establishing the ingredient list as the factual benchmark.
Citation Information
Patent Citations
Geological ecological suitability evaluation method and system
CN118586727A
Cosmetic formula development method, system and equipment and storage medium
CN120388642A
Formula optimization method and device, equipment and storage medium
CN120911122A
Empirical knowledge graph construction and question answering method based on heuristic self-question answering
CN121210633A