A healthy intelligent identification system and method in a live pig slaughtering process

CN122842938APending Publication Date: 2026-09-29CHONGQING UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611012932.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-08
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0005]本发明的目的是提供了一种生猪屠宰过程中健康智能识别系统及方法,解决现有技术中存在的检验结果高度依赖人员经验与精力状态,不同人员、不同时段的识别标准易出现偏差,导致准确率不稳定,难以保证检验一致性;人工难以对每头生猪进行细致检查,易因操作速度滞后出现漏检情况,无法满足规模化屠宰的效率需求;健康问题与具体猪只的绑定缺乏精准数据支撑;无法在屠宰前实现风险预警与异常猪只分流,易造成资源浪费与安全隐患的问题

Benefits of technology

(1)融合视觉、音频等多模态数据,搭配改进YOLOv8、SlowFast网络等智能模型,替代人工检验,规避人员经验与精力影响,大幅提升健康识别准确率,尤其擅长微小病变、早期异常行为识别;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122842938A_ABST
    Figure CN122842938A_ABST
Patent Text Reader

Abstract

This invention discloses a health intelligent identification system and method for pig slaughtering, belonging to the field of health intelligent identification and quality control throughout the entire pig slaughtering process. The device includes a data acquisition layer, an edge computing layer, a platform intelligence layer, and a health management layer. By completing multimodal hardware deployment and synchronous acquisition, data preprocessing and labeling, core algorithm model construction and training, multi-source feature fusion health assessment, system integration and edge-cloud collaborative deployment, full-process traceability feedback and system adaptive optimization, it can quantitatively assess the health status of pigs, while simultaneously achieving precise identification of high-risk groups, slaughter scheduling optimization, and full-process digital traceability. This invention offers accurate and efficient detection, is compatible with high-speed slaughtering lines, can block the spread of disease risks, and forms a closed-loop quality control system of "collection-analysis-decision-feedback". It provides a scientific basis for the intelligent and refined management of the pig slaughtering industry and significantly improves the level of health detection and quality control in the slaughtering process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent health identification and quality control throughout the entire process of pig slaughtering, and particularly relates to an intelligent health identification system and method for pig slaughtering. Background Technology

[0002] Currently, health inspections during pig slaughter mainly rely on visual observation and manual touch by veterinarians or inspectors. This traditional method has the following inherent drawbacks: strong subjectivity, low efficiency, difficulty in traceability, and destructive testing.

[0003] Existing health monitoring technologies mostly focus on the breeding stage, paying particular attention to the pig's growth environment, daily behavior, and physiological indicators. They are difficult to adapt to the special needs of the slaughtering stage. The slaughtering process is characterized by its unidirectional, continuous, high-speed, and environmentally variable nature, which places higher demands on the real-time performance, robustness, and process integration of detection technologies.

[0004] Therefore, the industry urgently needs a technical solution that can be seamlessly integrated with slaughtering lines, covering the entire process of pigs from entry to carcass processing, and achieving contactless, automated health identification and risk warning to address the pain points of traditional inspection methods. Summary of the Invention

[0005] The purpose of this invention is to provide a health intelligent identification system and method for pig slaughtering, which solves the problems of existing technologies, such as the high dependence of inspection results on human experience and energy levels, the tendency for identification standards to deviate between different personnel and at different times, resulting in unstable accuracy and difficulty in ensuring inspection consistency; the difficulty for manual inspection of each pig, which can easily lead to missed inspections due to slow operation speed, and the inability to meet the efficiency requirements of large-scale slaughtering; the lack of accurate data support for linking health issues to specific pigs; and the inability to achieve risk warning and diversion of abnormal pigs before slaughter, which can easily lead to resource waste and safety hazards.

[0006] To achieve the above objectives, the present invention provides a health intelligent identification system for pig slaughtering, comprising: a data acquisition layer, an edge computing layer, a platform intelligence layer, and a health management layer; The data acquisition layer includes a vision module, an audio module, a physiological sensing module, and an environmental sensing module; The edge computing layer includes an industrial-grade edge controller equipped with GPUs and SSD storage for real-time processing and local inference of field data. The platform's intelligent layer includes a multimodal fusion model, a behavior recognition model, a health assessment model, and a dynamic propagation graph model, which are used for multi-source data fusion analysis and health risk assessment. The health management system includes a health record generation module, a risk warning and classification module, a slaughter scheduling optimization module, and a traceability and report output module; it is used to automatically generate full-process health records, output risk warning and classification results, and perform slaughter scheduling optimization and traceability report output.

[0007] Preferably, the vision module includes a high-definition / infrared / depth camera for acquiring images of the pig, body surface temperature, and abnormal behavior information; the audio module includes a microphone array for acquiring abnormal sounds; the physiological sensing module includes a smart ear tag for acquiring core physiological indicators of the pig; and the environmental sensing module is used to monitor the temperature, humidity, and concentration of harmful gases in the slaughtering environment.

[0008] Preferably, the multimodal fusion model is used to fuse four types of data: image, sound, physiological and environmental; the behavior recognition model is used to accurately identify abnormal behaviors of pigs; the health assessment model is used to quantitatively assess the health status of pigs based on multidimensional data; and the dynamic propagation graph model is used to construct the contact network of the pig herd and assess the propagation path of herd health risks.

[0009] Preferably, the health record generation module is used to create a full-process health report for each pig, recording health data and identification results at each stage; the risk warning and classification module is used to automatically classify the health status of pigs into three levels: healthy, sub-healthy, and high-risk, and provide real-time warnings for high-risk individuals; the slaughter scheduling optimization module is used to adjust the slaughter order and processing method according to the health status of pigs; and the traceability and report output module is used to provide traceable health data reports.

[0010] A method for intelligent health identification during pig slaughtering, utilizing the aforementioned intelligent health identification system for pig slaughtering, includes the following steps: S1. Construct a data acquisition network at each node of the slaughtering process and collect raw data synchronously; S2. Preprocess and label the raw data collected in S1 with high quality; S3. Construct the core algorithm model and train the core algorithm model based on the preprocessed high-quality data in S2; S4. Integrate multi-source feature data to conduct health assessments of pigs; S5. Integrate the modules into a software system and deploy them collaboratively in the cloud. S6. Conduct full-process traceability and feedback, and perform adaptive optimization of the system.

[0011] Preferably, in step S201, the acquired raw image data is preprocessed; Denoising, brightness equalization, and color normalization are performed on RGB and infrared images respectively. During the model training phase, multi-scale training, Mosaic data augmentation, random flipping, and affine transformation strategies are employed. For small lesion samples that are scarce, a copy-paste synthetic data technique is used to expand the sample size. S202. Preprocess the collected raw audio data; The acquired audio signal is subjected to noise reduction and frame segmentation, and then the Mel spectrogram is extracted as the feature input of the audio model. S203. Perform high-quality annotation on the original data; All suspicious lesion areas in the original image data are marked with rectangular boxes.

[0012] Preferably, the specific content of S3 is as follows: S301. Improve the YOLOv8 network; By introducing full-dimensional dynamic convolution and replacing ordinary convolution with ODConv, the network can adaptively adjust the convolution parameters by introducing dynamic attention in multiple dimensions of the convolution kernel space, input channel, and output channel. A new small target detection layer and lightweight double convolution are added, and a P2 small target detection layer is added to fuse shallow features and retain detailed information of small lesions. A C2f-Dual module is proposed to replace the original bottleneck layer with DualBottleneck and combine 3×3 and 1×1 convolution to process features in parallel. We replace the CloU loss with WIoUv3 using Wise-IoUv3, and through a dynamic gradient gain allocation strategy, the WIoUv3 loss function... The expression is as follows: ; In the formula, is the scaling factor, where, The outlier of the anchor frame. and For hyperparameters; The basic loss function; The original SPPF module was replaced with SPPELAN, which combines ELAN’s efficient feature aggregation capability with the multi-scale perception capability of spatial pyramid pooling to enhance the integration of global and local features. S302. Construct an individual identification and tracking model; An improved DeepSORT algorithm is used to input the raw video data collected in S1 into an improved YOLOv8 detector for pig localization; then Euclidean distance matching is used to replace the original IOU matching method. S303. Construct an abnormal behavior and sound recognition model; A SlowFast dual-stream network is used; spatial stream processing is performed on single-frame RGB images to extract static posture features of pigs; temporal stream processing is performed on continuous frames of optical flow to capture dynamic behavior information; then dual-stream data fusion is performed to accurately identify abnormal behaviors of pigs. A CNN model based on Mel spectrograms is used to convert the raw audio data into Mel spectrograms, and then the CNN model is used for classification to identify abnormal audio events. S304. Construct a visual detection model for lesions; An improved YOLOv8 model is adopted, integrating an attention mechanism and a more efficient feature pyramid in the backbone and neck parts of the model to optimize for small lesions; S305. Construct a group risk transmission model; A graph neural network was used, with a dynamic contact network constructed from DeepSORT tracking data as input, treating each pig as a graph node; the GNN was used to model the propagation path of health status in the population.

[0013] Preferably, the specific content of S4 is as follows: S401. Extract core features from the models constructed in S3, including lesion detection scores, abnormal behavior probabilities, and time-series data of physiological indicators; then align features on the timestamp and individual ID dimensions to eliminate data misalignment issues. S402. A fusion classifier based on a multilayer perceptron is adopted. The aligned multidimensional feature vectors are input into the MLP, and nonlinear fusion is performed through a fully connected layer. Finally, the Softmax output layer generates the probability distributions of three levels: healthy, sub-healthy, and high-risk.

[0014] Preferably, the specific content of S5 is as follows: S501, Deploy the edge computing layer; Deploy edge servers at the slaughterhouse to run lightweight target detection, tracking, and preliminary behavior analysis models; S502, Deploy the platform's intelligent layer; Deploy Django-based backend services in the central data center or cloud to receive raw data and preliminary analysis results uploaded from the edge computing layer; run more complex models in the cloud, and simultaneously complete full data storage, in-depth analysis, and visualization.

[0015] Preferably, the specific content of S6 is as follows: S601, Generate digital archives; A unique traceability code is generated for each pig, and all the original data, identification results and health level information of the pig at each stage of entry, pre-slaughter, during slaughter and post-slaughter are linked and bound to form a complete digital quality file. S602. Conduct manual review and feedback; The system's judgment results can be confirmed or corrected through a human-computer interaction interface; the corrected high-quality data is automatically sent back to the central database as a sample source for model optimization. S603, Perform incremental learning and model update; The core model is fine-tuned using new data generated through regular manual review; incremental learning overcomes the "catastrophic forgetting" problem of the model, enabling the system to adapt to changes in the slaughter environment and newly emerging disease types.

[0016] Therefore, the beneficial effects of the above-mentioned intelligent health identification system and method in the pig slaughtering process are as follows: (1) It integrates multimodal data such as vision and audio, and is equipped with intelligent models such as improved YOLOv8 and SlowFast network to replace manual inspection, avoid the influence of personnel experience and energy, and greatly improve the accuracy of health identification, especially adept at identifying minor lesions and early abnormal behaviors. (2) The edge-cloud collaborative architecture enables real-time data processing, and the core model has a fast reasoning speed, which can be adapted to high-speed slaughtering lines; the automated verification, detection and sorting functions reduce manual operation links, improve the overall slaughtering process efficiency and reduce labor costs. (3) Establish a full-process digital quality file for each pig to achieve traceability of health data "from entry to carcass"; when quality problems occur, the root cause of the problem can be traced back quickly, which facilitates the identification of responsibility and process optimization and meets the traceability needs of multiple parties; (4) Through the GNN group risk transmission model, when a single high-risk pig is found, all close contacts can be quickly identified, so as to achieve "early detection, early isolation and early treatment", effectively blocking the spread of diseases and other risks in the pig herd and reducing losses; (5) The data output by the system, such as health classification, risk warning, and slaughter scheduling suggestions, provide a scientific basis for enterprise production management, quality control, and connection with external platforms, thereby improving the level of enterprise refined management.

[0017] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0018] Figure 1 This is an overall flowchart of a health intelligent identification system for pig slaughtering according to the present invention; Figure 2 A flowchart illustrating the entire process of health diagnosis during pig slaughter. Figure 3 Diagram of the four main hardware modules of the data acquisition layer; Figure 4 A schematic diagram showing the deployment of the pig slaughtering module; Figure 5This is a schematic diagram illustrating the edge-cloud collaborative processing flow and system adaptive optimization. Figure 6 A diagram of the SlowFast spatiotemporal information fusion network under a deeply nested attention mechanism; Figure 7 This is a diagram of the CNN model structure based on Mel spectrograms; Figure 8 This is a diagram of a network architecture based on the improved YOLOv8. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages disclosed in the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention and are not intended to limit the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of this application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout.

[0020] It should be noted that the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as a process, method, system, product, or server that includes a series of steps or units, not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or device.

[0021] The following is in conjunction with the appendix Figures 1-8 The embodiments of the present invention will be described in detail below.

[0022] Example 1 This invention integrates four types of data—visual, audio, physiological, and environmental—to construct a health map of the entire slaughter process, enabling real-time identification and risk assessment of the health status of pigs from entry to carcass grading. The overall system flow is as follows: Figure 1 As shown.

[0023] This invention employs a front-end + back-end separation approach for web system development, ensuring system flexibility and scalability. The back-end uses the Django framework (a Python web framework) to build the back-end RESTful API, handle business logic, and integrate model inference functions, providing stable data processing and service support for the system. The front-end uses the Vue.js framework (a progressive JavaScript framework) to build the user interface and data visualization modules, enabling intuitive and efficient human-computer interaction.

[0024] A health intelligent identification system for pig slaughtering includes: a data acquisition layer, an edge computing layer, a platform intelligence layer, and a health management layer; The data acquisition layer includes a vision module, an audio module, a physiological sensing module, and an environmental sensing module; The edge computing layer includes an industrial-grade edge controller equipped with GPUs and SSD storage for real-time processing and local inference of field data. The platform's intelligent layer includes a multimodal fusion model, a behavior recognition model, a health assessment model, and a dynamic propagation graph model, which are used for multi-source data fusion analysis and health risk assessment. The health management system includes a health record generation module, a risk warning and classification module, a slaughter scheduling optimization module, and a traceability and report output module; it is used to automatically generate full-process health records, output risk warning and classification results, and perform slaughter scheduling optimization and traceability report output.

[0025] The vision module includes a high-definition / infrared / depth camera for collecting images of pigs, body surface temperature, and information on abnormal behavior; the audio module includes a microphone array for collecting abnormal sounds such as coughing and rapid breathing; the physiological sensing module includes a smart ear tag (randomly checked for wearing) for collecting core physiological indicators of pigs such as heart rate, blood oxygen, and body temperature; and the environmental sensing module is used to monitor the temperature and humidity of the slaughter environment and the concentration of harmful gases (such as NH3 and H2S).

[0026] The multimodal fusion model is used to integrate four types of data: image, sound, physiology, and environment, eliminating the limitations of single data and improving the comprehensiveness of the assessment; the behavior recognition model is used to accurately identify abnormal behaviors of pigs such as coughing, lameness, and aggression, and to capture potential health risk signals; the health assessment model is used to quantitatively assess the health status of pigs based on multi-dimensional data such as weight, body temperature, and behavior; and the dynamic propagation graph model is used to construct the contact network of the pig herd, assess the propagation path of group health risks, and facilitate the early identification of high-risk groups.

[0027] The health record generation module is used to create a full-process health report for each pig, recording health data and identification results at each stage; the risk warning and classification module is used to automatically classify the health status of pigs into three levels: healthy, sub-healthy, and high-risk, and provide real-time warnings for high-risk individuals; the slaughter scheduling optimization module is used to adjust the slaughter order and processing methods according to the health status of pigs to reduce the probability of risk spread; the traceability and report output module is used to connect with regulatory platforms, insurance companies, and farmers to provide traceable health data reports to meet the needs of multiple parties.

[0028] Example 2 This system constructs an intelligent health diagnosis system covering the entire process of pigs from entry to slaughter. Through evidence verification, herd screening, multimodal monitoring, and transmission chain analysis, it achieves accurate identification and classification of pre-slaughter risks. During slaughter, through automatic quality inspection and correlation with pre-slaughter behavioral data, it completes objective quality judgment and sorting. Ultimately, it generates a complete digital quality file for each pig, forming a closed-loop management system that is traceable and verifiable throughout the entire process. The entire health process is as follows: Figure 2 As shown.

[0029] (1) First stage: Entry inspection - "Automated verification and initial risk screening"; The system mainly performs two core tasks: 1) Automated verification of certificates and labels: Utilizing OCR technology to automatically read quarantine certificate numbers, and rapidly scanning livestock and poultry labels via RFID or image recognition, the system automatically compares the data with the enterprise database to complete the electronic verification and recording of "certificate-goods-labels". Incomplete labels are automatically marked.

[0030] 2) Preliminary herd health risk screening: In the pig unloading area, cameras and microphones are deployed to conduct preliminary behavioral observations (such as lethargy, lameness, and other abnormal behaviors) and sound monitoring (such as coughing) of the pig herd. The system comprehensively analyzes the data to generate a "herd health risk score" for the entire batch of pigs, which serves as the initial basis for subsequent management and control.

[0031] (2) Second stage: Pre-slaughter management - "Multimodal perception and precise classification"; The system achieves accurate assessment and grading of pig health status through continuous monitoring and analysis. 1) Continuous Dynamic Monitoring: A combined "sentinel pig + video surveillance" solution is deployed in the slaughter pens. This eliminates the need for all pigs to wear smart ear tags; only 1%-5% of the pigs in the pen ("sentinel pigs") are tagged. This continuously collects key physiological indicators such as body temperature and heart rate. Simultaneously, cameras above the pens use computer vision technology to track the movement of all pigs, constructing a group contact network. When any "sentinel pig's" ear tag data triggers an abnormal alarm (such as a sudden rise in body temperature), the system can immediately and accurately locate all individuals who have had close contact with that pig in the contact network, marking them as high-risk individuals. This achieves a breakthrough of "discovering one case → locking down a high-risk group" with extremely low hardware costs, providing data support for emergency slaughter or isolation decisions.

[0032] 2) Group transmission chain analysis: Based on computer vision tracking of pig behavior, a dynamic contact network of pigs in the slaughter pen is constructed. When the system detects a coughing pig (A) through audio analysis, it can immediately locate and analyze other pigs that have had close contact with A (such as pigs B, C, and D), accurately defining the scope of high-risk groups and preventing the spread of risk.

[0033] 3) Automated grading and slaughter recommendations: Based on individual pig physiological data, behavioral abnormalities, and the risk of group transmission, the system automatically generates health grading and treatment recommendations, which are then transmitted to the production scheduling system. Approved for slaughter: Those with normal physiological indicators, no abnormal behavior, and no history of high-risk exposure are eligible to enter the standard slaughter process.

[0034] Emergency slaughter: If there are obvious clinical symptoms or abnormal physiological indicators, it is recommended to prioritize slaughter to reduce the risk exposure time.

[0035] Isolation / Special Treatment: If symptoms of a suspected highly contagious disease appear, or if the individual is a key member of a high-risk group, the system will immediately issue an alarm and recommend isolation and observation to prevent the spread of risk.

[0036] (3) Third stage: Quality inspection during slaughter - "Objective identification and automatic sorting"; On the slaughterhouse line, the system achieves objective assessment and precise sorting of pig quality through automated detection and data correlation: 1) Automated visual quality inspection: Using high-definition, thermal imaging cameras, the skin, internal organs, and carcass of each pig are automatically scanned and identified; the computer vision model (improved YOLOv8 model) can automatically identify lesions (such as jaundice, bleeding points, parasitic nodules, etc.) and perform quality grading, with recognition accuracy far exceeding that of manual visual inspection.

[0037] 2) Correlation analysis of pre- and post-slaughter data: When post-slaughter quality inspection finds problems such as lung lesions, the system will automatically backtrack the audio records of the pig in the waiting pen to check whether there are abnormal sounds such as coughing; through the causal chain analysis of "post-slaughter lesions" and "pre-slaughter behavior", it provides objective and complete data basis for quality judgment and avoids the subjective bias of manual judgment.

[0038] 3) Automated marking and sorting: Based on the quality inspection results, the system automatically controls the actuator (such as laser marking equipment) to mark the carcasses and automatically sorts them into different grade tracks (such as qualified product track, defective product track, industrial track, etc.), improving sorting efficiency and accuracy.

[0039] (4) Fourth stage: Data archiving and traceability; The system generates a unique "digital quality file" for each pig, linking and archiving all its health data, test results, and grading information at each stage of entry, pre-slaughter, and during slaughter, and storing them long-term. Enterprises can use the unique identifier to query the entire process information of any product, which facilitates internal management and meets the needs of customers for inquiries and recall of problematic products, thereby improving product credibility.

[0040] The intelligent health identification system for pig slaughtering described in Example 1 includes the following steps: S1. Construct a data acquisition network at each node of the slaughtering process and collect raw data synchronously; construct a data acquisition network with full coverage and no blind spots at each key node of the slaughtering process to ensure the spatiotemporal consistency of multi-source data and provide high-quality raw data for subsequent analysis.

[0041] Visual acquisition: High-definition cameras and infrared thermal imagers are deployed at the entrance passage, waiting circle, stun point, bleeding line, scalding line, evisceration point, and carcass inspection point.

[0042] Audio capture: Waterproof microphone arrays were deployed in the waiting pen and resting area to ensure that environmental sounds and abnormal coughing sounds of the pigs could be clearly captured even in humid environments.

[0043] Physiological data collection: Smart ear tags are fitted to 1%-5% of the "sentinel pigs" in the slaughter pen to ensure that the equipment's battery life meets the needs of the slaughter cycle and to continuously collect core physiological indicators such as heart rate and body temperature.

[0044] Environmental data collection: Industrial-grade temperature and humidity sensors and NH3 and H2S harmful gas sensors are evenly deployed in the waiting pen, slaughtering workshop (around key work positions such as bleeding line and evisceration point) and resting area to monitor the ambient temperature, humidity and concentration of harmful gases in real time, so as to avoid environmental factors interfering with the determination of the health status of pigs or affecting the meat quality.

[0045] like Figure 3 As shown, the system hardware consists of four major modules: vision, audio, physiology, and environment, which together realize multimodal data acquisition. Figure 4 From a bird's-eye view, it specifically demonstrates the deployment plans of each module in key areas to achieve full-process coverage.

[0046] All cameras achieve synchronous acquisition through hardware trigger signals emitted by the edge controller, ensuring that multi-angle matching images of the same pig are acquired at the same time, eliminating data misalignment caused by time differences.

[0047] S2. Preprocess and label the raw data collected in S1 with high quality; clean, enhance and standardize the raw multimodal data to build a high-quality, large-scale training dataset and improve the robustness and generalization ability of the model.

[0048] S201. Preprocess the acquired raw image data; Denoising, brightness equalization, and color normalization are performed on RGB and infrared images respectively to eliminate the impact of image quality differences on the model; During the model training phase, multi-scale training, Mosaic data augmentation, random flipping, and affine transformation strategies are employed. For small lesion samples that are scarce, a copy-paste synthetic data technique is used to expand the sample size, specifically to improve the model's ability to detect small targets; S202. Preprocess the collected raw audio data; The acquired audio signal is subjected to noise reduction and frame segmentation, and then the Mel spectrogram is extracted as the feature input of the audio model to ensure the effectiveness of the audio features. S203. Perform high-quality annotation on the original data; All suspicious lesion areas (such as bleeding points, necrotic tissue, parasites, masses, etc.) in the image are labeled with rectangular boxes; for small lesions, tighter bounding boxes are used to ensure labeling accuracy, and their minimum size is recorded to provide statistical basis for subsequent model optimization.

[0049] S3. Construct the core algorithm model and train the core algorithm model based on the preprocessed high-quality data in S2; S301. Improve the YOLOv8 network; construct and train high-precision, high-efficiency dedicated algorithm models for specific tasks in each stage of slaughtering to meet practical application needs.

[0050] The improved YOLOv8 reconstructs the last three layers of the backbone network based on YOLOv8, employing a combination of ODConv+C2f-Dual+SPPELAN to enhance the integration of features and contextual information while maintaining lightweight architecture. In the neck network, the network structure is redesigned to further fuse deep and shallow features, allowing the improved YOLOv8 to focus more on the details of tiny pixel lesions. In the head network, the WIoUv3 loss function is used to more accurately measure the matching degree between the target bounding box and the predicted bounding box, optimizing the training process. The structure of the improved YOLOv8 detection algorithm is as follows: Figure 8 As shown.

[0051] By introducing full-dimensional dynamic convolution and replacing ordinary convolution with ODConv, dynamic attention is introduced in multiple dimensions of the convolution kernel space, input channel and output channel, enabling the network to adaptively adjust the convolution parameters, which enhances the flexibility and expressiveness of feature extraction, while maintaining lightweightness. A new small target detection layer and lightweight double convolution are added, and a P2 small target detection layer is added to fuse shallow features and retain detailed information of small lesions. A C2f-Dual module is proposed, which replaces the original bottleneck layer with DualBottleneck and combines 3×3 and 1×1 convolution to process features in parallel, thereby improving feature fusion efficiency while being lightweight. We replace the CloU loss with WIoUv3 using Wise-IoUv3. Through a dynamic gradient gain allocation strategy, we reduce the negative impact of low-quality labeled samples on training, thereby improving the robustness and accuracy of bounding box regression. The WIoUv3 loss function... The expression is as follows: ; In the formula, is the scaling factor, where, The outlier of the anchor frame. and For hyperparameters; The basic loss function; The original SPPF module was replaced with SPPELAN, which combines ELAN’s efficient feature aggregation capability with the multi-scale perception capability of spatial pyramid pooling to enhance the integration of global and local features. S302. Construct an individual identification and tracking model; An improved DeepSORT algorithm is used to input the raw video data collected in S1 into an improved YOLOv8 detector (which integrates an attention mechanism to improve detection accuracy in dense pig herds) for pig localization; then, Euclidean distance matching is used to replace the original IOU matching method to solve the problem of frequent pig ID switching in low frame rate videos, and realize the unique ID tracking of pigs from entry to slaughter. S303. Construct an abnormal behavior and sound recognition model; A SlowFast dual-stream network is used; spatial stream processing is performed on single-frame RGB images to extract static posture features of pigs; temporal stream processing is performed on continuous frame optical flow to capture dynamic behavior information; then dual-stream data fusion is performed to accurately identify abnormal behaviors of pigs such as lameness and aggression. A CNN model based on Mel spectrograms is used to convert the raw audio data into Mel spectrograms, and the CNN model is used for classification to identify abnormal audio events such as coughing and shortness of breath. S304. Construct a visual detection model for lesions; An improved YOLOv8 model is adopted, integrating attention mechanisms and a more efficient feature pyramid into the backbone and neck parts of the model. It is optimized for minor lesions of the skin and internal organs, ensuring real-time and accurate lesion localization and classification on a high-speed pipeline. S305. Construct a group risk transmission model; Using a graph neural network, with a dynamic contact network constructed from DeepSORT tracking data as input, each pig is treated as a graph node. The GNN is used to model the propagation path of health status in the group. When the "sentinel pig" or audio model detects anomalies, the range of high-risk groups can be predicted quickly and accurately.

[0052] S4. Integrate multi-source feature data to conduct health assessments of pigs; integrate visual, audio, physiological and other multi-source features to comprehensively assess the health status and risk classification of each pig, ensuring the comprehensiveness and accuracy of the assessment results.

[0053] S401. Extract core features from the models constructed in S3, including lesion detection scores, abnormal behavior probabilities, and time-series data of physiological indicators; then perform feature alignment on the dimensions of timestamp (to ensure data matching within the same time period) and individual ID (to ensure data matching for the same pig) to eliminate data misalignment issues. S402. A fusion classifier based on a multilayer perceptron is adopted. The aligned multidimensional feature vectors are input into the MLP, and nonlinear fusion is performed through a fully connected layer. Finally, the Softmax output layer generates the probability distributions of three levels: healthy, sub-healthy, and high-risk.

[0054] S5. Integrate each module into a software system and deploy it collaboratively in the cloud. Integrate each algorithm module into a stable and efficient software system. Through the edge-cloud collaborative architecture, realize real-time data processing and long-term optimization to meet the actual operation needs of the slaughtering scenario. S501, Deploy the edge computing layer; Deploying edge servers at the slaughterhouse and running lightweight target detection, tracking, and preliminary behavior analysis models (such as the improved YOLOv8 detector and DeepSORT algorithm) enables millisecond-level real-time inference and early warning, ensuring response speed under the high-speed operation of the slaughter line. S502, Deploy the platform's intelligent layer; Deploy Django-based backend services in the central data center or cloud to receive raw data and preliminary analysis results uploaded from the edge computing layer; run more complex models in the cloud, such as GNN risk propagation models and MLP fusion assessment models, while completing full data storage, in-depth analysis, and visualization (such as health data reports and risk propagation maps).

[0055] The edge layer is responsible for real-time response and control, such as triggering audible and visual alarms and controlling the actions of sorting mechanisms; the cloud layer is responsible for macro-analysis, report generation, and model iteration and optimization; the two work together through a high-speed 5G / Wi-Fi 6 network to ensure smooth data transmission and timely command execution.

[0056] like Figure 5 As shown, this invention employs an edge-cloud collaborative architecture to achieve data processing and system optimization. At the edge, the model is responsible for real-time inference and on-site control, ensuring the immediacy of detection; in the cloud, the model performs deep fusion analysis and global decision-making. Both work collaboratively through a high-speed network, forming a data flow of "collection-analysis-decision-making." Simultaneously, the system constructs an optimization flow of "human review-data feedback-incremental learning," continuously iterating the model using on-site feedback data to form an intelligent closed-loop system.

[0057] S6. Conduct full-process traceability and feedback, and perform adaptive optimization of the system.

[0058] S601, Generate digital archives; A unique traceability code is generated for each pig, and all the original data, identification results and health level information of the pig at each stage of entry, pre-slaughter, during slaughter and post-slaughter are linked and bound to form a complete digital quality file, supporting full-process traceability query; S602. Conduct manual review and feedback; The system's judgment results can be confirmed or corrected through a human-computer interaction interface; the corrected high-quality data is automatically sent back to the central database as a sample source for model optimization. S603, Perform incremental learning and model update; Regularly (e.g., monthly) use new data generated by manual review to fine-tune core models (such as lesion detection models and risk transmission models) in an "incremental learning" manner; overcome the "catastrophic forgetting" problem of models through incremental learning, enable the system to adapt to changes in the slaughter environment (such as changes in light and temperature) and newly emerging lesion types, and achieve the goal of continuous optimization that is "more accurate the more it is used".

[0059] To achieve accurate identification and grading of the health status of pigs throughout the entire slaughtering process, this system employs a multimodal health identification method that integrates various technologies at each stage of slaughter, as detailed in Table 1: (1) Entry and Resting Stage: The movement trajectory of pigs is tracked by video, and the abnormal sounds of coughing and breathing are identified by audio analysis. Heart rate and body temperature are monitored by smart ear tags. The focus of this stage is to identify individuals with infectious risks and prevent sick pigs from entering the slaughter production line.

[0060] (2) Stress assessment before stunning: assess the stress status of pigs by combining heart rate data and behavioral data (such as agitation level); since high stress will affect meat quality, this assessment data will serve as an important reference dimension for subsequent meat quality grading.

[0061] (3) Post-slaughter inspection stage: After bloodletting: Visual analysis of blood color and flow rate is used to make a preliminary judgment on whether there are any systemic diseases.

[0062] After hair perming: A high-resolution camera is used to scan the entire body's skin to identify lesions on the skin surface such as erythema, papules, and bleeding points.

[0063] After opening the abdomen: Visual recognition technology is used to detect the color, shape, and size of internal organs (such as liver, lungs, and heart), and automatically identify lesions such as cysts, abscesses, and parasites. Its recognition effect far exceeds that of manual visual inspection.

[0064] Carcass inspection: Based on a comprehensive analysis of muscle color, fat distribution, and health data from all the aforementioned stages, the carcass is given a final health rating (e.g., qualified, conditionally edible, to be destroyed) and a quality rating.

[0065] Table 1. Methods for health identification at different stages of pig slaughter

[0066] The SlowFast spatiotemporal information fusion network with a deeply nested attention mechanism is an innovative improvement and upgrade to the traditional SlowFast network. For example... Figure 6 As shown, this network is based on the SlowFast two-stream architecture. By deeply embedding the attention mechanism inside the convolutional block, it constructs an SCTM module containing temporal channels and spatiotemporal attention. At the same time, a multi-stream information fusion module based on cross attention and ConvLSTM is designed, which effectively solves the problems of insufficient feature capture accuracy and weak two-stream information interaction in the traditional SlowFast network, and greatly improves the model's ability to perceive and fuse subtle spatiotemporal features in complex scenes. Mel-spectral mapping-based CNN models transform sound recognition tasks into mature image classification tasks. Through a collaborative architecture of "feature visualization transformation + deep image recognition," they achieve efficient and accurate recognition of target sounds, making them particularly suitable for specific sound recognition scenarios (such as coughing). The specific model architecture is as follows: Figure 7 As shown; The graph neural network model is designed to meet the needs of accurate risk identification and early warning for pigs in large-scale farming scenarios. Its core is to construct a dynamic contact graph with pigs as nodes and pig contact relationships as edges. With the powerful graph structure data processing capabilities of graph neural networks (GNN), it can realize real-time prediction and early warning of the risk status of pigs, accurately identify high-risk pig groups, and provide technical support for the prevention and control of livestock diseases.

[0067] (1) Network structure definition: Node: Each pig tracked by DeepSORT is a node.

[0068] Node features: Each node can have a wide variety of features, which can be categorized into the following four types: Dynamic characteristics: change over time.

[0069] Health indicators: Real-time body temperature and heart rate from the "Sentinel Pig" smart ear tag.

[0070] Behavioral characteristics: Movement speed, whether limping, and aggressive behavior obtained from SlowFast network analysis.

[0071] Audio features: The probability of abnormal sounds such as coughing, output by the audio model.

[0072] Edge: If two pigs have had close contact (e.g., less than 1 meter apart, for a certain period of time) within a certain time window (e.g., in the past 15 minutes), then an edge is established between them.

[0073] Edge weights: can characterize the "closeness" of contact, calculated based on factors such as contact duration and distance.

[0074] (2) Model training and output: The input is a dynamic contact map for each time step; the output is the probability that each node (pig) will become a "high-risk" individual in the next time step. The training data must include historical data (including information on pigs that were ultimately confirmed to be high-risk). The model adjusts its parameters by comparing the "predicted risk" with the "actual results".

[0075] (3) Real-time risk warning: The system runs the GNN model in real time. When the "sentinel pig" ear tag alarms or the audio model detects a cough, the health characteristics of these nodes change immediately. The GNN then spreads this abnormal signal through the contact network like ripples, quickly calculating the latest risk values ​​of all pigs that have come into contact with it, thereby achieving "precise identification of a risk group".

[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A health intelligent identification system for pig slaughtering, characterized in that, include: Data acquisition layer, edge computing layer, platform intelligence layer, and health management layer; The data acquisition layer includes a vision module, an audio module, a physiological sensing module, and an environmental sensing module; The edge computing layer includes an industrial-grade edge controller equipped with GPUs and SSD storage for real-time processing and local inference of field data. The platform's intelligent layer includes a multimodal fusion model, a behavior recognition model, a health assessment model, and a dynamic propagation graph model, which are used for multi-source data fusion analysis and health risk assessment. The health management system includes a health record generation module, a risk warning and classification module, a slaughter scheduling optimization module, and a traceability and report output module. It is used to automatically generate full-process health records, output risk warnings and classification results, and optimize slaughter scheduling and output traceability reports.

2. The intelligent health identification system for pig slaughtering according to claim 1, characterized in that: The vision module includes a high-definition / infrared / depth camera for capturing images of the pig, its body surface temperature, and information on abnormal behavior; the audio module includes a microphone array for capturing abnormal sounds. The physiological sensing module includes a smart ear tag for collecting core physiological indicators of pigs; the environmental sensing module is used to monitor the temperature, humidity and concentration of harmful gases in the slaughtering environment.

3. The intelligent health identification system for pig slaughtering according to claim 2, characterized in that: Multimodal fusion models are used to fuse four types of data: image, sound, physiological, and environmental; behavior recognition models are used to accurately identify abnormal behaviors in pigs. The health assessment model is used to quantitatively assess the health status of pigs based on multi-dimensional data; the dynamic transmission graph model is used to construct the contact network of the pig herd and assess the transmission path of health risks in the herd.

4. The intelligent health identification system for pig slaughtering according to claim 3, characterized in that: The health record generation module is used to create a full-process health report for each pig, recording health data and identification results at each stage; the risk warning and classification module is used to automatically classify the health status of pigs into three levels: healthy, sub-healthy and high-risk, and provide real-time warnings for high-risk individuals. The slaughter scheduling optimization module is used to adjust the slaughtering order and processing method according to the health status of pigs. The traceability and report output module is used to provide traceable health data reports.

5. A method for intelligent health identification during pig slaughtering, employing an intelligent health identification system for pig slaughtering as described in any one of claims 1-4, characterized in that, Includes the following steps: S1. Construct a data acquisition network at each node of the slaughtering process and collect raw data synchronously; S2. Preprocess and label the raw data collected in S1 with high quality; S3. Construct the core algorithm model and train the core algorithm model based on the preprocessed high-quality data in S2; S4. Integrate multi-source feature data to conduct health assessments of pigs; S5. Integrate the modules into a software system and deploy them collaboratively in the cloud. S6. Conduct full-process traceability and feedback, and perform adaptive optimization of the system.

6. The intelligent health identification method for pig slaughtering according to claim 5, characterized in that, The specific details of S2 are as follows: S201. Preprocess the acquired raw image data; Denoising, brightness equalization, and color normalization are performed on RGB and infrared images respectively. During the model training phase, multi-scale training, Mosaic data augmentation, random flipping, and affine transformation strategies are employed. For small lesion samples that are scarce, a copy-paste synthetic data technique is used to expand the sample size. S202. Preprocess the collected raw audio data; The acquired audio signal is subjected to noise reduction and frame segmentation, and then the Mel spectrogram is extracted as the feature input of the audio model. S203. Perform high-quality annotation on the original data; All suspicious lesion areas in the original image data are marked with rectangular boxes.

7. The intelligent health identification method for pig slaughtering according to claim 6, characterized in that, The specific details of S3 are as follows: S301. Improve the YOLOv8 network; By introducing full-dimensional dynamic convolution and replacing ordinary convolution with ODConv, the network can adaptively adjust the convolution parameters by introducing dynamic attention in multiple dimensions of the convolution kernel space, input channel, and output channel. A new small target detection layer and lightweight double convolution are added, and a P2 small target detection layer is added to fuse shallow features and retain detailed information of small lesions. A C2f-Dual module is proposed to replace the original bottleneck layer with DualBottleneck and combine 3×3 and 1×1 convolution to process features in parallel. We replace the CloU loss with WIoUv3 using Wise-IoUv3, and through a dynamic gradient gain allocation strategy, the WIoUv3 loss function... The expression is as follows: ; In the formula, is the scaling factor, where, The outlier of the anchor frame. and For hyperparameters; The basic loss function; The original SPPF module was replaced with SPPELAN, which combines ELAN’s efficient feature aggregation capability with the multi-scale perception capability of spatial pyramid pooling to enhance the integration of global and local features. S302. Construct an individual identification and tracking model; An improved DeepSORT algorithm is used to input the raw video data collected in S1 into an improved YOLOv8 detector for pig localization; then Euclidean distance matching is used to replace the original IOU matching method. S303. Construct an abnormal behavior and sound recognition model; A SlowFast dual-stream network is used; spatial stream processing is performed on single-frame RGB images to extract static posture features of pigs; temporal stream processing is performed on continuous frames of optical flow to capture dynamic behavior information; then dual-stream data fusion is performed to accurately identify abnormal behaviors of pigs. A CNN model based on Mel spectrograms is used to convert the raw audio data into Mel spectrograms, and then the CNN model is used for classification to identify abnormal audio events. S304. Construct a visual detection model for lesions; An improved YOLOv8 model is adopted, integrating an attention mechanism and a more efficient feature pyramid in the backbone and neck parts of the model to optimize for small lesions; S305. Construct a group risk transmission model; A graph neural network was used, with a dynamic contact network constructed from DeepSORT tracking data as input, treating each pig as a graph node; the GNN was used to model the propagation path of health status in the population.

8. The intelligent health identification method for pig slaughtering according to claim 7, characterized in that, The specific details of S4 are as follows: S401. Extract core features from the models constructed in S3, including lesion detection scores, abnormal behavior probabilities, and time-series data of physiological indicators; then align features on the timestamp and individual ID dimensions to eliminate data misalignment issues. S402. A fusion classifier based on a multilayer perceptron is adopted. The aligned multidimensional feature vectors are input into the MLP, and nonlinear fusion is performed through a fully connected layer. Finally, the Softmax output layer generates the probability distributions of three levels: healthy, sub-healthy, and high-risk.

9. The intelligent health identification method for pig slaughtering according to claim 8, characterized in that, The specific details of S5 are as follows: S501, Deploy the edge computing layer; Deploy edge servers at the slaughterhouse to run lightweight target detection, tracking, and preliminary behavior analysis models; S502, Deploy the platform's intelligent layer; Deploy Django-based backend services in the central data center or cloud to receive raw data and preliminary analysis results uploaded from the edge computing layer; run more complex models in the cloud, and simultaneously complete full data storage, in-depth analysis, and visualization.

10. The intelligent health identification method for pig slaughtering according to claim 9, characterized in that, The specific details of S6 are as follows: S601, Generate digital archives; A unique traceability code is generated for each pig, and all the original data, identification results and health level information of the pig at each stage of entry, pre-slaughter, during slaughter and post-slaughter are linked and bound to form a complete digital quality file. S602. Conduct manual review and feedback; The system's judgment results can be confirmed or corrected through a human-computer interaction interface; the corrected high-quality data is automatically sent back to the central database as a sample source for model optimization. S603, Perform incremental learning and model update; The core model is fine-tuned using new data generated through regular manual review; incremental learning overcomes the "catastrophic forgetting" problem of the model, enabling the system to adapt to changes in the slaughter environment and newly emerging disease types.