Livestock health data intelligent management method and system

By constructing and processing an image dataset of livestock feeding environments, identifying occlusion segments and assessing the degree of occlusion coverage, and classifying continuity levels, the problem of interrupted feeding behavior recognition in occluded scenarios was solved, achieving continuity of feeding behavior and data integrity.

CN121767729APending Publication Date: 2026-03-31XIANYANG VOCATIONAL TECHN COLLEGE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511885430.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies struggle to continuously identify the head-trough contact structure of livestock in occluded scenarios, leading to interruptions in feeding behavior and a significant underestimation of feeding time.

Method used

By collecting individual behavior image sequences in a free-feeding environment, a basic dataset of behavior images is constructed and preprocessed to identify the visibility status of the head and slots, extract occlusion segments and evaluate the degree of occlusion coverage, combine the continuity features of behavior before and after the occlusion segment to classify the continuity level, perform behavior connection, numbering and status control, call the feeding behavior correction sequence generated after behavior connection as the basis for judgment, and determine the interference intensity level of the interpolation segment on the feeding behavior structure.

Benefits of technology

It enables continuous recognition and complete representation of feeding behavior in occluded scenarios, reduces recognition errors, improves data integrity and consistency, and reduces reliance on manual review.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121767729A_ABST
    Figure CN121767729A_ABST
Patent Text Reader

Abstract

The invention discloses a livestock health data intelligent management method and system, and relates to the technical field of image recognition and edge calculation. The livestock health data intelligent management method comprises the following steps: S1, acquiring an individual behavior image sequence in a free feeding environment, constructing a behavior image basic data set, and preprocessing the behavior image basic data set; s2, identifying visible states of a head and a slot position based on the behavior image basic data set, extracting a corresponding shielding section and evaluating a shielding coverage degree; s3, identifying continuity characteristics of behaviors before and after the shielding section, and dividing continuation levels based on head posture and position change; and S4, calling an ingestion behavior correction sequence generated after behavior connection as a judgment basis, and judging the interference intensity level of the interpolation section on the ingestion behavior structure. The problem that the feeding time is severely underestimated due to interruption of a feeding behavior section caused by the fact that a head-slot position contact structure in an image in a sheltered scene cannot be continuously recognized is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition and edge computing technology, specifically to a method and system for intelligent management of livestock health data. Background Technology

[0002] With the advancement of intelligent livestock farming, edge computing is increasingly being used in animal behavior monitoring. By deploying computing units in front-end devices, on-site analysis and response control of video data can be achieved, effectively reducing cloud pressure, improving overall processing efficiency and system stability, and making it suitable for complex monitoring scenarios with high data density and real-time requirements.

[0003] For example, invention patent CN117633698B discloses a method and device for monitoring livestock feed intake based on breeding information, applied in the field of animal husbandry technology. The method includes: acquiring breeding status information and breeding process information of the target livestock; predicting the standard feed intake of the target livestock based on the breeding status information and the breeding process information; acquiring the current actual feed intake of the target livestock; and assessing whether the feed intake of the target livestock is abnormal based on the difference between the actual feed intake and the standard feed intake. The influencing factors of the breeding status information include genetic factors, environmental factors, and management factors; the breeding process information includes breeding information of the target livestock after it enters the pen.

[0004] For example, the invention patent with announcement number CN112685523B discloses a method for identifying and managing civilized behavior based on image recognition technology, including the following steps: Step A: Collect and organize topographic maps, collect and record the quantity and information of various inspection objects in the virtual electronic map and store them in the database, collect various geographical information of the virtual electronic map, and mark the inspection objects in the virtual electronic map; Step B: Count the number of various uncivilized behaviors of each inspection object, and mark the types of uncivilized behaviors and their corresponding frequencies in the corresponding inspection objects on the virtual electronic map; This invention performs grid processing on the virtual electronic map, and each grid is assigned a grid member from the corresponding street office to supervise and patrol the grid. The grid member's work only requires observing whether red dots appear in the grid they manage every day and educating and handling the red dots, which reduces the management workload of the grid member and allows for the focus on investigating corresponding uncivilized behaviors, thus improving the efficiency of the investigation.

[0005] Existing technologies generally employ offline analysis based on entire video segments, using image recognition algorithms to count the number of head movements and the duration of dwell time in livestock as a basis for judging feeding behavior. However, such methods are prone to identification errors and omissions of feeding status when there is frequent occlusion interference, blurred action states, and discontinuous behavior segments. They also fail to reflect the dynamic changes in behavioral structure in real time, affecting the consistency of behavior numbers and the effective updating of data fields.

[0006] To address the above issues, there is an urgent need for an intelligent management method and system for livestock health data. Summary of the Invention

[0007] Technical problems to be solved

[0008] To address the shortcomings of existing technologies, this invention provides an intelligent management method and system for livestock health data, which solves the problem that the head-slot contact structure in images cannot be continuously identified under occlusion conditions, leading to interruptions in feeding behavior and a serious underestimation of feeding time.

[0009] Technical solution

[0010] To achieve the above objectives, the present invention provides the following technical solution: an intelligent management method for livestock health data, comprising the following steps: S1: collecting individual behavioral image sequences in a free-feeding environment, constructing a basic behavioral image dataset and preprocessing it; S2: identifying the visible state of the head and the feeding slot based on the basic behavioral image dataset, extracting the corresponding occlusion segments and evaluating the degree of occlusion coverage, and performing structural access, numbering connection, and state management based on the evaluation results; S3: identifying the continuity characteristics of behavior before and after the occlusion segment, classifying the continuity level based on changes in head posture and position, and performing behavioral connection, numbering assignment, and state control according to the continuity level; S4: calling the feeding behavior correction sequence generated after behavioral connection as the basis for judgment, determining the interference intensity level of the interpolation segment on the feeding behavior structure, and performing number freezing, state recovery, and review triggering according to the interference intensity level.

[0011] Further, the specific steps for collecting individual behavior image sequences in a free-for-feeding environment, constructing a basic behavioral image dataset, and performing preprocessing are as follows: The process of collecting individual behavior image sequences in a free-for-feeding environment and constructing a basic behavioral image dataset includes at least the following: Installing a camera at a top-down position above the feeding trough to collect video data covering the head and trough area; segmenting the image frames at a fixed frame rate; extracting continuous static images to generate a continuous image frame sequence; after occlusion interference occurs, determining the start and end frames of the segment to be interpolated, and extracting the acquisition timestamps as the start and end frame acquisition timestamps of the interpolation segment; when performing the interpolation action, selecting a reference segment with high continuity in history, and reading the acquisition times of the first and last frames of the reference segment to constitute the start and end frame acquisition timestamps of the reference segment, respectively; integrating edge image preprocessing into the image acquisition terminal. The unit performs real-time image sharpness filtering, occlusion ratio detection, and jump recognition pre-judgment operations: combining frame number and timestamp sequence, it uses extreme value range recognition method and inter-frame interval detection method to jointly determine duplicate frames, missing frames, and out-of-order frames, and performs number correction and temporal rearrangement; based on the image sharpness detection method of edge gradient entropy and regional occlusion ratio rules, it performs blur removal and occlusion screening on image frames; based on the image content variation intensity index and multi-frame differential localization method, it identifies jump frames, and combines the spatial structure parameters of temporally adjacent frames to use local interpolation method to fill short-time frame gaps; for structural interference caused by equipment jitter and illumination fluctuations, it applies multi-scale edge convolution discrimination method and background region connectivity analysis to remove non-target region frames; it unifies the inter-frame temporal distribution through exponential temporal distance smoothing algorithm to construct an image frame sequence with continuous numbering and equal time intervals; finally, it performs standardization and normalization processing on the behavioral image basic dataset.

[0012] Further, the specific steps for identifying the visibility state of the head and slot based on the behavioral image dataset are as follows: Identify the outline of the livestock's head and the position of the slot in the image frame, and establish the correspondence between the head posture and the slot orientation; determine whether there are three types of occlusion states in the image frame: head occlusion, slot obscured, and overlap between individuals, and process them accordingly; extract the start and end frames corresponding to continuous occlusion states, and generate the correspondence between occlusion segment numbers, occlusion frame masks, individual numbers, and slot numbers; in image frame segments where occlusion states exist continuously, limit the maximum time span for interpolation processing, and obtain the occlusion duration threshold by calculating the time difference between the acquisition timestamp of the start frame and the acquisition timestamp of the end frame of the interpolation segment after occlusion interference occurs; filter frame segments whose occlusion time span exceeds the occlusion duration threshold, and only retain the occlusion segment number sequence that meets the calling conditions.

[0013] Further, the specific steps for extracting the corresponding occluded segment and evaluating the degree of occlusion coverage are as follows: Capture an image containing markers of known length; extract the pixel width and height of the markers and calculate the total number of pixels; divide the actual area by the total number of pixels to obtain the unit pixel area; extract all pixels identified as occluded areas from the image frame to construct an occluded pixel set; count the total number of pixels in the occluded pixel set and multiply it by the unit pixel area to calculate the occluded area area; extract foreground pixels not affected by occlusion from the image frame to construct a foreground pixel set; count the number of pixels in the foreground pixel set and multiply it by the unit pixel area to calculate the visible area area; divide the occluded area area by the visible area area to obtain the area ratio; add one to the area ratio and take the natural logarithm; add one to the natural logarithm result as the denominator; use the constant 1 as the numerator; divide the numerator by the denominator to calculate the occlusion interference impact value.

[0014] Further, the specific steps for combining the evaluation results to perform structural access, numbering connection, and state management are as follows: Execute an occlusion segment processing strategy based on the evaluation results: Real-time comparison of the occlusion interference impact value with the occlusion duration threshold, where the occlusion duration threshold includes a first-level occlusion threshold and a second-level occlusion threshold; when the occlusion interference impact value is greater than or equal to the first-level occlusion threshold, establish a sequential connection between the current image frame and the previous valid image frame, assign the behavior state position field to the feeding duration, replace the original content of the corresponding fields in the current image frame with the values ​​of the head orientation field, slot position field, and action state field extracted from the current image frame recognition results, perform a timestamp value accumulation operation, and update the current image... The frame number is written into the numbering statistics structure. When the occlusion interference impact value is greater than the secondary occlusion threshold but less than the primary occlusion threshold, the head orientation value and slot distance value of the adjacent frames before and after the current image frame are extracted, transferred to the interpolation operation buffer, the feeding time accumulation is stopped, the current image frame number is removed from the numbering statistics structure, and the trusted status field is assigned the value of pending confirmation. When the occlusion interference impact value is less than or equal to the secondary occlusion threshold, the action status field, head orientation field, and slot position field are assigned the value of zero, the numbering connection relationship between the current image frame and the preceding and following image frames is removed, the timestamp accumulation and numbering structure processing operations are stopped, the occlusion status field is assigned the value of the termination signal, and the permission of the current image frame to participate in the numbering structure update is frozen.

[0015] Furthermore, the specific steps for identifying the continuity features of behavior before and after the occlusion segment, based on changes in head posture and position to classify the continuity level, are as follows: Using a head keypoint detection method, extract the coordinate positions of the nose tip and top of the head keypoints in the current frame image; calculate the midpoint coordinates of the line connecting these two points to generate the coordinates of the head center point in the current frame; calculate the direction vector of the line connecting the front and back keypoints of the head in the current frame to generate the head direction vector in the current frame; calculate the direction vector of the line connecting the front and back keypoints of the head in the previous frame to generate the head direction vector in the previous frame; and simultaneously retain the head center point coordinates in the previous frame as the head center point coordinates in the previous frame; by identifying the coordinate positions of the upper left and lower right corners of the slot, calculate the midpoint coordinates of the line connecting these two points to generate the slot center point coordinates; calculate the angle between the head direction vector in the current frame and the horizontal direction to obtain the orientation angle in the current frame; calculate the angle between the head direction vector in the previous frame and the horizontal direction to obtain the orientation angle in the previous frame. Angle; calculate the Euclidean distance between the coordinates of the head center point and the slot center point in the current frame to obtain the slot distance in the current frame; calculate the Euclidean distance between the coordinates of the head center point and the slot center point in the previous frame to obtain the slot distance in the previous frame; subtract the slot distance in the previous frame from the slot distance in the current frame and take the absolute value to obtain the slot spatial position difference; filter valid feeding behavior image sequences from historical samples and extract the maximum slot spatial position difference in consecutive frames to obtain the maximum allowable slot difference; calculate the difference between the orientation angle in the current frame and the orientation angle in the previous frame, and perform a cosine function operation on the difference to obtain the direction angle cosine term; take the absolute value of the difference between the slot distance in the current frame and the slot distance in the previous frame, and divide the absolute value by the maximum allowable slot difference to obtain the slot offset ratio; subtract the slot offset ratio from one to obtain the position similarity term; multiply the direction angle cosine term and the position similarity term to obtain the action continuation confidence value, and classify the continuation level based on the action continuation confidence value.

[0016] Further, the specific steps for executing behavior connection, numbering assignment, and status control according to the continuity level are as follows: Control the behavior segment connection strategy according to the continuity level: Real-time comparison of the action continuity confidence value and the action continuity threshold, where the action continuity threshold includes a first-level action continuity threshold and a second-level action continuity threshold; When the action continuity confidence value is greater than or equal to the first-level action continuity threshold, the interpolation operator is activated to extract the action posture and spatial position information of the preceding and following frames, the feeding state classifier is activated, the current frame is identified as a feeding behavior segment, the numbering connection operation is executed, and the feeding state write permission is restored, adding the current frame to the end of the valid behavior segment; When the action continuity confidence value is greater than the second-level action continuity threshold but less than the first-level action continuity threshold, the feeding state update is paused and the action state field is frozen, a continuous interpolation entry is prepared, and the numbering assignment of the current frame is temporarily excluded; When the action continuity confidence value is less than or equal to the second-level action continuity threshold, the interpolation operator is turned off and the numbering connection identifier is removed, the current frame is prohibited from participating in feeding identification and numbering assignment, and the current image frame is defined as an occlusion breakpoint.

[0017] Furthermore, the feeding behavior correction sequence generated after the call behavior connection is used as the basis for determining the interference intensity level of the interpolation segment on the feeding behavior structure. The specific steps are as follows: calculate the time difference between the acquisition timestamp of the start frame of the interpolation segment and the acquisition timestamp of the end frame of the interpolation segment to obtain the feeding duration of the interpolation segment; calculate the time interval between the acquisition timestamp of the start frame of the reference segment and the acquisition timestamp of the end frame of the reference segment to obtain the feeding duration of the reference segment; in the image frame number sequence corresponding to the interpolation segment, filter the image frames whose feeding status field has been written and included in the feeding behavior segment, and count the number of image frames to obtain the number of behavior frames of the interpolation segment; select unobstructed interference and status from the historical samples. A stable sequence of image frames whose feeding status field has been written is obtained. The number of image frames in the sequence is counted to obtain the reference segment behavior frame number. The difference between the feeding duration of the interpolation segment and the feeding duration of the reference segment is calculated. The difference is divided by the feeding duration of the reference segment and the quotient is squared to obtain the duration deviation square term. The difference between the number of behavior frames of the interpolation segment and the number of behavior frames of the reference segment is calculated. The difference is divided by the number of behavior frames of the reference segment and the quotient is squared to obtain the frame number deviation square term. The duration deviation square term and the frame number deviation square term are added together and the square root is calculated to obtain the correction amplitude offset value. The interference intensity level of the interpolation segment on the feeding behavior structure is determined based on the correction amplitude offset value.

[0018] Further, the specific steps for performing number freezing, status recovery, and review triggering based on interference intensity level are as follows: An effectiveness determination strategy is implemented according to the interference intensity level: the correction amplitude offset value and the correction offset threshold are compared in real time, the correction offset threshold including a first-level offset threshold and a second-level offset threshold; when the correction amplitude offset value is greater than or equal to the first-level offset threshold, the image frame number is set to an abnormal segment type, the number interval combination qualification is cancelled and the structural connection is blocked, a review flag is output and written to the review queue; when the correction amplitude offset value is greater than the second-level offset threshold and less than the first-level offset threshold, the number's ownership status is frozen and the feeding status is changed to pending confirmation, and the action continues the calculation of the confidence value; when the correction amplitude offset value is less than or equal to the second-level offset threshold, the number's participation in the behavior segment structure is retained, the number connection relationship with the previous segment is re-established, and the feeding status freeze restriction is lifted.

[0019] The second aspect of this invention provides an intelligent management system for livestock health data, comprising: an image acquisition and monitoring module, an occlusion state recognition module, a behavior interpolation and inference module, and a data correction and output module. The image acquisition and monitoring module is used to acquire individual behavioral image sequences in a free-feeding environment, construct a basic behavioral image dataset, and perform preprocessing. The occlusion state recognition module is used to identify the visibility state of the head and slots based on the basic behavioral image dataset, extract corresponding occlusion segments, evaluate the degree of occlusion coverage, and perform structure access, numbering connection, and state management based on the evaluation results. The behavior interpolation and inference module is used to identify the continuity characteristics of behavior before and after the occlusion segment, classify the continuity level based on head posture and position changes, and perform behavior connection, numbering assignment, and state control according to the continuity level. The data correction and output module is used to call the feeding behavior correction sequence generated after behavior connection as a judgment basis, determine the interference intensity level of the interpolation segment on the feeding behavior structure, and perform number freezing, state recovery, and review triggering according to the interference intensity level.

[0020] Beneficial effects

[0021] The present invention has the following beneficial effects:

[0022] (1) This invention introduces extreme value range recognition, inter-frame interval detection, and multi-scale edge convolution in the image acquisition stage to jointly screen out and correct the numbering of duplicate frames, missing frames, jump frames and non-target frames, so that the behavior image basic dataset has a stable structural foundation in the time and numbering dimensions, effectively avoids behavior recognition breakage caused by image anomalies, and is conducive to the continuous access and automatic repair of subsequent occlusion segment processing.

[0023] (2) The present invention sets an occlusion interference impact value and an occlusion duration threshold. By combining the two, the occlusion segment processing boundary is constructed, and the processing method of the current image frame in the numbering connection, status writing and time accumulation operation is dynamically adjusted according to the two-level threshold. This realizes the classification management of severe occlusion, moderate occlusion and recoverable segments, and enhances the software's robustness in recognizing complex feeding scenarios.

[0024] (3) By constructing the head direction cosine term and the slot position similarity term, the present invention generates the action continuity confidence value and classifies the continuity level accordingly. The system can accurately judge the continuity of behavior before and after the occlusion segment. When the action continuity confidence value meets the requirements, the interpolation entry is enabled and the corrected behavior sequence is generated to automatically fill in the missing behavior segment, improve the complete expression ability of feeding behavior data, and reduce the dependence on manual review.

[0025] (4) This invention extracts the feeding duration and behavior frame number of the interpolation segment and the reference segment, calculates the correction amplitude offset value, and determines the interference level of the current repair behavior segment on the overall feeding structure. In the case of high offset, it automatically executes number freezing and review triggering to ensure that the final output data results have high consistency and credibility, and provides structural stability support for the downstream application of behavior data.

[0026] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0027] Figure 1 This is a flowchart of an intelligent management method for livestock health data according to the present invention;

[0028] Figure 2 This is a structural diagram of an intelligent management system for livestock health data according to the present invention;

[0029] Figure 3 This is a distribution diagram of the correction magnitude offset value of the present invention;

[0030] Figure 4 This is a comparison diagram of the area of ​​the obscured region and the area of ​​the visible region in this invention. Detailed Implementation

[0031] 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.

[0032] Please see Figures 1-4This invention provides a technical solution: an intelligent management method for livestock health data, comprising the following steps: S1: collecting individual behavior image sequences in a free-feeding environment, constructing a basic dataset of behavior images and preprocessing it; S2: identifying the visible state of the head and the slot based on the basic dataset of behavior images, extracting the corresponding occlusion segments and evaluating the degree of occlusion coverage, and performing structure access, numbering connection and state management based on the evaluation results; S3: identifying the continuity characteristics of behavior before and after the occlusion segment, dividing the continuity level based on changes in head posture and position, and performing behavior connection, numbering assignment and state control according to the continuity level; S4: calling the feeding behavior correction sequence generated after behavior connection as the basis for judgment, determining the interference intensity level of the interpolation segment on the feeding behavior structure, and performing number freezing, state recovery and review triggering according to the interference intensity level.

[0033] Specifically, the process of collecting individual behavior image sequences in a free-for-feeding environment, constructing a basic behavioral image dataset, and preprocessing the data includes the following steps: The process of collecting individual behavior image sequences in a free-for-feeding environment and constructing a basic behavioral image dataset includes at least the following: Installing a camera above the feeding trough in a top-down position to collect video data covering the head and trough area; segmenting the images at a fixed frame rate to extract continuous static images and generate a continuous image frame sequence; after occlusion interference occurs, determining the start and end frames of the segment to be interpolated, and extracting the acquisition timestamps as the start and end timestamps of the interpolation segment; when performing the interpolation operation, selecting a reference segment with high continuity in the history, and reading the acquisition times of the first and last frames of the reference segment to constitute the start and end timestamps of the reference segment, respectively; integrating an edge image preprocessing unit into the image acquisition terminal to perform image sharpness filtering, occlusion ratio detection, and transition detection in real time. Pre-identification judgment operations: Combining frame number and timestamp sequence, the extreme value range identification method and inter-frame interval detection method are used to jointly determine duplicate frames, missing frames, and out-of-order frames, and number correction and temporal rearrangement are performed; based on the image sharpness detection method of edge gradient entropy and the region occlusion ratio rule, blur removal and occlusion screening are performed on image frames; based on the image content variation intensity index and multi-frame differential localization method, jump frames are identified, and combined with the spatial structure parameters of temporally adjacent frames, local interpolation is used to fill short-time frame gaps; for structural interference caused by equipment jitter and illumination fluctuations, multi-scale edge convolution discrimination method and background region connectivity analysis are applied to remove non-target region frames; the inter-frame temporal distribution is unified by the exponential temporal distance smoothing algorithm to construct an image frame sequence with continuous numbering and equal time intervals; after completing image frame structure correction and defect screening, the behavior image basic dataset is standardized and normalized to improve the input quality and processing stability of subsequent image sequences in behavior recognition tasks.

[0034] In this implementation scheme, an edge image preprocessing unit is deployed to perform image frame structure screening, completion, and normalization operations. This removes occluded, abrupt, and blurred interference frames, corrects misordered numbering and uneven temporal distribution, fills short-term frame gaps, and ensures the continuity and integrity of the image frame sequence. Ultimately, a standardized and normalized behavioral image dataset is generated, providing a high-quality image input foundation for feeding behavior recognition and subsequent structural analysis.

[0035] Specifically, the steps for identifying the visibility of the head and slots based on the behavioral image dataset are as follows: Identify the head contour and slot location of the livestock in the image frame, establishing a correspondence between head posture and slot orientation; extract the head contour using edge detection and shape fitting, and locate the slot location using regional texture features and spatial template matching, constructing a posture-orientation correspondence using spatial vector angle calculation; determine whether there are three types of occlusion states in the image frame: head occlusion, slot obscurity, and inter-individual overlap, and classify them accordingly; head occlusion is identified based on the proportion of missing contour area and image gradient consistency, slot obscurity is determined by regional brightness distribution and structural position prediction, and inter-individual overlap is determined by boundary contact rate and motion trajectory intersection; extract the starting frame corresponding to continuous occlusion states and... The end frame generates the occlusion segment number, occlusion frame mask, and the correspondence between individual number and slot number. The occlusion frame mask constructs pixel-level occlusion region identifiers based on image segmentation results, and the number correspondence is generated synchronously according to frame order and spatial position. In image frame segments where occlusion exists continuously, the maximum time span for interpolation processing is limited. The occlusion duration threshold is obtained by calculating the time difference between the acquisition timestamp of the start frame and the acquisition timestamp of the end frame of the interpolation segment after occlusion interference occurs. The occlusion duration threshold is calculated with reference to the statistical results of the longest continuous occlusion segment in historical behavior segments and is used to limit the coverage of the interpolation segment. Frame segments with occlusion time spans exceeding the occlusion duration threshold are filtered out, and only the occlusion segment number sequence that meets the calling conditions is retained to ensure that subsequent interpolation operations are only performed within the recoverable range of occlusion impact.

[0036] In this implementation scheme, the head contour and slot position in the image frame are extracted to clarify the correspondence between the head posture and the slot orientation; combined with the occlusion state determination and occlusion segment number generation, the start and end range and numbering of the interpolation segment are accurately defined; and non-interpolable frame segments are screened out according to the occlusion duration threshold to ensure that the occlusion segment call has continuity, time limit and number controllability, laying a stable structural foundation for behavior connection and state correction.

[0037] Specifically, the steps for extracting the corresponding occluded segment and evaluating the occlusion coverage are as follows: Capture an image containing markers of known length; extract the pixel width and height of the markers and calculate the total number of pixels; divide the actual area by the total number of pixels to obtain the area per unit pixel; select a standard reference object for the marker length and obtain the pixel dimension through sub-pixel level edge detection to ensure area conversion accuracy; extract all pixels identified as occluded areas from the image frame to construct an occluded pixel set; count the total number of pixels in the occluded pixel set and multiply it by the area per unit pixel to calculate the occluded area; the occluded area is extracted based on the marked area in the occluded frame mask, and the area value is obtained by accumulating pixels and multiplying by the area per unit pixel. In an image frame, foreground pixels that are not affected by occlusion are extracted to construct a foreground pixel set. The number of pixels in the foreground pixel set is counted and multiplied by the area of ​​a unit pixel to calculate the visible area. The foreground region is the effective region obtained after removing occluded parts based on boundary connectivity and the positional relationship of the subject. The occluded area is divided by the visible area to obtain the area ratio. One is added to the area ratio, and the natural logarithm is taken. One is added to the natural logarithm result as the denominator, and the constant 1 is taken as the numerator. The numerator is divided by the denominator to calculate the occlusion interference impact value. The occlusion interference impact value is used to characterize the relative interference degree of the occluded area on the visible area in the current frame. The higher the value, the stronger the occlusion.

[0038] The specific calculation method for the impact value of occlusion interference is as follows:

[0039]

[0040] In the formula, O represents the occlusion interference effect value, and A z A represents the area of ​​the obstructed region. v Indicates the area of ​​the visible region.

[0041] In this implementation scheme, the area per unit pixel is calculated and the actual areas of the occluded region and the foreground region are statistically analyzed to quantify the relative coverage ratio of the occluded region in the image. Combining the logarithmic ratio between the area of ​​the occluded region and the area of ​​the visible region, an occlusion interference impact value is generated to reflect the strength distribution of the occlusion degree in the image frame, providing a basis for subsequent numbering processing, behavior connection and interpolation judgment.

[0042] Specifically, the steps for structure access, numbering connection, and status management based on the evaluation results are as follows: Implement an occlusion segment processing strategy based on the evaluation results: Real-time comparison of the occlusion interference impact value with the occlusion duration threshold, which includes a first-level occlusion threshold and a second-level occlusion threshold; When the occlusion interference impact value is greater than or equal to the first-level occlusion threshold, establish a sequential connection between the current image frame and the previous valid image frame, assign the behavior status position field to the feeding duration, replace the original content of the corresponding fields in the current image frame with the values ​​of the head orientation field, slot position field, and action status field extracted from the current image frame recognition results, perform a timestamp value accumulation operation, and write the current image frame number into the numbering statistics structure; The numbering connection operation is completed through mapping the previous and next frame index fields, the behavior status field update ensures the integrity of the feeding behavior sequence, and the field value replacement is performed synchronously during the numbering structure registration process; When the occlusion interference impact value is greater than the second-level occlusion threshold... When the value is less than the first-level occlusion threshold, the head orientation value and slot distance value of the adjacent frames before and after the current image frame are extracted and transferred to the interpolation operation buffer. The accumulation of the feeding time is stopped, the current image frame number is removed from the numbering statistics structure, and the trusted state field is assigned the value of pending confirmation. The buffer field is used to save the state reference value required for the subsequent interpolation stage. The number removal operation avoids the occlusion segment from mistakenly participating in the behavior segment recognition. When the occlusion interference impact value is less than or equal to the second-level occlusion threshold, the action state field, head orientation field and slot position field are assigned the value of zero. The number connection relationship between the current image frame and the preceding and following image frames is removed. The timestamp accumulation and numbering structure processing operations are stopped. The occlusion state field is assigned the value of the termination signal, and the permission of the current image frame to participate in the numbering structure update is frozen. The field clearing and connection removal are used to remove the impact of invalid frames on the structure data. The termination signal indicates the end status of the occlusion segment processing. The frozen permission is used to block the frame from participating in the numbering summary and behavior segment generation.

[0043] In this implementation scheme, the occlusion interference impact value is compared with the occlusion duration threshold to realize the structural access, numbering connection and status management of image frames under different occlusion levels; under strong occlusion conditions, the numbering continuity and field updates are maintained; under moderate occlusion conditions, key fields are temporarily stored and numbering statistics are paused; under slight occlusion conditions, field values ​​are cleared and connection relationships are broken, ensuring that the processing of occluded segment image frames in the numbering structure is discriminative, restrictive and controllable.

[0044] Specifically, the steps for identifying the continuity features of behavior before and after the occlusion segment and classifying the continuity level based on changes in head pose and position are as follows: Using a head keypoint detection method, extract the coordinates of the nose tip and top of the head keypoints in the current frame image. Calculate the midpoint coordinates of the line connecting these two points to generate the head center point coordinates for the current frame. Based on the coordinates of the front and back keypoints of the head in the current frame, calculate the direction vector of the line connecting these two points to generate the head direction vector for the current frame. Similarly, based on the coordinates of the front and back keypoints of the head in the previous frame, calculate the direction vector of the line connecting these two points to generate the head direction vector for the previous frame. To ensure time alignment, the head center point coordinates in the previous frame are synchronously retained as the head center point coordinates for the previous frame. By identifying the coordinates of the upper left and lower right corners of the slot, calculate the midpoint coordinates of the line connecting these two points to generate the slot center point coordinates. Calculate the angle between the current frame head direction vector and the horizontal direction to obtain the current frame orientation angle. Calculate the angle between the previous frame head direction vector and the horizontal direction to obtain the previous frame orientation angle. Calculate the angle between the current frame head center point coordinates and the slot center point coordinates. The Euclidean distance is used to obtain the slot distance in the current frame; the Euclidean distance between the head center point coordinates and the slot center point coordinates in the previous frame is calculated to obtain the slot distance in the previous frame; the slot distance in the current frame is subtracted from the slot distance in the previous frame, and the absolute value is taken to calculate the slot spatial position difference; valid feeding behavior image sequences are selected from historical samples, and the maximum slot spatial position difference in consecutive frames is extracted to obtain the maximum allowable slot difference; the difference between the orientation angle in the current frame and the orientation angle in the previous frame is calculated, and a cosine function operation is performed on the difference. Obtain the direction angle cosine term; the direction angle cosine term is used to measure the consistency of the head orientation direction between consecutive frames; take the absolute value of the difference between the slot distance of the current frame and the slot distance of the previous frame, and then divide the absolute value by the maximum allowable slot difference to obtain the slot offset ratio; the slot offset ratio reflects the proportion of the spatial displacement of the head relative to the slot between two frames; subtract the slot offset ratio from one to obtain the position similarity term; multiply the direction angle cosine term and the position similarity term to obtain the action continuation confidence value, and classify the continuation level based on the action continuation confidence value.

[0045] The specific calculation method for the action continuation confidence value is as follows:

[0046]

[0047] In the formula, E represents the action continuation confidence value, and θ n θ represents the orientation angle of the current frame. p Indicates the orientation angle of the previous frame, d n Indicates the current frame slot distance, d p d represents the slot distance of the previous frame. max This indicates the maximum allowable difference in slot positions.

[0048] In this implementation plan, key points of the head, slot positions and orientation angle information are extracted to establish the spatial and directional correspondence between image frames before and after the occlusion segment; the action continuity confidence value is calculated by combining the change of orientation angle and the difference in slot distance to quantify the continuity characteristics of behavior; the continuity confidence value is divided into continuity levels to provide level criteria and structural basis for subsequent behavior connection, numbering and status control.

[0049] Specifically, the steps for performing behavior connection, numbering, and status control according to the continuity level are as follows: The behavior segment connection strategy is controlled hierarchically according to the continuity level: Real-time comparison of the action continuity confidence value and the action continuity threshold, including a first-level action continuity threshold and a second-level action continuity threshold; when the action continuity confidence value is greater than or equal to the first-level action continuity threshold, it belongs to a stable continuity level. The interpolation operator is activated to extract the action posture and spatial position information of the preceding and following frames. The feeding state classifier is connected, and the current frame is identified as a feeding behavior segment. The numbering connection operation is performed, and the writing permission for the feeding state is restored. The current frame is added to the end of the valid behavior segment. The interpolation operator generates continuous action segments through feature alignment and position fitting. The feeding state classifier determines the behavior attribute based on the action posture and the relative position of the slot. The numbering connection operation synchronously updates the preceding and following frames in the frame index structure. Related fields; When the action continuation confidence value is greater than the second-level action continuation threshold but less than the first-level action continuation threshold, it belongs to the critical continuation level. Feeding status updates are paused, and the action status field is frozen. A coherent interpolation entry is prepared, and the current frame's number assignment is temporarily excluded. The coherent interpolation entry is used in subsequent state deduction stages to call the continuous structure template matching method to complete behavior completion. Freezing the action status field prevents state drift from affecting subsequent recognition accuracy. When the action continuation confidence value is less than or equal to the second-level action continuation threshold, it belongs to the interrupted continuation level. The interpolation operator is turned off, and the number connection identifier is removed. The current frame is prohibited from participating in feeding recognition and number assignment, and the current image frame is defined as an occlusion breakpoint. The removal of the number connection identifier is performed through an index reset operation. The occlusion breakpoint setting is used to terminate the current frame's permission to extend behavior segments backward, while also restricting its entry into the valid behavior segment structure.

[0050] In this implementation scheme, the action continuation confidence value and the action continuation threshold are compared to control the behavior connection method in a hierarchical manner, so as to realize the numbering and status management of image frames under different continuation levels. Under the stable continuation level, the feeding status classifier is connected and the numbering connection is completed. Under the critical continuation level, the connection entry is temporarily stored and the status field is frozen. Under the interrupted continuation level, the numbering is terminated and the occlusion breakpoint is defined to ensure that the behavior segment connection has selectivity, hierarchy and structural coherence.

[0051] Specifically, the feeding behavior correction sequence generated after calling the behavior connection is used as the basis for judgment. The specific steps for determining the interference intensity level of the interpolation segment on the feeding behavior structure are as follows: Calculate the time difference between the acquisition timestamp of the starting frame and the acquisition timestamp of the ending frame of the interpolation segment to obtain the feeding duration of the interpolation segment; the feeding duration of the interpolation segment is used to measure the time span during the occlusion interference period and is a key indicator affecting the assessment of the correction magnitude; Calculate the time interval between the acquisition timestamp of the starting frame and the acquisition timestamp of the ending frame of the reference segment to obtain the feeding duration of the reference segment; the feeding duration of the reference segment serves as the duration benchmark for the normal behavior rhythm and is derived from the historical feeding sequence with the highest continuity level; In the image frame number sequence corresponding to the interpolation segment, filter the image frames whose feeding state field has been written and included in the feeding behavior segment, and count the number of image frames to obtain the number of behavior frames in the interpolation segment; the number of behavior frames in the interpolation segment represents the structural density of the effective completed frames, reflecting the completeness of the feeding state recovery; Select images from the historical samples that are free from occlusion interference, have stable states, and whose feeding state field has been... The image frame number sequence is written, and the number of image frames in the sequence is counted to obtain the reference segment behavior frame number. The reference segment behavior frame number serves as the baseline structure density under interference-free conditions and is used to compare the completion quality. The difference between the feeding duration of the interpolated segment and the feeding duration of the reference segment is calculated, and the difference is divided by the feeding duration of the reference segment and the quotient is squared to obtain the duration deviation square term. The duration deviation square term is used to characterize the degree of offset between the interpolated segment and the reference segment in terms of temporal structure. The difference between the behavior frame number of the interpolated segment and the behavior frame number of the reference segment is calculated, and the difference is divided by the behavior frame number of the reference segment and the quotient is squared to obtain the frame number deviation square term. The frame number deviation square term reflects the structural difference of the interpolated segment in terms of behavior segment density. The duration deviation square term and the frame number deviation square term are added together, and the square root is calculated to obtain the correction amplitude offset value. The interference intensity level of the interpolated segment on the feeding behavior structure is determined based on the correction amplitude offset value. The interference intensity level is divided into three levels: mild, moderate, and severe, which serve as the basis for subsequent interpolated segment retention and removal strategies.

[0052] The specific calculation method for the correction amplitude offset value is as follows:

[0053]

[0054] In the formula, S represents the correction amplitude offset value, and T a T represents the feeding duration of the interpolation segment. r N represents the feeding duration of the reference segment. a N represents the number of frames in the interpolation segment. r Indicates the frame number of the reference segment.

[0055] Table 1 shows the correction amplitude offset value data table provided in the embodiments of this application. The interpolation segment feeding duration of segment group 1 is set to 10.20, the reference segment feeding duration is set to 10.00, the interpolation segment behavior frame count is set to 102, and the reference segment behavior frame count is set to 100; the interpolation segment feeding duration of segment group 2 is set to 11.50, the reference segment feeding duration is set to 10.00, the interpolation segment behavior frame count is set to 115, and the reference segment behavior frame count is set to 100; the interpolation segment feeding duration of segment group 3 is set to 12.00, and the reference segment feeding duration is set to 1... 0.00, the interpolation segment behavior frame count is set to 120, and the reference segment behavior frame count is set to 100; the interpolation segment feeding duration for segment group 4 is set to 13.00, the reference segment feeding duration is set to 10.00, the interpolation segment behavior frame count is set to 130, and the reference segment behavior frame count is set to 100; the interpolation segment feeding duration for segment group 5 is set to 14.50, the reference segment feeding duration is set to 10.00, the interpolation segment behavior frame count is set to 145, and the reference segment behavior frame count is set to 100.

[0056] Table 1 Correction Amplitude Offset Value Data Table

[0057]

[0058]

[0059] like Figure 3 The figure shows the distribution of correction amplitude offset values ​​provided in the embodiments of this application. According to the data in the image and table, the first-level offset threshold is 0.40, the second-level offset threshold is 0.20, and the correction amplitude offset values ​​of the five segment groups are distributed between 0.03 and 0.64, showing an overall trend of gradually increasing with the interpolation segment duration and the number of behavioral frames. Specifically, the correction amplitude offset value of segment group 5 is 0.64, significantly exceeding the first-level offset threshold, indicating that this interpolation segment has a significant interference with the feeding structure, and it is recommended to proceed to the manual review process; the offset value of segment group 4 is 0.42, slightly higher than the first-level threshold, and should also be considered an important correction segment; the offset values ​​of segment groups 2 and 3 are 0.21 and 0.28 respectively, between the first and second-level thresholds, belonging to a medium interference level; the offset value of segment group 1 is 0.03, far below the second-level threshold, and can be directly included in the correction structure. This figure can be used to intuitively determine the accessibility and correction impact level of each interpolation segment in the behavioral structure, providing a reliable basis for the automatic decision-making module to perform number freezing, status recovery, and review trigger control operations.

[0060] In this implementation scheme, the relative deviations between the interpolated segment and the reference segment in terms of feeding duration and number of behavioral frames are compared to generate a correction amplitude offset value, which reflects the degree of completion deviation of the interpolated segment in terms of temporal structure and behavioral density. Based on the correction amplitude offset value, the interference intensity level is divided to realize the quantitative judgment of the interference level of the interpolated segment structure, and to provide a basis for the interference level for the reliable control of the feeding behavior correction sequence and subsequent segment processing.

[0061] Specifically, an effectiveness judgment strategy is implemented based on the interference intensity level: the correction amplitude offset value is compared with the correction offset threshold in real time, and the correction offset threshold includes a first-level offset threshold and a second-level offset threshold; when the correction amplitude offset value is greater than or equal to the first-level offset threshold, it belongs to the severe interference level, the image frame number is set to the abnormal segment type, the number interval combination qualification is cancelled and the structural connection is blocked, and a review flag bit is output and written to the review queue; the abnormal segment type is set through the labeled segment attribute field, the cancellation of the number interval combination qualification excludes the frame from the subsequent behavior segment generation process, the structural connection blocking is executed through the index release instruction, and the review flag bit is included in the review retrieval mechanism as a manual retrieval entry point; when the correction amplitude offset value is greater than the second-level offset threshold and less than the first-level offset threshold, the error is considered severe. When the threshold is shifted, it is considered a moderate interference level. The number's attribution status is frozen and the feeding status is changed to "pending confirmation." The calculation of the action continuation confidence value is delayed. Freezing the number's attribution status is used to temporarily shield the structure classification behavior. Marking the feeding status as "pending confirmation" can guide the reconstruction of subsequent interpolation entry points. The delayed processing of the action continuation confidence value calculation avoids unstable data interfering with the judgment of behavior continuity. When the correction magnitude offset value is less than or equal to the secondary offset threshold, it is considered a mild interference level. The number participates in the behavior segment structure, the number connection relationship with the previous segment is restored, and the feeding status freeze restriction is lifted. The restoration of the number connection relationship ensures the continuity of the structure. The lifting of the feeding status freeze restores the write permission of the status field, allowing the image frame to re-participate in the number aggregation and status recognition process of the feeding behavior segment.

[0062] In this implementation scheme, the correction magnitude offset value is compared with the correction offset threshold, and the validity processing of image frame numbering and feeding status is performed in stages. Under high interference level, the number connection is removed and marked for verification. Under medium interference level, the number assignment is frozen and the calculation of the continued confidence value is delayed. Under low interference level, the number connection and status writing are restored to ensure that the behavior segment structure construction has the ability to identify, control boundaries and verification entry.

[0063] like Figure 2The diagram shown is a structural schematic of an intelligent management system for livestock health data provided in an embodiment of this application. This intelligent management system for livestock health data applies an intelligent management method for livestock health data, including: an image acquisition and monitoring module, an occlusion state recognition module, a behavior interpolation and inference module, and a data correction and output module. The image acquisition and monitoring module is used to acquire individual behavioral image sequences in a free-feeding environment, construct a basic behavioral image dataset, and perform preprocessing. Preprocessing includes number correction, temporal rearrangement, image clarity filtering, and occlusion interference removal to ensure the continuity and decidability of the image sequences. The occlusion state recognition module is used to identify the visibility state of the head and slots based on the basic behavioral image dataset, extract the corresponding occlusion segments, evaluate the occlusion coverage degree, and perform structural access based on the evaluation results. The numbering and status management system dynamically controls access methods and status writing permissions based on the occlusion interference impact value and occlusion duration threshold. The behavior interpolation inference module identifies the continuity characteristics of behaviors before and after the occlusion segment, classifies continuity levels based on head posture and position changes, and performs behavior connection, numbering assignment, and status control according to the continuity level. The continuity level is determined based on the action continuity confidence value and serves as the basis for interpolation connection and numbering decisions. The data correction output module calls the feeding behavior correction sequence generated after behavior connection as the basis for judgment, determines the interference intensity level of the interpolation segment on the feeding behavior structure, and performs number freezing, status recovery, and review triggering according to the interference intensity level. The interference level is determined based on the correction amplitude offset value and multi-level offset thresholds, and correspondingly performs structure removal, number masking, and status restoration operations.

[0064] In this implementation scheme, through information flow and status judgment between modules, image sequence construction, occlusion status recognition, behavior continuity reasoning, and correction result output are realized sequentially. The image acquisition and monitoring module ensures the continuity and availability of input data, the occlusion status recognition module completes the structural access and numbering connection, the behavior interpolation reasoning module supports behavior connection and status control, and the data correction output module implements interference level judgment and processing decision, thus constructing a closed-loop control structure covering the entire process of occlusion recognition and behavior repair.

[0065] like Figure 4The figure shows a comparison of the occlusion area and the visible area provided in an embodiment of this application. The horizontal axis represents the image frame number, and the vertical axis represents the area value. A stacked bar chart is used to display the distribution of the occlusion area and the visible area in each image frame. In frames 1 to 5, the total area is 100 units, with occlusion areas of 12.5, 20.3, 7.8, 15.6, and 9.4 units respectively, and corresponding visible area areas of 87.5, 79.7, 92.2, 84.4, and 90.6 units respectively. The data in the figure shows that frame 2 has the highest degree of occlusion, accounting for more than one-fifth of the total area, while frame 3 has the smallest occlusion area and the highest visible area. This figure can be used to quantitatively analyze the spatial coverage of occlusion interference in each image frame, providing an intuitive basis and judgment support for occlusion segment selection and occlusion interference impact value calculation.

[0066] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0067] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for intelligent management of livestock health data, characterized in that, Includes the following steps: S1: Collect individual behavior image sequences in a free-feeding environment, construct a basic dataset of behavioral images, and perform preprocessing; S2: Based on the behavioral image dataset, identify the visibility status of the head and slot, extract the corresponding occlusion segment and evaluate the occlusion coverage, and combine the evaluation results to perform structure access, numbering connection and status management; S3: Identify the continuity features of behaviors before and after the occlusion segment, classify the continuity level based on head posture and position changes, and perform behavior connection, numbering and assignment and state control according to the continuity level; S4: Use the feeding behavior correction sequence generated after calling the behavior connection as the basis for judgment, determine the interference intensity level of the interpolation segment on the feeding behavior structure, and execute number freezing, state recovery and review triggering according to the interference intensity level.

2. The intelligent management method for livestock health data according to claim 1, characterized in that: The specific steps for collecting individual behavioral image sequences in a free-feeding environment, constructing a basic behavioral image dataset, and performing preprocessing are as follows: The process of collecting individual behavior image sequences in a free-for-feeding environment and constructing a basic dataset of behavioral images includes at least the following: A camera is installed above the feeding trough in a top-down position to collect video data covering the head and trough area; image frames are segmented at a fixed frame rate to extract continuous static images and generate a continuous image frame sequence; after occlusion interference occurs, the start and end frames of the segment to be interpolated are determined, and the acquisition timestamps are extracted as the start and end frame acquisition timestamps of the interpolation segment; when performing the interpolation operation, a reference segment with high continuity in the history is selected, and the acquisition times of the first and last frames of the reference segment are read to constitute the start and end frame acquisition timestamps of the reference segment, respectively. An edge image preprocessing unit is integrated into the image acquisition terminal to perform image sharpness screening, occlusion ratio detection and jump recognition pre-judgment operations in real time: combining frame number and timestamp sequence, the extreme value range recognition method and the inter-frame interval detection method are used to jointly determine duplicate frames, missing frames and out-of-order frames, and perform number correction and time sequence rearrangement. An image sharpness detection method based on edge gradient entropy and a region occlusion ratio rule is used to perform blur removal and occlusion screening on image frames. Abrupt frames are identified based on the image content variation intensity index and multi-frame differential localization method. In combination with the spatial structure parameters of temporally adjacent frames, a local interpolation method is used to fill short-time frame gaps. For structural interference caused by equipment jitter and lighting fluctuations, a multi-scale edge convolution discrimination method and background region connectivity analysis are applied to remove non-target region frames. The inter-frame temporal distribution is unified by the exponential temporal smoothing algorithm, and a sequence of image frames with consecutive numbers and equal time intervals is constructed. Finally, the behavior image base dataset is standardized and normalized.

3. The intelligent management method for livestock health data according to claim 1, characterized in that: The specific steps for identifying the visible state of the head and slot based on the behavioral image dataset are as follows: Identify the head outline and slot location of livestock in image frames, and establish the correspondence between head posture and slot orientation; determine whether there are three types of occlusion states in the image frame: head occlusion, slot not visible, and overlap between individuals, and process them respectively. Extract the start and end frames corresponding to continuous occlusion states, and generate the correspondence between occlusion segment number, occlusion frame mask, individual number and slot number; in image frame segments where occlusion states exist continuously, limit the maximum time span for interpolation processing, and obtain the occlusion duration threshold by calculating the time difference between the acquisition timestamp of the start frame and the acquisition timestamp of the end frame of the interpolation segment after the occlusion interference occurs; filter frame segments whose occlusion time span exceeds the occlusion duration threshold, and only retain the occlusion segment number sequence that meets the calling conditions.

4. The intelligent management method for livestock health data according to claim 1, characterized in that: The specific steps for extracting the corresponding occluded segment and evaluating the degree of occlusion coverage are as follows: Take an image containing a marker of known length, extract the pixel width and height of the marker and calculate the total number of pixels, then divide the actual area by the total number of pixels to obtain the area per unit pixel. Extract all pixels identified as occluded areas from the image frame to construct an occluded pixel set, count the total number of pixels in the occluded pixel set, and multiply it by the area of ​​a unit pixel to calculate the area of ​​the occluded area; extract the foreground pixels that are not affected by occlusion from the image frame to construct a foreground pixel set, count the number of pixels in the foreground pixel set, and multiply it by the area of ​​a unit pixel to calculate the area of ​​the visible area. Divide the area of ​​the obstructed region by the area of ​​the visible region to obtain the area ratio. Add one to the area ratio and take the natural logarithm. Add one to the natural logarithm result to get the denominator. Use the constant 1 as the numerator. Divide the numerator by the denominator to calculate the obstruction interference value.

5. The intelligent management method for livestock health data according to claim 1, characterized in that: The specific steps for performing structural access, numbering connection, and status management based on the evaluation results are as follows: Based on the evaluation results, implement the occlusion segment processing strategy: compare the occlusion interference impact value with the occlusion duration threshold in real time, wherein the occlusion duration threshold includes a first-level occlusion threshold and a second-level occlusion threshold; When the occlusion interference value is greater than or equal to the first-level occlusion threshold, a sequential connection is established between the current image frame and the previous valid image frame. The behavior status position field is assigned the value of feeding continuity. The values ​​of the head orientation field, slot position field and action status field extracted from the recognition result of the current image frame are used to replace the original content of the corresponding fields in the current image frame. The timestamp value is incremented and the current image frame number is written into the number statistics structure. When the occlusion interference value is greater than the secondary occlusion threshold and less than the primary occlusion threshold, extract the head orientation value and slot distance value of the adjacent frames before and after the current image frame, transfer them to the interpolation operation buffer, stop the accumulation of the feeding time, remove the current image frame number from the number statistics structure, and assign the trusted status field the value of pending confirmation. When the occlusion interference value is less than or equal to the secondary occlusion threshold, the action status field, head orientation field, and slot position field are assigned to zero, the numbering connection between the current image frame and the preceding and following image frames is removed, the timestamp accumulation and numbering structure processing operations are stopped, the occlusion status field is assigned to a termination signal, and the permission of the current image frame to participate in the numbering structure update is frozen.

6. The intelligent management method for livestock health data according to claim 1, characterized in that: The specific steps for identifying the continuity features of behavior before and after the occlusion segment, and classifying the continuity level based on changes in head posture and position, are as follows: The algorithm extracts the coordinates of key points at the tip of the nose and the top of the head in the current frame image using a head key point detection method. It calculates the midpoint coordinates of the line connecting these two points to generate the head center point coordinates for the current frame. Based on the coordinates of the key points at the front and back of the head in the current frame, it calculates the direction vector of the line connecting these two points to generate the head direction vector for the current frame. Similarly, it calculates the direction vector of the line connecting these two points based on the coordinates of the key points at the front and back of the head in the previous frame to generate the head direction vector for the previous frame. Simultaneously, it retains the head center point coordinates from the previous frame. By identifying the coordinates of the upper left and lower right corners of the slot, it calculates the midpoint coordinates of the line connecting these two points to generate the slot center point coordinates. Finally, it calculates the angle between the current frame's head direction vector and the horizontal direction to obtain the current frame's orientation angle. Calculate the angle between the head direction vector of the previous frame and the horizontal direction to obtain the orientation angle of the previous frame; The Euclidean distance between the head center point coordinates and the slot center point coordinates in the current frame is calculated to obtain the slot distance in the current frame; the Euclidean distance between the head center point coordinates and the slot center point coordinates in the previous frame is calculated to obtain the slot distance in the previous frame; the slot distance in the current frame is subtracted from the slot distance in the previous frame and the absolute value is taken to obtain the slot spatial position difference; valid feeding behavior image sequences are selected from historical samples, and the maximum slot spatial position difference in consecutive frames is extracted to obtain the maximum allowable slot difference; Calculate the difference between the orientation angle of the current frame and the orientation angle of the previous frame, and perform a cosine function operation on the difference to obtain the orientation angle cosine term; take the absolute value of the difference between the slot distance of the current frame and the slot distance of the previous frame, and then divide the absolute value by the maximum allowable slot difference to obtain the slot offset ratio; subtract the slot offset ratio from one to obtain the position similarity term; multiply the orientation angle cosine term and the position similarity term to obtain the action continuation confidence value, and classify the continuation level based on the action continuation confidence value.

7. The intelligent management method for livestock health data according to claim 1, characterized in that: The specific steps for performing behavior connection, number attribution, and status control according to the continuation level are as follows: The behavior segment connection strategy is controlled by a level-based continuation level: Real-time comparison of the action continuation confidence value and the action continuation threshold, including a first-level action continuation threshold and a second-level action continuation threshold; when the action continuation confidence value is greater than or equal to the first-level action continuation threshold, the interpolation operator is activated to extract the action posture and spatial position information of the preceding and following frames, the feeding state classifier is activated, the current frame is identified as a feeding behavior segment, a numbering connection operation is performed, and the feeding state write permission is restored, adding the current frame to the end of the valid behavior segment; when the action continuation confidence value is greater than the second-level action continuation threshold but less than the first-level action continuation threshold, feeding state updates are paused and the action state field is frozen, a coherent interpolation entry is prepared, and the current frame's numbering assignment is temporarily excluded; when the action continuation confidence value is less than or equal to the second-level action continuation threshold, the interpolation operator is turned off and the numbering connection identifier is removed, the current frame is prohibited from participating in feeding identification and numbering assignment, and the current image frame is defined as an occlusion breakpoint.

8. The intelligent management method for livestock health data according to claim 1, characterized in that: The feeding behavior correction sequence generated after the call behavior connection is used as the basis for judgment. The specific steps for determining the interference intensity level of the interpolation segment on the feeding behavior structure are as follows: The feeding duration of the interpolation segment is obtained by calculating the time difference between the acquisition timestamp of the start frame and the end frame of the interpolation segment. The feeding duration of the reference segment is obtained by calculating the time interval between the acquisition timestamp of the start frame and the end frame of the reference segment. In the image frame number sequence corresponding to the interpolation segment, image frames whose feeding status field has been written and included in the feeding behavior segment are selected, and the number of image frames is counted to obtain the number of behavior frames in the interpolation segment. In the historical samples, image frame number sequences with no occlusion interference, stable status and whose feeding status field has been written are selected, and the number of image frames in the number sequence is counted to obtain the number of behavior frames in the reference segment. Calculate the difference between the feeding duration of the interpolated segment and the feeding duration of the reference segment, divide the difference by the feeding duration of the reference segment, and square the quotient to obtain the duration deviation squared term; calculate the difference between the number of frames in the interpolated segment and the number of frames in the reference segment, divide the difference by the number of frames in the reference segment, and square the quotient to obtain the frame number deviation squared term; add the duration deviation squared term and the frame number deviation squared term, calculate the square root, and obtain the correction amplitude offset value; determine the interference intensity level of the interpolated segment on the feeding behavior structure based on the correction amplitude offset value.

9. The intelligent management method for livestock health data according to claim 1, characterized in that: The specific steps for performing number freezing, status recovery, and review triggering based on the interference intensity level are as follows: The effectiveness determination strategy is implemented according to the interference intensity level: the correction amplitude offset value and the correction offset threshold are compared in real time, and the correction offset threshold includes a first-level offset threshold and a second-level offset threshold; when the correction amplitude offset value is greater than or equal to the first-level offset threshold, the image frame number is set to an abnormal segment type, the number interval combination qualification is cancelled and the structural connection is blocked, the verification flag bit is output and written to the verification queue; when the correction amplitude offset value is greater than the second-level offset threshold and less than the first-level offset threshold, the number attribution status is frozen and the feeding status is changed to pending confirmation, and the action continues the calculation of the confidence value; when the correction amplitude offset value is less than or equal to the second-level offset threshold, the number participates in the behavior segment structure, the number connection relationship with the previous segment is connected, and the feeding status freeze restriction is lifted.

10. A livestock health data intelligent management system, employing the livestock health data intelligent management method according to any one of claims 1-9, comprising: The image acquisition and monitoring module, the occlusion state recognition module, the behavior interpolation and inference module, and the data correction and output module are characterized by: The image acquisition and monitoring module is used to acquire individual behavior image sequences in a free-feeding environment, construct a basic dataset of behavioral images, and perform preprocessing. The occlusion status recognition module is used to identify the visibility status of the head and slot based on the behavioral image basic dataset, extract the corresponding occlusion segment and evaluate the occlusion coverage, and perform structural access, numbering connection and status management based on the evaluation results. The behavior interpolation reasoning module is used to identify the continuity features of behaviors before and after the occlusion segment, classify the continuity level based on head posture and position changes, and perform behavior connection, numbering and attribution and state control according to the continuity level. The data correction output module is used to call the feeding behavior correction sequence generated after the behavior connection as the basis for judgment, determine the interference intensity level of the interpolation segment on the feeding behavior structure, and perform number freezing, state recovery and review triggering according to the interference intensity level.

Citation Information

Patent Citations

  • A civilized behavior recognition and management method and system based on image recognition technology

    CN112685523B

  • Livestock feed intake monitoring method and device based on breeding information

    CN117633698B