A sheep health assessment method, system, device and medium
Patent Information
- Application Number
- CN202611415910.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-10-16
AI Technical Summary
但是现有方法中对多源数据仅作孤立阈值判断,忽视指标间的时序协同关联,无法从数据中提取深层的语义耦合表征,造成对早期疾病或亚健康状态的征兆不敏感,导致准确率低,误判风险高,难以全面、深度反映羊只的真实生理健康状态,无法支撑早期干预与精准决策
本发明通过将生理、行为与生长性能等多模态数据映射至统一特征空间并进行时序编码,利用双流异质注意力机制分别捕获不同变量间的动态协同依赖关系与跨时间步的上下文交互,能够从多源异构数据中提取深层的语义耦合表征,该表征可灵敏反映羊只健康状态的细微协同变化,有效克服了现有技术因孤立阈值判断而忽视指标间时序关联的缺陷,在疾病早期或亚健康阶段即可准确捕捉异常征兆,推动健康管理从被动治疗转向主动预防,显著降低漏报与误判风险,为养殖者提供可信的决策依据,有力支撑早期精准干预与精细化管理。
Smart Images

Figure CN122930540A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart agriculture technology, and in particular to a method, system, device and medium for assessing sheep health. Background Technology
[0002] Against the backdrop of the rapid development of smart agriculture, smart animal husbandry, as a key component, is driving the transformation and upgrading of the livestock industry towards precision and intelligence. As intensive farming models gradually advance, intelligent health monitoring of individual livestock is a core technological support for improving farming management efficiency, ensuring animal welfare, and optimizing economic benefits.
[0003] To better monitor and intervene in sheep health, existing technologies have gradually developed non-contact computer vision identification and contact sensors to collect some physiological and behavioral parameters of sheep (such as body temperature and activity level), and to trigger alarms based on set thresholds. This effectively reduces the frequency of restraining sheep and lowers animal stress and safety risks. However, existing methods only make isolated threshold judgments on multi-source data, ignoring the temporal synergistic correlation between indicators. They cannot extract deep semantic coupling representations from the data, resulting in insensitivity to early signs of disease or sub-health, leading to low accuracy, high risk of misjudgment, and an inability to comprehensively and deeply reflect the true physiological health status of sheep, thus failing to support early intervention and accurate decision-making. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of the prior art by providing a method, system, device, and medium for sheep health assessment, thereby solving the problems in the prior art.
[0005] The present invention specifically provides the following technical solution: A method for assessing sheep health includes: Collect physiological, behavioral, and growth performance data of sheep; The physiological data, behavioral data, and growth performance data are mapped to a feature space of uniform length and dimension, and the mapped dimension-aligned multimodal data are then encoded temporally and positionally. The time-encoded data is processed using a multivariate attention mechanism to capture the dependencies and dynamic interactions between different variables; the position-encoded data is processed using a multi-head cross-modal attention mechanism to obtain the contextual dependencies of different positions; the time-encoded data processing results and the position-encoded data processing results are used as the dual-stream heterogeneous attention results, which are then input into a feedforward network to extract semantic features. The semantic features are then projected and mapped to obtain the semantic coupling representation in the model's latent space, and the semantic coupling representation is then coordinated and scheduled to generate multiple inference paths. Multiple logical reasoning paths are parsed and converted into logic trees. The logical consistency score of the logic trees is evaluated based on rules, and the logic tree with the highest score is selected to output the corresponding final health assessment level.
[0006] Preferably, the collection of physiological, behavioral, and growth performance data of sheep specifically includes: Physiological and behavioral data were obtained by using electronic ear tags attached to sheep's ears and rumen capsules inserted into sheep's stomachs. Weight is obtained from growth performance data using an automated electronic weighing device, and image information is obtained using a depth camera installed on the automated electronic weighing device. The image information is processed and three-dimensional reconstruction and key point detection are performed to obtain growth performance data. Among them, the physiological data includes body temperature, rumen temperature, gastric motility and rumen pH value, the behavioral data includes exercise volume, posture and water intake rate, and the growth performance data includes weight and body size.
[0007] Preferably, the physiological data, behavioral data, and growth performance data are mapped to a feature space of uniform length and dimension, specifically as follows: For each modality of time series data in physiological data, behavioral data, and growth performance data, convolution operations are performed using different one-dimensional convolution kernels to map modal data of different lengths and sampling rates to feature spaces of the same length and dimension, thus obtaining dimension-aligned multimodal data.
[0008] Preferably, the time-encoded data is processed using a multivariate attention mechanism to capture the dependencies and dynamic interactions between different variables, specifically: The data obtained by time encoding is mapped to a fixed-dimensional vector space to capture the dependencies of time series. By employing a multivariate attention mechanism, the system captures the dependencies and dynamic interactions between different variables based on the perception of temporal order and time series dependencies.
[0009] Preferably, the step of coordinating the scheduling of semantically coupled representations to generate multiple reasoning paths specifically involves: Multiple inference chains are sampled for the same input using explicit thought chain cues; wherein the input is a semantically coupled representation. Based on the signals of correctness and logical consistency, multiple reasoning chains are weighted and filtered through a dynamic advantage strategy, and the diagnostic task is decomposed into a step-by-step reasoning process to obtain multiple reasoning paths.
[0010] Preferably, the step of parsing and converting multiple logical reasoning paths into logic trees, evaluating the logical consistency score of the logic trees based on rules, and selecting the logic tree with the highest score to output the corresponding final health assessment level is as follows: The logical reasoning path is parsed and broken down into triples, the triples are assembled and connected into a tree structure, and a rule-based logic verifier is used to score the health of the triples; wherein, the triples include health assessment rules, evidence of assessment level, and deduced sheep health detection level; Validation of triples using a rule-based logic validator. Score based on the logical validity of K triples in the logic tree. The average and aggregation yield the health score S of the logic tree; where, =1 indicates that the conclusion is strictly derived from the premises. A value of 0.5 indicates that the relevance of the reasoning is weaker than the relevance threshold. =0 indicates a contradiction or complete irrelevance; Based on the health score S, the health level of the sheep is output. The level includes: excellent, up to standard, warning, and diseased. The level is divided according to a preset scoring range: S=1 corresponds to excellent, 0.75≤S<1.0 corresponds to up to standard, 0.5≤S<0.75 corresponds to warning, and 0≤S<0.5 corresponds to diseased.
[0011] Preferred options also include: The physiological, behavioral, and growth performance data were repaired, cleaned, and smoothed using moving average, median filtering, and linear interpolation methods. The processed high-frequency data is downsampled, and the processed low-frequency data is upsampled using spline interpolation to obtain consistent multimodal data in the time dimension; where the high-frequency data represents the time interval in hours, and the low-frequency data represents the time interval in weeks.
[0012] This invention provides a method and system for assessing sheep health, comprising: The data acquisition module is used to collect physiological, behavioral, and growth performance data of sheep. The encoding module is used to map the physiological data, behavioral data, and growth performance data to a feature space of uniform length and dimension, and to perform time encoding and position encoding on the mapped dimension-aligned multimodal data. The inference module is used to apply a multivariate attention mechanism to the time-encoded data to capture the dependencies and dynamic interactions between different variables; to apply a multi-head cross-modal attention mechanism to the position-encoded data to obtain the contextual dependencies of different positions; to use the time-encoded data processing results and the position-encoded data processing results as the dual-stream heterogeneous attention results, to input the dual-stream heterogeneous attention results into the feedforward network to extract semantic features, to project and map the semantic features to obtain the semantic coupling representation in the model latent space, and to coordinately schedule the semantic coupling representation to generate multiple inference paths; The evaluation module is used to parse multiple logical reasoning paths and convert them into logic trees. Based on rules, it evaluates the logical consistency score of the logic trees and selects the logic tree with the highest score to output the corresponding final health evaluation level.
[0013] The present invention provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described sheep health assessment method.
[0014] Compared with the prior art, the present invention has the following significant advantages: This invention maps multimodal data, including physiological, behavioral, and growth performance data, to a unified feature space and performs temporal encoding. By utilizing a two-stream heterogeneous attention mechanism, it captures the dynamic collaborative dependencies and cross-time step contextual interactions between different variables. This enables the extraction of deep semantic coupling representations from multi-source heterogeneous data. These representations can sensitively reflect subtle collaborative changes in the health status of sheep, effectively overcoming the shortcomings of existing technologies that ignore the temporal correlation between indicators due to isolated threshold judgments. It can accurately capture abnormal signs in the early stages of disease or sub-health, promoting health management from passive treatment to proactive prevention, significantly reducing the risk of underreporting and misjudgment, providing farmers with reliable decision-making basis, and strongly supporting early precision intervention and refined management. Attached Figure Description
[0015] Figure 1 This is a schematic diagram illustrating the data monitoring, collection, storage, and display based on the Internet of Things (IoT) of this invention; Figure 2 This is a detailed flowchart of the data preprocessing steps of the present invention; Figure 3 This is a schematic diagram of data encoding in different directions according to the present invention; Figure 3 (a) is the position encoding result. Figure 3 (b) is the sequence encoding result; Figure 4 This is a detailed flowchart of the multimodal data fusion sheep health analysis of the present invention; Figure 5 This is a flowchart of a sheep health assessment method provided by the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0017] like Figure 5 As shown, this application provides a method for assessing sheep health, including the following steps: Step 1: Collect physiological, behavioral, and growth performance data of sheep; among which, physiological data include body temperature, rumen temperature, gastric motility, and rumen pH; behavioral data include activity level, posture, and water intake rate; and growth performance data include body weight and body size.
[0018] Physiological and behavioral data were obtained by using an electronic ear tag attached to the sheep's ear and a rumen capsule placed in the sheep's stomach. The physiological data included body temperature, rumen temperature, gastric motility, and rumen pH. The behavioral data included activity level, posture, and water intake rate.
[0019] A first growth performance data, including body weight, is obtained using an automatic electronic weighing device. A depth camera is installed on the automatic electronic weighing device, and image information is obtained by taking pictures using the depth camera. The image information is processed and three-dimensional reconstruction is performed, followed by key point detection to obtain a second growth performance data, including body size.
[0020] Physiological data, behavioral data, first growth performance data, and second growth performance data are stored in a network cloud server at a preset frequency.
[0021] Specifically, obtaining the first growth performance data using an automatic electronic weighing device includes: An RFID ear tag reader is embedded in the railing above the automatic electronic weighing device. The reader reads the unique RFID identifier of the sheep's ear tag. The automatic electronic weighing device is equipped with four gravity sensors and a microcontroller. The microcontroller integrates a filtering algorithm and is configured to receive and filter weighing data every 2 minutes for a specified number of times, outputting the average weighing value as the final accurate weight of the sheep. The weighing cycle is set to once a week to acquire the accurate weight value, associate the accurate weight value with the unique RFID identifier, and upload the associated data to a cloud server via the reader.
[0022] Specifically, acquiring image information using a depth camera includes: An RFID ear tag reader is embedded in the railing above the automatic electronic weighing device. This reader reads the unique RFID identifier of each sheep's ear tag. A depth camera captures color and depth images of the sheep. A body size parameter calculation module, based on the RTMPose (Real-Time Multi-Person PoseEstimation Network) framework, processes the color and depth images to perform 3D reconstruction and key point detection. It then calculates body size parameters including length, height, chest width, chest depth, chest circumference, cross-shaped height, and hip width. The weighing cycle is set to one week, at which the body size data is acquired periodically and associated with the unique RFID identifier. The associated data is then uploaded to a cloud server via the reader's 4G module.
[0023] Step 2: Map physiological data, behavioral data, and growth performance data to a feature space of uniform length and dimension, and perform time encoding and location encoding on the mapped dimension-aligned multimodal data.
[0024] This also includes performing anomaly processing, dimensionality reduction, or dimensionality enhancement operations on at least one of the physiological data, behavioral data, first growth performance data, and second growth performance data to obtain a high-quality multimodal dataset, specifically: At least the moving average, median filtering, and linear interpolation methods should be used to repair, clean, and smooth the acquired sheep physiological data, behavioral data, first growth performance data, and second growth performance data to achieve data continuity and stability. High-frequency data should be downsampled, and low-frequency data should be upsampled using spline interpolation to complete the data in the time dimension and ensure data consistency in the time dimension.
[0025] like Figure 4 As shown, physiological data, behavioral data, and growth performance data are mapped to a feature space of uniform length and dimension to obtain dimension-aligned multimodal data, specifically: For time series data of each modality, including physiological data, behavioral data, and growth performance data in high-quality datasets, convolution operations are performed using different one-dimensional convolution kernels to map modal data of different lengths and sampling rates to feature spaces of the same length and dimension, resulting in dimension-aligned multimodal data. This eliminates the data dimension differences between modalities and provides a dimension-aligned foundation for subsequent multimodal feature fusion analysis.
[0026] Specifically, time-based and location-based encoding is performed on dimension-aligned multimodal data. Position encoding is performed on the dimensionally aligned multimodal data using sine and cosine functions of different frequencies, and the relative position information of the sequence is captured through linear transformation. Multilayer perceptron (MLP) is used to perform time encoding on the time series of each data variable, mapping the time series data to a fixed-dimensional vector space with rich semantics, in order to capture the dependencies of the time series.
[0027] Step 3: Apply a multivariate attention mechanism to the time-encoded data to capture the dependencies and dynamic interactions between different variables; apply a multi-head cross-modal attention mechanism to the position-encoded data to obtain the contextual dependencies of different positions; use the time-encoded data processing results and the position-encoded data processing results as the dual-stream heterogeneous attention results, input the dual-stream heterogeneous attention results into the feedforward network to extract semantic features, project and map the semantic features to obtain the semantic coupling representation in the model latent space, and perform collaborative scheduling of the semantic coupling representation to generate multiple inference paths.
[0028] A projection matrix is used to map the dual-stream heterogeneous attention results of time-encoded and location-encoded data to the semantic coupling representation of the model latent space. The semantic coupling representation provides the foundation for subsequent logical reasoning.
[0029] The time-encoded data is mapped to a fixed-dimensional vector space to capture the dependencies of time series; a multivariate attention mechanism is used to capture the dependencies and dynamic interactions between different variables based on the perception of time order and time series dependencies.
[0030] By utilizing explicit thought chain cues, multiple reasoning paths are sampled for the same input through a strategy, where the input is a semantically coupled representation. Based on signals evaluating correctness and logical consistency, multiple reasoning chains are weighted and filtered through a dynamic dominance strategy, thereby automatically decomposing the diagnostic task into a verifiable step-by-step reasoning process and obtaining multiple reasoning paths.
[0031] Step 4: Parse multiple logical reasoning paths and convert them into logic trees. Evaluate the logical consistency score of the logic trees based on rules. Select the logic tree with the highest score and output the corresponding final health assessment level as the sheep's health level.
[0032] The logical reasoning path is parsed and broken down into syllogistic triples, which are then assembled and connected into a tree structure. Each triple includes a health assessment rule, evidence for the assessment level, and the derived sheep health assessment level. A rule-based logic validator is used to score the health and logical validity of the triples. Score the logical validity of K triples in the logic tree. The average and aggregation yield the health score S of the logic tree; where, =1 indicates that the conclusion is strictly derived from the premises, i.e., the conclusion... It is strictly derived from the premise through either an affirmative condition or a negative consequent. A value of 0.5 indicates that the relevance of the reasoning is weaker than the relevance threshold (such as induction and analogy). =0 indicates a contradiction or complete irrelevance; based on the health score S, output the sheep's health detection level, which includes: excellent, up to standard, warning, and diseased. The level is divided according to the preset scoring range: S=1 corresponds to excellent, 0.75≤S<1.0 corresponds to up to standard; 0.5≤S<0.75 corresponds to warning; 0≤S<0.5 corresponds to diseased.
[0033] One embodiment. For example... Figure 1 As shown, the multi-source data monitoring based on the Internet of Things (IoT) of this invention includes an IoT hardware sensing module, a data storage and display module, and a data storage module.
[0034] The specific IoT hardware sensing modules are shown below: 1. Intelligent ear tag monitoring unit: The ear tags, consisting of a female tag and a male tag, are nested together and attached to the sheep's ear. The female tag is a Radio Frequency Identification (RFID) tag, used to uniquely identify and distinguish individual sheep; the male tag is an electronic ear tag with a built-in body temperature sensor and a high-precision triaxial accelerometer, used to collect the sheep's physiological data (body temperature) and behavioral data (activity level), respectively. The collected data is uploaded to a Bluetooth gateway by a built-in Bluetooth module at preset intervals (e.g., hourly), and the Bluetooth gateway forwards the data to the cloud platform server via a built-in 4G module.
[0035] 2. Rumen Capsule Monitoring Unit: Before deployment, the rumen capsules were linked to their corresponding ear tag numbers on the cloud platform server. The capsules remained in the sheep's stomachs to continuously monitor physiological data (rumen temperature, gastric motility, rumen pH) and behavioral data (drinking rate, posture) of different individuals. Monitoring data was received every hour via a LoRa gateway and forwarded to the cloud platform server by the gateway's built-in 4G module.
[0036] 3. Automatic electronic weighing device and body size measuring unit: The automatic electronic weighing device has four gravity sensors and a microcontroller installed at the bottom. The microcontroller integrates a filtering algorithm and is configured to receive and filter weighing data at a set frequency within 2 minutes, and take the average value of the filtered weighing as the sheep's final weight value (i.e., the first growth data).
[0037] Five RGB-D depth cameras are installed above the automatic electronic weighing device fence and at its four corners to collect RGB and depth image data of the sheep. A microcontroller at the bottom integrates an automatic body size parameter measurement algorithm, namely a sheep body size measurement point detection model based on the RTMPose (Real-Time Multi-Person Pose Estimation Network) framework. This model automatically identifies and extracts key points and performs geometric measurements by synchronously fusing and 3D reconstructing multi-view images, obtaining parameters such as body length, body height, chest width, chest depth, chest circumference, cross-shaped height, and rump width (i.e., secondary growth performance data).
[0038] Each week, the sheep are driven into an automatic electronic weighing device. The card reader at the fence automatically reads the RFID tag on the ear tag, associates it with the weight and body size data of that measurement, and uploads it to the cloud platform server via the built-in 4G module.
[0039] Data storage and display module: Data from all the monitoring devices mentioned above is linked to the sheep's unique radio frequency identification (RFID) identifier. This unique identifier serves as the primary key in the database and is stored along with all collected data in the cloud platform database. The relevant management system can read and display the corresponding data in real time.
[0040] Preprocessing operations are performed on the data acquired by multi-source hardware sensing based on the Internet of Things, specifically as follows: Figure 2 As shown.
[0041] Because occasional short-term sensor malfunctions and outliers are unavoidable during data collection, data cleaning is necessary. Missing values are filled using linear interpolation, and outliers are identified and marked using boundary values. Furthermore, the physiological and behavioral monitoring data are high-dimensional data (one-hour intervals), while the growth performance data are low-dimensional data (one-week intervals). Before multimodal data analysis, data alignment is required. This involves downsampling high-dimensional data to reduce its dimensionality, and using spline interpolation to increase the dimensionality of low-dimensional data, transforming all data to a unified time interval. Spline interpolation is used in this process. The formula is: ; Among them time , Measurements indicating weight or body size. The interval length is... It is a spline curve at the node curvature at that point Indicates the spline function at the nodes The instantaneous slope at that point.
[0042] Although data preprocessing can align the data in the temporal dimension, differences in the scale of local patterns still exist. Before data encoding, the preprocessed high-quality dataset is used to perform one-dimensional convolutions with different kernels, mapping all data from different modalities to a feature space of the same length and dimension. The formulas for the different convolution kernels are as follows: ; represent Modality represent The original input data sequence of the modality, This represents the length of the input sequence, such as the number of channels. The dimensions of the input sequence, such as the sampling rate, represent Modal Time convolution kernel size, One-dimensional convolutions representing multiple different kernels generate convolutions with the same dimension. . convolutional sequence.
[0043] Furthermore, positional and temporal encodings are performed on the data processed by convolutional kernels of different dimensions, with specific encoding formats as follows: Figure 3 As shown. Position encoding uses sine and cosine functions of different frequencies to capture relative position information through linear transformation. The position encoding... The formula: ; ; Position index in the sequence , The embedding dimension of the model. Dimension index, with a value range of: .
[0044] Temporal encoding employs a Multilayer Perceptron (MLP) to encode each variable sequence, mapping the original complex temporal sequence data to a fixed-dimensional vector space rich in semantics. The sequence data is then convolved by different one-dimensional convolutional kernels. , time series variables and Each time step. Indicated by The entire time series of each variable after convolution with index .
[0045] ; After both positional and temporal encoding, a multi-head cross-modal attention mechanism is employed for positional-encoded data to focus on spatially diverse information at different embedding positions. This means that within the same sequence, each position focuses on all other positions to capture contextual dependencies. For temporal-encoded data, a multivariate attention mechanism is used to capture the dependencies and dynamic interactions between different variables, based on the perceived temporal order. The two-stream heterogeneous attention result, after layer normalization, is input into a feedforward network consisting of two fully connected layers and a nonlinear activation function. The feedforward network maps cross-modal and multivariate data in different spaces to a unified joint semantic space to obtain higher-level semantic features. These high-level semantic features are then mapped to the semantic coupling representation in the model's latent space through a projection matrix, providing a foundation for subsequent logical reasoning.
[0046] ; ; in, This is the feature representation obtained after processing by the embedding function. To project latent space feature data to the same dimension as the model, This refers to the semantically coupled representation data obtained by mean pooling of latent space feature data of the same dimension after projection. for The first in Data.
[0047] Collaborative scheduling is responsible for decomposing the health assessment task into multi-step inference paths and refining them through Dynamic Advantage Policy Optimization (DAPO). Semantically coupled representation data is used as... As input, policy Generate multiple candidate inference trajectories Each trajectory is evaluated in two dimensions, i.e., its correctness is assessed. and logical consistency DAPO learns an independent value function for each dimension and calculates the advantage. Then, a hybrid advantage is formed by combining dynamic weights. : ; Among them, weight The algorithm adaptively adjusts based on the intermodal data dependencies and logical complexity of the samples. This is achieved through a pruning target update strategy using DAPO. : ; in It is the probability ratio of actions already performed in the current state. Is the current strategy in the state? Select action The probability, This represents the probability that the old strategy will choose the same action under the same conditions. If... This indicates that the new strategy favors this action. This indicates that the new strategy reduces the tendency to perform this action. It is a clipping function. Parameter pruning. Through this optimization, the controller balances accuracy and logical rigor during exploration, thereby generating high-quality structured reasoning paths.
[0048] The logic tree generator transforms the reasoning paths generated by the cooperative scheduling into verifiable formal logic trees. First, it parses each reasoning step in the path into a syllogistic triple. ,in These are health assessment rules. This is evidence for the assessment level, and the conclusion. This is to derive the final health level. Subsequently, these triples are assembled into a directed acyclic tree according to their dependencies; that is, the previous conclusion can serve as the premise for the next syllogism. The logic tree generator includes an embedded rule validator. Scoring the logical validity of each triple: ; Here, the health score S represents logical consistency. For a logic tree containing K triples, the health score S is: ; in, This represents the k-th logical validity score.
[0049] Table 1. Sheep Health Status Assessment System
[0050] Based on the above method, this invention proposes a sheep health assessment method system, comprising: The system comprises the following modules: a data acquisition module for collecting physiological, behavioral, and growth performance data of sheep; an encoding module for mapping these data to a feature space of uniform length and dimension, and performing temporal and positional encoding on the mapped, dimension-aligned multimodal data; an inference module for employing a multivariate attention mechanism on the temporally encoded data to capture the dependencies and dynamic interactions between different variables, and a multi-head cross-modal attention mechanism on the positionally encoded data to obtain contextual dependencies at different locations; using the temporally encoded and positionally encoded data processing results as dual-stream heterogeneous attention results, inputting these results into a feedforward network to extract semantic features, projecting these features to obtain semantic coupling representations in the model's latent space, and co-scheduling these semantic coupling representations to generate multiple inference paths; and an evaluation module for parsing and converting these multiple logical inference paths into logic trees, evaluating the logical consistency scores of the logic trees based on rules, and selecting the logic tree with the highest score to output the corresponding final health assessment level.
[0051] The present invention provides a computer device, including a memory and a processor. The memory stores a program, and when the program is executed by the processor, the processor performs the steps of the above-described sheep health assessment method.
[0052] According to the disclosed embodiments, the computer device can communicate with one or more external devices (e.g., keyboard, pointing device, Bluetooth communication, etc.) or with any device that enables the computing device to communicate with one or more other computing devices (e.g., router, demodulator, etc.).
[0053] The electronic device provided in this application embodiment can be referred to the above method embodiment for its specific implementation process. The implementation principle and technical effect are similar, and will not be repeated here.
[0054] It should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0055] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage.
[0056] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0057] The present invention provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the above-described sheep health assessment method.
[0058] The aforementioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0059] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0060] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0061] The above description, in conjunction with specific preferred embodiments, provides a more detailed explanation of the present invention. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such deductions or substitutions should be considered to fall within the scope of protection of the present invention.
Claims
1. A method for assessing sheep health, characterized in that, Including the following steps: Collect physiological, behavioral, and growth performance data of sheep; The physiological data, behavioral data, and growth performance data are mapped to a feature space of uniform length and dimension, and the mapped dimension-aligned multimodal data are then encoded temporally and positionally. The time-encoded data is processed using a multivariate attention mechanism to capture the dependencies and dynamic interactions between different variables; The data obtained by the location encoding is processed using a multi-head cross-modal attention mechanism to obtain the contextual dependencies of different locations; Using the time-coded data processing results and the location-coded data processing results as the dual-stream heterogeneous attention results, the dual-stream heterogeneous attention results are input into the feedforward network to extract semantic features. The semantic features are projected and mapped to obtain the semantic coupling representation in the model's latent space. The semantic coupling representation is then coordinated and scheduled to generate multiple inference paths. Multiple logical reasoning paths are parsed and converted into logic trees. The logical consistency score of the logic trees is evaluated based on rules, and the logic tree with the highest score is selected to output the corresponding final health assessment level.
2. The sheep health assessment method as described in claim 1, characterized in that, The physiological, behavioral, and growth performance data of the sheep collected are specifically as follows: Physiological and behavioral data were obtained by using electronic ear tags attached to sheep's ears and rumen capsules inserted into sheep's stomachs. Weight is obtained from growth performance data using an automated electronic weighing device, and image information is obtained using a depth camera installed on the automated electronic weighing device. The image information is processed and three-dimensional reconstruction and key point detection are performed to obtain growth performance data. Among them, the physiological data includes body temperature, rumen temperature, gastric motility and rumen pH value, the behavioral data includes exercise volume, posture and water intake rate, and the growth performance data includes weight and body size.
3. The sheep health assessment method as described in claim 1, characterized in that, The physiological data, behavioral data, and growth performance data are mapped to a feature space of uniform length and dimension, specifically as follows: For each modality of time series data in physiological data, behavioral data, and growth performance data, convolution operations are performed using different one-dimensional convolution kernels to map modal data of different lengths and sampling rates to feature spaces of the same length and dimension, thus obtaining dimension-aligned multimodal data.
4. The sheep health assessment method as described in claim 1, characterized in that, The time-encoded data is processed using a multivariate attention mechanism to capture the dependencies and dynamic interactions between different variables, specifically: The time-encoded data is mapped to a fixed-dimensional vector space to capture the dependencies of the time series. By employing a multivariate attention mechanism, the system captures the dependencies and dynamic interactions between different variables based on the perception of temporal order and time series dependencies.
5. The sheep health assessment method as described in claim 1, characterized in that, The process of collaboratively scheduling semantically coupled representations to generate multiple reasoning paths specifically involves: Multiple inference chains are sampled for the same input using explicit thought chain cues; wherein the input is a semantically coupled representation. Based on the signals of correctness and logical consistency, multiple reasoning chains are weighted and filtered through a dynamic advantage strategy, and the diagnostic task is decomposed into a step-by-step reasoning process to obtain multiple reasoning paths.
6. The sheep health assessment method according to claim 1, characterized in that, The process involves parsing multiple logical reasoning paths and converting them into logic trees, evaluating the logical consistency score of each logic tree based on rules, and selecting the logic tree with the highest score to output the corresponding final health assessment level. Specifically: The logical reasoning path is parsed and broken down into triples, which are then assembled and connected into a tree structure. Each triple includes a health assessment rule, evidence of the assessment level, and the derived health assessment level of the sheep. Validation of triples using a rule-based logic validator. Score based on the logical validity of K triples in the logic tree. The average and aggregation yield the health score S of the logic tree; where, =1 indicates that the conclusion is strictly derived from the premises. A value of 0.5 indicates that the relevance of the reasoning is weaker than the relevance threshold. =0 indicates a contradiction or complete irrelevance; Based on the health score S, the health level of the sheep is output. The level includes: excellent, up to standard, warning, and diseased. The level is divided according to a preset scoring range: S=1 corresponds to excellent, 0.75≤S<1.0 corresponds to up to standard, 0.5≤S<0.75 corresponds to warning, and 0≤S<0.5 corresponds to diseased.
7. The sheep health assessment method as described in claim 1, characterized in that, Also includes: The physiological, behavioral, and growth performance data were repaired, cleaned, and smoothed using moving average, median filtering, and linear interpolation methods. The processed high-frequency data is downsampled, and the processed low-frequency data is upsampled using spline interpolation to obtain consistent multimodal data in the time dimension; where the high-frequency data represents the time interval in hours, and the low-frequency data represents the time interval in weeks.
8. A sheep health assessment system, characterized in that, include: The data acquisition module is used to collect physiological, behavioral, and growth performance data of sheep. The encoding module is used to map the physiological data, behavioral data, and growth performance data to a feature space of uniform length and dimension, and to perform time encoding and position encoding on the mapped dimension-aligned multimodal data. The inference module is used to apply a multivariate attention mechanism to the time-encoded data to capture the dependencies and dynamic interactions between different variables; The data obtained by the location encoding is processed using a multi-head cross-modal attention mechanism to obtain the contextual dependencies of different locations; Using the time-coded data processing results and the location-coded data processing results as the dual-stream heterogeneous attention results, the dual-stream heterogeneous attention results are input into the feedforward network to extract semantic features. The semantic features are projected and mapped to obtain the semantic coupling representation in the model's latent space. The semantic coupling representation is then coordinated and scheduled to generate multiple inference paths. The evaluation module is used to parse multiple logical reasoning paths and convert them into logic trees. Based on rules, it evaluates the logical consistency score of the logic trees and selects the logic tree with the highest score to output the corresponding final health evaluation level.
9. A computer device, characterized in that, The device includes a memory and a processor, wherein the memory stores a program that, when executed by the processor, causes the processor to perform the steps of a sheep health assessment method as described in any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the sheep health assessment method according to any one of claims 1 to 7.