Live pig slaughtering tracing system based on Internet of Things
By constructing a multimodal perception system and a precise positioning algorithm, the problem of binding individual pig identities and data in the high-temperature and high-humidity environment of the scalding tank was solved, realizing reliable traceability and real-time production control throughout the pig slaughtering process.
Patent Information
- Application Number
- CN202511838793.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-03-13
AI Technical Summary
In the high-temperature and high-humidity environment of the scalding tank during pig slaughtering, existing IoT traceability technology cannot reliably and in real time perceive the individual pig's identity and process parameters, resulting in traceability interruptions and the inability to achieve full-process data binding.
A multimodal sensing system consisting of high-temperature resistant electronic tags, underwater acoustic positioning beacon arrays, radio frequency reading and writing units, and visual capture units, combined with an underwater precise positioning algorithm based on the time difference of sound wave arrival and multiple spatiotemporal matching verification logic, enables continuous three-dimensional trajectory tracking and identity binding of individual pigs in the scalding tank.
It enables continuous and reliable three-dimensional trajectory tracking and identity binding of individual pigs in high-temperature and high-humidity scalding tanks, ensuring uninterrupted data chain, improving the robustness, accuracy and reliability of traceability data, and supporting real-time production decision-making and control.
Smart Images

Figure CN121660710A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial Internet of Things (IoT) technology, and more specifically, to an IoT-based traceability system for pig slaughter. Background Technology
[0002] Food safety and quality traceability in the pig slaughtering industry are core aspects concerning public health and market reputation. With the development of IoT technology, using RFID electronic tags, QR codes, and other methods to identify individual pigs and record and link information at the breeding, transportation, and some slaughtering stages has become an important direction for the industry to improve traceability capabilities. Existing technical solutions mostly focus on identifying and collecting data from static or slow-moving individuals in dry, controlled environments, which can meet the traceability needs of the pre-slaughter stage (such as pre-slaughter management) and post-slaughter stage (such as cutting and packaging) to a certain extent.
[0003] However, existing IoT traceability technologies face severe challenges in the core wet-heat process of slaughtering and processing—the scalding stage—due to a significant traceability gap or black box. The high water temperature (typically exceeding 60°C), pervasive steam, and intense water turbulence within the scalding tank create an extremely harsh sensing environment. Under these conditions, conventional RFID signals cannot be effectively transmitted due to the strong attenuation properties of water; optical identification (such as vision and QR codes) is completely ineffective due to fog and water splashes; and general wireless positioning technologies are unsuitable due to complex multipath effects and signal attenuation. This directly results in the inability to reliably and in real-time perceive and bind the individual pig's identity information and key process parameters (such as scalding time and water temperature consistency) throughout the entire critical processing process, from the moment the pig enters the scalding tank to its exit after hair removal. The individual's identity disappears at the tank's entrance and reappears at the end, with completely missing process data in between, forming an unverifiable black box.
[0004] This not only makes quality control in this process (such as ensuring that the scalding time for each pig meets the standard) lack objective data support, but also makes it impossible to accurately locate the specific batch or individual in the scalding process in the event of a food safety problem. This breaks the traceability chain and severely restricts the integrity and reliability of the entire traceability system. Therefore, how to overcome the technical bottleneck of continuously sensing the individual pig's identity and accurately binding the entire process data under the extreme environment of the scalding tank, and achieve transparent and digital traceability of this process, is a key and specific technical problem that urgently needs to be solved in this field. In view of this, we propose an Internet of Things-based pig slaughter traceability system. Summary of the Invention
[0005] The purpose of this invention is to provide an Internet of Things-based traceability system for pig slaughter to solve the technical problem that individual pig identification information cannot be reliably bound to the data of the entire scalding process in real time under extreme and harsh environments such as high temperature and humidity in scalding tanks and severe signal blockage, resulting in a traceability black box in key processes.
[0006] To address the aforementioned technical problems, this invention provides the following technical solution: an Internet of Things-based pig slaughtering traceability system, comprising a central processing unit and at least one scalding station sensing subsystem communicatively connected to the central processing unit; the central processing unit is configured to execute: Create a dynamic digital twin for each individual pig; The pool entry event is spatiotemporally matched with the first underwater positioning coordinates of the pig individual obtained by the solution. After successful verification, the underwater trajectory tracking of the pig individual is started, and the trajectory data is bound to the corresponding dynamic digital twin. The event of the pig leaving the pool, the last valid underwater positioning coordinates of the individual pig, and the image are spatiotemporally matched. After successful verification, it is confirmed that the individual pig has completed the scalding process, and a process data package containing the complete spatiotemporal trajectory is generated. The scalding station sensing subsystem includes: High-temperature resistant electronic tags are attached to individual pigs and are used to emit acoustic signals containing identification information after being activated underwater in a scalding tank. An underwater acoustic positioning beacon array is deployed in the scalding tank to receive the acoustic signals and calculate the real-time three-dimensional underwater trajectory of individual pigs. An RFID read / write unit is deployed at the inlet and outlet of the scalding tank to communicate with the high-temperature resistant electronic tag when individual pigs enter and leave the tank, generating entry and exit events respectively. A visual capture unit is installed at the outlet of the scalding tank to capture images of individual pigs leaving the tank.
[0007] This invention constructs a multimodal sensing subsystem for the scalding station, consisting of high-temperature resistant electronic tags, an underwater acoustic positioning beacon array, an RFID reader / writer unit, and a visual capture unit. It also designs an underwater precise positioning algorithm based on the time difference of sound wave arrival and a multi-layered spatiotemporal matching verification logic. For the first time, this system achieves continuous and reliable three-dimensional trajectory tracking and identity binding for individual pigs within a high-temperature, high-humidity scalding tank, completely breaking the traceability black box of this process. Specifically, the system utilizes the characteristics of low attenuation and strong penetration of sound waves in water. A beacon array deployed within the tank captures the acoustic signals emitted by individual tags, calculating their underwater coordinates in real time to form a continuous spatiotemporal trajectory. Simultaneously, at the tank entrance and exit, RFID and visual capture are used to confirm individual identities at the moment of entry and exit, respectively. A strict spatiotemporal consistency algorithm strongly correlates the entry identity, underwater movement trajectory, and exit identity, ensuring an unbroken data chain. This allows the precise dwell time and movement path of each pig in the scalding tank to be completely recorded and uniquely bound to its individual identity, providing an unprecedented data foundation for process compliance verification and precise traceability.
[0008] Preferably, the high-temperature resistant electronic tag includes a sealed shell, a microcontroller, an acoustic-electric transducer, a radio frequency module, and a power supply; the acoustic-electric transducer is used to receive a preset wake-up sound wave and convert it into an electrical signal, and to emit the acoustic signal under the control of the microcontroller; the radio frequency module is used to communicate with the radio frequency read / write unit; the sealed shell ensures that the electronic tag remains sealed in the high-temperature and high-humidity environment of the scalding tank.
[0009] Preferably, the underwater acoustic positioning beacon array consists of multiple smart acoustic beacons deployed in a non-uniform topology within the scalding tank; each smart acoustic beacon integrates: A sound wave transmitter, used to emit the preset wake-up sound wave; An acoustic receiver is used to receive the acoustic signals emitted by the high-temperature resistant electronic tag; The timing module is used to record the arrival time of sound waves with high precision. The communication module is used to upload the recorded time information to the central processing unit; The central processing unit is configured to calculate the three-dimensional coordinates of individual pigs based on a time difference of arrival algorithm, specifically by minimizing the following objective function: ; In the formula, Indicates at time The three-dimensional spatial coordinates of an individual pig; The number of valid beacons representing the location; and They represent the first The and the first The known coordinates of the beacon; and These represent the signals arriving at the first... The and the first The absolute time of each beacon; The speed at which sound waves propagate in the current scalding pool water environment.
[0010] Preferably, the central processing unit is further configured to perform self-calibration on the underwater acoustic positioning beacon array, including: It periodically transmits calibration signals through selected beacons, which are then received by other beacons. Based on the known physical distance between beacons and the measured signal propagation time, the sound wave propagation speed is dynamically corrected. The estimated value is calculated using the following formula: ; In the formula, To effectively measure the number of pairs; For the first beacon transmission during secondary calibration measurement With receiving beacon The physical distance between them; and The first The absolute time of signal transmission and reception during the next calibration.
[0011] Preferably, the spatiotemporal matching process for pool entry executed by the central processing unit specifically includes: Receive containing the first precise timestamp The pool entry event; Obtain the first valid underwater positioning coordinate within the same time window as the first precise timestamp. and its solution time ; When both conditions are met and When the match is successful, the formula is as follows: The first preset time tolerance threshold; The coordinates of the spatial reference point in the scalding tank inlet area; This is the first preset spatial tolerance threshold.
[0012] Preferably, the spatiotemporal matching process for pool exit executed by the central processing unit specifically includes: Receive contains a second precise timestamp The incident of the fish leaving the pool; Obtain the last valid underwater positioning coordinate within the same time window as the second precise timestamp. and its solution time And images of captured individual pigs; When both conditions are met and and When the match is successful, the formula is as follows: and These are the second preset time and space tolerance thresholds, respectively; This serves as a spatial reference point for the export area. Feature vectors extracted from images With the expected feature vector The similarity function; This is the similarity threshold.
[0013] Preferably, the central processing unit is further configured to perform underwater collision avoidance processing: When the underwater trajectories of multiple individual pigs are tracked simultaneously, the current position of each individual pig is considered. and instantaneous velocity vector A linear extrapolation model is adopted. Predicting future location, where, The predicted time step; Calculate any two individuals and The predicted trajectory in the future time window The minimum distance within is given by the following formula: ; In the formula, Represents a future time window Internally changing time variables; like Less than the preset risk distance threshold If an intersection risk is detected, the radio frequency read / write unit will send a command to the high-temperature resistant electronic tag worn by the at-risk individual to dynamically adjust the transmission parameters of its acoustic signal to reduce interference.
[0014] Preferably, the central processing unit is further configured to perform anomaly detection and adjudication: Real-time analysis of the continuity and movement patterns of individual pigs' underwater trajectories; By calculating continuous anomaly indicators If the detection trajectory changes, Then it is determined to be an abnormal trajectory jump, where, , For adjacent trajectory points; To achieve the maximum reasonable speed; The threshold for the transition; By calculating the sliding time window Spatial dispersion of internal trajectory points If the detection stalls, Furthermore, if the average speed is too low, it is judged as an abnormal prolonged stagnation, where, The stagnation threshold; When an abnormal pig is detected leaving the pool, an alarm is triggered and an interception command is generated, guiding the pig into the verification channel.
[0015] Preferably, it also includes a workstation control unit that is communicatively connected to the slaughter production line control system; the central processing unit is connected to the workstation control unit and is used to send the generated process data package or abnormal event adjudication result to the workstation control unit; The workstation control unit integrates a rule engine, which is pre-set with production process rules. It is used to reason based on received data packets or results and output control commands to the execution mechanism of the slaughtering production line to control the path sorting, delayed processing or off-line processing of the corresponding pig individuals.
[0016] Preferably, it also includes at least one synchronous quarantine workstation sensing subsystem that is communicatively connected to the central processing unit, wherein the synchronous quarantine workstation sensing subsystem includes intelligent quarantine tools and quarantine workstations located at the synchronous quarantine workstation; The intelligent quarantine tool has a built-in inertial sensor to generate action trigger signals when performing specific quarantine actions; The quarantine workstation integrates a second radio frequency read / write unit and a second vision unit; The central processing unit is also configured to: The system receives the action trigger signal and simultaneously acquires the individual pig identification information read by the second radio frequency read / write unit and the carcass identification information captured by the second vision unit. The action trigger signal, identity information, and carcass identification information are bound within a time window, and the user is prompted to input the quarantine result to form a quarantine data package. Among them, action binding is achieved by calculating the sensor data stream of intelligent quarantine tools. With standardized motion feature waveform model sliding window cross-correlation value Achieve, when The system determines that the action match is successful and locks the bound timestamp.
[0017] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention constructs a multimodal sensing subsystem for the scalding station, consisting of high-temperature resistant electronic tags, an underwater acoustic positioning beacon array, an RFID reader / writer unit, and a visual capture unit. It also designs an underwater precise positioning algorithm based on the time difference of sound wave arrival and a multi-layered spatiotemporal matching verification logic. For the first time, this invention achieves continuous and reliable three-dimensional trajectory tracking and identity binding for individual pigs within a high-temperature, high-humidity scalding tank, completely breaking the traceability black box of this process. Specifically, the system utilizes the characteristics of low attenuation and strong penetration of sound waves in water. A beacon array deployed within the tank captures the acoustic signals emitted by individual tags, calculating their underwater coordinates in real time to form a continuous spatiotemporal trajectory. Simultaneously, at the tank entrance and exit, RFID and visual capture are used to confirm individual identities at the moment of entry and exit, respectively. A strict spatiotemporal consistency algorithm strongly correlates the entry identity, underwater movement trajectory, and exit identity, ensuring an unbroken data chain. This allows the precise dwell time and movement path of each pig in the scalding tank to be completely recorded and uniquely bound to its individual identity, providing an unprecedented data foundation for process compliance verification and precise traceability.
[0018] 2. Building upon end-to-end traceability, this invention further enhances the robustness, accuracy, and reliability of traceability data under extremely complex conditions by embedding a dynamic self-calibration mechanism, underwater anti-collision prediction, and intelligent trajectory anomaly detection algorithms. This represents a leap from simply having data to having high-quality, trustworthy data. The system's self-calibration function dynamically corrects sound velocity deviations caused by water temperature changes, ensuring long-term stability of positioning accuracy. The anti-collision processing actively avoids signal interference by predicting individual movement trajectories, preventing positioning loss or errors due to individual aggregation. The anomaly detection algorithm automatically identifies abnormal patterns such as trajectory jumps and pauses, triggering alarms and review processes to effectively filter out invalid or erroneous data caused by tag detachment, temporary equipment malfunctions, or abnormal individual behavior. These mechanisms work together to ensure that the scalding process data ultimately bound to each pig's digital twin is not only complete but also highly reliable after multiple layers of verification, greatly enhancing the authority of traceability data as evidence for quality management and safety audits.
[0019] 3. This invention also deeply integrates the precise sensing data from the scalding station with the production line control system. Through independent station control units and a rule engine, it achieves automated production decision-making and flexible control based on real-time traceability data, driving the evolution of the traceability system from a record-keeping type to a decision-making and control type. The system generates process data packets containing precise spatiotemporal trajectories and anomaly markers, which are sent to the station control units in real time. The embedded rule engine performs instant reasoning and judgment on the data packets based on predefined process standards. Based on the judgment results, the system can automatically issue control commands to the production line actuators, enabling real-time interception and diversion of non-conforming items or immediate response to abnormal situations. This not only records traceability information for later retrieval but also transforms traceability information into input for real-time control of the production process, forming a closed loop of perception-traceability-decision-control. This directly improves the intelligence level, automation level, and real-time quality control of the production line while ensuring traceability capabilities. Attached Figure Description
[0020] Figure 1 This is a system architecture block diagram of the present invention; Figure 2 This is the overall flowchart of the immersion and ironing station tracking and data binding in this invention; Figure 3 This is a flowchart of the underwater acoustic positioning calculation in this invention; Figure 4 This is a flowchart of the spatiotemporal matching verification process for pool entry in this invention; Figure 5 This is a flowchart of the spatiotemporal and visual matching verification process for pool exit in this invention; Figure 6 This is a flowchart of the underwater anti-collision process in this invention; Figure 7 This is a flowchart of the anomaly detection and adjudication process in this invention; Figure 8 This is a flowchart of the synchronous quarantine workstation action binding process in this invention. Detailed Implementation
[0021] like Figures 1 to 8 As shown, the present invention relates to an Internet of Things-based pig slaughter traceability system, comprising a central processing unit and at least one workstation sensing subsystem communicatively connected to the central processing unit. The central processing unit is configured to integrate and process data from each workstation sensing subsystem to create a full-process digital twin record for each individual pig. The at least one workstation sensing subsystem includes a scalding workstation sensing subsystem. The central processing unit is configured to perform the following: create a dynamic digital twin for each individual pig; perform spatiotemporal matching between the entry event and the calculated first underwater positioning coordinates of the individual pig, and upon successful verification, initiate the tracking of the individual pig's underwater trajectory and bind the trajectory data to the corresponding dynamic digital twin; perform spatiotemporal matching between the exit event, the individual pig's last underwater positioning coordinates, and the image, and upon successful verification, confirm that the individual pig has completed the scalding process and generate a process data package containing the complete spatiotemporal trajectory; The immersion station sensing subsystem includes a high-temperature resistant electronic tag, an underwater acoustic positioning beacon array, a radio frequency reading and writing unit, and a visual capture unit. The high-temperature resistant electronic tag is configured on individual pigs and is used to emit an acoustic signal containing identity information after being activated underwater in the scalding pool. The underwater acoustic positioning beacon array is deployed in the scalding tank to receive the acoustic signals and calculate the real-time three-dimensional underwater trajectory of individual pigs. The radio frequency reading and writing unit is deployed at the inlet and outlet of the scalding tank, and is used to communicate radio frequency with the high temperature resistant electronic tag when individual pigs enter and leave the tank, and generate entry and exit events respectively. The visual capture unit is correspondingly installed at the outlet of the scalding tank and is used to capture images of individual pigs leaving the tank; The underwater acoustic positioning beacon array, the radio frequency read / write unit, and the visual capture unit are all communicatively connected to the central processing unit.
[0022] In an embodiment of the present invention, the high-temperature resistant electronic tag includes a sealed shell, a microcontroller, an acoustic-electric transducer, a radio frequency module, and a power supply; the acoustic-electric transducer is used to receive a preset wake-up sound wave and convert it into an electrical signal, and to emit the acoustic signal under the control of the microcontroller; the radio frequency module is used to communicate with the radio frequency read / write unit; the sealed shell ensures that the electronic tag remains sealed in the high-temperature and high-humidity environment of the scalding tank, and the power supply is used for internal power supply.
[0023] In an embodiment of the present invention, the underwater acoustic positioning beacon array is composed of multiple smart acoustic beacons deployed in a non-uniform topology within the scalding tank, and deployed at one or two locations on the side wall and bottom of the scalding tank; each of the smart acoustic beacons integrates a sound wave transmitter, a sound wave receiver, a timing module, and a communication module. The sound wave transmitter is used to emit the preset wake-up sound wave; The acoustic receiver is used to receive the acoustic signals emitted by the high-temperature resistant electronic tag; The timing module is used to record the arrival time of sound waves with high precision. The communication module is used to upload the recorded time information to the central processing unit so that it can calculate the three-dimensional coordinates of individual pigs based on the time difference of arrival algorithm.
[0024] The central processing unit calculates the time of individual pigs at time [time value missing]. 3D coordinates This is achieved using the following formula for the time difference of arrival: ; In the formula: Let be the objective to be solved, and let be the time interval . The three-dimensional spatial coordinates of an individual pig; This represents the number of valid smart acoustic beacons participating in this positioning calculation. ); and They represent the first The and the first The known coordinates of an intelligent acoustic beacon in a pre-calibrated three-dimensional coordinate system; and These represent the arrival times of the same acoustic signal at the [number]th [position]. The and the first The absolute time of each beacon is recorded by the precision timing module of each beacon; The propagation speed of sound waves in the current scalding pool water environment is a dynamic parameter affected by water temperature and density. Represents the calculation point To the beacon The Euclidean distance, i.e., the theoretical distance; This represents the difference in measured distance calculated based on the time difference of arrival and the speed of sound; Explanation of the operational logic: This formula employs a positioning principle based on Time Difference of Arrival (TDoA). The system eliminates the dependence on clock synchronization between tags and beacons by measuring the time difference between the acoustic signal arrival from the tag to different beacons in the array, rather than the absolute arrival time. The core of the formula is a nonlinear least-squares optimization problem. It iteratively searches for a spatial point. This minimizes the sum of squared errors between the theoretical distance differences (calculated based on coordinates) and the measured distance differences (calculated based on time difference and sound speed) from this point to each beacon pair. This point minimizes the total error. This means that the optimal estimated position of the tag (individual pig) at time t is determined. This algorithm effectively overcomes the impact of complex underwater environments (multipath effects, noise) on single ranging methods. Through multi-beacon data fusion and optimized estimation, it significantly improves positioning accuracy and stability under non-line-of-sight and strong interference conditions. It provides a reliable and continuous spatial trajectory data foundation for the entire traceability system, and is a prerequisite for achieving high-confidence spatiotemporal binding.
[0025] The central processing unit is further configured to perform self-calibration on the underwater acoustic positioning beacon array, including: periodically transmitting calibration signals through selected beacons in the array, which are received by other beacons; and dynamically correcting the sound wave propagation speed model in water and the beacon position error based on the known physical distance between beacons and the measured signal propagation time.
[0026] Among them, the speed of sound propagation The real-time estimate is calculated using the following formula: ; In the formula: This represents the average propagation speed of the sound wave to be estimated in the current water body; The number of valid measurement pairs used to calculate the average sound velocity within a calibration period; For the first During the secondary calibration measurement, the beacon was transmitted. With receiving beacon The physical distance between them, which was precisely measured and stored during system deployment; For the first During the second calibration, the transmitting beacon The absolute time of the recorded signal transmission.
[0027] For the first During the second calibration, the receiving beacon... The absolute time of the recorded signal reception; The signal represents the signal from the beacon. propagation to beacon The time spent; Explanation of the operational logic: This formula is used for real-time online calibration of the speed of sound. These are the key parameters of the aforementioned positioning algorithm. The system periodically uses intelligent acoustic beacons with known precise locations as reference stations, one of which transmits a calibration signal, while the others receive it. This is achieved through a known fixed geometric distance. The propagation time difference is used to calculate a set of sound speed observations directly based on the principle of velocity = distance / time. The arithmetic mean of these observations is then taken as the best estimate of the sound speed in the current environment. This process is continuous, enabling dynamic tracking and correction of the sound speed. This self-calibration mechanism eliminates the impact of sound speed drift caused by changes in water temperature and water composition on positioning accuracy, ensuring the environmental adaptability of the positioning algorithm. It upgrades the entire positioning system from an open-loop system relying on fixed empirical parameters to a self-correcting closed-loop system, thereby maintaining consistent high-precision positioning performance over long periods of operation and across different production batches.
[0028] In an embodiment of the present invention, the spatiotemporal matching process configured to be executed by the central processing unit specifically includes: The central processing unit receives the pool entry event, which includes a first precise timestamp; Simultaneously, it receives the first valid underwater positioning coordinates calculated by the underwater acoustic positioning beacon array that are within the same time window as the first precise timestamp; Calculate the time difference between the first precise timestamp and the time point at which the first valid underwater positioning coordinates are obtained. If the time difference is less than the first preset time tolerance threshold and the first valid underwater positioning coordinates are located within a reasonable spatial range of the scalding pool inlet, then the match is determined to be successful.
[0029] The successful determination condition for the spatiotemporal matching of the pool entry is defined by the following formula: and ; In the formula: The entry event timestamp generated by the radio frequency read / write unit deployed at the pool entrance marks the first precise timestamp when the system senses an individual's arrival at the entrance via radio frequency.
[0030] The central processing unit calculates the first valid underwater coordinates based on acoustic positioning beacon data. The corresponding system time, i.e., the calculation time.
[0031] The tolerance threshold set for time synchronization is used to offset the slight delays in the data acquisition, transmission and processing paths of different sensors, i.e., the first preset time tolerance threshold.
[0032] This is the first reliable three-dimensional coordinate of an individual after it enters the water body, calculated using the algorithm described above.
[0033] These are the coordinates of the center or feature point of the scalding tank inlet area, defined in the three-dimensional spatial model; that is, the spatial reference point coordinates of the scalding tank inlet area.
[0034] The tolerance threshold set for the spatial location defines the physical boundary range of the entrance area, i.e., the first preset spatial tolerance threshold.
[0035] Explanation of the operational logic: This formula defines the verification logic for the critical event of a pig entering the scalding tank. It employs a spatiotemporal joint decision-making process: in the time dimension, it requires that the timestamp of the entry event based on radio frequency (RF) be highly synchronized with the timestamp of the first underwater coordinate based on acoustic positioning; in the spatial dimension, it requires that the first calculated underwater coordinate must fall within the predefined physical area of the entrance. Only when both the time proximity and spatial rationality conditions are met simultaneously does the system determine that the pig's identity and entry behavior have been successfully bound together, and initiate trajectory tracking. This matching algorithm fundamentally prevents confusion caused by RF misreading (such as reading a tag from an adjacent channel) or acoustic positioning initialization errors. Through rigid spatiotemporal constraints, it establishes a strong association at the starting point of the traceability chain, ensuring that all subsequent process data can be accurately attributed to the correct individual, laying the foundation for the authenticity of the entire process traceability data.
[0036] The spatiotemporal matching process configured to be executed by the central processing unit further includes pool exit verification: The central processing unit receives the pool exit event, which includes a second precise timestamp; Simultaneously, it receives the last valid underwater positioning coordinates calculated by the underwater acoustic positioning beacon array that are within the same time window as the second precise timestamp, as well as an image containing individual pig characteristics captured by the visual capture unit near the second precise timestamp; Calculate the time difference between the second precise timestamp and the time point at which the last valid underwater positioning coordinates are obtained. If the time difference is less than the second preset threshold, and the last valid underwater positioning coordinates are located within a reasonable spatial range of the scalding pool outlet, and the individual characteristics of the pigs identified in the image match the expected individuals leaving the pool, then the match is determined to be successful.
[0037] The successful determination condition for spatiotemporal matching of the pool exit is progressively defined based on the above formula as follows: and and ; In the formula: This is the second precise timestamp; and These are the calculation time and coordinates of the last valid underwater positioning coordinate; and These are the second preset time and space tolerance thresholds, respectively; This serves as a spatial reference point for the export area. This represents a similarity function, whose range is typically within a certain range. between, It is a feature vector (such as contour, key points, local features, etc.) extracted in real time from the images captured by the exit camera. It is the feature vector that the individual pig should have when it is expected to be released from the pool (from the image of the pig entering the pool or the individual file). This is the threshold for similarity judgment. Visual verification is considered successful only when the similarity function value is higher than this threshold.
[0038] Explanation of the operational logic: Based on the aforementioned spatiotemporal matching, this formula introduces a third layer of verification—visual feature comparison—forming a more rigorous logic for determining the exit event. It requires not only spatiotemporal continuity between the exit radio frequency event and the last underwater positioning point, but also that the captured image features at this time match the individual's expected features (such as those based on the expected morphology or number upon entry into the pool). This is a progressive multimodal information fusion decision-making process; only when the evidence from the radio frequency, acoustic, and visual channels corroborates each other can the individual's completion of the scalding process be definitively confirmed. This triple verification mechanism significantly enhances the anti-interference capability and fault tolerance of exit event discrimination. Even if the radio frequency signal is briefly lost or there is a minor error at the end of the acoustic trajectory, visual information can serve as strong supplementary evidence; conversely, if visual recognition is obscured by fog, spatiotemporal matching can still provide a basic judgment. This design ensures that the identification of process transition points has extremely high robustness and accuracy in complex industrial environments, effectively eliminating the risk of chain drops or errors.
[0039] In an embodiment of the present invention, the central processing unit is further configured to perform underwater collision avoidance processing: when multiple individual pigs are simultaneously tracked by the underwater acoustic positioning beacon array, the future movement path of each trajectory is predicted; if it is predicted that the movement paths of at least two individual pigs may intersect, the radio frequency read / write unit sends an instruction to the high-temperature resistant electronic tag worn by the at-risk individual to dynamically adjust the transmission power or transmission frequency of its acoustic signal in order to reduce the risk of signal interference.
[0040] The central processing unit predicts individual pigs. In the future Location at any moment A linear extrapolation model based on the current motion state is adopted: ; Two pig individuals and Risk of trajectory intersection It is evaluated by calculating the minimum future distance between their predicted locations: ; like Less than the risk distance threshold If so, it is determined that there is a risk of intersection and an anti-collision command is triggered; In the formula: For individuals At the present moment The coordinates, i.e., the current position; For individuals At the present moment The instantaneous velocity vector can be obtained by differencing and filtering its recent historical trajectory coordinates; The predicted time step; Individuals representing predictions In the future The position at that moment; This represents the length of the future time window for risk prediction. Represents a future time window Internally changing time variables; , Representative of individuals and In the future Predicted location at any given time; Representative of individuals and The risk metric for trajectory intersection between the two is defined as the minimum distance between all predicted locations of the two trajectories within a future window.
[0041] This represents a preset risk distance threshold, when If the value is less than this, it is considered to be at high risk of signal interference.
[0042] Explanation of the operational logic: This algorithm aims to proactively prevent acoustic signal interference caused by multiple individuals being too close together. The underwater trajectory collision avoidance prediction formula is a simple kinematic extrapolation model that linearly predicts the position of an individual within a short period of time based on its current position and instantaneous velocity. The risk assessment algorithm formula, based on the underwater trajectory collision avoidance prediction formula, calculates the minimum spatial distance between the predicted trajectories of any two individuals within a future timeframe. By continuously monitoring this minimum predicted distance for all pairs of individuals, the system can provide early warnings of potential signal conflict zones and proactively intervene to adjust. This algorithm transforms the tracking system from a passive data recorder into a proactive participant in optimizing the production process. Through predictive collision avoidance intervention, the system can effectively maintain the quality of underwater positioning signals, avoiding positioning loss or coordinate jumps caused by signal aliasing, thereby ensuring the continuity and reliability of each trajectory data under high-density production rhythms. This embodies the concept of system-level intelligent control.
[0043] In an embodiment of the present invention, the central processing unit is further configured to perform anomaly detection and adjudication: during the tracking of the underwater trajectory of an individual pig, the continuity of the trajectory, the speed and direction of movement are analyzed in real time to determine whether they conform to a preset physical motion model; if a trajectory jump, long-term stagnation or abnormal movement pattern is detected, it is determined to be an abnormal event; when an individual pig with an abnormal event leaves the pool, the central processing unit triggers an alarm and generates an interception command to guide the individual pig into the review channel.
[0044] Anomaly detection is achieved by monitoring the spatiotemporal continuity of trajectory points and defining adjacent solution times. and The trajectory points are respectively and Its theoretical achievable distance should be limited by the maximum reasonable speed. Continuous abnormal indicators Defined as: ; like ( If the threshold for the jump is set, then it is determined to be an abnormal trajectory jump.
[0045] Stagnation anomalies are calculated within a time window. Spatial dispersion of internal trajectory points Come and test: ; like ( If the average speed within the window is too low (the threshold for stagnation), it is considered an abnormal long-term stagnation.
[0046] In the formula: , Represents the coordinates of two trajectory points that are consecutive in time, i.e., adjacent trajectory points; , Represents corresponding and The computation time; The maximum possible speed of movement of pigs in the scalding tank is set based on common technological knowledge, i.e., the maximum reasonable speed. This represents a continuous abnormality indicator; a value greater than 0 indicates that the actual speed exceeds the maximum reasonable speed. The threshold for determining the transition is when Triggering a jump alarm at any time; The sliding time window used for analysis; For window The number of trajectory points contained within; For window The first Coordinates of a trajectory point; For window The average of the coordinates of all trajectory points (center point); For window The spatial dispersion (standard deviation) of points within the trajectory; the smaller the value, the more clustered the points are. The threshold for determining stagnation is when... And a stall alarm is triggered when the low-speed condition is met; Explanation of the operational logic: This algorithm is used to automatically identify two typical anomalies in trajectory data. The core idea of the continuity anomaly detection formula is velocity violation checking. It calculates the actual average velocity between two adjacent trajectory points and compares it with a theoretical maximum reasonable velocity. If the difference is too high, it is judged as an impossible physical movement, i.e., a jump. The core idea of the stagnation anomaly detection formula is spatial clustering analysis. It calculates the dispersion (standard deviation) of all trajectory points relative to their center point within a sliding time window. If the dispersion is extremely low and the average velocity is close to zero, it is judged that the individual may be in a stagnant state. The anomaly detection algorithm endows the system with self-awareness of data quality. It can identify unreliable data segments caused by tag detachment, signal obstruction, beacon failure, or abnormal individual behavior (such as being stuck) in real time. By automatically marking these abnormal events and triggering handling procedures, the system not only ensures the authenticity and validity of the information entering the traceability database, but also timely exposes potential equipment problems or operational bottlenecks in the production process, realizing the linkage between quality control and production management.
[0047] In an embodiment of the present invention, a workstation control unit is also included, which is communicatively connected to the slaughter production line control system; the central processing unit is connected to the workstation control unit, and the process data packets or abnormal event adjudication results generated by the central processing unit are sent to the workstation control unit in real time; the workstation control unit controls the path sorting, delayed processing or offline processing of the corresponding pig individuals in subsequent processes according to the received data packets or adjudication results.
[0048] The workstation control unit integrates a rule engine; the rule engine is pre-set with production process rules, and the process data packet sent by the central processing unit serves as input facts; the rule engine infers the process data packet based on the production process rules, determines whether the individual pig meets the conditions for entering the next process, and outputs corresponding control commands to the execution mechanism of the slaughtering production line.
[0049] The production process rules include: scalding time rules, water temperature consistency rules, trajectory integrity rules, and abnormal event rules; The reasoning logic of the rule engine includes: if the scalding time in the process data packet is within the standard range, and the trajectory is continuous and complete without abnormal event markers, it is determined to be qualified, and a control command is output to allow the pig to enter the next normal process; otherwise, it is determined to need to be disposed of, and a control command is output to allow the pig to enter the diversion or review process.
[0050] In an embodiment of the present invention, the IoT-based pig slaughtering traceability system further includes a synchronous quarantine workstation sensing subsystem as another workstation sensing subsystem. This synchronous quarantine workstation sensing subsystem is communicatively connected to the central processing unit and is deployed at the synchronous quarantine workstations of the slaughtering production line, including intelligent quarantine tools and quarantine workstations. The intelligent quarantine tool has a built-in inertial sensor, which is used to generate an action trigger signal when the quarantine officer performs a specific quarantine action; The quarantine workstation integrates a second radio frequency read / write unit and a second vision unit; The central processing unit is further configured to: receive the action trigger signal and simultaneously acquire the individual pig identity information read by the second radio frequency read / write unit and the carcass identification information captured by the second vision unit; bind the quarantine action, identity information and carcass identification information within a time window, and prompt the quarantine officer to input or select the quarantine result, ultimately forming a digital quarantine data package bound with individual identity, precise time, specific action characteristics and quarantine result, and associating it with the full-process digital twin record of the individual pig.
[0051] The core of the action binding process lies in accurately identifying the timing of the quarantine action. The logic of the central processing unit binding information includes: Establish a standardized characteristic waveform model for the specific quarantine action; When a sensor data stream is received from the intelligent quarantine tool, it is matched in real time with the standardized feature waveform model; Upon successful matching, the current timestamp is immediately locked, and the data acquired by the second RF read / write unit and the second vision unit within a preset time period before and after the timestamp are retrieved for association verification. The final binding is only completed when the identity information and the body identification information point to the same target.
[0052] The motion feature waveform matching is achieved by calculating the sensor data stream. With standardized models sliding window cross-correlation value Implement this feature, and determine a successful match when the threshold is exceeded: ; when At that time, the determination is made in the time delay. The action was successfully matched, and the bound timestamp was locked. This ensures precise alignment of actions with identity and visual information in the temporal domain.
[0053] In the formula: The real-time sensor data stream uploaded from the smart quarantine tool is a function of time; The representative standardized characteristic waveform model is a typical waveform pattern obtained by learning from a large amount of sensor data of standardized quarantine procedures; As a time-shift variable, it indicates that the template will be... The amount shifted to the left (past) on the timeline; Represents time shift The cross-correlation function value at all time points, this value is obtained by applying the cross-correlation function to all time points. of and The product of the products is summed, and the larger the value, the better. The higher the matching degree at the time shift; The threshold representing a successful cross-correlation match; The timestamp representing the finalized action binding is calculated by subtracting the best match time shift from the current time. Calculated; Explanation of the computational logic: This algorithm is used to accurately identify specific operational actions (such as stabbing) of quarantine personnel at the synchronous quarantine station and uses them as trigger signals for binding data. It employs cross-correlation analysis to compare real-time acquired sensor data streams (such as acceleration and angular velocity sequences) with a pre-learned template waveform representing a standard quarantine action. Cross-correlation function. The value reflects the time shift The similarity between real-time data and the template waveform is measured. When the similarity exceeds a threshold, it is considered that... The algorithm identifies a standard action performed prior to the specified time, allowing for precise deduction and pinpointing of the exact moment the action occurred. This enables accurate digital capture of discontinuous, discrete human actions. It transforms the quarantine process, which relies on voluntary recording by personnel, into a standardized process of automatic, objective, and seamless recording by the system. By precisely pinpointing the moment of the action and correlating it with data from other sensors (RFID, vision) before and after that moment, it ensures the complete capture of crucial information such as who, when, which individual, and what action was performed. This significantly enhances the automation level of quarantine records and their evidentiary value, making it a key technology for achieving last-mile traceability throughout the entire process.
[0054] In an embodiment of the present invention, the system further includes a data sandbox and a traceability query interface; the data packets for each process generated by the central processing unit are classified and stored in different security areas of the data sandbox according to data sensitivity and user role permissions; the traceability query interface extracts and combines data of the corresponding level from the data sandbox according to the authorization level of the queryer, and generates a hierarchical traceability report for different objects.
[0055] In an embodiment of the present invention, the central processing unit, the workstation control unit, and other control systems of the slaughtering production line together constitute a distributed control system architecture. The central processing unit, as an intelligent sensing and control node for key workstations such as scalding and quarantine, exchanges data and coordinates instructions with the main control system of the production line through standard industrial communication protocols to achieve flexible control and closed-loop quality traceability of the entire pig slaughtering process.
[0056] The embodiments disclosed in this invention are preferred embodiments, but are not limited thereto. Those skilled in the art can easily understand the spirit of this invention based on the above embodiments and make different extensions and variations, but as long as they do not depart from the spirit of this invention, they are all within the protection scope of this invention.
Claims
1. A traceability system for pig slaughter based on the Internet of Things, characterized in that, It includes a central processing unit and at least one scalding station sensing subsystem communicatively connected to the central processing unit; the central processing unit is configured to perform: Create a dynamic digital twin for each individual pig; The event of entering the pool is spatiotemporally matched with the first underwater positioning coordinates of the individual pig obtained from the solution. After successful verification, the underwater trajectory tracking of the individual pig is started, and the trajectory data is bound to the corresponding dynamic digital twin. The event of the pig leaving the pool, the last valid underwater positioning coordinates of the individual pig, and the image are spatiotemporally matched. After successful verification, it is confirmed that the individual pig has completed the scalding process, and a process data package containing the complete spatiotemporal trajectory is generated. The scalding station sensing subsystem includes: High-temperature resistant electronic tags are attached to individual pigs and are used to emit acoustic signals containing identification information after being activated underwater in a scalding tank. An underwater acoustic positioning beacon array is deployed in the scalding tank to receive the acoustic signals and calculate the real-time three-dimensional underwater trajectory of individual pigs. An RFID read / write unit is deployed at the inlet and outlet of the scalding tank to communicate with the high-temperature resistant electronic tag when individual pigs enter and leave the tank, generating entry and exit events respectively. A visual capture unit is installed at the outlet of the scalding tank to capture images of individual pigs leaving the tank.
2. The IoT-based pig slaughter traceability system according to claim 1, characterized in that, The high-temperature resistant electronic tag includes a sealed shell, a microcontroller, an acoustic-electric transducer, a radio frequency module, and a power supply; the acoustic-electric transducer is used to receive a preset wake-up sound wave and convert it into an electrical signal, and to emit the acoustic signal under the control of the microcontroller; the radio frequency module is used to communicate with the radio frequency read / write unit; the sealed shell ensures that the electronic tag remains sealed in the high-temperature and high-humidity environment of the scalding tank.
3. The IoT-based pig slaughter traceability system according to claim 1, characterized in that, The underwater acoustic positioning beacon array consists of multiple smart acoustic beacons deployed in a non-uniform topology within the scalding tank; each smart acoustic beacon integrates: A sound wave transmitter, used to emit a preset wake-up sound wave; An acoustic receiver is used to receive the acoustic signals emitted by the high-temperature resistant electronic tag; The timing module is used to record the arrival time of sound waves with high precision. The communication module is used to upload the recorded time information to the central processing unit; The central processing unit is configured to calculate the three-dimensional coordinates of individual pigs based on a time difference of arrival algorithm, specifically by minimizing the following objective function: ; In the formula, Indicates at time The three-dimensional spatial coordinates of an individual pig; The number of valid beacons representing the location; and They represent the first The and the first The known coordinates of the beacon; and These represent the signals arriving at the first... The and the first The absolute time of each beacon; The speed at which sound waves propagate in the current scalding pool water environment.
4. The IoT-based pig slaughter traceability system according to claim 3, characterized in that, The central processing unit is also configured to perform self-calibration on the underwater acoustic positioning beacon array, including: It periodically transmits calibration signals through selected beacons, which are then received by other beacons. Based on the known physical distance between beacons and the measured signal propagation time, the sound wave propagation speed is dynamically corrected. The estimated value is calculated using the following formula: ; In the formula, To effectively measure the number of pairs; For the first beacon transmission during secondary calibration measurement With receiving beacon The physical distance between them; and The first The absolute time of signal transmission and reception during the next calibration.
5. A pig slaughter traceability system based on the Internet of Things according to claim 1, characterized in that, The spatiotemporal matching process for pool entry executed by the central processing unit specifically includes: Receive containing the first precise timestamp The pool entry event; Obtain the first valid underwater positioning coordinate within the same time window as the first precise timestamp. and its solution time ; When both conditions are met and When the match is successful, the formula is as follows: The first preset time tolerance threshold; The coordinates of the spatial reference point in the scalding tank inlet area; This is the first preset spatial tolerance threshold.
6. The IoT-based pig slaughter traceability system according to claim 1, characterized in that, The spatiotemporal matching process for pool exit executed by the central processing unit specifically includes: Receive contains a second precise timestamp The incident of the fish leaving the pool; Obtain the last valid underwater positioning coordinate within the same time window as the second precise timestamp. and its solution time And images of captured individual pigs; When both conditions are met and and When the match is successful, the formula is as follows: and These are the second preset time and space tolerance thresholds, respectively; This serves as a spatial reference point for the export area. Feature vectors extracted from images With the expected feature vector The similarity function; This is the similarity threshold.
7. A pig slaughter traceability system based on the Internet of Things according to claim 1, characterized in that, The central processing unit is also configured to perform underwater collision avoidance processing: When the underwater trajectories of multiple individual pigs are tracked simultaneously, the current position of each individual pig is considered. and instantaneous velocity vector A linear extrapolation model is adopted. Predicting future location, where, The predicted time step; Calculate any two individuals and The predicted trajectory in the future time window The minimum distance within is given by the following formula: ; In the formula, Represents a future time window Internally changing time variables; like Less than the preset risk distance threshold If an intersection risk is detected, the radio frequency read / write unit will send a command to the high-temperature resistant electronic tag worn by the at-risk individual to dynamically adjust the transmission parameters of its acoustic signal to reduce interference.
8. A pig slaughter traceability system based on the Internet of Things according to claim 1, characterized in that, The central processing unit is also configured to perform anomaly detection and adjudication: Real-time analysis of the continuity and movement patterns of individual pigs' underwater trajectories; By calculating continuous anomaly indicators If the detection trajectory changes, Then it is determined to be an abnormal trajectory jump, where, , For adjacent trajectory points; To achieve the maximum reasonable speed; The threshold for the transition; By calculating the sliding time window Spatial dispersion of internal trajectory points If the detection stalls, Furthermore, if the average speed is too low, it is judged as an abnormal prolonged stagnation, where, The stagnation threshold; When an abnormal pig is detected leaving the pool, an alarm is triggered and an interception command is generated, guiding the pig into the verification channel.
9. A pig slaughter traceability system based on the Internet of Things according to claim 1, characterized in that, It also includes a workstation control unit that is communicatively connected to the slaughter production line control system; the central processing unit is connected to the workstation control unit and is used to send the generated process data package or abnormal event adjudication result to the workstation control unit; The workstation control unit integrates a rule engine, which is pre-set with production process rules. It is used to reason based on received data packets or results and output control commands to the execution mechanism of the slaughtering production line to control the path sorting, delayed processing or off-line processing of the corresponding pig individuals.
10. A pig slaughter traceability system based on the Internet of Things according to claim 1, characterized in that, It also includes at least one synchronous quarantine workstation sensing subsystem that is communicatively connected to the central processing unit. The synchronous quarantine workstation sensing subsystem includes intelligent quarantine tools and quarantine workstations located at the synchronous quarantine workstation. The intelligent quarantine tool has a built-in inertial sensor to generate action trigger signals when performing specific quarantine actions; The quarantine workstation integrates a second radio frequency read / write unit and a second vision unit; The central processing unit is also configured to: The system receives the action trigger signal and simultaneously acquires the individual pig identification information read by the second radio frequency read / write unit and the carcass identification information captured by the second vision unit. The action trigger signal, identity information, and carcass identification information are bound within a time window, and the user is prompted to input the quarantine result to form a quarantine data package. Among them, action binding is achieved by calculating the sensor data stream of intelligent quarantine tools. With standardized motion feature waveform model sliding window cross-correlation value Achieve, when The system determines that the action match is successful and locks the bound timestamp.