Pig feed intake monitoring method and system based on rheological characteristics and time compensation

By monitoring depth image sequences within the feed hopper, utilizing temporal statistical projection features and a physical sensing dual-stream network, combined with a virtual feed pool and global state variables, continuous monitoring of pig feed intake in an automated feeder was achieved. This solved the problem of inaccurate measurement in free-feeding scenarios and improved the accuracy and interpretability of feed intake estimation.

CN122265933APending Publication Date: 2026-06-23HENAN AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN AGRICULTURAL UNIVERSITY
Filing Date
2026-01-28
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing pig feed intake monitoring technologies suffer from inaccurate measurement due to obstruction and continuous feeding by multiple pigs in free-feeding scenarios, especially in automated feeders where continuous measurement and real-time distribution are difficult to achieve.

Method used

By monitoring the depth image sequence inside the feed hopper, utilizing time-series statistical projection features and a physical sensing dual-flow network, combined with a virtual feed pool and global state variables, the feed dispensing and intake are dynamically simulated to achieve continuous monitoring of pig feed intake and state handover.

Benefits of technology

Accurate measurement and status handover of continuous feeding of multiple pigs were achieved under conditions where the feed trough was not observable, which improved the accuracy and interpretability of feed intake estimation and solved the problem of inaccurate measurement caused by obstruction and time misalignment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265933A_ABST
    Figure CN122265933A_ABST
Patent Text Reader

Abstract

This invention provides a method and system for monitoring pig feed intake based on rheological characteristics and temporal compensation. The method includes: detecting the effective dwelling behavior of pigs within a feeding area; calculating the temporal statistical projection features of a temporal depth image sequence relative to a reference spatial model; inputting the temporal statistical projection features into a physical sensing dual-flow feed estimation model to obtain the physical feed volume at each time step; configuring the global state variables maintained by the system as initial values ​​into the virtual feed pool of the current pig; determining the actual feed intake of the pig within the corresponding time step based on the physical feed volume, effective dwelling behavior, and pig feeding capacity constraints during the pig's feeding process, and dynamically updating the feed status of the virtual feed pool; and writing the feed status in the virtual feed pool back to the global state variables when the current pig leaves the feeding area, so that subsequent pigs entering the feeding area can inherit this status, thereby achieving accurate measurement and state handover during the continuous feeding process of multiple pigs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart animal husbandry and precision feeding monitoring technology, and in particular to a method and system for monitoring pig feed intake based on rheological characteristics and time-series compensation. Background Technology

[0002] In precision feeding management of pigs, accurately obtaining the feed intake of a single pig is the core data foundation for calculating feed conversion ratio (FCR), monitoring pig health status, and selecting superior breeds. Existing feed intake monitoring solutions can be broadly divided into two categories: weighing sensors and visual estimation. On the one hand, weighing sensor solutions typically place a weighing unit at the bottom of the feed trough to obtain changes in feed intake. However, the farming environment generally presents factors such as high humidity, highly corrosive gases, vibration of feeding equipment, and animal collisions, which can easily lead to problems such as zero-point drift, high failure rate, and high maintenance costs for weighing sensors, thus limiting their applicability under long-term stable operating conditions.

[0003] On the other hand, visual estimation schemes often estimate feed intake by imaging feed troughs or feed piles and estimating the intake based on the difference in appearance or volume between "before feeding" and "after feeding." This type of method is somewhat usable under certain feeding patterns with restricted intake or "fixed feeding frequency": for example, in a single feed trough structure, feeding is done several times a day, and the feed pile shape tends to stabilize after feeding, at which point the intake per feeding can be estimated by taking two images before and after feeding. However, this approach usually implies two premises: first, the feed area can be directly observed during feeding; second, the feeding process and the feeding process can be considered as a single event and settled using a "before-and-after difference."

[0004] However, the above premises often do not hold true for the typical structure of free-feeding pigs and automated feeders (upper storage cylinder, lower feed trough). In free-feeding mode, feed dispensing events may be frequently triggered and instantaneous during the feeding process, while feeding behavior is continuous and exhibits individual differences. More importantly, the pig's head continuously obstructs the feed trough area during feeding, making it difficult for the system to directly and effectively observe the remaining feed in the trough for most of the time. Therefore, visual methods based on the "before and after difference" of the feed trough cannot achieve continuous measurement and real-time distribution of the feeding process.

[0005] Furthermore, in free-feeding scenarios, multiple pigs often enter the same feeding area consecutively, and the remaining feed in the trough will naturally be inherited between different feeding sessions. Relying solely on the record of feed intake cannot distinguish between "the current pig has finished eating" and "the remaining feed has been transferred to the next pig," while relying solely on trough observation is subject to occlusion limitations, which can easily lead to problems such as unclear attribution of individual feed intake and increased cumulative error. Summary of the Invention

[0006] In view of the above problems, the present invention is proposed to provide a method and system for monitoring pig feed intake based on rheological characteristics and time-series compensation to overcome the above problems.

[0007] This invention provides a method for monitoring feed intake in pigs based on rheological characteristics and time-series compensation. The method is applied to a free-feeding scenario using an automated feeder with a storage hopper and feed trough structure. The method includes: When pigs are detected entering the feeding area, their effective dwelling behavior within the feeding area is detected. Acquire a time-series depth image sequence reflecting the feed accumulation state inside the storage hopper during the feeding process; The temporal statistical projection features of the temporal depth image sequence relative to the reference spatial model are calculated. The temporal statistical projection features are used to characterize the rheological morphology of the feed in the storage hopper in the temporal and spatial dimensions. The reference spatial model is used to characterize the reference depth image when the storage hopper is in an unloaded state. The time-series statistical projection features are input into a pre-trained physical sensing dual-flow feeding estimation model to obtain the physical feeding amount corresponding to each image acquisition time. The global state variable is configured as the initial value in the virtual feed pool of the current pig. The virtual feed pool is used to simulate the physical buffering process of feed in the feed trough. The global state variable is a preset variable used to characterize the amount of feed objectively present in the feed trough. During the feeding process of pigs, the actual feed intake of the current pig in the corresponding time step is determined based on the physical feed volume, the effective dwell behavior and the preset pig feeding capacity constraints, and the residual feed status of the virtual residual feed pool is dynamically updated. When a pig leaves the feeding area, the status of the remaining feed in the current virtual feed pool is written back to the global state variable so that subsequent pigs entering the feeding area can inherit it, thereby maintaining the continuity of feed inventory status during the continuous feeding process of multiple pigs.

[0008] Furthermore, the method also includes: The global state variables are modified based on the physical capacity threshold of the feed trough, the idle time of the feeding area, and the historical feeding behavior of the pigs.

[0009] Furthermore, the global state variables are modified based on the physical capacity threshold of the feed trough, the idle time of the feeding area, and the historical feeding behavior of the pigs, including: If the global state variable is greater than the physical capacity threshold of the hopper, then the global state variable will be configured to the physical capacity threshold. If the idle time of the feeding area exceeds the preset idle threshold, the global state variable will be reset to zero. If the global state variable indicates that there is leftover feed but there is no effective stay of pigs or the effective feeding behavior is below the preset effective threshold, then the global state variable is weighted according to the preset weighting coefficient. When the virtual feed pool is empty and no feeding event is detected, but pig lingering behavior is detected, the implicit feed intake is predicted based on the lingering time of the pigs. The global state variable is deducted and corrected based on the estimated implicit feed intake, and the implicit feed intake is included in the current pig feed intake for compensation.

[0010] Further, calculating the temporal statistical projection features of the temporal depth image sequence relative to the reference spatial model includes: Obtain a sequence of N temporal depth images centered at the current time, calculate the difference image between each depth image in the sequence and the reference spatial model, and obtain the difference image sequence. Extract the mean, maximum, and standard deviation statistics of the difference image sequence over time. The mean, maximum, and standard deviation plots are merged to generate a composite feature tensor consisting of three positive channels, thus obtaining the time-series statistical projection features.

[0011] Furthermore, the physical sensing dual-flow feed rate estimation model is implemented using a convolutional neural network architecture, including: The spatiotemporal awareness input layer is used to stitch together pixel-level two-dimensional coordinate channels based on the temporal statistical projection features to form a five-channel input tensor containing spatiotemporal information. The feature extraction backbone is used to extract multi-scale high-dimensional feature maps of the five-channel input tensor. The parallel dual-stream regression head includes a physical volume branch, a residual correction branch, and a dual-stream branch fusion output layer. The physical volume branch processes multi-scale high-dimensional feature maps through 1×1 convolutional layers to output a single-channel virtual quality density map, which is constrained to be non-negative by the ReLU activation function. The processed density map is then subjected to global sum pooling to simulate the physical volume integration process to obtain the basic physical estimate. The residual correction branch performs global average pooling on the multi-scale high-dimensional feature maps and outputs the residual correction value and prediction confidence through a fully connected layer. The dual-stream branch fusion output layer superimposes the basic physical estimate and the residual correction value to obtain the final physical feed quantity.

[0012] Furthermore, based on the physical feed quantity, the effective dwell behavior, and the preset pig feeding capacity constraints, the actual feed intake of the pig in the corresponding time step is determined. ,include: in, This represents the maximum swallowing rate of pigs. For time step, This represents the maximum amount of feed that a pig can ingest within this time step, under the pig's physiological limits. ; The physical feed rate at time t; Dynamically updating the residual material status of the virtual residual material pool includes: .

[0013] Furthermore, before calculating the temporal statistical projection features of the temporal depth image sequence relative to the reference spatial model, the method further includes: Acquire K-frame depth images of the storage cylinder in an unloaded state and perform temporal averaging to generate a static reference surface. The static reference surface is used as the reference space model; Among them, D k (u,v) represents the depth value at pixel coordinates (u,v) in the depth image of the k-th frame under no-load conditions, where K>1.

[0014] Furthermore, before detecting the effective dwelling behavior of the pigs within the feeding area, the method further includes: Obtain information from the RFID tags installed on the pigs themselves to identify the pigs entering the feeding area; The temporal depth image sequence is time-aligned with the pig's identity information using timestamps to establish a correlation between feeding events and feeding behavior.

[0015] Another aspect of the present invention provides a pig feed intake monitoring system based on rheological characteristics and time-series compensation, the system comprising an automated feeder with a storage hopper and feed trough structure for free-feeding scenarios, the system comprising: The acquisition terminal is installed above the storage cylinder of the feeder and is used to acquire time-series depth image sequences that reflect the feed accumulation state inside the storage cylinder during the feeding process. An identification device is installed at the entrance of the feeding area to collect RFID tags installed on the pigs to obtain the identification information of the pigs entering the feeding area; An electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, it implements the steps of the pig feed intake monitoring method based on rheological characteristics and time-series compensation as described above; wherein the memory maintains at least global state variables, the virtual feed pool state of each pig feeding session, and historical feed intake rate data for calculating feed intake capacity constraints.

[0016] In another aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the pig feed intake monitoring method based on rheological characteristics and time-series compensation as described above.

[0017] This invention provides a method and system for monitoring pig feed intake based on rheological characteristics and temporal compensation. By monitoring depth image sequences of the unobstructed area within the upper feed hopper, and utilizing temporal statistical projection technology, multi-channel features characterizing feed rheological morphology are extracted, effectively filtering out dust and sensor noise. Combined with CoordConv and a physical-residual dual-flow regression head, accurate inversion of physical feed dispensing volume is achieved. Furthermore, this invention constructs a state-space model including a "virtual residual feed pool" and "global state anchoring." Even when direct observation of residual feed in the trough is impossible, the dynamic simulation of dispensing pulses and feed consumption enables accurate measurement and state transition of the continuous feeding process for multiple pigs.

[0018] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0019] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. In the drawings: Figure 1 This is a schematic diagram of the application scenario and hardware layout of the pig feed intake monitoring system in an embodiment of the present invention; Figure 2 This is a flowchart of a method for monitoring pig feed intake based on rheological characteristics and time-series compensation according to an embodiment of the present invention; Figure 3 This is a network architecture diagram of the physical sensing dual-flow feed estimation model according to an embodiment of the present invention. Figure 4 The flowchart illustrates the implementation of a method for monitoring pig feed intake based on rheological characteristics and time-series compensation, according to a specific embodiment of the present invention. Figure 5 A time-series logic diagram for managing feed intake and feed quantity during pig feeding through a virtual feed pool and global state variables; Figure 6 This is a schematic diagram illustrating the consistency between the feed intake estimation results based on the virtual feed pool model and the reference measurement results. Figure 7 This is a structural block diagram of a pig feed intake monitoring system based on rheological characteristics and time-series compensation, according to an embodiment of the present invention. Detailed Implementation

[0020] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0021] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art and should not be interpreted in an idealized or overly formal sense unless specifically defined.

[0022] To address the inaccurate feed intake measurement issues in existing technologies caused by factors such as feed trough obstruction, misalignment of feeding and intake times, and continuous feeding by multiple pigs, this invention proposes a pig feed intake monitoring method based on rheological characteristics and temporal compensation. This method enables non-contact monitoring of feed intake without relying on weighing within the feed trough or visual observation. It indirectly characterizes the feed feeding process by utilizing visual information from unobstructed areas within the feed hopper's storage hopper. Through state modeling and temporal compensation mechanisms, it rationally allocates feed intake and intake across different time periods, achieving continuous measurement across pig feeding sessions and improving the accuracy and interpretability of feed intake estimation.

[0023] The pig feed intake monitoring method based on rheological characteristics and time-series compensation proposed in this invention is applied to a free-feeding scenario with an automated feeder system consisting of a storage hopper and a feed trough. In this scenario, the feeding system typically includes a storage hopper at the top and a feed trough at the bottom, and the feed may be replenished multiple times during feeding. Simultaneously, because the pig's head continuously obstructs the feed trough area while feeding, it is difficult for the system to directly observe the real-time status of the feed within the trough during the feeding process. Figure 1The diagram illustrates the application scenario and hardware layout of a pig feed intake monitoring system. The data acquisition terminal uses a depth imaging device (e.g., a RealSense camera) mounted above the feed hopper of the wet / dry feeder. The camera's optical axis is ensured to be perpendicular to the bottom of the feed hopper and to cover the entire inner wall area. The field of view (FOV) must completely cover the inner wall of the feed hopper to acquire depth image data. The identification device employs Radio Frequency Identification (RFID) technology. The system uses RFID readers installed in the feeding area to obtain the real-time identification information of pigs entering the area. The electronic device, i.e., the data processing terminal, is equipped with an embedded computing platform (such as an NVIDIA Jetson AGX Xavier) responsible for receiving image data from the depth camera and performing real-time data processing and inference.

[0024] In view of the above objective conditions, this invention does not rely on direct observation of feed troughs or feed piles to calculate feed intake. Instead, it continuously senses the changes in the spatial form of feed in the storage bin, and combines feed inventory status modeling and time-series compensation mechanism across feeding sessions to continuously estimate the feed intake of individual pigs under the premise that feed troughs are not observable.

[0025] like Figure 2 As shown, the pig feed intake monitoring method based on rheological characteristics and time-series compensation proposed in this invention includes the following steps: S11. When pigs are detected entering the feeding area, the effective dwelling behavior of the pigs in the feeding area is detected.

[0026] Specifically, when pigs are detected entering the feeding area, the system acquires the individual pig's identification information and detects the effective dwelling behavior of the pig's head within the feeding area. Effective dwelling behavior indicates that the pig is actually feeding, rather than merely briefly stopping or passing through the feeding area.

[0027] Furthermore, the feeding area can accommodate at most one pig at any given time, or the system can ensure that feeding sessions do not overlap through access control / pen structure.

[0028] S12. Obtain a time-series depth image sequence reflecting the feed accumulation state inside the storage cylinder during the feeding process.

[0029] Specifically, a depth imaging device installed above the feed hopper can be used to acquire a time-series depth image sequence reflecting the feed accumulation state inside the hopper. To ensure the quality and accuracy of the image data, the acquired depth images undergo the following preprocessing: Noise Removal: Median filtering algorithm is used to remove noise from the depth image; Image smoothing: Use the mean smoothing algorithm to reduce random errors in images; Region trimming: The depth map is trimmed according to the shape of the storage cylinder to retain the effective depth information of the feed inside the storage cylinder; Contrast Enhancement: Histogram equalization algorithm is used to enhance image contrast and reduce the impact of ambient light changes on image quality.

[0030] In this embodiment, before detecting the effective dwelling behavior of the pigs in the feeding area, the method further includes: acquiring RFID tag information installed on the pig body to obtain the identity information of the pigs entering the feeding area; and aligning the temporal depth image sequence with the pig identity information through timestamps to realize the correspondence between feeding events and feeding behavior.

[0031] S13. Calculate the temporal statistical projection features of the temporal depth image sequence relative to the reference spatial model. The temporal statistical projection features are used to characterize the rheological morphology of the feed in the storage cylinder in the time and space dimensions. The reference spatial model is used to characterize the reference depth image when the storage cylinder is in an unloaded state.

[0032] S14. Input the time-series statistical projection features into the pre-trained physical sensing dual-flow feeding estimation model to obtain the physical feeding amount corresponding to each image acquisition time.

[0033] S15. Configure the global state variable as the initial value to the virtual feed pool of the current pig. The virtual feed pool is used to simulate the physical buffering process of feed in the feed trough. The global state variable is a preset variable used to characterize the amount of feed objectively present in the feed trough.

[0034] In this embodiment, a global state variable is maintained in the system, independent of any pig's feeding session, to represent the objectively existing feed quantity in the feed trough, i.e., the global state variable. When a pig enters the feeding area, the global state variable is introduced as an initial value into the virtual feed pool of the current pig. This is to simulate the physical buffering process of feed in a trough.

[0035] The virtual feed pool is updated cumulatively based on the detected physical feed amount during the feeding process, and decreases within each time period due to the pigs' feeding capacity constraints.

[0036] S16. During the feeding process of pigs, the actual feed intake of the current pig in the corresponding time step is determined based on the physical feed amount, the effective dwell behavior and the preset pig feeding capacity constraints, and the residual feed status of the virtual residual feed pool is dynamically updated.

[0037] The pig's feeding capacity constraint is obtained by statistical analysis of the effective feeding rate data formed by the pig during its historical feeding process. The feeding capacity constraint is set as a threshold parameter to characterize the upper limit of the pig's physiological feeding capacity.

[0038] S17. When a pig leaves the feeding area, the status of the remaining feed in the current virtual feed pool is written back to the global status variable so that subsequent pigs entering the feeding area can inherit it, thereby maintaining the continuity of feed inventory status during the continuous feeding process of multiple pigs.

[0039] In an optional embodiment of the present invention, the method for monitoring pig feed intake based on rheological characteristics and time-series compensation provided by the present invention further includes step S18, which is not shown in the accompanying drawings. S18. The global state variables are modified based on the physical capacity threshold of the feed trough, the idle time of the feeding area, and the historical feeding behavior of the pigs.

[0040] In one optional embodiment, the global state variable is corrected based on the physical capacity threshold of the feed trough, the idle time of the feeding area, and the historical feeding behavior of the pigs. Specifically, this includes: if the global state variable is greater than the physical capacity threshold of the feed trough, the global state variable is configured to the physical capacity threshold; if the idle time of the feeding area exceeds a preset idle threshold, the global state variable is reset to zero; if the global state variable indicates the presence of leftover feed but the pigs do not stay effectively or the effective feeding behavior is lower than a preset effective threshold, the global state variable is weighted according to a preset weighting coefficient; when the virtual leftover feed pool is empty and no feeding event is detected, but pig lingering behavior is detected, the implicit feed intake is predicted based on the lingering time of the pigs' lingering behavior, the global state variable is deducted and corrected based on the estimated implicit feed intake, and the implicit feed intake is included in the current pig feed intake for compensation.

[0041] This invention, through its embodiments, modifies the global state variables based on the physical capacity limitations of the feed trough, the idle time of the feeding area, and the historical feeding behavior of pigs, in order to suppress cumulative errors caused by visual blind spots or non-feeding losses. Specific steps include, but are not limited to; Physical capacity constraints: If Then Limit to maximum capacity , This is the physical capacity threshold of the trough; Timeout reset to zero: If the idle time in the feeding area exceeds a preset threshold. Then Reset to zero. The preset idle threshold; Negative feedback regulation: If the effective feeding behavior of pigs falls below a preset threshold, the system will adjust accordingly. Perform a weight reduction measure; Retention Compensation: When the virtual feed pool is empty and no feeding event is detected, but pig retention behavior is detected, the system calculates implicit feed intake based on the retention duration and compensates accordingly. The calculated implicit feed intake is then used to further compensate for... Adjustments are made to offset the overestimation of inventory caused by blind spots.

[0042] This invention provides a pig feed intake monitoring method based on rheological characteristics and temporal compensation. Addressing the pain points of existing visual solutions such as "blind spots in the feed trough" and "spatiotemporal misalignment between feed dispensing and consumption," it innovatively proposes a Physical Sensing Two-Stream Network (TSP-Net) architecture and a Virtual Residual Pool closed-loop logic. Specifically, in the automated feeder (feed hopper-trough structure), when the feed trough area is obscured by the pig's head during feeding, making direct observation difficult, the feed dispensing amount is sensed based on the visual spatial morphological changes of feed depth within the feed hopper. This is combined with inventory status modeling and temporal compensation across feeding sessions, along with the TSP-Net architecture, to continuously calculate and record the feed intake of individual pigs.

[0043] This invention monitors depth image sequences of the unobstructed area within the upper feed hopper and extracts multi-channel features characterizing feed rheological morphology using temporal statistical projection (TSP) technology, effectively filtering out dust and sensor noise. Combined with CoordConv and a physical-residual dual-flow regression head, it achieves accurate inversion of physical feed dispensing volume. Based on this, the invention constructs a state-space model including a "virtual feed pool" and "global state anchoring." Even when feed trough residue cannot be directly observed, it achieves accurate measurement and state transition of the continuous feeding process for multiple pigs through dynamic simulation of feeding pulses and feed consumption.

[0044] In this embodiment of the invention, before calculating the temporal statistical projection features of the temporal depth image sequence relative to a reference spatial model, the method further includes: Acquire K-frame depth images of the storage cylinder under empty conditions and perform temporal averaging to eliminate random sensor noise, generating a static reference surface. The static reference surface is used as the reference space model; Among them, D k(u,v) represents the depth value at pixel coordinates (u,v) in the depth image under the unloaded state of the k-th frame, where K > 1. Optionally, before averaging, threshold removal of obviously abnormal depth values ​​or median filtering of the sequence can be performed to further improve the stability and confidence of the reference plane. Optionally, K = 100.

[0045] During the system initialization phase, when the storage cylinder is empty, the system acquires a sequence of K frames of depth images. Since the depth camera measures the distance from the object to the lens, a larger value indicates a greater distance (i.e., closer to the bottom of the cylinder). To reduce the impact of flying insects, dust, speckle noise, and instantaneous vibrations on the reference surface, this embodiment statistically averages the empty sequence over time to generate a static empty reference surface.

[0046] In this embodiment of the invention, calculating the temporal statistical projection features of the temporal depth image sequence relative to the reference spatial model specifically includes: Temporal difference sequence calculation: Obtain a sequence of N temporal depth images centered at the current time, calculate the difference image between each depth image in the sequence and the reference spatial model, and obtain the difference image sequence.

[0047] Specifically, a sliding time window strategy is adopted during real-time monitoring. At each time step t of real-time monitoring, a depth image sequence containing the current frame and several frames before and after it is acquired. The sequence length is N. Calculate I for each frame in the sequence. i With reference plane difference image And negative values ​​are physically truncated to filter out measurement noise: .

[0048] Temporal statistical projection feature extraction: Extract the mean, maximum, and standard deviation statistical plots of the difference image sequence in the time dimension.

[0049] Specifically, for the differential image sequence Statistical analysis is conducted over time, including: Mean projection yields a mean map. ): Characterizes the steady-state volume distribution of feed accumulation and filters out high-frequency splash noise; The maximum value projection yields a maximum value statistical graph (Max Map). ): Characterizes the peak profile of the stockpile during its descent fluctuations, preventing underestimation of depth due to light absorption; Standard deviation projection yields a standard deviation map (Std Map). ): Characterizes the rheological instability within the region (such as dust clouds or collapse flows), providing uncertain priors for the model; Generate a composite feature tensor F consisting of three positive traffic channels. TSP The above results are normalized to the [0,1] interval, and the normalized mean, maximum and standard deviation plots are merged to generate a composite feature tensor consisting of three positive channels, thus obtaining the time series statistical projection features.

[0050] In this embodiment of the invention, the physical sensing dual-flow feed estimation model is implemented using a convolutional neural network architecture, including: The spatiotemporal-aware input layer is used to stitch together pixel-level two-dimensional coordinate channels based on the temporal statistical projection features to form a five-channel input tensor containing spatiotemporal information.

[0051] The feature extraction backbone is used to extract multi-scale high-dimensional feature maps of the five-channel input tensor. The parallel dual-stream regression head includes a physical volume branch, a residual correction branch, and a dual-stream branch fusion output layer. The physical volume branch processes multi-scale high-dimensional feature maps through 1×1 convolutional layers to output a single-channel virtual quality density map, which is constrained to be non-negative by the ReLU activation function. The processed density map is then subjected to global sum pooling to simulate the physical volume integration process to obtain the basic physical estimate. The residual correction branch performs global average pooling on the multi-scale high-dimensional feature maps and outputs the residual correction value and prediction confidence through a fully connected layer. The dual-stream branch fusion output layer superimposes the basic physical estimate and the residual correction value to obtain the final physical feed quantity.

[0052] In one specific embodiment, the physical sensing dual-flow feed rate estimation model is as follows: Figure 3 As shown, the temporal statistical projection feature, i.e., the composite feature tensor F, is... TSP The pre-trained Physically Aware Dual-Stream Feed Estimation Model (TSP-Net) is input, and the physical feed rate corresponding to the current moment is obtained through collaborative reasoning of the physical volume integral branch and the residual correction branch. Specific steps include: Spatiotemporal Awareness Input Construction: The model input is not only depth features. Based on the obtained 3-channel TSP features (3×224×224), a pixel-level horizontal coordinate (X) and vertical coordinate (Y) grid (normalized to [-1, 1]) is generated. The feature tensor is then... (Include The three channels are concatenated with the pixel-level two-dimensional coordinate channel (CoordConv, which includes normalized x-coordinates and y-coordinates) to form a dimension of The five-channel input tensor gives the model the ability to perceive the spatial position of the center and edge regions of the barrel, which enables the convolution kernel to perceive the spatial position difference between the center and edge of the barrel (CoordConv mechanism).

[0053] Feature Extraction and Dual-Stream Regression: The five-channel input tensor is input into a feature extractor with ConvNeXt as the backbone network to extract multi-scale high-dimensional features, which are then fed into a parallel dual-stream regression head. The backbone network uses ConvNeXt-Base (or Tiny) as the feature extractor.

[0054] Input layer modification: The number of input channels in the first convolutional kernel (Stem) is changed from 3 to 5. During initialization, the first 3 channels are loaded with ImageNet pre-trained weights, and the last 2 coordinate channels are initialized using Xavier.

[0055] Feature extraction: After downsampling for 4 stages, a high-dimensional feature map is output.

[0056] Physical Volume Stream (Physics Stream): via Convolutional layer outputs a single-channel virtual quality density map The values ​​are then constrained to be non-negative using the ReLU activation function; subsequently, global sum pooling is performed on the density map, which sums all pixel values ​​to simulate the physical volume integration process, yielding the basic physical estimate. : ; Residual Stream: After performing global average pooling (GAP) on the feature map, the output residual correction value is passed through a fully connected layer. With prediction confidence It is used to compensate for density nonlinearity bias that cannot be captured by physical flow and to quantify observation uncertainty.

[0057] Final material feed rate calculation: By combining the outputs of the dual-flow branches, the final physical material feed rate at the current moment is obtained. : ; The model employs a loss function that incorporates uncertainty weights during the training phase. The training loss function combines Gaussian NLL Loss and Wing Loss, making it suitable for high-uncertainty scenarios such as severe dust occlusion (i.e.,...). When the variance is large, the model can automatically reduce its dependence on physical estimates and increase the prediction variance, that is, automatically reduce the penalty weight for the sample and improve the robustness of the model.

[0058] Label acquisition and dataset construction: To obtain the true material loading labels required for supervised learning, one of the following methods can be used: a) Outlet weighing calibration: A weighing device is temporarily set up at the outlet of the feeder to record the actual mass of each feeding event as a label and align it with the differential characteristics of the corresponding time period. b) Experimental weighing platform: The feed output from the feeder is introduced into an independent container and weighed to form a "differential feature - feed mass" sample pair.

[0059] Samples were collected under different feed formulations (powder, pellets, wet mix), different installation heights, and different light / dust conditions to improve the model's generalization ability.

[0060] Model training and optimization: Loss function: A combination of Gaussian negative log-likelihood loss and Wing loss is used.

[0061] Gaussian NLL Loss is used for uncertainty modeling in regression tasks, enabling the model to automatically increase the prediction variance when faced with samples with high dust levels or severe shaking (i.e., high uncertainty). This reduces the weight of the sample in gradient backpropagation, thereby improving the model's robustness in noisy environments.

[0062] Wing Loss is used to enhance the focus on small error samples, improving regression accuracy during steady-state feeding. Data augmentation: During the training phase, a horizontal flip and a small Gaussian noise in the channel dimension are randomly applied to the temporal statistical projection feature map to improve the model's generalization ability.

[0063] In this embodiment of the invention, a global state variable is maintained in the system, independent of any pig's feeding session, to characterize the objectively existing feed quantity in the feed trough, i.e., the global state variable. And when a pig enters the feeding area, the global state variable is introduced as an initial value into the virtual feed pool of the current pig, that is, This is to simulate the physical buffering process of feed in a trough. Virtual waste pool based on physical material discharge volume The formula for dynamic updating is as follows: , The physical feed rate at time t.

[0064] During the pigs' feeding process, the virtual feed pool is dynamically updated based on the physical feed volume, the pigs' effective dwelling behavior (quantified as effective dwelling time), and the preset pigs' feeding capacity constraints, thereby determining the actual feed intake of the pigs within the corresponding time period.

[0065] At each system time step Internally, the system is based on the physical feed rate. Maximum swallowing rate of pigs and the status of the virtual waste pool Calculate the amount of food consumed within this time step. Feed intake is calculated only if a valid dwell behavior is detected at that time step; otherwise, the feed intake for that step is 0. The effective dwell time Δt is the time step within the session that satisfies the valid dwell behavior. The accumulation of.

[0066] In this embodiment of the invention, the actual feed intake of a pig within a corresponding time step is determined based on the physical feed quantity, the effective dwell behavior, and a preset constraint on the pig's feeding capacity. ,include: in, This represents the maximum swallowing rate of pigs. The time step represents the time span of the current calculation cycle and is related to the data sampling frequency of the front-end acquisition terminal (depth camera) or the data processing frequency of the system. This indicates the maximum amount of feed that a pig can ingest within this time step, under the physiological limits of the pig.

[0067] After calculating the feed intake, the remaining feed status of the virtual feed pool is dynamically updated, including: .

[0068] When a pig leaves the feeding area, the remaining amount in the current virtual feed pool is written back to the global state variable so that subsequent pigs entering the feeding area can inherit it.

[0069] It should be noted that the external reference feed intake data in the embodiments of the present invention can be obtained through a weighing device, manual recording, or other feed intake measurement methods with known accuracy; the alignment process can be achieved based on pig identity information and feeding session timestamps. Through the aforementioned consistency assessment and verification, the rationality of the feed intake estimation results obtained by the present invention based on visual perception of the depth of the feed hopper and state modeling under the condition that the feed trough is not observable can be verified, and a basis can be provided for system parameter adjustment or model optimization.

[0070] Figure 4 This is a flowchart illustrating the implementation of a method for monitoring pig feed intake based on rheological characteristics and time-series compensation, according to a specific embodiment of the present invention.

[0071] Figure 5 The timing logic diagram shows how the amount of feed dispensed and the amount of feed consumed by pigs are managed through a virtual feed pool and global state variables. Figure 5 middle: Global state variables This variable represents the current feed level in the physical feed trough and is independent of the pig's identity information. During the feeding process of multiple pigs, the global state variable will be passed between different pigs' feeding sessions.

[0072] Virtual waste pool This is used to simulate the feeding process of pigs. When a pig enters the feeding area, the system reads the global state variable and assigns it to the virtual feed pool. Maximum swallowing rate α: The maximum swallowing rate per pig (e.g., 50 g / s) is used to limit the amount of feed consumed by the pig at each time step.

[0073] System time step : The length of the discrete time step for system state updates and feed intake calculation.

[0074] Valid stay determination: Only if at time step Feed intake is only counted at a time step when the pig's head is detected to be within the feeding area and exhibits effective dwelling behavior; otherwise, the feed intake at that time step is 0.

[0075] Lifecycle management of foraging sessions; Phase 1: Entry Recognition and State Inheritance: When pigs enter the feeding area, the system reads the current global state variable and assigns it to the virtual feed pool. , Phase Two: Dynamic Compensation Loop Based on Rheological Characteristics During the feeding session, the system uses time steps Perform cyclic updates. For any time step... If the physical feed amount corresponding to this step is estimated... First, replenish and update the virtual surplus material pool: ; Subsequently, if a valid dwelling behavior is detected at that time step, the actual feed intake within that time step is calculated based on the virtual feed pool status and swallowing rate constraints. : ; Update the virtual waste pool: ; Phase 3: Exit Settlement and Status Transfer When pigs leave the feeding area, the system writes the remaining value of the virtual feed pool back to the global state variable: ; Phase Four: Robust Correction of Global State The system corrects global state variables through physical capacity constraints, timeout zeroing mechanisms, and negative feedback adjustment to eliminate errors caused by visual blind spots or non-feeding losses. The specific steps are as follows: Physical capacity constraints: If ,but ; Timeout reset: If the feeding area remains idle for more than [timeout period], the timeout will reset to zero. ,but ←0; Negative feedback decay: if If there is leftover feed but pigs consistently fail to stay in the feed effectively or their effective feeding behavior falls below a threshold, then... ; Detention compensation: When and However, the effective duration of stay was detected. In this case, the latent feed intake can be estimated using the conservative coefficient β and the feeding capacity constraint. , And The amount of feed consumed by the pig is recorded, and the global state variable is adjusted accordingly to eliminate the bias of "no feed on paper but still eating".

[0076] Consistency verification of feed intake estimation results: In this embodiment, in order to objectively evaluate the feed intake estimation results obtained based on the above-mentioned virtual feed pool and global state anchoring mechanism, the system can also introduce external reference feed intake data to verify the consistency of the feed intake estimation results.

[0077] The external reference feed intake data can be obtained through weighing devices, manual recording, or other feed intake measurement methods with known accuracy. The system aligns the estimated feed intake obtained based on the method of this invention with the reference data in terms of pig identity and feeding session dimensions, and analyzes the fitting relationship or correlation index between the two.

[0078] like Figure 6 As shown, under the aforementioned implementation conditions, the feed intake estimation results obtained based on the virtual feed trough model exhibit a good consistency with the reference measurement results, indicating that the present invention can stably and reasonably continuously estimate the feed intake of pigs in a free-feeding scenario where the feed trough is not observable.

[0079] It should be noted that the above consistency verification is only an optional evaluation method of the present invention, used to objectively evaluate the feed intake estimation results, and does not constitute a limitation on the scope of protection of the present invention.

[0080] The method for monitoring feed intake in pigs based on rheological characteristics and time-series compensation provided by this invention has the following beneficial effects: By employing time-series statistical projection features (mean / maximum / standard deviation), dust obstruction and random noise from sensors during feed fall can be effectively suppressed. Combined with a physical sensing dual-stream network, a hard constraint on physical volume is introduced using global summation pooling, which significantly improves the accuracy and interpretability of feed quantity estimation.

[0081] There is no need to install fragile weighing sensors at the bottom of the feed trough, nor is there a need to solve the visual problem of the feed trough being blocked by pig heads. Core data can be collected simply by monitoring the upper storage cylinder, which greatly reduces hardware maintenance costs and improves the durability of the system. Through the dynamic interaction between "global state variables" and "virtual surplus feed pool", a rigorous feed inventory circulation logic has been established, which can accurately handle the complex scenario of "the previous pig leaving some food, and the next pig continuing to eat it", avoiding the error of attribution in feed intake calculation. A global state correction mechanism based on physical capacity limitations, timeout zeroing, and retention compensation is introduced, which can effectively suppress cumulative errors caused by visual blind spots or non-feeding losses (such as arched discharge troughs) and ensure the accuracy of data during long-term operation.

[0082] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0083] Furthermore, another embodiment of the present invention provides a pig feed intake monitoring system based on rheological characteristics and time-series compensation. The system includes an automated feeder with a storage hopper and feed trough structure for free-feeding scenarios, such as... Figure 7 As shown, the system includes: The acquisition terminal (depth imaging device, i.e., depth camera) 810 is installed above the storage cylinder of the feeder and is used to acquire a time-series depth image sequence reflecting the feed accumulation state inside the storage cylinder during the feeding process. The identification device (RFID reader / identification module) 820 is installed at the entrance of the feeding area to collect RFID tags installed on the pigs to obtain the identification information of the pigs entering the feeding area; Electronic device 800 includes processor 801, memory 802, and computer program, i.e., program instructions 8021, stored in memory 802 and executable on processor 801; when the processor executes the computer program, it implements the steps of the pig feed intake monitoring method based on rheological characteristics and time-series compensation as described above; wherein, the memory maintains at least key data / state variables 8022, such as global state variables, virtual feed pool status for each pig feeding session, and historical feed intake rate data for calculating feed intake capacity constraints.

[0084] Furthermore, the system may also include a display / management terminal 830 and a weighing calibration device 840. The data acquisition terminal 810, the identification device 820, the display / management terminal 830, and the weighing calibration device 840 all communicate with electronic devices via I / O interfaces.

[0085] Furthermore, the electronic device 800 also includes a network communication module 805 and a storage medium / local storage 806. The electronic device 800 can upload feed intake data and model updates to the management platform / cloud server 850 through the network communication module 805.

[0086] Furthermore, another embodiment of the present invention provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps described in the above embodiment of the pig feed intake monitoring method based on rheological characteristics and time-series compensation, for example... Figure 1 Steps S11-S17 are shown.

[0087] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, any of the claimed embodiments can be used in any combination.

[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for monitoring feed intake in pigs based on rheological characteristics and time-series compensation, characterized in that, The method is applied to a free-feeding scenario using an automated feeder with a storage cylinder and a feed trough structure. The method includes: When pigs are detected entering the feeding area, their effective dwelling behavior within the feeding area is detected. Acquire a time-series depth image sequence reflecting the feed accumulation state inside the storage hopper during the feeding process; The temporal statistical projection features of the temporal depth image sequence relative to the reference spatial model are calculated. The temporal statistical projection features are used to characterize the rheological morphology of the feed in the storage hopper in the temporal and spatial dimensions. The reference spatial model is used to characterize the reference depth image when the storage hopper is in an unloaded state. The time-series statistical projection features are input into a pre-trained physical sensing dual-flow feeding estimation model to obtain the physical feeding amount corresponding to each image acquisition time. The global state variable is configured as the initial value in the virtual feed pool of the current pig. The virtual feed pool is used to simulate the physical buffering process of feed in the feed trough. The global state variable is a preset variable used to characterize the amount of feed objectively present in the feed trough. During the feeding process of pigs, the actual feed intake of the current pig in the corresponding time step is determined based on the physical feed volume, the effective dwell behavior and the preset pig feeding capacity constraints, and the residual feed status of the virtual residual feed pool is dynamically updated. When a pig leaves the feeding area, the status of the remaining feed in the current virtual feed pool is written back to the global state variable so that subsequent pigs entering the feeding area can inherit it, thereby maintaining the continuity of feed inventory status during the continuous feeding process of multiple pigs.

2. The method according to claim 1, characterized in that, The method further includes: The global state variables are modified based on the physical capacity threshold of the feed trough, the idle time of the feeding area, and the historical feeding behavior of the pigs.

3. The method according to claim 2, characterized in that, The global state variables are modified based on the physical capacity threshold of the feed trough, the idle time of the feeding area, and the historical feeding behavior of the pigs, including: If the global state variable is greater than the physical capacity threshold of the hopper, then the global state variable will be configured to the physical capacity threshold. If the idle time of the feeding area exceeds the preset idle threshold, the global state variable will be reset to zero. If the global state variable indicates that there is leftover feed but there is no effective stay of pigs or the effective feeding behavior is below the preset effective threshold, then the global state variable is weighted according to the preset weighting coefficient. When the virtual feed pool is empty and no feeding event is detected, but pig lingering behavior is detected, the implicit feed intake is predicted based on the lingering time of the pigs. The global state variable is deducted and corrected based on the predicted implicit feed intake, and the implicit feed intake is included in the current pig feed intake for compensation.

4. The method according to claim 1, characterized in that, Calculating the temporal statistical projection features of the temporal depth image sequence relative to the reference spatial model includes: Obtain a sequence of N temporal depth images centered at the current time, calculate the difference image between each depth image in the sequence and the reference spatial model, and obtain the difference image sequence. Extract the mean, maximum, and standard deviation statistics of the difference image sequence over time. The mean, maximum, and standard deviation plots are merged to generate a composite feature tensor consisting of three positive channels, thus obtaining the time-series statistical projection features.

5. The method according to claim 1, characterized in that, The physical sensing dual-flow feed rate estimation model is implemented using a convolutional neural network architecture, including: The spatiotemporal awareness input layer is used to stitch together pixel-level two-dimensional coordinate channels based on the temporal statistical projection features to form a five-channel input tensor containing spatiotemporal information. The feature extraction backbone is used to extract multi-scale high-dimensional feature maps of the five-channel input tensor. The parallel dual-stream regression head includes a physical volume branch, a residual correction branch, and a dual-stream branch fusion output layer. The physical volume branch processes multi-scale high-dimensional feature maps through 1×1 convolutional layers to output a single-channel virtual quality density map, which is constrained to be non-negative by the ReLU activation function. The processed density map is then subjected to global sum pooling to simulate the physical volume integration process to obtain the basic physical estimate. The residual correction branch performs global average pooling on the multi-scale high-dimensional feature maps and outputs the residual correction value and prediction confidence through a fully connected layer. The dual-stream branch fusion output layer superimposes the basic physical estimate and the residual correction value to obtain the final physical feed quantity.

6. The method according to claim 1, characterized in that, Based on the physical feed volume, the effective dwell behavior, and the preset pig feeding capacity constraints, the actual feed intake of the pig in the corresponding time step is determined. ,include: in, This represents the maximum swallowing rate of pigs. For time step, This represents the maximum amount of feed that a pig can ingest within this time step, under the pig's physiological limits. ; The physical feed rate at time t; Dynamically updating the residual material status of the virtual residual material pool includes: 。 7. The method according to claim 1, characterized in that, Before calculating the temporal statistical projection features of the temporal depth image sequence relative to the reference spatial model, the method further includes: Acquire K-frame depth images of the storage cylinder in an unloaded state and perform temporal averaging to generate a static reference surface. The static reference surface is used as the reference space model; Among them, D k (u,v) represents the depth value at pixel coordinates (u,v) in the depth image of the k-th frame under no-load conditions, where K>1.

8. The method according to claim 1, characterized in that, Before detecting the effective dwelling behavior of the pigs within the feeding area, the method further includes: Obtain information from the RFID tags installed on the pigs themselves to identify the pigs entering the feeding area; The temporal depth image sequence is time-aligned with the pig's identity information using timestamps to establish a correlation between feeding events and feeding behavior.

9. A pig feed intake monitoring system based on rheological characteristics and time-series compensation, characterized in that, The system includes an automated feeder for free-feeding scenarios with a storage cylinder and trough structure. The system includes: The acquisition terminal is installed above the storage cylinder of the feeder and is used to acquire time-series depth image sequences that reflect the feed accumulation state inside the storage cylinder during the feeding process. An identification device is installed at the entrance of the feeding area to collect RFID tags installed on the pigs to obtain the identification information of the pigs entering the feeding area; An electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, it implements the steps of the method as described in any one of claims 1-8; wherein the memory maintains at least global state variables, virtual feed pool states for each pig feeding session, and historical feeding rate data for calculating feeding capacity constraints.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-8.