Pig, cow and sheep feed formula optimization method and system based on genetic algorithm
Patent Information
- Application Number
- CN202610783838.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-02
- Publication Date
- 2026-08-21
AI Technical Summary
[0006]本发明的目的在于提供基于遗传算法的猪牛羊饲料配方优化方法及系统,解决了现有饲料配方算法因无法精准解耦多物种非线性消化特征且极易陷入局部最优,导致在跨物种应用和多变工况下输出的配方营养转化率低、易引发反刍健康风险且整体环境负荷大的技术问题
本发明通过识别生理特征向量中的物种唯一物理标识符并构建对应物种的代谢方程,实现了跨物种底层生理逻辑的解耦,解决了单一算法模型跨物种应用时的生理错配问题,提升了配方算法对不同畜禽物种的适配能力。利用深度神经网络模型对基础原料特性矩阵执行非线性真消化率校正,采用体内-体外联合标定法生成训练标签,输出真实有效营养供给矩阵,解决了现有技术无法处理消化率非线性波动及环境应激引起消化率漂移的技术问题,提高了配方营养预测的准确性。
Smart Images

Figure CN122616802A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information technology and precision nutrition management in animal husbandry, specifically involving a method and system for optimizing feed formulations for pigs, cattle, and sheep based on genetic algorithms. Background Technology
[0002] With the development of large-scale farming, feed costs have become a significant proportion of total farming expenditures. Achieving nutritional standards and cost optimization through scientific formulation has become a core demand of the industry chain. There are fundamental differences in the intestinal digestive mechanisms, nutrient metabolic pathways, and crude fiber degradation patterns among species such as pigs, cattle, and sheep.
[0003] Traditional formulation calculation methods often simplify nonlinear physiological characteristics into static linear constraints, leading to a mismatch of underlying physiological logic when applying a single algorithm model across species. Particularly under the multiple disturbances of batch-to-batch fluctuations in raw material nutrient composition, drift in animal true digestibility caused by seasonal environmental stress, and drastic price fluctuations in major agricultural products, conventional linear programming techniques are often unable to handle higher-order nonlinear interaction effects and thus fail to obtain feasible solutions.
[0004] Existing technologies that incorporate evolutionary algorithms for improvement heavily rely on the initial solution set setting, and are prone to getting stuck in local optima in the early stages of optimization due to insufficient genetic diversity in the population. Furthermore, existing optimization systems often focus solely on minimizing feed costs, failing to deeply integrate the dynamic changes in nutritional requirements throughout the animal's growth cycle and environmental emissions such as nitrogen and phosphorus into fitness assessments. This results in the output formulas being unable to maintain high feed conversion rates under real-world, variable operating conditions, and may lead to biosafety risks such as rumen acidosis due to an imbalance in the roughage-to-concentrate ratio.
[0005] Existing feed formulation algorithms are unable to accurately decouple the nonlinear digestion characteristics of multiple species and are prone to getting trapped in local optima. As a result, the output formulas have low nutrient conversion rates, are prone to causing rumination health risks, and have a large overall environmental burden when applied across species and under varying working conditions. Summary of the Invention
[0006] The purpose of this invention is to provide a method and system for optimizing feed formulations for pigs, cattle, and sheep based on genetic algorithms. This solves the technical problems of existing feed formulation algorithms, which are unable to accurately decouple the nonlinear digestion characteristics of multiple species and are prone to getting trapped in local optima. As a result, the output formulations have low nutrient conversion rates, are prone to causing rumination health risks, and have a high overall environmental load when applied across species and under varying working conditions.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for optimizing pig, cattle, and sheep feed formulations based on genetic algorithms includes the following steps: Step 1: Obtain the basic raw material characteristic matrix and the physiological feature vector of the target livestock and poultry, which contain the raw material price time series data after processing by the dynamic price time series smoothing estimator. Then, use the range standardization operator to perform normalization mapping operation on the basic raw material characteristic matrix and the physiological feature vector. Step 2: Identify the species-unique physical identifier in the physiological feature vector. When the species-unique physical identifier is a value representing a monogastric animal, construct a nutrient balance equation based on the standardized ileal amino acid digestibility and net energy system. When the species-unique physical identifier is a value representing a ruminant animal, construct a metabolic equation based on rumen-degraded proteins and physically effective neutral detergent fiber, and generate the corresponding constraint function set for the species. Use a deep neural network model to perform nonlinear true digestibility correction on the basic raw material characteristic matrix and output the true effective nutrient supply matrix. Step 3: Delineate the boundary of the multidimensional feasible region based on the constraint function set, and use the Latin hypercube sampling method with mass conservation constraints to generate the gene sequence of the initial individuals in the simplex space to form the initial population. Step 4: Construct a multi-objective fitness evaluation system that integrates economic cost indicators, nutrient deviation indicators, and environmental load emission indicators. Introduce the real and effective nutrient supply matrix output in Step 2 for nutrient composition extrapolation calculation, and conduct a comprehensive survival fitness score evaluation on the encoding vector of each individual in the initial population and subsequent evolved populations. Step 5: Perform reproductive recombination iteration on the population based on the adaptive simulated binary crossover operator and the non-consistent chaotic mutation mechanism, and implement asymmetric level penalty judgment according to the degree of boundary crossing of the individual encoding vector during the iteration process. Step 6: Monitor the rate of change of the optimal fitness of the population. When the rate of change of the optimal fitness is continuously lower than the preset convergence threshold, extract the gene sequence of the individual with the best survival fitness comprehensive score and perform reverse dimensionless and reverse normalization restoration. Perform digital twin simulation on the restored formula. If the verification fails, return to step 5 to continue the population iteration optimization. If the verification is successful, output the target feed formula list.
[0008] Furthermore, the specific process of performing nonlinear true digestibility correction on the basic raw material characteristic matrix using a deep neural network model in step 2 is as follows: The input layer of the deep neural network model receives a slice vector array of the basic raw material characteristic matrix and a physiological feature vector containing the explicitly extracted temperature and humidity index. After being processed by a cascaded hidden layer and a linear rectified activation function with leakage, the output layer outputs a raw material-level global correction coefficient vector. The computational layer further incorporates a specific correction coefficient vector for the nutritional dimension, and uses element-wise multiplication to obtain the true and effective nutritional supply matrix, specifically:
[0009] in, This represents the first element in the true and effective nutrition supply matrix. The first type of raw material The value of various nutrients Represents the first element in the basic raw material property matrix. The first type of raw material The original values of various nutrients, Indicates the first Global correction coefficients for various raw materials Indicates the first Specific correction coefficients for each nutrient component; for nutrients that require independent regulation, Take dynamic inhibition weights; for other nutrients, The value is 1.0, and and The product is limited to the range of 0 to 1.2.
[0010] Furthermore, when the species-unique physical identifier is a numerical value representing a ruminant, a physical constraint formula for physically effective neutral detergent fibers is forcibly embedded in the metabolic equation. This physical constraint formula is:
[0011] in, This represents the total physical available neutral detergent fiber supply in the diet, as a percentage of the dry matter in the diet. Indicates the total number of candidate raw materials; Indicates the first The mass percentage of each raw material in the formula is a variable; Indicates the first The absolute concentration value of neutral detergent fibers in the raw materials; Indicates the first The physical effective conversion factor of the raw materials.
[0012] Furthermore, the Latin hypercube sampling method with mass conservation constraints in step 3 is specifically as follows: The raw material proportion space is converted into a standard simplex space. Latin hypercube sampling is performed on the simplex space to obtain sampling points. After obtaining the sampling points, they are mapped back to the raw material proportion space through simplex coordinate transformation. Then, linear scaling of the upper and lower limits of the proportion is applied to each raw material dimension, and the mass is renormalized to make the total mass sum 1.
[0013] Furthermore, the internal topological mathematical model used in the multi-objective fitness evaluation system in step 4 is as follows:
[0014] in, This represents the overall survival fitness score of an individual's encoded vector. The lower the value, the better the overall performance of the formula; This represents the encoding vector of the individual currently undergoing evaluation; , , These represent the dynamic weighting coefficients for the economic, nutritional, and environmental dimensions, respectively. This represents the preparation cost function; Indicates the first Predicted total content of each nutrient component; Indicates the first The target values of animal physiological requirements for each nutrient component; Represents the environmental load assessment function; This represents the total number of nutritional constraint variables being monitored.
[0015] Furthermore, in step 5, the non-uniform chaotic mutation mechanism follows a discontinuous segmented mathematical model to complete the computational transition; when the random number for mutation determination is less than 0.5, the discontinuous segmented mathematical model is:
[0016] When the random number for mutation determination is greater than or equal to 0.5, the mathematical model for discontinuous segmentation is as follows:
[0017] in, The first mutation operation indicates that the mutation operation occurred. The original values of each gene position before mutation; This represents the allele values after the mutation operation is completed; Indicates the first The upper limit scalar value of the specific raw material dosage corresponding to each gene locus; Indicates the first The lower limit of the dosage of a specific raw material corresponding to each gene locus; It is a pseudo-random number with a value between 0 and 1; Indicates the current iteration step being executed; This represents the preset global maximum iteration termination algebra number; This represents the nonlinear shape parameter that determines the decay rate of spatial disturbances.
[0018] Furthermore, the execution logic for the asymmetric level penalty determination in step 5 is as follows: When an individual's encoding vector causes the preset physiological safety hard constraints to exceed the limit, a positive maximum constant is injected into the individual's encoding vector's overall survival fitness score to execute a deep elimination penalty. When an individual's encoding vector causes a non-core economic soft constraint to exceed the limit, a penalty value is generated according to the square root of the deviation from the Euclidean distance and superimposed on the individual's encoding vector's overall survival fitness score, and a mild retention penalty is applied.
[0019] Furthermore, the mapping equation for the normalization mapping operation performed by the range normalization operator on the basic raw material characteristic matrix in step 1 is as follows:
[0020] in, Represents the dimensionless real number node after normalization; Represents the first element in the basic raw material property matrix. Line number The original observed values of the column; and These represent the maximum and minimum values of the feature column in the historical database, respectively. This represents a tiny constant penalty term to prevent division-by-zero overflow errors.
[0021] Furthermore, the dynamic price time series smoothing estimator is a Kalman filter estimator. The dynamic price time series smoothing sequence contained in the basic raw material characteristic matrix is generated by the dynamic price time series smoothing estimator after performing transient noise impulse removal processing on the collected original price vector.
[0022] Furthermore, step 6, before outputting the target feed formulation list, includes a simulation exercise defense line based on digital twin technology: The target feed formulation list is pushed into a virtual rumen fermentation microenvironment, and the virtual acid-base oscillation value in continuous time slices is derived using the rumen pH kinetic equation. The system destroys the list of target feed formulations that cause the virtual pH level to continuously fall below the safe lower limit threshold within the simulated time window.
[0023] Furthermore, the environmental load assessment function is constructed based on the dynamic nitrogen balance deduction logic. By calculating the difference between the amount of nitrogen ingested and the equivalent of nitrogen deposited, it estimates the nitrogen quality discharged into the external environment and dynamically adjusts the dynamic weighting coefficients of the environmental dimensions at different stages of the growth period.
[0024] Furthermore, for the species-unique physical identifier representing ruminants, the simulation exercise defense line based on digital twin technology is internally embedded with a chemometric accounting submodule for intestinal methane emission benchmarks; The chemometrics accounting submodule captures at high frequency the molar distribution array of volatile fatty acids generated by carbohydrate degradation in a continuous time slice within a virtual rumen fermentation microenvironment. The molar distribution array of volatile fatty acids includes the molar generation rate of acetic acid, the molar generation rate of propionic acid, and the molar generation rate of butyric acid. The chemometrics accounting submodule constructs a dynamic methane emission prediction formula based on the principle of hydrogen elemental metabolic pool equilibrium. The differential and integral forms of the dynamic methane emission prediction formula are as follows:
[0025] in, This represents the differential of the methane formation rate; , , Let represent the differentials of the molar formation rates of acetic acid, butyric acid, and propionic acid, respectively. This represents an estimate of the virtual methane generation rate; , , These represent the molar formation rates of acetic acid, butyric acid, and propionic acid, respectively. The calculation engine uses a numerical integration algorithm to convert the total amount of virtual methane generated within the simulation time window into a carbon emission equivalent parameter. This carbon emission equivalent parameter is embedded as a nonlinear penalty independent variable in the environmental load emission index. When the carbon emission equivalent parameter exceeds the preset ecological red line threshold, a secondary lethal penalty factor is injected into the comprehensive survival fitness score assessment.
[0026] Furthermore, when the species-unique physical identifier is a numerical value representing a monogastric animal, the deep neural network model internally maps a branched amino acid antagonistic topology network. The branched-chain amino acid antagonistic topology network uses a tensor slicer to extract the absolute concentration feature vectors of leucine, isoleucine and valine from the basic raw material characteristic matrix, and calculates the real-time concentration ratio of leucine to isoleucine in the feature transfer layer. When the real-time concentration ratio of leucine to isoleucine exceeds the physical critical point of 1.5, the branched-chain amino acid antagonistic topology network calls a nonlinear reduced-order activation function to output dynamic inhibition weights. The activation function is:
[0027] in, This represents the dynamic inhibition weight of isoleucine; Shape attenuation factor; This represents the real-time concentration ratio of leucine to isoleucine; the computational layer intercepts the dynamic inhibition weight and assigns it to the corresponding isoleucine and valine nutritional dimension components in the nutritional dimension-specific correction coefficient vector, forcibly lowering the apparent digestibility node values of isoleucine and valine, and updating the real effective nutritional supply matrix.
[0028] In addition, the present invention also discloses a system for optimizing pig, cattle and sheep feed formulations based on genetic algorithms, comprising a heterogeneous computing platform that coordinates a high-performance central processing unit and a high-performance graphics processing unit accelerator card. The heterogeneous computing platform is used to execute the pig, cattle and sheep feed formulation optimization method based on genetic algorithms as described above. The heterogeneous computing platform divides the evolutionary population into equal memory data blocks, assigns an independent hardware thread to each individual encoding vector, and performs the comprehensive survival fitness score evaluation calculation task in parallel in the streaming multiprocessor matrix of the high-performance graphics processor accelerator card.
[0029] Compared with the prior art, the present invention has the following beneficial effects: This invention decouples the underlying physiological logic across species by identifying unique physical identifiers in physiological feature vectors and constructing corresponding metabolic equations for those species. This solves the physiological mismatch problem when applying a single algorithm model across species, improving the adaptability of formulation algorithms to different livestock and poultry species. By utilizing a deep neural network model to perform nonlinear true digestibility correction on the basic raw material characteristic matrix and employing an in vivo-in vitro joint calibration method to generate training labels, it outputs a true and effective nutrient supply matrix. This addresses the technical problems of existing technologies being unable to handle nonlinear fluctuations in digestibility and digestibility drift caused by environmental stress, thus improving the accuracy of formulation nutrient prediction.
[0030] This invention employs a Latin hypercube sampling method with mass conservation constraints to generate an initial population within a simplex space. This avoids the logical contradiction between traditional Latin hypercube sampling and normalization operations, achieving full coverage of the initial solution set on a high-dimensional nonlinear constrained manifold. It effectively overcomes the deficiency of existing evolutionary algorithms that fall into local optima due to insufficient initial population diversity. This invention constructs a multi-objective fitness evaluation system integrating economic cost indicators, nutritional deviation indicators, and environmental load emission indicators. Combined with an asymmetric penalty judgment mechanism, it prunes the solution space, overcoming the technical limitations of existing optimization systems that unilaterally pursue cost minimization while neglecting environmental load. Furthermore, it uses digital twin technology to conduct virtual rumen fermentation simulation exercises on the target feed formulation list, using the rumen pH kinetic equation to deduce virtual pH oscillation values. Formulas that cause the virtual pH to continuously fall below the safe lower limit threshold are destroyed within the system, effectively avoiding the biosafety risk of rumen acidosis caused by an imbalance in the crude-to-concentrate ratio.
[0031] This invention targets ruminants. The chemometrics submodule constructs a dynamic methane emission prediction formula based on the principle of hydrogen element metabolic pool balance and applies non-negative constraints. It introduces a dynamic rumen pH correction factor and explicitly embeds carbon emission equivalent parameters into the environmental load assessment function, achieving effective control of greenhouse gas emissions. For monogastric animals, a parallel branched-chain amino acid antagonistic topology network is connected within the deep neural network model. A nonlinear reduced-order activation function outputs dynamic inhibition weights and assigns them to specific correction coefficients for nutrient dimensions, achieving precise correction only for leucine, isoleucine, and valine without affecting other nutrients, significantly improving amino acid absorption efficiency. This invention also employs a heterogeneous computing physics platform with a non-unified memory access architecture co-located by a high-performance central processing unit and a high-performance graphics processing unit accelerator card. The evolutionary population is divided into equal memory data blocks, and an independent hardware thread is assigned to each individual encoding vector for parallel evaluation, greatly shortening the algorithm convergence time. Attached Figure Description
[0032] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained from these drawings without creative effort.
[0033] Figure 1 This is the main flowchart of the method of the present invention.
[0034] Figure 2 This is a flowchart of the ruminant processing sub-process of the present invention.
[0035] Figure 3 This is a flowchart of the monogastric animal processing sub-process of the present invention.
[0036] Figure 4 This is a flowchart of the digital twin simulation verification rollback process of the present invention. Detailed Implementation
[0037] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the embodiments of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0038] The following is in conjunction with the appendix Figure 1 = Figure 4 The embodiments of the present invention will be described in detail below.
[0039] Example 1: A system for optimizing pig, cattle, and sheep feed formulations based on genetic algorithms, comprising a heterogeneous computing platform that coordinates a high-performance central processing unit (CPU) and a high-performance graphics processing unit (GPU) accelerator card. The heterogeneous computing platform is used to execute the following method for optimizing pig, cattle, and sheep feed formulations based on genetic algorithms. The heterogeneous computing platform divides the evolutionary population into equal memory data blocks, assigns an independent hardware thread to each individual encoding vector, and performs the task of calculating the comprehensive survival fitness score in parallel within the streaming multiprocessor matrix of the high-performance GPU accelerator card.
[0040] The method includes the following steps: Step 1: Obtain the basic raw material characteristic matrix and the physiological feature vector of the target livestock and poultry, which contain the raw material price time series data after processing by the dynamic price time series smoothing estimator. Then, use the range standardization operator to perform normalization mapping operation on the basic raw material characteristic matrix and the physiological feature vector. Step 2: Identify the species-unique physical identifier in the physiological feature vector. When the species-unique physical identifier is a value representing a monogastric animal, construct a nutrient balance equation based on the standardized ileal amino acid digestibility and net energy system. When the species-unique physical identifier is a value representing a ruminant animal, construct a metabolic equation based on rumen-degraded proteins and physically effective neutral detergent fiber, and generate the corresponding constraint function set for the species. Use a deep neural network model to perform nonlinear true digestibility correction on the basic raw material characteristic matrix and output the true effective nutrient supply matrix. Step 3: Delineate the boundary of the multidimensional feasible region based on the constraint function set, and use the Latin hypercube sampling method with mass conservation constraints to generate the gene sequence of the initial individuals in the simplex space to form the initial population. Step 4: Construct a multi-objective fitness evaluation system that integrates economic cost indicators, nutrient deviation indicators, and environmental load emission indicators. Introduce the real and effective nutrient supply matrix output in Step 2 for nutrient composition extrapolation calculation, and conduct a comprehensive survival fitness score evaluation on the encoding vector of each individual in the initial population and subsequent evolved populations. Step 5: Perform reproductive recombination iteration on the population based on the adaptive simulated binary crossover operator and the non-consistent chaotic mutation mechanism, and implement asymmetric level penalty judgment according to the degree of boundary crossing of the individual encoding vector during the iteration process. Step 6: Monitor the rate of change of the optimal fitness of the population. When the rate of change of the optimal fitness is continuously lower than the preset convergence threshold, extract the gene sequence of the individual with the best survival fitness comprehensive score and perform reverse dimensionless and reverse normalization restoration. Perform digital twin simulation on the restored formula. If the verification fails, return to step 5 to continue the population iteration optimization. If the verification is successful, output the target feed formula list.
[0041] Specifically as follows: When deploying a heterogeneous computing network and memory scheduling architecture at the underlying level, and facing the combined optimization problem of hundreds of raw materials and multidimensional nonlinear physiological constraints, a single high-performance central processing unit computing mode will lead to severe instruction stacking and optimization delay.
[0042] This embodiment constructs a heterogeneous computing physical platform with a non-unified memory access architecture. The physical platform motherboard is equipped with two high-performance central processing units (CPUs) with a clock speed of 3.2 GHz and 64 cores and 128 threads. The high-performance CPUs are directly connected to at least one high-performance graphics processing unit (GPU) accelerator card via a high-speed peripheral component interconnect bus (PCIe 4.0 x16 lane, theoretical peak bandwidth 32 GB / s). The GPU accelerator card has 24 GB of onboard high-bandwidth video memory (HBM2) and integrates 8192 unified computing architecture cores.
[0043] At the memory allocation level, the operating system kernel allocates an independent physical memory region with a maximum address space of 256GB for the heterogeneous data fusion and quantization processing unit. During the genetic algorithm's evolutionary recombination phase, massive amounts of individual genome floating-point data are generated. The system calls the operating system's underlying memory locking instructions to dynamically partition a dedicated latch memory block of up to 128GB within the independent physical memory region. The actual locked capacity is adaptively scheduled based on population size and evaluation complexity. This dedicated latch memory block directly interfaces with the direct memory access controller of the high-performance graphics processing unit (GPU), preventing interruptions to gene sequence data transmission caused by operating system memory page swapping. This ensures that during the reproduction and iteration of a population of hundreds of thousands, data flows are transmitted full-duplex with low latency between the high-performance CPU and the high-performance GPU.
[0044] The acquisition and normalization of multi-source heterogeneous data are as follows: The heterogeneous data fusion and quantization processing unit starts the main control process, breaking down data acquisition and cleaning into the following sub-steps.
[0045] Sub-step 1.1: Establishment of the basic raw material characteristic matrix and extraction of high-dimensional features; The system establishes secure socket layer connections to a third-party agricultural data cloud platform and a local laboratory information management system (LIMS) using advanced encryption standards. It searches a candidate raw material pool, covering corn, soybean meal, cottonseed meal, wheat bran, dicalcium phosphate, various amino acid monomers, and vitamin and trace element premixes. This embodiment sets the total number of candidate raw material categories. The system instantiates a [device] within a dedicated block of latched memory. Basic raw material property matrix , To define the total dimension of the eigenvectors of the physicochemical and economic parameters, set... .
[0046] Row vectors in a matrix Mapping the first The combination of properties of various raw materials. The feature column vector covers: physical indicators (basic dry matter content percentage, geometric mean diameter of pulverized particles, unit...). Energy indicators (measured calibrated value of digestible energy, estimated value of metabolizable energy conversion, and estimated value of net energy, with energy units uniformly converted to...). The system includes macromolecular nutritional indicators (percentage of crude protein, crude fat, and crude ash); fiber polysaccharide indicators (percentage of crude fiber, neutral detergent fiber content, and acid detergent fiber content); amino acid profile indicators (liquid chromatography-measured mass percentage of ten essential amino acids: lysine, methionine, threonine, tryptophan, valine, isoleucine, leucine, phenylalanine, histidine, and arginine); inorganic salt and mineral indicators (absolute content of total calcium, available phosphorus, sodium, chlorine, potassium, and magnesium); and exogenous toxin monitoring indicators (microgram levels of aflatoxin and zearalenone). The heterogeneous data fusion and quantification unit, polling at a frequency of one thousand times per second, parses the latest batch of laboratory reports pushed by the laboratory information management system into floating-point data via a dynamic link library interface and overwrites it to the matrix. The corresponding physical memory address.
[0047] Sub-step 1.2: Dynamic price time series smoothing calculation based on dynamic price time series smoothing estimator (Kalman filter); The spot and futures prices of bulk agricultural products contain high-intensity white noise. Directly inputting instantaneous prices into the cost accounting function causes the convergence target point of the genetic algorithm to drift disorderedly over multiple iterations. The heterogeneous data fusion and quantization processing unit targets matrices... The price feature column is used to deploy a dynamic price time series smoothing estimator (Kalman filter).
[0048] Discrete-time variables are The actual market price of a specific bulk raw material is defined as the system state vector. The price fetched through the commodity exchange's application programming interface is defined as the observation vector. The state transition equation and the observation equation are as follows:
[0049] in: Let be the state transition matrix. In the non-intervention market model, it is assumed that prices have short-term continuity, so we take the identity matrix. To control the input matrix; For control vectors (such as deterministic price damping caused by macroeconomic regulation); The process excitation noise has the following covariance matrix: ; The observation matrix is taken as the identity matrix; To observe noise (short-term volatility bias caused by irrational market trading), the covariance matrix is: .
[0050] Process excitation noise covariance matrix Covariance matrix of observation noise The initial value was obtained by iteratively estimating the value using the expectation-maximization algorithm on offline data of at least one complete historical price period for the raw material. During online operation, the system periodically calls the covariance matching algorithm to perform covariance matching based on the statistical characteristics of the innovation sequence. and It is dynamically updated to adapt to structural changes in market price volatility.
[0051] Within each time step, the dynamic price time-series smoothing estimator (Kalman filter) performs a prediction and update cycle. The prediction phase calculates prior state estimates. and prior error covariance matrix :
[0052] in: This is the estimated posterior state value from the previous time step; Let $\mathbf{a}$ be the posterior error covariance matrix of the previous time step; superscript $\mathbf{a}$ This indicates the matrix transpose.
[0053] The Kalman gain matrix is calculated during the update phase. :
[0054] using observation vectors By revising the prior state estimate, we obtain the optimal smoothed posterior price estimate. :
[0055] Update the posterior error covariance matrix :
[0056] in It is an identity matrix.
[0057] Posterior optimal smoothed price estimate Anchored to the matrix The cost constraint feature list filters out abnormal spikes caused by market sentiment, allowing subsequent genetic iterations to face a cost hyperplane that reflects real economic trends.
[0058] Sub-step 1.3: Tensor quantization reconstruction of the target livestock and poultry physiological feature vector and fusion with environmental parameters; Before executing the optimization task, the system instructs the edge computing gateway device in the farm to report real-time physical and meteorological data of the target animal group. The heterogeneous data fusion and quantization processing unit reconstructs the scattered data streams into physiological feature vectors. It contains six core components: .
[0059] in: Used as a unique physical identifier for the species (absolute integer variable, 0 is bound to the pig model, 1 is bound to the cow model, and 2 is bound to the sheep model). This is the code for the discrete growth stage; The average body mass of the group (accurate to) is output after high-frequency sampling and filtering out animal movement artifacts during the implementation of IoT electronic weighbridge systems. ); To calculate the theoretical daily weight gain limit (accurate to) by integrating and differentiating the system's embedded standard growth curve equation for the species. ); (Ambient dry-bulb temperature, unit) )and (Ambient relative humidity percentage) is continuously pushed to the system by an industrial-grade temperature and humidity transmitter suspended at the geometric center of the breeding pen.
[0060] System Receive and Then, the temperature and humidity index is generated in memory by calling biometeorological formulas. :
[0061] Among them: temperature and humidity index As a dimensionless benchmark for judging the intensity of environmental stress. When the temperature and humidity index... Exceeding the upper limit of the heat stress threshold corresponding to the species (such as dairy cows) )hour, Carrying an abnormal warning flag, it triggers a punitive increase in the basic maintenance net energy requirement of subsequent species physiological hard constraint mapping units, compensating for the extra metabolic energy consumed by the animal for heat dissipation.
[0062] Sub-step 1.4, cross-dimensional range standardization operation based on the minimum penalty term configuration; matrix The 42 embedded feature dimensions vary widely in scale, ranging from trace element content at the level of one-thousandth to price values at the level of several thousand yuan. If the unaligned original physical values are directly input into the Euclidean distance calculation of the fitness function, it will cause gradient vanishing or cause the optimization trajectory of the genetic algorithm to be dominated by a single high-value feature variable.
[0063] Heterogeneous data fusion and quantization processing unit and All continuous variables are subjected to column-by-column nonlinear range standardization. For any feature column vector... The system scans its maximum value in the historical periodic rolling database. and minimum value Call the mapping equation:
[0064] in: The output after cross-dimensional elimination is located at Dimensionless real nodes of a closed interval; The first in the matrix Line number The original observed floating-point values of the column; and These are the maximum and minimum scalar values of the feature column in the historical periodic rolling database, respectively; To prevent tiny constant penalties for division-by-zero overflow errors, a fixed value is embedded in the system kernel configuration table. The purpose of this project is to prevent division-to-zero overflow: when multiple batches of a scarce raw material show uniformity in specific test indicators (…). When the denominator approaches zero, It can take over hardware exception interrupt logic to prevent process-level cascading failures.
[0065] After multiple filtering, smoothing, fusion, and standardization processes, the multi-source heterogeneous data is transformed into a regular floating-point tensor structure. The heterogeneous data fusion and quantization processing unit pushes the cleaned matrices and physiological feature vectors into a high-speed hash lookup table in a dedicated block of latched memory, preparing it for the deep neural network digestibility correction model and species-specific mapping.
[0066] Example 2: This example is a further optimization based on Example 1. In this example, control is transferred to the species physiological hard constraint mapping unit. The core of this example is to abandon the simplistic dimensionality reduction of the internal metabolic mechanism of organisms by the traditional linear programming algorithm, and instead use a deep neural network digestibility correction model to fit a nonlinear manifold surface, thereby reproducing the intestinal chemical reactions of animals in the real environment in mathematical space.
[0067] Specifically as follows: Sub-step 2.1: Asymmetric projection of multidimensional metabolic boundary based on species-unique physical identifier; the species physiological hard constraint mapping unit extracts physiological feature vectors containing species-unique physical identifiers from the high-speed hash lookup table, and the system's built-in logical route distributor performs hard-coded branch isolation on the identifier.
[0068] When the identifier is a monogastric animal (pig model, integer 0), the monogastric animal metabolic assessment engine is instantiated in a separate thread. The engine enforces the use of a net energy system based on the standards of the French National Institute for Agricultural Research (INRA) as the underlying energy accounting benchmark, abandoning the digestible energy assessment mode with large errors in actual production. At the same time, the monogastric animal metabolic assessment engine calls the standardized ileal amino acid digestibility matrix, defining the ratio of limiting amino acids (lysine, methionine, threonine, tryptophan) to total net energy as an unavoidable hard constraint hyperplane, establishing a set of inequalities to physically bind the intake of each gram of amino acids in the formula to the energy supply, thus preventing excessive fat deposition caused by energy redundancy at the protein synthesis scale.
[0069] When the identifier is a ruminant (cattle or sheep), the logical route distributor mounts a small intestinal absorbable protein calculation module and a physical morphology defense engine. The complexity of ruminant metabolism stems from the dual-track operation of feed degradation in the rumen and chemical digestion in the lower intestine. The engine will matrix The crude protein feature column is decomposed into rumen-degraded protein vectors and rumen-passing protein vectors, and the optimal supply flux for both is calculated for the target weight gain or milk yield. The physical morphology defense engine performs physically effective neutral detergent fiber truncation operations on the multidimensional feasible region. The overall physically effective neutral detergent fiber scalar of the target feed formulation follows a discretized morphology:
[0070] in: The standard amount of total physically available neutral detergent fiber supplied in the diet, as a percentage of the dry matter in the diet; The total number of candidate raw materials; For the first The mass percentage of each raw material in the formula is a variable; For the first The absolute concentration value of neutral detergent fibers in the raw materials; For the first The physical effective conversion factor of the raw materials was determined using the Penn State University grading sieve method: using a three-layer standard grading sieve with sieve aperture sizes of 19 mm, 8 mm and 4.75 mm, 100 g of air-dried raw material was shaken 60 times (each stroke is about 10 cm), and the mass of the residue in each layer was weighed. Defined as the sum of the mass percentages of raw materials remaining on the 8mm and 19mm sieves, with a value range of 0~1.0; the typical raw material reference value is whole corn kernels. Crush corn (using a 3mm sieve). soybean meal Alfalfa meal (coarse powder) wheat bran System Settings The coordinates must be greater than the preset physiological safety lower limit (set to 21.5% of the dry matter percentage of the daily diet for dairy cows). When the algorithm generates the initial coordinates, the coordinate area that may lead to rumen acidosis is defined as a physical dead zone.
[0071] Sub-step 2.2: Cross-species true digestibility nonlinear dynamic correction based on deep neural network digestibility correction model; The digestibility of feed ingredients is not a static constant. Increasing the amount of oil added to the formula creates a wrapping effect in the animal's intestines, nonlinearly inhibiting the microbial degradation rate of crude fiber; extreme high temperature and humidity environments cause blood to shift from internal organs to the body surface, leading to a sharp drop in overall nutrient absorption efficiency. To quantify these high-order nonlinear interference factors, this embodiment incorporates a deep neural network digestibility correction model into the system. It includes a high-dimensional spliced input layer, five fully connected hidden layers, and a regression output layer. The number of neurons in the input layer equals the sum of the dimensions of the basic feed ingredient characteristic matrix slice vector and the physiological feature vector; the number of neurons in the five fully connected hidden layers are 256, 512, 256, 128, and 64, respectively. The input layer receives the range-standardized basic feed ingredient characteristic matrix slice vectors and splices them together with explicitly extracted temperature and humidity indices. Physiological feature vectors.
[0072] Among them, the deep neural network digestibility correction model uses an in vivo-in vitro joint calibration method to generate training labels: first, the standardized ileal amino acid digestibility of each ingredient in the target species is determined through single ingredient feeding trials as the initial label; then, the overall digestibility determined by the mixed diet feeding trial is used as a global constraint, and the digestibility correction coefficient of each ingredient is corrected by using the differential evolution algorithm to minimize the root mean square error between the model output and the measured digestibility of the mixed diet.
[0073] In practice, digestibility data from at least 50 different formulated mixed diets were used as monitoring signals. Five-fold cross-validation training was employed, and the correction coefficient for each ingredient was labeled as the ratio of the measured digestibility value to the theoretical predicted value after regularization. The training data covered at least three months of environmental conditions with three different temperature and humidity indices.
[0074] During data forward propagation, each layer undergoes the following transformation:
[0075] in: For the first The activation feature tensor output by the layer; To connect the first Layer and First The dynamic weight matrix of the layer; Input tensors to the upper layer; For the first Layer bias adjustment vector; This is the activation function. To address the neuron "death" phenomenon that traditional activation functions are prone to when handling negative feedback, a different activation function is specified. For a leaky linear rectified function (LeakyReLU):
[0076] in: The linearly weighted sum of input values received by the neuron; The leakage slope is a very small constant, calibrated to 0.01 in this embodiment. This design allows the network to maintain a weak gradient backpropagation capability even when encountering inputs with strong nutrient antagonistic effects.
[0077] After five layers of transformation and feature extraction, the output layer provides a dimension of raw material level global correction coefficient vector Each floating-point number represents the overall digestibility offset rate of the corresponding raw material under specific climate and within a specific organism. The computational layer further incorporates a nutrient-specific correction coefficient vector. (dimension) , (The total number of nutrient characteristics) is used to obtain the true and effective nutrient supply matrix through element-wise multiplication. :
[0078] in For the first Global correction coefficients for various raw materials For the first Specific correction coefficients for each nutrient component. For isoleucine and valine, which require independent regulation in branched-chain amino acid antagonistic interventions, The value is assigned by the dynamic inhibition weight output by the subsequent nonlinear reduced-order activation function; for other nutrients (energy, other amino acids, minerals, fiber, etc.). Fixed at 1.0. and The product is restricted to Within the range, to prevent overcorrection leading to negative digestibility or exceeding 100%. Mathematically, this can be expressed as an extended form of the three-dimensional Hadamard product: ,in This indicates element-wise multiplication along the corresponding dimension. This is a true and effective nutrient supply matrix generated after environmental and physiological nonlinear corrections. All subsequent calculations of nutrient deviation fitness are based on this matrix.
[0079] Sub-step 2.3: Backpropagation fine-tuning and gradient descent calibration of field data; The deep neural network digestibility correction model possesses a self-evolutionary mechanism based on physical feedback. After the rearing cycle ends, the IoT data acquisition terminal transmits the actual digestibility data sequence of the animal population back to the closed-loop feedback correction module. The system uses the backpropagation algorithm to calculate the network loss. To suppress overfitting, the loss function is configured as a combination of mean squared error and L2 regularization:
[0080] in: This represents the overall loss value for network batches. Enter the sample batch size; The physical baseline value for the true digestibility of the target species as determined in the laboratory; Predict digestibility values for the network; The L2 regularization hyperparameter is used to control the magnitude of weight decay; This is a penalty term for the sum of squares of all elements in the weight matrix at all levels. Upon initial deployment or reset, the deep neural network digestibility correction model loads a snapshot of offline pre-trained weights obtained using historical batch animal digestibility measurement data, a basic raw material characteristic matrix, and environmental parameters, ensuring that effective correction coefficients are output immediately upon startup.
[0081] In one specific implementation, the deep neural network digestibility correction model employs an adaptive moment estimator optimizer in both the offline pre-training and online fine-tuning stages.
[0082] The training configuration is as follows: The initial learning rate was set to 0.001, the batch size to 128, and the L2 regularization hyperparameter... Set as An early stopping strategy is adopted, which terminates training when the validation set loss does not decrease after 10 consecutive training cycles to prevent overfitting.
[0083] The above parameters can be adjusted to suit the actual hardware conditions and data scale. The system utilizes an adaptive moment estimation optimizer to continuously fine-tune the hidden layer weight matrix during idle computation cycles based on the gradient of the partial derivatives of the loss function. This allows the virtual prediction boundary to approach the real biological and physical limits.
[0084] Example 3: In this example, the core loop of initial population generation and multi-objective fitness evolution is as follows: Sub-step 3.1, Latin hypercube sampling in simplex space with mass conservation constraints; Faced with dozens of trophic constraint equations, traditional pseudo-random number generators often generate a large number of invalid, lethal individuals near narrow angles of the constraint hyperplane or near the vertices of polyhedra, resulting in extremely low population survival rates in the early stages of evolution. To eliminate sampling blind spots and ensure mass conservation, this embodiment employs a simplex spatial Latin hypercube sampling method with mass conservation constraints.
[0085] First of all Space for the proportion of raw materials (to meet) and ) converted to A standard simplex space. Let... The simplex dimension is 149. 3D hypercube Perform classic Latin hypercube sampling: cut each dimension into equal intervals. Sub-intervals (in this embodiment, the initial population size is set) ), randomly select a point in each sub-interval of each dimension to form indivual dimensional sampling vector Then Mapping back to the raw material proportion space via simplex coordinate transformation:
[0086] Mapped Natural satisfaction And each component automatically in Within the range. Finally, for each... Apply upper and lower limits for raw material ratio Linear scaling to bring it within the practically allowed range:
[0087] Renormalization after scaling (Slight offset due to scaling is corrected by scaling). This method completely avoids the problem of normalization destroying the characteristics of Latin hypercube sampling, and ensures that the initial population has sufficient coverage on the high-dimensional nonlinear constrained manifold.
[0088] Sub-step 3.2, Multi-objective fitness assessment and evolutionary core loop; After the Latin hypercube sampling engine completes the high-density uniform projection of the initial population within the feasible region, the multidimensional scalarization evaluation unit and the gene chain dynamic recombination control unit take over the hardware controller to perform high-frequency concurrent recombination and inferior gene cleaning, which consumes intensive floating-point computing power. Traditional formulation software often uses the lowest cost as the single convergence target. This embodiment decouples three mutually constraining independent objectives—cost, biological indicators, and environmental burden—to construct a multi-objective fitness evaluation system. Individual encoding vectors... The core topological mathematical model of its survival fitness comprehensive score calculation engine is:
[0089] Where: scalar This reflects the survival competitiveness of the formulation under the dual constraints of the current environment and market; the lower the value, the closer it is to the Pareto optimal frontier. , , The dynamic weighting coefficients are issued in real time by the central control kernel; The cost function is defined by the individual encoding vector. The column vector of posterior optimal smoothed price estimates output by the dynamic price time-series smoothing estimator (Kalman filter) The dot product yields the expected future allocation costs, which include the spot basis and freight. To be based on a real and effective nutrition supply matrix The deduced first The predicted total content of each nutrient in the target formulation; This represents the absolute physiological target value for a specific growth stage of the species. The total number of nutritional constraint variables being monitored; As an environmental load assessment function, the underlying layer includes a dynamic nitrogen balance deduction submodule: the system is based on the expected value of daily weight gain limit. The daily protein deposition equivalent is calculated and subtracted from the total digestible crude protein intake provided by the formula to determine the estimated nitrogen mass excreted into the external environment through feces and urine. The introduction of the environmental dimension causes the optimization trajectory to automatically favor the combination of raw materials with higher amino acid balance and lower nitrogen excretion.
[0090] It should be pointed out that, , and All three indicators have been mapped to range standardization before weighted summation. Intervals are used to eliminate the impact of dimensional differences on the weighting coefficients. , , The impact of the adjustment effect.
[0091] , , According to the physiological stage codes of pigs Dynamic adjustment. During the piglet nursery period, to maintain intestinal villus development and immunoglobulin synthesis, the nucleus will... (Nutritional fidelity weighting) increased to 0.65, and decreased. proportion; In the later stages of fattening and slaughter, the animal's compensatory growth ability increases, and the core will... The cost weighting was increased to 0.7, widening the economic scissors gap per head of meat livestock.
[0092] For population arrays with tens of thousands of individual encoding vectors, the system utilizes the high-speed streaming multiprocessor within a high-performance graphics processing unit (GPU) to enable a parallel solution protocol. The population is divided into fixed-size memory blocks, and each individual encoding vector chromosome evaluation task is assigned an independent hardware thread on the GPU. Within the same memory clock cycle, tens of thousands of threads simultaneously initiate memory read requests to the high-speed hash lookup table, performing cost dot product, trophy bias summation, and environment estimation in parallel, reducing the global fitness evaluation time from minutes to microseconds.
[0093] Sub-step 3.3: An asymmetric dual-penalty interception mechanism on the basis of physical defense baseline; After the individual encoding vector completes the basic fitness calculation, it needs to pass through a rigorous physical security filter. The multidimensional scalar evaluation unit is equipped with an asymmetric level penalty judgment mechanism to prune the distorted solution space that the algorithm may generate.
[0094] Hard constraints that undermine the survival baseline of biological functions (such as cadmium exceeding the standard due to heavy metal entrainment, and in rumination models) (Falling below the acid poisoning threshold), the system classifies it as a lethal violation. Injection volume is Positive maximum constant penalty term This ensures that the individual's overall score sinks to the bottom of the population inverted order, guaranteeing that the coding vector of the individual carrying the dangerous gene is completely eliminated in the subsequent selection wheel.
[0095] For minor deviations from non-core economic constraints or non-toxic indicators (such as exceeding the system's recommended upper limit for the addition of a certain non-restrictive vitamin by 3%), the system considers them as soft constraint deviations. In this case, the adaptive proportional function generates a small penalty factor proportional to the square root of the deviation from the Euclidean distance. Overlay This mild retention penalty mechanism tolerates non-lethal minor deviations, thereby preserving gene segments in the chromosome that may be hidden and have excellent pairings of restrictive amino acids, thus maintaining a good gene pool base for subsequent crossover operations.
[0096] Sub-step 3.4, an adaptive simulated binary crossover operator controlled by population variance monitoring; After the inferiority cleansing is completed, the gene chain dynamic recombination control unit takes over the iterative process. The system uses a tournament selection method to establish the mating pool: each time, three individual coding vectors are randomly selected, and the coding vector of the individual with the lowest fitness score (strongest survival performance) is put into the pool. This operation is repeated until the mating pool is full.
[0097] Entering the reproductive recombination stage, the system executes simulated binary crossover. Unlike traditional single-point crossover, simulated binary crossover mimics micro-trait recombination at the allele level, with offspring gene values exhibiting a normal distribution near the parent gene values. The system is equipped with an adaptive crossover probability adjustment knob for the simulated binary crossover operator. The gene chain dynamic recombination control unit calculates the variance of the current population fitness value before each generation. If the variance continues to decline, it indicates that the individual gene combinations are rapidly converging, leading to inbreeding. The monitoring kernel triggers a countermeasure, which will... The value is increased from a baseline of 0.6 to an upper limit of 0.95, and the distribution range of offspring gene jumps is expanded by changing the distribution index within the simulated binary crossover operator, thereby disrupting the mathematical attraction of local extrema through the violent recombination of gene chains.
[0098] Sub-step 3.5, equipped with an elite immunity and random number interference non-consistent chaotic mutation mechanism; To maintain long-term evolutionary vitality and achieve precise guidance in the later stages of the search, the gene chain dynamic recombination control unit embeds a non-uniform chaotic mutation mechanism based on time-series decay.
[0099] Suppose the system is currently at the th The number of iterations is preset to a maximum termination generation. When the gene locus When selected to perform mutation, the system throws an error. The mutation of the interval is determined by random numbers. Subsequent calculations of the transition follow a discontinuous piecewise mathematical model: When the random number for mutation determination is less than 0.5, perform forward mutation optimization:
[0100] When the random number for mutation determination is greater than or equal to 0.5, reverse mutation optimization is performed:
[0101] in: For the first mutation operation The original values of each gene position before mutation; These are the allele values after the mutation operation is completed; For the first The upper limit scalar value of the specific raw material dosage corresponding to each gene locus; For the first The lower limit of the dosage of a specific raw material corresponding to each gene locus; The values are high-quality aperiodic pseudo-random numbers generated by the Mason rotation algorithm, ranging from... ; This represents the current iteration step being executed. This embodiment sets the global maximum iteration termination number as preset. ; The nonlinear shape parameter, which determines the spatial perturbation decay rate, is set to 2.0.
[0102] In the above mathematical model, the term This reflects the nonlinear decay characteristic of variable asynchronous length: in the early stage of algorithm operation The value is relatively small, approaching 1, and the mutation step size covers gene loci reaching the physical boundary. or The entire span of the population involves leaping and exploring in higher-dimensional space; as iterations deepen... Approaching The nonlinearity converges sharply, the mutation step size approaches zero perturbation, and the algorithm smoothly transitions to the local mining mode, performing milligram-level precision fine-tuning.
[0103] The system retains a strict elite immunity logic: the coding vectors of the top 3% of individuals in fitness each generation are exempt from crossover and mutation, and are copied losslessly to the top memory region of the next generation population. The gene chain dynamic recombination control unit deploys parallel monitoring sentinel processes; when it detects that the fitness score of the globally optimal individual's coding vector has failed to surpass it for 20 consecutive generations... When the improvement threshold is reached, a "premature deadlock" is determined to have occurred. At this time, the system forcibly activates the chaotic interference protocol, temporarily blocks the elite's immunity logic, and injects large-step chaotic random numbers that ignore the decay coefficient into the chromosome array of the encoding vectors of all surviving individuals. This forces the system ecosystem to collapse and then be rebuilt in order to dig deeper cost trenches in complex non-convex constraint surfaces.
[0104] Sub-step 3.6: The rigorous logic of convergence determination and algorithm truncation; In the later stages of iteration, the population's genes converge towards the globally optimal region, and the system enters the decision-making and production execution phase. The executor monitors the rate of change of the population's optimal fitness in real time after each generation of evolution. Convergence is determined based on a sliding observation window of 100 generations, calculating the variance of the overall optimal fitness score.
[0105] When the best fitness improvement value is lower than the preset convergence threshold over 100 consecutive generations (This embodiment) When the condition is met, global convergence is determined. A maximum limit on the number of iterations is also set. To prevent search space oscillations under extreme constraints from causing the process to fail to stop, the main control process immediately issues a computation truncation command when any condition is met, locking the encoding vector and genome vector of the individual with the highest (lowest) fitness score in the current population. .
[0106] Example 4: This example is a further optimization based on Example 1. In this example, the following steps are also included: Sub-step 4.1, Digital Twin Rumen Simulation Exercise and Dynamic Risk Interception; The system initiates a simulation exercise defense line based on digital twin technology, and within the digital twin simulation system configured at the application layer, [the system]... A biological safety "stress test" was conducted. This digital twin simulation system reconstructs target livestock and poultry with specific physiological indicators in virtual space. For ruminants, the focus was on simulating the dynamic fermentation process of the formula in a virtual rumen, using differential equations to simulate the acid production and neutralization rates of carbohydrates under the action of rumen microorganisms.
[0107] Daily dry matter intake of animals (unit According to the animal's weight and target daily weight gain For estimation purposes, this embodiment uses a simplified model: It is suitable for medium-weight fattening livestock; more accurate estimates can be calculated iteratively based on the energy requirements in the feeding standards.
[0108] set up For virtual rumen The pH value at any given time follows a simplified kinetic model, and its dynamic change follows this model:
[0109] in: The value is the saliva neutralization constant, taken from the literature. ; For physically effective neutral detergent fibers based on formulation The predicted amount of induced additional salivation is calculated based on a classic model of how feed physical properties affect chewing and rumination time:
[0110] in The coefficient of chewing and rumination secretion was optimally set as [value] based on regression analysis of measured data from fistula-carrying cattle fed diets with different physical forms. ; Daily dry matter intake of animals (units) ); The fermentation acid production coefficient is given by a value of [value missing]. ; The formula is based on the total amount of fermentable organic matter in the formula multiplied by the empirical acid conversion factor ( ). The total rate of volatile fatty acid production was calculated.
[0111] The digital twin simulation system monitors continuously during the 48-hour virtual simulation cycle. Fluctuation curve. If the simulation results show that the formula causes the virtual rumen pH to drop below the subacute acidosis threshold of 5.5 for more than 4 consecutive hours, the system immediately intercepts the formula, feeds back the maximum fitness penalty factor to the computational layer, forces the algorithm to avoid high-risk areas and re-optimize. Formulas that have been verified through digital twin exercises and whose various physiological indicators are stable are given a "production permit" digital signature.
[0112] Sub-step 4.2, Volatile fatty acid stoichiometry and methane interception (for ruminants only); when the system detects the unique physical identifier of the ruminant species, the calculation engine of the environmental load emission index undergoes a low-level topology reconstruction, and the multi-dimensional scalar evaluation unit requests carbon emission equivalent parameters with time series characteristics from the digital twin simulation system.
[0113] The virtual rumen fermentation microenvironment was divided into tens of thousands of high-dimensional independent grids by calculus. At each time slice... Within the microbial community, degradable neutral detergent fibers mapped from the formula gene sequence enter the glycolysis metabolic pathway through enzymatic hydrolysis. The chemometrics submodule uses high-frequency capture of the molar distribution array of volatile fatty acids produced at the fermentation terminal: acetic acid molar production rate. Molar rate of propionic acid formation With butyric acid molar formation rate .
[0114] The content of "degradable starch" and "degradable fiber" in the raw materials was determined using the Hohenheim Gas Test method: 0.5g of air-dried raw material was placed in a 100mL syringe with a piston, and a mixture of rumen fluid and buffer solution (volume ratio 1:2) was added. The mixture was incubated in a 39℃ water bath for 72 hours, and the gas production at different time points was recorded. The results were then analyzed using an exponential model. The degradation fraction corresponding to the cumulative gas production over 72 hours was defined as the degradable component. Cross-validation was performed using the insitude gradation method: 3g of air-dried raw material was placed in a nylon bag with a pore size of 40μm and cultured in the rumen for 72 hours; the disappearance rate was measured as a reference standard. The molar yield coefficients of acetic acid, propionic acid, and butyric acid per gram of degradable starch were set as follows: , and The yield coefficient per gram of biodegradable fiber is set as follows: , and However, a dynamic rumen pH correction factor is introduced during the calculation: When simulation At that time, the yield coefficient of acetic acid was reduced by 20%, the yield coefficient of propionic acid was increased by 15%, and the yield coefficient of butyric acid was increased by 5%. When simulation The system maintains a baseline coefficient. It calculates the weighted sum of the mass percentage of each raw material in the formula and the corresponding content of biodegradable components in real time. , and .
[0115] The chemometrics accounting submodule initiates a dynamic methane emission prediction formula based on the principle of hydrogen elemental metabolism pool equilibrium. Its differential and integral forms are as follows:
[0116] in: The derivative of the methane formation rate; The derivative of the molar rate of acetic acid production; Differentiate the molar rate of butyric acid formation; The derivative of the molar rate of propionic acid formation; Indicates time slice The estimated virtual methane generation rate (with non-negativity constraints applied); The molar rate of acetic acid production; The molar formation rate of butyric acid; denoted as the molar rate of propionic acid formation.
[0117] The computation engine performs a full summation on the simulation time window using the fourth-order Runge-Kutta numerical integration algorithm:
[0118] in The duration of the virtual rumen simulation is 48 hours in this embodiment. The system converts the virtual total methane generation of the target individual over a complete digestion cycle into an absolute carbon emission equivalent parameter, which is then explicitly embedded into the environmental load assessment function of step 4. As a core penalty variable, the kernel delineates the ecological red line threshold. When the virtual test result of a certain formula coding vector exceeds the limit, the chemometrics accounting submodule directly injects a secondary lethal penalty factor into the comprehensive score of that individual coding vector.
[0119] Sub-step 4.3: Reverse dimensionless analysis and physical ratio list restoration; At this time, it is still in The normalized dimensionless state of the interval. The digital analysis and closed-loop interception unit calls the extreme value scalar stored in the first step. and Perform inverse normalization reduction.
[0120] For each gene locus in the optimal vector To restore its physical mass percentage :
[0121] Matching the correction coefficient vector of the deep neural network output Nutritional dimension-specific correction factor To achieve a true match in nutritional supply.
[0122] in: For the first The percentage by mass of each ingredient in the final formulation; The th in the optimal individual encoding vector Normalized values of each gene locus; and These are the historical maximum and minimum values for the mass percentage of this raw material; A very small constant penalty term is used to prevent division-by-zero overflow errors; This is the vector of global correction coefficients at the raw material level output by the deep neural network digestibility correction model. A vector of correction coefficients specific to the nutritional dimension.
[0123] Restored By satisfying the mass conservation constraint, the system maps percentage values to the corresponding feed ingredient names, simultaneously calculates the expected nutrient content of the formula under the current working conditions, and generates a target feed formula list.
[0124] Sub-step 4.4: Industrial control deployment and automated execution of the processing production line; the formula generation interface configured in the application layer pushes the target formula list to the central control system of the feed processing plant through an encrypted industrial bus. The control system automatically calculates the rotational speed and frequency of each feed hopper feeder, drives the weighing sensors to perform the batching task, achieving seamless integration from algorithm to equipment and eliminating manual input errors.
[0125] Three sets of comparative experiments were set up to demonstrate the advancements of the present invention over existing technologies. The experimental subjects were growing-finishing pigs (average weight 65 kg), the feed pool contained 22 commonly used feed ingredients, and the environment was set to be hot and humid in summer (average temperature and humidity index 72).
[0126] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0127] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. It should be noted that any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for optimizing pig, cattle, and sheep feed formulations based on genetic algorithms, characterized in that, Includes the following steps: Step 1: Obtain the basic raw material characteristic matrix and the physiological feature vector of the target livestock and poultry, which contain the raw material price time series data after processing by the dynamic price time series smoothing estimator. Then, use the range standardization operator to perform normalization mapping operation on the basic raw material characteristic matrix and the physiological feature vector. Step 2: Identify the species-unique physical identifier in the physiological feature vector. When the species-unique physical identifier is a value representing a monogastric animal, construct a nutrient balance equation based on the standardized ileal amino acid digestibility and net energy system. When the species-unique physical identifier is a value representing a ruminant animal, construct a metabolic equation based on rumen-degraded proteins and physically effective neutral detergent fiber, and generate the corresponding constraint function set for the species. Use a deep neural network model to perform nonlinear true digestibility correction on the basic raw material characteristic matrix and output the true effective nutrient supply matrix. Step 3: Delineate the boundary of the multidimensional feasible region based on the constraint function set, and use the Latin hypercube sampling method with mass conservation constraints to generate the gene sequence of the initial individuals in the simplex space to form the initial population. Step 4: Construct a multi-objective fitness evaluation system that integrates economic cost indicators, nutrient deviation indicators, and environmental load emission indicators. Introduce the real and effective nutrient supply matrix output in Step 2 for nutrient composition extrapolation calculation, and conduct a comprehensive survival fitness score evaluation on the encoding vector of each individual in the initial population and subsequent evolved populations. Step 5: Perform reproductive recombination iteration on the population based on the adaptive simulated binary crossover operator and the non-consistent chaotic mutation mechanism, and implement asymmetric level penalty judgment according to the degree of boundary crossing of the individual encoding vector during the iteration process. Step 6: Monitor the rate of change of the optimal fitness of the population. When the rate of change of the optimal fitness is continuously lower than the preset convergence threshold, extract the gene sequence of the individual with the best survival fitness comprehensive score and perform reverse dimensionless and reverse normalization restoration. Perform digital twin simulation on the restored formula. If the verification fails, return to step 5 to continue the population iteration optimization. If the verification is successful, output the target feed formula list.
2. The method for optimizing pig, cattle, and sheep feed formulations based on genetic algorithms according to claim 1, characterized in that, The specific process of performing nonlinear true digestibility correction on the basic raw material characteristic matrix using a deep neural network model in step 2 is as follows: The input layer of the deep neural network model receives a slice vector array of the basic raw material characteristic matrix and a physiological feature vector containing the explicitly extracted temperature and humidity index. After being processed by a cascaded hidden layer and a linear rectified activation function with leakage, the output layer outputs a raw material-level global correction coefficient vector. The computational layer further incorporates a specific correction coefficient vector for the nutritional dimension, and uses element-wise multiplication to obtain the true and effective nutritional supply matrix, specifically: in, This represents the first element in the true and effective nutrition supply matrix. The first type of raw material The value of various nutrients Represents the first element in the basic raw material property matrix. The first type of raw material The original values of various nutrients, Indicates the first Global correction coefficients for various raw materials Indicates the first Specific correction coefficients for each nutrient component; for nutrients that require independent regulation, Take dynamic inhibition weights; for other nutrients, The value is 1.0, and and The product is limited to the range of 0 to 1.
2.
3. The method for optimizing pig, cattle, and sheep feed formulations based on genetic algorithms according to claim 1, characterized in that, When the species-unique physical identifier is a numerical value representing a ruminant, a physical constraint formula for physically effective neutral detergent fibers is forcibly embedded in the metabolic equation. This physical constraint formula is: in, This represents the total physical available neutral detergent fiber supply in the diet, as a percentage of the dry matter in the diet. Indicates the total number of candidate raw materials; Indicates the first The mass percentage of each raw material in the formula is a variable; Indicates the first The absolute concentration value of neutral detergent fibers in the raw materials; Indicates the first The physical effective conversion factor of the raw materials.
4. The method for optimizing pig, cattle, and sheep feed formulations based on genetic algorithms according to claim 1, characterized in that, The Latin hypercube sampling method with mass conservation constraints in step 3 is as follows: The raw material proportion space is converted into a standard simplex space. Latin hypercube sampling is performed on the simplex space to obtain sampling points. After obtaining the sampling points, they are mapped back to the raw material proportion space through simplex coordinate transformation. Then, linear scaling of the upper and lower limits of the proportion is applied to each raw material dimension, and the mass is renormalized to make the total mass sum 1.
5. The method for optimizing pig, cattle, and sheep feed formulation based on genetic algorithm according to claim 1, characterized in that, The internal topological mathematical model used in the multi-objective fitness evaluation system in step 4 is as follows: in, This represents the overall survival fitness score of an individual's encoded vector. The lower the value, the better the overall performance of the formula; This represents the encoding vector of the individual currently undergoing evaluation; , , These represent the dynamic weighting coefficients for the economic, nutritional, and environmental dimensions, respectively. This represents the preparation cost function; Indicates the first Predicted total content of each nutrient component; Indicates the first The target values of animal physiological requirements for each nutrient component; Represents the environmental load assessment function; This represents the total number of nutritional constraint variables being monitored.
6. The method for optimizing pig, cattle, and sheep feed formulations based on genetic algorithms according to claim 1, characterized in that, Step 6, before outputting the target feed formulation list, also includes a simulated defense line based on digital twin technology: The target feed formulation list is pushed into a virtual rumen fermentation microenvironment, and the virtual acid-base oscillation value in continuous time slices is derived using the rumen pH kinetic equation. The system destroys the list of target feed formulations that cause the virtual pH level to continuously fall below the safe lower limit threshold within the simulated time window.
7. The method for optimizing pig, cattle, and sheep feed formulation based on genetic algorithm according to claim 1, characterized in that, The execution logic for the asymmetric level penalty determination in step 5 is as follows: When an individual's encoding vector causes the preset physiological safety hard constraints to exceed the limit, a positive maximum constant is injected into the individual's encoding vector's overall survival fitness score to execute a deep elimination penalty. When an individual's encoding vector causes a non-core economic soft constraint to exceed the limit, a penalty value is generated according to the square root of the deviation from the Euclidean distance and superimposed on the individual's encoding vector's overall survival fitness score, and a mild retention penalty is applied.
8. The method for optimizing pig, cattle, and sheep feed formulation based on genetic algorithm according to claim 1, characterized in that, The dynamic price time series smoothing estimator is a Kalman filter estimator. The dynamic price time series smoothing sequence contained in the basic raw material characteristic matrix is generated by the dynamic price time series smoothing estimator after removing transient noise impulses from the collected original price vector.
9. The method for optimizing pig, cattle, and sheep feed formulation based on genetic algorithm according to claim 5, characterized in that, The environmental load assessment function is constructed based on the dynamic nitrogen balance deduction logic. By calculating the difference between the amount of nitrogen ingested and the equivalent of nitrogen deposited, it estimates the nitrogen quality discharged into the external environment and dynamically adjusts the dynamic weighting coefficients of the environmental dimensions at different stages of the growth period.
10. A system for optimizing pig, cattle, and sheep feed formulations based on genetic algorithms, characterized in that, A heterogeneous computing platform comprising a high-performance central processing unit and a high-performance graphics processing unit accelerator card, wherein the heterogeneous computing platform is used to execute the method for optimizing pig, cattle and sheep feed formulation based on genetic algorithm as described in any one of claims 1 to 9; The heterogeneous computing platform divides the evolutionary population into equal memory data blocks, assigns an independent hardware thread to each individual encoding vector, and performs the comprehensive survival fitness score evaluation calculation task in parallel in the streaming multiprocessor matrix of the high-performance graphics processor accelerator card.