A digital-twin-based remote diagnosis and treatment system for dairy cows

CN122991534APending Publication Date: 2026-10-27第八师石河子市畜牧水产发展服务中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610949547.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]本发明提供一种基于数字孪生的奶牛远程诊疗系统,解决相关技术中缺乏对牛群个体间疾病传播关系的定量刻画、无法在多药共存条件下评估药物交互作用对血药浓度的影响、以及治疗资源分配未能兼顾个体病情与群体传播紧迫度的技术问题

Benefits of technology

其一,多药物耦合动力学仿真模块将各药物独立的常微分方程药物动力学模型改造为基于药物交互邻接矩阵的耦合常微分方程组,在清除率项中引入依赖于共存药物浓度和代谢酶竞争系数矩阵的Michaelis-Menten型非线性抑制因子,在分布容积项中引入依赖于共存药物浓度和蛋白结合竞争系数矩阵的动态调整项。由于耦合常微分方程组中各药物的浓度变化相互关联,当一种药物浓度升高抑制另一种药物的代谢清除时,被抑制药物的浓度曲线将相应抬升,这一交互过程在独立方程模型中无法体现。因此,多药物耦合动力学仿真模块克服了独立模型在多药共存条件下忽略代谢竞争和蛋白结合竞争所导致的药物浓度预测系统性偏差,使并发症联合治疗方案在仿真环境中的浓度预测与实际用药情形的一致性得以提升,从而增强了治疗方案评估的可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122991534A_ABST
    Figure CN122991534A_ABST
Patent Text Reader

Abstract

The application relates to the field of intelligent livestock raising technology, and discloses a dairy cow remote diagnosis and treatment system based on digital twinning, wherein the system comprises a time-varying contact relationship analysis module, a cow group behavior residual space-time correlation graph assembly module, a transmission chain identification and marking module, a transmission urgency evaluation module, a multi-drug coupling dynamics simulation module and a hierarchical reinforcement learning treatment optimization module. The system optimizes individual joint treatment schemes and group transmission containment resource allocation in a digital twinning environment through hierarchical reinforcement learning of multi-drug coupling dynamics simulation and transmission chain perception, and pushes a remote diagnosis and treatment comprehensive report to a remote veterinarian diagnosis and treatment terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart animal husbandry technology, and more specifically, to a remote diagnosis and treatment system for dairy cows based on digital twins. Background Technology

[0002] In large-scale dairy farming, when infectious diseases break out, some individuals may simultaneously suffer from complications. Remote diagnostic systems need to simultaneously optimize individual combined treatment plans and contain the chain of transmission within the herd. Existing remote diagnostic systems typically use digital twin technology to model the physiological state of dairy cows and combine this with reinforcement learning methods to optimize dosing regimens.

[0003] However, existing technologies have the following shortcomings: First, pharmacokinetic simulations for combined treatment of complications use independent ordinary differential equation models for each drug, failing to consider the interactive effects such as competitive inhibition of metabolic enzymes and competition for plasma protein binding sites when multiple drugs coexist, leading to systematic biases in drug concentration prediction and insufficient reliability in the evaluation of combined treatment regimens; Second, the reward function for individual treatment optimization only focuses on the individual's disease recovery progress and milk production recovery, without considering the individual's topological position in the herd transmission chain, causing highly infectious individuals located at the core of the transmission chain to continue spreading the disease to neighboring cattle as a source of transmission before completing treatment, while low-risk individuals at the end of the transmission chain are allocated too many resources, resulting in low overall resource allocation efficiency of the remote diagnosis and treatment system during herd outbreaks. Summary of the Invention

[0004] This invention provides a remote diagnosis and treatment system for dairy cows based on digital twins, which solves the technical problems in related technologies such as the lack of quantitative characterization of disease transmission relationships among individual cattle, the inability to assess the impact of drug interactions on blood drug concentrations under conditions of multiple drugs coexisting, and the failure of treatment resource allocation to take into account both individual disease conditions and the urgency of group transmission.

[0005] This invention discloses a remote diagnosis and treatment system for dairy cows based on digital twins, comprising: The time-varying contact relationship analysis module is configured to generate a time-varying contact relationship adjacency matrix based on cattle herd spatial location data and equipment usage records; The behavioral residual spatiotemporal correlation graph assembly module is configured to assemble a herd behavioral residual spatiotemporal correlation graph based on the behavioral residual vector sequence of each cow and the time-varying contact relationship adjacency matrix. The propagation chain identification and labeling module is configured to input the spatiotemporal correlation graph of the cattle behavior residual into the spatiotemporal graph attention network and output the propagation chain position label and hub centrality component of each node. The transmission urgency assessment module is configured to calculate a normalized transmission urgency score based on the transmission chain location tags, neighbor infection status statistics, and the hub centrality component. The multi-drug coupling kinetics simulation module is configured to retrieve candidate drugs and assemble a drug interaction adjacency matrix to generate a multi-drug coupling kinetics simulator. The hierarchical reinforcement learning treatment optimization module is configured to inject the normalized propagation urgency score into the state input and reward function of the policy network, output the treatment plan, and generate a comprehensive remote diagnosis and treatment report.

[0006] Furthermore, the time-varying contact relationship analysis module performs analysis on each pair of cows within a sliding time window. The cumulative duration of the statistical spatial distance being below the contact threshold Cumulative number of times overlapping with shared device usage time , respectively and After Z-score standardization, the contact strength score is calculated using the following formula: ,in, and These are the weighting coefficients for spatial proximity duration and the number of times the equipment is used; the contact intensity scores of all cow pairs are assembled into a time-varying contact relationship adjacency matrix. , This represents the total number of dairy cows in the herd.

[0007] Furthermore, the behavior residual spatiotemporal correlation graph assembly module obtains the behavior residual vector sequence output by each cow's digital twin, where the behavior residual vector is the difference between the expected behavior parameters predicted by the digital twin and the actual collected behavior parameters; each cow is treated as a graph node, and its behavior residual vector sequence is used as the basis for further processing. As node features, among which This represents the total number of time steps within the time window. The total number of behavioral indicators is represented by the time-varying contact relationship adjacency matrix. As edge weights, assemble the spatiotemporal correlation graph of cattle behavior residuals. , For a set of nodes, The set of edges is used; before assembling the node features, each dimension of the behavior residual vector is standardized using Z-score.

[0008] Furthermore, the spatiotemporal graph attention network includes a spatial graph attention aggregation submodule, which uses the mean vector of the residual vector sequence of each node in the time dimension as the mean vector. As spatial feature input, for nodes with neighboring nodes Calculate the attention coefficient using the following formula: ,in, The spatial feature transformation matrix, The transformed feature dimensions, For attention parameter vectors, This represents a vector concatenation operation. This is the directional consistency adjustment coefficient. The edge weights in the time-varying contact relationship adjacency matrix are used as the basis; the attention coefficients are then softmax normalized over the neighbor set and weighted to aggregate the transformation features of the neighbor nodes, resulting in a spatial aggregated feature vector. .

[0009] Furthermore, the spatiotemporal graph attention network also includes a temporal gating encoding submodule and a propagation chain position classification submodule; the temporal gating encoding submodule aggregates the spatial feature vectors. With nodes The original residual vectors at each time step are concatenated and input into the gated recurrent unit in time step order. The hidden state at the final time step is used as the spatiotemporal joint encoding vector. The propagation chain position classification submodule classifies the spatiotemporal joint encoding vector. After mapping through a fully connected layer, softmax classification is performed, outputting the probability distribution of four types of propagation chain position labels: source node, relay node, terminal node, and unassociated node. The category with the highest probability is selected as the propagation chain position label. From the spatiotemporal joint coding vector Temporal pre-sequence components are obtained by mapping through independent fully connected layers. and hub centrality components ,in This reflects the temporal order in which the residual abnormality of a node appears relative to its neighboring nodes. It reflects the topological importance of the node in the propagation network; individuals whose temporal pre-emergence components exceed a preset threshold and whose propagation chain position label is the source node are identified as suspected propagation sources.

[0010] Furthermore, the transmission urgency assessment module assesses the risk level of each cow awaiting treatment. Calculate the urgency score for dissemination using the following formula: ,in, This is a numerical mapping function for the propagation chain location labels, mapping the source node, relay node, end node, and unassociated node to decreasing preset values ​​respectively. The number of uninfected individuals among the first-order neighbors. This represents the number of infected but untreated individuals among the first-order neighbors. As a hub-central component, , , , These are the weighting coefficients for the corresponding components; each component is standardized using Z-scores before weighted summation; the transmission urgency scores of all cows awaiting treatment are normalized to obtain normalized transmission urgency scores. , Gather the dairy cows awaiting treatment.

[0011] Furthermore, the multi-drug coupling kinetic simulation module retrieves a list of candidate drugs from the candidate drug library based on the comorbidity tags of the dairy cows to be treated, queries the metabolic enzyme competition coefficient and protein binding competition coefficient between any two candidate drugs from the drug interaction coefficient database, and assembles the metabolic enzyme competition coefficient matrix respectively. Protein binding competition coefficient matrix ;for The first of the coexisting drugs The coupled kinetic equation for this drug is: The dynamic adjustment term for the distributed volume is: , For drugs At simulation time Blood drug concentration, For bioavailability, This is the dosage. The absorption rate constant is To eliminate the rate constant, The baseline apparent volume of distribution, For drugs For drugs The competition coefficient of metabolic enzymes. This is the half-maximal inhibitory concentration (MCC) for competitive inhibition of metabolic enzymes. For drugs For drugs The protein binding competition coefficient, This represents the half-maximum displacement concentration for competitive displacement at protein binding sites. The total number of coexisting drugs is given; the multi-drug coupling kinetics simulator receives the dosing regimen as input, solves the coupling kinetic equation through numerical integration, and outputs the blood drug concentration time series of each drug under the condition of multi-drug coexistence.

[0012] Furthermore, the hierarchical reinforcement learning treatment optimization module includes an upper-layer policy network and a lower-layer policy network. The upper-layer policy network is implemented using a multilayer perceptron, and its input state vector is composed of the severity score vector of each comorbidity of the cow and the normalized propagation urgency score. Before concatenation, the severity score vector is Z-score standardized for each dimension, and the network outputs the treatment priority weight vector and resource allocation ratio vector for each disease, and applies a total drug resource budget constraint at the herd-wide level. The lower-layer policy network is implemented using a multilayer perceptron, and its input is the resource allocation ratio vector and the normalized propagation urgency score. For each disease of each cow, it outputs drug selection action, dosage action, and dosing interval action, where the drug selection action is a discrete action, and the dosage action and dosing interval action are continuous actions. The combined dosing action is input into the multi-drug coupling dynamics simulator to obtain the blood drug concentration time series and update the state parameters of each physiological subsystem in the digital twin accordingly.

[0013] Furthermore, the hierarchical reinforcement learning therapy optimization module calculates the composite instantaneous reward value after each simulation time step using the following formula: ,in, Rewards for the progress of treatment of each concurrent symptom are calculated based on the decrease in the severity score of each symptom in the digital twin. This is a penalty for combined toxicity of multiple drugs, calculated based on whether the concentration of each drug exceeds the safe concentration range and then negative; The incentive for milk production recovery is calculated based on the recovery ratio of milk production indicators relative to the baseline level. Rewards for curbing group spread , and These are the normalized communication urgency scores before and after the execution of the treatment action; , , , The weight coefficients for each reward item are defined; each reward item is standardized using Z-score before weighted summation; the upper-layer policy network and the lower-layer policy network are optimized with the cumulative expected reward of their respective layers as the optimization objective, and the parameters are updated using the hierarchical policy gradient algorithm until convergence.

[0014] This invention discloses a method for remote diagnosis and treatment of dairy cows based on digital twins, used to execute the aforementioned remote diagnosis and treatment system for dairy cows based on digital twins, comprising: Step 1: Obtain the spatial location data of the cattle herd and equipment usage records through the time-varying contact relationship analysis module, calculate the contact intensity score for each pair of dairy cows, and generate a time-varying contact relationship adjacency matrix; Step 2: Obtain the behavioral residual vector sequence of each cow through the behavioral residual spatiotemporal correlation graph assembly module, and assemble the herd behavioral residual spatiotemporal correlation graph by combining it with the time-varying contact relationship adjacency matrix; Step 3: Input the spatiotemporal correlation graph of the cattle behavior residuals into the spatiotemporal graph attention network through the propagation chain identification and labeling module, and output the propagation chain position label, hub centrality component and suspected propagation source identifier of each node; Step 4: Calculate and normalize the transmission urgency score for each cow awaiting treatment using the transmission chain location tag, neighbor infection status statistics, and hub centrality component through the transmission urgency assessment module; Step 5: Retrieve candidate drugs based on concurrent symptom tags using the multi-drug coupling kinetics simulation module, assemble the drug interaction adjacency matrix, and generate the multi-drug coupling kinetics simulator; Step 6: The normalized propagation urgency score is injected into the state input and reward function of the policy network through the hierarchical reinforcement learning treatment optimization module. After iterative simulation optimization, the treatment plan is output, a remote diagnosis and treatment comprehensive report is generated and pushed to the remote veterinary diagnosis and treatment terminal.

[0015] The present invention has the following beneficial effects: Firstly, the multi-drug coupled kinetic simulation module transforms the independent ordinary differential equation pharmacokinetic models of each drug into a coupled set of ordinary differential equations based on the drug interaction adjacency matrix. A Michaelis-Menten type nonlinear inhibitory factor dependent on the coexisting drug concentration and the metabolic enzyme competition coefficient matrix is ​​introduced into the clearance term, while a dynamic adjustment term dependent on the coexisting drug concentration and the protein binding competition coefficient matrix is ​​introduced into the distribution volume term. Since the concentration changes of each drug in the coupled ordinary differential equation system are interrelated, when the concentration of one drug increases and inhibits the metabolic clearance of another drug, the concentration curve of the inhibited drug will rise accordingly. This interactive process cannot be reflected in the independent equation model. Therefore, the multi-drug coupled kinetic simulation module overcomes the systematic bias in drug concentration prediction caused by the independent model's neglect of metabolic competition and protein binding competition under multi-drug coexistence conditions. This improves the consistency between the concentration prediction of combination therapy regimens for complications in the simulation environment and actual medication scenarios, thereby enhancing the reliability of treatment regimen evaluation.

[0016] Secondly, the propagation chain identification and labeling module extracts the propagation chain association embedding vectors of each node from the spatiotemporal correlation graph of the cattle herd behavior residuals through a spatiotemporal graph attention network, and maps the propagation chain position label, hub centrality component, and temporal pre-emptive component from these vectors. The propagation urgency assessment module calculates a normalized propagation urgency score based on the above outputs and injects it into the input state and composite immediate reward function of the upper-layer policy network in the hierarchical reinforcement learning framework. Since the normalized propagation urgency score participates in both state representation and reward calculation, the individual treatment optimization process can perceive the individual's topological position in the cattle herd propagation chain and its contribution to the group's propagation dynamics when generating a dosing regimen. Individuals at the core hub position of the propagation chain are prioritized in resource allocation due to their higher normalized propagation urgency scores, and their infectious diseases receive higher treatment priority weights, thereby accelerating the reduction of their infectivity and decreasing the continued spread to neighboring cattle. Low-risk individuals at the end of the propagation chain receive appropriate resources as needed, avoiding excessive resource concentration on individuals with low propagation contributions. Therefore, this invention overcomes the inefficiency of resource allocation caused by the isolation between individual treatment optimization and group transmission control, enabling remote diagnosis and treatment systems to simultaneously achieve the dual goals of individual cure progress and group transmission containment in complex scenarios of infectious disease outbreaks accompanied by complications. Attached Figure Description

[0017] Figure 1 This is a flowchart of a remote diagnosis and treatment method for dairy cows based on digital twins provided in an embodiment of the present invention; Figure 2 This is a schematic diagram showing the comparison of contact intensity scores between dairy cows according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the comparison of behavioral residual vectors of four dairy cows (time step T4) provided in an embodiment of the present invention; Figure 4 This is a schematic diagram showing the comparison of temporal precession and hub centrality components in the propagation chain identification results provided by an embodiment of the present invention. Figure 5 This is a schematic diagram of the normalized propagation urgency scores of four dairy cows provided in an embodiment of the present invention; Figure 6 This is a schematic diagram comparing the blood drug concentrations of drug A in coupled simulation and independent simulation provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the data flow architecture of the remote diagnosis and treatment system module provided in this embodiment of the invention; Figure 8 This is a schematic diagram of the cow 001 attention aggregation and propagation chain recognition flowchart provided in the embodiment of the present invention; Figure 9 This is a schematic diagram showing the decrease in the dosage of mastitis medication and the expected rate of spread of the disease in the treatment plan for four dairy cows provided in this embodiment of the invention. Detailed Implementation

[0018] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.

[0019] At least one embodiment of the present invention discloses a remote diagnosis and treatment system for dairy cows based on digital twins, and the method flow executed by the system is as follows: Figure 1 The system includes the following modules: Time-varying contact relationship analysis module: configured to acquire spatial location data of cattle herds and equipment usage records, calculate the contact intensity score for each pair of dairy cows, and generate a time-varying contact relationship adjacency matrix.

[0020] The time-varying contact relationship analysis module obtains the current physiological state vector of each dairy cow's digital twin and the list of diagnosed concurrent disease labels in the herd. At the same time, it obtains the herd's spatial location data and equipment usage records from the cowshed management system. The equipment usage records include the usage timestamps of shared facilities such as water troughs, feed troughs, and milking equipment.

[0021] Within the sliding time window, for each pair of cows The contact strength score is calculated by weighting and summing the cumulative duration of when the spatial distance is below the contact threshold and the cumulative number of times the usage time of shared devices overlaps. : in, For dairy cows With cows The cumulative duration during which the spatial distance is below the contact threshold within the current time window. This represents the cumulative number of times the usage time of the shared device overlaps between the two parties. and These are the weighting coefficients for spatial proximity duration and the number of times the device is used, respectively. Because... The dimension is time. The dimension of is the degree, and the two have different dimensions. Before weighted summation, they are respectively... and Z-score standardization was performed to eliminate the influence of dimensional differences on the weighted summation result. The contact intensity scores of all cow pairs were assembled into a time-varying contact relationship adjacency matrix. ,in The total number of dairy cows in the herd, matrix elements Represents dairy cows With cows The contact intensity score within the current time window.

[0022] Cattle behavior residual spatiotemporal correlation graph assembly module: configured to obtain the behavior residual vector sequence and the time-varying contact relationship adjacency matrix, and assemble the cattle behavior residual spatiotemporal correlation graph.

[0023] The cattle behavior residual spatiotemporal correlation graph assembly module obtains the behavior residual vector sequence output by each cow's digital twin within the current time window. The behavior residual vector is the difference between the expected behavior parameters predicted by the digital twin and the actual collected behavior parameters. Each cow contains [a sequence of behavior residuals] within the time window. The residual vector at each time step, where The dimension of each residual vector is the total number of time steps within the time window. ,in The total number of behavioral indicators represents the degree of deviation of each behavioral indicator (such as gait frequency, rumination frequency, and recumbent duration) at this time step. Since the dimensions of each behavioral indicator are different, Z-score standardization is performed on each dimension of the behavioral residual vector before assembling the node features to eliminate the influence of the difference in dimensions of different behavioral indicators on subsequent feature calculations.

[0024] Each cow is treated as a graph node, and its behavior is a sequence of residual vectors. As node features, among which , , dairy cows In the , No. , No. The behavioral residual vector at each time step, expressed as a time-varying contact relation adjacency matrix. As edge weights, assemble the spatiotemporal correlation graph of cattle behavior residuals. ,in For a set of nodes, Let it be the set of edges.

[0025] The propagation chain identification and labeling module is configured to input the spatiotemporal correlation graph of cattle behavior residuals into the spatiotemporal graph attention network, extract the propagation chain correlation embedding vector, and label the propagation chain location label and suspected propagation source identifier.

[0026] The propagation chain identification and labeling module inputs the spatiotemporal correlation graph of cattle behavior residuals into the spatiotemporal graph attention network for processing. The spatiotemporal graph attention network is a network structure defined for identifying the propagation chain of infectious diseases, comprising the following sub-modules and their data transmission relationships: Spatial Graph Attention Aggregation Submodule: For each node in the graph The mean vector of the residual vector sequence in the time dimension. As the spatial feature input of this node, This represents the total number of time steps within the time window. For nodes... It contacts neighboring nodes Calculate the cross-individual residual direction consistency attention coefficient: in, The spatial feature transformation matrix, The transformed feature dimensions, For attention parameter vectors, Indicates transpose. This represents a vector concatenation operation. This is the directional consistency adjustment coefficient. The edge weights are the corresponding edge weights in the time-varying contact relationship adjacency matrix. and All The two vectors have the same dimension for their inner product operation. The second term of the attention coefficient is calculated by multiplying the cosine similarity of the mean vectors of the residuals of the two nodes by the contact strength, so that node pairs with similar residual deviation directions and close contact receive higher attention weights. The attention coefficient is applied to nodes... Neighbor set Softmax normalization is performed on the above, and the normalized attention coefficient is: in, For nodes For neighboring nodes The normalized attention coefficient, Represents an exponential function. For neighbor set The traversal indexes of each neighbor node are used. The transformation features of the neighbor nodes are weighted and aggregated to obtain the spatial aggregation features. in, For nodes Spatial aggregated feature vectors.

[0027] Temporal gated coding submodule: aggregates spatial feature vectors With nodes The original residual vector at each time step After splicing, the data is input into the gated recurrent unit (GRU) in time step sequence. The GRU processes the data at each time step. The input is The GRU captures the temporal sequence of residual anomalies and their temporal correspondence patterns with contacting neighbor residual anomalies in the time dimension. At the final time step... The hidden state is used as the spatiotemporal joint encoding vector of this node. ,in Hides the state dimension for GRU.

[0028] Propagation chain location classification submodule: Spatiotemporal joint encoding vector After mapping to a four-dimensional output vector through a fully connected layer, softmax classification is performed to output the probability distribution of four types of propagation chain position labels: source node, relay node, terminal node, and unrelated node. The category with the highest probability is taken as the propagation chain position label of that node. Simultaneously, from the spatiotemporal joint encoding vector The temporal pre-sequence components are obtained by mapping to scalar values ​​through an independent fully connected layer. Temporal pre-concurrency components This reflects the temporal order in which the residual abnormality of a node appears relative to its neighboring nodes. A larger value indicates that the residual abnormality of this node appears earlier than its neighboring nodes in time; individuals whose temporal pre-occurrence component exceeds a preset threshold and whose propagation chain position label is the source node are identified as suspected propagation sources. Simultaneously, from the spatiotemporal joint encoding vector... The hub centrality component is obtained by mapping to scalar values ​​through an independent fully connected layer. Hub centrality component This reflects the topological importance of the node in the propagation network, where A larger value indicates that the node has more high-contact-strength neighbors connected in the propagation network. The propagation chain location classification submodule ultimately outputs the propagation chain association embedding vector for each node. Transmission chain location tags Hub-centric components And identification of suspected sources of transmission.

[0029] The spatiotemporal graph attention network uses historical cattle behavior residual spatiotemporal correlation graphs labeled with propagation chain positions as training data, and the input is the cattle behavior residual spatiotemporal correlation graph. The output is the probability distribution of the propagation chain position label and the temporal precedence component for each node. and hub centrality components The Adam optimization algorithm is used for end-to-end training, with the loss function being the weighted sum of the multi-class cross-entropy loss of the propagation chain position label, the regression mean square error loss of the temporal prior component, and the regression mean square error loss of the hub centrality component.

[0030] Transmission urgency assessment module: Configured to calculate and normalize the transmission urgency score for each cow awaiting treatment based on transmission chain location tags, neighbor infection status statistics, and hub centrality components.

[0031] For each cow awaiting treatment The propagation urgency assessment module obtains the location label of its propagation chain. Number of uninfected individuals among first-order neighbors The number of individuals in the first-order neighborhood who are infected but not receiving treatment and hub-centric components .

[0032] The urgency score for dissemination is calculated by weighted summation: in, The numerical mapping function for the propagation chain position labels maps the source node, relay node, end node, and unassociated node to decreasing preset values ​​respectively. , , , These are the weighting coefficients for the transmission chain location value, the number of uninfected neighbors, the number of untreated infected neighbors, and the hub centrality component, respectively. For dairy cows The urgency score for dissemination. Due to For preset discrete mapping values, and For count values, The output of the neural network is a continuous scalar, with each component having a different numerical range. Before weighted summation, each component is processed separately... , , and Z-score standardization is performed to eliminate the influence of differences in the numerical range of each component on the weighted summation result.

[0033] The transmission urgency scores of all cows awaiting treatment were normalized to obtain normalized transmission urgency scores. ,in Gather the cows awaiting treatment. For the treatment of dairy cows The traversal index of each individual is used. The normalized propagation urgency score is passed as a constraint parameter for group-level treatment resource allocation to the subsequent treatment optimization process.

[0034] Multi-drug coupling kinetics simulation module: configured to retrieve candidate drug sets based on concurrent symptom labels, query drug interaction coefficients and assemble drug interaction adjacency matrices to generate individualized multi-drug coupling kinetics simulators.

[0035] For each cow to be treated, the multi-drug coupling kinetics simulation module performs the following processing: Candidate drug retrieval submodule: Based on the cow's list of concurrent symptom tags, it retrieves a set of available drugs covering each symptom from the candidate drug database to obtain a candidate drug list for that individual. The total number of candidate drugs is [number missing]. .

[0036] Drug interaction matrix assembly submodule: Queries any two candidate drugs from the drug interaction coefficient database. The interaction type labels and interaction intensity coefficients between them, among which and These are drug indices from the candidate drug list, with interaction type labels including two categories: competitive inhibition of metabolic enzymes and competition for plasma protein binding sites. An assembled drug interaction adjacency matrix is ​​then created, containing a matrix of metabolic enzyme competition coefficients. Protein binding competition coefficient matrix ,in Indicates drug For drugs The intensity of competitive inhibition of metabolic enzymes, Indicates drug For drugs The intensity of competitive substitution at plasma protein binding sites.

[0037] Coupled Kinetic Equation Generation Submodule: Transforms the independent ordinary differential equations and pharmacokinetic equation sets for each drug into a coupled ordinary differential equation set. For The first of the coexisting drugs Drugs ( Its coupled dynamic equations are: The dynamic adjustment term for the distributed volume is: The symbols in the above formula are defined as follows: For drugs At simulation time Blood drug concentration; For drugs Bioavailability; For drugs Dosage; For drugs The absorption rate constant; For drugs Elimination rate constant under monotherapy conditions; For drugs The baseline apparent distribution volume; For drugs For drugs The metabolic enzyme competition coefficients are derived from the metabolic enzyme competition coefficient matrix. ; For drugs For drugs The half-maximal inhibitory concentration (MCC) of a metabolic enzyme in competitive inhibition; For drugs For drugs The protein binding competition coefficient is derived from the protein binding competition coefficient matrix. ; For drugs For drugs Half-maximum displacement concentration of protein binding sites in competitive displacement; This represents the total number of drugs coexisting with this individual; in the two summation formulas... All are except the first A traversal index of the coexisting drugs other than the first drug.

[0038] In the clearance rate term, the nonlinear inhibition factor in the denominator Using the Michaelis-Menten type saturation function form: when coexisting drugs concentration When the level increases, the nonlinear inhibitory factor increases, causing the drug to... The reduced effective elimination rate reflects the reduced effect of metabolic enzymes on the drug after they are competitively occupied by coexisting drugs. The inhibitory effect on metabolic capacity. In the volume of distribution term, the protein binding competition adjustment term increases as the concentration of coexisting drugs rises. Increased size reflects the drug's reaction after plasma protein binding sites are competitively replaced by coexisting drugs. The change in apparent volume of distribution caused by an increase in the free fraction.

[0039] The coupled ordinary differential equations and their corresponding pharmacokinetic parameters and drug interaction coefficients are generated into an individualized multi-drug coupled kinetic simulator. The multi-drug coupled kinetic simulator receives the dosing regimen (including drug selection, dosage and dosing interval) as input, solves the coupled ordinary differential equations through numerical integration, and outputs the blood drug concentration time series of each drug under the condition of multi-drug coexistence.

[0040] Hierarchical reinforcement learning treatment optimization module: Configured to collaboratively optimize the treatment priority and specific dosing regimen for each complication within a hierarchical reinforcement learning framework, generate a comprehensive remote diagnosis and treatment report, and push it to the remote veterinary diagnosis and treatment terminal.

[0041] The hierarchical reinforcement learning treatment optimization module performs collaborative optimization of treatment plans within a hierarchical reinforcement learning framework. This framework consists of two layers: an upper-level policy network and a lower-level policy network. It also obtains environmental feedback by interacting with a digital twin through a multi-drug coupled dynamics simulator.

[0042] Upper-layer policy network submodule: The upper-layer policy network is implemented using a multilayer perceptron (MLP). Its input state vector consists of the severity score vector of each comorbidity of the cow and the normalized propagation urgency score. The system is assembled to output the treatment priority weight vector and resource allocation ratio vector for each disease in the dairy cow. Since the numerical ranges of the severity score vector dimensions differ from those of the normalized transmission urgency score, Z-score standardization is performed on each dimension of the severity score vector before assembly to ensure that the numerical ranges of each component are consistent with the normalized transmission urgency score. Because the normalized transmission urgency score, as a component of the state vector, directly participates in policy decision-making, the treatment priority weights for infectious diseases (such as infectious mastitis) of individuals with higher transmission urgency scores are increased during training, ensuring that infectious diseases at the transmission chain hub nodes receive priority treatment resources. Simultaneously, a total drug resource budget constraint is imposed at the herd-wide level, ensuring that the sum of the resource allocation ratios for all individuals awaiting treatment does not exceed the total budget limit.

[0043] Lower-level policy network submodule: The lower-level policy network is also implemented using an MLP. Its input is the resource allocation ratio vector and normalized propagation urgency score output by the upper-level policy network. For each cow and each disease, specific drug selection, dosage, and dosing interval actions are output. The combined dosing actions for each disease are input into a multi-drug coupled kinetic simulator. The coupled ordinary differential equations are solved through numerical integration to obtain the blood drug concentration time series under multi-drug coexistence conditions, and the state parameters of each physiological subsystem in the digital twin are updated accordingly. Specifically, the drug selection action is a discrete action, determined from the candidate drug list through an argmax operation; the dosage and dosing interval actions are continuous actions, transformed linearly to preset dosage and dosing interval ranges to serve as the specific parameters of the dosing regimen.

[0044] Composite Instant Reward Calculation Submodule: Calculates the composite instant reward value after each simulation time step. : in, Rewards for the progress of treatment of each concurrent symptom are calculated based on the decrease in the severity score of each symptom in the digital twin. This is a multi-drug combined toxicity penalty term, calculated based on whether the concentrations of each drug output by the multi-drug coupled kinetics simulator exceed the safe concentration range, and a negative value is taken. The reward for milk production recovery is calculated based on the recovery ratio of milk production indicators in the digital twin relative to the baseline level; Rewards for containing group transmission are based on the individual's normalized transmission urgency score after treatment. The calculation of the decrease relative to the pre-treatment level is specifically based on the individual's normalized communication urgency score before the treatment action was performed. The normalized propagation urgency score, recalculated after execution, is: ,but ; , , , These are the weighting coefficients for each reward item. Because... , , , Since the numerical ranges of each item are different, Z-score standardization is performed on each reward item before weighted summation to eliminate the impact of the differences in the numerical ranges of each item on the weighted summation result.

[0045] The strategy iteration and report generation submodule iteratively executes multiple rounds of group-level simulation trajectory sampling. In each round of simulation, the upper-level policy network and the lower-level policy network generate treatment action sequences for all cows to be treated. The simulation is performed using a multi-drug coupled dynamics simulator and a digital twin, and the composite immediate reward signal is collected. The upper-level and lower-level policy networks optimize the parameters of their respective levels using the cumulative expected reward, and the hierarchical policy gradient algorithm is used to update the parameters of the two policy networks until the cumulative expected value of the composite immediate reward converges.

[0046] After the strategy network parameters converge, a comprehensive remote diagnosis and treatment report is generated. This report includes: treatment priority ranking for each individual, drug regimens and dosage timing for each disease, expected blood drug concentration curves for each drug under multi-drug co-occurrence conditions, suspected source of transmission identifiers, a list of high-risk individuals awaiting infection, and an estimated effectiveness in containing group transmission. The comprehensive remote diagnosis and treatment report is then pushed to the remote veterinary diagnosis and treatment terminal.

[0047] This invention transforms the independent ordinary differential equation pharmacokinetic models of each drug into a coupled set of ordinary differential equations based on the drug interaction adjacency matrix. A Michaelis-Menten-type nonlinear inhibitory factor dependent on the coexisting drug concentration and the metabolic enzyme competition coefficient matrix is ​​introduced into the clearance term. A dynamic adjustment term dependent on the coexisting drug concentration and the protein binding competition coefficient matrix is ​​introduced into the distribution volume term. This allows drug concentration simulation in a digital twin environment to reflect the interactive effects of metabolic enzyme competitive inhibition and plasma protein binding site competition when multiple drugs coexist. Because the concentration changes of each drug in the coupled ordinary differential equation set are interrelated, when the concentration of one drug increases and inhibits the metabolic clearance of another drug, the concentration curve of the inhibited drug will rise accordingly. This interactive process cannot be reflected in the independent equation model. Therefore, the multi-drug coupled kinetic simulator overcomes the systematic bias in drug concentration prediction caused by the independent model neglecting metabolic competition and protein binding competition under multi-drug coexistence conditions. This improves the consistency between the concentration prediction of combination therapy regimens for complications in the simulation environment and actual medication scenarios, thereby enhancing the reliability of treatment regimen evaluation.

[0048] Simultaneously, this implementation extracts the propagation chain association embedding vectors of each node from the spatiotemporal correlation graph of cattle behavior residuals using a spatiotemporal graph attention network. Propagation chain position labels, hub centrality components, and temporal pre-emptive components are mapped from these vectors. A normalized propagation urgency score is calculated based on the propagation chain position labels, neighbor infection status statistics, and hub centrality components. This score is then injected into the input state and composite immediate reward function of the upper-level policy network in the hierarchical reinforcement learning framework. Since the normalized propagation urgency score participates in both the state representation and reward calculation of the upper-level policy network, the individual treatment optimization process can perceive the individual's topological position in the cattle propagation chain and its contribution to the group's propagation dynamics when generating a dosing regimen. Individuals at the core hub position of the propagation chain are prioritized in resource allocation due to their higher normalized propagation urgency scores, and their infectious diseases receive higher treatment priority weights, thereby accelerating the reduction of their infectivity and decreasing the continued spread to neighboring cattle. Low-risk individuals at the end of the propagation chain receive appropriate resources as needed, avoiding excessive resource concentration on individuals with low propagation contributions. Therefore, this implementation overcomes the inefficiency of resource allocation caused by the isolation between individual treatment optimization and group transmission control, enabling the remote diagnosis and treatment system to simultaneously achieve the dual goals of individual cure progress and group transmission containment in complex scenarios of infectious disease outbreaks accompanied by complications.

[0049] See Figures 2-9 The following application examples are proposed: A large-scale dairy farm (hereinafter referred to as "Ranch A") has 120 lactating dairy cows. During the monitoring period in the autumn of 20XX, an outbreak of infectious mastitis was detected in section B of the cowshed. Among them, 5 cows were diagnosed with ketosis complicated by infectious mastitis (individuals with complications), and another 3 cows were diagnosed with infectious mastitis only (individuals with a single symptom). The remote diagnosis and treatment system initiated a collaborative optimization process for 8 cows in section B awaiting treatment. The following uses 4 representative cows (numbered cow 001 to cow 004) as examples to illustrate the complete data flow process. Cow 001 and cow 002 are in adjacent pens in the cowshed and share the same water trough. Cow 003 is in a relatively independent pen. Cow 004 has shared equipment records with cows 001 and 002.

[0050] Time-varying contact relationship analysis module: Within the current 24-hour sliding time window, the system collects the spatial location trajectories of each dairy cow from the barn sensor network and extracts usage timestamp records of water troughs, feed troughs, and milking equipment from the barn management system. The system also calculates the cumulative spatial duration for each of the six pairs of four dairy cows. (Unit: minutes) Number of overlaps with equipment (Unit: times). Regarding and After Z-score standardization, take , ,according to Calculate the contact strength score (in the formula here) and (All values ​​are standardized), assembling a time-varying contact relationship adjacency matrix. .

[0051] Table 1. Raw statistics and contact intensity scores of dairy cows. The contact strength score between cow 001 and cow 002 was the highest (1.41), while the contact strength score between cow 003 and the other individuals was negative, reflecting its relatively isolated enclosure layout. The scores of the six pairs were filled in. The corresponding position (the matrix is ​​symmetric, and the diagonal is 0).

[0052] Cattle behavior residual spatiotemporal correlation graph assembly module: Take within the time window Each time step (6 hours apart) represents a behavioral indicator dimension for each cow. (Gait frequency, rumination frequency, and recumbent duration). The difference between the expected behavioral parameters and the actual collected values ​​output by each digital twin is used to form a sequence of behavioral residual vectors; each dimension is standardized by Z-score and used as node features.

[0053] Table 2 Residual vectors of behavior of 4 dairy cows (standardized, time step T4) The residual amplitudes of cows 001 and 002 are the largest, reflecting the cumulative effect of the dual symptoms on behavior. The behavioral residual vector sequences of each cow are used as a basis for further analysis. As node features, as obtained from Table 1 As edge weights, assemble the spatiotemporal correlation graph of cattle behavior residuals. Node set It contains 4 nodes and an edge set. It contains 6 weighted edges.

[0054] Propagation chain identification and marking module: The spatiotemporal correlation graph of cattle behavior residuals is input into the spatiotemporal graph attention network. Taking cow 001 as an example, the calculation process of the spatial graph attention aggregation submodule is illustrated: the mean vector of cow 001... (Average over 4 time steps), its neighbor set .

[0055] Taking the attention coefficient of cow001 to cow002 as an example, cosine similarity The residual directions of the two nodes are highly consistent, combined with the contact strength. The directional consistency term contributes significantly. After softmax normalization, the normalized attention coefficients of New001 on New002... For cow 004 For cow 003 The spatial aggregation characteristics of cow001 mainly come from the contributions of cow002 and cow004.

[0056] The temporal gating coding submodule aggregates spatial features. After concatenation with the original residual vectors at each time step, the data is sequentially input into the GRU (hidden state dimension). ), GRU in Output spatiotemporal joint coding vector after time step The propagation chain location classification submodule outputs the following results for each node: Table 3 Output results of the propagation chain identification and marking module The temporal pre-emergence component of cow001 (2.17) exceeds the preset threshold (1.80) and is labeled as a source node, thus it is identified as a suspected propagation source. The hub centrality component of cow003 is the lowest (0.31), consistent with its isolation column layout.

[0057] Dissemination urgency assessment module: For 4 dairy cows awaiting treatment, the location label numerical mapping function Map the source node, relay node, end node, and unassociated node to 4, 3, 2, and 1, respectively. Calculate the infection status of each cow's first-order neighbors from the adjacency matrix: among cow 001's first-order neighbors (cow 002, cow 003, cow 004), the uninfected neighbors... Untreated infection of neighbors .right , , , After Z-score standardization, take , , , Calculate the urgency score for dissemination. Press again Normalization.

[0058] Table 4. Results of the assessment of the urgency of the spread The highest normalized propagation urgency score was found in cow001 (0.41), while that of cow003 was the lowest (0.01), reflecting the low priority of individuals at the end of the propagation chain in resource allocation. The sum of the normalized scores was 1.00, which was passed as a constraint parameter to the hierarchical reinforcement learning therapy optimization module.

[0059] Multi-drug coupling kinetics simulation module: Taking bovine 001 (ketosis complicated with infectious mastitis) as an example, the candidate drug retrieval submodule retrieves three candidate drugs from the candidate drug database based on its comorbidity tag: Drug A (β-lactam antibiotic, for mastitis), Drug B (propylene glycol preparation, for ketosis), and Drug C (nonsteroidal anti-inflammatory drug, for adjuvant anti-inflammatory purposes). The total number of candidate drugs is [not specified]. .

[0060] The drug interaction matrix assembly submodule queries the drug interaction coefficient database and assembles the metabolic enzyme competition coefficient matrix. Protein binding competition coefficient matrix : Table 5. Drug interaction coefficient matrix (Newton 001, ...) ) Taking drug A as an example, the coupled kinetic equation generation submodule contains a nonlinear inhibition factor in the denominator of the clearance term in its coupled kinetic equation: When drug C concentration When the concentration of drug A increases, the aforementioned inhibitory factors increase, the effective elimination rate of drug A decreases, and the blood concentration of drug A increases accordingly. This interaction effect cannot be reflected in the independent equation model. The dynamic adjustment term for the volume of distribution is: Individualized pharmacokinetic parameters of bovine 001 ( , , , ), together with the drug interaction coefficient, generate a Newton 001 individualized multi-drug coupling kinetics simulator.

[0061] Table 6. Comparison of blood drug concentrations between drug-coupled simulation and independent simulation (key time points after drug administration) The coupled model predicts the concentration at 6 hours (2.63). The value is higher than that of the independent model (2.14). The deviation reached 0.49. The independent model reflects the competitive inhibitory effect of drug C on the metabolism of drug A; however, it underestimates the actual blood concentration of drug A and exhibits systematic bias.

[0062] Hierarchical reinforcement learning therapy optimization module: Taking the ox 001 as an example, the upper-level policy network submodule's input state vector consists of a Z-score-standardized complication severity score vector (mastitis severity 0.87, ketosis severity 0.63, standardized to 1.24 and 0.71 respectively) and a normalized transmission urgency score. The network is composed of multiple parts, with an input dimension of 3. The upper-level policy network outputs a priority weight of 0.68 for mastitis treatment, 0.32 for ketoacidosis treatment, and a resource allocation ratio of 0.41 (which is consistent with...). Consistent, subject to overall budget constraints). Due to The highest priority weight for mastitis treatment is given to cow 001 among all individuals awaiting treatment, and infectious diseases receive priority in resource allocation.

[0063] The lower-level strategy network submodule receives the output from the upper layer. For mastitis in bovine 001, it outputs the dosage action (22 mg / kg after linear mapping to the dosage range) and dosing interval (12 hours) for drug A. For ketosis, it outputs the dosage action (250 mL / dose) and dosing interval (24 hours) for drug B. The combined dosing actions (drugs A, B, and C) are input into a multi-drug coupled kinetic simulator. The coupled ordinary differential equations are solved numerically to obtain the time series of blood drug concentrations for each drug. Based on this, the state parameters of physiological subsystems such as mammary glands and metabolism in the bovine 001 digital twin are updated.

[0064] The composite immediate reward calculation submodule calculates the composite immediate reward for cow 001 at the current simulation time step: mastitis severity score decreases by 0.12, ketosis severity score decreases by 0.07, milk yield recovers to 43% of baseline, and normalized spread urgency score decreases from 0.41 to 0.34. After standardization of the Z-scores of each component, according to... Pick , , , All drug concentrations were within the safe range. (Penalty is 0), calculated as follows .

[0065] After multiple rounds of group-level simulation trajectory sampling, the parameters of the upper and lower layer policy networks converge, ultimately generating a comprehensive remote diagnosis and treatment report.

[0066] Table 7 Core Contents of the Comprehensive Remote Diagnosis and Treatment Report (4 Dairy Cows) The comprehensive report also identified cow 001 as a suspected source of transmission, listed cows 002 and 004 as high-risk neighbors to be infected, and attached the expected blood drug concentration curves for each drug, which were then pushed to the remote veterinary diagnosis and treatment terminal.

[0067] The entire data flow process demonstrates a clear logical progression between modules: the contact intensity score matrix generated by the time-varying contact relationship analysis module serves as the edge weight of the graph, which, together with the behavioral residual vector sequence, constitutes the spatiotemporal correlation graph of cattle herd behavior residuals; the spatiotemporal graph attention network extracts the propagation chain position labels and hub centrality components of each node from this graph, driving the propagation urgency assessment module to output a normalized score; the normalized propagation urgency score is simultaneously injected into the state input and composite immediate reward function of the upper-level policy network, ensuring that individual combined treatment optimization always perceives the group propagation topology; the multi-drug coupling dynamics simulator replaces independent equations with coupled ordinary differential equations, ensuring that the blood drug concentration feedback obtained by the lower-level policy network in the simulation environment can reflect the interaction effect of metabolic competition and protein binding competition, thus enabling the final generated remote diagnosis and treatment comprehensive report to have reliable decision-making basis in both the individual cure progress and the group propagation containment dimensions.

[0068] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. A remote diagnosis and treatment system for dairy cows based on digital twins, characterized in that, include: The time-varying contact relationship analysis module is configured to generate a time-varying contact relationship adjacency matrix based on cattle herd spatial location data and equipment usage records; The behavioral residual spatiotemporal correlation graph assembly module is configured to assemble a herd behavioral residual spatiotemporal correlation graph based on the behavioral residual vector sequence of each cow and the time-varying contact relationship adjacency matrix. The propagation chain identification and labeling module is configured to input the spatiotemporal correlation graph of the cattle behavior residual into the spatiotemporal graph attention network and output the propagation chain position label and hub centrality component of each node. The transmission urgency assessment module is configured to calculate a normalized transmission urgency score based on the transmission chain location tags, neighbor infection status statistics, and the hub centrality component. The multi-drug coupling kinetics simulation module is configured to retrieve candidate drugs and assemble a drug interaction adjacency matrix to generate a multi-drug coupling kinetics simulator. The hierarchical reinforcement learning treatment optimization module is configured to inject the normalized propagation urgency score into the state input and reward function of the policy network, output the treatment plan, and generate a comprehensive remote diagnosis and treatment report.

2. The remote diagnosis and treatment system for dairy cows based on digital twins according to claim 1, characterized in that, The time-varying contact relationship analysis module analyzes each pair of cows within a sliding time window. The cumulative duration of the statistical spatial distance being below the contact threshold Cumulative number of times overlapping with shared device usage time , respectively and After Z-score standardization, the contact strength score is calculated using the following formula: in, and These are the weighting coefficients for spatial proximity duration and the number of times the equipment is used; the contact intensity scores of all cow pairs are assembled into a time-varying contact relationship adjacency matrix. , This represents the total number of dairy cows in the herd.

3. The remote diagnosis and treatment system for dairy cows based on digital twins according to claim 1, characterized in that, The behavior residual spatiotemporal correlation graph assembly module obtains the behavior residual vector sequence output by each cow's digital twin. The behavior residual vector is the difference between the expected behavior parameters predicted by the digital twin and the actual collected behavior parameters. Each cow is treated as a graph node, and its behavior residual vector sequence... As node features, among which This represents the total number of time steps within the time window. The total number of behavioral indicators is represented by the time-varying contact relationship adjacency matrix. As edge weights, assemble the spatiotemporal correlation graph of cattle behavior residuals. , For a set of nodes, The set of edges is used; before assembling the node features, each dimension of the behavior residual vector is standardized using Z-score.

4. The remote diagnosis and treatment system for dairy cows based on digital twins according to claim 1, characterized in that, The spatiotemporal graph attention network includes a spatial graph attention aggregation submodule, which uses the mean vector of the residual vector sequence of each node as the time dimension. As spatial feature input, for nodes with neighboring nodes Calculate the attention coefficient using the following formula: in, The spatial feature transformation matrix, The transformed feature dimensions, For attention parameter vectors, This represents a vector concatenation operation. This is the directional consistency adjustment coefficient. The edge weights in the time-varying contact relationship adjacency matrix are used as the basis; the attention coefficients are then softmax normalized over the neighbor set and weighted to aggregate the transformation features of the neighbor nodes, resulting in a spatial aggregated feature vector. .

5. The remote diagnosis and treatment system for dairy cows based on digital twins according to claim 4, characterized in that, The spatiotemporal graph attention network further includes a temporal gating coding submodule and a propagation chain position classification submodule; the temporal gating coding submodule aggregates the spatial feature vectors. With nodes The original residual vectors at each time step are concatenated and input into the gated recurrent unit in time step order. The hidden state at the final time step is used as the spatiotemporal joint encoding vector. ; The propagation chain location classification submodule performs spatiotemporal joint encoding on the vector. After mapping through a fully connected layer, softmax classification is performed, outputting the probability distribution of four types of propagation chain position labels: source node, relay node, terminal node, and unassociated node. The category with the highest probability is selected as the propagation chain position label. From the spatiotemporal joint coding vector Temporal pre-sequence components are obtained by mapping through independent fully connected layers. and hub centrality components ,in This reflects the temporal order in which the residual abnormality of a node appears relative to its neighboring nodes. It reflects the topological importance of the node in the propagation network; individuals whose temporal pre-emergence components exceed a preset threshold and whose propagation chain position label is the source node are identified as suspected propagation sources.

6. The remote diagnosis and treatment system for dairy cows based on digital twins according to claim 1, characterized in that, The transmission urgency assessment module assesses the severity of transmission for each cow awaiting treatment. Calculate the urgency score for dissemination using the following formula: in, This is a numerical mapping function for the propagation chain location labels, mapping the source node, relay node, end node, and unassociated node to decreasing preset values ​​respectively. The number of uninfected individuals among the first-order neighbors. This represents the number of infected but untreated individuals among the first-order neighbors. As a hub-central component, , , , These are the weighting coefficients for the corresponding components; each component is standardized using Z-scores before weighted summation; the transmission urgency scores of all cows awaiting treatment are normalized to obtain normalized transmission urgency scores. , Gather the dairy cows awaiting treatment.

7. The remote diagnosis and treatment system for dairy cows based on digital twins according to claim 1, characterized in that, The multi-drug coupling kinetics simulation module retrieves a list of candidate drugs from a candidate drug library based on the comorbidity tags of the dairy cows to be treated, queries the metabolic enzyme competition coefficient and protein binding competition coefficient between any two candidate drugs from the drug interaction coefficient database, and assembles a metabolic enzyme competition coefficient matrix respectively. Protein binding competition coefficient matrix ;for The first of the coexisting drugs The coupled kinetic equation for this drug is: The dynamic adjustment term for the distributed volume is: For drugs At simulation time Blood drug concentration, For bioavailability, This is the dosage. The absorption rate constant is To eliminate the rate constant, The baseline apparent volume of distribution, For drugs For drugs The competition coefficient of metabolic enzymes. This is the half-maximal inhibitory concentration (MCC) for competitive inhibition of metabolic enzymes. For drugs For drugs The protein binding competition coefficient, This represents the half-maximum displacement concentration for competitive displacement at protein binding sites. The total number of coexisting drugs is given; the multi-drug coupling kinetics simulator receives the dosing regimen as input, solves the coupling kinetic equation through numerical integration, and outputs the blood drug concentration time series of each drug under the condition of multi-drug coexistence.

8. The remote diagnosis and treatment system for dairy cows based on digital twins according to claim 1, characterized in that, The hierarchical reinforcement learning treatment optimization module includes an upper-layer policy network and a lower-layer policy network. The upper-layer policy network is implemented using a multilayer perceptron. Its input state vector is composed of the severity score vector of each complication of the cow and the normalized propagation urgency score. Before concatenation, the severity score vector is Z-score standardized for each dimension, and the network outputs the treatment priority weight vector and resource allocation ratio vector for each disease, while applying a total drug resource budget constraint at the herd-wide level. The lower-layer policy network is also implemented using a multilayer perceptron. Its input is the resource allocation ratio vector and the normalized propagation urgency score. For each disease of each cow, it outputs drug selection action, dosage action, and dosing interval action, where the drug selection action is a discrete action, and the dosage action and dosing interval action are continuous actions. The combined dosing action is input into the multi-drug coupling kinetics simulator to obtain the blood drug concentration time series and update the state parameters of each physiological subsystem in the digital twin accordingly.

9. The remote diagnosis and treatment system for dairy cows based on digital twins according to claim 8, characterized in that, The hierarchical reinforcement learning therapy optimization module calculates the composite instantaneous reward value after each simulation time step using the following formula: in, Rewards for the progress of treatment of each concurrent symptom are calculated based on the decrease in the severity score of each symptom in the digital twin. This is a penalty for combined toxicity of multiple drugs, calculated based on whether the concentration of each drug exceeds the safe concentration range and then negative; The incentive for milk production recovery is calculated based on the recovery ratio of milk production indicators relative to the baseline level. Rewards for curbing group spread , and These are the normalized communication urgency scores before and after the execution of the treatment action; , , , The weight coefficients for each reward item are defined; each reward item is standardized using Z-score before weighted summation; the upper-layer policy network and the lower-layer policy network are optimized with the cumulative expected reward of their respective layers as the optimization objective, and the parameters are updated using the hierarchical policy gradient algorithm until convergence.

10. A method for remote diagnosis and treatment of dairy cows based on digital twins, used to execute the remote diagnosis and treatment system for dairy cows based on digital twins as described in any one of claims 1 to 9, characterized in that, include: Step 1: Obtain the spatial location data of the cattle herd and equipment usage records through the time-varying contact relationship analysis module, calculate the contact intensity score for each pair of dairy cows, and generate a time-varying contact relationship adjacency matrix; Step 2: Obtain the behavioral residual vector sequence of each cow through the behavioral residual spatiotemporal correlation graph assembly module, and assemble the herd behavioral residual spatiotemporal correlation graph by combining it with the time-varying contact relationship adjacency matrix; Step 3: Input the spatiotemporal correlation graph of the cattle behavior residuals into the spatiotemporal graph attention network through the propagation chain identification and labeling module, and output the propagation chain position label, hub centrality component and suspected propagation source identifier of each node; Step 4: Calculate and normalize the transmission urgency score for each cow awaiting treatment using the transmission chain location tag, neighbor infection status statistics, and hub centrality component through the transmission urgency assessment module; Step 5: Retrieve candidate drugs based on concurrent symptom tags using the multi-drug coupling kinetics simulation module, assemble the drug interaction adjacency matrix, and generate the multi-drug coupling kinetics simulator; Step 6: The normalized propagation urgency score is injected into the state input and reward function of the policy network through the hierarchical reinforcement learning treatment optimization module. After iterative simulation optimization, the treatment plan is output, a remote diagnosis and treatment comprehensive report is generated and pushed to the remote veterinary diagnosis and treatment terminal.