A method and system for deducing spatial-temporal drift of chicken coccidian drug resistance

By constructing a decentralized phenotypic-genotypic federated reverse mapping network and an evolutionary game theory model, the problems of lag and data silos in monitoring coccidiosis resistance in chickens have been solved. Dynamic prediction of spatiotemporal drift of drug resistance and optimization of medication regimens have been achieved, improving the scientific and economic efficiency of coccidiosis prevention and control in chickens.

CN121812055BActive Publication Date: 2026-05-08INST OF ANIMAL HEALTH GUANGDONG ACADEMY OF AGRI SCI
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INST OF ANIMAL HEALTH GUANGDONG ACADEMY OF AGRI SCI
Filing Date
2026-03-12
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies for monitoring and controlling drug resistance in chicken coccidiosis suffer from outdated and expensive monitoring methods, prominent issues of data silos and privacy barriers, and a lack of dynamic evolution prediction capabilities, leading to passive drug strategies.

Method used

A decentralized phenotypic-genotype federated inverse mapping network is constructed. Combined with an evolutionary game theory model, a heatmap of global drug resistance spatiotemporal evolution is generated using multimodal heterogeneous datasets and conditionally reversible neural networks, and a medication regimen is output.

Benefits of technology

It enables dynamic prediction of drug resistance spatiotemporal drift trends while protecting commercial privacy, reducing costs and increasing monitoring speed, and supporting regional joint prevention and control and drug use strategy optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121812055B_ABST
    Figure CN121812055B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of drug resistance monitoring and management, and discloses a chicken coccidiosis drug resistance spatiotemporal drift deduction method and system, which comprises the following steps: step 1, receiving a multi-modal heterogeneous data set; step 2, constructing a phenotype feature vector according to the production performance recovery lag, recovery acceleration extreme value and fecal spectrum entropy; step 3, inputting the phenotype feature vector into a conditional reversible neural network to output a drug resistance genotype frequency distribution vector; step 4, taking the trained conditional reversible neural network as a teacher model, constructing a student model in the cloud, inputting the drug resistance genotype frequency distribution vector matrix and reputation weight into the student model, and outputting a global drug resistance characteristic map; step 5, constructing an asymmetric evolutionary game model to generate a drug resistance spatiotemporal evolution heat map; and step 6, inputting the regional average drug resistance gene frequency distribution into a reinforcement learning model to output a sequential drug use scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of drug resistance monitoring and control technology, and more specifically, relates to a method and system for extrapolating the spatiotemporal drift of coccidiosis resistance in chickens. Background Technology

[0002] Coccidiosis in chickens is a serious intestinal parasitic disease caused by protozoa of the genus *Eimeria*, which severely impacts the poultry industry. Currently, control of this disease mainly relies on polyether ionotropic antibiotics (ionotropic agents) and chemically synthesized drugs (chemical drugs). However, due to the long-term, high-intensity, and often irregular use of drugs in intensive farming, coccidia are developing increasingly serious drug resistance to existing drugs, exhibiting complex multidrug resistance and cross-resistance characteristics.

[0003] Current technologies for monitoring and controlling coccidiosis resistance have several significant drawbacks. First, monitoring methods are outdated and expensive. Traditional resistance testing relies on in vivo testing or large-scale PCR gene sequencing. The former is time-consuming (requiring weeks of isolation and rearing), costly, and subject to strict ethical review; the latter, while accurate, is prohibitively expensive and cannot be widely adopted in ordinary commercial farms, resulting in resistance data often lagging behind outbreaks. Second, data silos and privacy barriers are prominent issues. Resistance data is closely related to farm medication procedures, management levels, and survival rates, and is considered highly sensitive trade secrets. Data is often not shared between different farming groups, or even between different branches of the same group, making it impossible to construct a comprehensive spatiotemporal map of resistance evolution and hindering regional joint prevention and control. Furthermore, there is a lack of dynamic evolution prediction capabilities. Existing research focuses primarily on current static resistance levels and lacks dynamic prediction of future resistance drift. The change in gene frequency in coccidia populations under drug stress is a dynamic process consistent with evolutionary game theory. Current technologies lack mathematical deduction models based on the "drug-pathogen" confrontation perspective, which often leads to passive drug strategies.

[0004] Therefore, the technical problem solved by this application is: how to dynamically predict the spatiotemporal drift trend of drug resistance and output the medication plan without disclosing the privacy of the original aquaculture data. Summary of the Invention

[0005] The main objective of this application is to provide a method for extrapolating the spatiotemporal drift of coccidia resistance in chickens. By constructing a decentralized phenotype-genotype federated inverse mapping network, dynamic early warning of coccidia resistance is achieved without relying on large-scale gene sequencing, while strictly protecting commercial privacy, thus reducing costs and increasing speed. Furthermore, an evolutionary game theory-based dynamic adversarial model is constructed to simulate the adaptive drift paths of coccidia genotypes under different regional drug pressure strategies, generating a heatmap of the spatiotemporal evolution of global drug resistance. Finally, a reinforcement learning model is used to output a drug administration plan.

[0006] In addition, a spatiotemporal drift simulation system for chicken coccidiosis resistance is also provided.

[0007] To achieve the above objectives, the technical solution adopted in this application is as follows:

[0008] A method for extrapolating the spatiotemporal drift of coccidiosis resistance in chickens includes the following steps:

[0009] Step 1: Receive dynamic growth data, pathological characterization data, drug intervention data, and environmental covariates of the chicken flock after drug intervention to form a multimodal heterogeneous dataset;

[0010] Step 2: Based on the multimodal heterogeneous dataset, the recovery hysteresis calculation formula is used to obtain the recovery performance recovery hysteresis, the recovery acceleration calculation formula is used to obtain the recovery acceleration extreme value, and the fecal spectral entropy is obtained using the Fourier transform formula. Based on the recovery hysteresis, recovery acceleration extreme value, and fecal spectral entropy, a phenotypic feature vector is constructed.

[0011] Step 3: Construct a conditional reversible neural network, input the phenotypic feature vector into the trained conditional reversible neural network, output the drug resistance genotype frequency distribution vector, and generate a local drug resistance report based on the drug resistance genotype frequency distribution vector;

[0012] Step 4: Based on the federated knowledge distillation method, the trained conditional reversible neural network is used as the teacher model, and the student model is built in the cloud. The pre-set public anchor dataset is input into the teacher model. The teacher model outputs the drug resistance genotype frequency distribution vector matrix and digital signature and uploads them to the nodes of the federated blockchain. The nodes of the federated blockchain verify the digital signature and calculate the reputation weight through smart contracts. Then, the drug resistance genotype frequency distribution vector matrix and reputation weight are input into the student model. The student model outputs the global drug resistance feature map.

[0013] Step 5: Based on the global drug resistance feature map, construct an asymmetric evolutionary game model to obtain the reaction-diffusion equation set. By solving the reaction-diffusion equation set, generate a heat map of the spatiotemporal evolution of drug resistance in multiple future cycles.

[0014] Step 6: Based on the heat map of the spatiotemporal evolution of drug resistance, the heat map spatial aggregation algorithm is used to obtain the regional average drug resistance gene frequency distribution. The regional average drug resistance gene frequency distribution, candidate drug set and breeding cycle are input into the reinforcement learning model to output the sequential drug administration plan.

[0015] Preferably, step 2 includes the following sub-steps:

[0016] Step A1: Based on dynamic growth data, construct the actual observed growth curve; based on the ideal growth data of healthy chicken flocks under coccidiosis-free conditions, construct the standard infection-free growth curve.

[0017] Step A2: Based on the actual observed growth curve and the standard uninfected growth curve, construct the response residual function, which is: ,in, For the standard infection-free growth curve, For actual observation of growth curves;

[0018] Step A3: Based on the response residual function, calculate the initial production performance recovery hysteresis using the recovery hysteresis calculation formula, and then normalize the initial production performance recovery hysteresis to obtain the production performance recovery hysteresis.

[0019] Step A4: Based on the response residual function, the initial recovery acceleration extreme value is obtained by using the recovery acceleration calculation formula. Then, the initial recovery acceleration extreme value is normalized to obtain the recovery acceleration extreme value.

[0020] Step A5: Based on the pathological characterization data, the initial fecal spectral entropy is obtained by using the Fourier transform formula, and then the initial fecal spectral entropy is normalized to obtain the fecal spectral entropy.

[0021] Step A6: Construct a phenotypic feature vector based on the production performance recovery hysteresis, the extreme value of recovery acceleration, and the fecal spectral entropy.

[0022] Preferably, the formula for calculating the recovery lag is:

[0023] ;

[0024] Where I represents the hysteresis of production performance recovery. When to intervene with medication To observe the window of time, In response to the residual function at time 1 The value, This is the time decay factor.

[0025] The formula for calculating the recovery acceleration is:

[0026] ;

[0027] Where V is the extreme value of the initial recovery acceleration. In response to the residual function The second time derivative.

[0028] The Fourier transform formula is as follows:

[0029] ;

[0030] Where H is the fecal spectral entropy, The first gray-level histogram of the fecal spectral image is shown below. The normalized frequency of each gray level.

[0031] Preferably, in step 3, each farm constructs its own conditional reversible neural network;

[0032] Each farm's conditionally reversible neural network is optimized and trained using the farm's private historical data and a biologically constrained loss function, which is:

[0033] ;

[0034] in, The negative log-likelihood. For L1 sparsity constraints, To constrain cross-resistance, , All are weighting coefficients;

[0035] Preferably, in step 4, the specific process by which nodes of the federated blockchain verify digital signatures and calculate reputation weights through smart contracts includes the following sub-steps:

[0036] Step C1: After receiving the drug resistance genotype frequency distribution vector matrix and digital signature, the nodes of the federated blockchain verify the validity of the digital signature through public-key cryptography.

[0037] Step C2: When the digital signature is invalid, remove the drug resistance genotype frequency distribution vector matrix of that node; when the digital signature is valid, calculate multiple cosine similarities between the drug resistance genotype frequency distribution vector matrix of that node and the drug resistance genotype frequency distribution vector matrices of other nodes, and then calculate the arithmetic mean of the multiple cosine similarities to obtain the average similarity.

[0038] Step C3: When the average similarity of the node is less than the preset threshold, the drug resistance genotype frequency distribution vector matrix of the node is removed; when the average similarity of the node is greater than the preset threshold, the reputation weight is calculated using the reputation weight formula.

[0039] The formula for reputation weight is:

[0040] ;

[0041] in, For the first The reputation weight of each node, For the first Historical contribution of each node For the first Data quality score for each node , All are weighting coefficients.

[0042] Preferably, in step 4, the student model is trained by updating the global parameters by minimizing the KL divergence between the student model output and the outputs of all weighted teacher models, specifically using the following formula:

[0043] ;

[0044] in, For the new global parameters, For the first The reputation weight of each node, Let KL divergence be the KL divergence. For the first The vector matrix of drug resistance genotype frequency distribution of each node. This is the frequency distribution vector of drug-resistant genotypes output by the student model. For public anchor datasets, These are the parameters for the global student model in the cloud.

[0045] Preferably, step 5 includes the following sub-steps:

[0046] Step D1: Based on the global drug resistance feature map, construct an asymmetric evolutionary game model, defining the strategy set of the control party as chemically synthesized drugs, polyether ionocarrier antibiotics and vaccines, and the strategy set of the pathogen party as sensitive strains and drug-resistant mutant strains;

[0047] Step D2: Define the payoff matrix and use the payoff fitness function to calculate the fitness of each drug-resistant genotype of coccidia under different drug pressures;

[0048] Step D3: Based on the fitness of each drug-resistant genotype of coccidia under different drug stresses, construct a set of reaction-diffusion equations;

[0049] Step D4: Solve the reaction-diffusion equations using the finite difference method to generate a thermogram of the spatiotemporal evolution of drug resistance over multiple future cycles.

[0050] Preferably, the payment fitness function is:

[0051] ;

[0052] in, For the first Fitness of drug-resistant genotypes in coccidia For the first The probability of this drug being used in the current region. Drug-resistant genotype For drugs Tolerance survival rate To maintain drug-resistant genotypes The physiological energy cost consumed.

[0053] The reaction-diffusion equations are as follows:

[0054] ;

[0055] in, For the first Genotype in spatial location and time frequency, For the first Fitness of a genotype The average fitness of the population. To expand the space tensor, The divergence of the diffusion flux.

[0056] Preferably, step 6 includes the following sub-steps:

[0057] Step E1: Based on the heatmap of the spatiotemporal evolution of drug resistance, a heatmap spatial aggregation algorithm is used to obtain the regional average frequency distribution of drug resistance genes; the heatmap spatial aggregation algorithm is as follows:

[0058] ;

[0059] in, Genotype At time step frequency, For the number of spatial grids, A thermogram of the spatiotemporal evolution of drug resistance. For breeding farms The weight of the number of animals in stock. For the first The coordinates of each grid node.

[0060] Step E2: Based on the regional average drug resistance gene frequency distribution, construct a full-cycle optimization objective function, and use this objective function to optimize and train the reinforcement learning model. The optimized objective function is:

[0061] ;

[0062] in, This refers to the total duration of the breeding cycle. Let be the economic loss function. For drug resistance gene frequency, As for the current medication strategy, This is a function of the level of drug resistance accumulation. and All are weighting coefficients.

[0063] Step E3: Input the regional average drug resistance gene frequency distribution, candidate drug set, and breeding cycle into the reinforcement learning model and output the drug application strategy.

[0064] Meanwhile, a spatiotemporal drift estimation system for chicken coccidiosis resistance is also provided to implement the aforementioned spatiotemporal drift estimation method for chicken coccidiosis resistance, comprising the following units:

[0065] Multimodal data receiving unit: used to receive dynamic growth data, pathological characterization data, drug intervention data and environmental covariates of chicken flocks after drug intervention, forming a multimodal heterogeneous dataset;

[0066] Phenotypic feature vector construction unit: Based on multimodal heterogeneous datasets, it uses the recovery lag calculation formula to obtain the production performance recovery lag, the recovery acceleration calculation formula to obtain the recovery acceleration extreme value, and the Fourier transform formula to obtain the fecal spectral entropy. Based on the production performance recovery lag, the recovery acceleration extreme value, and the fecal spectral entropy, it constructs phenotypic feature vectors.

[0067] Inverse dynamics calculation unit: used to construct a conditionally reversible neural network, input the phenotypic feature vector into the trained conditionally reversible neural network, output the drug resistance genotype frequency distribution vector, and generate a local drug resistance report based on the drug resistance genotype frequency distribution vector;

[0068] Federated Knowledge Distillation Collaborative Unit: Based on the federated knowledge distillation method, a trained conditional reversible neural network is used as the teacher model to build a student model in the cloud. A pre-set public anchor dataset is input into the teacher model, which outputs a drug resistance genotype frequency distribution vector matrix and a digital signature, and uploads them to the nodes of the federated blockchain. The nodes of the federated blockchain verify the digital signature and calculate the reputation weight through a smart contract, and then input the drug resistance genotype frequency distribution vector matrix and reputation weight into the student model. The student model outputs a global drug resistance feature map.

[0069] Drug resistance drift simulation unit: used to construct an asymmetric evolutionary game model based on the global drug resistance feature map, obtain the reaction-diffusion equation set, and generate a heat map of the spatiotemporal evolution of drug resistance in multiple future cycles by solving the reaction-diffusion equation set.

[0070] Sequential decision generation unit: Based on the heat map of the spatiotemporal evolution of drug resistance, it uses a heat map spatial aggregation algorithm to obtain the regional average drug resistance gene frequency distribution. The regional average drug resistance gene frequency distribution, candidate drug set and breeding cycle are input into the reinforcement learning model to output a sequential drug administration plan.

[0071] One of the above-mentioned technical solutions in this application has at least one of the following advantages or beneficial effects:

[0072] The deduction method in this application inputs a common anchor dataset into a conditionally reversible neural network trained on each farm, outputting a vector matrix of drug-resistant genotype frequencies. This effectively prevents the back-calculation of original production data through gradients. Then, through federated knowledge distillation, combined with the drug-resistant genotype frequency distribution vector matrices from each farm, a global drug resistance feature map is obtained. This allows for the synthesis of drug-resistant genotype frequency distribution vectors for all regions through a student model. In this way, dynamic early warning of coccidia drug resistance is achieved without relying on large-scale gene sequencing, while strictly protecting commercial privacy.

[0073] Moreover, the conditional reversible neural network trained in each farm can output the first drug resistance genotype frequency distribution vector based on the phenotypic feature vector and generate a local drug resistance report. The farm can then implement short-term medication strategies based on the local drug resistance report.

[0074] Secondly, by combining an asymmetric evolutionary game model, the adaptive drift paths of drug-resistant genotypes in coccidia are simulated under different regional drug application pressure strategies, constructing a heatmap of the spatiotemporal evolution of drug resistance across the entire region, thereby enabling regional joint prevention and control. Furthermore, based on the drift simulation results, the optimal sequential rotation drug application strategy to break the drug resistance equilibrium is calculated using a reinforcement learning model. This strategy utilizes an adaptive cost mechanism to precisely deliver sensitive drugs during the decline window of drug-resistant strains, significantly improving the scientific and economical aspects of coccidia control, and is suitable for precise drug resistance control scenarios in intensive farming farms. Attached Figure Description

[0075] The present application will be further described below with reference to the accompanying drawings and embodiments;

[0076] Figure 1 This is a flowchart of the spatiotemporal drift extrapolation method for chicken coccidiosis resistance in Example 1;

[0077] Figure 2 This is a block diagram of the spatiotemporal drift simulation system for chicken coccidia resistance in Example 1. Detailed Implementation

[0078] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0079] The following disclosure provides many different implementation methods or examples for different schemes of implementing this application.

[0080] Example 1

[0081] refer to Figure 1 A method for extrapolating the spatiotemporal drift of coccidiosis resistance in chickens, comprising the following steps:

[0082] Step 1: Receive dynamic growth data, pathological characterization data, drug intervention data, and environmental covariates of the chicken flock after drug intervention to form a multimodal heterogeneous dataset;

[0083] In this embodiment, dynamic growth data includes daily weight gain, real-time feed intake, feed conversion ratio (FCR) change curve, and water frequency fluctuation. Daily weight gain is used to construct the actual observed growth curve, while real-time feed intake, FCR change curve, and water frequency fluctuation are used to perform quality verification and outlier correction on the daily weight gain data. For example, when feed intake drops sharply but daily weight gain does not change, it is determined that the weighing data is abnormal and interpolation correction is performed.

[0084] Pathological characterization data include the spectral characteristics of fecal moisture content and the color index of bloody stools, acquired by a spectral camera.

[0085] Drug intervention data includes drug type, concentration, and administration time;

[0086] Environmental covariates, including indoor temperature and humidity, and ammonia concentration, are used to correct the model.

[0087] Preprocessing was performed on dynamic growth data, pathological characterization data, drug intervention data, and environmental covariates. Specifically, the raw data was first cleaned, including removing outliers caused by sensor malfunctions, filling in short-term missing data using linear interpolation, and uniformly resampling data from different sampling frequencies (unifying it to daily granular data). Then, the data was preprocessed based on the drug intervention time. Using the time reference point, align the timelines of all data streams to the same starting point, ensuring that different types of data correspond strictly in the time dimension;

[0088] The preprocessed dynamic growth data, pathological characterization data, drug intervention data, and environmental covariates are combined to form a multimodal heterogeneous dataset.

[0089] Step 2: Based on the multimodal heterogeneous dataset, the recovery hysteresis calculation formula is used to obtain the recovery performance recovery hysteresis, the recovery acceleration calculation formula is used to obtain the recovery acceleration extreme value, and the fecal spectral entropy is obtained using the Fourier transform formula. Based on the recovery hysteresis, recovery acceleration extreme value, and fecal spectral entropy, a phenotypic feature vector is constructed.

[0090] Preferably, step 2 includes the following sub-steps:

[0091] Step A1: Based on dynamic growth data, construct the actual observed growth curve; based on the ideal growth data of healthy chicken flocks under coccidiosis-free conditions, construct the standard infection-free growth curve.

[0092] First, standard infection-free growth curves were extracted from the breed-age standard growth database based on the breed and age of the current flock. This curve represents the ideal daily weight gain trajectory of a healthy flock in the absence of coccidiosis infection; then, based on the daily weight gain at different times in the dynamic growth data, the actual observed growth curve is constructed. ;

[0093] The process of constructing the variety-age standard growth database includes:

[0094] First, obtain basic reference data: by accessing the standard production performance target manuals of various broiler breeds (such as Ross 308, Cobb 500, etc.) published by large domestic and foreign poultry breeding companies, extract the standard daily weight gain, feed intake and feed conversion ratio benchmark data of different breeds under ideal conditions at the corresponding age;

[0095] Secondly, local historical healthy breeding data is integrated for correction: production records of healthy chicken flocks that have been confirmed by pathological sampling to be free of coccidiosis infection and whose production performance meets the standards are retrieved from historical batches within the local farm or regional breeding alliance. The actual local healthy growth data is then weighted and integrated with the above benchmark data to eliminate systematic environmental biases caused by different regional climates, feed formulations, and hardware facilities.

[0096] Finally, growth curve fitting algorithms (such as the Gompertz model or the Logistic model) are used to perform continuous smoothing fitting on the fused discrete data, generating continuous and smooth standard infection-free growth curves for specific varieties and specific breeding environments. The growth curves corresponding to different varieties and environmental parameters are entered into the cloud server to construct a standard growth database of varieties and ages.

[0097] Step A2: Based on the actual observed growth curve and the standard uninfected growth curve, construct the response residual function, which is: ,in, For the standard infection-free growth curve, For actual observation of growth curves.

[0098] Step A3: Based on the response residual function, calculate the initial production performance recovery hysteresis using the recovery hysteresis calculation formula, and then normalize the initial production performance recovery hysteresis to obtain the production performance recovery hysteresis.

[0099] Preferably, the formula for calculating the recovery lag is:

[0100] ;

[0101] Where I represents the hysteresis of production performance recovery. When to intervene with medication To observe the window of time, In response to the residual function at time 1 The value, This is the time decay factor;

[0102] After obtaining the initial production performance recovery hysteresis, the initial production performance recovery hysteresis is normalized using a normalization formula to obtain the production performance recovery hysteresis.

[0103] Step A4: Based on the response residual function, the initial recovery acceleration extreme value is obtained by using the recovery acceleration calculation formula. Then, the initial recovery acceleration extreme value is normalized to obtain the recovery acceleration extreme value.

[0104] The formula for calculating the recovery acceleration is:

[0105] ;

[0106] Where V is the extreme value of the initial recovery acceleration. In response to the residual function The second time derivative;

[0107] After obtaining the initial recovery acceleration extreme value, the initial recovery acceleration extreme value is normalized using a normalization formula to obtain the recovery acceleration extreme value.

[0108] Step A5: Based on the pathological characterization data, the initial fecal spectral entropy is obtained by using the Fourier transform formula, and then the initial fecal spectral entropy is normalized to obtain the fecal spectral entropy.

[0109] The Fourier transform formula is as follows:

[0110] ;

[0111] Where H is the fecal spectral entropy, The first gray-level histogram of the fecal spectral image is shown below. The normalized frequency of each gray level;

[0112] After obtaining the initial fecal spectral entropy, the initial fecal spectral entropy is normalized using a normalization formula to obtain the fecal spectral entropy.

[0113] It should be noted that the normalization formula used in steps A3, A4, and A5 is:

[0114] ;

[0115] in, This refers to the hysteresis of production performance recovery, the extreme value of recovery acceleration, or the spectral entropy of feces. This refers to the initial production performance recovery hysteresis, the initial recovery acceleration extreme value, or the initial fecal spectral entropy. This refers to the initial production performance recovery hysteresis, the extreme value of the initial recovery acceleration, or the minimum value of the initial fecal spectral entropy. This refers to the initial production performance recovery hysteresis, the initial recovery acceleration extreme value, or the maximum value of the initial fecal spectral entropy.

[0116] Step A6: Construct a phenotypic feature vector based on the production performance recovery hysteresis, recovery acceleration extreme value, fecal spectral entropy, and environmental covariates.

[0117] Based on the lag in production performance recovery , Recovering the extreme value of acceleration Fecal spectral entropy As basic phenotypic features, these features were concatenated with synchronously collected environmental covariates (dormitory temperature T, relative humidity RH, and ammonia concentration NH3) to construct a phenotypic feature vector. This splicing mechanism enables the subsequent reversible neural network to decouple non-pathogenic environmental stress factors from overall growth retardation during reverse inference, thereby achieving environmental adaptive correction of the inference model.

[0118] Step 3: Construct a conditional reversible neural network, input the phenotypic feature vector into the trained conditional reversible neural network, output the drug resistance genotype frequency distribution vector, and generate a local drug resistance report based on the drug resistance genotype frequency distribution vector;

[0119] Preferably, in step 3, each farm constructs its own conditional reversible neural network;

[0120] Each farm's conditionally reversible neural network is optimized and trained using the farm's private historical data and a biologically constrained loss function, which is:

[0121] ;

[0122] in, The negative log-likelihood. For L1 sparsity constraints, To constrain cross-resistance, , All are weighting coefficients.

[0123] In this embodiment, each farm constructs its own conditional reversible neural network. Specifically, the conditional reversible neural network adopts a deep architecture with 8-12 stacked affine coupling layers, and each layer contains a scaling function. Translation Transformation Function Both functions are implemented using a 3-layer fully connected neural network. The hidden layer dimension is typically set to 128-256, and the activation function is ReLU or LeakyReLU to ensure non-linear expressiveness. The total number of network parameters is approximately 1 million to 5 million, depending on the choice of input dimension and hidden layer size. The training process uses the Adam optimizer with a learning rate of 0.001, a batch size of 64, and typically 100-200 training epochs, with an early stopping mechanism to prevent overfitting. The network input includes latent variables that follow a standard normal distribution. (Dimension N) and phenotypic feature vectors (The dimension is 6, including 3-dimensional physiological phenotype and 3-dimensional environmental covariates) as conditional variables, and the output is a vector quantity representing the frequency distribution of drug resistance genotypes. (Dimension N). The design of the affine coupling layer ensures the invertibility of the transformation, meaning that a given output can uniquely determine the input, while the computational complexity of the Jacobian determinant is O(N). Instead This makes the training process efficient and feasible.

[0124] The mathematical principle of the conditions for invertible neural networks is: define a forward mapping function. ,in For coccidia drug-resistant genotype space, The host phenotypic response space is a mapping that describes the causal relationship from micro-genotype to macro-phenotype; the goal of the inverse problem is to solve... That is, inferring the genotype from the observed phenotype;

[0125] Using Bayes' theorem, the inverse problem is transformed into maximizing the posterior probability. ,in, This is the frequency distribution vector of drug-resistant genotypes. For phenotypic feature vectors, according to Bayes' theorem ,in, Let be the likelihood function, describing the probability of observing a phenotype given a genotype. This represents the prior distribution of genotypes;

[0126] Construct a reversible neural network, achieving bidirectional mapping through a series of affine coupling layers, with each layer transforming into... , ,in, and For neural network submodules, As it is an element-wise multiplication, the Jacobian determinant of this transformation is easy to compute, making the network invertible and training efficient.

[0127] Define the total loss function under biological constraints ,in, The negative log-likelihood. The L1 sparsity constraint reflects the biological fact that coccidia populations typically do not simultaneously produce high-frequency mutations in response to all drugs. To constrain cross-resistance, a matrix of known pharmacological knowledge is used. The covariance of the constrained related gene components is given by the formula: ,in, It is the Frobenius norm.

[0128] The kth farm uses local private data (i.e., training sample pairs consisting of historical phenotypic feature vectors collected by the farm itself and corresponding historical gene sequencing annotation data) to train a conditionally reversible neural network, enabling it to learn the "phenotype-genotype" mapping relationship of the local earthworm population.

[0129] The phenotypic feature vector of the kth farm By inputting a pre-trained conditional reversible neural network, the frequency distribution vector of drug-resistant genotypes in the current coccidia population can be inversely extrapolated without gene sequencing, generating local drug resistance assessment results.

[0130] Drug resistance genotype frequency distribution vector Its local applications include two aspects. First, farms can use it based on the frequency distribution vector of drug-resistant genotypes. Generate a local drug resistance assessment report to understand the current drug resistance level of the coccidia population and guide short-term medication adjustments. Secondly, set up an early warning threshold judgment mechanism; when a certain... If a high drug resistance warning is triggered, it is recommended to immediately switch to another drug to avoid the spread of the epidemic and economic losses.

[0131] It should be noted that the frequency distribution vector of drug-resistant genotypes The data structure is defined as follows:

[0132] The vector is A dimensional vector, where The number of key drug resistance gene loci (usually 5-10), and the frequency distribution components of each drug resistance genotype. Indicates the first The frequency of each drug-resistant gene mutation in the current coccidia population, ranging from [value missing]. ,satisfy (The presence of some sensitive strains is permitted). For example, the six components correspond to six common drug resistance mutations: This indicates the frequency of resistance genes to diclazuril. This indicates the frequency of resistance genes to monensin. Indicates the frequency of resistance genes to salinomycin. This indicates the frequency of resistance genes to maduramycin. This indicates the frequency of resistance genes to nicarbazin. This indicates the frequency of resistance genes to toltrazuril.

[0133] Step 4: Based on the federated knowledge distillation method, the trained conditional reversible neural network is used as the teacher model, and the student model is built in the cloud. The pre-set public anchor dataset is input into the teacher model. The teacher model outputs the drug resistance genotype frequency distribution vector matrix and digital signature and uploads them to the nodes of the federated blockchain. The nodes of the federated blockchain verify the digital signature and calculate the reputation weight through smart contracts. Then, the drug resistance genotype frequency distribution vector matrix and reputation weight are input into the student model. The student model outputs the global drug resistance feature map.

[0134] In this embodiment, the consortium blockchain architecture uses Hyperledger Fabric or FISCO BCOS as the underlying platform; the conditional reversible neural networks trained by each farm are used as teacher models, and the teacher model of each farm is set on the node of the federated blockchain. Each node represents a farm (or farm cluster) participating in federated learning. Multiple nodes are divided into different regions according to geographical distribution, and each node is equipped with a smart contract.

[0135] To protect the privacy of aquaculture data, the system does not directly upload the locally calculated drug resistance genotype frequency distribution vector. Instead of using the network weight parameters of the teacher model, model knowledge is extracted indirectly using the following method: a pre-defined public anchor dataset. (This dataset was provided by an industry association and contains...) Each standardized phenotypic scenario typically comprises 100-500 scenarios, containing standard growth curves and spectral data under different infection pressures and drug interventions. These scenarios do not include any real data from farms and serve as a "common language" for various farm models, ensuring the comparability of the drug-resistant genotype frequency distribution vector matrix. Each phenotypic feature vector data in ( Input the trained first line one by one Teacher Model Teacher Model Output a value for each input data. The frequency distribution vector matrix of drug-resistant genotypes represents the predicted frequency distribution of each drug-resistant genotype in this input scenario, obtained after Softmax normalization. ,in, For the first Phenotypic feature vector data for each scenario; [and all] The output results corresponding to each input are summarized to form a vector matrix of drug resistance genotype frequency distribution. (dimension is) ).

[0136] It should be noted that the frequency distribution vector matrix of drug-resistant genotypes With the frequency distribution vector of drug resistance genotypes The differences and connections: The drug-resistant genotype frequency distribution vector is an estimated frequency of drug-resistant genotypes in the coccidia population of a local farm, inferred by the teacher model using real phenotypic data from the farm as input, reflecting the actual drug resistance status in the local area; while It is the same teacher model in a common standard scenario. The phenotypic feature vector data is the predicted output when input, reflecting the teacher model's assessment of the first [characteristic] in this standard scenario. The proportion of each genotype. The physical meanings of both are essentially the same (the frequency distribution of drug-resistant genotypes), but the input data differs. Because the teacher models from different farms are trained on their respective local data, they learn different "phenotype-genotype" mappings, thus producing different outputs when faced with the same set of common input data. These differences precisely encode information about drug resistance variations across different regions. The cloud-based student model learns from the differences in the outputs of all teacher models on public data, thus fusing them to obtain comprehensive drug resistance knowledge without accessing any real data from farms, thereby protecting privacy. Each node will generate a vector matrix of drug resistance genotype frequency distributions. Its ECDSA digital signature is uploaded to the consortium blockchain.

[0137] Preferably, in step 4, the specific process by which nodes of the federated blockchain verify digital signatures and calculate reputation weights through smart contracts includes the following sub-steps:

[0138] Step C1: After receiving the drug resistance genotype frequency distribution vector matrix and digital signature, the nodes of the federated blockchain verify the validity of the digital signature through public-key cryptography.

[0139] The digital signature is generated using the Elliptic Curve Digital Signature Algorithm (ECDSA) to ensure the authenticity and integrity of the data source. The public-key cryptography mechanism verifies the validity of the digital signature. Specifically, the smart contract uses the public key corresponding to the uploading node to decrypt the received ECDSA digital signature, extracts the hash value, and recalculates the hash value of the received drug resistance genotype frequency distribution vector matrix using the same hash algorithm. If the two hash values ​​are consistent, the digital signature is deemed valid and the data has not been tampered with.

[0140] Step C2: When the digital signature is invalid, remove the drug resistance genotype frequency distribution vector matrix of that node; when the digital signature is valid, calculate multiple cosine similarities between the drug resistance genotype frequency distribution vector matrix of that node and the drug resistance genotype frequency distribution vector matrices of other nodes, and then calculate the arithmetic mean of the multiple cosine similarities to obtain the average similarity.

[0141] The purpose of determining the average similarity of each node is to remove nodes with abnormal drift parameters. By calculating the cosine similarity between the drug resistance genotype frequency distribution vector matrix of each node and the drug resistance genotype frequency distribution vector matrix of other nodes, when the average similarity of a node is lower than the threshold (usually set to 0.6), it is determined to be an abnormal drift and is excluded from this round of aggregation, so as to prevent malicious nodes or low-quality data from polluting the global model.

[0142] Step C3: When the average similarity of the node is less than the preset threshold, the drug resistance genotype frequency distribution vector matrix of the node is removed; when the average similarity of the node is greater than the preset threshold, the reputation weight is calculated using the reputation weight formula.

[0143] The formula for reputation weight is:

[0144] ;

[0145] in, For the first The reputation weight of each node, For the first Historical contribution of each node For the first Data quality score for each node , All are weighting coefficients.

[0146] The specific calculation methods for each parameter in the reputation weight formula are as follows: Historical contribution The quantification is achieved by accumulating the number of rounds of federated learning participated in by node k and the number of times data was successfully uploaded. The calculation formula is as follows: ,in, The cumulative number of rounds successfully participated in by node k. The highest number of participation rounds among all nodes reflects the node's continued willingness to participate and its stability.

[0147] Data quality score The performance of the node teacher model is quantified by evaluating its predictive performance on a public validation set. Specifically, this is achieved by analyzing the public anchor dataset. A portion of the validation samples with known genotypes are reserved. The teacher model of node k The prediction results on the validation samples are compared with those of the known labels, and the prediction accuracy is calculated as a quality score, using the following formula: ,in, To verify the known genotype labeling of sample j, The total number of samples in the public validation set. For the first The teacher model with each node inputs the phenotypic feature vector of the validation sample. The predicted output is a vector of drug resistance genotype frequency distribution. The closer this score is to 1, the higher the model quality.

[0148] and The weighting coefficient is typically set to 0.3 or 0.7, reflecting the principle of prioritizing data quality. This mechanism ensures that high-quality nodes have a greater impact on the global model.

[0149] Preferably, in step 4, the student model is trained by updating the global parameters by minimizing the KL divergence between the student model output and the outputs of all weighted teacher models, specifically using the following formula:

[0150] ;

[0151] in, For the new global parameters, For the first The reputation weight of each node, Let KL divergence be the KL divergence. For the first The vector matrix of drug resistance genotype frequency distribution at each node. This is the frequency distribution vector of drug-resistant genotypes output by the student model. For public anchor datasets, These are the parameters for the global student model in the cloud.

[0152] The mathematical principles of federated knowledge distillation are as follows:

[0153] Let the first The teacher model for each farm is The public anchor dataset is The teacher model's frequency distribution vector matrix for drug-resistant genotypes on this dataset is: The frequency distribution vector matrix of drug-resistant genotypes contains the model's predicted frequency distribution for various drug-resistant genotypes;

[0154] The cloud-based global student model is Its parameters are The goal of the student model is to learn the collective knowledge of all teacher models, and the optimization objective is to minimize the weighted KL divergence, as shown in the formula: ,in, This represents the total number of nodes participating in federated learning. For the first The reputation weight of each node;

[0155] The formula for calculating KL divergence is: ,in This is the vector matrix representing the frequency distribution of drug-resistant genotypes in the teacher model. This is the vector matrix representing the frequency distribution of drug-resistant genotypes in the student model. The first prediction given by the teacher model The probability distribution values ​​of drug-resistant genotypes. The first prediction given by the student model The probability distribution values ​​of drug-resistant genotypes, the KL divergence measures the difference between two probability distributions, and the smaller the value, the closer the student model is to the teacher model;

[0156] This step achieves knowledge integration, and the generated global resistance map not only includes the resistance characteristics of various regions, but also completely isolates the original aquaculture data.

[0157] The data structure of the global drug resistance feature map is as follows:

[0158] Dimensions: matrix ;meaning: Indicates the first The genotype in the first Average frequency for a geographical region;

[0159] The algorithm for generating the global drug resistance feature map is as follows:

[0160] Input: Frequency distribution vector matrix of drug resistance genotypes at each node Node geographical location ;

[0161] Output: Global drug resistance characteristic map ( matrix);

[0162] / / Step F1: Cloud-based student model aggregation;

[0163] Training the global student model , minimize: ;

[0164] / / Step 2: Extract drug resistance characteristics of each region;

[0165] for each geographical region to do;

[0166] Find the area All nodes: ;

[0167] for each drug resistance genotype to do;

[0168] Calculate the regional average frequency:

[0169] ;

[0170] end for;

[0171] end for;

[0172] return ;

[0173] Step 5: Based on the global drug resistance feature map, construct an asymmetric evolutionary game model to obtain the reaction-diffusion equation set. By solving the reaction-diffusion equation set, generate a heat map of the spatiotemporal evolution of drug resistance in multiple future cycles.

[0174] Preferably, step 5 includes the following sub-steps:

[0175] Step D1: Based on the global drug resistance feature map, construct an asymmetric evolutionary game model, defining the strategy set of the control party as chemically synthesized drugs, polyether ionocarrier antibiotics and vaccines, and the strategy set of the pathogen party as sensitive strains and various drug-resistant mutant strains;

[0176] Define the two players in the game and their strategy sets. The strategy set of population A (the defender) is: These represent three control methods: chemical drugs, ion carriers, or vaccines. The strategy set of population B (the pathogen) is... This represents the drug-resistant genotype combinations of sensitive strains and various drug-resistant mutant strains.

[0177] The initial conditions of the game model are derived from the global drug resistance feature map. Extracting from [the data], the specific algorithm is as follows:

[0178] Global resistance characterization map It is matrix( For the number of genotypes, (Number of geographical regions), among which Indicates the first The drug-resistant genotype in the first The average frequency for each geographical region. First, number the target region. Extract the column vector corresponding to this region. The vector is A dimensional vector, whose dimensional vector is the first dimensional vector. Each component That is, the first The average frequency of the drug-resistant genotype in the target area, compared with the drug-resistant genotype frequency vector of the aforementioned individual farm. They belong to the same physical quantity (both representing the frequency distribution of each drug resistance genotype), the difference lies in It is a local estimate for a single farm, while It is the regional average value after aggregation through federated learning. Then, for... Normalization is performed to ensure that the sum of frequencies is 1. The normalization formula is as follows: ,in, For the first The average frequency of drug-resistant genotypes in the target region. For the first The average frequency of drug-resistant genotypes in the target region;

[0179] To avoid numerical instability, a minimum threshold is set for genotypes with a frequency below 0.01. Finally, the initial gene frequency distribution was obtained by renormalization. For spatially distributed game models, it is necessary to consider each spatial grid point. Set initial conditions ,in For small perturbations, it is used to simulate spatial heterogeneity.

[0180] Step D2: Define the payoff matrix and use the payoff fitness function to calculate the fitness of each drug-resistant genotype of coccidia under different drug pressures;

[0181] Define the payment matrix Quantifying the fitness payoff of different coccidia genotypes under different drug administration strategies. Fitness of drug-resistant genotypes in coccidia It is obtained by summing the weighted contributions of all drugs in the current region;

[0182] Preferably, the payment fitness function is:

[0183] ;

[0184] in, For the first The probability of a drug being used in the current region reflects the distribution of the drug use strategies of the prevention and control authorities; Drug-resistant genotype For drugs The tolerance survival rate, ranging from 0 to 1, is initially provided by a conditional inverse neural network and corrected by combining historical data; Genotype In medicine The physiological energy cost consumed to maintain drug-resistant genes under stress, reflecting the fitness cost, typically ranges from 0.05 to 0.3. The physical meaning of this formula is: the survival gain of drug-resistant genotypes under drug stress. However, at the same time, they bear the physiological burden and cost. Net fitness is the difference between the two; in a drug-free environment ( (For the drug), drug-resistant genes do not provide a survival advantage but still require an adaptation cost. Therefore, drug-resistant strains cannot compete with sensitive strains in drug-free environments. This is a key manifestation of the "adaptation cost" in game theory.

[0185] It should be noted that:

[0186] Tolerance survival rate The method for determining this is as follows: extracting genotypes from the global drug resistance characteristic map. In medicine Historical survival data under stress were used to fit dose-response curves using a logistic regression model to calculate the survival probability at standard drug doses.

[0187] Adaptation Cost The determination method is as follows: According to biological literature and experimental data, the maintenance of drug resistance genes usually reduces the reproductive capacity and competitiveness of coccidia in a drug-free environment. The generation value is quantified by comparing the difference in proliferation rate between drug-resistant and sensitive strains under drug-free culture conditions, and the value usually ranges from 0.05 to 0.3.

[0188] average fitness of the population The calculation formula is ,in, For the first Fitness of drug-resistant genotypes Let be the frequency distribution vector of each drug-resistant genotype, satisfying and The average fitness represents the overall survival ability of the current population under a given drug treatment strategy.

[0189] Step D3: Based on the fitness of each drug-resistant genotype of coccidia under different drug stresses, construct a set of reaction-diffusion equations;

[0190] Substituting the fitness function into the replicon dynamics framework and introducing a spatial diffusion term, a set of reaction-diffusion equations describing the spatiotemporal evolution of drug resistance gene frequencies was constructed (total). Equations, corresponding to (genotype)

[0191] The reaction-diffusion equations are as follows:

[0192] ;

[0193] in, For the first Drug-resistant genotypes in spatial location and time Frequency, initial value From the global resistance characterization map The target region data extracted is obtained after normalization; For the first The fitness of a genotype is determined by the aforementioned payoff matrix according to the formula. Calculated; The average fitness of the population; The current medication strategy vector for the region is obtained from historical medication data for the region; the first term of the equation is the selection effect term, which is the term used when the drug-resistant genotype... fitness Higher than the population average fitness hour, ,frequency The increase refers to the expansion of genotypes with higher fitness in the population, while the decrease in frequency is due to the decrease in the frequency of genotypes with lower fitness. The second term is the spatial diffusion term. For the spatial diffusion tensor, The divergence of diffusion flux allows drug-resistant genotypes to spread from high-frequency regions to low-frequency regions;

[0194] It should be noted that: spatial diffusion tensor This describes the intensity of coccidia transmission between different farms via logistics, personnel movement, and other pathways. The calculation process consists of three steps:

[0195] The first step is to construct a connectivity matrix and collect the frequency of feed truck transportation between farms within the region. (Unit: times / month), personnel movement records and geographical distance (Unit: km) Data, construct a weighted adjacency matrix , of which elements Indicates a breeding farm and The connection strength between them is calculated using the following formula: ,in, For the frequency of feed truck transportation, For personnel movement records and geographical distances, The distance attenuation exponent, typically ranging from 1 to 2, reflects the inhibitory effect of distance on propagation. When represents linear decay, when The time represents the squared decay; in practical applications, an appropriate time should be selected based on the characteristics of the region. value.

[0196] The second step is normalization. Row normalization is performed on the adjacency matrix to obtain the diffusion coefficient matrix. The calculation formula is as follows: ,in, For breeding farms and The connectivity strength between them For breeding farms and The connectivity strength between them is normalized to ensure that the total diffusion probability of each farm is 1, which conforms to the principle of probability conservation.

[0197] The third step is to set the boundary conditions, using zero-flux boundary conditions (Neumann boundary conditions), meaning the gradient at the boundary is zero, mathematically expressed as: ,in, For the boundary normal vector, The boundary condition represents the region boundary, indicating that drug-resistant coccidia will not flow out of the system boundary, consistent with the physical reality of a closed region. The calculation of the diffusion tensor fully considers the actual connectivity and geographical constraints between farms, providing accurate spatial propagation parameters for the reaction-diffusion equation.

[0198] Step D4: Solve the reaction-diffusion equations using the finite difference method to generate a heat map of the spatiotemporal evolution of drug resistance over multiple future periods. Specifically, the target region is divided into... Each grid node corresponds to a farm or cluster of farms, and the grid spacing is determined by the actual geographical distance; time is discretized into step sizes. (Usually 1 day), the total simulation duration is (Typically 180 days, or about 6 breeding cycles); Iterative calculations are performed using an implicit Crank-Nicolson scheme, which has unconditional stability and avoids the strict time step limitations of explicit schemes; Initial conditions From the global resistance characterization map The frequency distribution of drug resistance genes extracted from the target region was obtained after normalization. For the first The coordinates of each spatial grid node; the boundary condition adopts the zero-flux boundary condition (Neumann boundary condition), i.e. This indicates that drug-resistant coccidia will not flow out of the system boundary; within each time step, the frequency of the current drug-resistant genotype is first determined. and medication strategies Calculate fitness and average fitness Then, the reaction-diffusion equations are solved to obtain the drug resistance genotype frequency at the next time step. Iterate gradually to the total duration Finally, the frequency distribution of each genotype across all spatial grids and all time steps is output. ( Tensor), namely, the spatiotemporal evolution heatmap of drug resistance.

[0199] Step 6: Based on the heat map of the spatiotemporal evolution of drug resistance, the heat map spatial aggregation algorithm is used to obtain the regional average drug resistance gene frequency distribution. The regional average drug resistance gene frequency distribution, candidate drug set and breeding cycle are input into the reinforcement learning model to output the drug administration plan.

[0200] Preferably, step 6 includes the following sub-steps:

[0201] Step E1: Based on the heatmap of the spatiotemporal evolution of drug resistance, a heatmap spatial aggregation algorithm is used to obtain the regional average frequency distribution of drug resistance genes; the heatmap spatial aggregation algorithm is as follows:

[0202] ;

[0203] in, Genotype At time step frequency, For the number of spatial grids, A thermogram of the spatiotemporal evolution of drug resistance. For breeding farms The weight of the number of animals in stock. For the first The coordinates of each grid node;

[0204] After polymerization, the regional average drug resistance gene frequency distribution was obtained. ( matrix).

[0205] Step E2: Based on the regional average drug resistance gene frequency distribution, construct a full-cycle optimization objective function, and use the full-cycle optimization objective function to optimize and train the reinforcement learning model.

[0206] Based on the aggregated regional average drug resistance gene frequency distribution Let's define the mathematical objective for optimizing the sequential drug administration strategy. The goal is to dynamically select the optimal drug administration regimen throughout the entire breeding cycle, minimizing the sum of economic losses caused by coccidiosis infection and the cumulative level of drug resistance. Therefore, we define the full-cycle optimization objective function:

[0207] ;

[0208] in, This refers to the total duration of the breeding cycle (usually 42-56 days). For a moment The average frequency distribution of drug resistance genes in the aggregated region. For a moment Medication strategy vector, and These are the weighting coefficients (usually taken as 0.6 and 0.4). Economic loss function. Deviations in predicting feed conversion ratio and daily weight gain in chicken flocks based on drug resistance gene frequencies and medication strategies translate into economic losses such as increased feed costs and prolonged time to market; the cumulative level function of drug resistance. The weighted sum of the frequencies of all drug-resistant genotypes, where, These are the weighting coefficients. For the first Frequency of drug-resistant genotypes. The total cycle optimization objective function. In step E3, the reward function is transformed into a reinforcement learning function to guide the policy network in learning the optimal sequential dosing regimen.

[0209] It should be noted that:

[0210] Economic loss function The calculation method is as follows: First, based on the frequency of drug resistance genes... and current medication strategies The inverse dynamics model is used to predict the production performance indicators (feed conversion ratio, daily weight gain) of the chicken flock. Then, the deviation from the standard production performance is calculated, and the deviation is converted into economic loss. The formula is as follows: ,in, For feed prices, To increase the feed conversion ratio, For time cost, Extend the time before slaughter by several days;

[0211] Drug resistance cumulative level function The calculation method is as follows: the cumulative resistance level function is defined as the weighted sum of the frequencies of all drug-resistant genotypes, and the formula is: ,in, For the first Drug-resistant genotypes at time steps frequency, For the first The index assigns a weight to the severity of harm caused by each drug-resistant genotype, with a higher weight to multidrug-resistant genotypes. This index quantifies the overall drug resistance level of the population.

[0212] Step E3: Input the regional average drug resistance gene frequency distribution, candidate drug set, and breeding cycle into the reinforcement learning model and output the drug administration plan.

[0213] The construction and training of the reinforcement learning model are as follows: the Proximal Policy Optimization (PPO) algorithm is used to solve for the optimal control policy. PPO is a policy gradient method with the advantages of stable training and high sample efficiency, and it is particularly suitable for handling decision problems in continuous state space and discrete action space.

[0214] The core components of the algorithm include four aspects: First, the state space Includes the current frequency distribution of drug resistance genotypes (N-dimensional vector), historical medication records (A T×D matrix, recording the usage of each drug over the past T breeding cycles) and the age of the flock. (Scalar, value range 1-56 days), state vector is (The dimension is N+T×D+1, by...) After the matrix is ​​flattened and and (assembled from pieces), among which, Given the current age of the flock in days, this state vector fully characterizes the current drug resistance status and medication history of the farm.

[0215] Second, action space The pool of candidate drugs includes chemical drugs (dicrazuril, toltrazuril, etc.), ionotropic agents (monensin, salinomycin, maduramycin, etc.), and vaccines. This indicates the drugs to be selected in the next stage, and the action space is usually 5-8 drugs;

[0216] Third, the reward function (the objective function for full-cycle optimization). A loss function with negative rewards, where maximizing the cumulative reward is equivalent to minimizing the cumulative loss, and the weighting coefficients... and The values ​​are usually 0.6 and 0.4, reflecting the principle of prioritizing economic benefits while also taking into account drug resistance control;

[0217] Fourth, policy networks Output in state Select action The probability distribution is generated using a 3-layer fully connected neural network. The hidden layer dimensions are 256 and 128, the activation function is ReLU, and the output layer uses the Softmax activation function to generate the probability distribution. The network parameters are as follows. The update formula is as follows: (Updated using the PPO algorithm)

[0218] ,in, For the dominant function, This is the trimming parameter (usually set to 0.2). For the new policy network that is currently being updated, in state Select action The probability, For the old policy network before the update, in state Select action The probability, This represents the expected value of the trajectory data obtained based on the old policy network sampling. The pruning function (used to forcibly limit the probability ratio of the new and old strategies to a certain value). Within a certain range, to prevent excessively large single policy updates. During training, a heatmap of drug resistance spatiotemporal evolution is used as an environment simulator, based on the current state. and actions The state at the next moment can be predicted using the stress-diffusion equations. and rewards A large amount of trajectory data (typically 10,000-50,000 trajectories) is collected for training the policy network. The number of training epochs is usually 500-1000, the learning rate is set to 0.0003, the batch size is 64, and the discount factor is [not specified]. The value is 0.99. After training, the policy network outputs the selection probability distribution of each candidate drug;

[0219] Policy network output decoding algorithm.

[0220] The policy network output decoding algorithm transforms the selection probability distribution of each candidate drug in the policy network into an executable sequential dosing protocol. The algorithm input is the selection probability distribution of each candidate drug output from the policy network. Candidate drug set and breeding cycle The output is a text description of the sequential medication regimen. The algorithm first initializes the state. Then for each time step From 1 to According to the current state Sampling action And predict the updated state using an asymmetric game model. Subsequently, the algorithm defines a mapping table between actions and drugs. Each action Mapped to specific drugs Finally, the algorithm generates a timeline, merges consecutive identical drug use phases, initializes the protocol list, and iterates from the second time step. When a drug change is detected, a phase description is added: "Phase: ..." Age, use This process ultimately generates a complete sequential medication regimen.

[0221] To enhance interpretability, a decision rule table based on drug resistance patterns is added (Table 1):

[0222] Table 1. Decision rule table based on drug resistance patterns

[0223]

[0224] Example of policy output:

[0225] In Mode A scenario, current resistance analysis shows the frequency of chemical drug resistance genes. (High risk), frequency of drug resistance genes in ion carriers (Low Risk). The system recommends the following sequential dosing regimen: Phase 1 (1-21 days old) uses ion carrier B (monensin) at a dose of 100 ppm; Phase 2 (22-42 days old) uses ion carrier C (salinomycin) at a dose of 60 ppm. The goal of this regimen is to avoid high resistance zones to chemical drugs and utilize the low resistance advantage of ion carriers. According to game theory model predictions, this regimen can reduce the frequency of chemical drug resistance genes to [a certain level] after two breeding cycles. This fully demonstrates the role of the adaptive cost mechanism.

[0226] In scenario C, current resistance analysis shows the frequency of chemical drug resistance genes. Frequency of drug resistance genes in ion carriers (Multidrug resistance). The recommended sequential dosing regimen is as follows: Phase 1 (1-14 days old) uses vaccine immunization (live or subunit vaccine); Phase 2 (15-28 days old) uses chemical drug A (dicrazine) at a dose of 1 ppm; Phase 3 (29-42 days old) uses ionoporter B (monensin) at a dose of 100 ppm. The goal of this regimen is to establish basic immunization through vaccination and then break the drug resistance balance through drug rotation. According to game theory model predictions, this regimen can reduce the overall drug resistance index to a safe level after 3 breeding cycles. This effectively controls the problem of multidrug resistance.

[0227] Example 2

[0228] refer to Figure 2A spatiotemporal drift estimation system for coccidiosis resistance in chickens, used to implement the aforementioned spatiotemporal drift estimation method for coccidiosis resistance in chickens, includes the following units:

[0229] Multimodal data receiving unit: used to receive dynamic growth data, pathological characterization data, drug intervention data and environmental covariates of chicken flocks after drug intervention, forming a multimodal heterogeneous dataset;

[0230] Phenotypic feature vector construction unit: Based on multimodal heterogeneous datasets, it uses the recovery lag calculation formula to obtain the production performance recovery lag, the recovery acceleration calculation formula to obtain the recovery acceleration extreme value, and the Fourier transform formula to obtain the fecal spectral entropy. Based on the production performance recovery lag, the recovery acceleration extreme value, and the fecal spectral entropy, it constructs phenotypic feature vectors.

[0231] Inverse dynamics calculation unit: used to construct a conditionally reversible neural network, input the phenotypic feature vector into the trained conditionally reversible neural network, output the drug resistance genotype frequency distribution vector, and generate a local drug resistance report based on the drug resistance genotype frequency distribution vector;

[0232] Federated Knowledge Distillation Collaborative Unit: Based on the federated knowledge distillation method, a trained conditional reversible neural network is used as the teacher model to build a student model in the cloud. A pre-set public anchor dataset is input into the teacher model, which outputs a drug resistance genotype frequency distribution vector matrix and a digital signature, and uploads them to the nodes of the federated blockchain. The nodes of the federated blockchain verify the digital signature and calculate the reputation weight through a smart contract, and then input the drug resistance genotype frequency distribution vector matrix and reputation weight into the student model. The student model outputs a global drug resistance feature map.

[0233] Drug resistance drift simulation unit: used to construct an asymmetric evolutionary game model based on the global drug resistance feature map, obtain the reaction-diffusion equation set, and generate a heat map of the spatiotemporal evolution of drug resistance in multiple future cycles by solving the reaction-diffusion equation set.

[0234] Sequential decision generation unit: Based on the heat map of the spatiotemporal evolution of drug resistance, it uses a heat map spatial aggregation algorithm to obtain the regional average drug resistance gene frequency distribution. The regional average drug resistance gene frequency distribution, candidate drug set and breeding cycle are input into the reinforcement learning model to output a sequential drug administration plan.

[0235] In this embodiment, at the edge node of the farm, the system receives dynamic growth data, pathological characterization data, drug intervention data, and environmental covariates through IoT sensors and management software interfaces. Dynamic growth data is acquired through external weighing devices and smart feed towers, pathological characterization data is acquired through external spectral cameras, drug intervention data is acquired through manual registration, and environmental covariates are acquired through sensors (such as temperature sensors, humidity sensors, and light sensors).

[0236] The specific workflow of this system is as follows: The multimodal data receiving unit receives the dynamic growth data, pathological characterization data, drug intervention data and environmental covariates of the chicken flock after drug intervention, and combines the dynamic growth data, pathological characterization data, drug intervention data and environmental covariates into a multimodal heterogeneous dataset, and sends the multimodal heterogeneous dataset to the phenotypic feature vector construction unit.

[0237] The phenotypic feature vector construction unit is based on a multimodal heterogeneous dataset. It calculates the production performance recovery hysteresis, the recovery acceleration extreme value, and the fecal spectral entropy. It then concatenates these three values ​​together to form a phenotypic feature vector, which is then sent to the inverse dynamics calculation unit.

[0238] The inverse dynamics computing unit first constructs a conditional reversible neural network and trains it using data from the farm. It inputs the phenotypic feature vector into the trained conditional reversible neural network, outputs the drug resistance genotype frequency distribution vector, and generates a local drug resistance report for farm personnel to observe the situation of their farm. The trained conditional reversible neural network is then sent to the federated knowledge distillation collaborative unit.

[0239] The federated knowledge distillation collaborative unit constructs a federated blockchain. Based on the federated knowledge distillation method, a trained conditional reversible neural network is used as the teacher model, and a student model is constructed in the cloud. A pre-set public anchor dataset is input into the teacher model. The teacher model outputs a drug resistance genotype frequency distribution vector matrix and a digital signature, which are then uploaded to the nodes of the federated blockchain. The nodes of the federated blockchain verify the digital signature and calculate the reputation weight through a smart contract. The drug resistance genotype frequency distribution vector matrix and reputation weight are then input into the student model. The student model outputs a global drug resistance feature map, which is then sent to the drug resistance drift inference unit.

[0240] The drug resistance drift inference unit constructs an asymmetric evolutionary game model based on the global drug resistance feature map, and numerically solves the reaction-diffusion equation set to generate a heat map of the spatiotemporal evolution of drug resistance in multiple future cycles. The heat map of the spatiotemporal evolution of drug resistance is then sent to the sequential decision generation unit.

[0241] The sequential decision generation unit processes the heatmap of the spatiotemporal evolution of drug resistance to obtain the regional average drug resistance gene frequency distribution. Then, the regional average drug resistance gene frequency distribution, the candidate drug set, and the breeding cycle are input into the reinforcement learning model to output the sequential drug administration plan.

[0242] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A method for extrapolating the spatiotemporal drift of coccidiosis resistance in chickens, characterized in that, Includes the following steps: Step 1: Receive dynamic growth data, pathological characterization data, drug intervention data, and environmental covariates of the chicken flock after drug intervention to form a multimodal heterogeneous dataset; Step 2: Based on the multimodal heterogeneous dataset, the recovery hysteresis calculation formula is used to obtain the recovery performance recovery hysteresis, the recovery acceleration calculation formula is used to obtain the recovery acceleration extreme value, and the fecal spectral entropy is obtained using the Fourier transform formula. Based on the recovery hysteresis, recovery acceleration extreme value, and fecal spectral entropy, a phenotypic feature vector is constructed. Step 3: Construct a conditional reversible neural network, input the phenotypic feature vector into the trained conditional reversible neural network, output the drug resistance genotype frequency distribution vector, and generate a local drug resistance report based on the drug resistance genotype frequency distribution vector; Step 4: Based on the federated knowledge distillation method, the trained conditional reversible neural network is used as the teacher model, and the student model is built in the cloud. The pre-set public anchor dataset is input into the teacher model. The teacher model outputs the drug resistance genotype frequency distribution vector matrix and digital signature and uploads them to the nodes of the federated blockchain. The nodes of the federated blockchain verify the digital signature and calculate the reputation weight through smart contracts. Then, the drug resistance genotype frequency distribution vector matrix and reputation weight are input into the student model. The student model outputs the global drug resistance feature map. Step 5: Based on the global drug resistance feature map, construct an asymmetric evolutionary game model to obtain the reaction-diffusion equation set. By solving the reaction-diffusion equation set, generate a heat map of the spatiotemporal evolution of drug resistance in multiple future cycles. Step 6: Based on the heat map of the spatiotemporal evolution of drug resistance, the heat map spatial aggregation algorithm is used to obtain the regional average drug resistance gene frequency distribution. The regional average drug resistance gene frequency distribution, candidate drug set and breeding cycle are input into the reinforcement learning model to output the sequential drug administration plan. Step 5 includes the following sub-steps: Step D1: Based on the global drug resistance feature map, construct an asymmetric evolutionary game model, defining the strategy set of the control party as chemically synthesized drugs, polyether ionocarrier antibiotics and vaccines, and the strategy set of the pathogen party as sensitive strains and drug-resistant mutant strains. Step D2: Define the payoff matrix and use the payoff fitness function to calculate the fitness of each drug-resistant genotype of coccidia under different drug pressures; Step D3: Based on the fitness of each drug-resistant genotype of coccidia under different drug stresses, construct a set of reaction-diffusion equations; Step D4: Solve the reaction-diffusion equations using the finite difference method to generate a thermogram of the spatiotemporal evolution of drug resistance over multiple future cycles; The payment fitness function is: ; in, For the first Fitness of drug-resistant genotypes in coccidia For the first The probability of this drug being used in the current region. Drug-resistant genotype For drugs Tolerance survival rate To maintain drug-resistant genotypes The physiological energy cost consumed, where D is the total number of drug types currently under investigation; The reaction-diffusion equations are as follows: ; in, For the first Genotype in spatial location and time frequency, For the first Fitness of a genotype The average fitness of the population. To expand the space tensor, The divergence of the diffusion flux.

2. The method for extrapolating the spatiotemporal drift of coccidiosis resistance in chickens according to claim 1, characterized in that, Step 2 includes the following sub-steps: Step A1: Based on dynamic growth data, construct the actual observed growth curve; based on the ideal growth data of healthy chicken flocks under coccidiosis-free conditions, construct the standard infection-free growth curve. Step A2: Based on the actual observed growth curve and the standard uninfected growth curve, construct the response residual function, which is: ,in, For the standard infection-free growth curve, The actual observed growth curve, where t is the time variable; Step A3: Based on the response residual function, calculate the initial production performance recovery hysteresis using the recovery hysteresis calculation formula, and then normalize the initial production performance recovery hysteresis to obtain the production performance recovery hysteresis. Step A4: Based on the response residual function, the initial recovery acceleration extreme value is obtained by using the recovery acceleration calculation formula. Then, the initial recovery acceleration extreme value is normalized to obtain the recovery acceleration extreme value. Step A5: Based on the pathological characterization data, the initial fecal spectral entropy is obtained by using the Fourier transform formula, and then the initial fecal spectral entropy is normalized to obtain the fecal spectral entropy. Step A6: Construct a phenotypic feature vector based on the production performance recovery hysteresis, the extreme value of recovery acceleration, and the fecal spectral entropy.

3. The method for extrapolating the spatiotemporal drift of coccidiosis resistance in chickens according to claim 2, characterized in that, The formula for calculating the recovery lag is: ; Where I represents the hysteresis of production performance recovery. When to intervene with medication To observe the window of time, In response to the residual function at time 1 The value, This is the time decay factor; The formula for calculating the recovery acceleration is: ; Where V is the extreme value of the initial recovery acceleration. In response to the residual function The second time derivative; The Fourier transform formula is as follows: ; Where H is the fecal spectral entropy, The first gray-level histogram of the fecal spectral image. The normalized frequency of each gray level.

4. The method for extrapolating the spatiotemporal drift of coccidiosis resistance in chickens according to claim 1, characterized in that, In step 3, each farm constructs its own conditional reversible neural network; Each farm's conditionally reversible neural network is optimized and trained using the farm's private historical data and a biologically constrained loss function, which is: ; in, The negative log-likelihood. For L1 sparsity constraints, To constrain cross-resistance, , All are weighting coefficients.

5. The method for extrapolating the spatiotemporal drift of coccidiosis resistance in chickens according to claim 1, characterized in that, In step 4, the specific process by which nodes of the federated blockchain verify digital signatures and calculate reputation weights through smart contracts includes the following sub-steps: Step C1: After receiving the drug resistance genotype frequency distribution vector matrix and digital signature, the nodes of the federated blockchain verify the validity of the digital signature through public-key cryptography. Step C2: When the digital signature is invalid, remove the drug resistance genotype frequency distribution vector matrix of that node; when the digital signature is valid, calculate multiple cosine similarities between the drug resistance genotype frequency distribution vector matrix of that node and the drug resistance genotype frequency distribution vector matrices of other nodes, and then calculate the arithmetic mean of the multiple cosine similarities to obtain the average similarity. Step C3: When the average similarity of the node is less than the preset threshold, the drug resistance genotype frequency distribution vector matrix of the node is removed; when the average similarity of the node is greater than the preset threshold, the reputation weight is calculated using the reputation weight formula. The formula for reputation weight is: ; in, For the first The reputation weight of each node, For the first Historical contribution of each node For the first Data quality score for each node , All are weighting coefficients. For the first Historical contribution of each node For the first The data quality score of each node, where N is the total number of nodes.

6. The method for extrapolating the spatiotemporal drift of coccidiosis resistance in chickens according to claim 1, characterized in that, In step 4, the student model is trained by updating the global parameters by minimizing the KL divergence between the student model output and the outputs of all weighted teacher models. The specific formula is as follows: ; in, For the new global parameters, For the first The reputation weight of each node, Let KL divergence be the KL divergence. For the first The vector matrix of drug resistance genotype frequency distribution of each node. This is the frequency distribution vector of drug-resistant genotypes output by the student model. For public anchor datasets, These are the parameters for the global student model in the cloud.

7. The method for extrapolating the spatiotemporal drift of coccidiosis resistance in chickens according to claim 1, characterized in that, Step 6 includes the following sub-steps: Step E1: Based on the heatmap of the spatiotemporal evolution of drug resistance, a heatmap spatial aggregation algorithm is used to obtain the regional average frequency distribution of drug resistance genes; the heatmap spatial aggregation algorithm is as follows: ; in, Genotype At time step frequency, For the number of spatial grids, A thermogram of the spatiotemporal evolution of drug resistance. The weight of the number of animals in farm l. Let v be the coordinates of the v-th grid node; Step E2: Based on the regional average drug resistance gene frequency distribution, construct a full-cycle optimization objective function, and use this objective function to optimize and train the reinforcement learning model. The optimized objective function is: ; in, This refers to the total duration of the breeding cycle. Let be the economic loss function. For a moment The average frequency distribution of drug resistance genes in the aggregated region. For a moment Medication strategy vector, This is a function of the level of drug resistance accumulation. and All are weighting coefficients; Step E3: Input the regional average drug resistance gene frequency distribution, candidate drug set, and breeding cycle into the reinforcement learning model and output the drug application strategy.

8. A spatiotemporal drift prediction system for chicken coccidiosis resistance, characterized in that, The method for extrapolating the spatiotemporal drift of coccidiosis resistance in chickens as described in any one of claims 1-7 includes the following units: Multimodal data receiving unit: used to receive dynamic growth data, pathological characterization data, drug intervention data and environmental covariates of chicken flocks after drug intervention, forming a multimodal heterogeneous dataset; Phenotypic feature vector construction unit: Based on multimodal heterogeneous datasets, it uses the recovery lag calculation formula to obtain the production performance recovery lag, the recovery acceleration calculation formula to obtain the recovery acceleration extreme value, and the Fourier transform formula to obtain the fecal spectral entropy. Based on the production performance recovery lag, the recovery acceleration extreme value, and the fecal spectral entropy, it constructs phenotypic feature vectors. Inverse dynamics calculation unit: used to construct a conditionally reversible neural network, input the phenotypic feature vector into the trained conditionally reversible neural network, output the drug resistance genotype frequency distribution vector, and generate a local drug resistance report based on the drug resistance genotype frequency distribution vector; Federated Knowledge Distillation Collaborative Unit: Based on the federated knowledge distillation method, a trained conditional reversible neural network is used as the teacher model to build a student model in the cloud. A pre-set public anchor dataset is input into the teacher model, which outputs a drug resistance genotype frequency distribution vector matrix and a digital signature, and uploads them to the nodes of the federated blockchain. The nodes of the federated blockchain verify the digital signature and calculate the reputation weight through a smart contract, and then input the drug resistance genotype frequency distribution vector matrix and reputation weight into the student model. The student model outputs a global drug resistance feature map. Drug resistance drift simulation unit: used to construct an asymmetric evolutionary game model based on the global drug resistance feature map, obtain the reaction-diffusion equation set, and generate a heat map of the spatiotemporal evolution of drug resistance in multiple future cycles by solving the reaction-diffusion equation set. Sequential decision generation unit: Based on the heat map of the spatiotemporal evolution of drug resistance, it uses a heat map spatial aggregation algorithm to obtain the regional average drug resistance gene frequency distribution. The regional average drug resistance gene frequency distribution, candidate drug set and breeding cycle are input into the reinforcement learning model to output a sequential drug administration plan.

Citation Information

Patent Citations

  • Antibiotic-free breeding system and method for laying hens

    CN121414381A