Intelligent pigsty monitoring system based on multi-source data fusion analysis
By integrating and analyzing multi-source data, an intrinsic health value matrix for pigs is constructed, which solves the problem of non-integration of multi-source data in existing pigpen monitoring technologies and enables accurate monitoring of pig health status and timely disease prevention and control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU ZHONGHE PIG RAISING EQUIP
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-12
AI Technical Summary
Existing pig farm monitoring technologies lack effective integration and analysis of multi-source data, resulting in blind and inefficient prevention and control measures that fail to meet the scientific, efficient, and precise monitoring needs of modern pig farming, especially in the early warning and high false alarm rates of swine respiratory disease syndrome.
By acquiring real-time body temperature and activity levels of pigs, combined with ambient temperature and the intensity of contact between pigs, a polynomial matrix is constructed and iteratively solved to obtain the intrinsic health value of the pigs, enabling accurate analysis of individual health risks and group transmission risks.
This improved the comprehensiveness and accuracy of monitoring the health status of pigs, ensured the timeliness and effectiveness of disease transmission prevention and control measures, and reduced the false alarm rate.
Smart Images

Figure CN122201765A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to an intelligent pigpen monitoring system based on multi-source data fusion analysis. Background Technology
[0002] In the pig farming industry, the health of pigs directly affects farming efficiency and industry stability. Porcine respiratory disease syndrome (PRDS) is a primary threat to the industry, and its outbreaks cause significant economic losses to farmers. This disease typically begins with early infection in individual pigs and then spreads rapidly throughout the herd via air and contact. A large-scale outbreak not only increases pig mortality but also affects growth rate and meat quality, ultimately reducing the overall value of the pig herd.
[0003] Existing pigpen monitoring technologies have significant shortcomings in addressing health threats such as swine respiratory disease syndrome. Firstly, early warning capabilities are weak, relying solely on monitoring group environmental parameters. For example, issuing an alert when average ammonia concentration exceeds the standard means the optimal control period has already passed. Alerts based on individual symptoms, such as coughing sounds, often fail to provide ultra-early warnings because the pigs have already entered the infectious stage by the time abnormal coughing is detected. Secondly, monitoring from a single data source is susceptible to interference. For instance, environmental noise such as equipment collisions and pig fights can trigger numerous false alarms in coughing sound monitoring, increasing the workload of farm workers and reducing the reliability of alerts.
[0004] Therefore, existing pig pen monitoring technologies lack effective integration and analysis of multi-source data, fail to fully utilize the multi-dimensional characteristics of pigs such as individual body temperature, activity level, group activity, and environmental parameters, make it difficult to comprehensively and accurately assess the health status of pigs, and make it impossible to accurately determine the source and direction of disease transmission. This results in blind and inefficient prevention and control measures, which are unable to meet the scientific, efficient, and precise monitoring needs of modern pig farming. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide an intelligent pigpen monitoring system based on multi-source data fusion analysis to solve the problem that existing pigpen monitoring technologies lack effective fusion analysis of multi-source data, resulting in blind and inefficient prevention and control measures that fail to meet the scientific, efficient, and precise monitoring needs of modern pig farming.
[0006] This invention provides an intelligent pigpen monitoring system based on multi-source data fusion analysis, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it performs the following steps:
[0007] For any given pig, obtain the real-time body temperature and real-time activity level of the pig at the current monitoring time. Based on the baseline deviation of the real-time body temperature and the baseline deviation of the real-time activity level, obtain the observed health value of the pig at the current monitoring time.
[0008] Based on the location distance between every two pigs in the preset historical period before the current monitoring time, the contact type of any pig is analyzed to obtain the intelligent contact intensity between any pig and each other pig at the current monitoring time; the real-time ambient temperature of any pig at the current monitoring time is obtained to obtain the environmental correction factor corresponding to any pig.
[0009] Based on the environmental correction factor of any pig, the observed health value, and the intelligent contact intensity between any pig and each other pig at the current monitoring time, a polynomial is constructed to obtain the intrinsic health value of any pig at the current monitoring time.
[0010] A polynomial is constructed for each pig to form a polynomial matrix. The polynomial matrix is iteratively solved to obtain the intrinsic health value of each pig at the current monitoring time. Based on the intrinsic health value of each pig at the current monitoring time, the individual health risk and group transmission risk of each pig are analyzed to obtain the pig supervision decision results.
[0011] Preferably, obtaining the observed health value of any pig at the current monitoring time based on the baseline deviation of the real-time body temperature and the baseline deviation of the real-time activity level includes:
[0012] Within a preset time period prior to the current monitoring time, the historical body temperature and historical activity of any pig at multiple identical times are obtained, and the historical body temperature sequence and historical activity sequence are obtained respectively. The mean and variance of the body temperature in the historical body temperature sequence are calculated, and the mean and variance of the activity in the historical activity sequence are calculated.
[0013] Calculate the temperature difference between the real-time body temperature and the mean body temperature, and use the ratio of the temperature difference to the body temperature variance as the benchmark deviation of the real-time body temperature; calculate the activity level difference between the real-time activity level and the mean activity level, and use the ratio of the activity level difference to the activity level variance as the benchmark deviation of the real-time activity level.
[0014] The maximum value between the baseline deviation of the real-time body temperature and the constant 0 is obtained and recorded as the first maximum value. The maximum value between the opposite of the baseline deviation of the real-time activity level and the constant 0 is obtained and recorded as the second maximum value. The sum of the constant 1, the first maximum value and the second maximum value is calculated, and the reciprocal of the sum is taken as the observed health value of any pig at the current monitoring time.
[0015] Preferably, the step of analyzing the contact type of any pig based on the location distance between every two pigs within a preset historical time period prior to the current monitoring time, to obtain the intelligent contact intensity between any pig and each other pig at the current monitoring time, includes:
[0016] For any other pig, the preset historical period is divided into at least two time slices. Based on the positional distance between any pig and any other pig in each time slice, the contact type and effective contact duration of any pig and any other pig in each time slice are obtained. Based on the contact type and effective contact duration in each time slice, the historical contact intensity of any pig and any other pig in each time slice is obtained.
[0017] The historical contact intensity of any one pig and any other pig in each time slice is weighted and averaged using exponential decay to obtain the intelligent contact intensity of any one pig and any other pig at the current monitoring time. The intelligent contact intensity is calculated using the following formula:
[0018] ;
[0019] in, K represents the smart contact intensity between any pig i and any other pig j at the current monitoring time, and K represents the number of time slices. This represents an exponential function with the natural constant as its base. This represents the preset attenuation factor. This represents the historical contact intensity between any pig i and any other pig j in the k-th time slice, where k represents the sequence number of the time slice. The closer to the current monitoring time, the smaller the sequence number of the time slice.
[0020] Preferably, the step of obtaining the contact type and effective contact duration of any pig and any other pig in each time slice based on their positional distance in each time slice includes:
[0021] For any time slice, based on the positions of any pig and any other pig at each sampling time in any time slice, the position distance at each sampling time is obtained, and the sampling time corresponding to the position distance being less than a preset distance threshold is marked as the contact time, thereby obtaining all contact times in any time slice;
[0022] Calculate the average position distance and standard deviation of position distance based on the position distance at each contact moment. Construct a position change curve based on the position of any pig at consecutive contact moments. Obtain the tangential direction at each position on the position change curve. Take the mean of all tangential directions as the instantaneous movement direction of any pig. Obtain the velocity vector sequence of any pig based on the position change curve. Obtain the instantaneous movement direction and velocity vector sequence of any other pig. Calculate the minimum angle between the instantaneous movement directions of any pig and any other pig, denoted as the relative direction. Calculate the Pearson correlation coefficient between the velocity vector sequences of any pig and any other pig, denoted as the movement synchronization index. Obtain the duration corresponding to each consecutive contact moment as the effective contact duration in any time slice.
[0023] The contact type between any pig and any other pig in any time slice is determined based on the average positional distance, the standard deviation of positional distance, relative direction, movement synchronization index, and effective contact duration.
[0024] Preferably, the step of obtaining the historical contact intensity of any one pig and any other pig in each time slice based on the contact type and effective contact duration in each time slice includes:
[0025] For any given time slice, obtain the contact weight corresponding to the contact type in that time slice, where the contact type includes close contact, general contact, and slight contact, and the corresponding contact weights decrease sequentially; calculate the proportion of the effective contact duration in that time slice to the total duration of that time slice, and use the product of the time proportion and the contact weight as the historical contact intensity between any pig and any other pig in that time slice.
[0026] Preferably, the method for obtaining the environmental correction factor corresponding to any one of the pigs includes:
[0027] Calculate the absolute value of the temperature difference between the real-time ambient temperature and the preset optimal ambient temperature. Take the negative of the product of the absolute value of the temperature difference and the preset environmental sensitivity as the independent variable of an exponential function with the natural constant as the base, and obtain the environmental correction factor corresponding to any pig.
[0028] Preferably, the step of constructing a polynomial for obtaining the intrinsic health value of any pig at the current monitoring time, based on the environmental correction factor of any pig, the observed health value, and the intelligent contact intensity between any pig and each other pig at the current monitoring time, includes:
[0029] ;
[0030] in, This represents the observed health value of any pig i at the current monitoring time. This represents the intrinsic health value of any pig i at the current monitoring time. This represents the environmental correction factor corresponding to any pig i. Indicates the transmission rate. This represents the intelligent contact intensity between any pig i and any other pig j at the current monitoring time, where 1 represents a constant. Let J represent the intrinsic health value of any other pig j at the current monitoring time, where J represents the number of other pigs.
[0031] Preferably, the step of analyzing the individual health risk and group transmission risk of each pig based on its intrinsic health value at the current monitoring time to obtain the pig supervision decision results includes:
[0032] For any given pig, the individual health risk level of the pig is determined based on its intrinsic health value at the current monitoring time. The intelligent contact intensity between the pig and each other pig at the current monitoring time is used as a weight, and the difference between a constant 1 and the intrinsic health value of each other pig at the current monitoring time is summed in a weighted manner to obtain a weighted sum value. The product of the preset transmission risk weight and the weighted sum value is used as the group transmission risk score of the pig.
[0033] The group transmission risk level of any pig is determined based on the group transmission risk score. The comprehensive risk level is determined based on the individual health risk level and the group transmission risk level of any pig. The regulatory decision result for any pig is determined based on the comprehensive risk level.
[0034] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:
[0035] This invention analyzes the observed health values of pigs based on the dynamic changes of monitoring indicators (real-time body temperature and real-time activity levels) to intuitively reflect the health status of pigs. However, since the observed health values are only obtained from sensor monitoring data, and the contact between pigs and the environment in which the pigs live can affect their health, the observed health values are decomposed into the pig's intrinsic health value, environmental influence characteristics (environmental correction factors), and neighbor propagation influence characteristics (intelligent contact level). A polynomial is constructed to obtain the intrinsic health value of each pig at the current monitoring time, forming a polynomial matrix. The polynomial matrix is iteratively converged, and by continuously correcting the intrinsic health value, the health status reflected by the intrinsic health value of each pig is made closer to the real state, improving the comprehensiveness of pig health monitoring. This ensures the accuracy of individual health risk and group transmission risk assessment based on intrinsic health values, thereby improving the timeliness of disease prevention and control measures for pigs. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a flowchart of an intelligent pigpen supervision method based on multi-source data fusion analysis provided in Embodiment 1 of the present invention. Detailed Implementation
[0038] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.
[0039] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.
[0040] To illustrate the technical solution of the present invention, specific embodiments are described below.
[0041] Embodiment 1 of the present invention provides an intelligent pigpen monitoring system based on multi-source data fusion analysis, comprising a processor and a memory. The processor executes a computer program stored in the memory to implement an intelligent pigpen monitoring method based on multi-source data fusion analysis, such as... Figure 1 As shown, this intelligent pigpen monitoring method based on multi-source data fusion analysis includes the following steps:
[0042] Step S101: For any pig, obtain the real-time body temperature and real-time activity level of the pig at the current monitoring time, and obtain the observed health value of the pig at the current monitoring time based on the baseline deviation of the real-time body temperature and the baseline deviation of the real-time activity level.
[0043] To configure a sensor network in the pigpen, each pig is first fitted with a smart ear tag, which includes a body temperature sensor, a three-axis accelerometer, and a location tag. Several environmental sensors are evenly distributed throughout the pigpen, and a location base station is placed at each of the four corners. The smart ear tag is worn on the pig's right ear; the environmental sensors are installed 1.5 meters above the ground; the location base stations must cover the entire pigpen, ensuring no blind spots; the pig's body temperature is collected every 5 seconds; the pig's activity level is calculated every 5 minutes; the pig's location data is updated every second; and environmental data is collected every 5 minutes.
[0044] The specific calculation method for the activity level calculated every 5 minutes is as follows: The activity level of the pigs is extracted using a triaxial accelerometer. The triaxial accelerometer collects instantaneous triaxial acceleration, and the instantaneous activity intensity is obtained based on the triaxial acceleration. Where c represents the instantaneous activity intensity, These represent the triaxial acceleration values. Based on the sampling frequency of the triaxial accelerometer, the instantaneous activity intensity at each sampling moment is obtained. The average of all instantaneous activity intensities within one second is calculated to obtain the activity value per second. Then, all activity values within five minutes are summed to obtain the activity value over five minutes.
[0045] It should be noted that the data collected above can be cleaned immediately after collection. Data cleaning is an existing technology, and it is roughly described here: First, outliers are removed, for example, body temperatures greater than 41 degrees or less than 36 degrees are removed; then, missing values are filled in, for example, by using the average of the first 3 valid data to fill in the missing data.
[0046] Because different pigs have different body temperatures in different environments during actual monitoring, using a fixed threshold for health monitoring of each pig would lead to a large deviation in the monitoring results. Therefore, an adaptive baseline value (adaptive threshold) is adaptively obtained for each pig to analyze the observed health value of each pig.
[0047] Specifically, for any pig i, firstly, following the data collection methods described above, the real-time body temperature and real-time activity level of any pig i at the current monitoring time t are obtained. Then, based on historical monitoring data, the body temperature baseline and activity level baseline of any pig i are adaptively obtained: within a preset period (7 days) prior to the current monitoring time t, the historical body temperature and historical activity level of any pig i at multiple identical times are obtained, respectively, to obtain historical body temperature sequences and historical activity level sequences. The mean and variance of the historical body temperature sequences are calculated to form the body temperature baseline of any pig i; the mean and variance of the historical activity level sequences are calculated to form the activity level baseline of any pig i. For example, assuming the current monitoring time is 14:00, the mean and variance of the body temperature of any pig i at 14:00 each day over the past 7 days are calculated as the body temperature baseline of any pig i at the current monitoring time of 14:00. Similarly, the mean and variance of the activity level of any pig i at 14:00 each day over the past 7 days are calculated as the baseline of the activity level of any pig i at the current monitoring time of 14:00.
[0048] Finally, after obtaining the baseline body temperature and activity level of any pig i at the current monitoring time t, considering that when the real-time body temperature and real-time activity level of any pig at the current monitoring time deviate significantly from their baselines (body temperature baseline and activity level baseline), the corresponding observed health value is low, indicating that any pig has a health problem. Therefore, in this embodiment of the invention, a standardized deviation analysis is performed on the real-time body temperature and real-time activity level of any pig i at the current monitoring time t using the body temperature baseline and activity level baseline to obtain the observed health value of any pig i at the current monitoring time t. Specifically:
[0049] Calculate the temperature difference between the real-time body temperature and the mean body temperature, and use the ratio of this temperature difference to the body temperature variance as the baseline deviation of the real-time body temperature. Calculate the activity level difference between the real-time activity level and the mean activity level, and use the ratio of this activity level difference to the activity level variance as the baseline deviation of the real-time activity level. The formulas for calculating the baseline deviation of real-time body temperature and real-time activity level are as follows:
[0050]
[0051]
[0052] in, This represents the deviation of any pig i from the baseline in terms of its real-time body temperature T at the current monitoring time t. This represents the real-time body temperature of any pig i at the current monitoring time t. This represents the average body temperature of any pig i at the current monitoring time t. This represents the variance of the body temperature of any pig i at the current monitoring time t. This represents the baseline deviation of the real-time activity A of any pig i at the current monitoring time t. This represents the real-time activity level of any pig i at the current monitoring time t. This represents the average activity level of any pig i at the current monitoring time t. Let represent the variance of the activity level of any pig i at the current monitoring time t.
[0053] The maximum value between the baseline deviation of the real-time body temperature and the constant 0 is obtained and denoted as the first maximum value. The maximum value between the inverse of the baseline deviation of the real-time activity level and the constant 0 is obtained and denoted as the second maximum value. The sum of the constant 1, the first maximum value, and the second maximum value is calculated, and the reciprocal of the sum is taken as the observed health value of any pig at the current monitoring time. The formula for calculating the observed health value of any pig i at the current monitoring time t is as follows:
[0054]
[0055] in, This represents the observed health value of any pig i at the current monitoring time t, where 1 represents a constant and 0 represents a constant. This represents the function that takes the maximum value. This represents the deviation of any pig i from the baseline in terms of its real-time body temperature T at the current monitoring time t. This represents the baseline deviation of the real-time activity A of any pig i at the current monitoring time t.
[0056] It should be noted that, This means that when the real-time body temperature deviation is less than 0, it indicates that any pig i has a fever and has a negative impact on its health only when its real-time body temperature is higher than the baseline. Conversely, when the real-time body temperature is lower than the baseline, its health impact is not considered. Indicates if A negative value indicates that the real-time activity level is lower than the activity baseline. A positive number indicates that if If the value is positive, it corresponds to a real-time activity level higher than the activity baseline. When it is negative, at this time The value is 0. This item only applies when the real-time activity level is lower than the activity baseline, i.e., when activity decreases. The value is positive, otherwise it is 0. Therefore, the formula means that the observed health value = 1 / (1 + fever penalty + reduced activity penalty). When there is no penalty (i.e., normal body temperature and normal activity level), the observed health value is 1 (completely healthy). When there is a fever or reduced activity, the penalty is positive, and the observed health value will be less than 1, making the observed health value between 0 and 1. The less healthy (the larger the penalty), the closer the observed health value is to 0.
[0057] Step S102: Based on the location distance between every two pigs in the preset historical time period before the current monitoring time, analyze the contact type of any pig to obtain the intelligent contact intensity between any pig and each other pig at the current monitoring time; obtain the real-time ambient temperature of any pig at the current monitoring time to obtain the environmental correction factor corresponding to any pig.
[0058] Since the observed health value of pigs is obtained based on the characteristics fed back from real-time monitoring data collected at the current monitoring time, and since pigs are social animals, there is contact between pigs, which increases the risk of disease transmission. Moreover, environmental factors also affect the health of pigs. If only the observed health value is relied upon for judgment, it is difficult to find pathogens or individuals with a high risk of transmission. Therefore, in this embodiment of the invention, the observed health value is decomposed into three parts: the pig's intrinsic health value, environmental influence, and neighbor transmission influence. By establishing a polynomial correlation model, the intrinsic health value of each pig is solved, and the pig with the highest transmission risk is determined based on the intrinsic health value.
[0059] Taking any pig i as an example, a neighbor propagation impact analysis is first performed on any pig i to obtain the intelligent contact intensity between any pig i and each other pig at the current monitoring time t. Here, "other pigs" refers to pigs other than any other pig. Specifically, since the pig location data is updated every second, the location of each pig is obtained at each sampling time (location update time) before the current monitoring time, allowing us to determine the location distance between any two pigs. Then, based on the location distance between any two pigs within a preset historical time period before the current monitoring time, the contact type of any pig i is analyzed to obtain the intelligent contact intensity between any pig i and each other pig at the current monitoring time t. Since contact risk is a process, the past 6 hours are set as the preset historical time period for the current monitoring time t. This is not restricted here and can be set according to the required analysis accuracy.
[0060] Taking any other pig j as an example, the preset historical period is divided into at least two time slices according to a 5-minute time window, with each time slice corresponding to 5 minutes. Based on the positional distance between any pig i and any other pig j in each time slice, the contact type and effective contact duration of any pig i and any other pig j in each time slice are obtained for neighbor propagation impact analysis. For any time slice, based on the positional distance between any pig i and any other pig j at each sampling moment in that time slice, the sampling moments corresponding to positional distances less than a preset distance threshold are marked as contact moments. The preset distance threshold is preferentially set to 0.5 meters, that is, if the positional distance between two pigs is less than 0.5 meters, it is considered that the two pigs have made contact at the corresponding sampling moment. Therefore, all contact moments in any time slice are obtained.
[0061] In this embodiment of the invention, contact is divided into three levels: close contact, general contact, and slight contact. Further, the average positional distance and standard deviation of positional distance are calculated based on the positional distance at each contact moment. The average positional distance characterizes the closeness of the contact, and the standard deviation of positional distance characterizes the stability of the contact. Based on the position of any pig i at consecutive contact moments, a position change curve for any pig i is constructed. The tangent direction at each position on the position change curve is obtained, and the mean of all tangent directions is taken as the instantaneous motion direction of any pig i. Simultaneously, the magnitude and direction of the velocity of any pig i are obtained from the position change curve, forming a velocity vector sequence, where the velocity... The acquisition of vector sequences is existing technology and will not be elaborated here. Similarly, the instantaneous movement direction and velocity vector sequence of any other pig j are obtained, and the minimum angle between the instantaneous movement direction of any pig i and the instantaneous movement direction of any other pig j is calculated and denoted as the relative direction, which is used to reflect the relative orientation of the pigs. Face-to-face contact usually has a large relative angle. The Pearson correlation coefficient between the velocity vector sequence of any pig i and the velocity vector sequence of any other pig j is calculated and denoted as the movement synchronization index, which is used to reflect the degree of coordination of the movement pattern. The duration corresponding to the continuous contact moment is obtained as the effective contact duration in any time slice.
[0062] In this embodiment of the invention, the criteria for determining close contact are as follows: average positional distance less than 0.3 meters, ensuring close contact; standard deviation of positional distance less than 0.1 meters, indicating a stable close distance; relative direction greater than 120 degrees, meeting the characteristics of face-to-face contact; motion synchronization index greater than 0.7, indicating coordinated interactive behavior; and contact duration (effective contact time) greater than 3 seconds, excluding momentary proximity. The corresponding decision rule for close contact is: if at least four conditions are met, it is determined to be close contact, and its contact weight is set to 1.2 to reflect a high risk of transmission.
[0063] The criteria for determining general contact are as follows: average positional distance less than 0.4 meters, maintaining a relatively close distance; standard deviation of positional distance greater than 0.1 meters, indicating relative movement; relative direction less than 60 degrees, conforming to unidirectional or lateral contact; motion synchronicity index between 0.3 and 0.7, indicating a moderate level of coordination; and contact duration (effective contact time) greater than 3 seconds, ensuring it is not instantaneous contact. The corresponding decision rule for general contact is: if at least three conditions are met, even if close contact is not met, it is determined to be general contact, with a contact weight set to 1 to reflect a moderate risk of transmission.
[0064] The decision rule for minor contact is set as follows: if neither close contact nor general contact is met, but the location distance at at least one sampling time is less than 0.5 meters, it is judged as minor contact, and its contact weight is set to 0.3 to reflect the low risk of transmission.
[0065] Therefore, based on the aforementioned judgment conditions and decision rules for contact types, the contact type between any pig i and any other pig j in any given time slice can be determined according to the average positional distance, standard deviation of positional distance, relative direction, movement synchronization index, and effective contact duration. Similarly, the contact type and effective contact duration between any pig i and any other pig j in each time slice can be obtained.
[0066] Then, based on the contact type and effective contact duration in each time slice, the historical contact intensity of any pig i and any other pig j in each time slice is obtained: For any time slice, the contact weight corresponding to the contact type in the time slice is obtained, wherein the contact type includes close contact, general contact and slight contact, and the corresponding contact weight decreases in sequence; the proportion of the effective contact duration in the time slice to the total duration of the time slice is calculated, and the product of the time proportion and the contact weight is taken as the historical contact intensity of any pig i and any other pig j in the time slice.
[0067] The formula for calculating the historical contact intensity between any pig i and any other pig j in any time slice is as follows:
[0068]
[0069] in, This represents the historical contact intensity between any pig i and any other pig j in the k-th time slice. This represents the effective contact duration between any pig i and any other pig j in the k-th time slice. This represents the total duration of the k-th time slice. This represents the contact weight corresponding to the contact type between any pig i and any other pig j in the k-th time slice.
[0070] It should be noted that the longer the effective contact duration and the greater the contact weight, the closer the contact between any pig i and any other pig j, and the greater the historical contact intensity. When any pig is at risk, the risk of transmission to any other pig j is higher.
[0071] To account for the recent nature of the contact, an exponential decay-weighted average of the historical contact intensities of any pig i and any other pig j in each time slice is used to obtain the intelligent contact intensity of any pig i and any other pig j at the current monitoring time. The formula for calculating the intelligent contact intensity is as follows:
[0072]
[0073] in, K represents the smart contact intensity between any pig i and any other pig j at the current monitoring time, and K represents the number of time slices. This represents an exponential function with the natural constant as its base. This represents the preset attenuation factor, taken as... , This represents the historical contact intensity between any pig i and any other pig j in the k-th time slice, where k represents the sequence number of the time slice. The closer to the current monitoring time, the smaller the sequence number of the time slice.
[0074] It should be noted that the closer the time slice is to the current monitoring moment, the greater the weight of its historical contact intensity, that is... The larger the value, the more weighted the historical contact intensity of all time slices is processed to obtain the intelligent contact intensity, which represents the degree of contact between any pig i and any other pig j at the current monitoring time.
[0075] Furthermore, the intrinsic health of pigs is also related to the environment. The closer the environment is to the optimal ambient temperature, the smaller the impact of the environment on the intrinsic health of the pigs. Therefore, the real-time ambient temperature of any pig i at the current monitoring time t is obtained to obtain the environmental correction factor corresponding to any pig i: the absolute value of the temperature difference between the real-time ambient temperature and the preset optimal ambient temperature is calculated, and the negative of the product of the absolute value of the temperature difference and the preset environmental sensitivity is used as the independent variable of an exponential function with the natural constant as the base to obtain the environmental correction factor corresponding to any pig i. The formula for calculating the environmental correction factor corresponding to any pig i is as follows:
[0076]
[0077] in, This represents the environmental correction factor corresponding to any pig i. This represents an exponential function with the natural constant as its base. This indicates the preset environmental sensitivity, with a value of 0.1. This represents the real-time ambient temperature of any pig i at the current monitoring time t. This represents the preset optimal ambient temperature. .
[0078] It should be noted that, The smaller the value, the smaller the difference in ambient temperature, and the smaller the impact of the environment on the intrinsic health of any pig i. Therefore, the environmental health value in the observed health value of any pig i should be larger, and the larger the environmental correction factor for any pig i should be.
[0079] Thus, we can obtain the intelligent contact intensity between any pig i and every other pig at the current monitoring time, as well as the environmental correction factor corresponding to any pig i at the current monitoring time t.
[0080] Step S103: Based on the environmental correction factor of any pig, the observed health value, and the intelligent contact intensity between any pig and each other pig at the current monitoring time, construct a polynomial for obtaining the intrinsic health value of any pig at the current monitoring time.
[0081] Based on the above steps, the environmental correction factor, observed health value, and intelligent contact intensity between any pig i and each other pig at the current monitoring time can be obtained. Then, based on the environmental correction factor, observed health value, and intelligent contact intensity between any pig i and each other pig at the current monitoring time, the polynomial for the intrinsic health value of any pig i at the current monitoring time t is constructed as follows:
[0082]
[0083] in, This represents the observed health value of any pig i at the current monitoring time. This represents the intrinsic health value of any pig i at the current monitoring time. This represents the environmental correction factor corresponding to any pig i. Indicates the transmission rate. This represents the intelligent contact intensity between any pig i and any other pig j at the current monitoring time, where 1 represents a constant. Let J represent the intrinsic health value of any other pig j at the current monitoring time, where J represents the number of other pigs.
[0084] It should be noted that the transmission rate The initial value is 0.35, obtained through learning from historical data, and is updated daily. The update formula is: ,in, This represents the learning rate, with a value of 0.1. This represents the daily updated propagation rate, where 1 indicates a constant. Indicates the average degree of health fluctuation. This represents the average contact intensity. It is relevant to the average degree of health fluctuation. Methods of obtaining: in the propagation rate Within the previous day, the intrinsic health value of each pig was obtained, the mean intrinsic health value was calculated, and the absolute value of the difference between each pig's intrinsic health value and the mean intrinsic health value was calculated. The mean of these absolute values was then used as the average degree of health fluctuation. For the average contact intensity... Methods of obtaining: in the propagation rate Within the day prior to the update, obtain all smart contact intensities between all pigs and calculate the average of all smart contact intensities as the average contact intensity.
[0085] Step S104: Construct a polynomial for each pig to form a polynomial matrix. Iterate and solve the polynomial matrix to obtain the intrinsic health value of each pig at the current monitoring time. Based on the intrinsic health value of each pig at the current monitoring time, analyze the individual health risk and group transmission risk of each pig to obtain the pig supervision decision results.
[0086] Because pigs influence each other—for example, if pig 1 gets sick, it can infect pig 2, causing pig 2's health to deteriorate, and pig 2's deteriorating health, in turn, affects pig 1's health assessment—there is a circular dependency. Therefore, the intrinsic health value of a pig cannot be calculated using a single polynomial. In this embodiment of the invention, the intrinsic health value of each pig at the current monitoring time t is solved using a matrix. Specifically, following the method for constructing the polynomial of the intrinsic health value of any pig i at the current monitoring time t, a polynomial of the intrinsic health value of each pig at the current monitoring time t is constructed, forming a polynomial matrix, with the following specific form:
[0087] make , , ,in, This represents the constructor for a diagonal matrix, where N represents the number of pigs. Its core characteristic is that only the elements on the main diagonal of the polynomial matrix are non-zero, while all other elements are zero. The intelligent contact intensity matrix is given by setting the diagonal to 0 since there is no self-propagation among pigs. This results in the following polynomial matrix:
[0088]
[0089] After sorting, we can obtain:
[0090]
[0091] If matrix If it is reversible, then:
[0092]
[0093] However, since the smart contact intensity matrix is usually sparse and may not be of full rank, an iterative method is used to solve it, i.e.
[0094]
[0095] Initialization command For each iteration x, update the intrinsic health value of each pig using the above formula, repeating the iteration until convergence. .
[0096] The above iterative process actually simulates the dynamic process of health status spreading in a pig herd. The first iteration assumes that the intrinsic health value of all pigs is equal to the observed health value, calculates the initial propagation effect, and obtains the first round of corrected intrinsic health value. The second iteration considers mutual influence, recalculates the propagation effect with the updated intrinsic health value, and finds that "the pigs that were originally considered healthy are actually not very healthy", further correcting the intrinsic health value. Subsequent iterations gradually approach the true state, and each iteration more accurately reflects the mutual influence, eventually reaching a stable state, and thus obtaining the intrinsic health value of each pig at the current monitoring time t.
[0097] Furthermore, after obtaining the intrinsic health value of each pig at the current monitoring time t, an analysis of individual health risk and group transmission risk can be performed on each pig based on its intrinsic health value at the current monitoring time, resulting in pig supervision decision-making results, as follows:
[0098] For any pig i, firstly, based on the intrinsic health value of any pig i at the current monitoring time, determine the individual health risk level of any pig i. That is: if the intrinsic health value of any pig i is less than the threshold of 0.2 for the medium individual health risk level, it is determined that its health status is extremely poor, and the individual health risk level of any pig i is high risk level; if the intrinsic health value of any pig i is greater than or equal to the threshold of 0.2 for the medium individual health risk level and less than the threshold of 0.4 for the low individual health risk level, it is determined that its health status is moderate, and the individual health risk level of any pig i is medium risk level; if the intrinsic health value of any pig i is greater than or equal to the threshold of 0.4 for the low individual health risk level, it is determined that its health status is good, and the individual health risk level of any pig i is low risk level.
[0099] It should be noted that the thresholds of 0.2 for medium individual health risk level and 0.4 for low individual health risk level are set based on the following: A comparative analysis of veterinary historical diagnostic records and intrinsic health values shows that intrinsic health values follow a normal distribution. Therefore, a normal distribution analysis was performed on the intrinsic health values of a large number of healthy pigs. (Approximately the 4th percentile) is used as the threshold for low individual health risk level (i.e., 0.4). (Approximately the 2nd percentile) is used as the threshold for the individual health risk level (i.e., 0.2).
[0100] Then, based on the intrinsic health value of any pig i at the current monitoring time and the intelligent contact intensity between any pig i and each other pig at the current monitoring time, the group transmission risk level of any pig i is determined. That is, the intelligent contact intensity between any pig i and each other pig at the current monitoring time is used as a weight, and the difference between a constant 1 and the intrinsic health value of each other pig at the current monitoring time is weighted and summed to obtain a weighted sum value. The product of the preset transmission risk weight and the weighted sum value is used as the group transmission risk score of any pig i. In this embodiment of the invention, The risk level of group transmission is divided into three levels. If the group transmission risk score of any pig i is less than the low-risk level threshold of 0.1, then the group transmission risk level of any pig i is determined to be low-risk. If the group transmission risk score of any pig i is greater than or equal to the low-risk level threshold of 0.1 and less than the high-risk level threshold of 0.3, then the group transmission risk level of any pig i is determined to be medium-risk. If the group transmission risk score of any pig i is greater than or equal to the high-risk level threshold of 0.3, then the group transmission risk level of any pig i is determined to be high-risk.
[0101] It should be noted that the thresholds of 0.1 for low-risk level and 0.3 for high-risk level are set based on the following: Analysis of historical data from healthy pig herds shows that in disease transmission dynamics, an epidemic will naturally subside when the basic reproduction number (MRN) is less than 1, while an MRN greater than 1 will lead to an outbreak. The herd transmission risk score is a standardized indicator, theoretically ranging from [0, 1]. 0.1 biologically represents the basic risk level of transmission. Therefore, setting 0.1 as the low-risk threshold corresponds to a critical state where the MRN is between 0.8 and 1; exceeding this threshold means the transmission chain may continue. Similarly, setting 0.3 as the high-risk threshold corresponds to a MRN greater than 1.5; exceeding this threshold means the epidemic will spread rapidly.
[0102] The formula for calculating the group transmission risk score of any pig i is as follows:
[0103]
[0104] in, This represents the group transmission risk score for any pig i. This represents the intelligent contact intensity between any pig i and any other pig j at the current monitoring time, where 1 represents a constant. Let J represent the intrinsic health value of any other pig j at the current monitoring time, where J represents the number of other pigs. This indicates a preset transmission risk weight, with a value of 0.5.
[0105] Furthermore, a comprehensive risk level is determined based on the individual health risk level and the group transmission risk level of any pig i. The regulatory decision result for any pig i is then determined based on this comprehensive risk level to achieve pig health supervision in the pigpen. Specific details of the regulatory decision are shown in Table 1.
[0106] Table 1 Regulatory Decisions
[0107]
[0108] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. An intelligent pigpen monitoring system based on multi-source data fusion analysis, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it performs the following steps: For any given pig, obtain the real-time body temperature and real-time activity level of the pig at the current monitoring time. Based on the baseline deviation of the real-time body temperature and the baseline deviation of the real-time activity level, obtain the observed health value of the pig at the current monitoring time. Based on the location distance between every two pigs in the preset historical period before the current monitoring time, the contact type of any pig is analyzed to obtain the intelligent contact intensity between any pig and each other pig at the current monitoring time; the real-time ambient temperature of any pig at the current monitoring time is obtained to obtain the environmental correction factor corresponding to any pig. Based on the environmental correction factor of any pig, the observed health value, and the intelligent contact intensity between any pig and each other pig at the current monitoring time, a polynomial is constructed to obtain the intrinsic health value of any pig at the current monitoring time. A polynomial is constructed for each pig to form a polynomial matrix. The polynomial matrix is iteratively solved to obtain the intrinsic health value of each pig at the current monitoring time. Based on the intrinsic health value of each pig at the current monitoring time, the individual health risk and group transmission risk of each pig are analyzed to obtain the pig supervision decision results.
2. The intelligent pigpen monitoring system based on multi-source data fusion analysis according to claim 1, characterized in that, The step of obtaining the observed health value of any pig at the current monitoring time based on the baseline deviation of the real-time body temperature and the baseline deviation of the real-time activity level includes: Within a preset time period prior to the current monitoring time, the historical body temperature and historical activity of any pig at multiple identical times are obtained, and the historical body temperature sequence and historical activity sequence are obtained respectively. The mean and variance of the body temperature in the historical body temperature sequence are calculated, and the mean and variance of the activity in the historical activity sequence are calculated. Calculate the temperature difference between the real-time body temperature and the mean body temperature, and use the ratio of the temperature difference to the body temperature variance as the benchmark deviation of the real-time body temperature; calculate the activity level difference between the real-time activity level and the mean activity level, and use the ratio of the activity level difference to the activity level variance as the benchmark deviation of the real-time activity level. The maximum value between the baseline deviation of the real-time body temperature and the constant 0 is obtained and recorded as the first maximum value. The maximum value between the opposite of the baseline deviation of the real-time activity level and the constant 0 is obtained and recorded as the second maximum value. The sum of the constant 1, the first maximum value and the second maximum value is calculated, and the reciprocal of the sum is taken as the observed health value of any pig at the current monitoring time.
3. The intelligent pigpen monitoring system based on multi-source data fusion analysis according to claim 1, characterized in that, The step involves analyzing the contact type of any pig based on the positional distance between every two pigs within a preset historical time period prior to the current monitoring time, to obtain the intelligent contact intensity between any pig and each other pig at the current monitoring time, including: For any other pig, the preset historical period is divided into at least two time slices. Based on the positional distance between any pig and any other pig in each time slice, the contact type and effective contact duration of any pig and any other pig in each time slice are obtained. Based on the contact type and effective contact duration in each time slice, the historical contact intensity of any pig and any other pig in each time slice is obtained. The historical contact intensity of any one pig and any other pig in each time slice is weighted and averaged using exponential decay to obtain the intelligent contact intensity of any one pig and any other pig at the current monitoring time. The intelligent contact intensity is calculated using the following formula: ; in, K represents the smart contact intensity between any pig i and any other pig j at the current monitoring time, and K represents the number of time slices. This represents an exponential function with the natural constant as its base. This represents the preset attenuation factor. This represents the historical contact intensity between any pig i and any other pig j in the k-th time slice, where k represents the sequence number of the time slice. The closer to the current monitoring time, the smaller the sequence number of the time slice.
4. The intelligent pigpen monitoring system based on multi-source data fusion analysis according to claim 3, characterized in that, The step of obtaining the contact type and effective contact duration of any pig and any other pig in each time slice based on their positional distance in each time slice includes: For any time slice, based on the positions of any pig and any other pig at each sampling time in any time slice, the position distance at each sampling time is obtained, and the sampling time corresponding to the position distance being less than a preset distance threshold is marked as the contact time, thereby obtaining all contact times in any time slice; Calculate the average position distance and standard deviation of position distance based on the position distance at each contact moment. Construct a position change curve based on the position of any pig at consecutive contact moments. Obtain the tangential direction at each position on the position change curve. Take the mean of all tangential directions as the instantaneous movement direction of any pig. Obtain the velocity vector sequence of any pig based on the position change curve. Obtain the instantaneous movement direction and velocity vector sequence of any other pig. Calculate the minimum angle between the instantaneous movement directions of any pig and any other pig, denoted as the relative direction. Calculate the Pearson correlation coefficient between the velocity vector sequences of any pig and any other pig, denoted as the movement synchronization index. Obtain the duration corresponding to each consecutive contact moment as the effective contact duration in any time slice. The contact type between any pig and any other pig in any time slice is determined based on the average positional distance, the standard deviation of positional distance, relative direction, movement synchronization index, and effective contact duration.
5. The intelligent pigpen monitoring system based on multi-source data fusion analysis according to claim 3, characterized in that, The step of obtaining the historical contact intensity of any one pig and any other pig in each time slice based on the contact type and effective contact duration in each time slice includes: For any given time slice, obtain the contact weight corresponding to the contact type in that time slice, where the contact type includes close contact, general contact, and slight contact, and the corresponding contact weights decrease sequentially; calculate the proportion of the effective contact duration in that time slice to the total duration of that time slice, and use the product of the time proportion and the contact weight as the historical contact intensity between any pig and any other pig in that time slice.
6. The intelligent pigpen monitoring system based on multi-source data fusion analysis according to claim 1, characterized in that, The method for obtaining the environmental correction factor corresponding to any one of the pigs includes: Calculate the absolute value of the temperature difference between the real-time ambient temperature and the preset optimal ambient temperature. Take the negative of the product of the absolute value of the temperature difference and the preset environmental sensitivity as the independent variable of an exponential function with the natural constant as the base, and obtain the environmental correction factor corresponding to any pig.
7. The intelligent pigpen monitoring system based on multi-source data fusion analysis according to claim 1, characterized in that, The process of constructing a polynomial for obtaining the intrinsic health value of any pig at the current monitoring time, based on the environmental correction factor, observed health value, and the intelligent contact intensity between any pig and each other pig at the current monitoring time, includes: ; in, This represents the observed health value of any pig i at the current monitoring time. This represents the intrinsic health value of any pig i at the current monitoring time. This represents the environmental correction factor corresponding to any pig i. Indicates the transmission rate. This represents the intelligent contact intensity between any pig i and any other pig j at the current monitoring time, where 1 represents a constant. Let J represent the intrinsic health value of any other pig j at the current monitoring time, where J represents the number of other pigs.
8. The intelligent pigpen monitoring system based on multi-source data fusion analysis according to claim 1, characterized in that, The analysis of individual health risk and group transmission risk for each pig based on its intrinsic health value at the current monitoring time yields pig management decision results, including: For any given pig, the individual health risk level of the pig is determined based on its intrinsic health value at the current monitoring time. The intelligent contact intensity between the pig and each other pig at the current monitoring time is used as a weight, and the difference between a constant 1 and the intrinsic health value of each other pig at the current monitoring time is summed in a weighted manner to obtain a weighted sum value. The product of the preset transmission risk weight and the weighted sum value is used as the group transmission risk score of the pig. The group transmission risk level of any pig is determined based on the group transmission risk score. The comprehensive risk level is determined based on the individual health risk level and the group transmission risk level of any pig. The regulatory decision result for any pig is determined based on the comprehensive risk level.