A pet treat formulation optimization method and system
Patent Information
- Application Number
- CN202611401684.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-10
- Publication Date
- 2026-10-13
AI Technical Summary
因此,即使投料阶段的蛋白质、脂肪、水分及目标营养组分均满足计算区间,加工后的成品仍可能偏离预设范围,而采用固定损耗系数或加工后单项补偿无法根据具体配方和具体加工状态准确确定偏差传播路径,造成原料比例调整与加工条件修正相互脱节,难以在配方形成阶段直接得到满足终态营养约束的原料组合
1.将原料端的初始营养组成、加工条件与对应成品检测结果组织为原料组分至加工状态再至终态组分的转化关系,并将水分迁移形成的浓缩变化、营养组分保持或损失以及原料组合交互变化纳入同一计算链路,使候选配方不再仅按投料阶段理论值判断,而是先转换得到加工后的终态有效营养向量,再以该向量与目标营养区间之间的偏差反向求取原料比例和加工条件。由此,原料比例变化造成的终态组分变化与加工条件变化造成的终态组分变化在同一约束体系中被计算,配方求解能够直接针对成品状态进行,而不需要以固定损耗系数近似替代具体加工转化。对于某一原料调整引起的关联组分偏移,还利用直接贡献与间接贡献形成的配方调整关系联合求取协同原料比例,使目标组分修正与关联组分约束在同一次求解中保持一致,减少投料计算满足要求而成品检测越界的状态差异。
Smart Images

Figure CN122904556A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pet food formulation design and food data processing technology, specifically to a method and system for optimizing pet snack formulations. Background Technology
[0002] Current pet snack formulation design typically uses nutrient composition tables, batch test values, and the target product's nutritional range as the basis for calculations. Animal-based ingredients, plant-based ingredients, fat sources, and other edible components are converted into contributions of protein, fat, moisture, ash, and energy, respectively. These are then linearly superimposed according to the mass percentage of each ingredient to obtain the theoretical nutritional composition at the feeding stage. Formulators or formulation software adjust the ingredient ratios based on the difference between the theoretical values and the target range to ensure all calculated values fall within the defined range. For pet snacks requiring drying, baking, or ripening, current methods typically store processing parameters as independent production conditions. During the formulation design stage, loss coefficients are set based on experience, or fixed correction coefficients are configured for individual nutrient components to approximate compensation for moisture reduction or nutrient loss during processing. The calculation object of this type of approach is still the initial composition of the raw materials; there is a lack of a unified component transfer relationship between raw material ratio optimization and the processing process. Therefore, changes in processing conditions usually do not directly participate in the inverse solution of raw material ratios.
[0003] Another existing approach involves obtaining nutritional test results for the finished product after processing and comparing them with the target range. When deviations occur in protein, fat, moisture, or other target components, the corresponding raw materials are added or removed according to the direction of the deviation before proceeding with the next batch of trial production and testing. Some formulation software uses historical formulations and finished product data to establish statistical prediction relationships, estimating finished product indicators based on raw material ratios and several processing conditions, and then selecting formulations with prediction results closer to the target range. This type of processing can correct formulations using finished product data, but the prediction relationship usually compresses the apparent concentration caused by moisture migration, the retention or loss of components due to thermal processing, and the interactive changes caused by the co-processing of multiple raw materials into a holistic mapping, making it difficult to distinguish whether a certain final state deviation comes from the initial content of raw materials, processing state, or combination relationship. After a deviation occurs, formulation adjustments still mostly adopt the method of adding or subtracting single indicators. Adding raw materials, while correcting the target components, will also change other constrained components, requiring subsequent formulations to continue iterating and compensating.
[0004] The lack of a continuous conversion constraint between the initial nutrient values of raw materials used in pet snack formulation calculations and the final effective nutrient values after processing leads to a discrepancy between the formulation optimization target and the actual testing target. Moisture migration caused by drying alters the relative content of each nutrient component in the finished product, while heating and ripening processes cause changes in the retention rate or loss of some components. Furthermore, the coexistence of different raw materials may result in final state changes that cannot be linearly superimposed by the contribution of a single raw material. Therefore, even if the protein, fat, moisture, and target nutrient components meet the calculation range during the feeding stage, the processed product may still deviate from the preset range. Using a fixed loss coefficient or post-processing single-item compensation cannot accurately determine the deviation propagation path based on the specific formulation and processing state, causing a disconnect between raw material ratio adjustments and processing condition corrections. This makes it difficult to directly obtain a raw material combination that meets the final state nutrient constraints during the formulation formation stage. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for optimizing pet snack formulas, which can solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for optimizing pet snack formulas includes: obtaining the initial nutritional composition of candidate raw materials, corresponding processing conditions, and historical finished product testing data; Based on the component changes of the same formula at the raw material end and the finished product end, a transformation relationship of raw material components—processing state—final state components is constructed. The transformation relationship at least characterizes the concentration changes caused by moisture migration, the retention or loss of nutrient components, and the interactive changes caused by raw material combination. By inputting the candidate raw material ratio vector and the target processing conditions into the transformation relationship, the final effective nutrient vector is obtained; The collaborative adjustment amount is calculated based on the deviation between the final effective nutrient vector and the target nutrient interval; By using the target nutritional range as a constraint, the proportion of raw materials and processing conditions are jointly solved to obtain the composition of pet snack formulas and the corresponding feasible processing range.
[0007] Preferably, the construction of the raw material component-processing state-final state component conversion relationship includes: pairing the initial nutritional composition, processing conditions and historical finished product test data according to the raw material batch and processing batch; First, based on the change in total material quantity, the apparent concentrated component caused by moisture migration is separated. Then, based on the corresponding changes of a single nutrient component under different processing conditions, the retained or lost component is extracted. The remaining difference between the actual finished product value and the sum of the components is determined as the raw material combination interaction component. A directed transformation path is established based on the input components, processing states, and output components corresponding to each component, and the parameters of the directed transformation path are limited by material balance constraints and component non-negativity constraints.
[0008] Preferably, the determination of the coordinated adjustment amount includes: calculating the direct contribution of the change in the proportion of each candidate raw material to the target nutrient component after being transmitted through the raw material component-processing state-final state component transformation relationship, and the indirect contribution to the other constrained nutrient components. A formula adjustment contribution matrix is formed based on the direct contributions and the indirect contributions; Candidate raw materials with direct reverse contributions are selected for the direction of exceeding the limit of the target nutrient component. A set of synergistic raw materials that can offset the indirect contribution without changing the target correction direction are searched among the candidate raw materials. The corresponding proportional linkage adjustment amount is obtained based on the set of synergistic raw materials.
[0009] Preferably, the joint solution of raw material ratio and processing conditions includes: constructing a two-layer constraint solution process with the candidate raw material ratio as the outer layer decision variable and the processing conditions as the inner layer state variable; The outer layer generates candidate formulations within the allowable proportion range of raw materials, and the inner layer calculates the effective nutrient vector of the final state under different processing conditions by calling the raw material component-processing state-final state component transformation relationship for each candidate formulation. The set of processing conditions that meet all target nutrient ranges is fed back to the outer layer, and only candidate formulations with a non-empty set of processing conditions are retained. The retention results were screened based on the joint objective of final component deviation and nutrient loss to obtain the formulation composition and corresponding processing feasible range.
[0010] Preferably, the parameter update of the directed conversion path includes: obtaining the finished product test value corresponding to its formula composition and processing conditions for a new production batch, and calculating the component residual between the finished product test value and the output value of the raw material component-processing state-final state component conversion relationship; The directed transformation path involved in the calculation is traced in reverse along the output component corresponding to the component residual, and the residual correction amount is allocated according to the contribution ratio of each path to the output component. Only the path parameters for which the correction amount is obtained are locally updated. During the update process, the material balance constraints, component non-negativity constraints, and existing path connection relationships remain unchanged, and the updated transformation relationships are used for subsequent calculation of the final state effective nutrient vector.
[0011] Preferably, the combined search of the synergistic raw material set includes: establishing a contribution feature vector for each candidate raw material, which consists of the direct contribution of the target nutrient component and the indirect contribution of each constrained nutrient component; The target nutrient bias that needs to be corrected is mapped to the target contribution direction, and the offset of the associated components that needs to be offset is mapped to the compensation contribution direction. First, candidate raw materials whose direct contribution direction is opposite to the target contribution direction are screened out. Then, a set of raw materials whose weighted combination of contribution feature vectors matches the compensation contribution direction is searched from the retained raw materials. The proportional coefficient corresponding to the weighted combination is used as the initial value of the linkage adjustment amount, and the proportional correction is completed under the constraint of the target nutrient range.
[0012] Preferably, the determination of the processing feasible range includes: for the candidate formulation retained by the outer layer, continuously changing the processing conditions according to the direction of the predetermined state variable within the processing condition allowable domain, and calculating the final state effective nutrient vector of each state point using the raw material component-processing state-final state component transformation relationship; Identify the boundary state points corresponding to the first entry or exit of each target nutrient component into the allowable range, and construct the initial feasible range with the state segments in which all target nutrient component constraints are simultaneously met. For state segments where there are constraint switching between adjacent boundary state points, the boundary positions are re-subdivided and corrected based on the dominant constraint components, and finally the state segments that continuously satisfy all target nutrient intervals are determined as the processing feasible intervals.
[0013] Preferably, after completing the local update of the directed conversion path, the direct and indirect contributions of the raw materials associated with the updated path are recalculated, and only the row and column items corresponding to the updated path in the formula adjustment contribution matrix are updated. The contribution difference before and after the local update is decomposed into a target component correction component and a related component compensation component. When the target component correction component changes the original target contribution direction, candidate raw materials are re-screened. When only the related component compensation component changes, the candidate raw materials are kept unchanged and the weighted combination coefficient of the synergistic raw material set is recalculated. A new linkage adjustment amount is generated from the updated contribution matrix.
[0014] Preferably, the segmented constraint preservation process for the feasible processing interval includes: recording the dominant constraint components corresponding to each boundary state point and their directions of entering or leaving the target nutrient interval; When the dominant constraint component of an adjacent state segment changes, local boundaries are established with the constraint switching position as the segmentation point, and the non-dominant constraint component is kept within the allowable range within each local boundary. For adjacent local boundaries with overlapping feasible states, a continuous merging is performed. For local boundaries without overlapping feasible states, a segmented representation is maintained, and the segmented boundaries are associated with and stored with the corresponding candidate recipes as processing condition constraints during outer layer screening.
[0015] A pet snack formula optimization system includes: a data acquisition module for acquiring the initial nutritional composition, corresponding processing conditions, and historical finished product test data of candidate raw materials; The conversion relationship construction module is used to construct the conversion relationship between raw material components, processing state and final state components based on the component changes of the same formula at the raw material end and the finished product end. The conversion relationship includes at least the water migration and concentration, the retention or loss of nutrient components and the interactive changes of raw material combination. The final state calculation module is used to generate the final state effective nutrient vector based on the candidate raw material ratio vector, the target processing conditions, and the conversion relationship. The collaborative adjustment module is used to calculate the collaborative adjustment amount based on the deviation between the final effective nutrient vector and the target nutrient interval. The joint solution module is used to jointly solve the raw material ratio and processing conditions with the target nutritional range as constraints, and output the pet snack formula composition and the corresponding processing feasible range.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. The initial nutrient composition of raw materials, processing conditions, and corresponding finished product test results are organized into a transformation relationship from raw material components to processed state and then to final state components. Concentration changes due to moisture migration, nutrient retention or loss, and interactive changes in raw material combinations are incorporated into the same calculation chain. This allows candidate formulations to no longer be judged solely based on theoretical values at the feeding stage, but rather by first converting to obtain the effective nutrient vector of the final state after processing. Then, the deviation between this vector and the target nutrient range is used to reverse-engineer the raw material ratio and processing conditions. Thus, the changes in final state components caused by changes in raw material ratios and changes in processing conditions are calculated within the same constraint system. Formulation solutions can be directly applied to the finished product state without needing to approximate specific processing transformations with fixed loss coefficients. For related component offsets caused by adjustments to a certain raw material, the formulation adjustment relationship formed by direct and indirect contributions is used to jointly determine the synergistic raw material ratio. This ensures that the target component correction and related component constraints remain consistent in the same solution, reducing the difference between the feeding calculation meeting requirements and the finished product testing exceeding limits.
[0017] 2. The transformation relationships are further established by creating directed transformation paths based on moisture migration, component retention or loss, and the interactive changes in raw material combinations. Path parameters are constrained using material balance and component non-negativity conditions. Once the finished product test values of a new production batch are obtained, the transformation paths involved in the calculation can be located in reverse based on the component residuals. Local parameters are then corrected according to the path contribution ratio, ensuring that new data only changes the transformation relationships related to the corresponding deviations, while maintaining other existing connections. The formulation solution employs a two-layer constraint method: an outer-layer search of raw material proportions and an inner-layer calculation of processing conditions. Only candidate formulations with non-empty processing condition sets are retained, and the feasible processing range is further determined based on the boundary states of each target nutrient component entering or leaving the allowable range. This ensures that the formulation composition corresponds to the available processing states, allowing updates along existing transformation paths even after changes in raw material composition or historical test data. This reduces the drift in transformation relationships caused by overall refitting and ensures that subsequent formulation calculations are continuously based on the final-state component relationships constrained by materials. Attached Figure Description
[0018] Figure 1 Flowchart of a method for optimizing final-state nutritional constraints in pet snack formulations; Figure 2 Transformation diagram of the final state effective nutrient vector; Figure 3 Calculation diagram for coordinated adjustment constraints; Figure 4 Define a graph for the feasible processing interval; Figure 5 A flowchart of the local update and formula recalibration process for the conversion path driven by feedback from new batches of finished products. Detailed Implementation
[0019] In one embodiment, a method for optimizing a pet snack formula includes: acquiring the initial nutritional composition, corresponding processing conditions, and historical finished product testing data of candidate raw materials; constructing a raw material component-processing state-final state component transformation relationship based on the component changes of the same formula at the raw material end and the finished product end, wherein the transformation relationship at least characterizes the concentration changes caused by moisture migration, the retention or loss of nutrient components, and the interactive changes caused by the combination of raw materials; inputting the candidate raw material ratio vector and the target processing conditions into the transformation relationship to obtain the final state effective nutrient vector; calculating the collaborative adjustment amount based on the deviation between the final state effective nutrient vector and the target nutrient range; and jointly solving the raw material ratio and processing conditions with the target nutrient range as a constraint to obtain the pet snack formula composition and the corresponding processing feasible range. In this embodiment, the candidate raw materials are not directly statically balanced according to the initial nutrient content in the ingredient list, but rather each raw material is combined with the target nutrient range. The mass ratio of candidate raw materials is converted into their contribution to the nutrient vector of the feed, and then extrapolated to the finished product state along the transformation relationship corresponding to the processing state. This transforms the comparison object of the formula calculation from the theoretical nutrient value at the time of feed to the effective nutrient value of the final state after processing. The target nutrient range adopts the same component definition and measurement standard as the finished product test data to avoid data incomparability caused by the raw material end being expressed on a wet basis and the finished product end being expressed on different moisture states. After obtaining the effective nutrient vector of the final state, a deviation vector is formed according to the direction and magnitude of the distance of each final state component from the allowable upper and lower bounds. Adjustable variables are determined according to the direction of the change of the candidate raw material ratio to each final state component through the transformation relationship. Then, the raw material ratio and processing conditions are placed together in the constrained solution space so that the final output formula composition corresponds to at least one set of processing states that can make all target final state components simultaneously within the allowable range.
[0020] For details, please refer to Figure 1The initial nutrient composition describes the quantifiable component state of each candidate ingredient in the current or historical batches. It can include at least protein, fat, moisture, ash, and other nutrients actually used in the formulation design. During data processing, a unique ingredient identifier, batch identifier, detection time identifier, and composition vector are established for each ingredient. The composition vector is then converted according to a unified quality standard. If a historical record is represented on a wet basis, its dry weight is restored based on the moisture content in the same record, and the wet basis value is retained simultaneously. This allows for subsequent calculation of the concentrated portion caused by moisture migration and the actual retention or loss due to non-moisture factors, corresponding to the processing... Conditions are not saved as isolated labels, but are represented as processing state vectors that can distinguish the historical finished product formation states. The processing state vectors are composed of adjustable conditions in the existing production records that have been used to control the drying, baking, or maturation processes of pet snacks. Historical finished product test data are established in correspondence with specific formula batches and specific processing states. Historical records with missing raw material batch information, inability to close the formula composition, or inability to unify the finished product test benchmark with the raw material end are not included in the conversion parameter calculation, but are saved as supplementary data. The resulting basic data set can clearly indicate which raw materials, their respective proportions, and the processing state jointly produced a certain finished product test result.
[0021] Furthermore, the transformation relationship between raw material components, processing state, and final state components is expressed in a hierarchical manner. The change from raw material input to finished product is broken down into concentration transfer caused by changes in total moisture, component retention or loss transfer caused by processing state, and interactive transfer caused by the coexistence of multiple raw materials. The moisture migration part is calculated based on the mass closure relationship between the total mass of the formula input, the moisture content of each raw material, and the moisture content of the finished product. The increase in the apparent proportion of protein or fat due to moisture reduction is not identified as the generation of nutrient components. The component retention or loss part is calculated based on the difference between the raw material end and the finished product end after deducting the effect of moisture concentration, and the direction of the difference change is constrained according to the processing state. The raw material combination interaction part is established using the residual amount between the actual finished product components and the first two types of transfer results. When a certain residual amount only appears continuously in a specific raw material combination or a specific proportion area, it is recorded as an interaction term associated with the corresponding raw material combination. When the residual amount does not have a stable direction among samples or cannot form a repeated correspondence with a specific raw material combination, an independent interaction term is not established, but it is retained as a fitting residual, thereby avoiding the direct solidification of random detection fluctuations into formula interaction rules.
[0022] In this embodiment, the final-state effective nutrient vector can be uniformly quantified using the following formula, where all symbols in the formula retain the same meaning throughout the text: ; Where y represents the final effective nutrient vector after processing, x represents the feed nutrient vector obtained by summarizing the candidate raw material ratios and initial raw material composition, and c represents the current processing state. This represents a concentration transformation determined by water migration. This represents the retention vector of each nutrient component under processing state c. This indicates that the components are multiplied one by one according to their position. This represents the interactive correction vector formed by the raw material combination under processing state c. For example, in the nutrient vector of a candidate formula, the protein component is recorded as 20 mass units. Under the corresponding processing state, the retention amount of this component is 0.9, the concentration factor caused by water migration is 1.1, and the interactive correction amount is -0.3 mass units. The corresponding final protein calculation result is 19.5 mass units. At this time, 19.5 is directly used as the value for comparison with the target range of the finished product instead of using 20 as the judgment basis. If the retention amount or concentration state changes, the final value generated by the same raw material ratio will change accordingly. This allows the processing state to enter the formula reverse solution process instead of being added as an independent condition after the formula is determined.
[0023] Please refer to Figure 2 , Figure 2 The horizontal axis represents the four stages the final effective nutrient vector goes through from the feeding end to the finished product end: feeding, retention, concentration, and final value. The vertical axis represents the component values of each controlled component at the corresponding stage. The curves in the legend represent the chewiness of protein, fat, moisture, ash, and collagen, respectively. Each curve is derived from the calculation relationship of the final effective nutrient vector in this embodiment, and is used to illustrate the symbols y, x, ... , and The position of action within the same computation chain.
[0024] from Figure 2 It can be seen that the protein curve is approximately 58.052 during the feeding stage, and after maintaining the vector... After treatment, the concentration decreased to approximately 56.246 during the retention phase, subsequently undergoing concentration conversion. The impact rebounded to approximately 57.639, eventually remaining near the final value, indicating that the final state of this component was not directly determined by the feed value, but was simultaneously affected by processing retention and moisture migration and concentration. The moisture content curve decreased from approximately 8.785 in the feed stage to approximately 6.526 in the concentration and final value stages, reflecting the dominant role of processing state c in moisture migration, and also explaining why other components showed apparent concentration.
[0025] The changes in the chewiness curves for fat, ash, and collagen were relatively small, but differences between retention, concentration, and cross-correction could still be observed. In particular, collagen chewiness rebounded during the concentration phase and then slightly decreased at the final value, indicating the cross-correction vector... The results will be recalibrated after simply maintaining and condensing them.
[0026] In a preferred embodiment, the construction of the raw material component-processing state-final state component transformation relationship includes: pairing initial nutrient composition, processing conditions, and historical finished product test data according to raw material batches and processing batches; firstly, separating the apparent concentrated component caused by moisture migration based on changes in total material quantity; then, extracting the retained or lost component based on the corresponding changes of a single nutrient component under different processing states; and determining the remaining difference between the actual finished product value and the superimposed value of the aforementioned components as the raw material combination interaction component; establishing a directed transformation path based on the input component, processing state, and output component corresponding to each component, and using material balance constraints and component non-negativity constraints to limit the parameters of the directed transformation path. Specifically, in the establishment process, the nutrient component in each raw material batch is used as the input component. The input node uses the uniformly coded processing state as the intermediate condition node, and the corresponding nutrient component in the finished product as the output node. For moisture migration paths, the explainable mass reduction is determined based on the difference between the total water content of the input and the water content of the finished product. For maintain or lose paths, only the component difference after deducting the concentration effect is used to estimate the path parameters. For interactive paths, it is required that the raw materials involved in the interaction appear together in at least multiple comparable batches and that the remaining differences have a consistent direction of change. This separates the single raw material contribution path and the combined contribution path from each other in the data structure. If a negative final state component mass is generated or the total calculable mass of the finished product exceeds the explainable range of the input material during the path parameter calculation process, the corresponding parameter combination is excluded and recalculated within the allowable domain.
[0027] For determining the specific parameters of a directed conversion path, all candidate paths for the same output component can be grouped into a local path set. Then, the contribution of each path to the output component can be calculated using historical paired samples. The residual between the sum of the path contributions and the finished product detection value should be within a predetermined data tolerance range. The parameters of the moisture path are preferentially determined directly by the quality closure relationship and do not participate in arbitrary fitting. The parameters of the retention or loss path are obtained by deducting the component changes after concentration under different processing states. If the historical data corresponding to adjacent processing states shows that a certain component has a stable unidirectional trend with the degree of processing, the corresponding path parameters are limited to maintain the direction of this trend. The interaction path parameters are calculated after the single raw material path is determined, thereby preventing the interaction term from absorbing the amount of change that should be explained by the moisture change or the single raw material retention relationship. Preferably, for historical formulas containing the same raw material set but different proportions, the interaction path can be set to be associated with the product of the proportions of the relevant raw materials or a piecewise proportional function, so that the interaction quantity only enters the final state calculation when all participating raw materials are present and returns to zero when the proportion of any participating raw material is 0. For combinations lacking sufficient historical support, no interaction path is established to ensure that the conversion relationship can be clearly calculated based on the observed formula data.
[0028] In a preferred embodiment, the parameter update of the directed transformation path includes: obtaining the finished product test value corresponding to the formula composition and processing conditions for a new production batch; calculating the component residual between the finished product test value and the output value of the raw material component-processing state-final state component transformation relationship; tracing the directed transformation path involved in the calculation in reverse along the output component corresponding to the component residual, and allocating the residual correction amount according to the contribution ratio of each path to the output component; performing a local update only on the path parameters for which the correction amount is obtained, maintaining the material balance constraint, component non-negativity constraint, and existing path connection relationship unchanged during the update process, and using the updated transformation relationship for subsequent final state effective nutrient vector calculation. Specifically, after a new batch enters, the predicted final state vector is first calculated using the transformation relationship before the update. Then, the residual is formed by subtracting the actual finished product detection vector from the residual of each component. For components whose residual is close to the predetermined detection tolerance, path correction is not triggered. For components that exceed the tolerance, the moisture path, the hold or loss path, and the interaction path are found from the corresponding output node along the reverse connection. The amount to be corrected is allocated according to the proportion of the absolute contribution of each path in the final state calculation of the current batch to the total contribution of all related paths. The moisture path is only allowed to be corrected when there is a corresponding deviation in the actual moisture quality closure relationship. In other cases, the correction amount is redistributed to the hold or loss path and the activated interaction path.
[0029] Furthermore, local path updates do not directly cover existing parameters with the full residuals. Instead, they combine the path correction amount allocated to the new batch with the existing historical sample size and the stability of historical residuals for that path, and complete the recursive update within the parameter allowable range. When a path has already formed stable parameters by a number of batches, the new batch only changes its local position within the allowable range. When a path is formed by only a small amount of historical data, the new data can generate a large parameter correction, but it must still not break the material balance and component non-negative boundaries. For interactive paths, it is also necessary to determine whether the set of participating raw materials in this batch is consistent with the historical interactive paths. If the set of raw materials is consistent but the proportion is outside the historical effective range, the residuals of this batch are only used to expand the range of the proportion to be verified without directly changing the original interactive function. If repeatable residuals in the same direction appear continuously, the corresponding proportion area is then incorporated into the interactive path. This keeps the update granularity of the transformation relationship within the range of the output component and its associated path where the deviation actually occurred, while other component paths, other raw material combination paths and existing connection structures that are unrelated to the residuals of this batch remain unchanged.
[0030] In a preferred embodiment, the determination of the synergistic adjustment amount includes: calculating the direct contribution of each candidate raw material ratio change to the target nutrient component and the indirect contribution to the remaining constrained nutrient components after the transfer of the raw material component-processing state-final state component transformation relationship; forming a formula adjustment contribution matrix according to the direct and indirect contributions; selecting candidate raw materials with reverse direct contributions for the out-of-limit direction of the target nutrient component, and searching for a set of synergistic raw materials that can offset the indirect contributions without changing the target correction direction from the candidate raw materials; and determining the corresponding proportional linkage adjustment amount based on the set of synergistic raw materials. Specifically, in the current candidate formula and the current addition... Near the working state, a predetermined small-scale perturbation is applied to each adjustable raw material. The difference between the effective nutrient vectors of the final state before and after the perturbation is calculated and then divided by the corresponding proportional change to obtain the local contribution column vector. The component corresponding to the current over-limit target component is taken as the direct contribution, and the other component components subject to upper and lower bound constraints are taken as indirect contributions. The contribution column vectors of multiple candidate raw materials are combined into a contribution matrix according to a fixed component order, so that each matrix element corresponds to the propagation change of a certain raw material proportion on a certain final state component. When there is a nonlinear interaction in the transformation relationship, the local contribution matrix is recalculated after each round of proportion update instead of using the old matrix that is far from the current formulation state.
[0031] In this embodiment, the coordinated adjustment amount can be constrained and calculated using the following formula: ; ; in, Let A represent the linkage adjustment vector of the proportions of each candidate raw material, let e represent the formula adjustment contribution matrix under the current formula state, let e represent the deviation vector formed by the current final state effective nutrient vector relative to the center of the target interval or the specified target value, and let W represent the non-negative weight matrix set for different constrained final state components. The coefficient represents the non-negative coefficient that limits the overall change in the formulation; l and u represent the lower and upper bounds of the allowable limits for each final-state component, respectively; and st indicates that the constraint condition is met. This indicates that the algebraic sum of all raw material proportion adjustments is 0 to maintain a closed overall formula proportion. This indicates a transpose. For example, if the current final protein value is higher than the upper limit of the allowable range, and reducing a certain raw material by 1 percentage unit will cause the protein to decrease by 0.8 units but simultaneously cause the fat to decrease by 0.3 units, while increasing another raw material by 1 percentage unit will cause the fat to increase by 0.25 units and only cause a change of 0.05 units in the protein, the contribution matrix will cause the two raw materials to adjust in a coordinated manner instead of only reducing the first raw material. Thus, while correcting the direction of the protein exceeding the limit, it will also indirectly compensate for the fat shift, and all percentage adjustments will still maintain a closed total.
[0032] Please refer to Figure 3 , Figure 3 This is used to explain the direction of change of the synergistic adjustment calculation results at the component level. The horizontal axis does not use numerical numbers, but instead uses three Chinese stages—before adjustment, target, and after adjustment—to represent the final value before formulation adjustment, the target reference value, and the recalculated value after obtaining the synergistic adjustment amount; the vertical axis represents the values of each component. Figure 3 The curves in the figure correspond to the chewiness of protein, fat, moisture, ash, and collagen, and are used to observe the contribution matrix A, the bias vector e, the weight matrix W, and the adjustment vector. The final convergence effect after the combined action.
[0033] The curves show that collagen chewiness shifted from approximately 25.680 before adjustment to the target of 30.500, reaching approximately 29.876 after adjustment, indicating a significant positive correction for this indicator. Ash content decreased from approximately 7.145 before adjustment to approximately 5.270 after adjustment, approaching the target of 5.200, showing that when a component is near its upper limit, the contribution matrix can guide the proportion of raw materials towards reducing that component. Protein content showed relatively small but clear changes between approximately 57.639 before adjustment, the target of 58.400, and approximately 58.544 after adjustment, reflecting a balance between target component correction and the overall formulation constraint.
[0034] The moisture content curve improved from approximately 6.526 before adjustment to approximately 7.136 after adjustment, but did not directly reach the target of 10.000. The fat content curve remained around 8.354 after adjustment, indicating that the target adjustment was not a forced fit to a single indicator, but rather a process involving the lower bound l, the upper bound u, and the overall change coefficient. A compromise result is obtained under the combined constraints of the proportional closure condition.
[0035] Furthermore, the combined search of the synergistic raw material set includes: establishing a contribution feature vector for each candidate raw material, composed of the direct contribution of the target nutrient component and the indirect contribution of each constrained nutrient component; mapping the target nutrient deviation that needs to be corrected to the target contribution direction, and mapping the offset of the associated components that need to be offset to the compensation contribution direction; firstly, eliminating candidate raw materials whose direct contribution direction is opposite to the target contribution direction, and then searching from the remaining raw materials for a set of raw materials whose weighted combination of contribution feature vectors matches the compensation contribution direction, and using the proportional coefficient corresponding to the weighted combination as the initial value of the linkage adjustment amount, completing the proportional correction under the constraint of the target nutrient range. In the specific search process, Currently, target components that exceed the upper limit are defined as requiring negative correction, while target components that fall below the lower limit are defined as requiring positive correction. Only changes in the proportion of raw materials that can move the target component into the allowed range are included in the candidate set. For candidate changes that can correct the target component but will cause another constrained component that is already close to the boundary to move further in the direction of exceeding the boundary, they must be combined with at least one other raw material change that has a reverse indirect contribution before they are allowed to enter the linkage adjustment. When evaluating the combination, the similarity of the nutritional composition of a single raw material is not used as a substitute basis. Instead, the contribution feature vector after processing and transformation is used directly to determine whether it can form the required final state compensation direction.
[0036] Preferably, when there are many selectable synergistic raw material sets, the search can be performed from small to large set size. Under the premise of satisfying the upper and lower bounds of all final state nutrients and the closed constraint of the total proportion of the formula, the combination with fewer adjusted raw materials and smaller changes in the total proportion is given priority. If two candidate combinations can satisfy the constraints under the current local contribution matrix, they are substituted into the raw material component-processing state-final state component transformation relationship for complete nonlinear recalculation, instead of judging the result based solely on the linear contribution matrix. If a combination generates a new final state out of bounds due to the activation of raw material interaction terms after recalculation, the combination is removed from the current round of candidate sets and the search continues. If all small-scale combinations cannot satisfy the constraints, the number of raw materials participating in the linkage is gradually increased. When the adjustment of a certain raw material triggers an interaction path that did not exist before, the contribution feature vector of the current formula position is regenerated and the compensation direction is updated, so that the synergistic adjustment process can handle the nonlinear propagation caused by changes in raw material combination. Furthermore, before accepting a new proportion vector, the final state effective nutrient vector is verified again through the complete transformation relationship.
[0037] In a preferred embodiment, the joint solution of raw material ratios and processing conditions includes: constructing a two-layer constraint solution process with candidate raw material ratios as outer-layer decision variables and processing conditions as inner-layer state variables; the outer layer generates candidate formulations within the allowable raw material ratio range, and the inner layer calculates the effective nutrient vector of the final state under different processing conditions by calling the raw material component-processing state-final state component transformation relationship for each candidate formulation; the set of processing conditions that satisfy all target nutrient ranges is returned to the outer layer, and only candidate formulations with non-empty processing condition sets are retained; the retained results are screened based on the joint objective consisting of final state component deviation and nutrient loss to obtain the formulation composition and corresponding processing conditions. During implementation, the feasible interval consists of the outer proportion domain, which is composed of the candidate raw materials allowed in the formulation and their legal proportion ranges. A closure condition is applied that the sum of the proportions of all raw materials equals the predetermined total amount. After the outer layer generates a new candidate proportion vector, it is not directly evaluated based on the initial composition of the raw materials, but is passed to the inner layer. The inner layer changes the processing state point by point or adaptively within the defined processing state allowable domain, and calls the same transformation relationship to calculate the final state vector. When any target component in a certain processing state exceeds the allowable range, it is marked as an infeasible state. When all target components are within the allowable range, it is marked as a feasible state. Feasible states belonging to the same continuous region are organized into intervals and passed back to the outer layer.
[0038] In this embodiment, the processing feasibility range of candidate formulation q can be defined by the following formula: ; in, Let represent the set of processing feasible states corresponding to candidate formula q. This represents all processing state domains that are allowed to participate in the solution. This represents the k-th final-state component value obtained by calculating the transformation relationship for candidate formulation q under processing state c. and Let these represent the lower and upper bounds of the allowed values for the k-th final state component, respectively. This represents the set of indices for all constrained final-state components. For example, if a candidate formulation, when processed from low to high, has protein final-state values satisfying the boundary conditions in state intervals 3 to 7, fat final-state values satisfying the boundary conditions in state intervals 2 to 6, and moisture final-state values satisfying the boundary conditions in state intervals 4 to 8, then the common feasible states for the three constraints are 4 to 6. Take the continuous state segments corresponding to 4 to 6; if any constrained component does not share a state segment with other components, then If the set is empty, the corresponding candidate recipe is removed from the outer result.
[0039] Please refer to Figure 4 The horizontal axis represents the candidate formulation in the permissible processing state domain. The concise Chinese process stages evaluated sequentially include preheating, low-temperature baking, steady-state treatment, fortification, final baking, verification, and sample retention; the vertical axis represents the safety margin of each controlled component from the nearest target boundary. In the legend, protein, fat, moisture, ash, and collagen chewiness correspond to the respective index sets. Different final state components in the model are represented by boundary lines indicating positions where the balance is zero. Figure 4 With processing feasible set Corresponding to the definition, it is used to determine different processing states c. Are they simultaneously located and between.
[0040] from Figure 4 As can be seen, all component curves lie above the boundary line in the indicated stages, suggesting that the candidate formulation still has a common feasible space under these processing states. The safety margin for protein and collagen chewiness remains at a high level from preheating to fortification, and then gradually decreases in the final drying, verification, and retention stages, indicating that the final state constraint margin is continuously consumed as processing intensity increases; the fat curve remains between approximately 0.8 and 0.9, with a relatively gentle change, indicating that it is not a major tightening constraint in the current candidate formulation.
[0041] The moisture content curve shows a relatively high margin during the preheating and low-temperature drying stages, then decreases rapidly after reaching steady state, approaching zero during the intensification, final drying, verification, and sample retention stages, indicating that moisture is a sensitive constraint on the feasibility of subsequent processing. The ash content curve remains within a low but stable positive margin range, showing that it is close to the boundary but has not exceeded it.
[0042] Furthermore, the determination of the feasible processing interval includes: for candidate formulations retained by the outer layer, continuously changing processing conditions according to the predetermined state variable direction within the permissible processing condition domain, and calculating the final state effective nutrient vector of each state point using the transformation relationship between raw material components, processing state, and final state components; identifying the boundary state points corresponding to the first entry or exit of each target nutrient component into the permissible interval, and constructing the initial feasible interval with the state segments where all target nutrient component constraints are simultaneously met; for state segments where there is constraint switching between adjacent boundary state points, re-subdividing and correcting the boundary positions based on the dominant constraint component, and finally determining the state segments that continuously satisfy all target nutrient intervals. The feasible processing interval is defined as follows: In specific implementation, a larger state interval is first used to traverse the allowable domain to determine the area where feasible intervals may exist. Then, the search interval is narrowed between adjacent state points where a certain component changes from inside the interval to outside the interval or from outside the interval to inside the interval, until the boundary state that can meet the accuracy requirements of the formula calculation is obtained. When multiple processing variables jointly determine the processing state, the non-current search variable can be fixed and the boundary can be searched along the direction of the current variable. After obtaining the local boundary, other variables are changed to form a multi-dimensional feasible region. Finally, the region that can continuously maintain the constraints of all final state components is projected into the processing condition range consistent with the actual processing control record.
[0043] In a preferred embodiment, segmented constraint preservation processing is performed on the feasible processing interval, including: recording the dominant constraint component corresponding to each boundary state point and its direction of entering or leaving the target nutrient interval; when the dominant constraint component of adjacent state segments changes, establishing local boundaries with the constraint switching position as the segment point, and keeping non-dominant constraint components within the allowed interval within each local boundary; performing continuous merging on adjacent local boundaries with overlapping feasible states, maintaining segmented expression for local boundaries without overlapping feasible states, and storing the segmented boundaries in association with the corresponding candidate formulations as processing conditions during outer layer screening. Constraints, such as a candidate formulation having a lower bound of feasibility determined by the moisture content near a lower processing state and an upper bound of feasibility determined by the protein retention near a higher processing state, are recorded as the dominant constraint sources for the state segments between the two. When searching the boundary, only the current dominant component is calculated at high density, while other components are checked to ensure they are still within their respective allowable ranges. If a fat component briefly crosses the boundary and forms an infeasible gap, the states on both sides of the gap are not forcibly merged into a single interval, but are saved as two locally feasible processing intervals. This allows the outer formulation screening to identify whether the candidate formulation has continuous executable processing state segments.
[0044] Furthermore, after completing the local update of the directed transformation path, the direct and indirect contributions of the raw materials associated with the updated path are recalculated, and only the row and column items corresponding to the updated path in the formula adjustment contribution matrix are updated. The contribution difference before and after the local update is decomposed into the target component correction component and the associated component compensation component. When the target component correction component changes the original target contribution direction, candidate raw materials are re-screened. When only the associated component compensation component changes, the candidate raw materials remain unchanged and the weighted combination coefficient of the synergistic raw material set is recalculated. A new linkage adjustment amount is generated from the updated contribution matrix. In the specific implementation, the path update record is saved. The modified input raw material nodes, processing state regions, output component nodes, and parameter changes can be used to determine the affected raw material columns and final state component rows in the contribution matrix. There is no need to recalculate matrix elements that are not connected to the update path. When the local contribution of a raw material to the target protein changes from positive to negative, it means that it is no longer suitable as a candidate variable for the original correction direction under the current processing state or interaction conditions. Therefore, candidate screening is re-executed. When its direction to the target component remains unchanged but the magnitude of its indirect contribution to fat or water changes, only the co-combination coefficient is resolved and the complete final state recalculation is performed.
[0045] During the continuous operation of this embodiment, please refer to Figure 5 Each time new actual finished product test data is obtained, residual formation, related path location, local parameter correction, correlation contribution matrix update, and processing feasible interval verification can be completed sequentially. However, the above processing does not mean that the formula must be changed for each batch. If the parameter changes caused by the new data still satisfy all target nutrient constraints within the existing processing feasible interval after final state recalculation, the existing raw material ratio and processing condition range are maintained, and only the updated conversion path parameters are saved for subsequent calculations. If the update causes the processing feasible interval of the current formula to shrink but is still not empty, the updated interval replaces the original interval and the formula is retained. If the processing feasible interval becomes an empty set or the target component of the current formula exceeds the limit under all allowed processing conditions, collaborative adjustment and outer ratio search are initiated. In this way, data updates, formula adjustments, and processing interval solutions are associated with the same final state constraint, rather than directly converting each test deviation into raw material increase or decrease instructions.
[0046] In a specific implementation process, several animal-derived raw materials, plant-based protein raw materials, fat-derived raw materials, and other food raw materials that can participate in the calculation of the nutritional composition of the formula can be selected as a candidate set. The system reads the detection values of protein, fat, moisture, and other target components of each raw material in the current batch and establishes a corresponding conversion path based on historical formulas. Assuming that the initial candidate formula is calculated according to the theoretical values of the raw materials, all components are within the target range. However, the conversion relationship calculation finds that the concentration effect caused by the decrease in moisture after the selected processing state makes the final state value of protein close to the upper limit. At the same time, when a certain protein source raw material coexists with another raw material, a negative interaction term is formed, causing a specific effective nutrient component to be close to the lower limit. In this case, the solution process will not simply reduce the proportion of all protein raw materials. Instead, it will look for proportion changes that can reduce the final state protein and have a small negative impact on the effective nutrient components based on the contribution matrix. Then, it will combine the raw material proportion adjustments that can compensate for the changes in fat or other related components. The new proportion vector will be re-input into the complete conversion relationship for verification. Only when the new formula meets all final state constraints simultaneously within at least one processing state range will it be retained.
[0047] In another preferred implementation, when the same candidate raw material is changed to a different batch, its initial moisture and protein content changes relative to the historical average. The system directly replaces the input composition of the raw material in the current formula with the new batch detection vector without modifying the basic data of other raw materials, and calculates the new final-state effective nutrient vector using the existing transformation relationship. If there is a residual in the moisture component between the predicted result and the subsequent actual finished product detection result, but the protein and fat residuals are still within the allowable data tolerance, then only the moisture migration path associated with the batch is traced along the moisture output node and the material closure status is checked. If the residual can be explained after the moisture path correction, the protein retention path and interaction path are not modified. The updated moisture path further changes the concentration transformation related to the raw material. Based on this, the system recalculates the final-state components affected by moisture concentration and the corresponding contribution matrix. If there is still a non-empty processing feasible interval in the current formula, the formula ratio remains unchanged. In this way, the correction caused by batch change is limited to the data-based path and its propagation relationship.
[0048] In another preferred implementation, a restricted activation mode can be set for candidate raw materials with limited historical data coverage. That is, when a new raw material enters the formulation candidate set, its initial nutritional composition and moisture migration relationship that can be directly determined by mass balance are used to participate in the final state calculation. For the maintenance or loss path that does not yet have sufficient historical data support, the allowable parameter range of similar verified raw materials is used as the boundary instead of directly replicating the specific path value. For raw material combinations that do not have historical common formulation data support, no interaction terms are preset. After the new raw material has gone through several actual processing batches, the maintenance or loss path belonging to the raw material is gradually established by using the paired raw material composition, processing status and finished product test data. If the actual residual forms a repeatable combination correlation when it appears together with other raw materials, the corresponding interaction path is then established. Therefore, in the process from initial restricted participation to the formation of a complete transformation relationship, all parameters are generated by the same data pairing and material constraint system, avoiding the construction of the final state contribution by arbitrary assumptions when historical data is insufficient.
[0049] In an embodiment corresponding to the above method, a pet snack formula optimization system includes: a data acquisition module for acquiring the initial nutritional composition of candidate raw materials, corresponding processing conditions, and historical finished product test data; a conversion relationship construction module for constructing a raw material component-processing state-final state component conversion relationship based on the component changes of the same formula at the raw material end and the finished product end, wherein the conversion relationship includes at least moisture migration and concentration, nutrient component retention or loss, and interactive changes in raw material combination; a final state calculation module for generating a final state effective nutrient vector based on the candidate raw material ratio vector, target processing conditions, and conversion relationship; a collaborative adjustment module for calculating the collaborative adjustment amount based on the deviation between the final state effective nutrient vector and the target nutrient range; and a joint solution module for jointly solving the raw material ratio and processing conditions with the target nutrient range as a constraint, and outputting the pet snack formula composition and corresponding processing feasible range. Each module belongs to the logical processing part in the same data processing chain, and its data objects, conversion relationships, final state vectors, contribution matrices, and constraint boundaries are defined in the same way as the aforementioned method. The modules pass intermediate results through structured data objects without changing the physical meaning of the data, so that the system execution process can correspond to the aforementioned formula optimization process item by item.
[0050] Specifically, the data acquisition module maintains the association index between raw material records, formula records, processing status records, and finished product testing records. When reading historical data, it finds all raw material batches and proportions involved in the batch based on the formula batch identifier, and binds the corresponding processing status and finished product testing results into a complete sample. If the same formula forms multiple finished product batches through different processing statuses, samples are created separately without merging processing statuses. If different formulas use the same processing status, they are still retained according to the formula composition. After receiving the complete sample, the transformation relationship construction module decomposes the component changes according to the order of moisture migration, retention or loss, and combination interaction. The resulting paths are stored with input node identifiers, output node identifiers, processing status applicable domains, path parameters, and data source ranges. The final state calculation module activates the paths that match the current candidate formula's raw material set and processing status based on the current candidate formula, and then generates the final state effective nutrient vector according to the determined order of moisture concentration transformation, retention calculation, and interaction correction. Interaction paths not activated by the current formula are not included in this round of calculation.
[0051] Furthermore, the collaborative adjustment module receives the final state effective nutrient vector and the upper and lower bounds of the target nutrient to form a deviation state. For each candidate raw material that can be adjusted, it calculates the local contribution feature vector at the current formula position and forms a formula adjustment contribution matrix with all contribution feature vectors. If there are no out-of-bounds components, no raw material adjustment amount is generated, and the candidate formula is directly handed over to the joint solution module to determine its processing feasible range. If there are out-of-bounds components, raw material changes that can produce reverse direct contributions are screened according to the out-of-bounds direction. Then, compensation combinations are searched according to their indirect contributions and the linkage adjustment vector is obtained through the proportional total closure constraint. The joint solution module uses the new proportional vector as the outer candidate and traverses or refines the search processing state domain. For each processing state obtained, the final state calculation module is called to regenerate the final state vector. Instead of using the linear approximation result of the collaborative adjustment stage as the final judgment, only the state that satisfies all target nutrient boundaries is included in the processing feasible set.
[0052] During continuous system use, the transformation relationship construction module can also save the historical version and corresponding data range of each directed transformation path. When a new finished product test record enters, the final state calculation module first gives the prediction result according to the current version. The data acquisition module establishes the same batch correspondence between the actual test result and the prediction result. The transformation relationship construction module locates the relevant path in reverse according to the component residual and generates local parameter updates. After the update is completed, the affected path identifier is sent to the collaborative adjustment module. The collaborative adjustment module only recalculates the corresponding rows and columns in the contribution matrix according to the path identifier. The joint solution module reviews the existing processing feasible intervals of the current formula. If the interval boundary changes, the corresponding boundary record is replaced. If the interval becomes an empty set, the outer candidate formula search is retried. The entire update process uses the same formula batch, raw material batch and processing status index to maintain data traceability, so that a parameter change can be used to look up the finished product test data that triggered the update and the raw material combination involved in the calculation.
[0053] Preferably, to avoid inconsistencies in nutrient component names, measurement standards, or arrangement order at different calculation stages, the system can establish a fixed component index for each final-state component participating in optimization. The initial nutrient vector of raw materials, the effective nutrient vector of the final state, the upper and lower bound vectors of the target, the residual vector, and the rows of the contribution matrix are all arranged according to the same index. If a batch of raw materials lacks a certain detection value, the raw material record is marked as having incomplete data for that component before entering the candidate formulation solution, and whether it is allowed to enter the solution depends on whether it belongs to a hard constraint component. For missing values belonging to the target nutrient hard constraint, no unfounded default values are used to fill in the missing values. If there are changes in the detection standard in the historical records, the data is first uniformly converted using the known moisture data and the quality standard relationship. Only the converted data participates in the path parameter calculation, thereby ensuring that the data dimensions used for final state transformation, collaborative adjustment, and processing range determination remain consistent.
[0054] Furthermore, for the generation of outer-layer candidate formulations in the two-layer solution, local candidates can be generated starting from the current baseline formulation according to the direction of collaborative adjustment. At the same time, other feasible combinations within the allowable proportion range of raw materials are retained to avoid local infeasibility. When the collaborative adjustment obtains a clear linkage direction, the proportion is changed along that direction first, and the inner-layer judgment processing feasible set is called one by one. When multiple consecutive candidates obtain empty sets, the outer-layer search range is expanded. When a candidate formulation obtains a non-empty processing feasible set, the minimum margin of its final component from the upper and lower bounds, the amount of nutrient loss, and the proportion change relative to the baseline formulation are used as screening data. The screening data is only used to determine the retention order among candidates that have satisfied all hard constraints. It is not allowed to use better screening data to offset any final component out-of-bounds state. Therefore, the formulation feasibility judgment and candidate selection maintain a process of constraint first and then comparison.
[0055] In a preferred embodiment, when the processing state contains multiple related processing variables, the processing states that actually appear in the historical data can be combined to form an allowable state domain, and an inner search can be performed within this state domain. Instead of arbitrarily combining the historical minimum and maximum values of each processing variable to form a processing state that has never appeared before, for regions with continuous historical coverage and interpolation calculations supported by the transformation path, intermediate states can be generated between adjacent historical states for boundary refinement. States that exceed the historical coverage range are not directly extrapolated to processing feasible intervals unless there are already feasible constraints for the corresponding path parameters. This allows the processing feasible intervals to be established within the state range where the transformation relationship is supported by data. When the local boundary is restricted by different nutrient components, the segments are saved according to the positions of each component entering and leaving the allowable interval, and each segment is bound to the corresponding candidate formula version and transformation relationship version so that only the affected intervals are reviewed after subsequent path updates.
[0056] In the complete operational chain of this embodiment, the initial nutritional composition of raw materials provides the quantitative state at the formulation input end, the processing conditions provide the state variables from the input end to the finished product end, and the historical finished product detection data provides the constraint basis for the conversion path parameters. The conversion relationship between raw material components, processing state, and final state components converts the above data into a calculable final state mapping. The effective nutrient vector of the final state is directly compared with the target nutrient range of the finished product. The collaborative adjustment process forms a linkage change of raw materials based on direct and indirect contributions. The two-layer solution process further determines whether there is a common feasible state in the allowed processing state domain after the adjustment of the formulation. After the actual finished product data is returned, the specific conversion path is corrected along the original data correlation relationship. Thus, a closed processing chain is formed from raw material data, processing state, final state calculation, formulation correction, processing range determination to actual detection feedback. Moreover, every ratio adjustment and every processing range change in the closed processing chain can be traced back to the corresponding final state component constraints and conversion path.
[0057] Specifically, when a target component exceeds the allowable upper limit, the system does not directly set the raw material with the highest content of that component as the reduction target. Instead, it reads the local direct contribution of all raw materials in the current contribution matrix to the final state component. This is because although a certain raw material may have a high initial component content, it may have a low retention amount or form a negative interaction with other raw materials under the current processing state, so its direct contribution to the final state may not be the largest. After screening candidate ratio changes that can move the out-of-bounds component to the lower limit, the system checks the indirect contribution of these changes to other constrained components. If a change will cause another component to cross the lower limit, the system searches for matching raw material changes with reverse indirect contributions and solves the ratio closure condition together. After forming a new candidate formulation, the final state value is recalculated through the complete transformation relationship. Therefore, the raw material selection is based on the propagation results after processing rather than just the single high-low relationship in the raw material composition table.
[0058] When a target component falls below the allowable lower bound, the corresponding reverse processing is adopted. The system retains candidate changes that can increase the final state component from the contribution matrix and incorporates the offset of fat, moisture or other related components caused by the increase of the corresponding raw materials into the same linkage adjustment. If there are multiple candidate combinations that can satisfy the target direction, their proportional adjustment amounts are calculated separately and entered into the double-layer inner layer calculation. Some candidate combinations may satisfy the final state constraint in the current processing state but will go out of bounds after a slight change in the processing state. Such candidates can still form a non-empty but narrow processing feasible interval. Other candidate combinations can satisfy the constraint in a more continuous state range. The joint solution module determines the output formula and corresponding processing interval according to the predefined feasible candidate screening rules, and will not ignore whether the nearby state is feasible just because the final state value of a certain single point processing state is close to the target center.
[0059] After a new formula is put into the actual production data chain, its raw material batches, formula ratios, processing status, and final product test results continue to be included in the historical set as new complete samples. If the finished product results and the calculated conversion relationship values are consistent with the allowable data residual range, the current path parameters are retained and the data support records for that path are added. If a deviation occurs, the relevant path is located in reverse according to the output components and a local update is completed. After the local update, the final state contribution related to the path and the feasible processing range of the existing formula are recalculated. When multiple new data continuously indicate that a certain combination interaction term changes direction in a specific ratio range, the original interaction path can be divided into adjacent local intervals at that ratio position and the parameters can be calculated separately, so that the conversion relationship can express different interaction changes under different ratio ranges. Each local interval is still limited by the same material balance, component non-negativity, and historical data correspondence.
[0060] In another preferred embodiment, when there are upper and lower bounds in the target nutrient range but no single optimal value, the outer layer solution does not force all final state components to tend to the center of the range. Instead, it considers the components inside the allowable range as having met the constraints. Only when they approach the boundary due to the linkage adjustment of other raw materials will they participate in the compensation calculation through the contribution matrix. For components with a specified target value, their deviation relative to the specified value can be calculated at the same time for candidate screening. However, this deviation does not replace the upper and lower bound constraints. If the specified target deviation of a candidate formula is small but the processing feasible set is empty, it is directly determined that it cannot be retained. If the specified target deviation of another candidate formula is large but it is still within the allowable range and there is a continuous processing feasible state, it is still a feasible candidate. In this way, the hierarchical relationship between the formula nutrient qualification judgment criteria and the candidate selection criteria is maintained.
[0061] In the above embodiments, the output of the formula optimization includes at least candidate raw material identifiers, corresponding proportions of each raw material, processing feasible intervals associated with the formula version, and transformation relationship versions used to generate the results. The processing feasible intervals in the output data are not fixed processing ranges unrelated to the formula, but rather constraint results obtained by final state transformation calculation based on the current raw material proportions. When the raw material proportions change, the corresponding intervals must be recalculated. When the transformation path parameters are partially updated due to new batch data and the updated path participates in the current formula calculation, the corresponding intervals also need to be re-verified. This enables different formulas under the same product objective to be associated with different processing condition ranges, and the same candidate formula can regenerate final state calculation results based on the new input nutrient vector after the raw material batch composition changes.
[0062] Through the above implementation, after the initial nutritional composition of the raw materials is entered into the calculation, the pet snack formula undergoes a multi-path transformation involving moisture migration and concentration, component retention or loss, and raw material combination interaction, forming a final-state effective nutrient vector consistent with the finished product detection caliber. The final-state deviation is then converted into a raw material linkage adjustment amount with direct and indirect contribution constraints through the formula adjustment contribution matrix. The new candidate ratio is further combined with the processing status to enter the double-layer constraint solution and form the processing feasible range. The actual finished product detection results can then reversely correct the directional transformation path and corresponding contribution matrix related to the deviation. The method implementation process maintains the same data definition and processing order as the data acquisition module, transformation relationship construction module, final state calculation module, collaborative adjustment module, and joint solution module in the system, fully covering the continuous processing process from historical data modeling, final-state nutrient calculation, formula collaborative correction, processing status constraints to new batch data updates.
Claims
1. A method for optimizing pet snack formulas, characterized in that, include: Obtain the initial nutritional composition, corresponding processing conditions, and historical finished product test data of the candidate raw materials; Based on the component changes of the same formula at the raw material end and the finished product end, the transformation relationship of raw material components—processing state—final state components is constructed. The transformation relationship characterizes the concentration changes caused by moisture migration, the retention or loss of nutrient components, and the interactive changes caused by raw material combination. By inputting the candidate raw material ratio vector and the target processing conditions into the transformation relationship, the final effective nutrient vector is obtained; The collaborative adjustment amount is calculated based on the deviation between the final effective nutrient vector and the target nutrient interval; By using the target nutritional range as a constraint, the proportion of raw materials and processing conditions are jointly solved to obtain the composition of pet snack formulas and the corresponding feasible processing range.
2. The method for optimizing a pet treat formula according to claim 1, characterized in that, The construction of the raw material component-processing state-final state component transformation relationship includes: matching the initial nutritional composition, processing conditions and historical finished product test data according to the raw material batch and processing batch; First, based on the change in total material quantity, the apparent concentrated component caused by moisture migration is separated. Then, based on the corresponding changes of a single nutrient component under different processing conditions, the retained or lost component is extracted. The remaining difference between the actual finished product value and the sum of the components is determined as the raw material combination interaction component. A directed transformation path is established based on the input components, processing states, and output components corresponding to each component, and the parameters of the directed transformation path are limited by material balance constraints and component non-negativity constraints.
3. The method for optimizing a pet treat formula according to claim 1, characterized in that, The determination of the coordinated adjustment amount includes: calculating the direct contribution of the change in the proportion of each candidate raw material to the target nutrient component after being transmitted through the raw material component-processing state-final state component transformation relationship, as well as the indirect contribution to the other constrained nutrient components. A formula adjustment contribution matrix is formed based on the direct contributions and the indirect contributions; Candidate raw materials with direct reverse contributions are selected for the direction of exceeding the limit of the target nutrient component. A set of synergistic raw materials that can offset the indirect contribution without changing the target correction direction are searched among the candidate raw materials. The corresponding proportional linkage adjustment amount is obtained based on the set of synergistic raw materials.
4. The method for optimizing a pet treat formula according to claim 1, characterized in that, The joint solution of raw material ratio and processing conditions includes: constructing a two-layer constraint solution process with the candidate raw material ratio as the outer layer decision variable and the processing conditions as the inner layer state variable; The outer layer generates candidate formulations within the allowable proportion range of raw materials, and the inner layer calculates the effective nutrient vector of the final state under different processing conditions by calling the raw material component-processing state-final state component transformation relationship for each candidate formulation. The set of processing conditions that meet all target nutrient ranges is fed back to the outer layer, and only candidate formulations with a non-empty set of processing conditions are retained. The retention results were screened based on the joint objective of final component deviation and nutrient loss to obtain the formulation composition and corresponding processing feasible range.
5. The method for optimizing a pet treat formula according to claim 2, characterized in that, The parameter update of the directed transformation path includes: obtaining the finished product test value corresponding to its formula composition and processing conditions for a new production batch, and calculating the component residual between the finished product test value and the output value of the raw material component-processing state-final state component transformation relationship; The directed transformation path involved in the calculation is traced in reverse along the output component corresponding to the component residual, and the residual correction amount is allocated according to the contribution ratio of each path to the output component. Only the path parameters for which the correction amount is obtained are locally updated. During the update process, the material balance constraints, component non-negativity constraints, and existing path connection relationships remain unchanged, and the updated transformation relationships are used for subsequent calculation of the final state effective nutrient vector.
6. The method for optimizing a pet treat formula according to claim 3, characterized in that, The combined search of the synergistic raw material set includes: establishing a contribution feature vector for each candidate raw material, which is composed of the direct contribution of the target nutrient component and the indirect contribution of each constrained nutrient component; The target nutrient bias that needs to be corrected is mapped to the target contribution direction, and the offset of the associated components that needs to be offset is mapped to the compensation contribution direction. First, candidate raw materials whose direct contribution direction is opposite to the target contribution direction are screened out. Then, a set of raw materials whose weighted combination of contribution feature vectors matches the compensation contribution direction is searched from the retained raw materials. The proportional coefficient corresponding to the weighted combination is used as the initial value of the linkage adjustment amount, and the proportional correction is completed under the constraint of the target nutrient range.
7. The method for optimizing a pet treat formula according to claim 4, characterized in that, The determination of the processing feasible range includes: for the candidate formulation retained by the outer layer, continuously changing the processing conditions in the direction of the predetermined state variable within the processing condition allowable domain, and calculating the final state effective nutrient vector of each state point using the raw material component-processing state-final state component transformation relationship; Identify the boundary state points corresponding to the first entry or exit of each target nutrient component into the allowable range, and construct the initial feasible range with the state segments in which all target nutrient component constraints are simultaneously met. For state segments where there are constraint switching between adjacent boundary state points, the boundary positions are re-subdivided and corrected based on the dominant constraint components, and finally the state segments that continuously satisfy all target nutrient intervals are determined as the processing feasible intervals.
8. The method for optimizing a pet treat formula according to claim 5, characterized in that, After completing the local update of the directed transformation path, the direct and indirect contributions of the raw materials associated with the updated path are recalculated, and only the row and column items corresponding to the updated path in the formula adjustment contribution matrix are updated. The contribution difference before and after the local update is decomposed into a target component correction component and a related component compensation component. When the target component correction component changes the original target contribution direction, candidate raw materials are re-screened. When only the related component compensation component changes, the candidate raw materials are kept unchanged and the weighted combination coefficient of the synergistic raw material set is recalculated. A new linkage adjustment amount is generated from the updated contribution matrix.
9. The method for optimizing a pet treat formula according to claim 7, characterized in that, The segmented constraint preservation process for the feasible processing interval includes: recording the dominant constraint components corresponding to each boundary state point and their directions of entering or leaving the target nutrient interval; When the dominant constraint component of an adjacent state segment changes, local boundaries are established with the constraint switching position as the segmentation point, and the non-dominant constraint component is kept within the allowable range within each local boundary. For adjacent local boundaries with overlapping feasible states, a continuous merging is performed. For local boundaries without overlapping feasible states, a segmented representation is maintained, and the segmented boundaries are associated with and stored with the corresponding candidate recipes as processing condition constraints during outer layer screening.
10. A pet treat formula optimization system, characterized in that, The method for implementing any one of claims 1 to 9 includes: a data acquisition module for acquiring the initial nutritional composition of candidate raw materials, corresponding processing conditions, and historical finished product testing data; The conversion relationship construction module is used to construct the conversion relationship between raw material components, processing state and final state components based on the component changes of the same formula at the raw material end and the finished product end. The conversion relationship includes at least the water migration and concentration, the retention or loss of nutrient components and the interactive changes of raw material combination. The final state calculation module is used to generate the final state effective nutrient vector based on the candidate raw material ratio vector, the target processing conditions, and the conversion relationship. The collaborative adjustment module is used to calculate the collaborative adjustment amount based on the deviation between the final effective nutrient vector and the target nutrient interval. The joint solution module is used to jointly solve the raw material ratio and processing conditions with the target nutritional range as constraints, and output the pet snack formula composition and the corresponding processing feasible range.