Method and system for building ai veterinarian platform based on multi-agent cooperation, and medium
Patent Information
- Application Number
- CN202611048717.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-07-15
AI Technical Summary
[0002]随着禽畜养殖规模化与集约化程度的不断提高,养殖环境中疫病传播风险日益复杂化,传统依赖人工巡检与单点式环境监测的兽医防控手段已难以满足现代化养殖对时效性与精准性的双重需求
[0007] This invention addresses the technical deficiencies in the prior art and offers the following advantages: By constructing a multi-agent collaborative architecture consisting of a heterogeneous sensing swarm, a sentinel diagnostic agent, a hierarchical collaborative decision-making agent, and an execution agent, this invention organically integrates the spatiotemporal fusion representation of environmental and physiological sensing data, subclinical deviation identification based on herd immunity memory, risk path capture of decentralized swarm emergence, hierarchical intervention decision-making through multi-layered cascade decoupling, and closed-loop feedback of environmental and individual collaborative execution into a unified technical link. This effectively eliminates the defects of traditional solutions, such as fragmented sensing data, delayed diagnosis, single-point bottlenecks in collaborative decision-making, and open-loop disconnection in intervention execution. It achieves intelligent closed-loop management of the entire chain of livestock and poultry health risks, from early detection and spread perception to hierarchical intervention execution, improving the timeliness and accuracy of disease prevention and control, and reducing the risk of disease transmission and the degree of misallocation of prevention and control resources during the breeding process.
Smart Images

Figure CN122552193B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and livestock farming technology, and in particular to the method, system and medium for building an AI veterinary platform based on multi-agent collaboration. Background Technology
[0002] With the increasing scale and intensification of livestock and poultry farming, the risk of disease transmission in the farming environment is becoming increasingly complex. Traditional veterinary prevention and control methods relying on manual inspections and single-point environmental monitoring are no longer sufficient to meet the dual demands of modern farming for timeliness and accuracy. Currently, existing AI veterinary platforms generally suffer from fragmented heterogeneous sensory data and lack spatiotemporal correlation fusion at the individual level, making it difficult to form a unified data base that can characterize the health status of the population. The diagnostic process often relies on fixed rules or isolated discrimination models, failing to uncover subtle deviations in subclinical states or utilize historical immune response experience for early risk retrospective comparison, resulting in delayed diagnosis. In terms of collaborative decision-making, a centralized processing architecture is generally adopted, lacking autonomous negotiation and population emergence mechanisms among multiple agents, making it difficult to dynamically capture the spread and diffusion trends of diseases along the topology of the farming space. At the same time, in the intervention execution process, environmental control and feeding / medication are usually treated as independent open-loop operations, lacking the ability to hierarchically decouple and reconstruct instructions based on risk status, thus failing to form a closed-loop linkage from perception to execution. Therefore, there is an urgent need for an AI veterinary platform that can deeply integrate heterogeneous perception, bionic diagnosis, group collaboration and closed-loop execution to achieve intelligent management and control of the health status of poultry and livestock groups across the entire chain. Summary of the Invention
[0003] This invention overcomes the shortcomings of existing veterinary prevention and control methods, which are difficult to meet the dual requirements of timeliness and accuracy in modern aquaculture, and provides a method, system and medium for building an AI veterinary platform based on multi-agent collaboration.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows: The first aspect of this invention discloses a method for building an AI veterinary platform based on multi-agent collaboration, comprising the following steps: S1: A heterogeneous sensing group composed of environmental sensing agents and physiological sensing agents is used to construct a digital twin microservice image of individual poultry and livestock in real time during data collection, and to map environmental parameters and biological signals into spatiotemporal manifold codes under the digital twin microservice image. S2: Using the sentinel diagnostic agent, a biomimetic immune memory callback mechanism is executed based on the spatiotemporal manifold encoding, and the subclinical deviation latent vector is extracted by comparing the population's historical immune response traces. S3: The sentinel diagnostic agents initiate a cross-interrogation protocol to exchange the subclinical deviation latent vectors in the absence of a central node, thereby generating a population dynamics risk profile that characterizes the disease transmission path. S4: When the population dynamics risk profile meets the preset conditions, the hierarchical collaborative decision-making agent is triggered to adopt a multi-level cascaded decoupling control strategy to decompose the population dynamics risk profile layer by layer into a set of targeted intervention instruction primitives at the root cause level, the propagation level, and the symptom level. S5: The set of targeted intervention instruction primitives is reconstructed into a regulation instruction package, which is then injected into the state-based execution kernels of the environmental field reconstruction execution agent and the feeding and medication execution agent, respectively, to drive the adaptive reconstruction of the aquaculture microenvironment and precise individual intervention, forming a closed-loop veterinary prevention and control platform.
[0005] The second aspect of the present invention discloses an AI veterinary platform construction system based on multi-agent collaboration. The system includes a memory and a processor. The memory stores an AI veterinary platform construction method program. When the AI veterinary platform construction method program is executed by the processor, the steps of any of the methods described above are implemented.
[0006] The third aspect of the present invention discloses a computer-readable storage medium storing an AI veterinary platform construction method program, which, when executed by a processor, implements the steps of any of the methods described above.
[0007] This invention addresses the technical deficiencies in the prior art and offers the following advantages: By constructing a multi-agent collaborative architecture consisting of a heterogeneous sensing swarm, a sentinel diagnostic agent, a hierarchical collaborative decision-making agent, and an execution agent, this invention organically integrates the spatiotemporal fusion representation of environmental and physiological sensing data, subclinical deviation identification based on herd immunity memory, risk path capture of decentralized swarm emergence, hierarchical intervention decision-making through multi-layered cascade decoupling, and closed-loop feedback of environmental and individual collaborative execution into a unified technical link. This effectively eliminates the defects of traditional solutions, such as fragmented sensing data, delayed diagnosis, single-point bottlenecks in collaborative decision-making, and open-loop disconnection in intervention execution. It achieves intelligent closed-loop management of the entire chain of livestock and poultry health risks, from early detection and spread perception to hierarchical intervention execution, improving the timeliness and accuracy of disease prevention and control, and reducing the risk of disease transmission and the degree of misallocation of prevention and control resources during the breeding process. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained from these drawings without creative effort.
[0009] Figure 1 A flowchart illustrating the method for building an AI veterinary platform based on multi-agent collaboration; Figure 2 A system architecture diagram for an AI veterinary platform based on multi-agent collaboration is provided. Detailed Implementation
[0010] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0011] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0012] like Figure 1 As shown, the first aspect of this invention discloses a method for building an AI veterinary platform based on multi-agent collaboration, comprising the following steps: S1: A heterogeneous sensing group composed of environmental sensing agents and physiological sensing agents is used to construct a digital twin microservice image of individual poultry and livestock in real time during data collection, and to map environmental parameters and biological signals into spatiotemporal manifold codes under the digital twin microservice image. S2: Using the sentinel diagnostic agent, a biomimetic immune memory callback mechanism is executed based on the spatiotemporal manifold encoding, and the subclinical deviation latent vector is extracted by comparing the population's historical immune response traces. S3: The sentinel diagnostic agents initiate a cross-interrogation protocol to exchange the subclinical deviation latent vectors in the absence of a central node, thereby generating a population dynamics risk profile that characterizes the disease transmission path. S4: When the population dynamics risk profile meets the preset conditions, the hierarchical collaborative decision-making agent is triggered to adopt a multi-level cascaded decoupling control strategy to decompose the population dynamics risk profile layer by layer into a set of targeted intervention instruction primitives at the root cause level, the propagation level, and the symptom level. S5: The set of targeted intervention instruction primitives is reconstructed into a regulation instruction package, which is then injected into the state-based execution kernels of the environmental field reconstruction execution agent and the feeding and medication execution agent, respectively, to drive the adaptive reconstruction of the aquaculture microenvironment and precise individual intervention, forming a closed-loop veterinary prevention and control platform.
[0013] Specifically, S1 is: An environmental sensing agent deployed at the edge of the farm collects multidimensional environmental parameter streams at a first sampling granularity. Simultaneously, a wearable physiological sensing agent worn by individual livestock collects multimodal biological signal streams at a second sampling granularity. The multidimensional environmental parameter streams and multimodal biological signal streams are then timestamped and encapsulated into heterogeneous sensing data tuples. The multidimensional environmental parameter streams include temperature and humidity composite parameters, harmful gas concentration streams, light dynamic sequences, and aerosol particle distribution. The multimodal biological signal streams include body surface temperature fluctuations, motion acceleration spectra, cardiac impact signals, and vocalization fragments of individual rumination or feeding. Instantiation is performed on the heterogeneous perception data tuples, an independent microservice container is allocated to each of the poultry and livestock individuals, and a digital twin microservice image corresponding one-to-one with the poultry and livestock individual is constructed in the microservice container. The digital twin microservice image includes at least an individual identifier mapping table, a physiological state descriptor, and an environmental context snapshot. By utilizing the manifold learning embedding layer deployed within the digital twin microservice image, nonlinear dimensionality reduction is performed on the data stream in the heterogeneous sensing data tuples to extract the low-dimensional intrinsic structure hidden in the high-dimensional sensing data. The low-dimensional intrinsic structure is then projected onto the manifold space of the digital twin microservice image to generate state trajectory fragments of individual poultry and livestock in the manifold space. Spatiotemporal context encoding is applied to the state trajectory segment to fuse local neighborhood relations and temporal dependencies in the manifold space into a unified compact representation, resulting in a spatiotemporal manifold code carrying individual identity, spatial topological association and temporal evolution information; The spatiotemporal manifold encoding is used as the external interaction interface data of the digital twin microservice image. It is indexed and stored according to the individual identifier mapping table of poultry and livestock individuals, and is retrieved by the diagnostic agent through the microservice calling protocol.
[0014] Specifically, the environmental sensing agent refers to a computing unit deployed at the edge of the farm, capable of collecting multi-dimensional environmental parameters. It can integrate temperature and humidity sensors, gas sensors, light sensors, and aerosol particulate matter sensors, continuously collecting multi-dimensional environmental parameter streams at a preset first sampling granularity. The physiological sensing agent refers to a wearable computing unit worn on individual livestock, capable of collecting multi-modal biological signals. It can integrate infrared temperature sensors, accelerometers, cardiac impact sensors, and microphones, continuously collecting multi-modal biological signal streams at a preset second sampling granularity. It should be noted that the first and second sampling granularities can be configured differently based on the actual scale of the farm and the type of livestock; they can be the same or different, and this invention does not impose specific limitations on them.
[0015] After obtaining the heterogeneous perception data tuple, an instantiation operation is performed on the data tuple. A microservice container refers to a lightweight virtualized runtime environment independently allocated to each individual livestock unit, carrying a digital twin microservice image corresponding one-to-one with that individual. The digital twin microservice image is a real-time mapping of a single livestock unit in the digital space, maintaining at least three types of data: an individual identifier mapping table, a physiological state descriptor, and an environmental context snapshot. The individual identifier mapping table establishes a unique correspondence between the digital twin image and a specific livestock unit in the physical world (e.g., through ear tag numbers or electronic tag numbers); the physiological state descriptor records the current physiological state overview of the individual; and the environmental context snapshot captures the instantaneous values of key parameters in the microenvironment in which the individual exists. By constructing an independent microservice container for each livestock unit, individual-level data isolation and parallel processing are achieved, avoiding the feature crosstalk problem caused by the mixing of different individual data in traditional centralized architectures.
[0016] To extract compact and discriminative representations from high-dimensional heterogeneous sensing data, this invention deploys a manifold learning embedding layer within a digital twin microservice image. The core idea behind the nonlinear dimensionality reduction performed by the manifold learning embedding layer is that while high-dimensional sensing data has high dimensionality in its original space, its intrinsic structure is usually governed by only a few latent factors. These latent factors constitute a low-dimensional manifold embedded in the high-dimensional space. The manifold learning embedding layer extracts the low-dimensional intrinsic structure hidden within the high-dimensional sensing data by performing nonlinear dimensionality reduction on the data streams in the heterogeneous sensing data tuples. For example, assuming that the multidimensional environmental parameter stream and multimodal biological signal stream of a certain livestock individual within a specific time period constitute a high-dimensional data point, the manifold learning embedding layer can find the intrinsic representation of this high-dimensional data point on the low-dimensional manifold based on manifold learning ideas such as local linear embedding or isometric mapping, so that neighboring data points in the high-dimensional space also maintain their proximity in the low-dimensional manifold space. After projecting the extracted low-dimensional intrinsic structure onto the manifold space of the digital twin microservice mirror, a state trajectory fragment of the individual livestock in the manifold space is generated. The state trajectory fragment is essentially a discrete sample of the low-dimensional manifold evolution path of the individual's health state over continuous time. Its dimension is much lower than that of the original perceived data, but it retains the key information that characterizes the changes in the individual's health state.
[0017] To further imbue state trajectory fragments with spatiotemporal semantics, a spatiotemporal context encoding operation is applied to them. The aim is to transform isolated state points in the manifold space into a unified representation carrying spatial topological relationships and temporal evolution information. Specifically, the spatiotemporal context encoding operation fuses information from two dimensions: Spatially, for the current state trajectory fragment of a livestock individual, the state trajectory fragments of other individuals within its local neighborhood in the manifold space are used as the spatial context to extract the local neighborhood relationships between neighboring individuals in the manifold space. This reflects the mutual influence of physically adjacent livestock individuals on the health manifold in the breeding space. Temporally, the preceding and subsequent time-step states of the current state trajectory fragment are used as the temporal context to extract the temporal dependencies between adjacent time steps in the manifold space, reflecting the dynamic evolution of an individual's health state along the manifold. By fusing and encoding these local neighborhood relationships and temporal dependencies, a unified and compact representation is generated—the spatiotemporal manifold encoding. This spatiotemporal manifold encoding carries individual identity information, spatial topological associations, and temporal evolution information. Compared with the original state trajectory fragments, it has stronger semantic completeness and adaptability to downstream tasks.
[0018] Finally, the generated spatiotemporal manifold code is used as the external interaction interface data of the digital twin microservice mirror, and is indexed and stored according to the individual identifier mapping table of livestock individuals. Downstream diagnostic agents can retrieve the spatiotemporal manifold code of any individual on demand through standard microservice calling protocols (such as based on RESTful interfaces or gRPC protocols), thereby realizing rapid retrieval and subsequent analysis of the health status of the entire flock or specific individuals.
[0019] Specifically, S2 is: The sentinel diagnostic agent in the heterogeneous cluster retrieves the spatiotemporal manifold codes from the external interaction interface of each digital twin microservice image through the microservice call protocol, and assigns the retrieved spatiotemporal manifold codes to the corresponding individual diagnostic queue according to the individual identifier mapping table. The sentinel diagnostic agent invokes a pre-constructed herd immunity memory matrix, which uses two types of spatiotemporal manifold encoded samples—health state and immune response state—recorded in historical epidemic events as memory primitives, and is arranged according to manifold spatial distance into a health state attractor region and an immune response state labeled region. Using the spatiotemporal manifold encoding in the individual diagnostic queue as a query vector, a manifold spatial proximity search is performed in the herd immunity memory matrix to locate the manifold relative position of the spatiotemporal manifold encoding between the healthy attractor region and the immune response state marker region. Based on the relative position of the manifold, the manifold offset direction and offset magnitude of the spatiotemporal manifold encoding relative to the immune response state marking region are calculated, and immune response deviation feature components that characterize the deviation relationship between the current state of individual poultry and livestock and the historical immune response traces of the group are extracted; Latent space projection is performed on the immune response bias feature components to map them to a low-dimensional subclinical feature space, resulting in a compressed representation of the subclinical deviation latent vector. The subclinical deviation latent vector is then stored in the local diagnostic cache of the sentinel diagnostic agent.
[0020] Specifically, the sentinel diagnostic agent (a collective term for production perception agents and clinical symptom recognition agents) refers to an intelligent computing unit deployed in a heterogeneous cluster to undertake individual-level health status diagnosis tasks. A heterogeneous cluster is a distributed collaborative computing set composed of multiple agents with different functional roles or computing power configurations. In this invention, the heterogeneous cluster includes at least the aforementioned environmental perception agents, physiological perception agents, and the sentinel diagnostic agent described in this step. These agents exchange data and collaborate on tasks through a unified communication protocol. The sentinel diagnostic agent retrieves spatiotemporal manifold codes from the external interaction interfaces of each digital twin microservice image through a microservice call protocol, and assigns the retrieved spatiotemporal manifold codes to the corresponding individual diagnosis queue according to the individual identifier mapping table, ensuring that the coding data of each livestock individual remains independent and traceable throughout the diagnostic process.
[0021] To achieve biomimetic immune memory callback, the sentinel diagnostic agent invokes a pre-constructed herd immunity memory matrix. The herd immunity memory matrix is a manifold spatial memory model constructed based on herd immunity response data recorded in historical disease events in livestock farms. Its construction method involves extracting spatiotemporal manifold encoded samples of livestock individuals in a healthy state and in an immune response state from historical disease events; these two types of samples together constitute memory primitives. These primitives are arranged according to their distance relationships in the manifold space, defining the region where healthy state samples are clustered as the healthy state attractor region and the region where immune response state samples are clustered as the immune response state labeled region. It can be understood that the healthy state attractor region represents the manifold distribution range of the population in a normal healthy state, while the immune response state labeled region represents the manifold distribution range of the population when it generates an immune response after experiencing a disease attack. The manifold spatial positional relationship between the two reflects the direction and path of the transition from a healthy state to an immune response state.
[0022] Then, the sentinel diagnostic agent uses the spatiotemporal manifold code in the individual diagnostic queue as a query vector to perform a manifold spatial proximity search in the herd immunity memory matrix. Specifically, this proximity search locates the manifold relative position of the spatiotemporal manifold code between the query vector and the boundaries of the healthy state attractor region and the immune response state marker region by calculating the manifold spatial distance between them. For example, if an individual's spatiotemporal manifold code has significantly deviated from the healthy state attractor region in manifold space but has not yet reached the immune response state marker region, it indicates that the individual is in an intermediate state transitioning from a healthy state to an immune response state, and the degree of deviation can serve as an important basis for early warning. Based on the above relative manifold position, the sentinel diagnostic agent further calculates the manifold offset direction and offset magnitude of the spatiotemporal manifold code relative to the immune response state marker region. The manifold offset direction represents the trend of the individual's current state evolving towards the immune response state in manifold space, and the manifold offset magnitude represents the strength of this evolution trend. Encoding the manifold offset direction and offset magnitude together yields the immune response deviation feature component.
[0023] To further compress feature dimensions and enhance the ability to discriminate subclinical states, this invention performs latent space projection on the immune response deviation feature components. Latent space projection refers to the operation of mapping the immune response deviation feature components from the original feature space to a lower-dimensional and more discriminative subclinical feature space. Exemplarily, latent space projection can be implemented through the encoding part of a pre-trained autoencoder network. The autoencoder network uses the immune response deviation feature components of individual samples in a subclinical state during historical disease events as training data, and learns a low-dimensional latent space that highlights subclinical deviation features through a reconstruction task. After inputting the immune response deviation feature components into this encoder, their compressed representation in the latent space is obtained, which is the subclinical deviation latent vector. Compared to the original immune response deviation feature components, the subclinical deviation latent vector has lower dimensionality and less noise, and the separability between different subclinical states is enhanced in this latent space. Finally, the sentinel diagnostic agent stores the obtained subclinical deviation latent vector in a local diagnostic cache for group collaborative invocation in the cross-interrogation protocol, achieving early, quantitative, and efficient characterization of subclinical states in livestock individuals.
[0024] Specifically, S3 is: Any sentinel diagnostic agent transforms the subclinical deviation latent vector in the local diagnostic cache into a virtual pheromone field with spatial diffusion properties, and broadcasts a group state sniffing packet carrying pheromone concentration encoding and its own neighborhood identifier to the heterogeneous cluster. The remaining sentinel diagnostic agents that receive the group state sniffing packet couple and compare the pheromone concentration encoding with the modulus of the local subclinical deviation latent vector in the low-dimensional subclinical feature space to generate a co-deviation resonance coefficient that measures the degree of deviation from consensus of neighboring groups, and use the co-deviation resonance coefficient as the basis for determining whether to join the current query cycle. Sentinel diagnostic agents that meet the joining conditions establish a temporary intention alliance with the sentinel diagnostic agents that initiate sniffing based on the diffusion gradient of the virtual pheromone field. Each member of the intention alliance encapsulates its own subclinical deviation latent vector and cooperative deviation resonance coefficient into a consensus deviation intention message and exchanges them within the alliance. The intention alliance performs consensus deviation pruning on each collected consensus deviation intention message, removes outlier intentions whose collaborative deviation resonance coefficient is lower than the conformity pressure threshold within the alliance, aggregates the retained subclinical deviation latent vectors into consensus deviation vector clusters, and extracts the spatial distribution envelope of the consensus deviation vector clusters. The spatial distribution envelope is reconstructed in a spatiotemporal sequence, and the envelope deformation under continuous time windows is mapped as the emergent dynamic trajectory of disease spread along the topology of the breeding space. The population dynamic risk profile is self-organized and published to the shared situation blackboard of the heterogeneous cluster.
[0025] It should be noted that when a sentinel diagnostic agent has a subclinical deviation latent vector in its local diagnostic cache, the agent transforms it into a virtual pheromone field with spatial diffusion properties. The core characteristic of the virtual pheromone field is that the larger the magnitude of the subclinical deviation latent vector in the low-dimensional subclinical feature space, the higher the concentration value of the corresponding virtual pheromone field. Furthermore, this virtual pheromone field diffuses and decays outward along the topological adjacency relationship of the breeding space, with the diffusion range controlled by a preset diffusion radius parameter. By encoding the pheromone concentration value of the virtual pheromone field and combining it with the sentinel diagnostic agent's own neighborhood identifier, a group state sniffing packet is generated. The group state sniffing packet refers to the probe data packet broadcast by the sentinel diagnostic agent to the heterogeneous cluster in the cross-interrogation protocol, used to characterize the degree of health status deviation and spatial location of the monitored area. It contains at least two parts: pheromone concentration encoding and neighborhood identifier. The sentinel diagnostic agent broadcasts the group state sniffing packet within the heterogeneous cluster to initiate a round of cross-interrogation.
[0026] The remaining sentinel diagnostic agents that receive the group state sniffing packet decode the pheromone concentration encoding carried in the sniffing packet to obtain the pheromone concentration value of the initiator. Simultaneously, they extract the subclinical deviation latent vectors of livestock individuals corresponding to the same or similar breeding space topology from their local diagnostic cache, and calculate the magnitude of these latent vectors in the low-dimensional subclinical feature space. The initiator's pheromone concentration value is then coupled and compared with the magnitude of the local latent vector. For example, the coupling comparison can use coupling operations such as product, weighted sum, or ratio between the two to measure the consistency strength between the deviation degree represented by the initiator and the deviation degree represented locally by the receiver. This consistency strength is the cooperative deviation resonance coefficient. A higher cooperative deviation resonance coefficient indicates that the areas monitored by the initiator and receiver are more consistent in their subclinical deviation states, meaning a higher degree of consensus on deviation among neighboring groups.
[0027] Furthermore, the sentinel diagnostic agent receiving the group state sniffing packet uses the cooperative deviation resonance coefficient as the criterion for deciding whether to join the current query cycle. For example, a lower limit value for resonance response can be set. When the cooperative deviation resonance coefficient reaches or exceeds this lower limit value, it is determined that the receiver and the initiator have a significant deviation consensus, thus meeting the joining condition. Conversely, if the cooperative deviation resonance coefficient is lower than this lower limit value, it is determined that the receiver's deviation state is inconsistent with the initiator's, and it does not join the current query cycle. The sentinel diagnostic agent that meets the joining condition establishes a temporary willingness alliance with the initiating sentinel diagnostic agent based on the diffusion gradient of the virtual pheromone field. A willingness alliance refers to a cooperative diagnostic group temporarily formed by multiple sentinel diagnostic agents within a single cross-query cycle based on a common deviation consensus; its lifespan is limited to this query cycle. Specifically, the diffusion gradient of the virtual pheromone field reflects the decay direction and rate of the deviation state along the topology of the breeding space. Each joining agent establishes a connection with the initiator along this diffusion gradient, thereby forming a temporary cooperative topology structure centered on the initiator and extending along the diffusion direction.
[0028] Each member of the consortium encapsulates its subclinical deviation latent vector and co-deviation resonance coefficient into a consensus deviation intention message, which is then exchanged within the consortium. After collecting these messages, the consortium performs consensus deviation pruning. The purpose of consensus deviation pruning is to eliminate outliers within the consortium that deviate from the mainstream deviation trend, thereby improving the purity and reliability of the group's risk profile. Specifically, a conformity pressure threshold can be set. For example, this threshold can be a preset proportion of the median or mean of the co-deviation resonance coefficients of all members within the consortium. For instance, intentions with co-deviation resonance coefficients falling within the bottom 20% of the coefficient distribution of all members within the consortium can be identified as outliers and eliminated. The retained subclinical deviation latent vectors are then aggregated into a consensus deviation vector cluster, which represents the set of deviation states for which consensus has been reached within the consortium. Based on this, the distribution range and boundaries of the consensus deviation vector cluster in the breeding space are extracted, yielding the spatial distribution envelope of the consensus deviation vector cluster.
[0029] After obtaining the spatial distribution envelope, the spatial distribution envelopes generated under continuous time windows are reconstructed in a spatiotemporal sequence. Specifically, the spatial distribution envelope of the current time window is superimposed and compared with the spatial distribution envelope of the previous time window to extract the deformation information of the envelope in the breeding space, including the displacement direction of the envelope center point, the expansion rate of the envelope range, and the morphological changes of the envelope boundary. These deformation information are concatenated along the time axis, thus mapping them into an emergent dynamic trajectory of disease topological diffusion along the breeding space. This emergent dynamic trajectory reflects the trend of disease risk propagation direction, diffusion speed, and impact range changes in the population, and is a macroscopic representation of the population level based on the self-organized emergence of local interactions among sentinel diagnostic agents. Finally, this emergent dynamic trajectory is self-organized to generate a population dynamic risk profile and published to the shared situation blackboard of the heterogeneous cluster. The shared situation blackboard is a public information interaction space that can be subscribed to and accessed by all agents in the heterogeneous cluster. Downstream hierarchical collaborative decision-making agents can subscribe to the blackboard to obtain the population dynamic risk profile and trigger subsequent decision-making processes.
[0030] Specifically, S4 is: The hierarchical collaborative decision-making agent subscribes to the shared situation blackboard of the heterogeneous cluster to obtain the population dynamics risk profile. When the diffusion acceleration of the emergent dynamic trajectory of any cluster in the population dynamics risk profile exceeds the preset warning curvature, the cascaded decoupling controller inside the hierarchical collaborative decision-making agent is triggered to enter the active state. The cascaded decoupling controller calls a pre-built disease causal topology map, takes the population dynamics risk profile as the input query map, performs subgraph matching in the disease causal topology map, locates the causal transmission link that best matches the current risk profile, extracts the initial trigger node, intermediate propagation node and terminal symptom node on the causal transmission link, and generates a causal node sequence. A hierarchical decoupling operation is applied to the causal node sequence. Along the hierarchical direction of the causal transmission link, the initial inducing node is classified into the root cause level, the intermediate propagation node is classified into the propagation level, and the terminal symptom node is classified into the symptom level, forming a multi-level decoupled intermediate state with hierarchical labels. The causal nodes at each level in the multi-level decoupled intermediate state are mapped to a pre-constructed set of intervention strategy semantic slots, namely, source blocking intervention primitives matched at the root cause level, path interruption intervention primitives matched at the propagation level, and representation relief intervention primitives matched at the symptom level, to obtain a hierarchical intervention semantic sequence. The hierarchical intervention semantic sequence is executed by compiling instructions, and the intervention primitives are arranged in series according to hierarchical priority. The targeted execution region identifiers corresponding to the spatial distribution envelope of each cluster in the population dynamics risk profile are embedded and encapsulated into a set of targeted intervention instruction primitives.
[0031] It should be noted that the hierarchical collaborative decision-making agent (a collective term for pathological change recognition agents and clinical diagnostic agents) specifically refers to intelligent computing units deployed in heterogeneous clusters that undertake group-level collaborative decision-making tasks. It differs from the individual diagnostic role of the aforementioned sentinel diagnostic agent, primarily focusing on the analysis of group risk status and the generation of intervention strategies. The hierarchical collaborative decision-making agent subscribes to the group dynamics risk profile from the shared status blackboard of the heterogeneous cluster. When the diffusion acceleration of the emergent dynamic trajectory of any cluster in the group dynamics risk profile exceeds the preset warning curvature, the cascaded decoupling controller within the hierarchical collaborative decision-making agent is triggered to enter the active state. Here, diffusion acceleration refers to the second-order change in the expansion rate of the spatial distribution envelope of the cluster between consecutive time windows. The warning curvature is a preset risk diffusion acceleration threshold. For example, it can be set to be determined as exceeding the warning curvature when the rate of change of the cluster envelope area's expansion rate exceeds 30% within two adjacent time windows, meaning that the epidemic spread situation is rapidly deteriorating and immediate intervention decisions are needed.
[0032] After the cascaded decoupling controller enters the active state, it invokes a pre-constructed disease causal topology graph. This disease causal topology graph is a knowledge graph constructed based on historical disease event records from livestock farms and veterinary knowledge, with causal nodes as vertices and causal relationships as directed edges. In the graph, node types include three categories: initial trigger nodes, intermediate transmission nodes, and terminal symptom nodes. Directed edges represent the causal transmission relationship from trigger to transmission and from transmission to symptoms. For example, for respiratory diseases in poultry and livestock, initial trigger nodes can be associated with environmental factors (such as high humidity and high ammonia concentration), intermediate transmission nodes can be associated with transmission pathways such as aerosol diffusion and inter-individual contact transmission, and terminal symptom nodes can be associated with clinical manifestations such as elevated body temperature, decreased feed intake, and increased coughing frequency. The disease causal topology graph organizes these nodes and edges according to the causal logic of disease occurrence and development, forming multiple matching causal transmission links.
[0033] The cascaded decoupling controller uses the population dynamics risk profile as the input query graph and performs subgraph matching within the disease causal topology map. Specifically, it matches key features extracted from the population dynamics risk profile (such as spatial distribution characteristics of clusters, diffusion direction, and types of deviations in involved physiological indicators) with the node attributes and topological structure of each causal transmission link in the map, locating the causal transmission link that best matches the current risk profile. Upon successful matching, it extracts the initiating trigger node, intermediate propagation node, and terminal symptom node on that link, arranging them into a causal node sequence according to the causal transmission order. After obtaining the causal node sequence, a hierarchical decoupling operation is applied. Hierarchical decoupling refers to decoupling each node in the causal node sequence along the hierarchical direction of the causal transmission link and assigning them to different intervention levels. Specifically, the hierarchical direction of the causal transmission chain is a progressive direction from the initial triggering factor through intermediate transmission to the terminal symptoms. Along this direction, the initial triggering factor node is classified into the root cause level, which corresponds to the source factor of the disease and is the highest priority for intervention; the intermediate transmission nodes are classified into the transmission level, which corresponds to the path and medium of disease spread in the population and is the medium priority for intervention; and the terminal symptom nodes are classified into the symptom level, which corresponds to the clinical manifestations of the disease and is the basic priority for intervention. Through the above hierarchical decoupling operation, a multi-level decoupled intermediate state with hierarchical labels is formed.
[0034] Furthermore, the causal nodes at each level in the multi-level decoupled intermediate state are mapped to a pre-constructed set of intervention strategy semantic slots. The set of intervention strategy semantic slots refers to a template library of intervention primitives formed by abstracting and classifying various intervention measures according to their level of action and intervention type. Here, the intervention primitive is the smallest unit of action description for intervention. Specifically, the mapping method is as follows: source-blocking intervention primitives are matched to root cause-level causal nodes. For example, source-blocking intervention primitives may include reducing stocking density, eliminating environmental triggers, and cutting off external pathogen input channels; pathway-blocking intervention primitives are matched to transmission-level causal nodes. For example, pathway-blocking intervention primitives may include strengthening zoned ventilation and isolation, initiating aerosol settling measures, and restricting cross-zone personnel movement; and symptom-level causal nodes are matched to manifestation-relief intervention primitives. For example, manifestation-relief intervention primitives may include adjusting feeding formulas to alleviate decreased feed intake, initiating cooling measures to address elevated body temperature, and supplementing electrolytes to improve dehydration symptoms. Through the above mapping operation, the causal nodes at each level are transformed into corresponding intervention primitives, resulting in a hierarchical intervention semantic sequence.
[0035] Finally, the hierarchical intervention semantic sequence is compiled with instructions, and the intervention primitives are concatenated and arranged according to hierarchical priority. The hierarchical priority follows the order of root cause level over propagation level, and propagation level over symptom level, ensuring a hierarchical intervention logic from source to end. Simultaneously, the target execution area identifiers corresponding to the spatial distribution envelopes of each cluster in the population dynamics risk profile are embedded into the instructions. Target execution area identifiers refer to the physical area identifiers within the farm that correspond to the spatial distribution envelopes of the clusters, used to indicate the specific scope of intervention measures. For example, the number of a ventilation zone or the area code of a pen can be used as the target execution area identifier. After arrangement and embedding, this is encapsulated into a set of targeted intervention instruction primitives.
[0036] Specifically, S5 is: The hierarchical collaborative decision-making agent decomposes the set of targeted intervention instruction primitives into groups according to the target execution region identifier. Intervention primitives embedded with the same target execution region identifier are grouped into the same execution batch, generating partition instruction subsets for each target execution region. The execution sequence of the source blocking intervention primitives, path cutting intervention primitives, and representation mitigation intervention primitives contained in each partition instruction subset is arranged to form a partition execution script with intervention priority order. Each partition execution script is encapsulated into an environmental field adjustment instruction package and an individual precision intervention instruction package. The environmental field adjustment instruction package carries at least a ventilation mode adjustment primitive, a temperature and humidity setpoint offset primitive, and an aerosol sedimentation trigger primitive. The individual precision intervention instruction package carries at least a feeding rhythm adjustment primitive, a medication timing marker primitive, and an individual isolation instruction primitive. The environmental field adjustment instruction package is injected into the state base execution kernel of the environmental field reconstruction execution agent. The state base execution kernel maps the ventilation mode adjustment primitive, temperature and humidity setpoint offset primitive, and aerosol sedimentation trigger primitive to the state offset instruction sequence of the environmental control device, respectively, driving the aquaculture microenvironment to adaptively reconstruct along the intervention priority order in the partition execution script. Among them, the environmental field reconstruction execution agent (including disinfection execution agents, alarm and communication agents, etc.) refers to an intelligent execution unit deployed in the farm, responsible for receiving environmental field adjustment command packages and driving environmental control equipment, communication equipment, or alarm equipment to perform corresponding actions. This agent internally maintains a state-based execution kernel, which is an instruction parsing and mapping engine based on the current operating state of the environmental control equipment. When the environmental field adjustment command package is injected into this state-based execution kernel, the kernel parses the ventilation mode adjustment primitive into the fan start / stop status and speed adjustment actions, the temperature and humidity setpoint offset primitive into the setpoint offset actions of heating or cooling equipment, and the aerosol settling trigger primitive into the start and duration actions of spray dust suppression equipment. Finally, it maps the above actions into a sequence of state offset instruction commands that the environmental control equipment can execute. Each device executes the corresponding instructions sequentially according to the intervention priority order in the partition execution script, driving the aquaculture microenvironment to adaptively reconstruct along a preset direction.
[0037] Simultaneously, the individual precision intervention instruction package is injected into the state base execution kernel of the feeding and medication execution agent. The state base execution kernel maps the feeding rhythm adjustment primitive and the medication timing mark primitive to the pulse feeding sequence and targeted medication timing sequence of the precision feeding and medication device, and generates isolation control marks for poultry individuals carrying the individual isolation instruction primitive, thereby driving precise intervention at the individual level. Among them, the feeding and medication execution agent (including but not limited to the feeding and drinking execution agent and the medication delivery agent) refers to the intelligent execution unit deployed in the farm, which is responsible for receiving individual precision intervention instruction packages and driving the feeding and medication delivery equipment to perform corresponding actions. It also maintains a state-based execution kernel. When the individual precision intervention instruction package is injected into the state-based execution kernel, the kernel parses the feeding rhythm adjustment primitive into the adjustment actions of the feeding time and feeding amount of the precision feeding equipment, and maps it into a pulse feeding sequence; it parses the medication timing mark primitive into the setting actions of the drug administration time, drug dosage and drug administration duration of the targeted drug administration equipment, and maps it into a targeted drug administration timing sequence; it parses the individual isolation instruction primitive into the isolation identification action of a specific poultry individual, and generates an isolation control mark for the individual, which is recognized by the farm management personnel or automatic grouping equipment to perform isolation operations.
[0038] The environmental field reconstruction execution agent and the feeding and medication execution agent continuously feed back the execution status to the hierarchical collaborative decision-making agent during the execution process. The hierarchical collaborative decision-making agent compares the execution status with the population dynamics risk profile to form a closed-loop veterinary prevention and control platform that covers the entire chain from perception, diagnosis, decision-making to execution.
[0039] Specifically, the hierarchical collaborative decision-making agent first groups and decomposes the set of targeted intervention instruction primitives according to the targeted execution region identifier. Since each intervention primitive in the set of targeted intervention instruction primitives generated in step S4 embeds a corresponding targeted execution region identifier, this step groups intervention primitives with the same targeted execution region identifier into the same execution batch, thereby generating partitioned instruction subsets for each targeted execution region. The partitioned instruction subsets realize the merging of instructions divided according to the physical space area of the farm, ensuring that multiple intervention measures in the same area can be executed collaboratively, avoiding execution conflicts caused by the mixing of instructions from different areas. For each partitioned instruction subset, the hierarchical collaborative decision-making agent arranges the execution sequence of the source blocking intervention primitives, path interruption intervention primitives, and manifestation relief intervention primitives contained within it. The execution sequence arrangement follows the hierarchical priority principle of root cause priority over propagation and propagation priority over symptoms, placing source blocking intervention primitives at the beginning of the execution sequence, path interruption intervention primitives in the middle position, and manifestation relief intervention primitives at the end position, forming a partitioned execution script with a clear order of intervention priority.
[0040] After completing the timing arrangement, the hierarchical collaborative decision-making agent encapsulates the execution scripts for each partition into environmental field regulation instruction packages and individual precision intervention instruction packages. It should be noted that the encapsulation process is based on the target of the intervention primitives: intervention primitives acting on the livestock environment are included in the environmental field regulation instruction package, which exemplifies ventilation mode adjustment primitives, temperature and humidity setpoint offset primitives, and aerosol deposition triggering primitives; intervention primitives acting on the individual livestock level are included in the individual precision intervention instruction package, which exemplifies feeding rhythm adjustment primitives, medication timing marker primitives, and individual isolation instruction primitives. By encapsulating intervention primitives according to their target, decoupling and distribution of environmental-level and individual-level interventions are achieved.
[0041] During the execution of the environmental field reconstruction and feeding / medication execution agents, both continuously feed back their execution status to the hierarchical collaborative decision-making agent. The execution status includes the current operating parameters of each device, the progress of command completion, and any abnormal states that occur during execution. The hierarchical collaborative decision-making agent compares the feedback execution status with the population dynamics risk profile to determine whether the current execution effect effectively suppresses the risk diffusion trend. If the deviation is within an acceptable range, the current execution strategy is maintained; if the deviation exceeds the preset tolerance, a new round of decision adjustment is triggered. Through the above execution status feedback and deviation comparison, a closed-loop linkage mechanism from perception, diagnosis, decision-making to execution is constructed, forming a full-link closed-loop veterinary disease prevention and control platform.
[0042] In this embodiment, it also includes: In the manifold space of the digital twin microservice mirror, the target spatiotemporal manifold code is used as the reference point. The geodesic distance between the reference point and the other spatiotemporal manifold codes in the same time window is calculated according to the Riemann distance metric. Several spatiotemporal manifold codes with the smallest distance are selected to form a neighborhood code set. The neighborhood code set is used to span the local tangent space at the reference point to determine the tangent vector basis. The spatiotemporal manifold code of the reference point and each code in its neighborhood code set are reconstructed into a natural parameter vector of an exponential family probability distribution. A log-likelihood function is constructed, and the second moment of the log-likelihood function with respect to the natural parameters is calculated to generate the Fisher information matrix, which is used as the Riemann metric tensor at the reference point. The neighborhood code set is released after the Fisher information matrix is generated. For adjacent reference points in a continuous time window, the initial direction of the geodesic equation is constrained by the tangent vector basis of the local tangent space of the previous reference point. The geodesic equation is iteratively solved using the Fisher information matrix at each reference point as the metric, and the geodesic path connecting the two reference points is extracted. The geodesic trajectory sequence is obtained by sampling at equal intervals along the geodesic path. The Fisher information matrix at each sampling point is inherited by interpolation through the Fisher information matrix of the nearest reference point and is used as its local metric. For each geodesic sampling point in the geodesic trajectory sequence, the covariant derivative operation is performed on the trajectory tangent vector using its local metric to obtain the acceleration component of the tangent vector deviating from the parallel movement. The acceleration component is condensed with the local metric to generate an information curvature scalar characterizing the degree of curvature of the geodesic trajectory, thus forming an information curvature scalar field along the geodesic trajectory. The information curvature scalar field is integrated along the geodesic path to obtain the geodesic curvature functional. The geodesic curvature functional is used as a higher-order statistic of the intrinsic information density of the perceived data and written into the state descriptor of the digital twin microservice image for the sentinel diagnostic agent to call, so as to eliminate the interference of non-pathological data density fluctuations on the extraction of subclinical deviation latent vectors.
[0043] It should be noted that in the manifold space of the digital twin microservice mirror, the intrinsic information density of the individual perception data of poultry and livestock carried by the spatiotemporal manifold encoding is not uniformly distributed. When non-pathological transient disturbances occur in the environment (such as the start-up and shutdown of ventilation equipment, sudden changes in light intensity, or brief stress responses in individuals), the distribution density of the spatiotemporal manifold encoding in the manifold space will fluctuate instantaneously. This fluctuation can easily be misjudged as a trend shift in herd immunity status during the subsequent extraction of subclinical deviation latent vectors by the sentinel diagnostic agent, thus generating false alarms. To solve this problem, this embodiment first determines the local geometry at the target reference point in the manifold space. Taking a target spatiotemporal manifold encoding as the reference point, among the other spatiotemporal manifold encodings within the same time window, the geodesic distance is calculated one by one according to the original Riemann distance metric of the manifold space. Several spatiotemporal manifold encodings closest to the reference point are selected. These selected encodings form a local proximity relationship with the reference point in the manifold space, and they together constitute the neighborhood encoding set of the reference point. The role of the neighborhood coding set is to provide a locally linearized observation window for the reference point: by subtracting the manifold coordinate vectors corresponding to each code in the neighborhood coding set from the manifold coordinate vectors of the reference point itself, the resulting difference vectors approximately span the local tangent space at the reference point. These linearly independent difference vectors, after orthogonal normalization, can serve as the tangent vector basis of this local tangent space. For example, assuming the manifold coordinates of the reference point are three-dimensional vectors, and its neighborhood coding set contains four neighboring codes, subtracting the manifold coordinates of the reference point from the manifold coordinates of these four neighboring codes yields four candidate directions for tangent vectors. The orthogonal basis remaining after removing linearly dependent components is the desired tangent vector basis.
[0044] Then, each code in the reference point's spatiotemporal manifold code and its neighborhood code set is reconstructed as a natural parameter vector of an exponential family probability distribution. Specifically, each spatiotemporal manifold code can be considered as a sufficient statistic of a probability distribution, assuming it follows a certain exponential family distribution form (e.g., a multivariate Gaussian distribution). The components of the code can then be mapped to the natural parameters of this exponential family distribution. Based on these natural parameters, the log-likelihood function with neighborhood codes as observation samples can be written. Subsequently, the second moment of this log-likelihood function with respect to the natural parameters, i.e., the Fisher information matrix, is calculated to characterize the sensitivity of the probability distribution family to parameter changes at the reference point, and this matrix is used as the Riemannian metric tensor at the reference point.
[0045] Within a continuous time window, each of two adjacent reference points carries its Fisher information matrix as a local metric. To characterize the evolution path of the spatiotemporal manifold encoded information density between the two reference points, the initial search direction of the geodesic equation is constrained by the tangent vector basis of the local tangent space of the previous reference point. The geodesic equation is iteratively solved under the metric of their respective Fisher information matrices to extract the geodesic path connecting the two reference points. Isochronous sampling is performed along this geodesic path to obtain a geodesic trajectory sequence composed of multiple geodesic sampling points. For each geodesic sampling point, since it may not fall exactly on an existing reference point, its local metric is obtained through interpolation inheritance of the Fisher information matrix at the nearest reference point.
[0046] For each geodesic sampling point, the covariant derivative of the tangent vector of the geodesic trajectory at that point is performed using its local metric to obtain the acceleration component of the tangent vector deviating from the parallel movement along the geodesic trajectory, thus characterizing the curvature trend of the trajectory at that point. The acceleration component is then condensed with the local metric tensor to obtain the information curvature scalar. The path integral of this information curvature scalar field along the geodesic path yields the geodesic curvature functional. The geodesic curvature functional quantitatively characterizes the cumulative degree of deviation of the spatiotemporal manifold encoded sequence from the geodesic straight line (i.e., a path with stable and unchanged information density) in the information geometry sense within a continuous time window, and is defined as a higher-order statistic of the intrinsic information density of the perceived data. This statistic is ultimately written into the state descriptor of the corresponding livestock individual's digital twin microservice image, serving as a compact representation of the information content of the individual's perceived data. When the sentinel diagnostic agent extracts the latent vector of subclinical deviation, it can simultaneously call this statistic. When the latent vector of subclinical deviation fluctuates and the statistic is also displayed as high, it can be determined that the fluctuation is mainly caused by non-pathological data density perturbation, and thus it can be excluded to reduce the probability of false alarms.
[0047] In this embodiment, it also includes: Two types of spatiotemporal manifold encoded samples, namely healthy state and immune response state, are extracted from the herd immunity memory matrix. Each spatiotemporal manifold encoded sample is expanded into a third-order tensor according to the individual identifier dimension, time window dimension and manifold coordinate dimension. The third-order tensors of all samples are stacked along the sample dimensions to form a fourth-order immune memory tensor to be decomposed. Tensor ring decomposition is performed on the fourth-order immune memory tensor. The ring rank is set and cyclic contraction is performed along the sample dimension, individual identifier dimension, time window dimension and manifold coordinate dimension. The fourth-order immune memory tensor is decomposed into a contraction sum of a third-order shared core tensor and four modality-specific factor matrices, where each modality-specific factor matrix corresponds to the sample modality, individual modality, time sequence modality and manifold modality, respectively. The third-order shared core tensor is retained as a cross-modal invariant representation of the herd immune response. At the same time, factor vectors corresponding to healthy and immune response samples are extracted from the modality-specific factor matrix. Healthy factor subspace and immune response factor subspace are constructed respectively, and the Grassman distance between the two subspaces is calculated as a benchmark deviation measure of the immune memory structure. For newly entered spatiotemporal manifold encoded samples in subsequent time windows, incremental tensor ring reconstruction is performed using the four modality-specific factor matrices as the projection basis. The new samples are mapped to the existing tensor ring structure and the reconstruction residuals are calculated to obtain the reconstruction residual vector corresponding to the time window, forming a reconstruction residual spectrum sequence expanded along the time axis. A sliding window analysis is performed on the reconstructed residual spectrum sequence along the time axis to calculate the relative entropy between the reconstructed residual vectors of adjacent time windows. When the relative entropy exceeds the fluctuation tolerance range calibrated by the benchmark deviation metric, the moment is determined to be a mutation point in the decomposed residual spectrum, and an immune response mode drift warning signal is generated.
[0048] It should be noted that in existing livestock disease prevention and control systems, the herd immunity memory matrix, as a carrier of historical disease events' perceived experience, contains high-dimensional and multi-modal spatiotemporal manifold-coded samples. Over long-term operation, the continuous accumulation of new samples leads to a sharp increase in the computational overhead of storage and retrieval. Furthermore, it becomes difficult to detect potential shifts in herd immunity response patterns from the high-dimensional tensor structure. Directly comparing or globally reconstructing the original memory matrix sample by sample is not only inefficient but also prone to being overwhelmed by individual random fluctuations, neglecting epidemiologically significant pattern changes. Therefore, this embodiment extracts two types of spatiotemporal manifold-coded samples with clear immune states from the herd immunity memory matrix: samples confirmed to be in a healthy state in historical records and samples in an immune response state. Each spatiotemporal manifold-coded sample, originally a point in the manifold space, is tensor-organized in three dimensions: individual identifier dimension, time window dimension, and manifold coordinate dimension, thus forming a third-order tensor. Stacking the third-order tensors of all samples along the newly added sample dimension results in the fourth-order immune memory tensor to be decomposed. Its four orders correspond to the sample dimension, individual identifier dimension, time window dimension, and manifold coordinate dimension, respectively.
[0049] Next, tensor ring decomposition is performed on the fourth-order immune memory tensor: using the tensor ring rank as the truncation parameter, matrix expansion and singular value decomposition are iteratively performed along the four dimensions mentioned above. Through cyclic shrinking operations, the fourth-order immune memory tensor is decomposed into a condensed form consisting of a third-order shared core tensor and four modality-specific factor matrices. The third-order shared core tensor captures common interaction patterns across samples, individuals, time, and manifold coordinates, constituting a cross-modal invariant representation of herd immunity response; while the four modality-specific factor matrices respectively carry individual difference information in the sample dimension, biological specificity information in the individual identifier dimension, temporal evolution information in the time window dimension, and spatial distribution information in the manifold coordinate dimension. To illustrate using the contraction operation, if an element of the fourth-order immune memory tensor is considered as the product of multiplying and summing the corresponding vectors taken from the shared core tensor and the four factor matrices element by element, then each modality-specific factor matrix is responsible for providing the feature components under that modality, while the shared core tensor constrains the coupling relationship between the modal components. The two work together to completely reconstruct the corresponding elements in the original tensor.
[0050] After obtaining the decomposition results, the third-order shared core tensor is retained separately as a lightweight representation of the normal state of herd immune response. Simultaneously, from the four modality-specific factor matrices, the factor vector sets corresponding to healthy state samples and the factor vector sets corresponding to immune response state samples are extracted, each spanning a healthy state factor subspace and an immune response state factor subspace. Since the Grassmann distance can measure the angle difference between two linear subspaces without depending on the specific basis selection, this embodiment uses it as a benchmark deviation measure of the immune memory structure, calibrating the inherent difference scale between the healthy state and the immune response state at the factor level from a geometric structural perspective.
[0051] During routine monitoring, for each new spatiotemporal manifold-coded sample entered in a subsequent time window, there is no need to re-perform global tensor ring decomposition. Instead, the four modality-specific factor matrices obtained from training are fixed as the projection basis. The new sample is mapped to the existing tensor ring structure using incremental tensor ring reconstruction. The reconstruction residual between the reconstructed value and the original new sample is calculated to obtain the reconstruction residual vector corresponding to that time window. As time progresses, the reconstruction residual vectors of each time window are arranged sequentially, forming a reconstruction residual spectrum sequence unfolding along the time axis. This sequence records the trajectory of how well the herd immunity memory structure adapts to new data over time.
[0052] Then, a sliding window scan analysis is performed on the reconstructed residual spectrum sequence, and the relative entropy between the reconstructed residual vectors of adjacent time windows is calculated sequentially. Relative entropy measures the information difference between two residual distributions. When the herd immunity response pattern remains stable, the reconstructed residual spectrum is relatively stable, and the relative entropy remains at a low level. Once a new variant of the disease environment appears or the herd immunity trend changes, the explanatory power of the original tensor ring structure for new data decreases, and the reconstructed residuals will undergo structural shifts, manifested as a significant jump in relative entropy. In this embodiment, the Grassmann distance between the aforementioned healthy state factor subspace and the immune response state factor subspace is used as a benchmark to define the upper bound of the fluctuation tolerance interval of relative entropy. When the relative entropy of adjacent windows exceeds this upper bound, the current moment is determined to be a mutation point in the decomposed residual spectrum, and an immune response pattern drift warning signal is generated accordingly. This signal is output to the sentinel diagnostic agent, indicating that the immune response pattern implied by the herd immunity memory matrix is undergoing substantial changes, requiring the attention of the epidemic prevention decision-making level. Through the above method, this scheme achieves dynamic monitoring and early warning of high-dimensional immune memory without increasing storage overhead.
[0053] like Figure 2 As shown, the second aspect of the present invention discloses an AI veterinary platform construction system based on multi-agent collaboration. The system includes a memory and a processor. The memory stores an AI veterinary platform construction method program. When the AI veterinary platform construction method program is executed by the processor, the steps of any of the methods described above are implemented.
[0054] The third aspect of the present invention discloses a computer-readable storage medium storing an AI veterinary platform construction method program, which, when executed by a processor, implements the steps of any of the methods described above.
[0055] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for building an AI veterinary platform based on multi-agent collaboration, characterized in that, Includes the following steps: S1: A heterogeneous sensing group composed of environmental sensing agents and physiological sensing agents is used to construct a digital twin microservice image of individual poultry and livestock in real time during data collection, and to map environmental parameters and biological signals into spatiotemporal manifold codes under the digital twin microservice image. S2: Using the sentinel diagnostic agent, a biomimetic immune memory callback mechanism is executed based on the spatiotemporal manifold encoding, and the subclinical deviation latent vector is extracted by comparing the population's historical immune response traces. S3: The sentinel diagnostic agents initiate a cross-interrogation protocol to exchange the subclinical deviation latent vectors in the absence of a central node, thereby generating a population dynamics risk profile that characterizes the disease transmission path. S4: When the population dynamics risk profile meets the preset conditions, the hierarchical collaborative decision-making agent is triggered to adopt a multi-level cascaded decoupling control strategy to decompose the population dynamics risk profile layer by layer into a set of targeted intervention instruction primitives at the root cause level, the propagation level, and the symptom level. S5: Reconstruct the set of targeted intervention instruction primitives into a regulation instruction package, and inject it into the state-based execution kernel of the environmental field reconstruction execution agent and the feeding and drug administration execution agent, respectively, to drive the adaptive reconstruction of the breeding microenvironment and precise individual intervention, forming a closed-loop veterinary prevention and control platform; Specifically, S1 is: An environmental sensing agent deployed at the edge of the farm collects multi-dimensional environmental parameter streams at a first sampling granularity. At the same time, a wearable physiological sensing agent worn by individual poultry and livestock collects multi-modal biological signal streams at a second sampling granularity. The multi-dimensional environmental parameter streams and multi-modal biological signal streams are then timestamped and encapsulated into heterogeneous sensing data tuples. Instantiation is performed on the heterogeneous perception data tuples, an independent microservice container is allocated to each of the poultry and livestock individuals, and a digital twin microservice image corresponding one-to-one with the poultry and livestock individual is constructed in the microservice container. The digital twin microservice image includes at least an individual identifier mapping table, a physiological state descriptor, and an environmental context snapshot. By utilizing the manifold learning embedding layer deployed within the digital twin microservice image, nonlinear dimensionality reduction is performed on the data stream in the heterogeneous sensing data tuples to extract the low-dimensional intrinsic structure hidden in the high-dimensional sensing data. The low-dimensional intrinsic structure is then projected onto the manifold space of the digital twin microservice image to generate state trajectory fragments of individual poultry and livestock in the manifold space. Spatiotemporal context encoding is applied to the state trajectory segment to fuse local neighborhood relations and temporal dependencies in the manifold space into a unified compact representation, resulting in a spatiotemporal manifold code carrying individual identity, spatial topological association and temporal evolution information; The spatiotemporal manifold encoding is used as the external interaction interface data of the digital twin microservice image, and is indexed and stored according to the individual identifier mapping table of poultry and livestock individuals, so that the diagnostic agent can pull it through the microservice calling protocol. Specifically, S2 is: The sentinel diagnostic agent in the heterogeneous cluster retrieves the spatiotemporal manifold codes from the external interaction interface of each digital twin microservice image through the microservice call protocol, and assigns the retrieved spatiotemporal manifold codes to the corresponding individual diagnostic queue according to the individual identifier mapping table. The sentinel diagnostic agent invokes a pre-constructed herd immunity memory matrix, which uses two types of spatiotemporal manifold encoded samples—health state and immune response state—recorded in historical epidemic events as memory primitives, and is arranged according to manifold spatial distance into a health state attractor region and an immune response state labeled region. Using the spatiotemporal manifold encoding in the individual diagnostic queue as a query vector, a manifold spatial proximity search is performed in the herd immunity memory matrix to locate the manifold relative position of the spatiotemporal manifold encoding between the healthy attractor region and the immune response state marker region. Based on the relative position of the manifold, the manifold offset direction and offset magnitude of the spatiotemporal manifold encoding relative to the immune response state marking region are calculated, and immune response deviation feature components that characterize the deviation relationship between the current state of individual poultry and livestock and the historical immune response traces of the group are extracted; Latent space projection is performed on the immune response bias feature components to map the immune response bias feature components to a low-dimensional subclinical feature space, resulting in a compressed representation of the subclinical deviation latent vector, and the subclinical deviation latent vector is stored in the local diagnostic cache of the sentinel diagnostic agent; Specifically, S4 is: The hierarchical collaborative decision-making agent subscribes to the shared situation blackboard of the heterogeneous cluster to obtain the population dynamics risk profile. When the diffusion acceleration of the emergent dynamic trajectory of any cluster in the population dynamics risk profile exceeds the preset warning curvature, the cascaded decoupling controller inside the hierarchical collaborative decision-making agent is triggered to enter the active state. The cascaded decoupling controller calls a pre-built disease causal topology map, takes the population dynamics risk profile as the input query map, performs subgraph matching in the disease causal topology map, locates the causal transmission link that best matches the current risk profile, extracts the initial trigger node, intermediate propagation node and terminal symptom node on the causal transmission link, and generates a causal node sequence. A hierarchical decoupling operation is applied to the causal node sequence. Along the hierarchical direction of the causal transmission link, the initial inducing node is classified into the root cause level, the intermediate propagation node is classified into the propagation level, and the terminal symptom node is classified into the symptom level, forming a multi-level decoupled intermediate state with hierarchical labels. The causal nodes at each level in the multi-level decoupled intermediate state are mapped to a pre-constructed set of intervention strategy semantic slots, namely, source blocking intervention primitives matched at the root cause level, path interruption intervention primitives matched at the propagation level, and representation relief intervention primitives matched at the symptom level, to obtain a hierarchical intervention semantic sequence. The hierarchical intervention semantic sequence is executed by compiling instructions, and the intervention primitives are arranged in series according to hierarchical priority. The targeted execution region identifiers corresponding to the spatial distribution envelope of each cluster in the population dynamics risk profile are embedded and encapsulated into a set of targeted intervention instruction primitives.
2. The method for building an AI veterinary platform based on multi-agent collaboration according to claim 1, characterized in that: The multidimensional environmental parameter stream includes temperature and humidity composite parameters, harmful gas concentration stream, light dynamic sequence and aerosol particle distribution, and the multimodal biological signal stream includes body surface temperature fluctuation, motion acceleration spectrum, cardiac impact signal and individual rumination or feeding voiceprint fragments.
3. The method for building an AI veterinary platform based on multi-agent collaboration according to claim 1, characterized in that, Specifically, S3 is: Each sentinel diagnostic agent transforms the subclinical deviation latent vector in its local diagnostic cache into a virtual pheromone field with spatial diffusion properties. The virtual pheromone field maps the magnitude of the subclinical deviation latent vector in the low-dimensional subclinical feature space to a pheromone concentration value, and diffuses outward along the topological adjacency relationship of the breeding space, with the diffusion range controlled by a preset diffusion radius parameter. It also broadcasts a population state sniffing packet carrying a pheromone concentration code and its own neighborhood identifier to the heterogeneous cluster. The pheromone concentration code is obtained by encoding the pheromone concentration value of the virtual pheromone field. The remaining sentinel diagnostic agents that receive the group state sniffing packet couple and compare the pheromone concentration encoding with the modulus of the local subclinical deviation latent vector in the low-dimensional subclinical feature space to generate a co-deviation resonance coefficient that measures the degree of deviation from consensus of neighboring groups, and use the co-deviation resonance coefficient as the basis for determining whether to join the current query cycle. Sentinel diagnostic agents that meet the joining conditions establish a temporary intention alliance with the sentinel diagnostic agents that initiate sniffing based on the diffusion gradient of the virtual pheromone field. Each member of the intention alliance encapsulates its own subclinical deviation latent vector and cooperative deviation resonance coefficient into a consensus deviation intention message and exchanges them within the alliance. The intention alliance performs consensus deviation pruning on each collected consensus deviation intention message, removes outlier intentions whose collaborative deviation resonance coefficient is lower than the conformity pressure threshold within the alliance, aggregates the retained subclinical deviation latent vectors into consensus deviation vector clusters, and extracts the spatial distribution envelope of the consensus deviation vector clusters. The spatial distribution envelope is reconstructed in a spatiotemporal sequence, and the envelope deformation under continuous time windows is mapped as the emergent dynamic trajectory of disease spread along the topology of the breeding space. The population dynamic risk profile is self-organized and published to the shared situation blackboard of the heterogeneous cluster.
4. The method for building an AI veterinary platform based on multi-agent collaboration according to claim 1, characterized in that, Specifically, S5 is: The hierarchical collaborative decision-making agent decomposes the set of targeted intervention instruction primitives into groups according to the target execution region identifier. Intervention primitives embedded with the same target execution region identifier are grouped into the same execution batch, generating partition instruction subsets for each target execution region. The execution sequence of the source blocking intervention primitives, path cutting intervention primitives, and representation mitigation intervention primitives contained in each partition instruction subset is arranged to form a partition execution script with intervention priority order. Each partition execution script is encapsulated into an environmental field adjustment instruction package and an individual precision intervention instruction package. The environmental field adjustment instruction package carries at least a ventilation mode adjustment primitive, a temperature and humidity setpoint offset primitive, and an aerosol sedimentation trigger primitive. The individual precision intervention instruction package carries at least a feeding rhythm adjustment primitive, a medication timing marker primitive, and an individual isolation instruction primitive. The environmental field adjustment instruction package is injected into the state base execution kernel of the environmental field reconstruction execution agent. The state base execution kernel maps the ventilation mode adjustment primitive, temperature and humidity setpoint offset primitive, and aerosol sedimentation trigger primitive to the state offset instruction sequence of the environmental control device, respectively, driving the aquaculture microenvironment to adaptively reconstruct along the intervention priority order in the partition execution script. Simultaneously, the individual precision intervention instruction package is injected into the state base execution kernel of the feeding and medication execution agent. The state base execution kernel maps the feeding rhythm adjustment primitive and the medication timing mark primitive to the pulse feeding sequence and targeted medication timing sequence of the precision feeding and medication device, and generates isolation control marks for poultry individuals carrying the individual isolation instruction primitive, thereby driving precise intervention at the individual level.
5. The method for building an AI veterinary platform based on multi-agent collaboration according to claim 4, characterized in that, Also includes: The environmental field reconstruction execution agent and the feeding and medication execution agent continuously feed back the execution status to the hierarchical collaborative decision-making agent during the execution process. The hierarchical collaborative decision-making agent compares the execution status with the population dynamics risk profile to form a closed-loop veterinary prevention and control platform that covers the entire chain from perception, diagnosis, decision-making to execution.
6. A system for building an AI veterinary platform based on multi-agent collaboration, characterized in that, The system includes a memory and a processor. The memory stores a method program for building an AI veterinary platform. When the AI veterinary platform construction method program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a method program for building an AI veterinary platform. When the AI veterinary platform construction method program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Livestock and poultry disease root cause diagnosis and intervention recommendation method
CN121260506A
Animal epidemic situation early warning and auxiliary diagnosis method for animal husbandry and veterinary medicine based on deep learning
CN122370001A