Real-time pig grading system, method, program product, storage medium, and electronic equipment based on data collaboration.

The real-time pig grading system, based on a multi-source data collaborative architecture, solves the problem of traditional pig grading relying on human experience, and realizes real-time, multi-dimensional and automated management of pig grading, improving the accuracy and efficiency of grading.

CN123100526APending Publication Date: 2026-11-17BEIJING FOCUSED LOONG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611489324.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-23
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Traditional pig grading relies on human experience and lacks unified standards, leading to inconsistent and inefficient management decisions. It is also difficult to integrate heterogeneous data from multiple sources, resulting in poor real-time performance and hindering the real-time grading and dynamic management of pigs.

Method used

The system adopts an architecture consisting of a multi-source data acquisition layer, an edge processing layer, a cloud collaboration layer, and a decision execution layer. The inspection robot synchronously collects multi-source data, the edge processing layer performs data cleaning and model inference, the cloud collaboration layer performs model iteration and command issuance, and the decision execution layer enables real-time management.

Benefits of technology

It achieves objectivity, real-time performance, and multidimensionality in pig grading, reduces human subjective error and network bandwidth pressure, and improves grading accuracy and management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123100526A_ABST
    Figure CN123100526A_ABST
Patent Text Reader

Abstract

This invention discloses a real-time pig grading system, method, program product, storage medium, and electronic device based on data collaboration. Belonging to the field of intelligent farming and livestock big data processing technology, it is used for real-time pig grading. The system includes a multi-source data acquisition layer that collects multi-source pig data; an edge processing layer that performs spatiotemporal alignment, cleaning and calibration, feature extraction, and model inference, outputting sub-scores for body condition, growth, health, and environment, which are then fused into a comprehensive grade and confidence level; a cloud collaboration layer that performs model iteration and OTA (Over-The-Air) updates; and a decision execution layer that executes feeding, grouping, health warnings, and environmental control actions. This invention achieves standardized, real-time, multi-dimensional, and closed-loop control of pig grading through non-contact data collection by a roof-mounted robot and real-time collaborative edge-based grading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention discloses a real-time pig grading system, method, program product, storage medium, and electronic device based on data collaboration, belonging to the field of intelligent breeding and livestock big data processing technology. Background Technology

[0002] Traditional pig grading relies primarily on the experience and visual inspection of breeders or technicians, supplemented by manual weighing and backfat measurement. This method is highly subjective, lacks standardized criteria, and suffers from significant differences in judgment standards among different personnel. The same pig may be classified into different grades by different people, leading to inconsistent management decisions. Furthermore, it is inefficient and lacks comprehensive coverage, making it difficult to achieve high-frequency grading updates for all pigs on the farm. Most pig farms can only conduct one-time assessments at key points such as group transfers, sales, or breeding, leaving intermediate grading changes in a blind spot for monitoring.

[0003] While modern pig farms have introduced equipment such as automated feeding stations, electronic ear tags, weighbridges, environmental sensors, and inspection robots, the data formats, collection frequencies, and semantic definitions of these systems are incompatible. They lack a unified spatiotemporal alignment and collaborative fusion mechanism, resulting in fragmented data on body condition, health, feed intake, and behavior, making it impossible to form a comprehensive basis for grading. Current grading methods mostly rely on offline batch processing, involving centralized export of collected data, manual aggregation, and re-analysis, leading to delays of several hours or even days. Furthermore, they often depend on single indicators such as weight or backfat, neglecting crucial collaborative information such as feed intake behavior, activity level, body temperature, and respiratory rate, making it difficult to meet the dynamic management needs of real-time feeding adjustments and immediate early warning grouping. Therefore, there is an urgent need for an automated pig grading solution that can aggregate multi-source heterogeneous pig data in real time, perform collaborative fusion and online inference at the edge, and directly drive breeding management decisions with the grading results. Summary of the Invention

[0004] The purpose of this invention is to provide a real-time pig grading system, method, program product, storage medium, and electronic device based on data collaboration; This invention provides a real-time pig grading system based on data collaboration to solve the problems in the prior art, such as the difficulty in collaboratively collecting and uniformly aligning multi-source heterogeneous pig data, the reliance on human experience for grading and poor real-time performance, and the inability of the grading results to automatically drive feeding and grouping execution terminals. The real-time pig grading system based on data collaboration includes: a multi-source data acquisition layer, an edge processing layer, a cloud collaboration layer, and a decision execution layer; The multi-source data acquisition layer includes an inspection robot, an RGB-D depth camera, an infrared thermal imager, a high-definition visible light camera, environmental sensors, a smart feeder, and electronic ear tags. The RGB-D depth camera, infrared thermal imager, high-definition visible light camera, and environmental sensors are mounted on the inspection robot, while the smart feeder and electronic ear tags are connected to the edge processing layer via an IoT interface. The multi-source data acquisition layer collects multi-source data and outputs the collected multi-source data to the edge processing layer. The edge processing layer includes an AI computing box, which is connected to the multi-source data acquisition layer to receive multi-source data. It performs time stamp and spatial coordinate alignment, data cleaning and calibration, feature extraction, lightweight model inference, level fusion judgment and confidence assessment on the multi-source data, and outputs the level results and confidence to the cloud collaboration layer and decision execution layer. The cloud collaboration layer includes a cloud collaboration server and a business middleware platform. The cloud collaboration server is connected to the AI ​​computing box via 5G or local area network, receives the level results and confidence level, performs full data storage, model training iteration, OTA delivery, level trend analysis and cross-field model generalization optimization, and delivers OTA upgrade packages to the AI ​​computing box and management instructions to the decision execution layer. The decision-making and execution layer includes feeding execution terminals, environmental control execution terminals, group control terminals, health early warning terminals, and a management platform. The management platform is connected to a cloud-based collaborative server, receives management instructions, and determines the feed quantity, group destination, and health screening work order based on the grade results. The feeding execution terminals, environmental control execution terminals, group control terminals, and health early warning terminals are each connected to the management platform, receive execution instructions output by the management platform, and execute corresponding actions.

[0005] The inspection robot is deployed on a flexible rope track or rigid rail on the roof of the gestation or fattening house; The inspection robot includes a track and walking mechanism, a drive mechanism, a suspension mechanism, a power supply, a sensor group, an AI computing box, a communication module, and an RFID reading module; The track and walking mechanism are connected to the flexible rope track or rigid rail and move along the track; the drive mechanism is connected to the walking mechanism and drives the walking mechanism to move along the track; the suspension mechanism is connected to the underside of the walking mechanism and the sensor group is mounted on the suspension mechanism; the power supply is connected to the drive mechanism, sensor group, AI computing box, communication module and RFID reading module respectively to power each component. The sensor suite includes an RGB-D depth camera, an infrared thermal imager, a high-definition visible light camera, and an environmental sensor; The AI ​​computing box is connected to the sensor group, RFID reading module and communication module respectively. It receives the depth point cloud, RGB image, infrared heat map, video and environmental parameters output by the sensor group, receives the pen number, pig individual ID and spatial coordinates output by the RFID reading module, and outputs the level result and confidence level to the communication module. The communication module connects to the cloud collaboration server via 5G or a local area network, and uploads the rating results and confidence levels to the cloud collaboration server. RFID tags are deployed on the track. The RFID tags store the stall number, the individual pig ID, and the spatial coordinates. The RFID reading module reads the RFID tags. The inspection robot moves along the ceiling track. The sensor group is connected to the AI ​​computing box, which is connected to the communication module and uploads data to the cloud. The cloud collaboration server is connected to the management platform, which is connected to the feeding execution terminal, environmental control execution terminal, group control terminal, and health early warning terminal.

[0006] This invention provides a real-time pig grade determination method based on data collaboration to solve the problems in the prior art, such as inconsistent multi-source data formats, semantic incompatibility, single determination dimension, offline batch processing lag, insufficient model generalization ability, and disconnect between determination and execution. A real-time pig grading method based on data collaboration, using a real-time pig grading system based on data collaboration, is characterized by including: S1. Control the roof inspection robot to cruise to the target pen, determine the individual pig ID and pen ID, and trigger multi-source synchronous data collection; collect multi-source data, including depth point cloud, RGB image, infrared heat map, video, environmental parameters, feed intake, feed residue rate and timestamp; the AI ​​computing box aligns the timestamp and spatial coordinates of the multi-source data and generates collaborative data tuples with individual ID as the association key; S2. Perform image cleaning on the collaborative data tuples; input the cleaned depth point cloud, RGB image, infrared heat map and video into the weight inference network, body shape classification network, body temperature extraction network and respiration and activity network respectively to obtain weight estimate, body shape category, body surface temperature, respiratory rate and activity. S3. Obtain the calibrated weight by passing the estimated weight value through a preset calibration model. Combine the calibrated weight, body type, body surface temperature, respiratory rate, activity level, feed intake, feed residue rate, and environmental parameters to calculate the body condition sub-score, growth sub-score, health sub-score, and environmental sub-score. Combine the sub-scores according to preset weights to obtain the comprehensive grade and calculate the confidence level. S4. Upload the overall level and confidence level to the cloud to generate feeding adjustment amount, grouping target, health intervention work order and / or environmental control action instructions, which are executed by the execution terminal and feedback is provided; the cloud iterates the model and sends it to the AI ​​computing box via OTA.

[0007] S2 includes, S2.1, the image cleaning includes using the Brown-Conrady distortion correction model for distortion removal, using NL-Means nonlocal mean denoising, using CLAHE limited contrast adaptive histogram equalization for illumination equalization, and masking or repairing areas covered by feces and dirt; S2 outputs image quality labels. S2.2 The weight inference network is an improved PointNet++ network, which includes multiple Set Abstraction modules and multiple Feature Propagation modules. Each Set Abstraction module includes a sampling layer, a grouping layer and a PointNet layer. The weight inference network receives the depth point cloud of pigs and outputs the weight estimate. The body shape classification network is a ResNet-CBAM network, which includes a residual backbone network, a channel attention module, and a spatial attention module. The body shape classification network receives RGB images and outputs the probability distribution of being thin, moderate, and fat. The body temperature extraction network is a U-Net++ network, including an encoder, a decoder and nested dense jump connections. The body temperature extraction network receives infrared thermal images and outputs an ear root region segmentation mask and body surface temperature. The breathing and activity network is a FlowNet-BiLSTM network, which includes an optical flow estimation module and a bidirectional LSTM timing module. The breathing and activity network receives continuous video frames and outputs breathing waveforms, breathing frequency, and activity levels.

[0008] S2 includes, S3 includes, S3.1, establishing a linear calibration model based on historical measured backfat and weight data: ; In the formula, This is an estimate of the pig's weight. For calibrated weight, It was obtained by least-squares fitting of historical measured backfat and body weight data; S3 includes, in S3.2, the health sub-score, which includes calculating the abnormality of body temperature, respiratory rate, feed retention rate, and activity level, respectively. ; Then, calculate the health score according to the weights: ; In the formula, The weights of each synergistic factor, To preset the full score, Set the upper limit for anomaly; When the body condition sub-score is normal but the body temperature is continuously higher than the preset body temperature threshold, the respiratory rate is higher than the preset respiratory threshold, and the uneaten feed increases, the health sub-score is reduced and a sub-healthy or weak level is output.

[0009] S2 includes, S3 includes, S3.3, the comprehensive level is calculated by the following formula: ; In the formula, Assess body condition sub-scores. Score the long-term child. For health sub-scores, For environmental sub-scores, The preset weights are used; the confidence level is calculated using the following formula: ; In the formula, Image quality labeling, The system outputs a weighted average confidence score for each model, which is a weight inference network, a body shape classification network, a body temperature extraction network, and a respiration and activity level network. To maintain historical consistency, Preset weights; when When the data is below the preset confidence threshold, it is marked as pending review, and the ceiling inspection robot is triggered to prioritize re-collecting the data in the next inspection cycle. The body condition sub-score corresponds to multiple body condition levels, which are divided according to preset backfat threshold, preset BCS threshold, and preset body shape index threshold. The growth sub-score corresponds to multiple growth levels, and the growth levels are divided according to a preset daily weight gain threshold and a preset feed conversion ratio threshold. The health sub-score corresponds to multiple health levels, and the health levels are divided according to a preset health score range.

[0010] S4 includes, S4.1, the feeding adjustment amount includes the feeding adjustment amount that is adjusted upwards or downwards according to the body condition level of being underweight or overweight; The grouping objectives include column positions or elimination markers for individuals with persistently slow growth or high-risk health status. The health intervention work order includes the time for manual screening or isolation instructions for medium- and high-risk health levels; The environmental control action commands include the actions of the environmental control equipment when the environment is abnormal. The execution terminal is connected to the AI ​​computing box or cloud collaboration server via an Internet of Things protocol; S4.2 The cloud-based iterative model includes: receiving structured level results, anomaly markers, and execution status in the cloud, while retaining the original data at the edge and uploading it by sampling as needed; The cloud uses the structured grading results, anomaly markers, execution status, and manually reviewed data as training samples to update the weight parameters of some or all of the networks in the weight inference network, body shape classification network, body temperature extraction network, and respiration and activity network, thus obtaining the updated model, which is then distributed to the AI ​​computing box via OTA.

[0011] This invention provides a program product to solve the problems in the prior art where the real-time pig grade determination method is difficult to encapsulate programmatically and difficult to quickly deploy and execute on edge AI computing boxes and cloud collaborative servers; A program product for enabling a processor to execute a data-coordinated real-time pig grading method.

[0012] This invention provides a storage medium to solve the problems in the existing technology of real-time pig grade determination methods, which are difficult to persist, distribute in batches, manage in versions, and call repeatedly. A storage medium storing a computer program, the computer program being executed by a processor, for a real-time pig grading method based on data collaboration.

[0013] This invention provides an electronic device to solve the problems in the prior art, which make it difficult to complete multi-source data collaborative fusion reasoning and to balance low-latency judgment and cloud model iteration under limited edge computing resources; An electronic device includes a processor and a memory communicatively connected to the processor; the memory stores instructions that are executed by the processor to cause the processor to perform a data-coordinated real-time pig grading method.

[0014] Compared with existing technologies, the present invention has the following beneficial effects: The system of the present invention achieves non-contact collaborative collection of pig body shape, physiology, behavior, feeding and environmental data through a four-layer architecture of multi-source data acquisition layer, edge processing layer, cloud collaboration layer and decision execution layer. At the edge, spatiotemporal alignment, cleaning and calibration, feature extraction, model inference, grade fusion and confidence assessment are completed, and after cloud iteration and OTA distribution, the data is finally linked to the execution of feeding, environmental control, grouping and health early warning terminals, thereby improving the objectivity, real-time, multidimensionality and automation closed-loop level of pig grade determination, and reducing human subjective error and network bandwidth pressure.

[0015] The method of this invention uses a roof inspection robot to simultaneously collect depth point cloud, RGB image, infrared thermal image, video, environmental parameters, feed intake and feed residue rate. An AI computing box aligns the timestamps and spatial coordinates to generate collaborative data tuples with individual IDs as the association key. After image cleaning, weight calibration, multi-network inference, sub-score fusion and confidence assessment, the method outputs body condition, growth, health, environment and comprehensive grade, and uploads it to the cloud to generate management instructions. This achieves standardization, real-time, multi-dimensional and closed-loop control of pig grade determination, significantly improving the accuracy, consistency and efficiency of breeding management.

[0016] The program product of this invention enables the processor to execute the real-time pig grade determination method. It encapsulates the steps of multi-source data alignment, image cleaning, model inference, grade fusion, confidence assessment, cloud iteration and OTA delivery into an executable program, which is convenient for deployment, upgrading and reuse on existing edge computing devices and cloud servers, reduces system implementation and maintenance costs, and improves the scalability and operational stability of the method.

[0017] The present invention stores a computer program in its storage medium. When the program is executed by a processor, it implements the real-time pig grade determination method, enabling the method to be solidified, copied, and distributed in software form. This facilitates unified deployment and updates across multiple pig farms, multiple edge AI computing boxes, and cloud servers, ensuring consistency and traceability of the determination logic and reducing the cost of repetitive development.

[0018] The electronic device of this invention includes a processor and a memory. The memory stores instructions that are executed by the processor, enabling the processor to execute the real-time pig grading method. By combining real-time inference of a lightweight edge model with cloud-based collaborative iteration, it achieves multi-source data fusion, grading, and confidence assessment under limited computing power, reducing the bandwidth pressure of uploading raw data, improving response speed, and supporting linkage with feeding, grouping, health warning, and environmental control terminals to form an automated closed loop of "perception-judgment-decision-execution". Attached Figure Description

[0019] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention are described clearly and completely below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0021] The real-time pig grading system based on data collaboration includes: a multi-source data acquisition layer, an edge processing layer, a cloud collaboration layer, and a decision execution layer; The multi-source data acquisition layer includes an inspection robot, an RGB-D depth camera, an infrared thermal imager, a high-definition visible light camera, environmental sensors, a smart feeder, and electronic ear tags. The RGB-D depth camera, infrared thermal imager, high-definition visible light camera, and environmental sensors are mounted on the inspection robot, while the smart feeder and electronic ear tags are connected to the edge processing layer via an IoT interface. The multi-source data acquisition layer collects multi-source data and outputs the collected multi-source data to the edge processing layer. The edge processing layer includes an AI computing box, which is connected to the multi-source data acquisition layer to receive multi-source data. It performs time stamp and spatial coordinate alignment, data cleaning and calibration, feature extraction, lightweight model inference, level fusion judgment and confidence assessment on the multi-source data, and outputs the level results and confidence to the cloud collaboration layer and decision execution layer. The cloud collaboration layer includes a cloud collaboration server and a business middleware platform. The cloud collaboration server is connected to the AI ​​computing box via 5G or local area network, receives the level results and confidence level, performs full data storage, model training iteration, OTA delivery, level trend analysis and cross-field model generalization optimization, and delivers OTA upgrade packages to the AI ​​computing box and management instructions to the decision execution layer. The decision-making and execution layer includes feeding execution terminals, environmental control execution terminals, group control terminals, health early warning terminals, and a management platform. The management platform is connected to a cloud-based collaborative server, receives management instructions, and determines the feed quantity, group destination, and health screening work order based on the grade results. The feeding execution terminals, environmental control execution terminals, group control terminals, and health early warning terminals are each connected to the management platform, receive execution instructions output by the management platform, and execute corresponding actions.

[0022] The inspection robot is deployed on a flexible rope track or rigid rail on the roof of the gestation or fattening house; The inspection robot includes a track and walking mechanism, a drive mechanism, a suspension mechanism, a power supply, a sensor group, an AI computing box, a communication module, and an RFID reading module; The track and walking mechanism are connected to the flexible rope track or rigid rail and move along the track; the drive mechanism is connected to the walking mechanism and drives the walking mechanism to move along the track; the suspension mechanism is connected to the underside of the walking mechanism and the sensor group is mounted on the suspension mechanism; the power supply is connected to the drive mechanism, sensor group, AI computing box, communication module and RFID reading module respectively to power each component. The sensor suite includes an RGB-D depth camera, an infrared thermal imager, a high-definition visible light camera, and an environmental sensor; The AI ​​computing box is connected to the sensor group, RFID reading module and communication module respectively. It receives the depth point cloud, RGB image, infrared heat map, video and environmental parameters output by the sensor group, receives the pen number, pig individual ID and spatial coordinates output by the RFID reading module, and outputs the level result and confidence level to the communication module. The communication module connects to the cloud collaboration server via 5G or a local area network, and uploads the rating results and confidence levels to the cloud collaboration server. RFID tags are deployed on the track. The RFID tags store the stall number, the individual pig ID, and the spatial coordinates. The RFID reading module reads the RFID tags. The inspection robot moves along the ceiling track. The sensor group is connected to the AI ​​computing box, which is connected to the communication module and uploads data to the cloud. The cloud collaboration server is connected to the management platform, which is connected to the feeding execution terminal, environmental control execution terminal, group control terminal, and health early warning terminal.

[0023] A real-time pig grading method based on data collaboration, using a real-time pig grading system based on data collaboration, including: S1. Control the roof inspection robot to cruise to the target pen, determine the individual pig ID and pen ID, and trigger multi-source synchronous data collection; collect multi-source data, including depth point cloud, RGB image, infrared heat map, video, environmental parameters, feed intake, feed residue rate and timestamp; the AI ​​computing box aligns the timestamp and spatial coordinates of the multi-source data and generates collaborative data tuples with individual ID as the association key; S2. Perform image cleaning on the collaborative data tuples; input the cleaned depth point cloud, RGB image, infrared heat map and video into the weight inference network, body shape classification network, body temperature extraction network and respiration and activity network respectively to obtain weight estimate, body shape category, body surface temperature, respiratory rate and activity. S3. Obtain the calibrated weight by passing the estimated weight value through a preset calibration model. Combine the calibrated weight, body type, body surface temperature, respiratory rate, activity level, feed intake, feed residue rate, and environmental parameters to calculate the body condition sub-score, growth sub-score, health sub-score, and environmental sub-score. Combine the sub-scores according to preset weights to obtain the comprehensive grade and calculate the confidence level. S4. Upload the overall level and confidence level to the cloud to generate feeding adjustment amount, grouping target, health intervention work order and / or environmental control action instructions, which are executed by the execution terminal and feedback is provided; the cloud iterates the model and sends it to the AI ​​computing box via OTA.

[0024] S2 includes, S2.1, the image cleaning includes using the Brown-Conrady distortion correction model for distortion removal, using NL-Means nonlocal mean denoising, using CLAHE limited contrast adaptive histogram equalization for illumination equalization, and masking or repairing areas covered by feces and dirt; S2 outputs image quality labels. S2.2 The weight inference network is an improved PointNet++ network, which includes multiple Set Abstraction modules and multiple Feature Propagation modules. Each Set Abstraction module includes a sampling layer, a grouping layer and a PointNet layer. The weight inference network receives the depth point cloud of pigs and outputs the weight estimate. The body shape classification network is a ResNet-CBAM network, which includes a residual backbone network, a channel attention module, and a spatial attention module. The body shape classification network receives RGB images and outputs the probability distribution of being thin, moderate, and fat. The body temperature extraction network is a U-Net++ network, including an encoder, a decoder and nested dense jump connections. The body temperature extraction network receives infrared thermal images and outputs an ear root region segmentation mask and body surface temperature. The breathing and activity network is a FlowNet-BiLSTM network, which includes an optical flow estimation module and a bidirectional LSTM timing module. The breathing and activity network receives continuous video frames and outputs breathing waveforms, breathing frequency, and activity levels.

[0025] S2 includes, S3 includes, S3.1, establishing a linear calibration model based on historical measured backfat and weight data: ; In the formula, This is an estimate of the pig's weight. For calibrated weight, It was obtained by least-squares fitting of historical measured backfat and body weight data; S3 includes, in S3.2, the health sub-score, which includes calculating the abnormality of body temperature, respiratory rate, feed retention rate, and activity level, respectively. ; Then, calculate the health score according to the weights: ; In the formula, The weights of each synergistic factor, To preset the full score, Set the upper limit for anomaly; When the body condition sub-score is normal but the body temperature is continuously higher than the preset body temperature threshold, the respiratory rate is higher than the preset respiratory threshold, and the uneaten feed increases, the health sub-score is reduced and a sub-healthy or weak level is output.

[0026] S2 includes, S3 includes, S3.3, the comprehensive level is calculated by the following formula: ; In the formula, Assess body condition sub-scores. Score the long-term child. For health sub-scores, For environmental sub-scores, The preset weights are used; the confidence level is calculated using the following formula: ; In the formula, Image quality labeling, The system outputs a weighted average confidence score for each model, which is a weight inference network, a body shape classification network, a body temperature extraction network, and a respiration and activity level network. To maintain historical consistency, Preset weights; when When the data is below the preset confidence threshold, it is marked as pending review, and the ceiling inspection robot is triggered to prioritize re-collecting the data in the next inspection cycle. The body condition sub-score corresponds to multiple body condition levels, which are divided according to preset backfat threshold, preset BCS threshold, and preset body shape index threshold. The growth sub-score corresponds to multiple growth levels, and the growth levels are divided according to a preset daily weight gain threshold and a preset feed conversion ratio threshold. The health sub-score corresponds to multiple health levels, and the health levels are divided according to a preset health score range.

[0027] S4 includes, S4.1, the feeding adjustment amount includes the feeding adjustment amount that is adjusted upwards or downwards according to the body condition level of being underweight or overweight; The grouping objectives include column positions or elimination markers for individuals with persistently slow growth or high-risk health status. The health intervention work order includes the time for manual screening or isolation instructions for medium- and high-risk health levels; The environmental control action commands include the actions of the environmental control equipment when the environment is abnormal. The execution terminal is connected to the AI ​​computing box or cloud collaboration server via an Internet of Things protocol; S4.2 The cloud-based iterative model includes: receiving structured level results, anomaly markers, and execution status in the cloud, while retaining the original data at the edge and uploading it by sampling as needed; The cloud uses the structured grading results, anomaly markers, execution status, and manually reviewed data as training samples to update the weight parameters of some or all of the networks in the weight inference network, body shape classification network, body temperature extraction network, and respiration and activity network, thus obtaining the updated model, which is then distributed to the AI ​​computing box via OTA.

[0028] A program product for enabling a processor to execute a data-coordinated real-time pig grading method.

[0029] A storage medium storing a computer program, the computer program being executed by a processor, for a real-time pig grading method based on data collaboration.

[0030] An electronic device includes a processor and a memory communicatively connected to the processor; the memory stores instructions that are executed by the processor to cause the processor to perform a data-coordinated real-time pig grading method.

[0031] This invention acquires visual body posture data, physiological behavior data, and operational and environmental data through a multi-dimensional data acquisition layer, including the simultaneous acquisition of depth and color images of pigs using an RGB-D camera. Depth point clouds are used for weight inference, and color images are used for body shape classification. Infrared thermal imaging is used to obtain body surface temperature, and micro-motion video analysis is used to extract respiratory rate, combined with optical flow to identify activity level / recumbent posture. A feed line system is linked to acquire daily feed intake / leftover feed data; electronic ear tags or visual recognition results are read to bind individual / pen IDs, parity, and gestational age; and environmental parameters such as indoor temperature, humidity, and ammonia concentration are simultaneously collected.

[0032] The following description, in conjunction with the accompanying drawings and embodiments, provides further details. The flow of the method of the present invention is as follows: Figure 1 As shown, the process begins with multi-source data acquisition: a roof inspection robot collects depth point clouds, RGB images, infrared thermal images, videos, environmental parameters, feed intake, feed residue rate, and timestamps. Then, spatiotemporal alignment is performed by an AI computing box, aligning timestamps with spatial coordinates, binding individual pig IDs to pen IDs, and generating collaborative data tuples. Next, image cleaning and model inference are performed, including distortion removal, noise reduction, and illumination equalization, along with network inference for weight, body shape, body temperature, respiration, and activity levels. Then, a grading fusion process is implemented, including weight calibration, fusing sub-scores for body condition, growth, health, and environment to obtain a comprehensive grade and confidence level. Afterward, decision-making and execution are performed: data is uploaded to the cloud, generating feeding, grouping, health, and environmental control commands, which are executed by the terminal and feedback is provided. Cloud iteration follows, with the model updated in the cloud and OTA updates sent to the AI ​​computing box. Finally, the process returns to multi-source acquisition, repeating the cycle.

[0033] Embodiment 1 of the present invention provides a real-time pig grade determination system based on data collaboration, including a multi-source data acquisition layer, an edge processing layer, a cloud collaboration layer, and a decision execution layer.

[0034] The multi-source data acquisition layer includes a ceiling inspection robot, an RGB-D depth camera, an infrared thermal imager, a high-definition visible light camera, environmental sensors, a smart feeder, and electronic ear tags. The inspection robot moves along a flexible rope track or rigid rail on the ceiling of the gestation or fattening shed. The RGB-D camera, infrared thermal imager, visible light camera, and environmental sensors are mounted on the robot's three-axis gimbal. The smart feeder and electronic ear tags are connected to the edge processing layer via an IoT interface.

[0035] The edge processing layer is an AI computing box, which is connected to the sensor group, RFID reading module and communication module respectively. It receives deep point cloud, RGB image, infrared thermal image, video, environmental parameters, feed intake, feed residue rate and timestamp, and performs spatiotemporal alignment, cleaning calibration, feature extraction, model inference, level fusion and confidence assessment, and outputs level results and confidence.

[0036] The cloud collaboration layer includes a cloud collaboration server and a business middleware platform. It connects to the AI ​​computing box via 5G or LAN, receives grade results and confidence levels, and performs full data storage, model iteration, OTA deployment, and trend analysis.

[0037] The decision-making and execution layer includes feeding execution terminals, environmental control execution terminals, group control terminals, health early warning terminals, and a management platform. The management platform connects to a cloud-based collaborative server, receives management instructions, determines feed dispensing volume, group destination, and health screening work orders; each execution terminal connects to the management platform and executes corresponding actions.

[0038] Embodiment 2 of the present invention takes the deployment in a pregnant sow house as an example to explain in detail the real-time pig level determination method based on data collaboration, and gives the specific values ​​of each preset threshold and weight.

[0039] A corrosion-resistant, flexible steel wire rope track was installed above the gestation pen for pregnant sows, and a "Guardian" inspection robot was deployed. The robot integrates a coaxial RGB-D depth camera, an infrared thermal imager, a high-definition visible light camera, and environmental sensors, and is equipped with adaptive supplemental lighting and fly-proof heating devices. RFID tags were placed on the track to store the pen number, individual pig ID, and spatial coordinates.

[0040] The robot glides along a strategy of full patrol and secondary patrol of key pens every 2 hours. Upon reaching the target pen, it hovers or moves at low speed, using RFID and visual recognition to determine the individual pig ID and pen ID, triggering multi-source synchronous data collection. An RGB-D camera collects depth point clouds and RGB images, an infrared thermal imager collects infrared thermal images, a visible light camera collects micro-motion video, environmental sensors collect temperature, humidity, and ammonia concentration, and an intelligent feeder interface obtains daily feed intake and feed residue rate, while also recording timestamps.

[0041] The edge AI computing box aligns multi-source asynchronous data with timestamps and spatial coordinates, and maps and binds RFID pen IDs to individual pig IDs, generating collaborative data tuples with the individual IDs as the association keys. These collaborative data tuples include depth point clouds, RGB images, infrared thermal images, micro-motion videos, raw body surface temperature values, raw respiratory signals, raw activity / posture signals, daily feed intake, feed residue rate, temperature and humidity, ammonia levels, parity, and gestational age, all bound to the individual and pen IDs.

[0042] Image cleaning is performed on the deep point cloud, RGB image, infrared thermal image and micro-motion video in the collaborative data tuple: the Brown-Conrady distortion correction model is used to remove distortion, NL-Means nonlocal means is used for noise reduction, CLAHE contrast-limited adaptive histogram equalization is used for illumination equalization, areas covered by feces and dirt are masked out or repaired, and image quality labels are output.

[0043] The cleaned deep point cloud is input into an improved PointNet++ network, which includes multiple SetAbstraction modules and multiple Feature Propagation modules. Each SetAbstraction module includes a sampling layer, a grouping layer, and a PointNet layer, outputting a weight estimate. The cleaned RGB image is input into a ResNet-CBAM network, which includes a residual backbone network, a channel attention module, and a spatial attention module, outputting probability distributions for underweight, moderately overweight, and overweight individuals. The cleaned infrared thermal image is input into a U-Net++ network, which includes an encoder, a decoder, and nested dense skip connections, outputting an ear root region segmentation mask and body surface temperature. The cleaned micro-motion video is input into a FlowNet-BiLSTM network, which includes an optical flow estimation module and a bidirectional LSTM temporal module, outputting respiratory waveforms, respiratory rate, and activity / reclining posture.

[0044] The estimated weight is used to obtain the calibrated weight through a preset calibration model: ; in, This is an estimated weight value. This is the calibrated weight. In this embodiment, Take 0.96, The value of 3.5 was obtained by least-squares fitting of historical measured weight and corresponding AI-inferred weight data. The calibrated weight, body type, body surface temperature, respiratory rate, activity level, feed intake, feed residue rate, and environmental parameters were fused into a structured feature matrix, and sub-scores of body condition, growth, health, and environment were calculated.

[0045] Body condition sub-scores correspond to body condition levels 1-5. In this embodiment, body condition levels are classified based on backfat thickness, BCS, and body type index (TI): Lean is defined as backfat thickness <16mm, BCS ≤2.0, and TI <0.95; Moderate is defined as backfat thickness 16-22mm, BCS 2.5-3.5, and TI 0.95-1.10; Fat is defined as backfat thickness >22mm, BCS ≥4.0, and TI >1.10. Growth sub-scores correspond to fast growth, medium growth, and slow growth. In this embodiment, fast growth is defined as daily weight gain ≥850g / d and feed conversion ratio ≤2.5; medium growth is defined as daily weight gain 700-850g / d and feed conversion ratio 2.5-2.8; and slow growth is defined as daily weight gain <700g / d and feed conversion ratio >2.8. Health sub-scores correspond to healthy, sub-healthy, and weak. In this embodiment, healthy is defined as... Sub-health is Sick and weak .

[0046] The health sub-score is calculated as follows: Abnormalities in body temperature, respiratory rate, feed retention, and activity level are calculated separately. ; Then, calculate the health score according to the weights: ; In this embodiment, Take 100, Take 3. The values ​​are set as follows: body temperature 0.30, respiration 0.25, uneaten feed 0.20, activity level 0.15, and environment 0.10. When the body condition sub-score is normal but there are consecutive instances of body temperature exceeding a preset threshold, respiratory rate exceeding a preset threshold, and uneaten feed increasing, the health sub-score is reduced and a sub-healthy or infirm level is output. In this embodiment, the body temperature threshold is set to 39.5℃, the respiratory rate threshold is set to 35 breaths / min, and the uneaten feed increase threshold is set to an uneaten feed rate >10% or an increase of 20% from the baseline.

[0047] The overall rating is calculated using the following formula: ; in, Assess body condition sub-scores. Score the long-term child. For health sub-scores, The environment sub-score is determined. In this embodiment, Take 0.35, Take 0.30, Take 0.25, Set the value to 0.10. The confidence level is calculated using the following formula: ; in, Image quality labeling, Output a weighted average of the confidence scores for each model. To ensure consistency with historical levels, in this embodiment, Take 0.4, Take 0.4, The value is set to 0.2, and the preset reliability threshold is 0.75. When... When the value is below 0.75, it is marked as pending review, and the robot is triggered to prioritize re-collecting that column in the next inspection cycle.

[0048] The overall grade and confidence level are uploaded to the cloud to generate feeding adjustment amounts, grouping targets, health intervention work orders, and / or environmental control action instructions. Feeding adjustment amounts include adjustments made upward or downward based on the lean or obese body condition level; grouping targets include the placement or culling markers for individuals with persistently slow growth or high-risk health conditions; health intervention work orders include manual screening times or isolation instructions for individuals with medium to high-risk health conditions; and environmental control action instructions include actions taken by environmental control equipment in case of environmental anomalies. The execution terminal performs feeding, grouping, work order distribution, and / or environmental control actions, and outputs the execution status. The cloud receives structured grade results, anomaly markers, and execution status. Raw data is stored at the edge and sampled and uploaded as needed. The structured grade results, anomaly markers, execution status, and manually reviewed data are used as training samples to update the weight parameters of some or all of the networks in the weight inference network, body shape classification network, body temperature extraction network, and respiration and activity network, resulting in an updated model, which is then distributed to the AI ​​computing box via OTA.

[0049] Embodiment 3 of this invention provides a program product for enabling a processor to execute the real-time pig grading method based on data collaboration as described in the above method embodiments. This program product can be packaged as an application on an edge AI computing box or a service program on a cloud collaborative server, including a multi-source data alignment module, an image cleaning module, a model inference module, a grading fusion module, a confidence assessment module, a cloud iteration module, and an OTA (Over-The-Air) delivery module. After deployment, the AI ​​computing box can receive multi-source data collected by the inspection robot in real time, output the pig grading results and confidence scores, and upload them to the cloud to generate management instructions.

[0050] Embodiment 4 of the present invention provides a storage medium storing a computer program. When executed by a processor, this computer program implements the real-time pig grading method based on data collaboration as described in the above method embodiments. The storage medium can be located in an AI computing box, a cloud collaboration server, or a management platform to persistently save the grading logic, model weights, grading thresholds, and calibration parameters, supporting unified deployment, version management, and repeated calls among multiple pig farms and multiple edge devices.

[0051] Embodiment 5 of the present invention provides an electronic device, including a processor and a memory communicatively connected to the processor. The memory stores instructions that are executed by the processor. When the instructions are executed by the processor, the processor performs the real-time pig grading method based on data collaboration as described in the above method embodiments. The electronic device can be an AI computing box built into an inspection robot, a local edge server, or a cloud collaborative server. By combining real-time inference of a lightweight model at the edge with cloud collaborative iteration, it completes multi-source data fusion, grading, and confidence assessment under limited computing power. It also links with feeding, grouping, health warning, and environmental control terminals to form an automated closed loop of "perception-judgment-decision-execution".

[0052] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A real-time pig grading system based on data collaboration, characterized in that, include: Multi-source data acquisition layer, edge processing layer, cloud collaboration layer, and decision execution layer; The multi-source data acquisition layer includes an inspection robot, an RGB-D depth camera, an infrared thermal imager, a high-definition visible light camera, environmental sensors, a smart feeder, and electronic ear tags. The RGB-D depth camera, infrared thermal imager, high-definition visible light camera, and environmental sensors are mounted on the inspection robot, while the smart feeder and electronic ear tags are connected to the edge processing layer via an IoT interface. The multi-source data acquisition layer collects multi-source data and outputs the collected multi-source data to the edge processing layer. The edge processing layer includes an AI computing box, which is connected to the multi-source data acquisition layer to receive multi-source data. It performs time stamp and spatial coordinate alignment, data cleaning and calibration, feature extraction, lightweight model inference, level fusion judgment and confidence assessment on the multi-source data, and outputs the level results and confidence to the cloud collaboration layer and decision execution layer. The cloud collaboration layer includes a cloud collaboration server and a business middleware platform. The cloud collaboration server is connected to the AI ​​computing box via 5G or local area network, receives the level results and confidence level, performs full data storage, model training iteration, OTA delivery, level trend analysis and cross-field model generalization optimization, and delivers OTA upgrade packages to the AI ​​computing box and management instructions to the decision execution layer. The decision-making and execution layer includes feeding execution terminals, environmental control execution terminals, group control terminals, health early warning terminals, and a management platform. The management platform is connected to a cloud-based collaborative server, receives management instructions, and determines the feed quantity, group destination, and health screening work order based on the grade results. The feeding execution terminals, environmental control execution terminals, group control terminals, and health early warning terminals are each connected to the management platform, receive execution instructions output by the management platform, and execute corresponding actions.

2. The data collaboration based pig ranking real-time decision system according to claim 1, wherein, The inspection robot is deployed on a flexible rope track or rigid rail on the roof of the gestation or fattening house; The inspection robot includes a track and walking mechanism, a drive mechanism, a suspension mechanism, a power supply, a sensor group, an AI computing box, a communication module, and an RFID reading module; The track and walking mechanism are connected to the flexible rope track or rigid rail and move along the track; the drive mechanism is connected to the walking mechanism and drives the walking mechanism to move along the track; the suspension mechanism is connected to the underside of the walking mechanism and the sensor group is mounted on the suspension mechanism; the power supply is connected to the drive mechanism, sensor group, AI computing box, communication module and RFID reading module respectively to power each component. The sensor suite includes an RGB-D depth camera, an infrared thermal imager, a high-definition visible light camera, and an environmental sensor; The AI ​​computing box is connected to the sensor group, RFID reading module and communication module respectively. It receives the depth point cloud, RGB image, infrared heat map, video and environmental parameters output by the sensor group, receives the pen number, pig individual ID and spatial coordinates output by the RFID reading module, and outputs the level result and confidence level to the communication module. The communication module connects to the cloud collaboration server via 5G or a local area network, and uploads the rating results and confidence levels to the cloud collaboration server. RFID tags are deployed on the track. The RFID tags store the stall number, the individual pig ID, and the spatial coordinates. The RFID reading module reads the RFID tags. The inspection robot moves along the ceiling track. The sensor group is connected to the AI ​​computing box, which is connected to the communication module and uploads data to the cloud. The cloud-based collaborative server connects to the management platform, which in turn connects to the feeding execution terminal, environmental control execution terminal, group control terminal, and health early warning terminal.

3. A method for real-time determination of pig grade based on data collaboration, using the system for real-time determination of pig grade based on data collaboration according to claim 2, characterized in that, include: S1. Control the roof inspection robot to cruise to the target pen, determine the individual pig ID and pen ID, and trigger multi-source synchronous data collection. Collect multi-source data, including deep point clouds, RGB images, infrared thermal images, videos, environmental parameters, feed intake, feed waste rate, and timestamps; the AI ​​computing box aligns the timestamps and spatial coordinates of the multi-source data to generate collaborative data tuples with individual IDs as the association keys; S2. Perform image cleaning on the collaborative data tuples; input the cleaned depth point cloud, RGB image, infrared heat map and video into the weight inference network, body shape classification network, body temperature extraction network and respiration and activity network respectively to obtain weight estimate, body shape category, body surface temperature, respiratory rate and activity. S3. Obtain the calibrated weight by passing the estimated weight value through the preset calibration model. Then, integrate the calibrated weight, body type, body surface temperature, respiratory rate, activity level, feed intake, feed residue rate, and environmental parameters to calculate the body condition sub-score, growth sub-score, health sub-score, and environmental sub-score. The sub-scores are combined according to preset weights to obtain a comprehensive grade, and the confidence level is calculated. S4. Upload the overall level and confidence level to the cloud to generate feeding adjustment amount, grouping target, health intervention work order and / or environmental control action instructions, which are executed by the execution terminal and feedback is provided. The model is iterated in the cloud and delivered to the AI ​​computing box via OTA.

4. The data collaboration based pig ranking real-time decision method according to claim 3, characterized in that, S2 includes, S2.1, the image cleaning includes using the Brown-Conrady distortion correction model for distortion removal, using NL-Means nonlocal mean denoising, using CLAHE limited contrast adaptive histogram equalization for illumination equalization, and masking or repairing areas covered by feces and dirt; S2 outputs image quality labels. S2.2 The weight inference network is an improved PointNet++ network, which includes multiple Set Abstraction modules and multiple Feature Propagation modules. Each Set Abstraction module includes a sampling layer, a grouping layer and a PointNet layer. The weight inference network receives the depth point cloud of pigs and outputs the weight estimate. The body shape classification network is a ResNet-CBAM network, which includes a residual backbone network, a channel attention module, and a spatial attention module. The body shape classification network receives RGB images and outputs the probability distribution of being thin, moderate, and fat. The body temperature extraction network is a U-Net++ network, including an encoder, a decoder and nested dense jump connections. The body temperature extraction network receives infrared thermal images and outputs an ear root region segmentation mask and body surface temperature. The breathing and activity network is a FlowNet-BiLSTM network, which includes an optical flow estimation module and a bidirectional LSTM timing module. The breathing and activity network receives continuous video frames and outputs breathing waveforms, breathing frequency, and activity levels.

5. The method for real-time pig grade determination based on data collaboration according to claim 4, characterized in that, S2 includes, S3 includes, S3.1, establishing a linear calibration model based on historical measured backfat and weight data: ; In the formula, This is an estimate of the pig's weight. For calibrated weight, It was obtained by least-squares fitting of historical measured backfat and body weight data; S3 includes, in S3.2, the health sub-score, which includes calculating the abnormality of body temperature, respiratory rate, feed retention rate, and activity level, respectively. ; Then, calculate the health score according to the weights: ; In the formula, is the weight of each synergistic factor, is a preset full score value, is a preset upper limit of abnormality degree; When the body condition sub-score is normal but the body temperature is continuously higher than the preset body temperature threshold, the respiratory rate is higher than the preset respiratory threshold, and the uneaten feed increases, the health sub-score is reduced and a sub-healthy or weak level is output.

6. The data collaboration based pig ranking real-time decision method according to claim 5, wherein, S2 includes, S3 includes, S3.3, the comprehensive level is calculated by the following formula: ; In the formula, Assess body condition sub-scores. Score the long-term child. For health sub-scores, For environmental sub-scores, The preset weights are used; the confidence level is calculated using the following formula: ; In the formula, Image quality labeling, The system outputs a weighted average confidence score for each model, which is a weight inference network, a body shape classification network, a body temperature extraction network, and a respiration and activity level network. To maintain historical consistency, Preset weights; When If the confidence value is lower than the preset confidence threshold, the column is marked for review, and the ceiling inspection robot is triggered to preferentially supplement the column in the next inspection cycle. The body condition sub-score corresponds to multiple body condition levels, which are divided according to preset backfat threshold, preset BCS threshold, and preset body shape index threshold. The growth sub-score corresponds to multiple growth levels, and the growth levels are divided according to a preset daily weight gain threshold and a preset feed conversion ratio threshold. The health sub-score corresponds to multiple health levels, and the health levels are divided according to a preset health score range.

7. The data collaboration based pig ranking real-time decision method according to claim 6, wherein, S4 includes, S4.1, the feeding adjustment amount includes the feeding adjustment amount that is adjusted upwards or downwards according to the body condition level of being underweight or overweight; The grouping objectives include column positions or elimination markers for individuals with persistently slow growth or high-risk health status. The health intervention work order includes the time for manual screening or isolation instructions for medium- and high-risk health levels; The environmental control action commands include the actions of the environmental control equipment when the environment is abnormal. The execution terminal is connected to the AI ​​computing box or cloud collaborative server via an Internet of Things protocol; S4.2 The cloud-based iterative model includes: receiving structured level results, anomaly markers, and execution status in the cloud, while retaining the original data at the edge and uploading it by sampling as needed; The cloud uses the structured grading results, anomaly markers, execution status, and manually reviewed data as training samples to update the weight parameters of some or all of the networks in the weight inference network, body shape classification network, body temperature extraction network, and respiration and activity network, thus obtaining the updated model, which is then distributed to the AI ​​computing box via OTA.

8. A program product, characterized by The program product is used to enable the processor to execute the real-time pig grading method based on data collaboration as described in any one of claims 3 to 7.

9. A storage medium, characterized by The storage medium stores a computer program, which is executed by a processor as described in any one of claims 3 to 7: a real-time pig grading method based on data collaboration.

10. An electronic device, characterized in that, The electronic device includes a processor and a memory communicatively connected to the processor; the memory stores instructions that are executed by the processor to cause the processor to perform the data-coordinated real-time pig grading method as described in any one of claims 3 to 7.