Optimization method and system for raw material proportioning of cassia seed capsules based on knowledge graph

CN122842809APending Publication Date: 2026-09-29CHENGDU UNIV OF TRADITIONAL CHINESE MEDICINE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611066485.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0005]为了解决现有技术存在的沿用常规且相对宽松的静态边界进行配比优化,导致最终输出的配比方案可靠性降低的技术问题,本发明实施例提供了基于知识图谱的决明子胶囊原料配比优化方法及系统

Benefits of technology

[0009]1、本发明通过构建多层递进的动态安全边界修正机制,有效解决了传统固定阈值体系无法适应多批次原料个体差异的核心问题。以游离占比修正系数、变异置信度修正系数、历史预测偏差修正系数、复合风险降级修正系数及水分修正系数为核心,分别对应成分结构风险、检测可靠性风险、预测系统误差、多维复合毒性风险和水分质量风险五个独立维度,依次作用于基础安全边界,形成各批次专属的内控上限数据,这一机制使安全控制边界能够随批次实际质量特征自适应收紧或维持,在切实保障终产品蒽醌暴露安全性的同时,避免了固定边界方案对质量合格批次造成的不必要资源浪费,实现了精细化、差异化的多批次原料安全管控。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122842809A_ABST
    Figure CN122842809A_ABST
Patent Text Reader

Abstract

The application discloses a knowledge graph-based optimization method and system for raw material proportioning of Cassiae Semen capsules, and belongs to the technical field of biological medicine manufacturing. The application obtains detection data of total anthraquinone and free anthraquinone content of Cassiae Semen batches, calculates the variation coefficient and the proportion of free anthraquinone, generates a dynamic correction coefficient in combination with a preset threshold value, then adjusts the basic safety boundary in the knowledge graph by using the correction coefficient, generates upper limit data of internal control of total anthraquinone and free anthraquinone, then takes the mixing proportion and the mass proportion as variables to calculate the predicted intake of total anthraquinone and free anthraquinone based on the detection data and the preparation specifications, and finally solves the problem under the constraint that the predicted intake does not exceed the upper limit data of internal control, and outputs a proportioning scheme with the optimal mixing proportion and mass proportion, thereby improving the reliability of the output proportioning scheme and solving the problem of reduced reliability of the output proportioning scheme in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of biopharmaceutical manufacturing technology, and in particular to a method and system for optimizing the proportion of raw materials for cassia seed capsules based on knowledge graphs. Background Technology

[0002] Cassia seed, a commonly used medicinal herb, contains anthraquinones, which are key active ingredients for its efficacy but also pose potential safety risks. Controlling the content of free anthraquinones is particularly crucial. In the industrial production of cassia seed capsules and other preparations, the composition of different batches of cassia seed raw materials naturally fluctuates significantly due to variations in origin, harvesting, and storage. To ensure the efficacy of the final drug and strictly control patient safety, rigorous calculation and control of the formulation ratios of multiple batches of raw materials are essential during the raw material production process.

[0003] Existing raw material ratio control technologies typically employ static fixed threshold control. Specifically, the system pre-defines fixed upper and lower safety limits for total anthraquinones and free anthraquinones based on industry standards or historical production experience. Before production begins, the system acquires individual detection data for each batch of raw materials. Then, using these pre-defined fixed safety limits as hard constraints, it performs calculations using a basic linear programming algorithm to ensure that the calculated theoretical component content of each batch of raw materials falls within the aforementioned fixed boundary range, thus outputting the final ratio scheme.

[0004] While this static, fixed-threshold-based proportioning control method offers straightforward calculations and low system implementation difficulty, providing fundamental quality control for industrial production, it suffers from reliability flaws when dealing with complex natural medicinal materials. Existing proportioning systems rely on rather rigid safety control boundaries, treating detection data merely as static values. This leads to the system continuing to apply conventional and relatively lenient static boundaries for proportioning optimization even when facing high-risk raw material batches with abnormal component structures or low detection confidence levels, resulting in reduced reliability of the final output proportioning scheme. Summary of the Invention

[0005] To address the technical problem of existing technologies using conventional and relatively loose static boundaries for proportion optimization, which leads to reduced reliability of the final output proportion scheme, this invention provides a knowledge graph-based method and system for optimizing the proportion of raw materials for cassia seed capsules. The technical solution is as follows:

[0006] On the one hand, a knowledge graph-based method for optimizing the proportion of raw materials for cassia seed capsules is provided. This method includes: acquiring batch detection data, blending ratios, and the mass percentage of cassia seed raw materials in each batch of candidate cassia seed raw materials; the batch detection data includes the total anthraquinone content, the free anthraquinone content, and a set of multiple sampling detection values ​​for the same batch of candidate cassia seed raw materials; calculating the corresponding detection coefficient of variation and the proportion of free anthraquinone based on the batch detection data, and reading the preset basic safety boundaries for total anthraquinone and free anthraquinone from a pre-built knowledge graph; comparing the proportion of free anthraquinone with a preset proportion threshold, and comparing the detection coefficient of variation with a preset variation threshold, generating corresponding dynamic correction coefficients based on the comparison results; and adjusting the ratio of free anthraquinone with the preset proportion threshold based on the dynamic correction coefficients. The basic safety boundaries for total anthraquinone and free anthraquinone are numerically adjusted to generate upper limits for total anthraquinone and free anthraquinone for each batch of candidate cassia seed raw materials. Based on the detected total anthraquinone and free anthraquinone content and the preset formulation specifications for each batch of candidate cassia seed raw materials, an intake prediction model is constructed with the blending ratio and the mass proportion of cassia seed raw materials as variables. The predicted daily intake of total anthraquinone and the predicted daily intake of free anthraquinone are calculated and output. Under the constraint that the predicted daily intake of total anthraquinone and the predicted daily intake of free anthraquinone do not exceed the target control range defined by the upper limits for total anthraquinone and free anthraquinone, respectively, the intake prediction model is solved to obtain the optimal blending ratio and the optimal mass proportion, which are then used to generate a formulation control scheme for output.

[0007] On the other hand, a knowledge graph-based system for optimizing the proportion of raw materials for cassia seed capsules is provided, comprising: a data acquisition module for acquiring batch detection data, blending ratios, and the mass percentage of cassia seed raw materials in each batch of candidate cassia seed raw materials; the batch detection data including total anthraquinone content, free anthraquinone content, and a set of multiple sampling detection values ​​for the same batch of candidate cassia seed raw materials; a feature extraction module for calculating the corresponding detection variation coefficient and free anthraquinone percentage based on the batch detection data; a boundary correction module for reading preset basic safety boundaries for total anthraquinone and free anthraquinone from a pre-built knowledge graph; comparing the free anthraquinone percentage with a preset percentage threshold and comparing the detection variation coefficient with a preset variation threshold, generating a corresponding dynamic correction coefficient based on the comparison results; and using the dynamic correction coefficient... Numerical adjustments were made to the basic safety boundaries for total anthraquinone and free anthraquinone to generate upper limits for total anthraquinone and free anthraquinone for each batch of candidate cassia seed raw materials. A predictive modeling module was used to construct an intake prediction model based on the detected total anthraquinone and free anthraquinone content and preset formulation specifications for each batch of candidate cassia seed raw materials, using the blending ratio and the mass percentage of cassia seed raw materials as variables. This model calculated and output the predicted daily intake of total anthraquinone and the predicted daily intake of free anthraquinone. A ratio optimization solution module was used to solve the intake prediction model under the constraint that the predicted daily intake of total anthraquinone and the predicted daily intake of free anthraquinone do not exceed the target control range defined by the upper limits for total anthraquinone and free anthraquinone, respectively. This solution yielded the optimal blending ratio and the optimal mass percentage, generating a ratio control scheme for output.

[0008] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:

[0009] 1. This invention effectively solves the core problem that traditional fixed threshold systems cannot adapt to individual differences in multiple batches of raw materials by constructing a multi-layered, progressive dynamic safety boundary correction mechanism. Using the free proportion correction coefficient, variation confidence correction coefficient, historical prediction deviation correction coefficient, composite risk degradation correction coefficient, and moisture correction coefficient as the core, these coefficients correspond to five independent dimensions: component structure risk, detection reliability risk, prediction system error, multi-dimensional composite toxicity risk, and moisture quality risk. These coefficients sequentially apply to the basic safety boundary, forming exclusive internal control upper limit data for each batch. This mechanism allows the safety control boundary to adaptively tighten or maintain according to the actual quality characteristics of each batch. While effectively ensuring the safety of the final product anthraquinone exposure, it avoids unnecessary resource waste caused by fixed boundary schemes for batches that meet quality standards, achieving refined and differentiated safety management of multiple batches of raw materials.

[0010] 2. This invention constructs an intake prediction model using the blending ratio and the proportion of cassia seed raw material mass as two-dimensional decision variables, transforming the multi-batch formulation design problem into a mathematically solvable constrained optimization problem. The model can directly predict the daily anthraquinone intake level of the final product under any blending combination, while simultaneously considering both safety constraints and the bidirectional convergence of historically validated formulation practices, achieving a quantitative balance between safety, efficacy, and production consistency. The dynamic internal control upper limit for each batch and the additional blending ratio limit for moisture are uniformly incorporated into the optimization model, enabling the system to automatically identify and exclude blending combinations that do not meet safety requirements during the solution process. Compared to the traditional formulation design method that relies on manual experience and trial blending, this reduces the possibility of quality and safety hazards caused by overlooking risk factors in the calculation.

[0011] 3. By introducing a pre-built knowledge graph as a structured storage and dynamic maintenance carrier for safety knowledge, regulatory requirements, toxicology literature data, historical batch quality data, and clinical exposure data are organized and stored in the form of semantic nodes and relational edges, supporting structured retrieval based on multi-dimensional attributes such as raw material type and formulation form. After the finished product testing is completed, the system adaptively updates the threshold parameters and component risk weights in the knowledge graph based on the deviation comparison results between the measured values ​​and the predicted values, continuously improving the prediction accuracy with the accumulation of production batches, forming a complete closed loop. In addition, the synchronous output of the boundary correction interpretation path makes the triggering basis and numerical derivation process of each safety boundary tightening operation completely traceable, meeting the requirements of GMP quality system for decision-making transparency and compliance audit. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 A flowchart of a knowledge graph-based method for optimizing the proportion of raw materials for cassia seed capsules, provided in an embodiment of this application;

[0014] Figure 2 This is a schematic diagram of the structure of the knowledge graph-based cassia seed capsule raw material ratio optimization system provided in the embodiments of this application. Detailed Implementation

[0015] Embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of the present disclosure are shown in the drawings, it should be understood that embodiments of the present disclosure may be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure.

[0016] It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure. In the description of the embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "this embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects.

[0017] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0018] like Figure 1 The diagram shows a flowchart of a knowledge graph-based method for optimizing the proportion of raw materials for cassia seed capsules, as provided in an embodiment of this application. The method includes the following steps:

[0019] S1. Obtain batch test data, blending ratio, and mass percentage of each batch of candidate cassia seed raw materials. The batch test data includes total anthraquinone content, free anthraquinone content, and a set of multiple sampling test values ​​for the same batch of candidate cassia seed raw materials.

[0020] It should be explained that in actual production scenarios, the above data are obtained in the following ways. Both the total anthraquinone content and the free anthraquinone content are detected using high-performance liquid chromatography (HPLC) as specified in relevant materials (such as the current edition of the Chinese Pharmacopoeia) under the Cassia tora seed section. The difference lies in the pretreatment method: for total anthraquinone detection, the sample must first undergo acid hydrolysis to hydrolyze bound anthraquinones into free anthraquinones before extraction and chromatographic analysis. The result represents the total amount of anthraquinone components in the sample. For free anthraquinone detection, the sample is directly extracted with an organic solvent without acid hydrolysis. The result only represents the content of anthraquinones in the raw material in free form. The two detection results are entered into the system as the total anthraquinone content and free anthraquinone content of the same batch, respectively. For the set of multiple sampling and testing values ​​of the same batch of cassia seed raw materials, independent sampling is performed at different sampling locations (such as the top, middle, bottom, and four corners of the silo) for the same batch of raw materials. Each sampling point is independently crushed, weighed, and pre-treated before being tested for total anthraquinone content. The test values ​​obtained from each sampling point are summarized to form a set, which reflects the dispersion of component distribution within the batch caused by differences in raw material origin, crushing uniformity, and storage conditions. The initial input value of the blending ratio comes from the reference blending scheme pre-determined by the production planning department based on raw material inventory structure and cost factors, or from the production records of similar historical batches. In this scheme, this parameter participates in subsequent modeling as an adjustable variable. The initial value is only used as the starting point for the solution. The optimal blending ratio is output by the optimization solution step to replace the initial value. The proportion of cassia seed raw material mass is provided by the formulation design document, reflecting the ratio of the mass of cassia seed raw material powder in each capsule to the total mass of the contents. This parameter is also included as an adjustable variable in the optimization model within a certain range, and its value range is preset according to the feasibility requirements of the formulation process.

[0021] Furthermore, batch testing data also includes moisture content; the method also includes: [further details needed for calculating the percentage of free anthraquinones]

[0022] The total anthraquinone content and the free anthraquinone content were determined to be data in wet condition.

[0023] Specifically, in the actual testing practice of Chinese herbal medicine raw materials, the content of anthraquinone components is usually detected in the raw materials under natural conditions without sufficient drying. The obtained values ​​are wet-based contents, which include the dilution effect of moisture on the test results. If wet-based data is directly used in the calculation of the proportion of free anthraquinones and the comparison of safety boundaries, it will lead to systematic deviations between batches due to differences in moisture content. This will cause the anthraquinone content of batches with higher moisture content to be underestimated, thus affecting the accuracy of safety assessment. Traditional processing methods often ignore the difference between wet and dry basis states of the test data. This step, through explicit state labeling, incorporates this potential source of error into the control, which is a key control point to prevent data misuse.

[0024] Based on the moisture content, the detected total anthraquinone content and free anthraquinone content were converted to dry basis values ​​to obtain the dry basis total anthraquinone content and dry basis free anthraquinone content.

[0025] It should be explained that after confirming the wet basis condition, dry basis conversion is used to eliminate the interference of moisture content differences on the cross-comparison of anthraquinone content between batches, so that batch data with different moisture contents have a unified and comparable basis. The core calculation formula for dry basis numerical conversion is as follows:

[0026] ;

[0027] in, Content is on a dry basis (unit: mg / g, based on dry weight). Content is measured on a wet basis (unit: mg / g, based on wet basis mass). This represents the batch moisture content (mass fraction expressed as a decimal). This formula applies to the conversion of total anthraquinone content and free anthraquinone content.

[0028] The total anthraquinone content on a dry basis was used as the updated total anthraquinone content, and the free anthraquinone content on a dry basis was used as the updated free anthraquinone content.

[0029] This step standardizes and updates the data, replacing the original wet-basis total anthraquinone and free anthraquinone content with the dry-basis values ​​obtained from the previous step. This ensures that all subsequent calculations are based on dry-basis data. This replacement avoids calculation errors caused by mixing wet-basis and dry-basis data in different steps, directly guaranteeing the internal consistency and reliability of subsequent calculations of free anthraquinone proportion, intake prediction model construction, and final formulation optimization results.

[0030] When the moisture content exceeds the preset moisture threshold, a moisture correction coefficient with a value less than one is generated. The moisture correction coefficient is then used to lower the internal control upper limit data for total anthraquinone and free anthraquinone.

[0031] It should be noted that this step is executed after step S4 in sequence. At this point, the total anthraquinone internal control limit data and free anthraquinone internal control limit data for each batch have already undergone the cumulative processing of dynamic correction coefficient adjustment in step S3 (first layer) and historical deviation correction and compound risk downgrade correction in step S4 (second and third layers), rather than being directly based on the original value of the basic safety boundary read in step S2. This step further introduces the risk dimension of excessive moisture on the basis of the adjusted internal control limit, constructing an additional tightening mechanism for the internal control limit, mapping the quality risk factor of excessive moisture into an additional downward adjustment of the safety boundary, thus forming a multi-layer dynamic safety control mechanism of "dynamic correction coefficient adjustment (first layer) + historical deviation and compound risk correction (second and third layers) + moisture correction coefficient adjustment (fourth layer)". When the moisture content of a batch exceeds the preset moisture threshold, it means that the raw materials of that batch may be at risk of moisture absorption, mold growth, etc. during storage or transportation, and the stability and uniformity of anthraquinone components may be affected to a certain extent. Therefore, it is necessary to apply a conservative margin on the basis of the adjusted internal control limit.

[0032] Furthermore, the moisture correction factor The generation rule can be expressed as:

[0033] ;

[0034] in, The measured moisture content of the batch (expressed as a decimal). Preset moisture threshold (in decimal form). This parameter is used to adjust the sensitivity of the correction coefficient to the degree of moisture exceeding the standard. The preset moisture threshold can be set with reference to the relevant pharmacopoeia's regulations on the moisture content of cassia seed medicinal materials, and generally should not exceed 12% (i.e., ...). The greater the exceedance of moisture content, the more... The smaller the value, the greater the tightening of the internal control limit.

[0035] The maximum permissible blending ratio is generated based on the moisture correction coefficient, and this maximum permissible blending ratio is used as an additional constraint for solving the intake prediction model.

[0036] In this embodiment, the generated moisture correction coefficient is further transformed into a hard constraint at the blending structure level, realizing an extension from adjusting the safety boundary of ingredients to controlling the formula ratio. Compared with the traditional approach of controlling product safety only through the boundary of ingredient content, this step additionally imposes constraints on the blending ratio dimension. Together with the additional reduction of the internal control upper limit, this constitutes a dual restriction mechanism for high-moisture batches, further compressing the space for high-risk batches to affect the quality of the final product.

[0037] Specifically, the maximum allowable blending ratio The generation rule can be expressed as:

[0038] ;

[0039] in, The moisture correction factor is the one calculated in the preceding steps. The maximum allowable blending ratio under acceptable moisture conditions (pre-set according to the process specifications).

[0040] S2 calculates the corresponding detection variation coefficient and the proportion of free anthraquinones based on the batch detection data, and reads the preset basic safety boundary of total anthraquinones and basic safety boundary of free anthraquinones from the pre-built knowledge graph.

[0041] The pre-built knowledge graph is constructed in advance during the system deployment phase, and its acquisition process is as follows:

[0042] First, professionals systematically collected and organized multi-source isomeric data related to the safety of anthraquinone components in cassia seed. The data sources covered current effective drug regulatory regulations and pharmacopoeia standards (including the Chinese Pharmacopoeia's provisions on quality indicators such as total anthraquinone content and moisture limits in cassia seed), publicly published toxicological literature on anthraquinone components (including research conclusions on the toxicity mechanisms, non-toxic side effect dose levels, and differences in toxicity between free and bound anthraquinones, including representative monomeric components such as emodin, rhein, and aloe-emodin), clinical exposure study data (including the reference range of acceptable daily intake for human bodies in preparations containing anthraquinone components), and testing archive data of the company's historical production batches (including raw material component test values, ratio parameters, corresponding finished product test results, and prediction deviation records for each historical batch).

[0043] Subsequently, the aforementioned multi-source data was structured and encoded according to a predetermined ontology model. Anthraquinone component nodes, batch quality nodes, safety boundary nodes, threshold parameter nodes, and component risk weight nodes were used as entity node types, and "applies to," "triggers," "references," "corrects," and "derives from" were used as relation edge types to construct a semantic association network between the knowledge nodes. The initial values ​​of the total anthraquinone basic safety boundary, the free anthraquinone basic safety boundary, the preset percentage threshold, the preset variation threshold, the preset moisture threshold, the preset risk threshold, and the risk weights of each component were all determined comprehensively based on the aforementioned multi-source data during the knowledge graph construction phase and stored in a structured form in the corresponding parameter nodes. The safety boundary parameters were set based on the principle of covering toxicological safety thresholds while allowing for a reasonable conservative margin, while the weight parameters were allocated based on the strength of toxicological evidence and the contribution of each component to exposure. Each parameter node recorded data source citations and version information, supporting node-level local revisions and version iterations when regulatory requirements are updated or new toxicological evidence is added, without needing to rebuild the overall graph structure.

[0044] Finally, after the knowledge graph is constructed, it is deployed to the system runtime environment through a standardized interface, allowing subsequent steps to perform structured queries and read / write access as needed. The parameter nodes are also updated adaptively with each final product inspection feedback, enabling continuous iterative maintenance of the knowledge graph.

[0045] It should be noted that this step completes the calculation of two types of quantitative indicators and the reading of safety boundary data, providing input for the subsequent generation of dynamic correction coefficients. Specifically, the detection variation coefficient is calculated based on the set of multiple sampled detection values ​​collected by S1, and the core formula is as follows:

[0046] ;

[0047] in, This is the sample mean of the set of values ​​from multiple samples taken and tested in the same batch. This represents the corresponding sample standard deviation. The coefficient of variation is used to detect the intra-batch homogeneity of the same batch of raw materials.

[0048] Among them, the proportion of free anthraquinone The formula is as follows, calculated based on the dry basis data updated in step S1:

[0049] ;

[0050] in, and These are the dry-basis free anthraquinone content and the dry-basis total anthraquinone content, respectively, calculated and updated after step S1 using dry-basis numerical conversion.

[0051] It should also be noted that, in terms of safety boundary retrieval, this step introduces a pre-built knowledge graph as the storage and retrieval carrier for safety boundaries, instead of using a traditional fixed static threshold table. The pre-built knowledge graph pre-codes multi-dimensional knowledge nodes related to the safety of anthraquinone components, including regulatory requirements, literature toxicology data, historical batch quality data, and clinical exposure data. These nodes are interconnected through semantic relationships, enabling the system to perform structured queries based on multi-dimensional attributes such as raw material type, target population, and formulation form. This allows for dynamic retrieval of the basic safety boundaries for total anthraquinone and free anthraquinone suitable for the current scenario, rather than simply calling a single fixed value. Compared to traditional static threshold tables, the knowledge graph approach has significant advantages in the scalability and scenario adaptability of safety boundaries, facilitating real-time maintenance and version management of boundary data as regulatory requirements are updated or new knowledge nodes are added.

[0052] S3, compare the proportion of free anthraquinones with the preset proportion threshold, and compare the detected coefficient of variation with the preset variation threshold, and generate the corresponding dynamic correction coefficient based on the comparison results.

[0053] In this embodiment, this step follows the output of the free anthraquinone percentage and detection coefficient of variation from step S2. Through parallel comparison with the corresponding thresholds in two dimensions, it identifies the abnormal states of each batch in terms of both component structure risk and detection reliability, and generates quantitative correction parameters accordingly. A high free anthraquinone percentage reflects an abnormal proportion of highly toxic free anthraquinones in the batch, while a high detection coefficient of variation reflects insufficient homogeneity of the batch samples, leading to a decrease in the reliability of the detection data. Since the causes of these two are different, correction coefficients need to be generated separately and applied differentially to subsequent safety boundary adjustments. All threshold comparisons in this step are triggered by a strict greater than threshold condition; when the detection value is exactly equal to the threshold, correction coefficient generation is not triggered, and the correction coefficient is set to 1.0. The threshold comparisons in the following steps all follow the same principle.

[0054] Furthermore, the specific steps for generating the corresponding dynamic correction coefficients based on the comparison results are as follows:

[0055] When the proportion of free anthraquinones exceeds a preset threshold, a free proportion correction coefficient is generated, which decreases in value as the degree of excess increases.

[0056] Specifically, the free proportion correction coefficient The core calculation formula is as follows:

[0057] ;

[0058] in, The percentage of free anthraquinones. To set a preset percentage threshold, This is a sensitivity adjustment parameter used to control the degree to which the amplitude exceeds the correction coefficient; when hour, Set to 1.0, no correction applied. The greater the deviation of the free anthraquinone percentage from the corresponding threshold, the better. The smaller the value, the more significantly the upper limit of total anthraquinone levels tightens. Besides the linear decay formula mentioned above, piecewise functions or logarithmic decay functions can also be used to construct the formula. It is suitable for scenarios with different requirements for sensitivity to exceed the amplitude response.

[0059] When the detected coefficient of variation exceeds the preset variation threshold, a variation confidence correction coefficient is generated, which decreases in value as the degree of variation increases.

[0060] Among them, the confidence correction coefficient of variation The core calculation formula is as follows:

[0061] ;

[0062] in, To detect the coefficient of variation, To preset the mutation threshold, This is the sensitivity adjustment parameter; when hour, Take 1.0. This reflects the degree of reliability decay in batch testing data—a higher coefficient of variation indicates poorer intra-batch homogeneity, lower representativeness of the testing data, and a correspondingly tighter safety margin to compensate for the risks introduced by data uncertainty. The only difference lies in the upper limit of the total anthraquinone internal control. This simultaneously applies to both the total anthraquinone and free anthraquinone upper limits, reflecting the overall impact of detection reliability risks on the safety control of all components.

[0063] The total anthraquinone baseline safety boundary is multiplied by the free proportion correction factor and the variation confidence correction factor to obtain the total anthraquinone internal control upper limit data.

[0064] Among them, the upper limit data of total anthraquinone internal control The calculation formula is as follows:

[0065] ;

[0066] in, The basic safety boundary for total anthraquinones, and The corresponding correction coefficients generated in the preceding steps are applied to the basic safety boundary in a multiplicative manner, enabling the upper limit of total anthraquinone control to simultaneously reflect the combined effects of component structure risk and detection reliability risk; when both types of risks exist simultaneously, the constraint tightening effect will be stronger than the result of either single correction coefficient acting alone.

[0067] Multiplying the basic safety boundary of free anthraquinone by the variation confidence correction coefficient yields the upper limit of the internal control for free anthraquinone.

[0068] It is necessary to add data on the upper limit of free anthraquinone internal control. The calculation formula is as follows:

[0069] ;

[0070] in For the safety boundary of free anthraquinone, This is the confidence level correction coefficient for the variance. The innovation of this step lies in... Only introduce Without introducing ,and The calculations result in differentiated processing. Its design is based on: It is a safety boundary specifically set for the absolute content of free anthraquinones, and has independently characterized the toxicity risk of the free component; while The correction addresses the anomaly in the proportion of free anthraquinones in total anthraquinones. This proportion information should be mapped to the overall control dimension of total anthraquinones. If it is superimposed on the absolute amount control of free anthraquinones, it will create a double constraint, leading to over-conservatism.

[0071] S4. Based on the dynamic correction coefficient, the basic safety boundaries of total anthraquinone and free anthraquinone are numerically adjusted to generate the internal control upper limit data of total anthraquinone and the internal control upper limit data of free anthraquinone for each batch of candidate cassia seed raw materials.

[0072] In this embodiment, and It operates on the basic security boundary read in step S2 to complete the initial generation of the exclusive internal control limit for each batch.

[0073] Furthermore, the total anthraquinone upper limit data and the free anthraquinone upper limit data, after being generated, also include:

[0074] First, based on the data characteristics of the candidate cassia seed raw material batches, historical raw material batch nodes whose feature distance is within a preset range are matched and retrieved in the knowledge graph.

[0075] Specifically, the innovation of this step lies in introducing the structured retrieval capabilities of knowledge graphs into historical similarity matching of raw material batches, using multi-dimensional feature vectors as the retrieval basis, which differs from the traditional manual comparison method based on a single component indicator. Constructing batch feature vectors... Each component is derived from the calculation results of the preceding steps, and the feature distance is calculated using standardized Euclidean distance:

[0076] ;

[0077] in This is the feature vector corresponding to the historical batch node. For the first The standard deviation of the dimensional feature in the historical dataset is used to eliminate dimensional differences; when At that time, the historical node is included in the matching result set.

[0078] Next, the corresponding historical predicted intake and actual content of finished products are extracted from historical raw material batch nodes, and the prediction deviation correction coefficient is generated by comparison and calculation.

[0079] It should be noted that this step extracts historical predicted intake (unit: mg / day) and historical measured content (unit: mg / g) of the finished product from historical batches. Since these two quantities have different dimensions, they cannot be directly substituted into the same ratio formula. The historical predicted intake must first be converted to an equivalent content unit using the formulation specification parameters before comparison. The conversion formula is as follows:

[0080] ;

[0081] in The predicted intake (mg / day) is based on historical finished product data. This refers to the weight per capsule (g / capsule). This refers to the number of tablets taken daily (tablets / day). This corresponds to the quality percentage of cassia seed raw materials in historical batches. This represents the equivalent predicted content (mg / g) after conversion. The prediction deviation correction factor is calculated after unit standardization. The core calculation formula is as follows:

[0082] ;

[0083] in To match the average measured anthraquinone content (mg / g) of the corresponding historical batches in the finished product. This represents the average equivalent predicted content (mg / g) after conversion. This is the sensitivity adjustment parameter. When... hour, This indicates that the prediction model has a systematic underestimation, and a conservative compensation needs to be applied to the upper limit of internal control.

[0084] Finally, when the measured content of the finished product in history continues to exceed the predicted intake of the finished product in history, the upper limit data of total anthraquinone and the upper limit data of free anthraquinone are updated by lowering the values ​​using the prediction deviation correction coefficient.

[0085] The "consistently greater than" condition is the trigger condition for this step. It requires statistical consistency in the occurrence of measured content exceeding the equivalent predicted content in historical batches (e.g., all historical batches exceeding a preset proportion exhibit this pattern, where the preset proportion is pre-set by staff based on historical data and empirical rules), rather than occasional deviations. This prevents erroneous adjustments to the internal control upper limit due to individual abnormal historical nodes. Analyzing the impact of the threshold on subsequent operations, the more lenient the trigger condition, the higher the frequency of lowering the internal control upper limit, and the narrower the feasible region for subsequent S6 ratio optimization. The formula for updating the internal control upper limit is as follows:

[0086] ;

[0087] in, This is the updated total anthraquinone internal control limit data. This is the updated upper limit data for free anthraquinone.

[0088] Preferably, the batch test data also includes the content of representative anthraquinone monomer components. After generating the total anthraquinone internal control upper limit data, the method further includes:

[0089] The pre-stored component risk weights are read from the knowledge graph. The total anthraquinone content, free anthraquinone content, free anthraquinone percentage, and representative anthraquinone monomer content are weighted and calculated with their respective component risk weights to output an anthraquinone composite risk score.

[0090] Specifically, anthraquinone complex risk score The calculation formula is as follows:

[0091] ;

[0092] in For the normalized values ​​of each component index, the maximum-minimum normalization method is used to eliminate dimensional differences; For the corresponding component risk weights, satisfying The weights are pre-stored in the knowledge graph and can be dynamically maintained as toxicology knowledge is updated.

[0093] Compared with single-component evaluation methods, composite risk scoring integrates multi-dimensional component information through weighted analysis, which can identify batches where individual indicators do not exceed the limits but the overall risk level is significantly high, thus improving the systematicness and comprehensiveness of safety assessment.

[0094] When the anthraquinone composite risk score exceeds the preset risk threshold, a risk downgrade correction coefficient is generated, and the total anthraquinone internal control upper limit data is updated using the risk downgrade correction coefficient.

[0095] Among them, the risk downgrade correction coefficient The calculation formula and the update formula for the internal control upper limit of total anthraquinones are as follows:

[0096] ;

[0097] ;

[0098] in, This step applies only to the updated total anthraquinone internal control limit without simultaneously revising the free anthraquinone internal control limit. The rationale is that the composite risk score already comprehensively covers multiple aspects of free anthraquinone; simultaneously lowering the free anthraquinone internal control limit would create a double constraint, leading to excessive conservatism. The total anthraquinone internal control limit, as the overall safety control boundary, is an appropriate object to bear the comprehensive risk downgrade. Analyzing the impact of the threshold on subsequent operations... The lower the value, the more batches will trigger risk downgrade corrections, and the more limited the overall feasibility of ratio optimization becomes.

[0099] In this embodiment, this section adds the content of representative anthraquinone monomer components (such as emodin, rhein, aloe-emodin, etc.) to the original batch detection data, providing input from the monomer component dimension for the subsequent construction of anthraquinone complex risk score. Compared with the method of safety assessment based solely on total anthraquinone and free anthraquinone, introducing monomer component data can further refine the granularity of risk identification and capture situations where no single indicator exceeds the standard, but the overall risk is high due to the superposition of the toxicity of multiple anthraquinone monomers.

[0100] S5. Based on the total anthraquinone content, free anthraquinone content and preset formulation specification data of each batch of candidate cassia seed raw materials, an intake prediction model is constructed with the blending ratio and the mass ratio of cassia seed raw materials as variables, and the predicted daily intake of total anthraquinone and the predicted daily intake of free anthraquinone are calculated and output.

[0101] This step incorporates the total anthraquinone content and free anthraquinone content calculated and updated on a dry basis, as well as the finalized batch-specific internal control upper limit data, in a blending ratio. ( The proportion of raw materials of cassia seeds and cassia seeds As a continuous decision variable, a predictive model is established by combining formulation specification parameters to explicitly correlate multiple batches of raw material composition data with the daily anthraquinone intake level of the final product. The core value of this model lies in providing a computable analytical objective function and constraint expression for subsequent constrained optimization, enabling the system to perform optimization on any... and The combination of parameters directly predicts the daily anthraquinone exposure level of the final product. Compared with the traditional method of calculating anthraquinone content based on a single batch with a fixed formulation, the model constructed in this step can simultaneously handle the differences in composition across multiple batches and supports a mathematical optimization approach to systematically search for the optimal parameter combination.

[0102] Specifically, the formulation specifications include the amount per capsule and the number of capsules taken daily; the predicted daily intake of total anthraquinones and the predicted daily intake of free anthraquinones are calculated and output, and the specific process is as follows:

[0103] The first step involves using the blending ratio of each batch of candidate cassia seed raw materials as a weighting parameter to perform a weighted summation of the total anthraquinone content and the free anthraquinone content of each batch, thereby generating the mixed total anthraquinone content and the mixed free anthraquinone content.

[0104] Among them, the total anthraquinone content in the mixture With mixed free anthraquinone content The calculation formula is as follows:

[0105] ;

[0106] in For the first Batch blending ratio (meeting) , ), and For the first The total anthraquinone content and free anthraquinone content of the batch were updated after conversion based on dry basis values. This represents the total number of batches involved in the assembly.

[0107] The second step involves multiplying the total anthraquinone content and the free anthraquinone content with the single capsule weight, the number of capsules taken daily, and the mass ratio of cassia seed raw materials to obtain the predicted daily intake of total anthraquinone and the predicted daily intake of free anthraquinone, respectively.

[0108] Specifically, the core calculation formula for the daily intake prediction model is as follows:

[0109] ;

[0110] ;

[0111] in This refers to the total daily capsule content (g / day). The mass percentage of cassia seed raw materials (dimensionless). and The unit is mg / day. and For decision variables and All of them exhibit a linear relationship. This structural feature enables the entire optimization problem to be constructed in the form of a linear programming problem, which is beneficial for subsequent solutions.

[0112] The steps for solving the intake prediction model include:

[0113] The average measured values ​​of historical batches are retrieved from the knowledge graph; specifically, the average measured anthraquinone content of historical finished product batches with similar characteristics to the current batch is retrieved from the knowledge graph. (mg / day) serves as a reference benchmark for the third term of the objective optimization function, representing the deviation. It represents the average intake level that has been verified for safety in historical production practices. Incorporating it into the optimization objective can ensure that the final formulation scheme meets safety constraints while maintaining reasonable consistency with historically verified formulas, thus avoiding the solution results from deviating from actual production due to pure mathematical optimization.

[0114] A target optimization function is constructed, and the objective of solving the target optimization function is set as: minimizing the weighted sum of the first deviation between the predicted daily total anthraquinone intake and the median of the target control interval, the second deviation between the predicted daily free anthraquinone intake and the corresponding median of the target control interval, and the third deviation between the predicted daily total anthraquinone intake and the historical batch measured mean.

[0115] Specifically, the objective optimization function The complete expression is as follows:

[0116] ;

[0117] in and The target daily intake, pre-stored in the knowledge graph based on both safety and clinical efficacy considerations, is stored independently of internal control limits, but must meet certain requirements. (Effective mixed internal control upper limit) logical constraints to ensure that the target value itself is within the feasible domain; This represents the average of historical batch measurements read from the knowledge graph in the previous step. , , The weights of each deviation term satisfy the following conditions: The objective function simultaneously drives the predicted total anthraquinone intake towards... and The dual proximity approach ensures consistency with historical formulation practices while prioritizing safety.

[0118] The algorithm is run with the objective of minimizing the target optimization function, and outputs the optimal matching ratio and the optimal quality proportion.

[0119] It should be explained that this step integrates the objective function and all constraints into a complete constrained optimization problem and runs the solution. The complete set of constraints is summarized below:

[0120] ;

[0121] The equivalent simplification is as follows:

[0122] ;

[0123] Regarding the solution strategy, fixed Both the post-constraints and the objective are The quadratic programming (QP) problem can be solved by... After discretizing the problem in a gridded manner within the feasible interval, the QP problem is solved sequentially, and the solution with the minimum objective function value is selected globally. Sequential Quadratic Programming (SQP) and interior-point methods can also directly handle the original nonlinear problem and are suitable for batch number problems. Larger scenes.

[0124] S6. Under the constraint that the predicted daily intake of total anthraquinones and the predicted daily intake of free anthraquinones do not exceed the target control range defined by the upper limit data of total anthraquinones and the upper limit data of free anthraquinones, respectively, the intake prediction model is solved to obtain the optimal blending ratio and the optimal quality proportion to generate a ratio control scheme for output.

[0125] It should be added that the method for generating and outputting the proportioning control scheme also includes:

[0126] In the knowledge graph, trace the entity nodes and relation edges called when generating the total anthraquinone internal control limit data and the free anthraquinone internal control limit data.

[0127] This step performs knowledge graph-level tracing of the generation path of internal control upper limit data, identifying all entity nodes and relational edges called from the basic safety boundary reading to the calculation of each correction coefficient. In a specific embodiment, the main entity nodes covered by the tracing path include: anthraquinone safety knowledge nodes, threshold comparison nodes (free proportion comparison nodes and coefficient of variation comparison nodes), historical batch similarity nodes, component risk weight nodes, and moisture threshold nodes, etc.; the relational edge types cover "read", "trigger comparison", "generate coefficient", "multiplication correction", etc., fully depicting the computational dependencies and numerical transmission relationships between each node. The innovation of this step lies in applying the structured semantic capabilities of knowledge graphs to decision tracing, enabling each change in the internal control upper limit to be traced back to clear triggering conditions and calling bases, a capability lacking in traditional fixed parameter table systems.

[0128] Extract the detection features that trigger the threshold comparison and adjust the correlation coefficients of the generated values, and package them to generate a boundary correction interpretation path.

[0129] The boundary correction interpretation path is linked to the proportioning control scheme for synchronous output.

[0130] It is important to understand that by binding and encapsulating the boundary correction interpretation path and the optimal formulation scheme into a unified output package, the simultaneous delivery of "formulation conclusion + safety decision basis" can be achieved. This mechanism allows quality management personnel to obtain the complete boundary tightening logic and the source of each correction coefficient at the same time as obtaining the formulation scheme, supporting manual review and compliance audit, and meeting the GMP quality system's requirement for traceability of formulation decisions.

[0131] In addition, the output includes generating a proportioning control scheme, followed by:

[0132] Obtain the actual test data for the corresponding batch of finished products. The actual test data includes the measured values ​​of total anthraquinones and free anthraquinones in the finished products.

[0133] Calculate the deviation comparison value between the measured detection data and the associated predicted daily total anthraquinone intake and predicted daily free anthraquinone intake.

[0134] The deviation comparison value is calculated using relative deviation:

[0135] ;

[0136] In the formula, the subscript Corresponding to total anthraquinones ( ) and free anthraquinones ( Two component dimensions.

[0137] Based on the deviation comparison value, the threshold parameters and risk weight parameters pre-stored in the knowledge graph are numerically updated and calculated, and the measured detection data are written into the knowledge graph as new data nodes.

[0138] This step is the core of the entire scheme for achieving adaptive iteration of the knowledge graph. The threshold parameter update formula is as follows:

[0139] ;

[0140] in, The threshold parameter to be updated. To update the learning rate ( ).when Time (systematic underestimation). With the threshold tightened, subsequent batches are more likely to trigger the generation of correction coefficients, resulting in a more conservative overall safety margin; when When there is a systemic overestimation, the threshold should be appropriately relaxed to avoid excessive conservatism that could limit available batches. The risk weight update formula is as follows:

[0141] ;

[0142] in, For the first The deviation increment corresponding to each weighted component, for components with direct measured deviation (total anthraquinone corresponding to...) Free anthraquinone correspondence ),Pick For components with no direct measured deviation (corresponding to the free proportion); Representative single entity correspondence ),Pick This means that in this update, these two weights are only passively adjusted through normalization, without being actively increased or decreased. Normalization ensures... Always true Update the step size for the weights.

[0143] Meanwhile, the actual measured data of this finished product is written into the knowledge graph as a new historical batch data node. It can be called in the historical matching process of similar batches in the future (feature distance retrieval and prediction deviation correction coefficient calculation), so that the prediction accuracy of the system can be continuously improved with the accumulation of production batches, and finally form a complete closed-loop adaptive control mechanism of "detection and acquisition, safety modeling, ratio optimization, production execution, actual measurement feedback and parameter update".

[0144] like Figure 2 The diagram shown is a schematic representation of the knowledge graph-based cassia seed capsule raw material ratio optimization system provided in this application embodiment, comprising:

[0145] The data acquisition module is used to acquire batch test data, blending ratio, and mass percentage of each batch of candidate cassia seed raw materials. The batch test data includes total anthraquinone content, free anthraquinone content, and a set of multiple sampling test values ​​for the same batch of candidate cassia seed raw materials.

[0146] The feature extraction module is used to calculate the corresponding detection variation coefficient and the proportion of free anthraquinones based on batch detection data.

[0147] The boundary correction module is used to read the preset basic safety boundaries of total anthraquinone and free anthraquinone from the pre-built knowledge graph; compare the proportion of free anthraquinone with the preset proportion threshold, and compare the detected coefficient of variation with the preset variation threshold, and generate the corresponding dynamic correction coefficient based on the comparison results; and adjust the values ​​of the basic safety boundaries of total anthraquinone and free anthraquinone based on the dynamic correction coefficients to generate the internal control upper limit data of total anthraquinone and the internal control upper limit data of free anthraquinone for each batch of candidate cassia seed raw materials.

[0148] The predictive modeling module is used to construct an intake prediction model based on the total anthraquinone content, free anthraquinone content, and preset formulation specification data of each batch of candidate cassia seed raw materials, with the blending ratio and the mass ratio of cassia seed raw materials as variables, and calculate and output the predicted daily intake of total anthraquinone and the predicted daily intake of free anthraquinone.

[0149] The ratio optimization solution module is used to solve the intake prediction model under the constraint that the predicted daily total anthraquinone intake and the predicted daily free anthraquinone intake do not exceed the target control range defined by the internal control upper limit data of total anthraquinone and free anthraquinone, respectively. The module obtains the optimal blending ratio and the optimal mass ratio to generate a ratio control scheme for output.

[0150] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the above functions can be divided into different functional modules to complete all or part of the functions described above.

[0151] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the embodiments described above are merely illustrative; for instance, the division of modules or 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 device, 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, or indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.

[0152] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units, located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0153] Furthermore, the functional units in the various embodiments of this application 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.

[0154] 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 readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the solution, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0155] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for optimizing the raw material ratio of cassia seed capsules based on knowledge graphs, characterized in that, Includes the following steps: Obtain batch test data, blending ratio, and mass percentage of cassia seed raw materials for each batch of candidate cassia seed raw materials. The batch test data includes total anthraquinone content and free anthraquinone content. Based on the batch detection data, the corresponding detection variation coefficient and the proportion of free anthraquinone are calculated, and the preset total anthraquinone basic safety boundary and free anthraquinone basic safety boundary are read from the pre-built knowledge graph. The proportion of free anthraquinones is compared with a preset proportion threshold, and the detected coefficient of variation is compared with a preset variation threshold. Based on the comparison results, a corresponding dynamic correction coefficient is generated. Based on the dynamic correction coefficient, the basic safety boundary of total anthraquinone and the basic safety boundary of free anthraquinone are numerically adjusted to generate the internal control upper limit data of total anthraquinone and the internal control upper limit data of free anthraquinone for each batch of the candidate cassia seed raw materials. Based on the batch testing data of each batch of the candidate cassia seed raw materials and the preset formulation specification data, an intake prediction model is constructed with the blending ratio and the mass ratio of the cassia seed raw materials as variables, and the predicted daily intake of total anthraquinones and the predicted daily intake of free anthraquinones are calculated and output. Under the constraint that the predicted daily intake of total anthraquinones and the predicted daily intake of free anthraquinones do not exceed the target control range defined by the upper limit data of total anthraquinones and the upper limit data of free anthraquinones respectively, the intake prediction model is solved to obtain the optimal blending ratio and the optimal quality proportion to generate a ratio control scheme for output.

2. The method for optimizing the raw material ratio of cassia seed capsules based on knowledge graphs as described in claim 1, characterized in that: The batch detection data also includes moisture content; before calculating the percentage of free anthraquinones, the method further includes: Based on the moisture content, the detected total anthraquinone content and free anthraquinone content were converted to dry basis values ​​to obtain the dry basis total anthraquinone content and dry basis free anthraquinone content; The total anthraquinone content on a dry basis is used as the updated total anthraquinone detection content, and the free anthraquinone content on a dry basis is used as the updated free anthraquinone detection content; When the moisture content exceeds a preset moisture threshold, a moisture correction coefficient is generated, and the moisture correction coefficient is used to adjust the values ​​of the total anthraquinone internal control upper limit data and the free anthraquinone internal control upper limit data downward. The maximum permissible blending ratio is generated based on the moisture correction coefficient, and the maximum permissible blending ratio is used as an additional constraint for solving the intake prediction model.

3. The method for optimizing the raw material ratio of cassia seed capsules based on knowledge graphs as described in claim 1, characterized in that: The total anthraquinone internal control limit data and the free anthraquinone internal control limit data, after being generated, also include: Based on the various data characteristics of the candidate cassia seed raw material batches, historical raw material batch nodes whose feature distance is within a preset range are matched and retrieved in the knowledge graph; The corresponding historical predicted intake and actual content of finished products are extracted from the historical raw material batch nodes, and a prediction deviation correction coefficient is generated by comparison and calculation. When the measured content of the historical finished product continues to be greater than the predicted intake of the historical finished product, the internal control upper limit data of total anthraquinone and the internal control upper limit data of free anthraquinone are updated by lowering the values ​​using the prediction deviation correction coefficient.

4. The method for optimizing the raw material ratio of cassia seed capsules based on knowledge graphs as described in claim 1, characterized in that: The batch detection data also includes the content of representative anthraquinone monomer components. After generating the total anthraquinone internal control upper limit data, the method further includes: The pre-stored component risk weights are read from the knowledge graph, and the total anthraquinone detection content, the free anthraquinone detection content, the proportion of free anthraquinone, and the content of the representative anthraquinone monomer are weighted and calculated with the corresponding component risk weights respectively, and the anthraquinone complex risk score is output. When the anthraquinone composite risk score exceeds a preset risk threshold, a risk downgrade correction coefficient is generated, and the total anthraquinone internal control upper limit data is updated using the risk downgrade correction coefficient.

5. The method for optimizing the raw material ratio of cassia seed capsules based on knowledge graphs as described in claim 1, characterized in that: The specific steps for generating the corresponding dynamic correction coefficients based on the comparison results are as follows: When the proportion of free anthraquinone exceeds the preset proportion threshold, a free proportion correction coefficient is generated, which decreases in value as the degree of excess increases. When the detected coefficient of variation exceeds the preset variation threshold, a variation confidence correction coefficient is generated that decreases in value as the degree of variation increases. The total anthraquinone baseline safety boundary is multiplied by the free proportion correction coefficient and the variation confidence correction coefficient to obtain the total anthraquinone internal control upper limit data; Multiplying the basic safety boundary of free anthraquinone by the variation confidence correction coefficient yields the upper limit data of the internal control of free anthraquinone.

6. The method for optimizing the raw material ratio of cassia seed capsules based on knowledge graphs as described in claim 1, characterized in that: The formulation specifications include the amount per capsule and the number of capsules to be taken daily; the calculation and output of the predicted daily intake of total anthraquinones and the predicted daily intake of free anthraquinones are performed as follows: Using the blending ratio corresponding to each batch of candidate cassia seed raw materials as a weighting parameter, the total anthraquinone content and the free anthraquinone content of each batch are weighted and summed to generate the mixed total anthraquinone content and the mixed free anthraquinone content; The total anthraquinone content and the free anthraquinone content are correlated and multiplied with the single capsule weight, the daily number of capsules taken, and the mass ratio of cassia seed raw material to obtain the predicted daily intake of total anthraquinone and the predicted daily intake of free anthraquinone, respectively.

7. The method for optimizing the raw material ratio of cassia seed capsules based on knowledge graphs as described in claim 1, characterized in that: The steps of solving the intake prediction model include: Read the historical batch measured average from the knowledge graph; A target optimization function is constructed, and the objective of solving the target optimization function is set as: minimizing the weighted sum of the first deviation between the predicted daily total anthraquinone intake and the median of the target control interval, the second deviation between the predicted daily free anthraquinone intake and the corresponding median of the target control interval, and the third deviation between the predicted daily total anthraquinone intake and the measured mean of the historical batches; The algorithm is run with the objective of minimizing the target optimization function, and the optimal matching ratio and the optimal quality ratio are output.

8. The method for optimizing the raw material ratio of cassia seed capsules based on knowledge graph as described in claim 1, characterized in that: In the step of generating and outputting the proportioning control scheme, the method further includes: In the knowledge graph, trace the entity nodes and relational edges invoked when generating the total anthraquinone internal control limit data and the free anthraquinone internal control limit data; Extract the detection features that trigger the threshold comparison and adjust the correlation coefficients of the generated values, and package them to generate a boundary correction interpretation path; The boundary correction interpretation path is associated with the proportioning control scheme for synchronous output.

9. The method for optimizing the raw material ratio of cassia seed capsules based on knowledge graphs as described in claim 1, characterized in that: The generated proportion control scheme is output, and then the following is also included: Obtain the actual test data for the corresponding batch of finished products, including the measured values ​​of total anthraquinones and free anthraquinones in the finished products; Calculate the deviation comparison value between the measured detection data and the associated predicted daily total anthraquinone intake and predicted daily free anthraquinone intake; Based on the deviation comparison value, the threshold parameters and risk weight parameters pre-stored in the knowledge graph are numerically updated, and the measured detection data is written into the knowledge graph as a new data node.

10. A knowledge graph-based system for optimizing the proportion of raw materials for cassia seed capsules, characterized in that, include: The data acquisition module is used to acquire batch test data, blending ratio, and mass percentage of cassia seed raw materials for each batch of multiple candidate cassia seed raw materials. The batch test data includes total anthraquinone content and free anthraquinone content. The feature extraction module is used to calculate the corresponding detection variation coefficient and the proportion of free anthraquinones based on the batch detection data; The boundary correction module is used to read the preset total anthraquinone basic safety boundary and free anthraquinone basic safety boundary from the pre-built knowledge graph; The proportion of free anthraquinones is compared with a preset proportion threshold, and the detected coefficient of variation is compared with a preset variation threshold. Based on the comparison results, a corresponding dynamic correction coefficient is generated. Based on the dynamic correction coefficient, the basic safety boundary of total anthraquinones and the basic safety boundary of free anthraquinones are adjusted numerically to generate the internal control upper limit data of total anthraquinones and the internal control upper limit data of free anthraquinones for each batch of candidate cassia seed raw materials. The predictive modeling module is used to construct an intake prediction model based on batch detection data of each batch of the candidate cassia seed raw materials and preset formulation specification data, with the blending ratio and the mass ratio of the cassia seed raw materials as variables, and calculate and output the daily total anthraquinone predicted intake and the daily free anthraquinone predicted intake. The ratio optimization solution module is used to solve the intake prediction model under the constraint that the predicted daily total anthraquinone intake and the predicted daily free anthraquinone intake do not exceed the target control range defined by the internal control upper limit data of total anthraquinone and the internal control upper limit data of free anthraquinone, respectively, to obtain the optimal blending ratio and the optimal quality proportion, and to generate a ratio control scheme for output.