Livestock and poultry health dynamic evaluation system based on visual individual tracking and knowledge graph fusion
By establishing a single-row exposure zone and anchor point event correction technology in a group breeding farm using edge computing devices, the accuracy problem of individual identity confirmation and status management in the group breeding farm is solved, and efficient individual status tracking and management is achieved.
Patent Information
- Application Number
- CN202611263483.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-11-03
AI Technical Summary
In group farming, existing video analysis technology struggles to accurately track individual identities, leading to chaotic trajectory numbering after obstruction. Gait, body condition, and surface observations are difficult to accurately attribute to the same individual, increasing management costs and reducing management efficiency.
Edge computing devices are used for perspective calibration to establish a single-column exposure zone. The temporary trajectory number after occlusion is corrected through anchor point events. The trajectory, observation records and status results are written into the knowledge graph to reduce the intrusion of erroneous data and achieve continuity in identity verification and status management.
Without adding extra facilities, it improves the continuity and verification efficiency of individual status management in group-housed settings, reduces misjudgments of gait deviation, body condition deviation, and abnormal body surface measurements, and ensures the accuracy of data and the traceability of management prompts.
Smart Images

Figure CN123033746A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of livestock and poultry vision technology, and more specifically, to a dynamic health assessment system for livestock and poultry based on visual individual tracking and knowledge graph fusion. Background Technology
[0002] Group farming farms typically have fixed camera equipment installed to monitor feeding, drinking, resting, and movement. Existing video analysis workflows generally first detect the target, then maintain the trajectory based on adjacent frame positions, bounding box overlap, appearance similarity, and movement direction. This workflow is sufficient for routine inspections when the number of individuals is small and occlusion is minimal. However, in group-housed pig, cattle, sheep, chicken, and duck pens, multiple individuals often look similar, and feeding, moving, and repositioning are frequent. After occlusion ends, temporary trajectory number swapping can easily occur.
[0003] In aquaculture management systems, gait, body condition, and surface observations typically need to be continuously attributed to the same individual to form a time series that can be used for verification. If the trajectory number is mismatched before and after occlusion, the subsequently generated status results will be mixed with data from other individuals, making it difficult for the alert levels and video clips seen by the management system to correspond to the individuals on site. Using electronic tags, access control, weighing platforms, or adding separation facilities can provide identification assistance, but this increases the costs of on-site deployment, maintenance, and individual adaptation, and may not be suitable for the daily passage procedures of existing pens. Summary of the Invention
[0004] This invention provides a dynamic assessment system for livestock and poultry health based on visual individual tracking and knowledge graph fusion, which solves the technical problems mentioned in the background art.
[0005] To achieve the above-mentioned objectives, the present invention provides the following technical solution.
[0006] The livestock and poultry health dynamic assessment system based on visual individual tracking and knowledge graph fusion includes a front-end camera device, an edge computing device, a knowledge graph storage device, and a management output device. The edge computing device is communicatively connected to the front-end camera device, the knowledge graph storage device, and the management output device. The edge computing device is used to perform perspective calibration on the video of the group breeding pen. Based on the net width of the passage, the width of the individual and the length of the visible road segment, a single-column exposure zone is determined in the existing passage area. The single-column exposure zone is a section that allows a single breeding individual to pass through, restricts two breeding individuals to pass side by side, and provides a continuous visible trajectory segment. The edge computing device is also used to perform target detection and multi-target continuous association on the aquaculture individuals. When the aquaculture individuals pass through the single-column exposure zone, a passage queue is established and an anchor point event is formed to represent the correspondence between the trajectory before entry and the trajectory after departure. When the regular matching result based on the target association of adjacent frames conflicts with the correspondence, the temporary trajectory number is corrected. The knowledge graph storage device is used to write the relationship between the corrected trajectory, the anchor point event, the observation record and the status result, and to set the observation record with conflicting identity relationship to a pending confirmation status. The edge computing device is used to read observation records that have no conflicting identity relationships and include gait deviation, body condition deviation and body surface abnormality to generate the current state value, and to generate a continuous state value based on the current state value and the previous continuous state value. The management output device is used to output continuous status values, prompt levels, and segments to be reviewed.
[0007] Compared with the prior art, the present invention has the following substantial features and significant progress: This invention utilizes existing access boundaries within the enclosure to form a single-row visible zone, providing repeatable identification evidence for individual tracking in group-housed videos without adding access control, partitions, weighing platforms, or electronic tags. By correcting temporary trajectory numbers after occlusion through anchor point events and writing the trajectory, observation records, status results, and verification segments into a knowledge graph, it can reduce the possibility of gait deviations, body condition deviations, and surface abnormalities being included in other farmed individuals. This allows continuous status values, alert levels, and segments awaiting verification to be traced back to the original video segments, improving the continuity and verification efficiency of individual status management in group-housed scenarios. Attached Figure Description
[0008] Figure 1 This is a diagram of the system architecture and identity verification mechanism of the present invention. Detailed Implementation
[0009] The following description is provided in conjunction with the accompanying drawings. It should be understood that the following embodiments are for illustrative purposes only and are not intended to limit the invention; those skilled in the art can make equivalent substitutions or combinations for the specific implementations.
[0010] Example 1: This implementation method is applicable to group farming pens with fixed fences, walls, feed trough edges, or doorways. The animals being raised can be pigs, cattle, sheep, chickens, or ducks, who feed, drink, rest, and move around within the pens. In group farming pens, multiple animals often look similar and are prone to occlusion during feeding, movement, and repositioning. If only a conventional matching result is formed based on the association of adjacent frames, temporary trajectory number swaps can easily occur after occlusion ends, leading to incorrect gait deviations, body condition deviations, and surface abnormalities being written to the wrong individual node. This implementation method utilizes the naturally existing sequential passage conditions within the existing passage area 200 to form a single-column exposure zone 210, transforming the physical passage order into a basis for identity correction in the video.
[0011] like Figure 1 As shown, the front-end camera device 100 is used to collect video of the group breeding pen, and the camera's field of view covers the existing passage area 200 and the single-column exposure zone 210 located within the existing passage area 200. The edge computing device 300 is communicatively connected to the front-end camera device 100, the knowledge graph storage device 400, and the management output device 500. After receiving the video of the group breeding pen, the edge computing device 300 performs perspective calibration, preprocessing, target detection, and multi-target continuous association on the video frames. It then completes the determination of the single-column exposure zone 210, the generation of temporary trajectory numbers, the formation of anchor events, the generation of status results, and the output of prompt levels through the single-column exposure zone determination module 310, the target detection and multi-target continuous association module 320, the anchor point event generation and trajectory correction module 330, and the status summary and prompt generation module 340.
[0012] Example 2: The front-end camera device 100 can be installed above or to the side of the group breeding pen, and remains fixed after installation, ensuring that the feeding area, drinking area, resting area, and main passage area are within the camera's field of view. The function of the front-end camera device 100 is to continuously collect video from the group breeding pen and send the video frames, along with the acquisition time, camera device number, and pen number, to the edge computing device 300. To ensure a stable basis for subsequent perspective calibration and determination of the single-row exposure zone 210, the front-end camera device 100 should not move with the movement of individual farmed animals after installation, and the camera's field of view should include at least one existing passage area 200 defined by a fixed fence, wall, feed trough edge, or doorway.
[0013] The edge computing device 300 communicates with the front-end camera device 100, the knowledge graph storage device 400, and the management output device 500. This communication connection is used to transmit group breeding pen videos, video frames, corrected trajectories, anchor point events, observation records, status results, prompt levels, and manual review results. The communication connection can be implemented using an on-site wired network or an on-site wireless network. During data transmission, the camera device number, pen number, and acquisition time are retained for each group breeding pen video stream. When the front-end camera device 100 continuously outputs video frames, the edge computing device 300 receives and buffers the video frames according to the acquisition time sequence, ensuring that subsequent target detection, multi-target continuous association, queue establishment, and status result generation all have the same time reference.
[0014] In this embodiment, the front-end camera device 100 only needs to provide stable video of the group breeding pen, while the identity judgment and status summary are completed collaboratively by the edge computing device 300, the knowledge graph storage device 400, and the management output device 500.
[0015] Example 3: Edge computing device 300 is used for perspective calibration of video footage from group aquaculture pens. The input for perspective calibration is video frames captured by the front-end camera device 100 and known dimensional references within the pens, such as calibration boards, fence spacing, or known ground dimensions. The output of perspective calibration is calibration coordinates, which are used to convert video pixel coordinates into pen planar coordinates. Using these calibration coordinates, edge computing device 300 can obtain the net width of the passage and the length of the visible road segment in the perspective-calibrated image, and can map the position sequence of detected targets to pen coordinates.
[0016] During perspective calibration, the edge computing device 300 selects no fewer than four non-collinear calibration points within the same video frame. These calibration points originate from the corners of the calibration board, the intersections of railings, or endpoints of known ground dimensions. The edge computing device 300 uses the existing passageway 200 as the reference plane for the railing's planar coordinates, designating the passage direction as the longitudinal coordinate direction and the direction perpendicular to the passage direction as the transverse coordinate direction. Each calibration point simultaneously possesses both video pixel coordinates and railing planar coordinates. The edge computing device 300 calculates the perspective transformation matrix based on the calibration points and converts the video pixel coordinates into railing planar coordinates.
[0017] In the formula, Represents the horizontal coordinate of video pixels. Represents the vertical coordinate of video pixels. Indicates the horizontal coordinates of the enclosure plane. Indicates the longitudinal coordinates of the enclosure plane. Represents the perspective transformation matrix. This represents the scaling factor of homogeneous coordinates.
[0018] After obtaining the perspective transformation matrix, the edge computing device 300 performs back calculations on each calibration point to obtain the calibration reprojection error. The calibration reprojection error is used to determine whether perspective calibration can be used for measuring the net width of the passage, the length of the visible road segment, and the coordinates of the fence.
[0019] In the formula, This indicates the calibration reprojection error, in meters. Indicates the number of calibration points; and Indicates the first The plane coordinates of the fence at each calibration point; and Indicates the first The coordinates of the enclosure plane obtained by back-calculating the perspective transformation matrix from each calibration point. When the calibration reprojection error is no greater than one percent of the net width of the passage and no greater than two percent of the individual body width, the edge calculation device 300 confirms that the perspective calibration is qualified; otherwise, the calibration points are reselected and the perspective transformation matrix is recalculated.
[0020] The clear width of the passageway is obtained using a multi-section measurement method perpendicular to the direction of travel. The edge computing device 300 measures the lateral distance between the two side boundaries at the entrance, middle, and exit of the existing passageway 200, and uses the minimum lateral distance as the clear width of the passageway. The length of the visible section is obtained using a continuous visible interval measurement method along the direction of travel. Starting from the entrance of the existing passageway 200, the edge computing device 300 searches for intervals along the direction of travel where the outlines of the farmed individuals can be continuously seen by the front-end camera device 100, and uses the longitudinal length of this interval in the pen plane coordinates as the length of the visible section. The body width of an individual is obtained using images of at least ten farmed individuals with complete outlines from the same batch. The edge computing device 300 measures the lateral width of the torso of each individual and takes the median value as the individual body width; when the body shape of the same batch changes significantly, the individual body width is re-obtained.
[0021] The existing access area 200 is defined by fixed fences, walls, feed trough edges, or doorways. The existing access area 200 is the area that originally existed in the group-raising enclosure and was used for the daily passage of the raised animals. The edge computing device 300 can determine candidate existing access areas 200 in the video map based on the boundary positions of the fixed fences, walls, feed trough edges, or doorways. The edge computing device 300 registers the site coordinate boundaries and image interest area of a single-column exposure zone 210 in the video map.
[0022] After perspective calibration is completed, the edge computing device 300 retains the boundary coordinates of the existing passage area 200, the camera device number corresponding to the front-end camera device 100, the column number, and the calibration coordinates in the video map. If the boundary of the enclosure changes, such as the fixed fence being moved, the edge of the material trough being replaced, fixed obstacles being piled up near the wall, or the passage range of the doorway changing, the geometric conditions of the original existing passage area 200 may change. At this time, the edge computing device 300 needs to re-obtain the net width of the passage and the length of the visible road segment, and re-determine whether the existing passage area 200 can provide a single-row visible strip 210.
[0023] Example 4: The single-row exposed strip determination module 310 is used to determine the single-row exposed strip 210 in the existing traffic area 200 based on the clear width of the passage, the width of individual sections, and the length of the visible road segment. The clear width of the passage is denoted as... , is the minimum lateral distance, measured in meters, between the edges of a fixed fence, wall, or feed trough, allowing a cultured individual to pass through. It is obtained by measuring the minimum lateral distance between the two boundaries of an existing passageway within a perspective-calibrated image. Individual body width is denoted as . , is the actual lateral width of the torso of a farmed individual in a top-view or corrected image, measured in meters. It is obtained from images of farmed individuals with complete outlines within the same batch, and the median value can be taken from multiple clear images. The visible road segment length is denoted as . , is the longitudinal length of the existing passage area of 200 meters within the camera frame where the outline of the farmed individuals can be clearly seen continuously. It is obtained by measuring the continuous visible distance along the passage direction without being obscured by fixed obstacles.
[0024] The single-column exposure zone 210 is a section that allows a single farmed individual to pass through, restricts two farmed individuals to pass side-by-side, and provides a continuous visible trajectory segment. The single-column exposure zone 210 utilizes the existing passage width and visible length of the existing passage area 200 to allow farmed individuals to form a sortable passage queue based on their entry direction and entry time, and establishes a correspondence between their pre-entry and post-entry trajectories after departure. If the existing passage area 200 can only allow a single farmed individual to pass normally, and a complete outline can be continuously seen in the image, then this area can provide recurring anchor points for identity verification. If the existing passage area 200 is too wide, allowing two farmed individuals to pass side-by-side normally, then the entry and exit order no longer has a clear one-to-one correspondence; if the visible path length is insufficient, it is difficult to stably generate trajectory identity confirmation information within the zone.
[0025] The single-column exposed value is denoted as This is used to characterize the comprehensive quantity used to restrict side-by-side walking and provide continuous visibility within the existing passageway 200. The edge computing device 300 first determines whether the net width of the passage is greater than or equal to the individual's body width, allowing a single farmed individual to pass; secondly, it determines whether the net width of the passage is less than twice the individual's body width, preventing two farmed individuals of similar body width from passing side-by-side normally; finally, it combines this with the visible path length to evaluate whether the existing passageway 200 can provide a continuous visible trajectory segment. The formula for calculating the single-column visibility value is: in, This represents a single-column exposed value, in dimensionless units, derived from calculations of the channel's net width, individual body width, and visible road segment length. This represents the net width of the passageway, in meters. The value is derived from the minimum lateral distance between the two boundaries of the existing passageway 200 in the image after perspective calibration. This represents the width of an individual, in meters, and is derived from images of fully outlined farmed individuals within the same breeding batch. This indicates the length of the visible road segment, in meters. The value is derived from the actual length of the existing passage area within the camera frame, where the outlines of the aquatic animals can be clearly seen continuously along the direction of travel.
[0026] when When an existing passageway 200 meets the condition that a single animal can pass through but two animals cannot pass side-by-side, the single-column exposure value is positive; when this condition is not met, the single-column exposure value is zero. The edge computing device 300 filters single-column exposure zones 210 from the candidate existing passageways 200 based on the single-column exposure value. When multiple candidate existing passageways 200 exist within the same pen, it prioritizes one or more consecutive areas with positive and larger single-column exposure values. After filtering, the edge computing device 300 saves the site coordinate boundaries and image region of interest of the single-column exposure zone 210, enabling the subsequent target detection and multi-target continuous association module 320 to determine whether an animal has entered the single-column exposure zone 210.
[0027] The update conditions for the single-column exposure zone 210 include any change in the camera device position, pen boundary, or batch size. A change in camera device position alters the mapping between video pixel coordinates and pen plane coordinates; a change in pen boundary changes the net width of the passage or the length of the visible section; a change in batch size changes the individual body width. When any of these changes occur, the edge computing device 300 re-executes perspective calibration, obtains the net width of the passage, obtains the length of the visible section, obtains the individual body width, and calculates the single-column exposure value to update the single-column exposure zone 210. If the single-column exposure value is zero, the edge computing device 300 does not register the corresponding candidate existing passage area 200 as the single-column exposure zone 210. The system continues to perform multi-target continuous association within the normal activity area, but does not generate anchor point events based on the candidate existing passage area 200.
[0028] When filtering single-column exposure zones 210, the edge computing device 300 first deletes candidate existing traffic areas 200 with a single-column exposure value of zero, and then sorts them according to the single-column exposure value from largest to smallest. If the difference in single-column exposure values between two candidate existing traffic areas 200 does not exceed five percent of the larger single-column exposure value, the candidate existing traffic area 200 with the larger visible road segment length is selected first; if the visible road segment lengths are still the same, the candidate existing traffic area 200 with the higher target integrity in the image of the front-end camera device 100 is selected first. When the site coordinate boundaries between consecutive candidate areas are connected and the traffic direction is consistent, the edge computing device 300 merges them into one single-column exposure zone 210; when there are fixed obstacles obstructing or changes in traffic direction between consecutive candidate areas, the edge computing device 300 registers them as different single-column exposure zones 210.
[0029] After the single-column exposure strip 210 is updated, the edge computing device 300 retains the anchor point events and observation records from before the update, and does not use the updated site coordinate boundaries to modify existing anchor point events. The updated single-column exposure strip 210 only takes effect at the acquisition time immediately after the update is completed.
[0030] Example 5: The front-end camera device 100 continuously captures video of the group breeding pens at a set frame rate and transmits the video frames to the edge computing device 300. The edge computing device 300 splits the video frames according to a fixed time window, retaining the acquisition time, camera device number, and pen number of each video frame. To ensure stable input for target association between adjacent frames, the edge computing device 300 performs lens distortion correction, brightness normalization, noise suppression, and image cropping on the video frames. During image cropping, the image interest area of the single-column exposure zone 210 is preserved, ensuring that the judgment of breeding individuals entering the single-column exposure zone 210 is not lost due to cropping.
[0031] Edge computing device 300 marks severely blurred, overexposed, underexposed, or extensively occluded video frames as invalid. Video frames with invalid marks are not used to generate new observation records, but their video segment indexes can be retained for manual verification. For usable video frames, edge computing device 300 converts the video pixel coordinates to calibration coordinates and calculates the target's position sequence, direction of travel, and column coordinates based on these calibration coordinates in subsequent processing. This process avoids directly writing low-quality images to knowledge graph storage device 400, reducing erroneous observation records at the data entry point.
[0032] The edge computing device 300 inputs the preprocessed video frames into the livestock and poultry target detection model, outputting the bounding box, contour region, category, and detection confidence score for each visible farmed individual. The livestock and poultry target detection model can be a conventional target detection model, a conventional instance segmentation model, or a combination of both, as long as it can output the bounding box, contour region, category, and detection confidence score. The edge computing device 300 performs deduplication on the detection results in adjacent frames, removing targets with obviously abnormal areas or incomplete targets located at the outer edge of the image, to reduce the number of erroneously detected targets entering the temporary trajectory number initialization process.
[0033] The input video frames for the livestock and poultry target detection model are adjusted to the model's preset input size before entering the model, while preserving the proportional mapping between the original and adjusted video frames. Targets with a detection confidence level below the detection confidence threshold are not included in the temporary trajectory number initialization process; the detection confidence threshold can be set... to Between these values, a fixed value is used during implementation and written into the configuration file of the edge computing device 300. The overlap of the bounding boxes of adjacent detected targets is greater than... Furthermore, when the categories are the same, the edge computing device 300 retains the detection targets with higher detection confidence. The area of the contour region of the detection target is smaller than the median area of the contour region within the same acquisition cycle. times, or greater than the median value When the area is doubled, it is determined to be an obvious area anomaly.
[0034] The condition for stable occurrence across several consecutive frames is as follows: the same detected target reaches the detection confidence threshold in at least five consecutive video frames, and the positional distance between adjacent video frames does not exceed twice the width of the individual. Once this condition is met, the edge computing device 300 establishes a temporary trajectory number. If the frame rate of the front-end camera device 100 is less than ten frames per second, the edge computing device 300 only converts the number of consecutive video frames within the normal activity area to at least... The continuous acquisition duration of seconds is used to help determine whether the temporary trajectory number appears stably; this low frame rate conversion is not used for single-column exposure band 210 registration, queue dequeueing, or anchor point event generation.
[0035] Once the stable occurrence conditions are met, the edge computing device 300 saves the initial position, outline, color texture, and direction of movement of the detected target, and maintains the corresponding temporary trajectory number. The temporary trajectory number is the number used by the target detection and multi-target continuous association module 320 to maintain the continuity of the individual's trajectory in the video, and is not necessarily equivalent to the individual's number. If the detected target is located within the single-column exposure zone 210, the edge computing device 300 simultaneously records its entry direction and entry time, providing input for queue establishment and in-zone trajectory identification information generation.
[0036] Example 6: The target detection and multi-target continuous association module 320 is used to perform target detection and multi-target continuous association on the cultured individuals. Within the normal activity area outside the single-column exposure zone 210, the edge computing device 300 performs conventional matching based on positional distance, bounding box overlap, appearance similarity, and direction of movement. Positional distance can be obtained from the distance between the calibration coordinates of the target detected in the current frame and the predicted trajectory position in the previous frame; bounding box overlap can be obtained from the overlap ratio between the bounding box of the target detected in the current frame and the bounding box of the trajectory in the previous frame; appearance similarity can be obtained from color texture summaries or contour region features; and direction of movement can be obtained from the positional sequence changes between adjacent acquisition times.
[0037] Upon successful matching, the edge computing device 300 updates the trajectory position and appearance summary, and adds the detected target of the current frame to the position sequence of the corresponding temporary trajectory number. If the duration of the unmatched period does not reach the trajectory retention time, the edge computing device 300 retains the trajectory and waits for a matching detected target to appear again in subsequent video frames. If the duration of the unmatched period reaches the trajectory retention time, the edge computing device 300 marks the trajectory as pending recovery. The trajectory retention time is a pre-set time length used to distinguish between short-term occlusion and longer periods of unmatchable events. After a trajectory is marked as pending recovery, if a detected target with the same position trend, appearance summary, and direction of movement as that trajectory appears subsequently, the edge computing device 300 can recover the temporary trajectory number; if the recovery process conflicts with the correspondence between anchor events, the correspondence formed by the anchor events described later is corrected.
[0038] During regular matching, the edge computing device 300 converts the positional distance, bounding box overlap, appearance similarity, and direction of motion into... to The scores are calculated, and a general matching score is also calculated. The smaller the positional distance, the higher the positional distance score; the greater the overlap of the bounding boxes, the higher the overlap score; the closer the color and texture summaries, the higher the appearance similarity score; and the smaller the angle between the motion directions, the higher the motion direction score.
[0039] The color texture summary is obtained using a fixed implementation method. The edge computing device 300 extracts pixels within the contour region of the detected target, converts the pixels to the HSV color space, and forms a normalized color texture histogram according to sixteen intervals for the hue channel, eight intervals for the saturation channel, and eight intervals for the lightness channel. The value of each interval represents the proportion of pixels in that interval to the total number of effective pixels in the contour region, and the sum of all interval values is... The appearance similarity score is obtained by comparing the normalized color texture histogram of the currently detected target with the normalized color texture histogram of the trajectory to be matched, interval by interval. Specifically, the smaller value of the two normalized color texture histograms in each interval is summed, and the summation result is restricted to a certain range. to Therefore, the same color space, the same number of intervals, and the same normalization rule are used simultaneously for appearance similarity scoring and subsequent in-band color texture scoring, avoiding inconsistencies in regular matching results caused by different implementers using different color texture summaries.
[0040] In the formula, This represents the overall score for a standard match. Indicates the score based on location distance; The score indicates the degree of overlap of the outer bounding boxes; Indicates the appearance similarity score; The score is based on the direction of movement. Indicates the percentage of location distance; Indicates the percentage of overlap between bounding boxes; Indicates the percentage of appearance similarity; This indicates the percentage of motion direction. The percentages for positional distance, bounding box overlap, appearance similarity, and motion direction are all [not specified]. to The dimensionless proportion, the sum of the four is When not configured individually, all four are taken. .
[0041] The overall score for regular matching reached At that time, the edge computing device 300 determines that a match is successful; the overall score of the regular match is lower than 300. At that time, the edge computing device 300 determines that there is no match. The trajectory retention time can be set to... Instant seconds, when not configured separately Seconds. When the trajectory to be recovered is restored, the comprehensive score of the conventional matching between the subsequently detected target and the trajectory to be recovered reaches [a certain value]. And the score for the direction of movement reaches If the temporary trajectory number is not restored, the edge computing device 300 will restore the temporary trajectory number; otherwise, a new temporary trajectory number will be created or the device will remain in a pending state.
[0042] Regular matching results within a normal activity area may be erroneous due to occlusion, cross-positioning, and visual similarity. Therefore, this embodiment uses regular matching results as the basis for trajectory generation, while anchor events generated by the single-column exposure strip 210 provide a basis for identity correction. This configuration enables the edge computing device 300 to correct temporary trajectory numbers when there is a conflict between the regular matching results and the correspondence between anchor events, and retains both the temporary trajectory number before and after correction.
[0043] Example 7: The anchor point event generation and trajectory correction module 330 is used to establish a passage queue and form anchor point events when a cultured individual passes through the single-column exposure zone 210. The passage queue is used to record the entry direction, entry time, complete outline, color texture, and movement direction of the cultured individual entering the single-column exposure zone 210. Since the single-column exposure zone 210 allows only one cultured individual to pass through, restricts two cultured individuals to pass side by side, and provides continuous visible trajectory segments, the passage queue can utilize the order of entry time and the continuity of entry direction to form a sequential binding between the trajectory before entry and the trajectory within the zone.
[0044] When a farmed individual enters the single-column exposure zone 210 from the general activity area, the edge computing device 300 reads the individual's entry direction and time, adds it to the passage queue, and continuously collects the individual's complete outline, color texture, and movement direction within the single-column exposure zone 210. The complete outline is used to determine whether the individual is occluded or truncated within the single-column exposure zone 210; the color texture is used to help distinguish farmed individuals with similar appearances but differences in local textures; the movement direction is used to determine whether the individual is moving along the passage direction of the single-column exposure zone 210. Based on the complete outline, color texture, and movement direction, the edge computing device 300 generates in-zone trajectory identification information.
[0045] The in-band trajectory identification information consists of an in-band complete contour score, an in-band color and texture score, and an in-band movement direction score. The in-band complete contour score is obtained by comparing the visible contour area within a single column of exposed band 210 with the area of the most recent complete contour of the individual's trajectory before entry; the value is limited to a range of values. to The in-band color texture score is obtained by comparing the color texture summary of the single-column exposed band 210 with the color texture summary of the pre-entry trajectory, and the value is restricted to a range of values. to The score for the direction of motion within the band is obtained by determining the consistency between the direction of motion within the single-column exposure band 210 and the direction of entry; the value is limited to... to The edge computing device 300 calculates the identity verification score for the trajectory within the band.
[0046] The in-band color texture score uses the same normalized color texture histogram and the same interval-wise smaller value summation rule as the appearance similarity score. The edge computing device 300 obtains the normalized color texture histogram of the in-band trajectory within the single-column exposed band 210 and compares it with the normalized color texture histogram corresponding to the most recent valid color texture summary of the preceding trajectory; the comparison result is used as the in-band color texture score. If the in-band trajectory has continuous occlusion, resulting in the number of effective pixels in the contour region being lower than the number of effective pixels in the most recent complete contour region of the preceding trajectory, the score will be determined accordingly. If the score is multiplied by 1, then the edge computing device 300 will not use the in-band color texture score to generate valid in-band trajectory identity verification information.
[0047] In the formula, This indicates the score for identity verification within the trajectory; Indicates the score for the complete outline within the band; Indicates the in-band color texture score; Indicates the score for the direction of movement within the band; Indicates the percentage of the complete outline within the band; Indicates the percentage of color texture within the band; This indicates the percentage of motion direction within the band. The percentages for the complete outline within the band, the color / texture within the band, and the motion direction within the band are all [not specified]. to The dimensionless proportion, the sum of the three is When not configured individually, each of the three is taken separately. , and .
[0048] In-band trajectory identity confirmation score reached And the score for the complete inner contour is not lower than The score for the direction of motion within the band is not lower than At that time, the edge computing device 300 confirms the validity of the in-band trajectory identity verification information. If the in-band trajectory identity verification score is lower than... Or the score for the complete inner contour is lower than Or the score for the direction of movement within the band is lower than At that time, the edge computing device 300 does not generate anchor point events based on the trajectory identity verification information within the band.
[0049] The in-band trajectory identification information is used to establish the correspondence between the pre-entry trajectory and the post-departure trajectory, and to bind the pre-entry temporary trajectory number to the in-band temporary trajectory number. The pre-entry trajectory is the trajectory formed by the cultured individual in the normal activity area before entering the single-column exposure zone 210; the in-band trajectory is the trajectory corresponding to the continuous visible trajectory segment of the cultured individual within the single-column exposure zone 210; the post-departure trajectory is the trajectory formed by the cultured individual after leaving the single-column exposure zone 210 and re-entering the normal activity area. The edge computing device 300 arranges the pre-entry trajectories in the same passage queue according to the entry time, and establishes the correspondence between the pre-entry trajectory and the post-departure trajectory according to the departure order when the cultured individual leaves the single-column exposure zone 210.
[0050] The objects enqueued through the queue are the pre-entry trajectories that enter the single-column exposed band 210. During enqueueing, the edge computing device 300 writes the entry direction, entry time, pre-entry temporary trajectory number, and video segment index of the pre-entry trajectory. The objects dequeued through the queue are the post-departure trajectories formed after leaving the single-column exposed band 210. During dequeueing, the edge computing device 300 prioritizes the pre-entry trajectory with the earliest entry time and valid in-band trajectory identity verification information in the queue and establishes a correspondence with the current post-departure trajectory; if the in-band trajectory identity verification score of the current post-departure trajectory and the earliest entry time pre-entry trajectory is lower than the previous post-entry trajectory, the dequeue will be removed from the queue. If the item leaves the queue, its trajectory after leaving will be marked as pending recovery.
[0051] When multiple farmed individuals enter the single-column exposure zone 210 consecutively, the edge computing device 300 arranges them in ascending order of entry time through the queue and processes their post-departure trajectories in ascending order of departure time. If the interval between two entry times is less than one video frame period of the front-end camera device 100 and the complete outlines overlap, the edge computing device 300 does not generate an anchor point event and sets the corresponding video segment index as the segment to be reviewed.
[0052] Anchor point events include the pre-entry trajectory, in-band trajectory, post-departure trajectory, pre-correction temporary trajectory number, post-correction temporary trajectory number, entry time, departure time, and video segment index. The video segment index is used to trace the correction basis for anchor point events, enabling the management output device 500 to review the video corresponding to the anchor point event when a prompt level or a segment awaiting review appears. Anchor events serve as the basis for correcting the continuity of temporary trajectory numbers before and after occlusion.
[0053] When the regular matching result conflicts with the correspondence between the pre-entry trajectory and the post-departure trajectory represented by the anchor event, the edge computing device 300 corrects the temporary trajectory number based on the correspondence of the anchor events. For example, after two farmed individuals cross paths within a normal activity area, the regular matching result might assign the temporary trajectory number of the first farmed individual to the second. If the first farmed individual subsequently passes through the single-column exposure zone 210 and forms in-zone trajectory identification information consistent with the pre-entry trajectory in the passage queue, the edge computing device 300 corrects the temporary trajectory number corresponding to the post-departure trajectory to the corrected temporary trajectory number, while retaining the pre-correction temporary trajectory number. In this way, observation records before and after occlusion can be continuously attributed to the same farmed individual number.
[0054] The data structure of the regular matching result includes at least the target detected in the current frame, the temporary trajectory number of the previous frame, the overall score of the regular matching, and a matching success flag. The data structure of the anchor event correspondence includes at least the temporary trajectory number before entry, the temporary trajectory number within the band, the temporary trajectory number after departure, the identity verification score of the within-band trajectory, and a valid anchor event flag. When the temporary trajectory number after departure given by the regular matching result differs from the corrected temporary trajectory number given by the anchor event correspondence, and the valid anchor event flag is valid, the edge computing device 300 determines that the regular matching result conflicts with the anchor event correspondence.
[0055] In the event of a conflict, the edge computing device 300 performs deterministic correction. If the in-band trajectory identity verification score reaches... If the departure trajectory corresponds to multiple valid anchor events, the corrected temporary trajectory number will be bound to the anchor event correspondence, and the temporary trajectory number given by the regular matching result will be written into the original temporary trajectory number. If the same departure trajectory corresponds to multiple valid anchor events, the anchor event with the highest in-band trajectory identity confirmation score will be selected; if the difference between the highest score and the second highest score is less than... If the anchor event is invalid, no correction will be performed, and the relevant observation record will be set to a pending confirmation status. If the anchor event is invalid, the regular matching results will not be overwritten.
[0056] When a reverse turn or incomplete outline occurs within the single-column exposure band 210, the edge computing device 300 does not generate an anchor point event. A reverse turn disrupts the unidirectional order of passage through the queue, and an incomplete outline reduces the reliability of in-band trajectory identification information. In these cases, the edge computing device 300 retains only the normal trajectory results and can use the relevant video segment index as a candidate for the segment to be reviewed, but does not use the in-band segment to correct the temporary trajectory number. This constraint avoids changing the existing trajectory attribution with unstable in-band trajectory identification information.
[0057] The determination of reverse reversal is based on the angle between the directions of motion. The edge computing device 300 compares the direction of motion of the cultured individual after entering the single-column exposure zone 210 with its entry direction. If the angle between the two is greater than [value missing] for at least three consecutive video frames... If the degree is too high, a reverse return is determined. The determination of an incomplete contour uses the score of the complete contour within the band; if the score of the complete contour within the band is lower than a certain value, a reverse return is determined. If either the reverse foldback or the incomplete contour is true, the anchor point event generation and trajectory correction module 330 will not generate an anchor point event.
[0058] Example 8: For livestock individuals with registered breeding records, the edge computing device 300 can bind temporary trajectory numbers to the livestock individual number using visible ear tag images, body surface patterns, or initial manual confirmation. The livestock individual number represents the continuously managed livestock individual, while the temporary trajectory number represents the trajectory segment in the video formed by target detection and continuous association of multiple targets. After binding, each valid anchor point event is used to confirm that the binding relationship remains consistent before and after occlusion. When an unexplained binding relationship conflict occurs, the knowledge graph storage device 400 sets the relevant observation record to a pending confirmation state, and the management output device 500 outputs the segment to be reviewed for manual review.
[0059] The edge computing device 300 extracts the outline, limb key points, and trunk region from the associated trajectories of farmed individuals, and generates an observation record when the individual outline is complete, the direction of movement is identifiable, and the image is clear. The outline is used to calculate the trunk length, width, and outline area; the limb key points are used to calculate gait-related movement performance; and the trunk region is used to determine changes in body condition and the visible area of the body surface. If the individual outline is incomplete, the direction of movement is undetermined, or the image is unclear, the edge computing device 300 does not generate an observation record for calculating the current state value, or it adds reason information to the corresponding record and saves it as data to be confirmed.
[0060] The observation record includes the individual's ID, temporary trajectory ID, collection time, camera equipment ID, field coordinates, observation category, quantitative results, trajectory source marker, and video clip index. The observation category can correspond to gait, body condition, or body surface abnormalities. The quantitative results include at least one of gait deviation, body condition deviation, and body surface abnormalities. Gait deviation is denoted as... The range of values is to This indicates the degree of deviation of the current gait from the stable gait of the individual; the deviation in body condition is denoted as... The range of values is to This indicates the degree of deviation of the current body shape profile from the stable profile of the cultured individual; abnormal body surface measurements are recorded as... The range of values is to This indicates the degree of quantification corresponding to the currently visible abnormal area on the body surface.
[0061] Gait deviations can be normalized from observations such as walking speed, stride length, cadence, lateral sway, and number of pauses. Body condition deviations can be normalized from trunk length, width, outline area, and their differences from stationary period records. Surface abnormalities can be normalized from the area and location of visible stains, hair loss, erythematous areas, or wound-like areas. The above normalizations can be pre-set according to existing farm management standards by breed, age, or batch; the normalization output is limited to... to .
[0062] The stable period records are generated from historical data collection periods of the same farmed individual without any attention prompts, warning prompts, or conflicting identity relationships, and the number of collection periods must be no less than twenty. The edge computing device 300 calculates the stable values for walking speed, stride length, cadence, lateral sway, number of pauses, trunk length, trunk width, and outline area, respectively. If a farmed individual has fewer than twenty historical data collection periods, then the stable period records are generated from observational records within the same farmed batch that do not conflict in identity relationships, and this process switches to the individual's own stable period records once twenty historical data collection periods have been collected.
[0063] For any observation, the edge computing device 300 uses a unified normalized deviation calculation method to compare the current observation with the records from the stable period and limits the result to... to .
[0064] In the formula, This indicates the normalized deviation of the observation; Indicates the current observation; Indicates the stable value of the observed item; Indicates the allowable deviation of the observation item; This indicates the zero-decrease quantity for observation items. The current observation item, the stable value of the observation item, the allowable deviation of the observation item, and the zero-decrease quantity for observation items all have the same dimensions. When the current observation item is walking speed, stride length, stride frequency, lateral swing, number of pauses, trunk length, trunk width, or outline area, the zero-decrease quantity for observation items adopts the same speed, length, frequency, order, or area dimensions as the corresponding observation item. The allowable deviation of the observation item is pre-set by the farm according to existing management standards; if not set separately, the absolute value of the stable value of the observation item is used. The minimum positive value corresponding to the acquisition resolution of the observation item is taken when zero values are excluded. If no acquisition resolution is configured separately, the allowable deviation of the observation item is taken. The value is a multiple of the allowable deviation of the observation item, and this value maintains the same dimension as the allowable deviation of the observation item.
[0065] Gait deviation is obtained by the arithmetic mean of normalized deviation of walking speed, normalized deviation of stride length, normalized deviation of cadence, normalized deviation of left and right swing, and normalized deviation of number of pauses.
[0066] In the formula, Indicates gait deviation; This represents the normalized deviation of walking speed; This indicates the normalized deviation of stride length; This represents the deviation from the normalized step frequency. This indicates the normalized deviation of the left-right oscillation; This represents the normalized deviation of the number of pauses. All of the above are... to The dimensionless quantized value.
[0067] The deviation of body condition is obtained by the arithmetic mean of the normalized deviation of trunk length, the normalized deviation of trunk width, and the normalized deviation of contour area.
[0068] In the formula, Indicates the deviation from physical condition; This indicates the normalized deviation of trunk length; This indicates the normalized deviation of the torso width; This represents the normalized deviation of the contour area. All of the above are... to The dimensionless quantized value.
[0069] The amount of surface abnormalities is obtained by the ratio of the area of visible abnormal areas on the body surface to the area of the trunk region, and is limited to... to When no visible stains, hair loss, erythema-like areas, or wound-like areas are detected, abnormal measurements of the body surface are taken. When the area of the trunk region cannot be obtained, no abnormal quantity of the body surface is generated.
[0070] In the formula, Indicates abnormal amounts on the body surface; Indicates the area of visible abnormal regions on the body surface; Indicates the area of the torso region; The area of the visible abnormal area, the area of the torso region, and the area of the zero-decrease measure all have area dimensions and are obtained from the contour region corresponding to the index of the same video frame or the same video segment. The area of the zero-decrease measure is the area value of a single pixel after perspective calibration and mapping onto the fence plane; when the mapped areas of pixels at different positions within the same video frame are different, the median value of the mapped area of pixels within the torso region is taken. Therefore, the torso region area and the area of the zero-decrease measure maintain the same area dimension when added together.
[0071] When any of the gait deviation, body condition deviation, or body surface abnormality is missing, the edge computing device 300 does not use data from other farmed individuals to replace it, nor does it redistribute the gait percentage, body condition percentage, and body surface percentage based on the remaining items; the status result node of this collection cycle writes the cause information and keeps the continuous status value from being updated in this cycle.
[0072] The camera device number, column coordinates, and video clip index are used to connect observation records to camera device nodes and column nodes. When the trajectory source marker indicates that the observation record has been confirmed by an anchor event, the observation record is associated with the corresponding anchor event node. The trajectory source marker indicates whether the observation record has been confirmed by a valid anchor event. Observation records that have not been confirmed by a valid anchor event can still be saved, but they will not participate in the individual status summary when there is an identity conflict. In this way, the observation record retains both the video source and the basis for identity correction.
[0073] Example 9: Edge computing device 300 performs quality screening on observation records based on target completeness, image clarity, occlusion ratio, and trajectory duration. Target completeness is used to determine whether the outline of the farmed individual is sufficient to support the extraction of the outline, limb key points, and torso region; image clarity is used to determine whether the video frames are sufficient to support the recognition of color texture and visible areas of the body surface; occlusion ratio is used to determine whether the current observation record is obstructed by other farmed individuals or fixed obstacles; trajectory duration is used to determine whether the temporary trajectory number persists long enough to form a stable observation record. The above criteria can be preset by the farm according to the actual video quality.
[0074] Target completeness is obtained by the ratio of the visible contour area in the current video frame to the area of the nearest complete contour with the same temporary trajectory number, and the value is limited to [value missing]. to Image sharpness is obtained by normalizing the Laplacian variance of the grayscale image of the video frames, with values limited to a certain range. to During normalization, the edge computing device 300 selects no less than twenty frames with a target integrity of no less than [a certain percentage] during the calibration phase after the front-end camera device 100 is installed. The occlusion ratio is no higher than Furthermore, for clear video frames with stable lighting, the Laplacian variance of the grayscale image of each clear video frame is calculated, and its median value is used as the reference sharpness value. The Laplacian variance of the current video frame's grayscale image, divided by the reference sharpness value, is then constrained to a certain range. to The image sharpness is obtained; when the position, resolution, or lighting conditions of the front-end camera device 100 change, the edge computing device 300 re-obtains the reference sharpness value. The occlusion ratio is obtained by the ratio of the occluded contour area to the theoretically complete contour area, and its value is limited to... to The trajectory duration is the duration from the creation of the same temporary trajectory number to the current acquisition time.
[0075] In the formula, Indicates the quality value of the observation record; Indicates the completeness of the objective; Indicates image sharpness; Indicates the occlusion ratio; This indicates the acceptable value for trajectory duration. The acceptable values for target integrity, image clarity, occlusion ratio, and trajectory duration are all [not specified in the original text]. to The dimensionless quantized value.
[0076] When the completeness of the target is not less than The image clarity is no less than The occlusion ratio is no higher than And the trajectory duration is not less than At any given time, the observation record quality value meets the requirements for generating the observation record; if any condition is not met, the edge computing device 300 will not use the observation record to participate in the current state value calculation. If insufficient quality and pending identity verification occur simultaneously, the reason information for pending identity verification will be written first, and the reason information for insufficient data quality will be retained as additional reason information.
[0077] Observation records from multiple front-end camera devices 100 are aligned according to a unified acquisition time. For repeated observation records from the same acquisition time, the same farmed individual, and the same observation category, the edge computing device 300 retains the record with higher clarity. The selected observation records are aggregated according to a fixed acquisition cycle to form an individual-level time series. Short-term missing positions retain null values and reasons for the missing information, without replacing them with data from other farmed individuals. The trajectory corrected by anchor point events uses the corrected farmed individual number, ensuring that observation records before and after occlusion fall into the individual-level time series of the same farmed individual.
[0078] When data quality is insufficient, identity relationships are pending confirmation, or the three observation items lack key items, the edge computing device 300 will not update the continuous status values for the current period, but will only retain the corresponding cause information. The cause information can indicate insufficient data quality, pending identity relationships, missing gait deviation data, missing body condition deviation data, or missing body surface abnormality data. After the cause information is written to the status result node, the management output device 500 can display the segment to be reviewed or prompt for manual review, but will not use the low-quality observation records of that period for the current status value calculation.
[0079] Example 10: The knowledge graph storage device 400 is used to establish nodes for livestock individuals, pen locations, camera equipment, time periods, trajectories, anchor event nodes, observation records, and status results. Individual nodes represent livestock individuals under continuous management, including at least the individual's ID, pen location, and batch. Pen locations represent specific group livestock pens or pens, including at least the pen number and site coordinates. Camera equipment nodes represent the source of video capture, including at least the camera equipment number, installation location, and field of view. Time periods represent the time range in which trajectories, anchor events, observation records, or status results occur, including at least the start and end times of data collection. Trajectory nodes represent trajectory segments formed by visual tracking, including at least a temporary trajectory number, location sequence, and trajectory source marker. Anchor event nodes represent the basis for identity correction generated by the single-column exposure band 210. Observation record nodes represent gait, body condition, or body surface observation results. Status result nodes represent the summary results of individual status.
[0080] The knowledge graph storage device 400 establishes relationships based on: location, data collected by the device, belonging to an individual, occurring within a time period, entering a single-column display area, leaving a single-column display area, correcting a trajectory, having observation results, and generating a state result. The location relationship connects aquaculture individual nodes or trajectory nodes to column nodes; the data collected by the device relationship connects video frames or observation record nodes to camera device nodes; the belonging to an individual relationship connects trajectory nodes or observation record nodes to aquaculture individual nodes; the occurring within a time period relationship connects trajectory nodes, anchor event nodes, observation record nodes, or state result nodes to time period nodes; the entering a single-column display area relationship connects trajectory nodes to anchor event nodes; the leaving a single-column display area relationship connects anchor event nodes to trajectory nodes; the corrected trajectory relationship connects anchor event nodes to trajectory nodes; the having observation results relationship connects aquaculture individual nodes to observation record nodes; and the generating state result relationship is a relationship where observation record nodes point to state result nodes.
[0081] When tracing back the status results, the relationship between location, data collected by the device, and occurrence within a time period is used to locate the field, camera device, and time period; the relationship between entering the single-column display area, leaving the single-column display area, and the correction trajectory is used to trace the correction basis for anchor point events.
[0082] The knowledge graph storage device 400 is used to check whether a farmed individual is connected to two discontinuous trajectories within the same time period, and whether a trajectory is simultaneously connected to two farmed individuals. If any identity relationship conflict occurs, the knowledge graph storage device 400 sets the relevant observation record to a pending confirmation state, preventing the relevant observation record from participating in the individual status summary before manual review. If a farmed individual is connected to two discontinuous trajectories within the same time period, it indicates that the farmed individual has an unreasonable trajectory split in terms of time and location; if a trajectory is simultaneously connected to two farmed individuals, it indicates a conflict in the binding relationship between temporary trajectory numbers or farmed individual numbers.
[0083] A single time period consists of the current collection cycle and one collection cycle before and after it. Discontinuous trajectories are determined by both time interval and spatial distance: if the collection times of two trajectories overlap, or the spatial distance between the end position of the previous trajectory and the start position of the next trajectory is greater than the distance achievable at the maximum normal movement speed within that time interval, the knowledge graph storage device 400 determines that the two trajectories are discontinuous. The maximum normal movement speed is obtained from historical observation records of no conflicting identity relationships within the same breeding batch; specifically, the edge computing device 300 reads no fewer than thirty conflict-free identity relationship trajectories within the breeding batch, calculates the movement speed obtained by removing the pen plane position between adjacent collection times using the time interval, and takes the 95th percentile value as the maximum normal movement speed. If no such historical observation records are formed, the edge computing device 300 continuously collects ordinary activity area trajectories for no less than five minutes during the initial recording period, eliminating trajectories with unconfirmed identity relationships and those with image clarity lower than [a certain threshold]. After the trajectory is obtained, the maximum normal moving speed is obtained according to the same 95th percentile rule; if there are still less than 30 valid trajectories in the initial recording period, the determination of discontinuous trajectory conflict will not be performed for the time being, and the relevant observation records will be set to the pending confirmation status. The determination will be enabled again after the number of valid trajectories meets the requirements.
[0084] The check for a trajectory simultaneously connecting two farmed individuals is performed based on the individual relationship. The knowledge graph storage device 400 reads the number of farmed individual nodes connected to the same trajectory node within the same time period. If the number is greater than one, it is determined that a trajectory simultaneously connects to two farmed individuals. The locked scope of conflict records includes the conflicting trajectory node, the observation record node connected to that trajectory node, the relevant anchor event node, and the status result node pointed to by the relevant observation record node. The pending confirmation status is released after the manual review result is written back; if the manual review result is that the anchor correspondence is incorrect, the relevant observation record remains in the pending confirmation status and does not participate in the individual status summary; if the manual review result confirms that the anchor event is correct, the relevant observation record is restored to a state that can participate in the individual status summary.
[0085] Example 11: The status summary and prompt generation module 340 reads gait deviation, body condition deviation, and body surface abnormality values that are not conflicting in terms of identity relationships from the knowledge graph storage device 400. It generates the current status value according to pre-defined gait ratio, body condition ratio, and body surface ratio, and generates continuous status values based on the current status value and the previous continuous status value. The gait ratio is denoted as... The percentage of body condition is recorded as The percentage of body surface area is recorded as The range of values for all three is [missing information]. to And satisfy normalization constraints. The above proportions are pre-set by the farm according to the existing management system, and are used to express the relative role of gait deviation, body condition deviation and body surface abnormality in the current state value.
[0086] When the data is complete and there are no conflicts in identity relationships, the current state value is recorded as follows: The calculation formula is: in, This represents the current state value, and its range is [value range missing]. to The values are derived from the weighted sum of gait deviation, body condition deviation, and body surface abnormality values for individuals with no conflicting identity relationships within the current collection period. This represents the proportion of gait patterns, with a value range of [value range missing]. to The value is derived from the percentage of gait deviation pre-set by the farm according to its existing management system. This represents the gait deviation, with a value range of [value missing]. to The values are derived from gait quantification results in the observation records; This indicates the percentage of body condition, with a value range of [value range missing]. to The value is derived from the percentage of body condition deviations pre-set by the farm according to its existing management system. This indicates the deviation from physical condition, with a value range of [value range missing]. to The values are derived from the quantitative results of body condition in the observation records; This represents the percentage of body surface area, with a value range of [value missing]. to The value is derived from the percentage of abnormal body surface measurements pre-set by the farm according to its existing management system. This represents abnormal quantities on the body surface, with a range of values of [value range missing]. to The values are derived from the quantitative results of body surface observation records.
[0087] Gait proportion, body condition proportion, and body surface proportion shall meet the following constraints: in, Indicates the proportion of gait patterns. Indicates the percentage of body condition. This represents the proportion of body surface area. This constraint ensures that the total contribution of gait deviation, body condition deviation, and body surface abnormalities to the current state value remains consistent, preventing the current state value from exceeding the limit due to improper proportion settings. to The range.
[0088] Continuous state values are denoted as The previous continuous state value is recorded as The latest data percentage is recorded as Continuous state values are used to represent the continuous aquaculture status results updated to the current collection time. The state summary and prompt generation module 340 smooths the current state value with the previous continuous state value, using the following formula: in, Represents continuous state values, with a range of values of 1000. to The value is derived from a smooth update of the current state value and the previous consecutive state values; This indicates the percentage of the latest data, with a value range of [value range missing]. to The value is derived from the continuously updated percentage pre-set by the farm according to its existing management system; Indicates the current state value; This represents the previous continuous state value, with a range of values of [value range missing]. to The values are derived from the continuous aquaculture status results retained from the previous collection period.
[0089] The attention line is recorded as The warning line is marked as The range of values for both satisfy the following constraints: in, This indicates the attention line, and its value is derived from the on-site attention prompt boundary value pre-set by the farm according to its existing management system. The warning line is represented by a value pre-set by the farm according to its existing management system. The status summary and prompt generation module 340 reads continuous status values chronologically. When the continuous status value is below the attention line, it is recorded as normal; when the continuous status value reaches the attention line but not the warning line, a prompt level containing attention is generated; when the continuous status value reaches the warning line, a prompt level containing warning is generated. To reduce repeated prompts caused by short-term screen fluctuations, the prompt level can be changed only after the continuous status value remains constant for two consecutive collection cycles.
[0090] If the continuous status value is not updated in the current period due to insufficient data quality or pending identity verification, the status summary and prompt generation module 340 retains the previous continuous status value as the current display value and writes the reason information into the status result node. In the next collection period, if there is no conflict in identity and the gait deviation, body condition deviation, and body surface abnormality are all complete, the status summary and prompt generation module 340 will still use the most recently updated continuous status value as the previous continuous status value and continue to update according to the continuous status value formula. If the continuous status value is not updated for three consecutive collection periods, the management output device 500 outputs the segment to be reviewed and keeps the prompt level from increasing until an observation record with no conflict in identity or a manual review result is obtained and written back.
[0091] The management output device 500 is used to output continuous status values, alert levels, and segments awaiting review. The alert record includes the individual's ID, field, first appearance time, current level, corresponding observation item, representative video segment index, and the index of the most recent valid anchor point event. The management output device 500 can display the current trajectory location, continuous status values over a recent period, key observation items, and alert levels. When a concern alert or warning alert occurs, the management output device 500 outputs segments awaiting review, allowing farm personnel to verify whether the individuals before and after the obscuring event are the same farm.
[0092] As an optional implementation, the farmed individuals in the group breeding pens pass through the existing passageway 200 between the edge of the feed trough and the fixed fence in sequence according to their daily walking habits. The edge computing device 300 performs perspective calibration based on the fence spacing, obtains the net width of the passage, the length of the visible section, and the width of the individual, and calculates a positive single-column exposure value. The edge computing device 300 registers the continuous area in the existing passageway 200 as a single-column exposure zone 210. After a farmed individual enters the single-column exposure zone 210, the entry direction, entry time, complete outline, color texture, and movement direction are recorded through the queue; after a farmed individual leaves the single-column exposure zone 210, the anchor point event generation and trajectory correction module 330 generates an anchor point event. When the knowledge graph storage device 400 does not detect any identity relationship conflicts, the status summary and prompt generation module 340 reads the observation record and generates the current status value and continuous status values. If the continuous status value is lower than the attention line, the management output device 500 displays it as normal and retains the video segment index for traceability.
[0093] In one optional implementation, two farmed individuals occlude and swap positions within a normal activity area. The target detection and multi-target continuous association module 320, based on the conventional matching results formed by the association of targets in adjacent frames, incorrectly assigns a temporary trajectory number. Subsequently, one of the farmed individuals enters a single-column exposure zone 210. Since the single-column exposure zone 210 restricts the two farmed individuals to pass side-by-side, the edge computing device 300 can maintain the order of the passage queue according to the entry time and generate trajectory identity confirmation information within the zone based on the complete outline, color texture, and direction of movement. When the farmed individual leaves the single-column exposure zone 210, the anchor point event generation and trajectory correction module 330 establish a correspondence between the trajectory before entry and the trajectory after departure. If this correspondence conflicts with the conventional matching results, the edge computing device 300 corrects the temporary trajectory number and writes the anchor point event to the knowledge graph storage device 400. This scenario demonstrates the corrective effect of the single-column exposure zone 210 and anchor point events on identity swapping after occlusion.
[0094] As an optional implementation, multiple front-end camera devices 100 are deployed in larger enclosures. Each group-raising enclosure video includes the camera device number, enclosure number, and acquisition time. An edge computing device 300 performs perspective calibration, target detection, and multi-target continuous association on the multiple video frames, and then aligns the observation records according to the unified acquisition time. For repeated observation records of the same acquisition time, the same individual, and the same observation category, the edge computing device 300 retains the one with higher clarity. When a certain individual forms a valid anchor event through a single-column exposure band 210 in a group-raising enclosure video, this anchor event is written to the knowledge graph storage device 400 and connected to the corresponding individual node. Subsequent state summaries only read observation records with no conflicting identity relationships, thereby reducing individual-level time-series contamination caused by occlusion and cross-field-of-view tracking.
[0095] It should be noted that the front-end camera device 100 can be a common visible light network front-end camera or a front-end camera with nighttime supplemental lighting capabilities, as long as it can continuously acquire video of the group breeding pens and cover at least one existing access area 200. The edge computing device 300 can be deployed as a local server, industrial control computer, embedded computing device, or edge node. Its software includes a video receiving program, a perspective calibration program, a single-column exposure zone determination module 310, a target detection and multi-target continuous association module 320, an anchor point event generation and trajectory correction module 330, a status summary and prompt generation module 340, and a data writing program that communicates with the knowledge graph storage device 400. The knowledge graph storage device 400 can be implemented using an attribute graph database, an RDF graph database, or a graph structure table in a relational database, as long as it can store nodes, relationships, attributes, and video segment indexes. The management output device 500 can be a local management output screen or a management output device that communicates with on-site prompting devices.
[0096] It should be noted that when installing the front-end camera device 100, its installation height can be up to the back height of the farmed individual. Doubled The installation angle when viewed from above can be [number] times. Degree to The installation angle from the upper side can be [degree], Degree to The resolution of the video frames output by the front-end camera device is no less than 100. The frame rate is no less than ten frames per second. The width of the existing passage area 200 in the video frame is no less than... Each pixel, the length of the single-column exposed strip 210 in the passing direction is not less than [number] pixels. Each pixel. If the above conditions are not met, the edge computing device 300 marks the existing passage area 200 corresponding to the front-end camera device 100 as not participating in the registration of the single-column exposure strip 210, and outputs the segment to be reviewed.
[0097] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A dynamic assessment system for livestock and poultry health based on visual individual tracking and knowledge graph fusion, comprising a front-end camera device, an edge computing device, a knowledge graph storage device, and a management output device, wherein the edge computing device is communicatively connected to the front-end camera device, the knowledge graph storage device, and the management output device, characterized in that: The edge computing device is used to perform perspective calibration on the video of the group breeding pen. Based on the net width of the passage, the width of the individual and the length of the visible road segment, a single-column exposure zone is determined in the existing passage area. The single-column exposure zone is a section that allows a single breeding individual to pass through, restricts two breeding individuals to pass side by side, and provides a continuous visible trajectory segment. The edge computing device is also used to perform target detection and multi-target continuous association on the aquaculture individuals. When the aquaculture individuals pass through the single-column exposure zone, a passage queue is established and an anchor point event is formed to represent the correspondence between the trajectory before entry and the trajectory after departure. When the regular matching result based on the target association of adjacent frames conflicts with the correspondence, the temporary trajectory number is corrected. The knowledge graph storage device is used to write the relationship between the corrected trajectory, the anchor point event, the observation record and the status result, and to set the observation record with conflicting identity relationship to a pending confirmation status. The edge computing device is used to read observation records that have no conflicting identity relationships and include gait deviation, body condition deviation and body surface abnormality to generate the current state value, and to generate a continuous state value based on the current state value and the previous continuous state value. The management output device is used to output continuous status values, prompt levels, and segments to be reviewed.
2. The livestock and poultry health dynamic assessment system based on visual individual tracking and knowledge graph fusion as described in claim 1, characterized in that, The existing passage area is defined by a fixed fence, wall, edge of a material trough, or doorway. The edge computing device registers the site coordinate boundaries and image interest area of the single-column exposed strip in the video map.
3. The livestock and poultry health dynamic assessment system based on visual individual tracking and knowledge graph fusion as described in claim 1, characterized in that, The edge computing device is used to obtain the net width of the passage and the length of the visible road segment in the image after perspective calibration, and to obtain the body width of the individual from the image of the complete outline of the individual in the same breeding batch. It generates a single-column exposure value to characterize the existing passage area, restrict side-by-side walking, and provide a continuous visible distance. Based on the single-column exposure value, it filters the single-column exposure zone from the candidate existing passage area, and updates the single-column exposure zone when any of the following changes: camera position, pen boundary, or breeding batch size.
4. The livestock and poultry health dynamic assessment system based on visual individual tracking and knowledge graph fusion as described in claim 1, characterized in that, The edge computing device is used to perform regular matching in a normal activity area outside the single-column exposed strip according to positional distance, bounding box overlap, appearance similarity and movement direction. When a match is successful, the trajectory position and appearance summary are updated. The trajectory is retained if the duration of non-matching does not reach the trajectory retention time. When the duration of non-matching reaches the trajectory retention time, the trajectory is marked as pending recovery.
5. The livestock and poultry health dynamic assessment system based on visual individual tracking and knowledge graph fusion as described in claim 1, characterized in that, The queue is used to record the entry direction, entry time, complete outline, color texture, and movement direction of the cultured individuals entering the single-column exposure zone. Based on the complete outline, color texture, and movement direction, in-zone trajectory identification information is generated. The in-zone trajectory identification information is used to establish the correspondence between the trajectory before entry and the trajectory after departure, and to bind the temporary trajectory number before entry to the temporary trajectory number in the zone.
6. The livestock and poultry health dynamic assessment system based on visual individual tracking and knowledge graph fusion according to claim 1, characterized in that, The anchor point event includes the pre-entry trajectory, in-band trajectory, post-departure trajectory, pre-correction temporary trajectory number, post-correction temporary trajectory number, entry time, departure time, and video segment index. The video segment index is used to trace the correction basis of the anchor point event. When a reverse fold or incomplete outline occurs within the single column of the exposed band, the edge computing device does not generate the anchor point event.
7. The livestock and poultry health dynamic assessment system based on visual individual tracking and knowledge graph fusion as described in claim 1, characterized in that, The edge computing device is used to extract the contour, limb key points, and torso region of the associated aquaculture individual trajectory, and generates an observation record when the individual contour is complete, the movement direction is identifiable, and the image is clear. The observation record includes the aquaculture individual number, temporary trajectory number, acquisition time, camera device number, column coordinates, observation category, quantification result, trajectory source marker, and video clip index. The quantification result includes at least one of gait deviation, body condition deviation, and body surface abnormality. The camera device number, column coordinates, and video clip index are used to connect the observation record to the camera device node and column node, and when the trajectory source marker indicates that the observation record has been confirmed by an anchor point event, the observation record is associated with the corresponding anchor point event node.
8. The livestock and poultry health dynamic assessment system based on visual individual tracking and knowledge graph fusion according to claim 1, characterized in that, The knowledge graph storage device is used to establish nodes for aquaculture individuals, fields, cameras, time periods, trajectories, anchor events, observation records, and status results. It also establishes relationships between being located, collected by the device, belonging to an individual, occurring within a time period, entering a single-column exposure zone, leaving a single-column exposure zone, correcting a trajectory, having observation results, and generating status results. The relationship between "located in", "collected by device" and "occurred in time period" is used to locate the column, camera device and time period when tracing back the status results. The relationship between "entering the single column display strip", "leaving the single column display strip" and "correction trajectory" is used to trace the correction basis of the anchor point event. The relationship for generating status results is the relationship from the observation record node to the status result node.
9. The livestock and poultry health dynamic assessment system based on visual individual tracking and knowledge graph fusion according to claim 1, characterized in that, The knowledge graph storage device is used to check whether a breeding individual is connected to two discontinuous trajectories within the same time period, and whether a trajectory is connected to two breeding individuals at the same time. When any identity relationship conflict occurs, the relevant observation record is set to a pending confirmation state, so that the relevant observation record is not included in the individual status summary before manual review.
10. The livestock and poultry health dynamic assessment system based on visual individual tracking and knowledge graph fusion according to claim 1, characterized in that, The edge computing device is used to read gait deviation, body condition deviation, and body surface abnormality values that are not conflicting in identity relationships from the knowledge graph storage device, generate the current state value according to the pre-given gait ratio, body condition ratio, and body surface ratio, and generate the continuous state value based on the current state value and the previous continuous state value; when the continuous state value reaches the attention line but does not reach the warning line, a prompt level containing attention prompts is generated; when the continuous state value reaches the warning line, a prompt level containing warning prompts is generated.
