A method and system for evaluating the vitality level of mutton sheep based on swallowable and wearable sensing detection
By integrating rumen physiological parameters and external motility parameters into a dual-domain feature fusion network, the problem of misjudgment in assessing the vitality level of meat sheep was solved, enabling accurate monitoring of the health status of meat sheep and maximizing their production potential, thereby improving the economic benefits and management level of the farm.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA AGRI UNIV
- Filing Date
- 2026-03-06
- Publication Date
- 2026-06-05
AI Technical Summary
Current assessments of sheep vitality levels mainly rely on manual observation or single-dimensional sensors, which carries the risk of misjudgment and makes it difficult to achieve objective, continuous, and automated multi-source data fusion assessments, leading to reduced breeding efficiency and economic benefits.
By acquiring rumen physiological data through ingestible sensors and body surface kinematic data through wearable sensors, and combining deep learning to construct a dual-domain feature fusion network with multi-layer implicit mapping and nonlinear adaptive activation, intelligent assessment of the vitality level of meat sheep is carried out.
It enables accurate assessment of the vitality level of sheep, reduces the error rate of traditional manual observation, and improves the economic benefits and animal welfare of farms.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the fields of smart farming and agricultural Internet of Things technology, and in particular to a method and system for assessing the vitality level of meat sheep based on swallowable and wearable sensor detection. Background Technology
[0002] In recent years, with the rapid development of science and technology, the sheep farming industry has also been developing towards intensification, large-scale operation, and intelligentization. In large-scale farming enterprises, the number of sheep raised is often in the tens of thousands. Furthermore, the vitality level of sheep is a core indicator for assessing their health status, nutritional level, and animal welfare. High vitality usually means that sheep are eating normally, have vigorous metabolism, and are free from underlying diseases; while low vitality is often an early sign of fever, digestive system diseases, or hoof and limb diseases. By identifying and monitoring changes in the vitality of sheep, feeding management can be optimized, feeding efficiency can be improved, thereby avoiding unnecessary economic losses for farming enterprises and ensuring the efficient and ecologically sound operation of these enterprises.
[0003] Currently, the assessment and monitoring of sheep vitality levels mainly relies on manual observation. However, under large-scale farming conditions, accurately assessing the vitality level of each sheep through manual identification alone is extremely difficult and suffers from drawbacks such as strong subjectivity and difficulty in quantification. As prey animals, sheep have an instinct to conceal their diseases and weaknesses, and many emergencies often go undetected, significantly reducing sheep welfare, farming efficiency, and the economic benefits of farms. Furthermore, existing automated monitoring methods often rely on single-dimensional sensors. For example, wearing only external wearable devices (such as pedometers and accelerometers) can acquire movement data but cannot detect internal physiological heating or rumen abnormalities; or using only internal swallowable capsules, which can measure core body temperature and peristalsis frequency but lack contextual correlation with external movement postures.
[0004] In summary, analysis of physiological or behavioral characteristics in a single dimension is prone to misjudgment. There is an urgent need for an objective, continuous, and automated assessment technology that can simultaneously integrate multi-source data from both inside and outside the sheep to clearly understand the health status and biological rhythms of the sheep being raised, thereby better realizing the production potential of the sheep and improving the economic benefits of the farm. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, the purpose of this invention is to provide a method and system for assessing the vitality level of mutton sheep based on swallowable and wearable sensor detection. By integrating rumen physiological parameters and external motor behavior parameters of mutton sheep, and combining deep learning to construct a multi-dimensional assessment model, intelligent diagnosis of the vitality level of mutton sheep can be achieved, further monitoring the health status of mutton sheep, thereby better realizing the production potential of mutton sheep and improving the economic benefits of farms.
[0006] To achieve the above objectives, the present invention provides the following solution: A method for assessing the vitality level of meat sheep based on ingestible and wearable sensor detection includes: Physiological data of the rumen habitat in sheep can be obtained through ingestible sensors. The kinematic data of the sheep's body surface was obtained through wearable sensors; Preprocessing and multi-source temporal registration were performed on rumen endocrine physiological data and body surface kinematic data to construct a multidimensional heterogeneous feature fusion input matrix. A dual-domain feature fusion network based on multi-layer implicit mapping and nonlinear adaptive activation is used to pre-determine an intelligent assessment model for the vitality level of mutton sheep. The multidimensional heterogeneous feature fusion input matrix is input into the intelligent evaluation model for supervised training and dynamic optimization to obtain the trained evaluation model. The evaluation model is the intelligent evaluation model after supervised training and dynamic optimization. The real-time feature tensor of the sheep to be evaluated is used as the real-time input of the multidimensional heterogeneous feature fusion input matrix and fed into the evaluation model for gradient-free forward inference, outputting the corresponding vitality level evaluation result.
[0007] Preferably, the rumen endocrine physiological data include rumen temperature sequences and rumen peristalsis frequency; the body surface kinematic data include step counts and triaxial acceleration.
[0008] Preferably, the swallowable sensor acquires rumen endocrine physiological data of meat sheep, including: The swallowable sensor continuously collects core physiological indicators from the sheep to obtain the rumen temperature sequence; the swallowable sensor is an electronic capsule residing in the rumen of the sheep. Threshold filtering and peak detection are performed on the collected rumen peristaltic pressure signals to obtain the total number of effective peristaltic pressure peaks within a preset time window; Based on the total number of effective peristaltic pressure peaks and the preset time window, an amplitude-weighted and rhythm variation penalty mechanism is used to convert the single peak count into an effective work equivalent peristaltic frequency that characterizes the true digestive efficiency of rumen smooth muscle. The nonlinear characteristic conversion formula is as follows: in: The rumen peristaltic frequency represents the effective work equivalent per unit time. Indicates within the preset time window The total number of effective peristaltic pressure peaks detected internally. The unit is seconds; Indicates the first The absolute pressure amplitude of each effective peristaltic peak; and These represent the local maxima and local minima of the pressure signal peak within the current time window, respectively. Used to quantify the relative effective work weight of a single peristaltic contraction; The rhythm variation coefficient, representing the time interval between adjacent peaks, is used to characterize the rhythmic stability of rumen peristalsis. This is the preset rhythm decay penalty constant; To enhance the model's sensitivity to potential diseases and abnormal physiological states in mutton sheep, a nonlinear joint feature extraction was performed on the rumen temperature sequence and rumen motility frequency before constructing the multidimensional heterogeneous feature fusion input matrix. This resulted in the construction of a rumen temperature-motility joint metabolic feature index, with the feature extraction formula as follows: in, Indicates the instantaneous rumen temperature, motility, and metabolic characteristics index; express Instantaneous rumen temperature measured at all times; This represents the historical baseline average body temperature of the sheep in a healthy, resting state; This indicates the extracted rumen peristalsis frequency; and These are the temperature deviation weighting factor and the peristalsis frequency weighting factor, respectively; the rumen thermomotility combined metabolic characteristic index It is added as an independent dimension to the multidimensional heterogeneous feature fusion input matrix.
[0009] Preferably, the wearable sensor acquires the body surface kinematic data of the sheep, including: The triaxial acceleration is collected by a smart collar or anklet worn on the neck or legs of the sheep, and the magnitude of the resultant acceleration signal vector is obtained from the triaxial acceleration. Based on the resultant acceleration signal vector amplitude sequence, dynamic threshold zero-crossing detection and gait period determination are performed to obtain the step count.
[0010] Preferably, the rumen endocrine physiological data and the body surface kinematic data are preprocessed and multi-source temporal registration is performed to construct a multi-dimensional heterogeneous feature fusion input matrix, including: Regularized matching techniques are used to filter out invisible characters or communication gibberish generated by sensing devices during data transmission, thereby completing distortion and anomaly cleaning. The identification and removal of anomalous and distorted data is based on a statistical threshold. The identification and removal of anomalous and distorted data includes identifying outliers in multi-source data based on an outlier identification threshold constant θ, and removing anomalous data. A nonlinear adaptive scaling mechanism based on physiological homeostasis constraints is used to perform cross-dimensional feature standardization on the preprocessed multi-source data. The scaling and normalization formula is as follows: in: Represents the th after steady-state constraint scaling The first sample 3D eigenvalues; Represents the first element in the original multi-source dataset. The first sample 3D eigenvalues; and These represent the next [number] in this batch. The sample mean and standard deviation of the dimensional feature; Indicates the first Physiological safety thresholds for physical characteristics (e.g., the normal tolerance range for rumen temperature fluctuations) are used to define the boundaries of healthy homeostasis. To truncate the activation function, when the feature deviation does not exceed the safety threshold When this condition is met, the value of this item is 0; Indicates the first Boundary amplification penalty coefficient for dimensional features; The standardized rumen endocrine physiological data and the body surface kinematic data are time-stamped and aligned to complete the multi-source temporal registration. The timestamp-aligned rumen endocrine physiological data and the body surface kinematic data are concatenated to construct the multidimensional heterogeneous feature fusion input matrix.
[0011] Preferably, the multi-source time-series registration further includes: For the surface kinematic data with a sampling frequency higher than that of the rumen endocrine physiological data, the triaxial acceleration in the surface kinematic data is taken as high-frequency motion data, and the magnitude of the resultant acceleration signal vector is obtained from the triaxial acceleration. Statistical analysis is performed on the resultant acceleration signal vector amplitude sequence within a preset time window to obtain the comprehensive acceleration characteristic value within the preset time window; Align the composite acceleration feature value with the rumen endocrine physiological data on timestamps.
[0012] Preferably, the network architecture of the intelligent evaluation model includes an input layer, multiple hidden layer extraction modules, and an output layer in sequence; wherein each hidden layer extraction module is composed of a linear feature mapping neuron, a batch normalization layer, a nonlinear activation layer, and a random deactivation layer connected in series.
[0013] Preferably, the multidimensional heterogeneous feature fusion input matrix is input into the intelligent evaluation model for supervised training and dynamic optimization to obtain a trained evaluation model, including: The preprocessed multidimensional heterogeneous features are fused into an input matrix and the corresponding vitality level labels to construct a sample dataset. Forward propagation is used to obtain the predicted distribution. Given the severe asymmetry in the misjudgment risk of different vitality states of sheep (i.e., the loss of biological assets due to underreporting of low vitality is much greater than the false positive of high vitality), the conventional equal-weighted error model is abandoned. Instead, a joint error function of asymmetric cost sensitivity and difficult sample focusing is introduced to quantify the deviation between the predicted distribution and the vitality level labels. The joint error quantification formula is as follows: in: This represents the joint error loss value across multiple categories; Indicates the total number of samples entered in the batch; This indicates the total number of vitality level categories; Indicates the first Each sample belongs to category The true label indicator variable; The intelligent evaluation model predicts the first... Each sample belongs to category The probability of; The asymmetric risk penalty coefficient assigns the highest penalty weight to the low-vitality category, forcing the model to increase its sensitivity to pathological and abnormal habitats; For difficult samples, focus factor This is a focus constant used to adaptively reduce the gradient weights of easily classified normal samples, allowing the model to focus on ambiguous samples in the transition period of the vitality boundary. To prevent the natural logarithm from being an infinitesimally small smoothing constant.
[0014] A dynamic adaptive momentum optimization algorithm based on error fluctuation feedback is employed to update the global network weight matrix according to the gradient information obtained from backpropagation, thereby completing the supervised training and dynamic optimization. To overcome the interference of high-frequency biological noise in animal multi-source heterogeneous sensor data on the optimization trajectory, this algorithm introduces an adaptive step size compensation mechanism based on the relative rate of change of the loss function in the momentum parameter update. Its momentum gradient update formula is as follows: in: Indicates the current iteration round; This represents the error gradient calculated in the current round; and Let represent the weighted first-moment estimate and the second-moment estimate of the gradient, respectively; and These represent the exponential decay rate constants of the first and second moments, respectively; This represents the initial global learning rate; This represents the dynamic learning rate of the current round after error fluctuation feedback compensation; The step size is the radical compensation constant; and These are the joint error loss values for the current round and the previous round, respectively; This represents the updated network model weights.
[0015] Preferably, the real-time feature tensor of the sheep to be evaluated is used as the real-time input to the multidimensional heterogeneous feature fusion input matrix, and fed into the evaluation model for gradient-free forward inference, outputting the corresponding vitality level evaluation result, including: In practical application deployment, the gradient calculation tracking graph of the deep learning framework is turned off, and the real-time feature tensor is input into the evaluation model for gradient-free forward inference; The predicted probability vector is output through a normalized exponential function; The confidence peak value in the predicted probability vector is extracted and a state mapping is performed to output the vitality level assessment results of low vitality, medium vitality, or high vitality.
[0016] Preferably, the rumen physiological data acquisition unit is used to acquire rumen endocrine physiological data of meat sheep through a swallowable sensor; The body surface motion data acquisition unit is used to acquire body surface kinematic data of meat sheep through wearable sensors; A multi-source data preprocessing and temporal registration unit is used to preprocess and perform multi-source temporal registration on the rumen endocrine physiological data and the body surface kinematic data to construct a multi-dimensional heterogeneous feature fusion input matrix. The intelligent assessment model construction unit is used to pre-set an intelligent assessment model for the vitality level of mutton sheep based on a multi-layer implicit mapping and nonlinear adaptive activation dual-domain feature fusion network. The model training and optimization unit is used to input the multidimensional heterogeneous feature fusion input matrix into the intelligent evaluation model for supervised training and dynamic optimization, so as to obtain the trained evaluation model. The evaluation model is the intelligent evaluation model after supervised training and dynamic optimization. The vitality level inference and evaluation unit is used to take the real-time feature tensor of the sheep to be evaluated as the real-time input of the multidimensional heterogeneous feature fusion input matrix, and send it into the evaluation model for gradient-free forward inference, and output the corresponding vitality level evaluation result.
[0017] The present invention discloses the following beneficial effects: This invention combines rumen physiological parameters with external motion parameters, overcoming the data blind spots of single sensors. Utilizing a constructed dual-domain feature fusion network for automated feature extraction and diagnosis, it significantly reduces the error rate and labor costs of manual observation in traditional farming, enabling very early warning of abnormal vital signs in meat sheep and effectively improving the economic benefits and animal welfare of farms. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart of the method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the technical route provided in the embodiments of the present invention; Figure 3 A technical route block diagram provided for embodiments of the present invention; Figure 4 This is a schematic diagram of the system structure provided in an embodiment of the present invention. Detailed Implementation
[0020] 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 embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] The purpose of this invention is to provide a method and system for assessing the vitality level of mutton sheep based on ingestible and wearable sensor detection. By integrating rumen endocrine physiological parameters and body surface kinematic data, and combining a dual-domain feature fusion network model, the invention achieves objective, continuous, and automated assessment of the vitality level of mutton sheep, thereby accurately monitoring the health status and physiological rhythms of mutton sheep, maximizing the production performance of mutton sheep, and improving the economic benefits and management level of breeding enterprises.
[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0023] Figure 1 A flowchart of the method provided in the embodiments of the present invention, such as Figure 1As shown, this invention provides a method for assessing the vitality level of meat sheep based on swallowable and wearable sensor detection, including: Step 100: Acquire rumen endocrine physiological data of meat sheep using swallowable sensors; Step 200: Acquire the kinematic data of the sheep's body surface using wearable sensors; Step 300: Preprocess and perform multi-source temporal registration on rumen endocrine physiological data and body surface kinematic data to construct a multi-dimensional heterogeneous feature fusion input matrix; Step 400: Based on a dual-domain feature fusion network with multi-layer implicit mapping and nonlinear adaptive activation, a pre-defined intelligent assessment model for the vitality level of mutton sheep is established. Step 500: Input the multidimensional heterogeneous feature fusion input matrix into the intelligent evaluation model for supervised training and dynamic optimization to obtain the trained evaluation model; the evaluation model is the intelligent evaluation model after supervised training and dynamic optimization. Step 600: Use the real-time feature tensor of the sheep to be evaluated as the real-time input of the multidimensional heterogeneous feature fusion input matrix, and feed it into the evaluation model for gradient-free forward inference, and output the corresponding vitality level evaluation result.
[0024] Example 1: like Figure 2 and Figure 3 As shown, this embodiment provides a method for assessing the vitality level of mutton sheep based on swallowable and wearable sensor detection, including the following steps: S1. Obtain rumen endocrine physiological data of sheep through swallowable sensors; S2. Obtain the kinematic data of the sheep's body surface through wearable sensors; S3. Preprocess and perform multi-source temporal registration on the rumen endocrine physiological data and body surface kinematic data to construct a multi-dimensional heterogeneous feature fusion input matrix; S4. A dual-domain feature fusion network based on multi-layer implicit mapping and nonlinear adaptive activation is used to pre-determine the intelligent assessment model of sheep vitality level. S5. Input the multidimensional heterogeneous feature fusion input matrix into the intelligent evaluation model for supervised training and dynamic optimization to obtain the trained evaluation model; S6. Input the real-time feature tensor of the sheep to be evaluated into the trained evaluation model, and output the corresponding vitality level evaluation result through gradient-free forward inference.
[0025] Reference Figure 2 and Figure 3 The following section provides a detailed explanation of each step in conjunction with specific implementation parameters.
[0026] First, each sheep was fitted with a swallowable rumen monitoring capsule. This capsule, swallowed orally, resides in the rumen of the sheep and contains a high-precision temperature sensor (accuracy ±0.1℃) and a pressure sensor (accuracy ±0.1kPa). The capsule continuously collects key physiological indicators from the sheep at a preset first sampling frequency (1 time / minute) to obtain the rumen temperature sequence T(t).
[0027] Simultaneously, threshold filtering and peak detection were performed on the collected rumen peristaltic pressure signals to extract the rumen peristaltic frequency, calculated using the following formula: in: The rumen peristaltic frequency represents the effective work equivalent per unit time. Indicates within the preset time window The total number of effective peristaltic pressure peaks detected internally. The unit is seconds; Indicates the first The absolute pressure amplitude of each effective peristaltic peak; and These represent the local maxima and local minima of the pressure signal peak within the current time window, respectively. Used to quantify the relative effective work weight of a single peristaltic contraction; The rhythm variation coefficient, representing the time interval between adjacent peaks, is used to characterize the rhythmic stability of rumen peristalsis. This is the preset rhythm decay penalty constant; All rumen endocrine physiological data are transmitted in real time to edge computing devices deployed at the breeding site via a LoRa wireless transmission module. After continuous collection, relevant tabular data on rumen temperature and rumen peristalsis frequency are obtained.
[0028] Secondly, referring to step S2, wearable sensors are used to acquire the surface kinematic data of the sheep. Wearable motion monitoring devices are fitted to the same batch of experimental sheep. These devices are smart collars with integrated triaxial accelerometers, which are fixed to the necks of the sheep with medical-grade flexible straps. The external kinematic indicators of the sheep are collected at a preset second sampling frequency (50Hz).
[0029] Obtaining triaxial acceleration components , , And calculate the magnitude of the resultant acceleration signal vector: in, The magnitude of the signal vector representing the instantaneous resultant acceleration (m / s²) 2 ); , , These represent the instantaneous acceleration components along the X, Y, and Z axes, respectively.
[0030] Step counting data is obtained by analyzing the magnitude of the combined acceleration signal vector. The sequence is obtained by dynamic threshold zero-crossing detection and gait period determination, and the output is the number of steps per minute (steps / minute).
[0031] All surface kinematic data are transmitted in real time to edge computing devices deployed at the breeding site via LoRa wireless transmission modules. After continuous collection, a triaxial acceleration data table is obtained, which is then downsampled and aligned with the rumen data.
[0032] Next, referring to step S3, the specific implementation method for preprocessing and multi-source temporal registration of the rumen endocrine physiological data and body surface kinematic data to construct a multidimensional heterogeneous feature fusion input matrix is as follows.
[0033] Abnormal data cleaning: Regular expression matching techniques are used to filter out invisible characters or garbled text generated by sensing devices during data transmission. Specifically, the regular expression r'[^\d.-]' is used to match and delete all abnormal characters that are not numbers, not decimal points, and not negative signs.
[0034] Simultaneously, abnormal and distorted data are identified and removed based on statistical thresholds. The formula for identifying abnormal data is as follows: in, This represents the j-th dimension feature value of the i-th sample in the original multi-source dataset; Let represent the sample mean of the j-th feature; The standard deviation θ of the j-th feature is used as the outlier detection threshold. In this embodiment, θ = 3, meaning data points exceeding 3 times the standard deviation are considered outliers and removed. Statistically, approximately 0.35% of the total data points were removed as outliers.
[0035] Dimensional feature standardization: Given the wide range of numerical values across different sensor data (rumen temperature: 36-40.5℃, acceleration: 0.1-6.0 m / s²),... 2 (Step count: 5-90 steps / minute) Standardization is used to eliminate the interference of various physical dimensions on the neural network weight update, so that all features are of the same order of magnitude, which is beneficial to model convergence. The statistical parameters of each feature before and after standardization are shown in Table 1: Table 1 Comparison of statistical parameters before and after standardization of each feature
[0036] Multi-source temporal registration and feature fusion: Due to the different original sampling frequencies of the two types of data (rumen data 1 time / minute, motion data 50Hz), it is necessary to downsample the high-frequency motion data to align it with the rumen data in terms of timestamps. The specific method is as follows: First, 50 sets of raw triaxial acceleration data were collected per second for each sheep. ), calculate the magnitude of its resultant acceleration signal vector: This value represents the overall intensity of movement of the sheep at that instant.
[0037] Secondly, using a 1-minute time window, 3000 sets (50Hz × 60 seconds) were generated within the window. The sequence is statistically analyzed, and its arithmetic mean is calculated as the comprehensive acceleration characteristic value for that minute. : in, =3000 represents the number of sampling points per minute. This mean effectively reflects the average movement intensity of the sheep within that minute, preserving key movement information while also achieving data dimensionality reduction.
[0038] Feature Dimension Explanation: The four-dimensional feature fusion input vector constructed in this invention The specific meanings, units, and statistical ranges of each dimension in the dataset of this embodiment are as follows: (Rumen temperature): Represents the rumen temperature of a meat sheep at time t, in degrees Celsius (°C). Rumen temperature is a core physiological indicator reflecting the basal metabolic state and whether a meat sheep is feverish. The rumen temperature of a healthy meat sheep typically fluctuates within the range of 38.5 ± 1.5°C. The data in this example is centralized. The value ranges from 36℃ to 40.5℃.
[0039] (Rumen motility frequency): This represents the number of rumen contractions per minute in a meat sheep at time t, measured in contractions / minute. Rumen motility frequency reflects the digestive function of the meat sheep; a low frequency may indicate weakened rumen function or disease. The rumen motility frequency of healthy meat sheep is typically in the range of 3-5 contractions / minute. The data in this example is centralized... The value ranges from 0.5 to 6.5 times per minute.
[0040] (Step count data): This represents the number of steps taken by the sheep within the minute specified by time t, measured in steps per minute. Step count data reflects the activity level of the sheep. The dataset in this example is... The value ranges from 5 to 90 steps per minute.
[0041] (Combined Acceleration): Represents the average motion intensity of the sheep within the minute specified at time t, expressed as a resultant acceleration signal vector amplitude. The average value per minute is obtained, with the unit being m / s. 2 This feature reflects the intensity of the sheep's movement. The dataset in this example contains... The value ranges from 0.1 to 6.0 m / s. 2 .
[0042] The above four dimensions describe the physiological and behavioral state of sheep from different perspectives: and Characterizes internal physiological condition. and It represents external movement performance. By fusing these four-dimensional features and inputting them into a dual-domain feature fusion network, the model can learn the correlation pattern between internal physiological state and external behavioral performance, thereby achieving accurate assessment of the vitality level of meat sheep.
[0043] Finally, the standardized rumen endocrine physiological data (rumen temperature, rumen peristalsis frequency) and body surface kinematic data (step count, combined acceleration) are aligned and stitched together on the timestamps to construct a four-dimensional feature fusion input matrix for subsequent deep learning. (in For feature dimension, (Total number of samples).
[0044] This embodiment obtains effective multi-source feature samples through continuous non-invasive monitoring of real meat sheep and subsequent cleaning. This real-world dataset comprehensively covers the typical physiological characteristics of sheep under different health and activity levels, providing accurate and reliable empirical data support for the subsequent training and validation of the dual-domain feature fusion network. S4. A dual-domain feature fusion network based on multi-layer implicit mapping and nonlinear adaptive activation is used to pre-determine an intelligent assessment model for the vitality level of mutton sheep. This embodiment is based on a dual-domain feature fusion network with multi-layer implicit mapping and nonlinear adaptive activation, and pre-sets an intelligent assessment model for the vitality level of mutton sheep. The network architecture consists of an input layer (4-dimensional), three hidden layer extraction modules, and an output layer (3-dimensional).
[0045] Correspondence between input features and physiological / behavioral mechanisms of decreased vitality: The four-dimensional input features selected in this invention are not arbitrary combinations, but closely correspond to the core physiological changes and behavioral manifestations of decreased vitality in meat sheep. The technical correlation between each feature and vitality level is as follows: (1) Rumen temperature — Reflects metabolic state and inflammatory response.
[0046] The rumen is the core digestive organ of meat sheep, and its temperature changes directly reflect the body's metabolic level and health status. When the vitality of meat sheep declines, it is usually accompanied by the following physiological changes: Febrile response: Inflammation caused by bacterial or viral infection leads to an increase in body temperature, which in turn raises the rumen temperature. Metabolic inhibition: Under disease or stress, the body's metabolic rate decreases, rumen heat production decreases, and temperature drops; Dehydration effects: Low-vitality sheep drink less water, and changes in rumen contents concentration lead to abnormal temperature fluctuations.
[0047] Therefore, rumen temperature Abnormal deviations (too high or too low) are core physiological indicators for identifying decreased vitality.
[0048] (2) Rumen peristalsis frequency — Reflects the state of digestive function.
[0049] Rumen peristalsis is a fundamental physiological activity for rumination and digestion in meat sheep, and its frequency changes are directly related to digestive function. Decreased frequency: Low vitality in meat sheep often manifests as reduced appetite, decreased rumination, and a significant decrease in rumen motility frequency, which can lead to rumen impaction or acidosis in severe cases; Disrupted rhythm: Under disease or stress, the rhythm of rumen contractions is disrupted, resulting in uneven peak intervals and decreased peak detection. reduce.
[0050] Therefore, rumen peristalsis frequency A decrease in [specific marker] is a key indicator for identifying digestive dysfunction-related decreased vitality.
[0051] (3) Step counting data — Reflects the overall level of physical activity.
[0052] Step count data is a direct quantitative indicator of the behavioral activity of sheep and is highly correlated with their vitality level. Reduced steps: Low-energy sheep exhibit lethargy, reduced feed intake, prolonged resting time, and a significant decrease in the number of steps per unit time; altered activity rhythm: healthy sheep exhibit a diurnal activity rhythm, while low-energy individuals have disordered activity rhythms, with activity concentrated in a few periods.
[0053] Therefore, step count data The decrease in [something] is a direct manifestation of the decline in behavioral inhibition-type vitality.
[0054] (4) Overall acceleration — Reflects the intensity of exercise and gait characteristics.
[0055] The combined acceleration is calculated by the resultant vector of the triaxial accelerations, reflecting the intensity of the sheep's movement and gait characteristics: Reduced exercise intensity: Even when moving, sheep with low activity levels exhibit slow gait, small range of motion, and significantly lower combined acceleration values than healthy individuals. Abnormal gait: In cases of limb disease or pain, meat sheep alter their gait to reduce the load on the affected limb, resulting in changes in the waveform characteristics of the acceleration signal, particularly the minute average. decline.
[0056] Therefore, comprehensive acceleration A decrease in activity level is a precise indicator for identifying decreased vitality due to reduced exercise intensity.
[0057] Feature synergistic effect: The four dimensions mentioned above do not act in isolation. For example, fever ( Elevated levels are often accompanied by decreased appetite. (reduction) and reduced activity ( , Decreased); Digestive dysfunction ( Poor nutrient absorption due to decreased physical activity will further exacerbate the decline in athletic performance. , (Reduced). By fusing four-dimensional features into a dual-domain feature fusion network, the model can automatically learn these inherent correlation patterns, thereby achieving an accurate assessment of the vitality level of mutton sheep.
[0058] Mathematical expression of hidden layer feature propagation: Each hidden layer extraction module consists of a linear feature mapping neuron, a batch normalization layer, a nonlinear activation layer, and a random deactivation layer connected in series. The comprehensive formula for hidden layer feature propagation is: Among them, H (l) W represents the output tensor of the linear mapping of the l-th layer; (l) With B (l) Let A represent the network weight matrix and bias vector of the l-th layer, respectively; (l-1) This represents the output feature tensor of the previous layer; This represents the feature tensor after batch normalization. and These represent the mean and variance of the data in this batch, respectively. and These represent the learnable scaling and translation parameters of the batch normalization layer, respectively. To prevent the smoothing constant from having a denominator of zero; Represents the ReLU nonlinear excitation function; This represents a random inactivation mask matrix that follows a Bernoulli distribution, used to randomly block hidden layer neuron connections during training to enhance robustness; This represents the final output of the l-th hidden layer extraction module.
[0059] Based on the aforementioned four-dimensional input features, this embodiment designs a lightweight dual-domain feature fusion network architecture. The specific parameter settings for each layer of the network are shown in Table 2. Table 2. Parameters of the Dual-Domain Feature Fusion Network Architecture
[0060] The relationship between network layer function and vitality assessment: Input layer: directly receives standardized four-dimensional features [ Each dimension corresponds to a specific physiological / behavioral mechanism. Hidden layer module 1 (4→64): Through high-dimensional mapping, the original feature space is extended to 64 dimensions, enabling the network to learn... Nonlinear interaction between them. For example, heat generation ( High) and reduced exercise ( The low-level combination patterns may be captured by specific combinations of neurons in this layer. Hidden layer module 2 (64→32): Performs feature dimensionality reduction and abstraction, compressing the scattered information of 64 dimensions into a compact representation of 32 dimensions, forming "implicit vitality features" that integrate internal physiological states and external behavioral performance. The output of this layer no longer corresponds to specific physical quantities, but rather to abstract vitality representations. Hidden layer module 3 (32→16): Further refines features, enhances the model's discriminative ability, and maintains low computational complexity. Output layer (16→3): Converts the 16-dimensional implicit features into probabilistic outputs of three types of vitality through the Softmax function, completing the end-to-end mapping from multi-source sensor data to vitality levels.
[0061] This network architecture design fully considers the computing power limitations of edge computing in aquaculture farms, with a total of only 2979 parameters and a model size of approximately 12KB, enabling it to run efficiently on embedded devices.
[0062] To clarify the two-layer hardware collaboration architecture of the terminal sensing device and the edge computing device in this embodiment, this embodiment strictly defines the flow nodes and responsibility boundaries of multi-source data streams: (1) Responsibility boundaries and data flow of embedded devices: The terminal sensing layer comprises a swallowable capsule residing in the rumen and a smart collar worn on the body. Its hardware platform utilizes ultra-low-power microcontrollers (such as the STM32L4 series chips based on the ARM Cortex-M4 core). The terminal device's responsibilities are limited to: analog-to-digital conversion of physical signals, acquisition of raw sensor data, minimally simplistic regularization filtering, and peak counting (calculating peristalsis frequency and step count). The terminal device does not participate in complex feature fusion or model inference; it only transmits lightweight one-dimensional time-series data packets (temperature, frequency, step count, acceleration amplitude) at low frequency to the upper-layer edge via the LoRa wireless communication protocol, thereby maximizing the terminal device's battery life.
[0063] (2) Boundary of responsibility and data flow of edge computing devices: The edge processing layer is an industrial-grade edge intelligent gateway deployed at the local area network nodes of the sheepfold. Since rumen physiological data and body surface movement data originate from two independent physical terminals, multi-source feature fusion must be uniformly executed on the edge computing device. Its hardware platform uses a more powerful processor (e.g., the RK3568 chip based on the ARM Cortex-A55 architecture, equipped with 2GB LPDDR4 memory). Its core responsibilities are: receiving and parsing multi-node LoRa converged data, performing cross-timestamp alignment and cross-dimensional standardization of multi-source heterogeneous data (step S3), and running the established dual-domain feature fusion network for forward inference (step S6), and finally distributing the structured "high / medium / low vitality" diagnostic results and device IDs to the cloud or the ranch management dashboard.
[0064] Based on this two-layer architecture, the dual-domain feature fusion network structure design of this invention fully considers the computing power limitations and low power consumption requirements of edge computing gateways. The total number of model parameters is only 2979, and the static model weight file size is approximately 12KB. To verify the efficient operation capability of this model on a real edge hardware platform, this embodiment uses the following standard measurement methods to obtain hardware-level inference performance indicators: Inference latency measurement: A high-precision hardware timer is invoked at the system kernel level to capture the start and end timestamps of the inference function calls, and the average value is calculated after 10,000 iterations. The measured forward inference latency for a single sample (1×4-dimensional input features) is only 0.15 milliseconds, which fully meets the strong real-time requirements of sheep herd concurrency anomaly monitoring.
[0065] Throughput Measurement: By constructing multi-threaded concurrent requests to simulate a large influx of sheep data, the number of samples completing inference per unit time was counted under a stress test environment with the system CPU at full load. The measured system throughput reached approximately 6500 requests / second (SPS), and a single edge gateway is sufficient to support the data flow of a large single ranch accommodating thousands of sheep.
[0066] Power consumption measurement: A high-precision shunt resistor was connected in series at the power input of the edge gateway's computing core, and a high-bandwidth digital oscilloscope was connected to monitor the voltage drop. By comparing the power difference between the system's idle state and the state of executing full-speed batch inference tasks, the dynamic additional power consumption caused by executing this model inference was measured to be only 0.85 watts, which meets the requirements for temperature rise and low power consumption for long-term stable operation of edge nodes.
[0067] Memory usage measurement: Analysis was performed using operating system-level memory allocation analysis tools (such as Valgrind / Massif) combined with the linker map file generated during the compilation phase. Actual measurements showed that the peak dynamic memory required by the model during loading and runtime does not exceed 32KB. This extremely low memory footprint completely avoids the risk of resource exhaustion or Out of Memory (OOM) errors caused by peak concurrent data flow in the ranch.
[0068] S5. Input the multidimensional heterogeneous feature fusion input matrix into the intelligent evaluation model for supervised training and dynamic optimization to obtain the trained evaluation model. Dataset Construction and Labeling: The preprocessed features were fused with the input matrix and corresponding vitality level labels to construct the sample dataset. Vitality level labels were jointly labeled by three experienced sheep keepers based on sheep behavior. Low vitality (label 0): Sheep are lethargic, eat little, move little, and often lie down; Medium vitality (label 1): Sheep eat normally, move moderately, and are in good spirits; High vitality (label 2): Sheep eat actively, move a lot, and react quickly.
[0069] A total of 3997 real-world labeled samples were obtained: approximately 1225 low-activity samples, approximately 1478 medium-activity samples, and approximately 1294 high-activity samples. These were randomly divided into a training set (3198 samples), a validation set (400 samples), and a test set (399 samples) in an 8:1:1 ratio. Stratified sampling was used during the partitioning process to ensure a consistent class ratio across all sets.
[0070] Loss function calculation: Forward propagation is used to calculate the current predicted distribution, and the log-likelihood probability divergence error function is used to quantify the deviation between the predicted distribution and the true health label. The cross-entropy error quantification formula is as follows: in: This represents the joint error loss value across multiple categories; Indicates the total number of samples entered in the batch; This indicates the total number of vitality level categories; Indicates the first Each sample belongs to category The true label indicator variable; The intelligent evaluation model predicts the first... Each sample belongs to category The probability of; The asymmetric risk penalty coefficient assigns the highest penalty weight to the low-vitality category, forcing the model to increase its sensitivity to pathological and abnormal habitats; For difficult samples, focus factor This is a focus constant used to adaptively reduce the gradient weights of easily classified normal samples, allowing the model to focus on ambiguous samples in the transition period of the vitality boundary. To prevent the natural logarithm from being an infinitesimally small smoothing constant; Parameter update for the adaptive momentum optimization algorithm: The global network weight matrix is updated using the adaptive momentum optimization algorithm based on the gradient information calculated by backpropagation. The momentum gradient update formula is as follows: in, Indicates the current iteration round; This represents the gradient of the loss function calculated in the current round; and Let represent the weighted first-moment estimate and the second-moment estimate of the gradient, respectively; and These represent the exponential decay rate constants of the first and second moments, respectively; Indicates the global learning rate; This represents the updated network model weights.
[0071] Model hyperparameter setting and network initialization strategy: To ensure the generalization ability and convergence stability of the dual-domain feature fusion network on edge devices, and to ensure the reproducibility of the technical solution of this invention in industry, this embodiment strictly defines the core hyperparameters and initialization strategies in the training process: (1) Weight initialization mechanism: Since the hidden layers of this network all use the ReLU nonlinear activation function, in order to avoid the gradient vanishing or gradient explosion problem in the early stage of training, all linear feature mapping layers of the network use the weight initialization method based on the He normal distribution to assign values to the weight matrix, while all bias terms are initialized to zero constants.
[0072] (2) Class Balance Strategy: In response to the long-tail distribution characteristic of "low vitality (sick or abnormal)" samples being naturally fewer than "medium / high vitality" samples in actual breeding scenarios, this embodiment introduces a weighted penalty mechanism based on the inverse class frequency in the log-likelihood probability divergence error function. By assigning a larger loss weight factor to low vitality samples, the model is forced to increase its sensitivity to the abnormal state of low vitality in mutton sheep, preventing the model from getting trapped in the local optimum of predicting the majority class.
[0073] (3) Hyperparameter setting of adaptive momentum optimization algorithm: Based on the aforementioned adaptive momentum optimization algorithm, the initial global learning rate α = 0.005 is set; the exponential decay rate constant of the first moment β1 = 0.9 (i.e. ρ1 in the aforementioned formula) is set; the exponential decay rate constant of the second moment β2 = 0.999 (i.e. ρ2 in the aforementioned formula) is set; and the smoothing constant ε = 10-8 is set to prevent the denominator from being zero, so as to maintain the smoothness and numerical stability of the training trajectory.
[0074] (4) Batch processing and iteration scale: Given the actual sample size of this embodiment (3198 training samples), in order to ensure that the model has sufficient gradient representativeness in each weight update, and to introduce appropriate random noise to escape local optima, the data batch size of the training process is set to 64. The maximum number of training rounds set for the model is 100 rounds.
[0075] Training process monitoring and early stopping mechanism: To prevent overfitting and wasted computational power on the training set, this embodiment introduces an early stopping mechanism. After each epoch, the system automatically calculates and tracks the cross-entropy loss value of the model on the independent validation set. An early stopping tolerance threshold of 10 is set; that is, if the validation set loss does not show a substantial decrease for 10 consecutive epochs, the training process is forcibly terminated early, and the network weight coefficients of the historically best epochs are automatically saved as the final model parameters.
[0076] The actual training was conducted on a server environment equipped with a single consumer-grade GPU. After 87 iterations, an early stopping mechanism was triggered, with a total training time of approximately 65 minutes. The dynamic changes in the loss function and accuracy during training, as well as key performance indicators, are shown in Table 3. Table 3 Monitoring of Key Indicators During Training
[0077] As shown in Table 3, as the number of training rounds increases, the loss function values of the training set and the validation set gradually decrease, while the accuracy steadily improves. Moreover, the difference between the two is small, indicating that the model is sufficiently trained and there is no overfitting phenomenon.
[0078] S6. Input the real-time feature tensor of the sheep to be evaluated into the trained evaluation model, and output the corresponding vitality level evaluation result through gradient-free forward inference. Model Deployment: The trained model is saved in ONNX format (Open Neural Network Exchange) and deployed to an embedded device at the aquaculture site. This device connects to the edge computing device via a serial port to receive preprocessed feature data in real time.
[0079] Gradient-free forward inference: In practical applications, gradient calculation and tracking graphs in deep learning frameworks are disabled to reduce memory consumption and computational latency. The multi-dimensional heterogeneous features constructed in real-time are fused into an input tensor and fed into the model for inference. A predicted probability vector is output through a normalized exponential function (Softmax). The probability transformation formula is as follows: in, Indicates the prediction category is The probability confidence level; Indicates the category corresponding to the output layer neurons The original nonnormalized logarithm output; C=3 represents the total number of categories of vitality level of meat sheep.
[0080] Classification decision: Extract the confidence peak from the predicted probability vector and perform state mapping. The classification decision formula is: in, This indicates the final output result of the sheep's vitality level, with a value of 0, 1, or 2. , and These correspond to the predicted probabilities of low-activity, medium-activity, and high-activity categories output by the model, respectively, and satisfy the following conditions: + + =1.
[0081] To further quantify the evaluation results and improve the robustness of boundary state classification (such as the transition period between low and medium vitality), this embodiment defines a continuous vitality index (VI) based on the predicted probability vector, and its calculation formula is as follows: Based on probability normalization characteristics ( The vitality index The theoretical range of values strictly falls within the closed interval [0,2], and its value is monotonically positively correlated with the vitality level of mutton sheep.
[0082] Regarding the classification threshold for the vitality index, this invention does not rely on subjective human experience to set it, but rather uses independent validation set data and a grid search optimization algorithm to rigorously calibrate it. The specific calibration and optimization process is as follows: The classification boundary threshold between low and medium vitality is set as follows: The classification boundary threshold between medium and high vitality is (Constraints are) To balance the dual sensitivity of false negatives and false positives in actual ranch diagnosis, this system constructs a threshold optimization formula on the validation set, using maximizing the macro-average F1 score of the three-class classification as the objective function: in, and These represent the lower and upper boundary thresholds of the global optimum, respectively. Indicates a given combination of thresholds Under the division, the first in the verification set kind( The F1 evaluation score.
[0083] Through the interval and A two-dimensional spatial stepwise traversal optimization is performed with a step size of 0.05. The convergence results from the validation set data show that: if and only if and At that time, the overall macro-average F1 score of the system reaches the global extreme point.
[0084] Therefore, based on the objectively optimal threshold determined by the above adaptive optimization, this system constructs the final quantitative judgment logic: when When the system determines and outputs a low activity warning; when When the system determines and outputs a medium vitality state; when When this occurs, the system determines and outputs a high-activity state.
[0085] This threshold dynamic optimization mechanism, driven by validation set data, completely eliminates the subjective diagnostic bias and generalization bottleneck caused by traditional manual experience-based threshold setting, ensuring the objectivity, scientific nature, and strong adaptability across pastures of sheep vitality status assessment to the greatest extent.
[0086] Practical application example: After deploying the trained model to a breeding site, real-time monitoring and evaluation of a certain type of sheep were carried out. The results are shown in Table 4: Table 4 Examples of Practical Application Evaluation
[0087] The sheep was identified as having low vitality at time t1. After three consecutive monitoring sessions, the system triggered an alert. The farmer checked the sheep and found that it only had mild indigestion. After treatment, the sheep recovered. The timely alert from this system prevented the condition from worsening, demonstrating the practical value of this invention in actual production.
[0088] Model evaluation results: The trained model was finally evaluated using the test set, and the results are shown in Table 5. Table 5 Model performance evaluation results
[0089] The confusion matrix is shown in Table 6: Table 6. Schematic diagram of the confusion matrix
[0090] The model achieved an overall classification accuracy of 0.9875 on the test set, indicating that the model has extremely high discriminative power.
[0091] Comparison experiment with traditional methods: To verify the technical effect of the present invention, the performance of the method of the present invention and the existing technical methods were compared on the same dataset. The results are shown in Table 7: Table 7 Performance Comparison of Different Methods
[0092] Experimental results show that the method of the present invention is significantly superior to the existing methods in all evaluation indicators, with an accuracy improvement of about 7-15 percentage points, achieving unexpected technical results.
[0093] Example 2: This embodiment provides a system for assessing the vitality level of mutton sheep based on swallowable and wearable sensor detection. It applies the method described in Embodiment 1, and the system structure is as follows. Figure 3 As shown, it includes: The rumen physiological data acquisition unit and the body surface motion data acquisition unit together constitute the in vivo and in vitro sensing acquisition module. The rumen physiological data acquisition unit includes a swallowable sensor unit, which is an electronic capsule residing in the rumen of the sheep, containing a temperature sensor and a pressure sensor for real-time acquisition of rumen temperature and rumen peristaltic pressure signals. The body surface motion data acquisition unit includes a wearable sensor unit, which is a smart collar worn around the neck of the sheep, containing a triaxial accelerometer for simultaneous acquisition of the sheep's step count and acceleration data. The in vivo and in vitro sensing acquisition module also integrates a wireless transmission unit for transmitting the acquired multi-source sensor data to an edge computing device.
[0094] The multi-source data preprocessing and temporal registration unit is deployed in the edge computing device at the breeding site. It is used to perform distortion and anomaly cleaning, cross-dimensional multi-scale normalization and multi-source temporal registration on heterogeneous multi-source sensor data, and construct a multi-dimensional heterogeneous feature fusion input matrix. Its processing flow corresponds to the preprocessing and multi-source temporal registration steps in Example 1.
[0095] The system includes an intelligent assessment model construction unit and a deep network feature extraction unit. The deep network feature extraction unit extracts deep implicit features based on high-dimensional mapping and nonlinear adaptive activation of a multilayer perceptron. Its network architecture includes multiple hidden layer extraction modules, each of which consists of a linear mapping layer, a batch normalization layer, an activation layer, and a random deactivation layer connected in series. The intelligent assessment model construction unit is used to form an intelligent assessment model of sheep vitality level based on the network architecture.
[0096] The model training and optimization unit, deployed in a server cluster, is used to calculate the cross-entropy loss of multiple classes and to update and optimize the weight parameters using an adaptive momentum optimization algorithm, thereby completing the model finalization of the intelligent evaluation model. The training process corresponds to the supervised training and dynamic optimization steps in Implementation Example 1.
[0097] The vitality level inference and assessment unit is deployed in an embedded device at the breeding site. It is used to perform gradient-free forward inference and output the vitality level assessment results of the meat sheep. The vitality level assessment results include high vitality, medium vitality, or low vitality. Its inference process corresponds to the gradient-free forward inference steps in Example 1.
[0098] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0099] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for assessing the vitality level of meat sheep based on ingestible and wearable sensor detection, characterized in that, include: Physiological data of the rumen habitat of sheep can be obtained through swallowable sensors; The kinematic data of the sheep's body surface was obtained through wearable sensors; Preprocessing and multi-source temporal registration are performed on the rumen endocrine physiological data and the body surface kinematic data to construct a multidimensional heterogeneous feature fusion input matrix. A dual-domain feature fusion network based on multi-layer implicit mapping and nonlinear adaptive activation is used to pre-determine an intelligent assessment model for the vitality level of mutton sheep. The multidimensional heterogeneous feature fusion input matrix is input into the intelligent evaluation model for supervised training and dynamic optimization to obtain the trained evaluation model, which is the intelligent evaluation model after supervised training and dynamic optimization. The real-time feature tensor of the sheep to be evaluated is used as the real-time input of the multidimensional heterogeneous feature fusion input matrix and fed into the evaluation model for gradient-free forward inference, outputting the corresponding vitality level evaluation result.
2. The method for assessing the vitality level of meat sheep based on swallowable and wearable sensor detection according to claim 1, characterized in that, The rumen endocrine physiological data include rumen temperature sequences and rumen peristalsis frequency; the body surface kinematic data include step count and triaxial acceleration.
3. The method for assessing the vitality level of meat sheep based on ingestible and wearable sensor detection according to claim 2, characterized in that, Physiological data of the rumen habitat in sheep are obtained through ingestible sensors, including: The swallowable sensor continuously collects core physiological indicators from the sheep to obtain the rumen temperature sequence; the swallowable sensor is an electronic capsule residing in the rumen of the sheep. Threshold filtering and peak detection are performed on the collected rumen peristaltic pressure signals to obtain the total number of effective peristaltic pressure peaks within a preset time window; Based on the total number of effective peristaltic pressure peaks and the preset time window, an amplitude-weighted and rhythm variation penalty mechanism is used to convert the single peak count into an effective work equivalent peristaltic frequency that characterizes the true digestive efficiency of rumen smooth muscle. The nonlinear characteristic conversion formula is as follows: in: The rumen peristaltic frequency represents the effective work equivalent per unit time. Indicates within the preset time window The total number of effective peristaltic pressure peaks detected internally. The unit is seconds; Indicates the first The absolute pressure amplitude of each effective peristaltic peak; and These represent the local maxima and local minima of the pressure signal peak within the current time window, respectively. Used to quantify the relative effective work weight of a single peristaltic contraction; The rhythm variation coefficient, representing the time interval between adjacent peaks, is used to characterize the rhythmic stability of rumen peristalsis. This is the preset rhythm decay penalty constant; Nonlinear joint feature extraction is performed on the rumen temperature sequence and the effective work equivalent rumen peristaltic frequency to construct a rumen temperature-motility joint metabolic feature index. The feature extraction formula is as follows: in, Indicates the instantaneous rumen temperature, motility, and metabolic characteristics index; express Instantaneous rumen temperature measured at all times; This represents the historical baseline average body temperature of the sheep in a healthy, resting state; This indicates the extracted rumen peristalsis frequency; and These are the temperature deviation weighting factor and the peristalsis frequency weighting factor, respectively; the rumen thermomotility combined metabolic characteristic index It is added as an independent dimension to the multidimensional heterogeneous feature fusion input matrix.
4. The method for assessing the vitality level of meat sheep based on ingestible and wearable sensor detection according to claim 2, characterized in that, The wearable sensors acquire the body surface kinematic data of the sheep, including: The triaxial acceleration is collected by a smart collar or anklet worn on the neck or legs of the sheep, and the magnitude of the resultant acceleration signal vector is obtained from the triaxial acceleration. Based on the resultant acceleration signal vector amplitude sequence, dynamic threshold zero-crossing detection and gait period determination are performed to obtain the step count.
5. The method for assessing the vitality level of meat sheep based on ingestible and wearable sensor detection according to claim 1, characterized in that, The rumen endocrine physiological data and the body surface kinematic data are preprocessed and multi-source temporal registration is performed to construct a multidimensional heterogeneous feature fusion input matrix, including: Regularized matching techniques are used to filter out invisible characters or communication gibberish generated by sensing devices during data transmission, thereby completing distortion and anomaly cleaning. The identification and removal of anomalous and distorted data is based on a statistical threshold. The identification and removal of anomalous and distorted data includes identifying outliers in multi-source data based on an outlier identification threshold constant θ, and removing anomalous data. A nonlinear adaptive scaling mechanism based on physiological homeostasis constraints is used to perform cross-dimensional feature standardization on the preprocessed multi-source data. The scaling and normalization formula is as follows: in: Represents the th after steady-state constraint scaling The first sample 3D eigenvalues; Represents the first element in the original multi-source dataset. The first sample 3D eigenvalues; and These represent the next [number] in this batch. The sample mean and standard deviation of the dimensional feature; Indicates the first Physiological safety thresholds of physical characteristics are used to define the boundaries of healthy homeostasis; To truncate the activation function, when the feature deviation does not exceed the safety threshold When this condition is met, the value of this item is 0; Indicates the first Boundary amplification penalty coefficient for dimensional features; The standardized rumen endocrine physiological data and the body surface kinematic data are time-stamped and aligned to complete the multi-source temporal registration. The timestamp-aligned rumen endocrine physiological data and the body surface kinematic data are concatenated to construct the multidimensional heterogeneous feature fusion input matrix.
6. The method for assessing the vitality level of meat sheep based on ingestible and wearable sensor detection according to claim 5, characterized in that, The multi-source time series registration further includes: For the surface kinematic data with a sampling frequency higher than that of the rumen endocrine physiological data, the triaxial acceleration in the surface kinematic data is taken as high-frequency motion data, and the magnitude of the resultant acceleration signal vector is obtained from the triaxial acceleration. Statistical analysis is performed on the resultant acceleration signal vector amplitude sequence within a preset time window to obtain the comprehensive acceleration characteristic value within the preset time window; Align the composite acceleration feature value with the rumen endocrine physiological data on timestamps.
7. The method for assessing the vitality level of meat sheep based on ingestible and wearable sensor detection according to claim 1, characterized in that, The network architecture of the intelligent evaluation model includes an input layer, multiple hidden layer extraction modules, and an output layer. Each hidden layer extraction module is composed of a linear feature mapping neuron, a batch normalization layer, a nonlinear activation layer, and a random deactivation layer connected in series.
8. The method for assessing the vitality level of meat sheep based on swallowable and wearable sensor detection according to claim 1, characterized in that, The multidimensional heterogeneous feature fusion input matrix is input into the intelligent evaluation model for supervised training and dynamic optimization to obtain the trained evaluation model, including: The preprocessed multidimensional heterogeneous features are fused into an input matrix and the corresponding vitality level labels to construct a sample dataset. The predicted distribution is obtained through forward propagation. The deviation between the predicted distribution and the vitality level label is quantified using a joint error function of asymmetric cost sensitivity and hard sample focusing. The joint error quantification formula is as follows: in: This represents the joint error loss value across multiple categories; Indicates the total number of samples entered in the batch; This indicates the total number of vitality level categories; Indicates the first Each sample belongs to category The true label indicator variable; The intelligent evaluation model predicts the first... Each sample belongs to category The probability of; This is the asymmetric risk penalty coefficient; For difficult samples, focus factor This is the focusing constant; It is a minimal smoothing constant; A dynamic adaptive momentum optimization algorithm based on error fluctuation feedback is adopted to update the global network weight matrix according to the gradient information obtained by backpropagation, so as to complete the supervised training and dynamic optimization. The momentum gradient update formula is as follows: in: Indicates the current iteration round; This represents the error gradient calculated in the current round; and Let represent the weighted first-moment estimate and the second-moment estimate of the gradient, respectively; and These represent the exponential decay rate constants of the first and second moments, respectively; This represents the initial global learning rate; This represents the dynamic learning rate of the current round after error fluctuation feedback compensation; The step size is the radical compensation constant; and These are the joint error loss values for the current round and the previous round, respectively; This represents the updated network model weights.
9. The method for assessing the vitality level of meat sheep based on swallowable and wearable sensor detection according to claim 1, characterized in that, The real-time feature tensor of the sheep to be evaluated is used as the real-time input to the multidimensional heterogeneous feature fusion input matrix, and then fed into the evaluation model for gradient-free forward inference, outputting the corresponding vitality level evaluation result, including: In practical application deployment, the gradient calculation tracking graph of the deep learning framework is turned off, and the real-time feature tensor is input into the evaluation model for gradient-free forward inference; The predicted probability vector is output through a normalized exponential function; The confidence peak value in the predicted probability vector is extracted and a state mapping is performed to output the vitality level assessment results of low vitality, medium vitality, or high vitality.
10. A system for assessing the vitality level of meat sheep based on swallowable and wearable sensor detection, characterized in that, include: The rumen physiological data acquisition unit is used to acquire physiological data of the rumen endocrine environment of meat sheep through swallowable sensors. The body surface motion data acquisition unit is used to acquire body surface kinematic data of meat sheep through wearable sensors; A multi-source data preprocessing and temporal registration unit is used to preprocess and perform multi-source temporal registration on the rumen endocrine physiological data and the body surface kinematic data to construct a multi-dimensional heterogeneous feature fusion input matrix. The intelligent assessment model construction unit is used to pre-set an intelligent assessment model for the vitality level of mutton sheep based on a multi-layer implicit mapping and nonlinear adaptive activation dual-domain feature fusion network. The model training and optimization unit is used to input the multidimensional heterogeneous feature fusion input matrix into the intelligent evaluation model for supervised training and dynamic optimization, so as to obtain the trained evaluation model. The evaluation model is the intelligent evaluation model after supervised training and dynamic optimization. The vitality level inference and evaluation unit is used to take the real-time feature tensor of the sheep to be evaluated as the real-time input of the multidimensional heterogeneous feature fusion input matrix, and send it into the evaluation model for gradient-free forward inference, and output the corresponding vitality level evaluation result.