Livestock and poultry state evaluation method and system based on multi-modal sensor and artificial intelligence
By using multimodal sensors and artificial intelligence technology, a livestock and poultry status assessment system was constructed, which solved the problems of lagging early health risk identification and high false alarm rate in existing technologies, and realized accurate assessment and early warning of livestock and poultry health status.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 庄浪县畜牧兽医中心
- Filing Date
- 2026-01-21
- Publication Date
- 2026-05-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies are insufficient to effectively characterize the dynamic interaction between livestock physiology, behavior and environment in large-scale livestock and poultry farming, resulting in delayed early health risk identification and a high false alarm rate.
Multimodal sensors are used to simultaneously acquire physiological metabolism, activity trajectory and microenvironment data of livestock and poultry, construct multimodal time series graphs, use spatiotemporal graph neural networks and group normal behavior map library to identify abnormal patterns, combine historical disease case database and gradient boosting tree to calculate key indicators, and generate state assessment reports through random forest model.
It enables sensitive detection and accurate identification of early health risks in livestock and poultry, improves the sensitivity of abnormality detection and the accuracy of status assessment, and supports early warning and precise intervention.
Smart Images

Figure CN121964142A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of livestock and poultry health monitoring, and in particular to a method and system for assessing the condition of livestock and poultry based on multimodal sensors and artificial intelligence. Background Technology
[0002] In large-scale livestock and poultry farming, the use of sensor technology to automatically monitor and assess the health status of individuals is of great significance for early detection of diseases and reduction of losses, and has become a development trend in the field of smart farming.
[0003] Currently, common automated monitoring methods mainly rely on fixed sensors installed in the breeding sheds or simple devices worn by individual livestock and poultry to continuously collect data on single or a few indicators such as activity level and body temperature. The collected data is usually directly compared with preset fixed thresholds or used for simple statistics to determine whether the current state of the livestock and poultry is abnormal.
[0004] However, this type of method mainly relies on static comparison of isolated data points, which makes it difficult to effectively depict the complex dynamic interaction between livestock and poultry physiology, behavior and their microenvironment, and also fails to identify early, subtle abnormal signs unique to individuals from the general behavioral patterns of the group. Summary of the Invention
[0005] The purpose of this application is to provide a method and system for assessing the condition of livestock and poultry based on multimodal sensors and artificial intelligence, in order to solve the problems of lag and high false alarm rate in the identification of early health risks of livestock and poultry in the existing technology.
[0006] To address the aforementioned technical problems, in a first aspect, this application provides a method for assessing the condition of livestock and poultry based on multimodal sensors and artificial intelligence, comprising:
[0007] Obtain physiological and metabolic data, activity trajectory data, and microenvironment data of the individual livestock and poultry;
[0008] Based on the physiological metabolic data, the activity trajectory data, and the microenvironment data, a multimodal time series diagram characterizing the state of individual livestock and poultry is constructed;
[0009] A spatiotemporal graph neural network is used to determine abnormal patterns of livestock and poultry individuals deviating from the norm based on the multimodal time series graph and a preset group normal behavior graph library, so as to generate corresponding abnormal pattern vectors.
[0010] Based on a pre-set historical epidemic case database, the importance of each node in the multimodal time series graph is calculated using a gradient boosting tree to obtain key indicator data;
[0011] Based on the key indicator data, and combined with the temporal anomaly information in the anomaly pattern vector, state evolution is performed to generate a dynamic state sequence.
[0012] The dynamic state sequence is learned by using a random forest model to obtain a state assessment report for individual livestock and poultry.
[0013] Optionally, based on a preset historical epidemic case database, a gradient boosting tree is used to calculate the importance of each node in the multimodal time series graph to obtain key indicator data, including:
[0014] Multiple historical graph samples are extracted from a pre-set historical epidemic case database and are aligned with the multimodal time series graph in terms of time step and feature dimension. The nodes in the historical graph samples contain historical state data, and each historical graph sample is associated with a historical health label.
[0015] A graph attention mechanism is used to process the historical state data in the historical graph samples to obtain the state encoding vector of each node;
[0016] By combining the state encoding vector with the corresponding historical health label, a strong classifier is obtained through multiple rounds of training using a gradient boosting tree.
[0017] The multimodal time series graph is input into the strong classifier to obtain the importance score of each node's impact on health risk classification;
[0018] Based on the importance score, the nodes in the multimodal time series graph are sorted and filtered to obtain the target node, and the physiological metabolic data, activity trajectory data and microenvironment data corresponding to the target node are determined as key indicator data.
[0019] Optionally, the graph attention mechanism is used to process the historical state data in the historical graph samples to obtain the state encoding vector of each node, including:
[0020] Extract the node features and edge features connecting the nodes of each node in the historical graph sample;
[0021] Using the edge features, a dynamic topological graph of the historical graph samples is constructed;
[0022] Based on the dynamic topology graph, a graph attention mechanism is used to perform message propagation and feature aggregation on the node features to obtain updated node features.
[0023] The state encoding vector of each node is obtained by nonlinearly mapping the features of the updated node through a feedforward neural network.
[0024] Optionally, the step of using a random forest model to learn feature representations of the dynamic state sequence to obtain a state assessment report for individual livestock and poultry includes:
[0025] The dynamic state sequence is input into a temporal convolutional network consisting of stacked one-dimensional causal convolutional layers and dilated convolutional layers. The temporal convolutional network captures the multi-scale evolution pattern of livestock and poultry health status from the latent period, subclinical period to the onset period in the dynamic state sequence, and obtains deep temporal features.
[0026] To address the differences in activity and metabolism among individual livestock and poultry under diurnal rhythms, the deep temporal features are input into an adjustment module based on a channel attention mechanism. The adjustment module adaptively adjusts the deep temporal features to obtain weighted temporal features.
[0027] A random forest model is used to make decisions and integrate the weighted time-series features to obtain a discriminant vector.
[0028] The discrimination vector is concatenated with the physiological features derived from the key indicator data to obtain a fused feature vector;
[0029] The fused feature vector is input into a lightweight multilayer perceptron decoder. The multilayer perceptron decoder decodes the fused feature vector and combines it with a pre-set prior knowledge base in the field of animal husbandry and veterinary medicine. The decoding result is then mapped according to rules to generate a status assessment report for individual livestock and poultry.
[0030] Optionally, the step of using a random forest model to make decisions and integrate the weighted time-series features to obtain a discriminant vector includes:
[0031] Multiple decision trees in the random forest model are used to spatially partition the weighted temporal features, resulting in multiple decision paths;
[0032] Based on the contribution of the weighted temporal features to each decision tree during the training phase, a path confidence weight is assigned to the output of each decision path.
[0033] Using the path confidence weights, the node results of all the decision paths are weighted and aggregated to obtain the original probability distribution;
[0034] A smoothing constraint term is introduced to correct the original probability distribution, resulting in a final probability distribution, which serves as the discrimination vector.
[0035] Optionally, the step of constructing a multimodal time-series graph characterizing the individual state of livestock and poultry based on the physiological metabolic data, the activity trajectory data, and the microenvironment data includes:
[0036] The physiological metabolic data, the activity trajectory data, and the microenvironment data are grouped to obtain multiple time-series data units;
[0037] Based on the preset association metric rules, modeling is performed on each of the time-series data units to obtain an initial network graph;
[0038] Based on the activity rhythms of the individual livestock and poultry, all the initial network graphs are fused and connected in topology to obtain a multimodal time series graph.
[0039] Optionally, the step of generating a dynamic state sequence based on the key indicator data and the temporal anomaly information in the anomaly pattern vector includes:
[0040] Based on the time-series anomaly information in the anomaly pattern vector, key anomaly time windows are determined, and the key indicator data are segmented according to the key anomaly time windows to obtain multiple state segments.
[0041] Based on the activity rhythms of the livestock and poultry individuals, evolutionary modeling is performed on all the state segments to obtain candidate state sequences;
[0042] Based on a preset historical evolution path, the candidate state sequence is optimized and aligned to generate a dynamic state sequence.
[0043] Secondly, this application provides a livestock and poultry condition assessment system based on multimodal sensors and artificial intelligence, comprising:
[0044] The acquisition module is used to acquire physiological and metabolic data, activity trajectory data, and microenvironment data of the individual livestock and poultry.
[0045] The construction module is used to construct a multimodal time series diagram representing the state of individual livestock and poultry based on the physiological metabolic data, the activity trajectory data, and the microenvironment data.
[0046] The determination module is used to use a spatiotemporal graph neural network to determine abnormal patterns of livestock and poultry individuals deviating from the norm based on the multimodal time series graph and a preset group normal behavior graph library, so as to generate corresponding abnormal pattern vectors.
[0047] The calculation module is used to calculate the importance of each node in the multimodal time series graph based on a preset historical epidemic case database and using a gradient boosting tree to obtain key indicator data;
[0048] The evolution module is used to perform state evolution based on the key indicator data and the temporal anomaly information in the anomaly pattern vector, and generate a dynamic state sequence.
[0049] The learning module is used to learn the feature representation of the dynamic state sequence using a random forest model to obtain a state assessment report for individual livestock and poultry.
[0050] Thirdly, this application provides an electronic device, comprising:
[0051] Memory, used to store computer programs;
[0052] A processor is configured to execute the computer program to implement the steps of the livestock and poultry condition assessment method based on multimodal sensors and artificial intelligence as described in the first aspect above.
[0053] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps of the livestock and poultry status assessment method based on multimodal sensors and artificial intelligence as described in the first aspect above.
[0054] The livestock and poultry status assessment method based on multimodal sensors and artificial intelligence provided in this application has the following beneficial effects: First, by simultaneously acquiring physiological metabolism, activity trajectories, and microenvironmental data of individual livestock and poultry, it can provide a comprehensive, multi-source, and spatiotemporally correlated raw information foundation for status assessment; second, based on the above multimodal data, a multimodal time-series graph representing individual status can be constructed, which can effectively integrate and structure time-varying information from different sources, thereby providing a unified representation form for subsequent analysis; third, the use of a spatiotemporal graph neural network combined with a group normal behavior map database for abnormal pattern recognition helps to accurately locate individuals from the commonalities of the group. Deviation behavior is identified to improve the sensitivity of anomaly detection. Then, based on historical disease cases and gradient boosting trees, the importance of each node in the time series graph is calculated, enabling the selection of key indicators that are most indicative of health risks from complex correlation data. Subsequently, state evolution modeling is performed by combining key indicators with time series information in the anomaly pattern vector, which can construct a dynamic state sequence that better reflects the actual health evolution trend of individuals. Finally, a random forest model is used to learn features and make comprehensive judgments on this dynamic sequence, which can integrate multi-stage analysis results and generate a highly reliable livestock and poultry individual status assessment report to support early warning and precise intervention.
[0055] Furthermore, this application extracts historical samples aligned with the current time series graph from a historical epidemic case database and encodes their state information using a graph attention mechanism, enabling it to fully learn the correlation patterns between multimodal data in historical health events. Subsequently, by combining gradient boosting trees for training and importance assessment, the impact of different data nodes on risk classification can be quantified based on historical experience, thereby selecting truly critical data indicators. This process ensures that the extraction of key indicators does not rely on human experience but is driven by historical cases, making it more objective and targeted, and helping to improve the accuracy and interpretability of subsequent state assessments. Attached Figure Description
[0056] To more clearly illustrate the technical solutions of the embodiments of this application 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 A flowchart illustrating a livestock and poultry status assessment method based on multimodal sensors and artificial intelligence, provided for an embodiment of this application;
[0058] Figure 2 A schematic diagram illustrating a specific implementation of a livestock and poultry status assessment method based on multimodal sensors and artificial intelligence, provided in this application embodiment;
[0059] Figure 3 A schematic diagram of the structure of a livestock and poultry condition assessment system based on multimodal sensors and artificial intelligence, provided in an embodiment of this application;
[0060] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0061] In large-scale livestock and poultry farming, the use of automation technology to detect individual health abnormalities early is the key to achieving precise management. However, existing mainstream monitoring methods usually rely on independent analysis of data from a single or a few sensors and static threshold comparison. This approach is difficult to depict the complex dynamic relationship between livestock and poultry physiology, behavior and environment, and it is also unable to effectively distinguish early and weak abnormal signs from the daily patterns of the group, resulting in delayed warnings and a high risk of false alarms.
[0062] To address this, this application proposes a livestock and poultry status assessment method based on multimodal sensors and artificial intelligence. The core of this method lies in: firstly, constructing a multimodal time-series graph representing the complete state of an individual by fusing physiological, behavioral, and environmental data; secondly, identifying individual anomalies using graph modeling techniques combined with a group normal pattern database; thirdly, selecting key risk indicators based on historical disease case data and integrating abnormal time-series information for state evolution analysis; and finally, generating a comprehensive assessment report through an ensemble learning model. This approach enables sensitive detection and accurate identification of early health risks in livestock and poultry, effectively overcoming the problems of untimely detection of subtle anomalies and insufficient accuracy in early warning in existing technologies.
[0063] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0064] The core of this application is to provide a method for assessing the condition of livestock and poultry based on multimodal sensors and artificial intelligence. A flowchart of one specific implementation is shown below. Figure 1 As shown, the method includes:
[0065] S101. Obtain physiological and metabolic data, activity trajectory data, and microenvironment data of the individual livestock and poultry.
[0066] Physiological metabolic data refers to indicators collected through contact or non-contact sensing devices that reflect the internal functional state of livestock and poultry, such as body temperature, respiratory rate, and heart rate; activity trajectory data refers to information recorded through positioning and posture sensing devices that describes the movement process of individual livestock and poultry in the pen, such as position coordinates, movement speed, turning angle, and duration of stay in different functional areas; microenvironment data refers to parameters collected through environmental sensors deployed in and around the individual livestock and poultry pen that describe the conditions of their direct living environment, such as local temperature, humidity, light intensity, and ammonia concentration.
[0067] It should be noted that all sensing devices are connected to a unified time-series data acquisition system. This system ensures that data from different sources are stamped with the same reference timestamp, thereby achieving synchronous acquisition and alignment of multimodal data.
[0068] S102. Based on the physiological metabolic data, the activity trajectory data, and the microenvironment data, construct a multimodal time series diagram characterizing the individual state of livestock and poultry.
[0069] Among them, the multimodal time series graph refers to a unified composite graph model formed by connecting multiple initial network graphs arranged in chronological order, which can dynamically show the evolution of the correlation between indicators over time.
[0070] In one specific implementation, S102 includes:
[0071] Step 1021: Group the physiological metabolic data, the activity trajectory data, and the microenvironment data to obtain multiple time-series data units.
[0072] Among them, a time-series data unit refers to an independent data segment obtained by dividing a continuous sensor data stream into a sliding time window of fixed or adaptive length, which contains all the original modal data and their timestamps within that window.
[0073] In step 1021, a time window length is first set, such as 10 minutes or 1 hour; then, like a sliding window, starting from the synchronously aligned original data starting point, all physiological metabolism, activity trajectory and microenvironment data within each window duration are sequentially extracted, and the data in each window are packaged into an independent time-series data unit.
[0074] It should be noted that the embodiments of this application do not impose a specific limit on the value of the time window length, which can be set according to the actual situation.
[0075] Step 1022: Based on the preset association metric rules, perform modeling on each of the time-series data units to obtain an initial network graph.
[0076] The initial network graph refers to a graph structure constructed with indicators as nodes and correlation strength as edges, used to intuitively represent the interaction relationships between various indicators within a given time period.
[0077] In step 1022, for each independent time-series data unit, a preset correlation measurement rule is applied. This rule defines how to quantify the statistical correlation between any two data indicators, such as respiratory rate and exercise speed, within the time period. Specifically, this can be achieved by calculating the correlation coefficient or mutual information value. After the calculation is completed, each monitored indicator, such as body temperature, location X coordinate, and ambient temperature, is abstracted into a corresponding graph node, and the correlation strength value between each pair of indicators is used as the weight of the edge connecting the two nodes. Then, this operation is performed on all indicator pairs within the current time-series data unit to generate an initial network graph that depicts the multimodal data correlation status within the time period.
[0078] Step 1023: Based on the activity rhythm of the individual livestock and poultry, fuse and connect all the initial network graphs to obtain a multimodal time series graph.
[0079] Among them, activity rhythm refers to the highly repeatable and predictable pattern of behavioral and physiological changes exhibited by individual livestock and poultry during the day-night cycle, such as active feeding during the day and quiet rest at night.
[0080] In step 1023, based on pre-learned or pre-defined knowledge of livestock activity rhythms, such as the fact that nighttime is a resting period and the correlation patterns between indicators may differ from those during the day, the initial network graphs generated in different time periods are differentiated. Specifically, different fusion weights or connection strategies are assigned to network graphs in high-activity and low-activity periods. Then, these weighted network graphs are topologically linked in chronological order by adding cross-time step connection edges between their same nodes, thereby integrating these discrete snapshots into a unified multimodal time series graph that can coherently show how the correlation relationships between indicators evolve together with time and physiological rhythms.
[0081] This application transforms multi-source heterogeneous time-series data into a structured dynamic graph model, which not only preserves the complex spatiotemporal correlation information between the data, but also incorporates the inherent biological rhythms of livestock and poultry to make the model closer to their real state change patterns, thereby laying a reliable analytical foundation for subsequent accurate anomaly detection and state assessment.
[0082] S103. Using a spatiotemporal graph neural network based on the multimodal time series graph and a preset group normal behavior graph library, determine the abnormal patterns of livestock and poultry individuals deviating from the normal state, so as to generate corresponding abnormal pattern vectors.
[0083] Among them, the spatiotemporal graph neural network refers to a deep learning model used to process data that simultaneously possesses spatial correlation and time series change characteristics. It can automatically learn and capture the evolution of node features in the graph over time and their mutual influence with the states of neighboring nodes. The group normal behavior graph library refers to the set of standard patterns of normal correlation between multimodal indicators under typical activity rhythms and their changes over time. This library can be obtained by analyzing a large amount of historical data of similar livestock and poultry individuals in a healthy state.
[0084] An abnormal pattern vector is a compact vector formed by calculating the difference between the current state data of the individual being evaluated and the normal pattern of the group, and quantifying and encoding this difference in multiple dimensions. This vector comprehensively represents the specific aspects and degree of an individual's deviation from the normal state within a specific period of time.
[0085] In step S103, the multimodal time series graph representing the currently evaluated individual constructed in step S102 is first input into a pre-trained spatiotemporal graph neural network model. The core working mechanism of this model is: at each time step, information is transmitted and aggregated along the edge structure of the time series graph and between indicator nodes to update the feature representation of each node; at the same time, the node features of the current time step are associated and fused with the features of multiple past time steps through an internal loop, thereby learning the dynamic pattern of the indicator association state evolving over time.
[0086] Next, the dynamic pattern features extracted by the spatiotemporal graph neural network after analyzing the current individual time series graph are compared and similarity calculated item by item with the corresponding standard patterns in the preset group normal behavior graph library to obtain a comprehensive deviation score. In this embodiment, the similarity calculation process is not specifically limited, and the specific calculation type can be set according to the actual situation.
[0087] Finally, based on the comprehensive deviation score and combined with the specific manifestations of individual behavior on the time axis, such as a sudden drop in activity level or a sudden increase in the correlation of several physiological indicators during a certain period, the details of the deviation are analyzed and encoded. Then, these detailed details about "when", "in which aspects", and "in what way" the deviation from the norm are compressed and organized into a fixed-length numerical vector as the abnormal pattern vector.
[0088] This application utilizes an intelligent model capable of deeply understanding spatiotemporal correlations and systematically compares it with population health benchmarks to automatically and accurately locate subtle and specific abnormal behavioral patterns in individuals from complex multimodal time-series data, and quantifies them into structured features. This provides a crucial basis for subsequent targeted risk assessment and root cause analysis.
[0089] S104. Based on a preset historical epidemic case database, the importance of each node in the multimodal time series graph is calculated using a gradient boosting tree to obtain key indicator data.
[0090] In one specific implementation, such as Figure 2 As shown, S104 includes:
[0091] Step 1041: Extract multiple historical graph samples from the preset historical epidemic case database that are aligned with the multimodal time series graph in terms of time step and feature dimension. The nodes in the historical graph samples contain historical state data, and each historical graph sample is associated with a historical health label.
[0092] The historical disease case database refers to a structured collection of data, where each record corresponds to a historical case of livestock or poultry with a clear diagnosis. The record includes complete multimodal sensor data of the case before, during, and after the onset of the disease. The historical graph sample refers to a data unit extracted from the above database that is completely consistent with the multimodal time series graph of the currently evaluated individual in terms of time length and indicator types. It is also a graph structure itself. The historical health label refers to the category identifier that represents the final health outcome of each historical graph sample, such as "healthy", "early stage of respiratory infection", "mid stage of digestive disease", etc.
[0093] In step 1041, the specifications of the multimodal time series graph of the currently evaluated individual, such as the total duration and all indicator types, are first used as search criteria. Then, a query is performed in the historical epidemic case database to filter out historical individual records that have the exact same set of sensor indicators within the same time window. Then, the multimodal data corresponding to these records are reconstructed into a graph structure data sample, i.e., a historical graph sample, according to the same rules as the current time series graph. At the same time, the final diagnosis results of these historical cases are read from the database records and converted into discrete classification labels as historical health labels for the corresponding historical graph samples.
[0094] For example, historical samples aligned with the multimodal time series graph of the currently assessed individual A are extracted from a historical epidemic case database. The time series graph of individual A is found to be a continuous 24-hour period, containing five monitoring indicators: body temperature, respiratory rate, activity level, location coordinates, and field temperature. Then, the records of historical individual B are retrieved as healthy, and the records of historical individual C are found to be in the early stage of influenza. Both individuals have completely identical data of the five indicators within the same 24-hour period. Subsequently, the data of individuals B and C are used to construct corresponding historical graph samples, and they are labeled with historical health tags, resulting in individual B being labeled as healthy and individual C being labeled as in the early stage of influenza.
[0095] Step 1042: Using a graph attention mechanism, process the historical state data in the historical graph samples to obtain the state encoding vector of each node.
[0096] Among them, the state coding vector refers to a fixed-length numerical vector that aims to represent the deeper information of the original data in a specific context in a more concise form.
[0097] Step 1042 may specifically include the following steps:
[0098] Step a1: Extract the node features and edge features of each node in the historical graph sample.
[0099] Among them, node features refer to the raw sensor data represented by each graph node in the historical graph sample or the basic statistics directly calculated from it, such as the raw body temperature reading at a certain historical moment or the average movement speed over the past hour; edge features refer to the quantitative value of the correlation strength between the indicators connecting two nodes represented by each edge in the historical graph sample at the corresponding moment.
[0100] For example, features are extracted from each node in the sample of historical individual C. The feature value of the body temperature node is the raw sensor reading at a specific hour, such as 39.2 degrees Celsius. Then, the edge connecting the body temperature node and the activity level node is defined by the edge feature value, which is pre-calculated based on the time-series data of both nodes within that time period using the Pearson correlation coefficient formula. We obtained, among which, , Let represent the body temperature reading and exercise volume reading at the i-th time point, respectively. , These represent the average values of the body temperature reading sequence and the exercise reading sequence within the calculation period, respectively, where n represents the total number of data points within the selected period. The obtained Pearson correlation coefficient has a value range of [−1, 1]. For example, the correlation strength value r = 0.85 indicates that body temperature and exercise volume show a strong positive linear correlation during this period.
[0101] Step a2: Construct a dynamic topology graph of the historical graph samples using the edge features.
[0102] Among them, dynamic topology graph refers to the optimized representation of the original graph structure after considering the association strength represented by edge features. It is usually embodied as an adjacency matrix, where the value of the matrix element is determined by the features of the corresponding edge.
[0103] In step a2, a weighted adjacency matrix is constructed based on the information of all nodes and edges in the historical graph samples. The element value in the i-th row and j-th column of the matrix is taken from the association strength feature value of the edge connecting node i and node j. If there is no edge between two nodes, the value of the corresponding position in the matrix is 0. Finally, a dynamic topology graph that can quantify the tightness of the connection between nodes is obtained.
[0104] For example, a dynamic topological graph of the sample can be constructed using all edge features, specifically in the form of a weighted adjacency matrix W, where the elements of the matrix... The value is assigned by the association strength between node i and node j. For example, if the body temperature node is numbered 1 and the exercise amount node is numbered 2, then the value is set as follows: = =r=0.85.
[0105] Step a3: Based on the dynamic topology graph, a graph attention mechanism is used to perform message propagation and feature aggregation on the node features to obtain updated node features.
[0106] In step a3, the initial features of the nodes and the dynamic topology graph are input into the graph attention mechanism. This mechanism first calculates an attention coefficient for each pair of connected nodes. This coefficient is a value between 0 and 1, which is used to quantify how much information the target node i should extract from the features of its neighbor node j when updating its own features. The calculation of this coefficient can be implemented by a learnable, multi-step processing function. In this embodiment, the expression of the processing function is not specifically limited and can be set according to the actual situation.
[0107] First, the feature vectors of the target node i, the feature vectors of its neighboring node j, and the feature values of the edge ij connecting the two are combined and then linearly transformed using a shared weight matrix to extract a new set of feature representations that can reflect the relationship between this specific node pair.
[0108] Next, a dot product operation is performed between a learnable attention vector and the new feature representation, and then passed through a non-linear activation function to calculate a raw, unstandardized relevance score. This score initially characterizes the value of the information carried by the neighbor node j to the target node i under the current context and relevance strength.
[0109] Finally, to ensure that the sum of the attention weights of all neighboring nodes towards the target node is 1, the Softmax function is applied to normalize the original relevance scores calculated for all neighbors of the target node i, resulting in attention coefficients. Then, each node performs a weighted summation of the features of all neighboring nodes according to the normalized attention coefficients calculated above, resulting in aggregated neighbor information. Finally, the node merges the aggregated neighbor information with its own original features to generate updated node features, so that the new features contain both its own state and contextual information from important neighbors.
[0110] For example, a graph attention mechanism can be used to process a dynamic topological graph W. This mechanism first calculates the attention coefficient for each pair of adjacent nodes, and then, for the process of a body temperature node paying attention to its neighboring motion quantity nodes, the attention coefficients... Through a learnable function: Calculate, where, and These are the feature vectors of node i and node j, respectively. Let represent the set of all neighboring nodes of node i. Let g be the association strength value between node i and node j. g() is a learnable scoring function that takes the initial features of the target node, the features of its neighboring nodes, and the edge weights between them as inputs to calculate a raw score representing the importance of node j to node i. This means performing a normalization operation on all neighboring nodes of node i to ensure the attention coefficients for all neighbors j. The sum is 1. This function combines the feature vectors of two nodes and the edge weights between them. For example, the coefficients are... =0.7;
[0111] Subsequently, the body temperature node aggregates features from its neighboring nodes. Then, for information from the activity level node, its weighted contribution is the node's feature value multiplied by an attention coefficient. Assuming the activity level node has a value of x=50 in a certain feature dimension, the weighted contribution in that dimension is 0.7×50=35. Finally, this aggregated contextual information is fused with the node's own features to obtain the updated node feature vector for the body temperature node. .
[0112] Step a4: Perform nonlinear mapping on the features of the updated nodes using a feedforward neural network to obtain the state encoding vector of each node.
[0113] In step a4, the updated node features of each node are input into a feedforward neural network with shared parameters. This network is usually composed of multiple fully connected layers and non-linear activation functions, such as the ReLU function. Then, the network performs a series of complex non-linear transformations on the input features and finally outputs a vector with fixed dimensions, which is more abstract and semantically rich, as the state encoding vector of the node. This vector captures the deep representation of the node in the global graph context of historical health cases.
[0114] For example, updating the node feature vector Input a feedforward neural network, which performs a series of linear transformations and nonlinear activation operations to map and refine the input features; then, after transformation, the final state encoding vector z of the body temperature node is obtained. Assuming the output state encoding vector is z=[0.2, -0.5, 0.8], the operation is repeated for all nodes and all historical samples to generate a corresponding state encoding vector for each node.
[0115] Step 1043: Combine the state encoding vector with the corresponding historical health label, and use gradient boosting tree to perform multiple rounds of training to obtain a strong classifier.
[0116] A strong classifier refers to a final classification model with significantly stronger performance, constructed by integrating multiple weak learning models.
[0117] In step 1043, the state encoding vectors of all generated nodes are first used as features, and the historical health label corresponding to each vector is used as the true label of that vector. Then, a gradient boosting tree model is initialized and multi-round iterative training begins: In the first round, the model directly learns to predict the health label. From the second round onwards, the model no longer directly learns the true label, but focuses on learning the residual between the prediction result of the previous round and the true label. Then, the model is continuously improved by fitting these residuals. In each round of iteration, the model generates a new decision tree to fit the residual of the current round. Finally, the prediction results of the decision trees generated in all rounds are added together to form a powerful strong classifier. This classifier is used to determine whether the historical individual to which a node belongs is healthy or suffers from a specific disease based on the state encoding vector of the node.
[0118] Step 1044: Input the multimodal time series graph into the strong classifier to obtain the importance score of each node's impact on health risk classification.
[0119] In step 1044, the same processing procedure as for historical samples is first performed on the multimodal time series graph of the currently evaluated individual to generate a corresponding state encoding vector for each node in the graph. Then, the set containing the state encoding vectors of all nodes of the current individual is input into the trained strong classifier. Subsequently, each decision tree in the strong classifier processes these vectors. Then, the importance score of the node is calculated by statistically analyzing the frequency of the state encoding vector of each node being used as a splitting feature in the entire decision tree set and the sum of the reduction in classification error brought about by being used as a splitting feature. The higher the score, the more critical the role of the indicator represented by the node in distinguishing between health and risk status.
[0120] For example, for the current multimodal time series graph of individual A, a set of current state encoding vectors is generated for each node. Then, this set of vectors is input into a pre-trained strong classifier F. To quantify the importance of each node, the frequency of the state encoding vector of each node being selected as a splitting feature in all decision trees of the entire gradient boosting tree model is counted, and the reduction in classification error brought about by it is accumulated to obtain the importance score of node i. For example, the importance score of the nighttime core body temperature node Imptemp=95, the importance score of the afternoon exercise distance node Impmove=80, and the importance score of the column ammonia concentration node ImpNH3=30.
[0121] Step 1045: Based on the importance score, sort and filter the nodes in the multimodal time series graph to obtain the target node, and determine the physiological metabolic data, activity trajectory data and microenvironment data corresponding to the target node as key indicator data.
[0122] In this context, target nodes refer to the selected graph nodes that rank highly in importance after being sorted by importance score.
[0123] In step 1045, all nodes are sorted in descending order of importance score. Then, according to a preset screening rule, such as selecting the top 20% of nodes or all nodes with importance scores exceeding a certain threshold, a group of target nodes is selected from the sorted list. These target nodes correspond to the specific indicators in the original multimodal time series graph that are determined by the strong classifier to be the most important for the current individual's health risk assessment. Finally, based on the identification of these target nodes, the original data stream collected in step S101 is traced back, and the original readings or sequences of all physiological metabolic data, activity trajectory data, and microenvironment data belonging to these indicators are extracted and packaged to determine the final key indicator data.
[0124] For example, all nodes are sorted from highest to lowest importance score (Imp). An importance screening threshold θ=60 is set, and the importance score of each node is compared to this threshold to select nodes with scores higher than the threshold as target nodes. Based on the calculation results, since the nighttime core body temperature node (95>60) and the afternoon exercise distance node (80>60) are selected as target nodes, the nighttime core body temperature node and the afternoon exercise distance node are excluded. The ammonia concentration node (30<60) is excluded. Then, based on the identifiers of these two target nodes, the corresponding data sequences are extracted from the original, time-sequentially stored multimodal sensor data stream of individual A. Specifically, the nighttime core body temperature value sequence recorded by individual A every hour over the past 24 hours is extracted; simultaneously, the afternoon exercise distance value sequence recorded every hour is extracted. Finally, these two complete data sequences are output together as the final key indicator data.
[0125] This application, through the above process, can automatically and objectively filter out a few key indicators most relevant to the current individual risk from dozens of monitoring indicators, thereby significantly condensing the data dimensions that need to be monitored and improving the efficiency and pertinence of subsequent state evolution analysis.
[0126] S105. Based on the key indicator data, and combined with the temporal anomaly information in the anomaly pattern vector, perform state evolution to generate a dynamic state sequence.
[0127] In one specific implementation, S105 includes:
[0128] Step 1051: Based on the time-series anomaly information in the anomaly pattern vector, determine the key anomaly time window, and segment the key indicator data according to the key anomaly time window to obtain multiple state segments.
[0129] Among them, the key anomaly time window refers to the specific time period during which one or more livestock and poultry individuals exhibit a significant deviation from the normal state, as parsed from the time-series information contained in the anomaly pattern vector; the state segment refers to several independent data segments obtained by cutting the continuous key indicator data stream according to the determined key anomaly time window, and each segment contains all key indicator readings within its corresponding time window.
[0130] In step 1051, the abnormal pattern vector is first parsed, and time-series information about the specific time of occurrence, duration, and intensity of the abnormality is extracted from it. Then, based on this information, the time periods that need to be focused on are identified, namely the key abnormal time windows. Subsequently, according to the start and end times of these time windows, the key indicator data stream obtained in step S104 is segmented to divide the data into multiple state segments corresponding to normal and abnormal time periods.
[0131] Step 1052: Based on the activity rhythm of the livestock and poultry individuals, perform evolutionary modeling on all the state segments to obtain candidate state sequences.
[0132] Among them, the candidate state sequence is a hypothetical descriptive sequence used to describe how an individual state initially evolves over time.
[0133] In step 1052, based on the pre-recorded knowledge of the activity rhythms of individual livestock and poultry, such as the individual being active during the day and resting at night, different evolutionary modeling strategies are applied to state segments of different time periods. For example, for state segments during the nighttime resting period, it may be assumed that the state changes are gradual, while for state segments during the daytime active period or the identified abnormal period, a more complex model may be used to capture its dynamic changes. Then, by connecting the modeling results of all time segments, a preliminary candidate state sequence reflecting how the state changes over time is formed.
[0134] Step 1053: Based on the preset historical evolution path, optimize and align the candidate state sequence to generate a dynamic state sequence.
[0135] Among them, the historical evolution path refers to a series of pattern templates summarized from the historical disease case database, used to depict the typical stages and processes that livestock and poultry go through from a healthy state to a specific disease state.
[0136] In step 1053, a preset historical evolution path library is invoked, which stores state change templates for various typical disease development processes. Then, the candidate state sequence generated in step 1052 is compared with these state change templates to find the best matching template. After that, unreasonable state jumps or temporal relationships in the candidate state sequence are smoothed and adjusted according to the specifications of the matching template, and the phase of the candidate state sequence is aligned with the key stage points of the template. Finally, a dynamic state sequence that is more consistent with the known pathological development law and has a coherent temporal sequence is output.
[0137] This application enables the generation of a standardized state trajectory that better reflects the actual physiological evolution of an individual and removes short-term noise interference through this step, thereby providing a high-quality input with clear temporal significance for the final accurate and reliable comprehensive state assessment.
[0138] S106. Use a random forest model to learn the feature representation of the dynamic state sequence to obtain a state assessment report for individual livestock and poultry.
[0139] In one specific implementation, S106 includes:
[0140] Step 1061: Input the dynamic state sequence into a temporal convolutional network composed of stacked one-dimensional causal convolutional layers and dilated convolutional layers. The temporal convolutional network captures the multi-scale evolution pattern of livestock and poultry health status from the incubation period, subclinical period to the onset period in the dynamic state sequence, and obtains deep temporal features.
[0141] Among them, the one-dimensional causal convolutional layer ensures that the current output depends only on the past and current inputs, while the dilated convolutional layer expands the receptive field through interval sampling, thereby capturing multi-scale time patterns in the sequence where short-term fluctuations and long-term trends coexist. Deep time series features are more discriminative time series representations than the original dynamic state sequence, and they encode complex time series patterns in the sequence related to the evolution of health status.
[0142] In step 1061, the dynamic state sequence generated in S105 is input into a pre-built and trained temporal convolutional network. Then, the causal convolutional layers in the temporal convolutional network scan the input sequence sequentially in time order to extract feature patterns within the local time window, while ensuring that the output does not depend on future information. The dilated convolutional layers, based on causal convolution, connect inputs at earlier time points in a skip manner and expand the model's receptive field without increasing the number of parameters, thereby capturing long-term evolution trends across different stages such as latency and subclinical period. Finally, the network extracts and fuses multi-scale temporal information layer by layer through this structure and outputs a deep temporal feature vector that can comprehensively reflect the state evolution law.
[0143] For example, the dynamic state sequence of individual A is input into a trained temporal convolutional network containing three layers: the first layer is a causal convolution with a kernel size of 3, the second layer is a dilated convolution with an inflation rate of 2, and the third layer is a causal convolution with a kernel size of 5. After processing by the network, an original sequence with a length of 24 hours and containing 5 state dimensions is transformed into a deep temporal feature vector containing 256 feature dimensions.
[0144] Step 1062: Based on the differences in activity and metabolism of individual livestock and poultry under diurnal rhythms, the deep temporal features are input into an adjustment module based on a channel attention mechanism. The adjustment module adaptively adjusts the deep temporal features to obtain weighted temporal features.
[0145] Among them, the channel attention mechanism can automatically learn and assign different importance weights to each component of the input feature vector, i.e., different "channels", so that the model can pay more attention to the feature dimensions with rich information. The weighted temporal features refer to the deep temporal features adjusted by the channel attention mechanism, in which each feature dimension is reweighted according to its importance in representing the state differences of livestock and poultry under the diurnal rhythm, making the feature representation more targeted.
[0146] In step 1062, the output deep temporal feature vector is input into an adjustment module based on a channel attention mechanism. This module first analyzes the content of each channel of the feature vector through a small neural network and automatically calculates the importance score of each channel, i.e., the attention weight. The calculation process can be as follows: first, global average pooling is performed on the input features to obtain the global information of each channel, and then an attention weight vector with the same number of input channels is generated through a two-layer fully connected network with a bottleneck structure and a sigmoid activation function, where each weight value is between 0 and 1.
[0147] Finally, each channel of the original deep temporal feature vector is multiplied by its corresponding attention weight to obtain a weighted temporal feature vector that highlights important information and suppresses secondary information.
[0148] For example, when a 256-dimensional vector is input into the channel attention module, the module first calculates the global average value for each channel, resulting in a 256-dimensional summary vector. This vector is then passed through a fully connected network that can compress the 256-dimensional vector to 16 dimensions and then restore it to 256 dimensions. Finally, it is activated by the sigmoid function to generate a 256-dimensional attention weight vector W. att Assuming the channel weight for "nighttime resting metabolic trend" is 0.9, and the channel weight for "afternoon instantaneous activity peak" is 0.4; then, each channel of the deep time-series feature vector is multiplied by W. att The corresponding weights are used to obtain the weighted time series feature vector.
[0149] Step 1063: Use a random forest model to make decisions and integrate the weighted time series features to obtain a discriminant vector.
[0150] The discriminant vector is a one-dimensional numerical vector representing the probability or confidence level of an individual animal belonging to various predefined health states. For example, the vector can include the probability of multiple state categories such as healthy, sub-healthy, disease risk, and clinical disease.
[0151] It should be understood that before performing step 1063, the random forest model uses a large amount of historical case data during the training phase. Its training objective is to learn the mapping from weighted time-series features to the correct health status label. The specific training process includes: generating multiple sub-sample sets from the training set through bootstrap sampling, and training a decision tree independently for each sub-sample set. When splitting a node in each tree, a subset is randomly selected from all features and the best split point is chosen from it to increase the difference between trees.
[0152] After the model training is completed, the model application phase begins. In the model application phase, step 1063 may specifically include the following steps:
[0153] Step b1: Use multiple decision trees in the random forest model to spatially partition the weighted temporal features to obtain multiple decision paths.
[0154] The decision path refers to the complete decision route taken by the input feature vector in a single decision tree, starting from the root node and following a series of judgment conditions based on feature values, to finally reach a certain leaf node.
[0155] In step b1, the weighted temporal feature vector is simultaneously input into each decision tree in the random forest. Then, each decision tree divides the feature vector into a specific region in its decision space according to a series of judgment rules, thereby forming a decision path from the root node to a certain leaf node.
[0156] It should be noted that the specific content of the judgment rules in this application embodiment is not specifically limited, and can be set accordingly according to the actual situation.
[0157] For example, a weighted temporal feature vector is input into a random forest model containing 100 decision trees. The vector is processed by the 100 trees simultaneously. For example, the first tree assigns it to "leaf node A" according to its rules, the second tree assigns it to "leaf node B", and so on, resulting in a total of 100 decision paths.
[0158] Step b2: Based on the contribution of the weighted temporal features to each decision tree during the training phase, assign a path confidence weight to the output of each decision path.
[0159] Among them, path confidence weight refers to a confidence coefficient assigned to the output of each decision path.
[0160] In step b2, a path confidence weight is calculated based on the overall classification accuracy of each decision tree on the training set and the contribution of the current input weighted temporal feature vector to the tree's decision-making process. This weight reflects the confidence coefficient based on the tree and the path.
[0161] For example, based on historical performance, the overall weight of the first tree is set to 0.011, and that of the second tree is 0.01. Meanwhile, since the current vector makes a significant contribution to the split of the first tree, its path confidence weight can be increased to 0.012 according to the preset adjustment step size, while the path confidence weight of the second tree remains at 0.01.
[0162] Step b3: Using the path confidence weights, perform weighted aggregation on the node results of all decision paths to obtain the original probability distribution.
[0163] In step b3, for each decision path, its terminal leaf node stores the distribution of each category of the samples falling into that node during training, and this distribution is regarded as the "node result" of the path. Then, the node results of all decision paths are weighted and averaged according to their corresponding path confidence weights to obtain a preliminary original probability distribution that integrates all tree opinions.
[0164] For example, leaf node A stores historical sample distributions for healthy, subclinical, and diseased individuals with [0.8, 0.15, 0.05], and leaf node B stores historical sample distributions with [0.7, 0.2, 0.1]. Then, a weighted average is used to calculate the original probability distributions: the probability of being healthy is 0.75, the probability of being subclinical is 0.17, and the probability of being diseased is 0.08.
[0165] Step b4: Introduce a smoothing constraint term to correct the original probability distribution and obtain the final probability distribution, which serves as the discrimination vector.
[0166] Among them, the smoothing constraint is an optimization condition based on temporal continuity introduced in the model inference stage. It is used to constrain the abrupt changes in the model output probability distribution within adjacent time periods, making its changes more gradual and reasonable.
[0167] In step b4, considering that the evolution of health status in a short period of time is usually continuous, a smoothing constraint term is introduced. This constraint term causes the final probability distribution at the current moment to depend not only on the original probability distribution, but also on the probability distributions output at one or more neighboring moments. Then, the original distribution is corrected by a weighted smoothing function to obtain a more coherent and reasonable final probability distribution in time series.
[0168] For example, by combining the final probability distribution from the previous period, such as 1 hour ago [0.80, 0.15, 0.05], a smoothing function can be used for correction, such as taking a weighted average, to obtain the final probability distribution [0.77, 0.16, 0.07].
[0169] Step 1064: Perform feature concatenation between the discrimination vector and the physiological features derived from the key indicator data to obtain a fused feature vector.
[0170] In step 1064, the discriminant vector is concatenated with a set of scalar features representing the core physiological condition that are directly calculated or derived from the determined key indicator data. For example, these physiological features may include statistical quantities such as the mean, variance, and slope of the key indicators in a recent period. The discriminant vector is then concatenated with these physiological feature vectors to form a fusion feature vector with higher dimensions and more comprehensive information.
[0171] Step 1065: Input the fused feature vector into a lightweight multilayer perceptron decoder. The multilayer perceptron decoder decodes the fused feature vector and, in conjunction with a pre-set prior knowledge base in the field of animal husbandry and veterinary medicine, maps the decoding results according to rules to generate a status assessment report for individual livestock and poultry.
[0172] Among them, the multilayer perceptron decoder refers to a simple neural network composed of multiple fully connected layers, used to map or "decode" high-dimensional fused feature vectors into a lower-dimensional intermediate representation that is closer to the final report form; the prior knowledge base in the field of animal husbandry and veterinary medicine refers to a structured database or set of rules that contains typical value ranges, correlations and diagnostic experience of various physiological and behavioral indicators of different livestock and poultry breeds at different growth stages and under different health states, summarized by domain experts.
[0173] For example, from the key indicator data of individual A, such as the core body temperature sequence at night, the mean and variance of the past 6 hours are calculated as physiological features to obtain the vector [39.1, 0.05]. Then, this physiological feature vector is concatenated with the discriminant vector [0.77, 0.16, 0.07] to obtain the fused feature vector [0.77, 0.16, 0.07, 39.1, 0.05].
[0174] In step 1065, the fused feature vector is input into a lightweight multilayer perceptron decoder, which typically consists of two to three fully connected layers with nonlinear activation functions between layers. The decoder's role is to progressively map the high-dimensional fused features to an intermediate representation more suitable for report generation. Subsequently, a pre-defined prior knowledge base in the animal husbandry and veterinary field is invoked. This knowledge base contains a series of rules based on expert experience, such as "if the probability of fever is high and feed intake decreases by more than 30%, it indicates a high risk of infection." The intermediate representation output by the decoder is then matched and mapped with the rules in the knowledge base, and the abstract numerical vector is transformed into a specific, structured natural language description or standardized code. Finally, an individual livestock and poultry status assessment report containing health status conclusions, risk levels, attention indicators, and management recommendations is generated.
[0175] For example, this fused feature vector is input into a decoder with two fully connected layers, which maps it to a 3-dimensional decision code, such as [1.2, -0.5, 0.3]. Then, a prior knowledge base is queried, containing the rule: "If the first dimension of the decision code > 1.0 and the mean body temperature > 39.0°C, the assessment is 'low-grade fever incubation period, recommended to strengthen observation and supplement with vitamins'." Based on this rule, the numerical code is mapped into natural language, ultimately generating a status assessment report: "Assessment subject: Individual A; Current status: Low-grade fever incubation period; Risk level: Low; Main basis: Slightly elevated core body temperature, accompanied by an increased probability of subclinical status; Management recommendation: Increase observation frequency and add multivitamins to drinking water."
[0176] This application, through the above process, can generate a comprehensive status assessment report from complex dynamic sequences that has both high-precision machine learning judgment and interpretable expert rule support, thereby improving the accuracy, reliability, and practical guidance value of automated assessment of livestock and poultry health status.
[0177] Figure 3 This application provides a schematic diagram of a specific implementation of a livestock and poultry condition assessment system based on multimodal sensors and artificial intelligence, as illustrated in the embodiments of this application. Figure 3 The system may include:
[0178] The acquisition module 31 is used to acquire physiological metabolic data, activity trajectory data, and microenvironment data of the individual livestock and poultry.
[0179] The construction module 32 is used to construct a multimodal time series diagram representing the state of individual livestock and poultry based on the physiological metabolic data, the activity trajectory data, and the microenvironment data.
[0180] The determination module 33 is used to use a spatiotemporal graph neural network to determine abnormal patterns of livestock and poultry individuals that deviate from the norm based on the multimodal time series graph and a preset group normal behavior graph library, so as to generate corresponding abnormal pattern vectors.
[0181] The calculation module 34 is used to calculate the importance of each node in the multimodal time series graph based on a preset historical epidemic case database and using a gradient boosting tree to obtain key indicator data.
[0182] Evolution module 35 is used to perform state evolution based on the key indicator data and the temporal anomaly information in the anomaly pattern vector to generate a dynamic state sequence.
[0183] Learning module 36 is used to learn the feature representation of the dynamic state sequence using a random forest model to obtain a state assessment report of the livestock and poultry individuals.
[0184] The livestock and poultry status assessment system based on multimodal sensors and artificial intelligence in this application embodiment is used to implement the aforementioned livestock and poultry status assessment method based on multimodal sensors and artificial intelligence. Therefore, the specific implementation of the livestock and poultry status assessment system based on multimodal sensors and artificial intelligence can be found in the embodiment section of the livestock and poultry status assessment method based on multimodal sensors and artificial intelligence mentioned above. The specific implementation can be referred to the description of the corresponding embodiments, which will not be repeated here.
[0185] like Figure 4 As shown, this application also provides an electronic device, including: a memory 41 for storing a computer program; and a processor 42 for executing the computer program to implement the steps of any of the above-described livestock and poultry status assessment methods based on multimodal sensors and artificial intelligence.
[0186] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described methods for assessing the state of livestock and poultry based on multimodal sensors and artificial intelligence.
[0187] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory, random access memory, portable hard drives, magnetic disks, or optical disks.
[0188] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the livestock and poultry status assessment method based on multimodal sensors and artificial intelligence.
[0189] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0190] The foregoing has provided a detailed description of a livestock and poultry condition assessment method and system based on multimodal sensors and artificial intelligence, as provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. A method for assessing the condition of livestock and poultry based on multimodal sensors and artificial intelligence, characterized in that, include: Obtain physiological and metabolic data, activity trajectory data, and microenvironment data of the individual livestock and poultry; Based on the physiological metabolic data, the activity trajectory data, and the microenvironment data, a multimodal time series diagram characterizing the state of individual livestock and poultry is constructed; A spatiotemporal graph neural network is used to determine abnormal patterns of livestock and poultry individuals deviating from the norm based on the multimodal time series graph and a preset group normal behavior graph library, so as to generate corresponding abnormal pattern vectors. Based on a pre-set historical epidemic case database, the importance of each node in the multimodal time series graph is calculated using a gradient boosting tree to obtain key indicator data; Based on the key indicator data, and combined with the temporal anomaly information in the anomaly pattern vector, state evolution is performed to generate a dynamic state sequence. The dynamic state sequence is learned by using a random forest model to obtain a state assessment report for individual livestock and poultry.
2. The method according to claim 1, characterized in that, The database of historical epidemic cases, based on a preset model, uses a gradient boosting tree to calculate the importance of each node in the multimodal time series graph, obtaining key indicator data, including: Multiple historical graph samples are extracted from a pre-set historical epidemic case database and are aligned with the multimodal time series graph in terms of time step and feature dimension. The nodes in the historical graph samples contain historical state data, and each historical graph sample is associated with a historical health label. A graph attention mechanism is used to process the historical state data in the historical graph samples to obtain the state encoding vector of each node; By combining the state encoding vector with the corresponding historical health label, a strong classifier is obtained through multiple rounds of training using a gradient boosting tree. The multimodal time series graph is input into the strong classifier to obtain the importance score of each node's impact on health risk classification; Based on the importance score, the nodes in the multimodal time series graph are sorted and filtered to obtain the target node, and the physiological metabolic data, activity trajectory data and microenvironment data corresponding to the target node are determined as key indicator data.
3. The method according to claim 2, characterized in that, The graph attention mechanism is used to process the historical state data in the historical graph samples to obtain the state encoding vector of each node, including: Extract the node features and edge features connecting the nodes of each node in the historical graph sample; Using the edge features, a dynamic topological graph of the historical graph samples is constructed; Based on the dynamic topology graph, a graph attention mechanism is used to perform message propagation and feature aggregation on the node features to obtain updated node features. The state encoding vector of each node is obtained by nonlinearly mapping the features of the updated node through a feedforward neural network.
4. The method according to claim 1, characterized in that, The method employs a random forest model to learn feature representations for the dynamic state sequence, resulting in a state assessment report for individual livestock and poultry, including: The dynamic state sequence is input into a temporal convolutional network consisting of stacked one-dimensional causal convolutional layers and dilated convolutional layers. The temporal convolutional network captures the multi-scale evolution pattern of livestock and poultry health status from the latent period, subclinical period to the onset period in the dynamic state sequence, and obtains deep temporal features. To address the differences in activity and metabolism among individual livestock and poultry under diurnal rhythms, the deep temporal features are input into an adjustment module based on a channel attention mechanism. The adjustment module adaptively adjusts the deep temporal features to obtain weighted temporal features. A random forest model is used to make decisions and integrate the weighted time-series features to obtain a discriminant vector. The discrimination vector is concatenated with the physiological features derived from the key indicator data to obtain a fused feature vector; The fused feature vector is input into a lightweight multilayer perceptron decoder. The multilayer perceptron decoder decodes the fused feature vector and combines it with a pre-set prior knowledge base in the field of animal husbandry and veterinary medicine. The decoding result is then mapped according to rules to generate a status assessment report for individual livestock and poultry.
5. The method according to claim 4, characterized in that, The random forest model is used to make decisions and integrate the weighted time-series features to obtain a discriminant vector, including: Multiple decision trees in the random forest model are used to spatially partition the weighted temporal features, resulting in multiple decision paths; Based on the contribution of the weighted temporal features to each decision tree during the training phase, a path confidence weight is assigned to the output of each decision path. Using the path confidence weights, the node results of all the decision paths are weighted and aggregated to obtain the original probability distribution; A smoothing constraint term is introduced to correct the original probability distribution, resulting in a final probability distribution, which serves as the discrimination vector.
6. The method according to claim 1, characterized in that, The construction of a multimodal time-series graph characterizing the individual state of livestock and poultry based on the physiological metabolic data, the activity trajectory data, and the microenvironment data includes: The physiological metabolic data, the activity trajectory data, and the microenvironment data are grouped to obtain multiple time-series data units; Based on the preset association metric rules, modeling is performed on each of the time-series data units to obtain an initial network graph; Based on the activity rhythms of the individual livestock and poultry, all the initial network graphs are fused and connected in topology to obtain a multimodal time series graph.
7. The method according to claim 1, characterized in that, The process of generating a dynamic state sequence based on the key indicator data and the temporal anomaly information in the anomaly pattern vector includes: Based on the time-series anomaly information in the anomaly pattern vector, key anomaly time windows are determined, and the key indicator data are segmented according to the key anomaly time windows to obtain multiple state segments. Based on the activity rhythms of the livestock and poultry individuals, evolutionary modeling is performed on all the state segments to obtain candidate state sequences; Based on a preset historical evolution path, the candidate state sequence is optimized and aligned to generate a dynamic state sequence.
8. A livestock and poultry condition assessment system based on multimodal sensors and artificial intelligence, characterized in that, include: The acquisition module is used to acquire physiological and metabolic data, activity trajectory data, and microenvironment data of the individual livestock and poultry. The construction module is used to construct a multimodal time series diagram representing the state of individual livestock and poultry based on the physiological metabolic data, the activity trajectory data, and the microenvironment data. The determination module is used to use a spatiotemporal graph neural network to determine abnormal patterns of livestock and poultry individuals deviating from the norm based on the multimodal time series graph and a preset group normal behavior graph library, so as to generate corresponding abnormal pattern vectors. The calculation module is used to calculate the importance of each node in the multimodal time series graph based on a preset historical epidemic case database and using a gradient boosting tree to obtain key indicator data; The evolution module is used to perform state evolution based on the key indicator data and the temporal anomaly information in the anomaly pattern vector, and generate a dynamic state sequence. The learning module is used to learn the feature representation of the dynamic state sequence using a random forest model to obtain a state assessment report for individual livestock and poultry.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the livestock and poultry condition assessment method based on multimodal sensors and artificial intelligence as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the livestock and poultry status assessment method based on multimodal sensors and artificial intelligence as described in any one of claims 1 to 7.