Internet-based live pig breeding environment early warning management system and method
By designing an Internet-based pig breeding environment early warning management system, the problems of incomplete data acquisition, difficult real-time monitoring in the traditional breeding model, and lack of intelligence in health management and equipment management are solved, and intelligent management of pig breeding is realized, and breeding efficiency and pig health level are improved.
Patent Information
- Application Number
- CN202510214613.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional pig breeding model has incomplete data acquisition in terms of environmental monitoring, health management and equipment management, difficulty in real-time monitoring, low efficiency of manual inspection, lack of disease warning mechanism, and lack of intelligence in feed feeding and equipment management, resulting in low breeding efficiency, high cost and low pig health level.
Design an Internet-based pig breeding environment early warning management system, including data collection and processing module, data transmission communication module, model construction module and early warning management analysis module, and collect and process breeding data in real time through the Internet to build environmental, disease and risk prediction models to achieve intelligent early warning management and decision-making support.
Real-time monitoring and dynamic management of pig house environment, pig health and equipment operation have been achieved, breeding efficiency and pig health have been improved, artificial interference has been reduced, breeding costs have been reduced, and market competitiveness has been enhanced.
Smart Images

Figure CN120199475A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of pig breeding, and specifically relates to an Internet-based early warning management system and method for pig breeding environment. Background Art
[0002] With the economic development, the scale and intensification of pig breeding have been continuously improved. More and more large-scale farms have emerged, and the breeding density has been increasing. The original scattered breeding mode has gradually been replaced by a centralized and specialized production method. In this trend, the disadvantages of the traditional breeding mode have become increasingly prominent. The monitoring means of the traditional breeding for the pig house environment are backward, relying on manual regular measurement and simple equipment. The data obtained is incomplete and has large errors. The key environmental parameters cannot be monitored in real time and accurately, making it difficult for breeders to detect environmental changes in time and provide a stable and suitable growth environment for pigs; in terms of pig health management, with the expansion of the breeding scale, the number of pigs has increased significantly, and the traditional manual visual inspection method has become inadequate. Breeders cannot conduct detailed and frequent health checks on each pig, and the symptoms in the early stage of pig illness are easily ignored; moreover, there is a lack of systematic recording and analysis of pig health data, making it difficult to establish an effective disease early warning mechanism. Once an epidemic breaks out, it spreads quickly and is difficult to prevent and control, causing serious economic losses to farmers; in addition, under the traditional breeding mode, the feed feeding and equipment management lack accuracy and intelligence. The feed feeding depends more on experience and does not fully consider the individual differences of pigs and the needs of growth stages, resulting in feed waste; the operation of equipment relies on manual operation and cannot be automatically adjusted according to environmental changes, which not only consumes manpower but also is difficult to achieve efficient regulation of the breeding environment, seriously restricting the improvement of breeding efficiency and making it difficult to meet the market demand for high-quality and efficient pig breeding. Summary of the Invention
[0003] In order to solve the problems existing in the above-mentioned prior art, the purpose of this application is to provide an Internet-based early warning management system and method for pig breeding environment. The Internet-based early warning management system for pig breeding environment can centrally manage and analyze the data of large-scale farms by means of adapting to the trend of large-scale and intensive pig breeding based on the Internet, and improve the overall level of the breeding industry.
[0004] An Internet-based early warning management system for pig breeding environment described in this application includes:
[0005] A data acquisition and processing module, which is used to acquire the environmental data of the pig house, the status data of pigs, and the operation data of equipment, and perform data processing;
[0006] A data transmission and communication module, which is used to transmit the data acquired by the data acquisition and processing module, and to send early warning information to breeders;
[0007] A model construction module for constructing an environmental prediction model, a disease prediction model, and a risk prediction model, and training the three models in combination with the data collected by the data collection and processing module;
[0008] An early warning management analysis module for inputting the real-time data collected by the data collection and processing module into the three models of the model construction module, analyzing the corresponding early warning situations, and performing early warning management.
[0009] This application also proposes an Internet-based early warning management method for pig farming environments, which is applied to the Internet-based early warning management system for pig farming environments described above, and includes the following steps:
[0010] S1. Collect the environmental data of the pigsty, the status data of the pigs, and the operation data of the equipment, and transmit the data to the edge computing gateway through Internet communication technology for processing to obtain a pig parameter data set for model training;
[0011] S2. Construct an environmental prediction model, a disease prediction model, and a risk prediction model, and train the three models in combination with the pig parameter data set to obtain a trained pig farming environment early warning model, a pig farming disease early warning model, and a pig farming risk early warning model;
[0012] S3. Collect the real-time environmental data of the pigsty, the real-time status data of the pigs, and the real-time operation data of the equipment, and input them into the pig farming environment early warning model, the pig farming disease early warning model, and the pig farming risk early warning model for analysis to obtain the corresponding early warning situations, and perform early warning management according to the early warning situations;
[0013] S4. Record the early warning management process and early warning management data, and use data analysis technology for analysis to obtain analysis results, and optimize and adjust the Internet-based early warning management system for pig farming environments according to the analysis results.
[0014] Preferably, the step S1 specifically includes:
[0015] Set a breeding cycle of pig farming as T y ;
[0016] Set the time interval for collecting environmental data of the pigsty as Δt1, and the environmental data collection includes: the temperature value T1, humidity value H1, ammonia concentration value A1, carbon dioxide concentration value C1, and light intensity L1 in the pigsty, as well as the storage temperature value F of the feed T1 , storage humidity value F H1 , storage time F TS1 and feed quality detection index F Q1 ;
[0017] Set the specific acquisition time period of the status data of pigs as Δt2, and the status data acquisition includes: the body temperature value B of each pig T1 , the heart rate value B HR1 , the respiratory rate value B RR1 , the food intake value F C1 , the water intake value W C1 , the activity duration A T1 , the standing duration S T1 and the lying time L T1 ;
[0018] Set the acquisition time interval of the operation data of the device as Δt3, with the normal state of the device being 1 and the abnormal state being 0. The operation data acquisition includes: the operation state V of the ventilation device S1 , the operation state R of the temperature control device S1 , the operation state F of the feeding device S1 , the operation state Y of the drinking water device S1 ;
[0019] Obtain the environmental data, the status data, and the operation data of the N breeding cycles and transmit them to the edge computing gateway through Internet communication technology;
[0020] Among them, Δt1 < T y ; Δt2 < T y ; Δt3 < T y .
[0021] Preferably, the step S1 further includes:
[0022] The edge computing gateway uniformly converts the received environmental data, status data, and operation data in different formats into a standard format;
[0023] Adopt statistical outlier detection technology to analyze the environmental data, status data, and operation data, identify and remove outliers;
[0024] Adopt interpolation algorithm to process the missing values of the environmental data and status data, and adopt mode filling method to process the missing values of the operation data;
[0025] Aggregate the environmental data, status data, and operation data to obtain an aggregated dataset of live pigs;
[0026] Divide the aggregated dataset of live pigs into a training set and a validation set in the ratio of X1:X2. The training set and the validation set constitute a parameter dataset of live pigs for model training.
[0027] Preferably, the step S2 specifically includes:
[0028] Building the environmental prediction model includes:
[0029] Build a model using a long short-term memory network, with the number of network layers set to n layers and the number of neurons in each layer set to m;
[0030] Use the mean squared error as the loss function and Adam as the optimizer, with the number of training epochs set to Q and the batch size set to b;
[0031] Train the environmental prediction model using the training set, and after training is completed, evaluate the environmental prediction model using the validation set, and calculate the mean squared error MSE and mean absolute error MAE between the predicted value and the actual value;
[0032] If MSE ≤ 0.1 and MAE ≤ 0.05, then use the environmental prediction model as the early warning model for the pig farming environment;
[0033] If MSE > 0.1 and / or MAE > 0.05, then retrain and evaluate the environmental prediction model until MSE ≤ 0.1 and MAE ≤ 0.05 are satisfied;
[0034] Building the disease prediction model includes:
[0035] Build the disease prediction model using the random forest algorithm, with the number of decision trees set to K and the maximum depth set to D layers;
[0036] Train the disease prediction model using the training set, and after training is completed, evaluate the disease prediction model using the validation set, and calculate the accuracy Acc1, recall R1, and F1 value of the disease model;
[0037] If Acc1 ≥ 0.85, R1 ≥ 0.85, and F1 ≥ 0.85 are all satisfied, then use the disease prediction model as the early warning model for pig farming diseases;
[0038] If any one of Acc1 ≥ 0.85, R1 ≥ 0.85, and F1 ≥ 0.85 is not satisfied, then retrain and evaluate the disease prediction model until Acc1 ≥ 0.85, R1 ≥ 0.85, and F1 ≥ 0.85 are all satisfied;
[0039] Building the risk prediction model includes:
[0040] Build the risk prediction model using a support vector machine, using a radial basis kernel function, and setting the penalty parameter C to 1;
[0041] Train the risk prediction model using the training set, and after training is completed, evaluate the risk prediction model using the validation set, and calculate the accuracy Acc2, recall R2, and F1' value of the risk model;
[0042] If Acc2≥0.80, R2≥0.80, and F1’≥0.85 are all satisfied, then use the disease prediction model as the risk early warning model for pig farming;
[0043] If any one of Acc2≥0.80, R2≥0.80, and F1’≥0.80 is not satisfied, retrain and evaluate the risk prediction model until Acc2≥0.85, R2≥0.85, and F1’≥0.85 are all satisfied.
[0044] Preferably, step S3 specifically includes:
[0045] Collect real-time environmental data of the pigsty, real-time status data of the pigs, and real-time operation data of the equipment;
[0046] Input the real-time environmental data into the pig farming environment early warning model and conduct environmental early warning analysis;
[0047] Input the real-time status data into the pig farming disease early warning model and conduct disease early warning analysis;
[0048] Input the real-time operation data into the pig farming risk early warning model and conduct equipment early warning analysis;
[0049] Among them, the real-time environmental data includes: the real-time value T2 of the pigsty temperature, the real-time value H2 of the pigsty humidity, the real-time value A2 of the pigsty ammonia concentration, the real-time value C2 of the pigsty carbon dioxide concentration, the real-time value L2 of the pigsty light intensity, and the real-time value F of the feed storage temperature T2 and the real-time value F of the feed storage humidity H2 and the real-time value F of the feed storage time TS2 and the real-time value F of the feed quality detection index Q2 ;
[0050] The real-time status data includes: the real-time value B of the pig body temperature T2 and the real-time value B of the pig heart rate HR2 and the real-time value B of the pig respiratory rate RR2 and the real-time value F of the pig food intake C2 and the real-time value W of the pig water intake C2 and the real-time value A of the pig activity duration T2 and the real-time value S of the pig standing duration T2 and the real-time value L of the pig lying time T2 ;
[0051] The real-time operation data includes: the real-time operation status V of the ventilation equipment S2 and the real-time operation status R of the temperature control equipment S2 and the real-time operation status F of the feeding equipmentS2 The real-time operating status Y of the drinking water equipment S2 .
[0052] Preferably, the environmental warning analysis includes:
[0053] Inputting the environmental real-time data into the environmental warning model for pig breeding to obtain the predicted values of environmental parameters for a future period of time. The predicted values of environmental parameters include: the predicted value of the pigsty temperature The predicted value of the pigsty humidity The predicted value of the ammonia concentration in the pigsty The predicted value of the carbon dioxide concentration in the pigsty And the predicted value of the light intensity in the pigsty As well as the predicted value of the feed storage temperature The predicted value of the feed storage humidity The predicted value of the feed storage time And the predicted value of the feed quality detection index
[0054] Combining the predicted values of the environmental parameters, calculate the environmental anomaly coefficient EAC. The calculation formula is as follows:
[0055]
[0056] Where, β i Represents the dynamic weight correction coefficient of the i-th environmental parameter value; ω t,i Represents the weight coefficient of the i-th environmental parameter changing with time; Represents the predicted value of the i-th environmental parameter; Represents the best theoretical value of the i-th environmental parameter; i = 1 represents the pigsty temperature, i = 2 represents the pigsty humidity, i = 3 represents the ammonia concentration in the pigsty, i = 4 represents the carbon dioxide concentration in the pigsty, i = 5 represents the light intensity in the pigsty, i = 6 represents the feed storage temperature, i = 7 represents the feed storage humidity, i = 8 represents the feed storage time, i = 9 represents the feed quality detection index;
[0057] The preset environmental anomaly coefficient threshold EAT = 0.3;
[0058] If EAC ≤ EAT, it is judged that the environment of the pigsty is normal and the original state management is maintained;
[0059] If EAC > EAT, it is judged that the environment of the pigsty is abnormal and an environmental anomaly warning message is issued.
[0060] Preferably, the disease warning analysis includes:
[0061] Input the real-time data of the state into the early warning model for pig breeding diseases to obtain the probability value of a pig getting sick And calculate the disease risk coefficient DRC according to the following formula:
[0062]
[0063] Where γ represents the individual difference correction factor of the pig; α represents the adjustment coefficient; λ j represents the influence coefficient of the jth state parameter; X j represents the real-time value of the jth state parameter; represents the optimal theoretical value of the jth state parameter; j = 1 represents the body temperature of the pig; j = 2 represents the heart rate of the pig; j = 3 represents the respiratory rate of the pig; j = 4 represents the food intake of the pig; j = 5 represents the water intake of the pig; j = 6 represents the activity duration of the pig; j = 7 represents the standing duration of the pig; j = 8 represents the lying time of the pig;
[0064] The preset disease early warning threshold DWT = 0.5;
[0065] If DRC ≤ DWT, it is judged that the pig does not have a current risk of getting sick, and the original state management is maintained;
[0066] If DRC > DWT, it is judged that the pig has a current risk of getting sick, and a pig disease risk early warning message is sent.
[0067] Preferably, the analysis of the pig's disease condition includes:
[0068] If EAC ≤ EAT, analyze the state parameters that cause the pig to have a risk of getting sick;
[0069] If EAC > EAT, combine the results of the environmental early warning analysis to analyze the correlation between the pig's risk of getting sick and environmental factors.
[0070] Preferably, the equipment early warning analysis includes:
[0071] Combine the real-time operation data and calculate the equipment risk coefficient δ according to the following formula:
[0072]
[0073] Where μ1, μ2, μ3 and μ4 are all weight coefficients, satisfying μ1 + μ2 + μ3 + μ4 = 1;
[0074] If δ > 0.5, it is judged that the current equipment is at high risk, and a high-risk warning message for the equipment is sent;
[0075] If 0.2 < δ ≤ 0.5, it is judged that the current equipment is at medium risk, and a medium-risk warning message for the equipment is sent;
[0076] If 0 < δ ≤ 0.2, it is determined that the current device is in a low-risk state, and a low-risk warning message for the device is issued.
[0077] If δ = 0, it is determined that the current device is risk-free, and the original state management is maintained.
[0078] An Internet-based early warning management system and method for pig breeding environment described in this application have the following advantages:
[0079] 1. The Internet-based early warning management system for pig breeding environment in this application comprehensively collects and processes data on pigsty environment, pig status, and equipment operation through a data acquisition and processing module, providing an accurate and solid data foundation for subsequent analysis and decision-making; the data transmission and communication module realizes real-time data transmission and timely sends warning messages to breeders, enabling breeders to master abnormal situations immediately and handle them quickly, reducing losses caused by untimely information transmission. For example, when pigs are sick or equipment fails, breeders can be informed immediately; the model construction module constructs environment, disease, and risk prediction models and trains them in combination with actual data, making the models more accurately reflect the breeding situation, and improving the prediction accuracy and reliability with the accumulation and optimization of data; the early warning management analysis module inputs real-time data into the model for analysis and early warning management, realizing intelligent breeding management, automatically identifying risks, and giving warning levels and treatment suggestions according to rule algorithms, reducing human interference, and improving management efficiency and accuracy; by working together with each module, the system realizes refined management of pig breeding, improves breeding efficiency, reduces costs, improves the health level and growth rate of pigs through scientific environment control and disease prevention, and further improves the quality and output of pork, enhancing market competitiveness; moreover, the Internet-based early warning management system for pig breeding environment can centrally manage and analyze data of large-scale farms in a way that adapts to the trend of large-scale and intensive pig breeding based on the Internet, improving the overall level of the breeding industry.
[0080] 2. A method for early warning management of pig breeding environment based on the Internet collects environmental data of pig houses, status data of pigs, and operation data of equipment, and transmits them to the edge computing gateway for processing through Internet communication technology, so as to obtain an accurate, comprehensive and timely dataset of pig parameters; constructs three prediction models, namely, an environmental prediction model, a disease prediction model and a risk prediction model, and trains them in combination with the pig parameter dataset, enabling the models to have powerful prediction capabilities; collects real-time data and inputs it into the trained models for analysis, can quickly obtain the corresponding early warning situations and carry out early warning management, realizes real-time monitoring and dynamic management of pig breeding, and breeding personnel can learn about abnormalities in aspects such as the environment, pig health or equipment operation in the first time, and take measures in time for adjustment and handling, effectively reducing losses caused by problems such as unsuitable environment, disease outbreak or equipment failure, and ensuring the healthy growth of pigs and the stable progress of breeding. The method for early warning management of pig breeding environment based on the Internet provides an efficient, intelligent and scientific management solution for pig breeding through comprehensive data collection, accurate model prediction, real-time early warning management and continuous system optimization, helps to improve breeding efficiency, reduce costs, ensure pig health, and promotes the development of the pig breeding industry towards modernization and intelligence. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 is a flowchart of a method for early warning management of pig breeding environment based on the Internet described in this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0082] As Figure 1 shown, a system for early warning management of pig breeding environment based on the Internet described in this application includes:
[0083] A data collection and processing module, which is used to collect environmental data of pig houses, status data of pigs, and operation data of equipment, and perform data processing;
[0084] A data transmission and communication module, which is used to transmit the data collected by the data collection and processing module, and is used to send early warning information to breeding personnel;
[0085] A model construction module, which is used to construct an environmental prediction model, a disease prediction model and a risk prediction model, and train the three models in combination with the data collected by the data collection and processing module;
[0086] An early warning management and analysis module, which is used to input the real-time data collected by the data collection and processing module into the three models of the model construction module, analyze the corresponding early warning situations and perform early warning management.
[0087] The present application also proposes an Internet-based early warning management method for pig breeding environment, which is applied to the Internet-based early warning management system for pig breeding environment as described above, and includes the following steps:
[0088] S1. Collect the environmental data of the pigsty, the status data of the pigs, and the operation data of the equipment, and transmit the data to the edge computing gateway through Internet communication technology for processing to obtain a pig parameter data set for model training;
[0089] S2. Construct an environment prediction model, a disease prediction model, and a risk prediction model, and train the three models in combination with the pig parameter data set to obtain a trained pig breeding environment early warning model, a pig breeding disease early warning model, and a pig breeding risk early warning model;
[0090] S3. Collect the real-time environmental data of the pigsty, the real-time status data of the pigs, and the real-time operation data of the equipment, and input them into the pig breeding environment early warning model, the pig breeding disease early warning model, and the pig breeding risk early warning model for analysis to obtain corresponding early warning situations, and conduct early warning management according to the early warning situations;
[0091] S4. Record the early warning management process and early warning management data, and use data analysis technology for analysis to obtain analysis results, and optimize and adjust the pig breeding environment early warning management system according to the analysis results.
[0092] Further, in this embodiment, step S1 specifically includes:
[0093] Set a breeding cycle of pig breeding as T y ;
[0094] Set the time interval for collecting environmental data of the pigsty as Δt1, and the environmental data collection includes: the temperature value T1, humidity value H1, ammonia concentration value A1, carbon dioxide concentration value C1, and light intensity L1 in the pigsty, as well as the storage temperature value F of the feed T1 、storage humidity value F H1 、storage time F TS1 and feed quality detection index F Q1 ; among them, the feed quality detection index is the mycotoxin content;
[0095] Set the specific collection time period for the status data of the pigs as Δt2, and the status data collection includes: the body temperature value B of each pig T1 、heart rate value B HR1 、respiration rate value B RR1 、food intake value F C1 、drinking water volume value W C1 、activity duration A T1 、standing duration S T1 and lying time LT1 ;
[0096] Set the time interval for collecting the operating data of the device as Δt3. Take the normal state of the device as 1 and the abnormal state as 0. The collection of operating data includes: the operating state V of the ventilation device S1 , the operating state R of the temperature control device S1 , the operating state F of the feeding device S1 , the operating state Y of the drinking water device S1 ;
[0097] Obtain the environmental data, status data, and operating data of N breeding cycles and transmit them to the edge computing gateway through Internet communication technology;
[0098] Among them, Δt1 < T y ; Δt2 < T y ; Δt3 < T y ;
[0099] The examples are as follows:
[0100] Set a breeding cycle T for pig breeding y = 180 days, and set the time interval Δt1 for collecting the environmental data of the pigsty as 1 hour;
[0101] For example, at 9 am on the first day of the breeding cycle, the temperature value T1 = 22°C, humidity value H1 = 60%, ammonia concentration value A1 = 10 ppm, carbon dioxide concentration value C1 = 800 ppm, light intensity L1 = 50 Lux in the pigsty are collected, as well as the storage temperature value F of the feed T1 = 15°C, storage humidity value F H1 = 50%, storage time F TS1 = 10 days, feed quality detection index F Q1 = 50 μg / kg (indicating the mycotoxin content), and the next collection of environmental data is carried out at 10 am on the first day, and then the collection is carried out every 1 hour;
[0102] Set the specific collection time period Δt2 for the status data of pigs as 8 hours, and select the time period from 8 am to 4 pm every day. Taking one pig as an example, within the collection time period on the first day of the breeding cycle, the body temperature value B T1 = 38.5°C, heart rate value B HR1 = 80 beats / minute, respiratory rate value B RR1 = 20 times / minute, feed intake value F C1 = 2 kg, drinking water volume value W C1 = 3 L, activity duration A T1 = 3 hours, standing duration S T1 = 1 hour, and lying time L T1= 4 hours, and collect the next set of status data during the same time period on the next day;
[0103] Set the time interval for collecting the operation data of the equipment as Δt3 = 2 hours. At 9:00 am on the first day of the breeding cycle, collect the operation status V of the ventilation equipment S1 = 1 (normal operation), the operation status R of the temperature control equipment S1 = 1 (normal operation), the operation status F of the feeding equipment S1 = 1 (normal operation), the operation status Y of the drinking water equipment S1 = 1 (normal operation). Then, collect the next set of operation data at 11:00 am on the first day of the breeding cycle, and collect data every 2 hours in this way;
[0104] Obtain the above environmental data, status data, and operation data for N = 5 breeding cycles, and transmit them to the edge computing gateway through Internet communication technology.
[0105] Furthermore, in this embodiment, step S1 further includes:
[0106] The edge computing gateway uniformly converts the received environmental data, status data, and operation data in different formats into a standard format;
[0107] Use statistical outlier detection technology to analyze the environmental data, status data, and operation data, and identify and remove outliers;
[0108] Use interpolation algorithms to process missing values in environmental data and status data, and use the mode filling method to process missing values in operation data;
[0109] Aggregate the environmental data, status data, and operation data to obtain an aggregated dataset of live pigs;
[0110] Divide the aggregated dataset of live pigs into a training set and a validation set at a ratio of X1:X2. The training set and the validation set constitute a dataset of live pig parameters for model training; where the values of X1 and X2 are X1 = 8 and X2 = 2 respectively;
[0111] The example is as follows:
[0112] The edge computing gateway will convert the formats of the received environmental data, status data, and operation data. For example, if the temperature value in the pigsty is recorded as "22 degrees Celsius", the edge computing gateway will uniformly convert it to "22 °C". If the feeding amount in the pig status data is recorded as "2000 grams", it will be converted to "2 kg". If the operation status of the ventilation equipment in the equipment operation data is recorded as "normal", it will be converted to "1";
[0113] Using statistical outlier detection techniques, such as the 3σ principle, for the temperature value T1 in the pigsty, most of the temperatures collected during a breeding cycle are between 18°C and 33°C. If a data record is 60°C, it is determined as an outlier and removed from the dataset. For the feed quality detection index F Q1 The normal range is 0 - 100 μg / kg. If 500 μg / kg appears, it is determined as an outlier and also removed as an outlier;
[0114] Using an interpolation algorithm to process missing values in environmental data and status data. For example, in the pig status data on the 10th day of the breeding cycle, the respiratory rate value B of one pig RR1 is missing. The respiratory rate of this pig was 20 times per minute on the 9th day and 21 times per minute on the 11th day. Using linear interpolation, the calculated missing value is (20 + 21)÷2 = 20.5 times per minute;
[0115] Using the mode filling method to process missing values in operation data. For example, in the equipment operation data at a certain moment, the operation status Y of the drinking water equipment S1 value is missing. Statistical analysis of the equipment operation status data before and after the missing value shows that "1" (normal status) appears the most times, which is the mode. Then, "1" is used to fill the missing value;
[0116] Integrate the processed environmental data, pig status data, and equipment operation data at the same moment together to form a pig aggregation data record. Continuously repeat this operation to obtain the aggregated pig aggregation dataset;
[0117] Divide the pig aggregation dataset into a training set and a validation set in a ratio of 8:2. For example, if there are 1000 data records, 800 data records are used as the training set for subsequent training of the environmental prediction model, disease prediction model, and risk prediction model, and 200 data records are used as the validation set to verify the training effect of the model.
[0118] Furthermore, in this embodiment, step S2 specifically includes:
[0119] Building an environmental prediction model includes:
[0120] Using a long short-term memory network to build the model, with the number of network layers set to n layers and the number of neurons in each layer set to m;
[0121] Using the mean squared error as the loss function and Adam as the optimizer, with the number of training epochs set to Q and the batch size set to b;
[0122] Using the training set to train the environmental prediction model, and using the validation set to evaluate the environmental prediction model after training is completed, calculating the mean squared error MSE and mean absolute error MAE between the predicted value and the actual value;
[0123] If MSE ≤ 0.1 and MAE ≤ 0.05, then the environmental prediction model is used as the early warning model for the pig farming environment;
[0124] If MSE > 0.1 and / or MAE > 0.05, then the environmental prediction model is retrained and evaluated until MSE ≤ 0.1 and MAE ≤ 0.05 are satisfied;
[0125] Building the disease prediction model includes:
[0126] Using the random forest algorithm to build the disease prediction model, setting the number of decision trees to K and the maximum depth to D levels;
[0127] Using the training set to train the disease prediction model, and using the validation set to evaluate the disease prediction model after training is completed, calculating the disease model accuracy Acc1, the disease model recall rate R1, and the disease model F1 value;
[0128] If Acc1 ≥ 0.85, R1 ≥ 0.85, and F1 ≥ 0.85 are all satisfied, then the disease prediction model is used as the early warning model for pig farming diseases;
[0129] If any one of Acc1 ≥ 0.85, R1 ≥ 0.85, and F1 ≥ 0.85 is not satisfied, then the disease prediction model is retrained and evaluated until Acc1 ≥ 0.85, R1 ≥ 0.85, and F1 ≥ 0.85 are all satisfied;
[0130] Building the risk prediction model includes:
[0131] Using the support vector machine to build the risk prediction model, using the radial basis kernel function, and setting the penalty parameter C to 1;
[0132] Using the training set to train the risk prediction model, and using the validation set to evaluate the risk prediction model after training is completed, calculating the risk model accuracy Acc2, the risk model recall rate R2, and the risk model F1' value;
[0133] If Acc2 ≥ 0.80, R2 ≥ 0.80, and F1' ≥ 0.85 are all satisfied, then the disease prediction model is used as the early warning model for pig farming risks;
[0134] If any one of Acc2 ≥ 0.80, R2 ≥ 0.80, and F1' ≥ 0.80 is not satisfied, then the risk prediction model is retrained and evaluated until Acc2 ≥ 0.85, R2 ≥ 0.85, and F1' ≥ 0.85 are all satisfied;
[0135] The example is as follows:
[0136] Building the environmental prediction model is as follows:
[0137] Build an environmental prediction model using a long short-term memory network, setting the number of network layers \(n = 4\) and the number of neurons in each layer \(m = 50\);
[0138] Select the mean squared error as the loss function and Adam as the optimizer, setting the number of training epochs \(Q = 30\) and the batch size \(b = 20\);
[0139] Use the above training set containing 800 data points to train the environmental prediction model. After training, use a validation set containing 200 data points to evaluate the model,
[0140] Calculate the mean squared error \(MSE\) and mean absolute error \(MAE\) between the predicted values and the actual values. For example, after the first training, \(MSE = 0.15\) and \(MAE = 0.08\) are calculated;
[0141] Since \(MSE>0.1\) and \(MAE>0.05\), not meeting the condition of "\(MSE\leq0.1\) and \(MAE\leq0.05\)", the number of training epochs is adjusted to \(Q = 50\) and the model is trained again using the training set and evaluated using the validation set. After retraining and evaluation, \(MSE = 0.08\) and \(MAE = 0.04\) are obtained, meeting the condition of \(MSE\leq0.1\) and \(MAE\leq0.05\). Then, the environmental prediction model is used as the early warning model for the pig farming environment;
[0142] Build a disease prediction model as follows:
[0143] Build a disease prediction model using the random forest algorithm, setting the number of decision trees \(K = 80\) and the maximum depth \(D = 8\);
[0144] Use the training set to train the disease prediction model. After training, use the validation set to evaluate the model and calculate the accuracy \(Acc1\), recall rate \(R1\), and \(F1\)-value of the disease model. For example, after the first training, \(Acc1 = 0.80\), \(R1 = 0.82\), and \(F1 = 0.81\) are calculated;
[0145] Because \(Acc1<0.85\), \(R1<0.85\), and \(F1<0.85\) do not meet the condition of "\(Acc1\geq0.85\), \(R1\geq0.85\), and \(F1\geq0.85\) are all satisfied", the number of decision trees is increased to \(K = 120\), and the model is retrained using the training set and evaluated using the validation set. After retraining and evaluation, \(Acc1 = 0.87\), \(R1 = 0.86\), and \(F1 = 0.86\) are obtained, meeting the condition of "\(Acc1\geq0.85\), \(R1\geq0.85\), and \(F1\geq0.85\) are all satisfied". The disease prediction model is used as the early warning model for pig farming diseases;
[0146] Build a risk prediction model as follows:
[0147] A risk prediction model is constructed using a support vector machine, the radial basis kernel function is selected, and the penalty parameter is set to 1;
[0148] The risk prediction model is trained using the training set. After training, the validation set is used to evaluate the model, and the accuracy Acc2, recall rate R2, and F1' value of the risk model are calculated. For example, after the first training, Acc2 = 0.82, R2 = 0.83, and F1' = 0.86 are obtained;
[0149] If the conditions of "Acc2 ≥ 0.80, R2 ≥ 0.80, and F1' ≥ 0.85 are all satisfied" are met, the disease prediction model is used as the risk early warning model for pig farming.
[0150] Furthermore, in this embodiment, step S3 specifically includes:
[0151] Collect the real-time environmental data of the pigsty, the real-time status data of the pigs, and the real-time operation data of the equipment;
[0152] Input the real-time environmental data into the pig farming environmental early warning model and conduct environmental early warning analysis;
[0153] Input the real-time status data into the pig farming disease early warning model and conduct disease early warning analysis;
[0154] Input the real-time operation data into the pig farming risk early warning model and conduct equipment early warning analysis;
[0155] Among them, the real-time environmental data includes: the real-time value T2 of the pigsty temperature, the real-time value H2 of the pigsty humidity, the real-time value A2 of the ammonia concentration in the pigsty, the real-time value C2 of the carbon dioxide concentration in the pigsty, the real-time value L2 of the light intensity in the pigsty, and the real-time value F of the feed storage temperature T2 , the real-time value F of the feed storage humidity H2 , the real-time value F of the feed storage time TS2 and the real-time value F of the feed quality detection index Q2 ;
[0156] The real-time status data includes: the real-time value B of the pig's body temperature T2 , the real-time value B of the pig's heart rate HR2 , the real-time value B of the pig's respiratory rate RR2 , the real-time value F of the pig's food intake C2 , the real-time value W of the pig's water intake C2 , the real-time value A of the pig's activity duration T2 , the real-time value S of the pig's standing duration T2 and the real-time value L of the pig's lying time T2 ;
[0157] The real-time operation data includes: the real-time operation status V of the ventilation equipment S2 , the real-time operation status R of the temperature control equipment S2 , the real-time operation status F of the feeding equipment S2 , the real-time operation status Y of the drinking water equipment S2 ;
[0158] The examples are as follows:
[0159] Collect real-time data on the 100th day of a breeding cycle:
[0160] The real-time value T2 of the pigsty temperature = 24°C, the real-time value H2 of the pigsty humidity = 55%, the real-time value A2 of the ammonia concentration in the pigsty = 12 ppm, the real-time value C2 of the carbon dioxide concentration in the pigsty = 850 ppm, the real-time value L2 of the light intensity in the pigsty = 45 Lux, and the real-time value F of the feed storage temperature T2 = 16°C, the real-time value F of the feed storage humidity H2 = 48%, the real-time value F of the feed storage time TS2 = 15 days, the real-time value F of the feed quality detection index Q2 = 40 μg / kg;
[0161] The real-time value B of the body temperature of the pigs T2 = 38.7°C, the real-time value B of the heart rate of the pigs HR2 = 85 times / minute, the real-time value B of the respiratory rate of the pigs RR2 = 22 times / minute, the real-time value F of the feed intake of the pigs C2 = 2.3 kg, the real-time value W of the water intake of the pigs C2 = 3.5 L, the real-time value A of the activity duration of the pigs T2 = 3.2 hours, the real-time value S of the standing duration of the pigs T2 = 1.3 hours, the real-time value L of the lying time of the pigs T2 = 3.5 hours;
[0162] The real-time operation status V of the ventilation equipment S2 = 1 (normal state), the real-time operation status R of the temperature control equipment S2 = 1 (normal state), the real-time operation status F of the feeding equipment S2 = 0 (abnormal state), the real-time operation status Y of the drinking water equipment S2 = 1 (normal state).
[0163] Furthermore, in this embodiment, the environmental warning analysis includes:
[0164] Input the environmental real-time data into the environmental warning model for pig breeding, and obtain the predicted values of environmental parameters in the future for a period of time. The predicted values of environmental parameters include: the predicted value of the pigsty temperature Predicted value of pigsty humidity Predicted value of ammonia concentration in pigsty Predicted value of carbon dioxide concentration in pigsty and predicted value of light intensity in pigsty as well as predicted value of feed storage temperature Predicted value of feed storage humidity Predicted value of feed storage time and predicted value of feed quality detection index
[0165] Combined with the predicted values of environmental parameters, calculate the environmental anomaly coefficient EAC, and the calculation formula is as follows:
[0166]
[0167] where, β i represents the dynamic weight correction coefficient of the i-th environmental parameter value; ω t,i represents the weight coefficient of the i-th environmental parameter changing with time; represents the predicted value of the i-th environmental parameter; represents the best theoretical value of the i-th environmental parameter; i = 1 represents the pigsty temperature, i = 2 represents the pigsty humidity, i = 3 represents the ammonia concentration in the pigsty, i = 4 represents the carbon dioxide concentration in the pigsty, i = 5 represents the light intensity in the pigsty, i = 6 represents the feed storage temperature, i = 7 represents the feed storage humidity, i = 8 represents the feed storage time, i = 9 represents the feed quality detection index;
[0168] The preset environmental anomaly coefficient threshold EAT = 0.3;
[0169] If EAC ≤ EAT, it is judged that the environment of the pigsty is normal, and the original state management is maintained;
[0170] If EAC > EAT, it is judged that the environment of the pigsty is abnormal, and an environmental anomaly warning message is issued;
[0171] The example is as follows:
[0172] The predicted values of environmental parameters obtained are: predicted value of pigsty temperature predicted value of pigsty humidity predicted value of ammonia concentration in pigsty predicted value of carbon dioxide concentration in pigsty predicted value of light intensity in pigsty as well as predicted value of feed storage temperature predicted value of feed storage humidity predicted value of feed storage time days, predicted value of feed quality detection index
[0173] Optimal theoretical value of pigsty temperature Dynamic weight correction coefficient β1 = 1.5, weight coefficient ω varying with time t,1 = 0.1;
[0174] Optimal theoretical value of pigsty temperature Dynamic weight correction coefficient β2 = 1.2, weight coefficient ω varying with time t,2 = 0.15;
[0175] Optimal theoretical value of pigsty humidity Dynamic weight correction coefficient β3 = 1.0, weight coefficient ω varying with time t,3 = 0.1;
[0176] Optimal theoretical value of ammonia concentration in pigsty Dynamic weight correction coefficient β i = 1.5, weight coefficient ω varying with time t,4 = 0.1;
[0177] Optimal theoretical value of feed storage temperature Dynamic weight correction coefficient β5 = 1.3, weight coefficient ω varying with time t,5 = 0.15;
[0178] Optimal theoretical value of feed storage humidity Dynamic weight correction coefficient β6 = 1.2, weight coefficient ω varying with time t,6 = 0.1;
[0179] Optimal theoretical value of feed storage time Dynamic weight correction coefficient β7 = 1.1, weight coefficient ω varying with time t,7 = 0.1;
[0180] Optimal theoretical value of feed quality detection index days, dynamic weight correction coefficient β8 = 1.0, weight coefficient ω varying with time t,8 = 0.1;
[0181] Optimal theoretical value of pigsty temperature Dynamic weight correction coefficient β9 = 1.5, weight coefficient ω varying with time t,9 = 0.1;
[0182]
[0183] Calculate environmental anomaly coefficient EAC:
[0184] EAC = 0.013 + 0.029 + 0.030 + 0.019 + 0.039 + 0.016 + 0.012 + 0.060 + 0.075 = 0.263;
[0185] Therefore, if EAC < EAT, it is determined that the environment of the pigsty is normal and the original state management is maintained.
[0186] Furthermore, in this embodiment, the disease early warning analysis includes:
[0187] Input the real-time status data into the pig breeding disease early warning model to obtain the probability value of a pig getting sick And calculate the disease risk coefficient DRC according to the following formula:
[0188]
[0189] where γ represents the individual difference correction factor of pigs; α represents the adjustment coefficient; λ j represents the influence coefficient of the j-th state parameter; X j represents the real-time value of the j-th state parameter; represents the optimal theoretical value of the j-th state parameter; j = 1 represents the body temperature of pigs; j = 2 represents the heart rate of pigs; j = 3 represents the respiratory rate of pigs; j = 4 represents the food intake of pigs; j = 5 represents the water intake of pigs; j = 6 represents the activity duration of pigs; j = 7 represents the standing duration of pigs; j = 8 represents the lying time of pigs;
[0190] The preset disease early warning threshold DWT = 0.5;
[0191] If DRC ≤ DWT, it is determined that the pigs currently have no risk of getting sick and the original state management is maintained;
[0192] If DRC > DWT, it is determined that the pigs currently have a risk of getting sick and a disease risk warning message for pigs is issued;
[0193] The example is as follows:
[0194] γ = 0.85; α = 0.7; λ1 = 10, representing the influence coefficient of pig body temperature; λ2 = 0.15, representing the influence coefficient of pig heart rate; λ3 = 0.15, representing the influence coefficient of pig respiratory rate; λ4 = 1, representing the influence coefficient of pig food intake; λ5 = 0.15, representing the influence coefficient of pig water intake; λ6 = 1, representing the influence coefficient of pig activity duration; λ7 = 0.20, representing the influence coefficient of pig standing duration; λ8 = 0.40, representing the influence coefficient of pig lying time;
[0195] X1 = B T2 = 38.7°C; X2 = B HR2 = 85 times / minute; X3 = BRR2 = 22 times / minute;
[0196] X4 = F C2 = 2.3 kg; X5 = W C2 = 3.5 L; X6 = A T2 = 3.2 hours; X7 = S T2 = 1.3 hours;
[0197] X8 = L T2 = 3.5 hours;
[0198] represents the optimal theoretical value of the body temperature of the pig;
[0199] represents the optimal theoretical value of the heart rate of the pig;
[0200] represents the optimal theoretical value of the respiratory rate of the pig;
[0201] represents the optimal theoretical value of the food intake of the pig;
[0202] represents the optimal theoretical value of the water intake of the pig;
[0203] represents the optimal theoretical value of the activity duration of the pig;
[0204] represents the optimal theoretical value of the standing duration of the pig;
[0205] represents the optimal theoretical value of the lying time of the pig;
[0206] Calculate the disease risk coefficient DRC:
[0207] DRC = 0.85 * [0.7 * 0.3 + (1 - 0.3) * (0.01 + 0.02 + 0.02 + 0.08 + 0.03 + 0.07 + 0.06 + 0.05)] = 0.85 * [0.210 + 0.238] = 0.38;
[0208] So DRC < DWT, then it is judged that the pig currently has no disease risk and maintains the original state management.
[0209] Furthermore, in this embodiment, the analysis of the disease condition of the pig includes:
[0210] If EAC ≤ EAT, then analyze the state parameters that cause the pig to have a disease risk;
[0211] The analysis of the state parameters that cause the pig to have a disease risk includes:
[0212] Calculate the proportion P of each state parameter in the disease risk coefficient DRC j , and the calculation formula is as follows:
[0213]
[0214] where P j represents the proportion of the j-th state parameter in the disease risk coefficient DRC; γ represents the individual difference correction factor of pigs; α represents the adjustment coefficient; λ j represents the influence coefficient of the j-th state parameter; X j represents the real-time value of the j-th state parameter; represents the optimal theoretical value of the j-th state parameter; j = 1, 2, 3, …, 8; j = 1 represents the body temperature of pigs; j = 2 represents the heart rate of pigs; j = 3 represents the respiratory rate of pigs; j = 4 represents the food intake of pigs; j = 5 represents the water intake of pigs; j = 6 represents the activity duration of pigs; j = 7 represents the standing duration of pigs; j = 8 represents the lying time of pigs;
[0215] If P1 > 0.4 and then it is determined that the state parameter causing the risk of illness in pigs is the body temperature of pigs;
[0216] If P2 > 0.3 and then it is determined that the state parameter causing the risk of illness in pigs is the heart rate of pigs;
[0217] If P3 > 0.2 and then it is determined that the state parameter causing the risk of illness in pigs is the respiratory rate of pigs;
[0218] If P4 > 0.3 and then it is determined that the state parameter causing the risk of illness in pigs is the food intake of pigs;
[0219] If P5 > 0.5 and then it is determined that the state parameter causing the risk of illness in pigs is the water intake of pigs;
[0220] If P6 > 0.3 and then it is determined that the state parameter causing the risk of illness in pigs is the activity duration of pigs;
[0221] If P7 > 0.3 and then it is determined that the state parameter causing the risk of illness in pigs is the standing duration of pigs;
[0222] If P8 > 0.3 and then it is determined that the state parameter causing the risk of illness in pigs is the lying time of pigs;
[0223] If EAC > EAT, then in combination with the results of the environmental early warning analysis, analyze the correlation between the risk of pigs getting sick and environmental factors;
[0224] Analyzing the correlation between the risk of pigs getting sick and environmental factors includes:
[0225] Calculate the proportion M of each environmental parameter in the environmental anomaly coefficient EAC i , and the calculation formula is as follows:
[0226]
[0227] Among them, M i represents the proportion of the i-th environmental parameter in the environmental anomaly coefficient EAC; β i represents the dynamic weight correction coefficient of the i-th environmental parameter value; ω t,i represents the weight coefficient of the i-th environmental parameter changing with time; represents the predicted value of the i-th environmental parameter; represents the best theoretical value of the i-th environmental parameter; i = 1, 2, 3,..., 9; i = 1 represents the pigsty temperature, i = 2 represents the pigsty humidity, i = 3 represents the ammonia concentration in the pigsty, i = 4 represents the carbon dioxide concentration in the pigsty, i = 5 represents the light intensity in the pigsty, i = 6 represents the feed storage temperature, i = 7 represents the feed storage humidity, i = 8 represents the feed storage time, i = 9 represents the feed quality detection index;
[0228] If M1 > 0.15 and then it is determined that the pigsty temperature is abnormal, which has an impact on the body temperature, activity duration, and standing duration of pigs;
[0229] If M2 > 0.20 and then it is determined that the pigsty humidity is abnormal, which has an impact on the food intake and respiratory rate of pigs;
[0230] If M3 > 0.30 and then it is determined that the ammonia concentration in the pigsty is abnormal, which has an impact on the respiratory rate of pigs;
[0231] If M4 > 0.20 and then it is determined that the carbon dioxide concentration is abnormal, which has an impact on the respiratory rate, activity duration, and standing duration of pigs;
[0232] If M5 > 0.25 and then it is determined that the light intensity in the pigsty is abnormal, which has an impact on the activity duration, standing duration, and lying time of pigs;
[0233] If M6 > 0.15 and then it is determined that the feed storage temperature is abnormal, which has an impact on the food intake of pigs;
[0234] If M7 > 0.20 and then it is determined that the humidity of the feed storage is abnormal, which affects the feed intake of pigs;
[0235] If M8 > 0.30 and then it is determined that the storage time of the feed is abnormal, which affects the feed intake of pigs;
[0236] If M9 > 0.10 and then it is determined that the quality inspection index of the feed is abnormal, which affects both the activity duration and the lying time of pigs;
[0237] When the abnormal environmental parameters correspond to the state parameters that cause the risk of pigs getting sick, the pig house environment is treated until it returns to normal. Then, the state parameters of pigs are collected 3 times at the original sampling time interval, and the disease risk coefficient DRC is calculated. If DRC ≤ DWT is satisfied every time, it is determined that the risk of pigs getting sick is related to environmental factors. If DRC ≤ DWT is not satisfied any time, it is determined that the risk of pigs getting sick is not related to environmental factors;
[0238] When the abnormal environmental parameters do not correspond to the state parameters that cause the risk of pigs getting sick, it is determined that the risk of pigs getting sick is not related to environmental factors;
[0239] The examples are as follows:
[0240] For example, the real-time value of the body temperature of pigs collected is X1 = 43.5 °C; represents the best theoretical value of the body temperature of pigs; γ = 0.85; α = 0.7; λ1 = 10, representing the influence coefficient of the body temperature of pigs;
[0241] The disease risk coefficient DRC = 0.6;
[0242] P1 = 0.43 > 0.4, then it is determined that the state parameter that causes the risk of pigs getting sick is the body temperature of pigs;
[0243] If EAC = 0.4 and EAC > EAT, then obtain the best theoretical value of the temperature in the pig house The dynamic weight correction coefficient β1 = 1.5, and the weight coefficient ω t,1 = 0.1;
[0244] M1 = 0.19 > 0.15, then it is determined that the temperature in the pig house is abnormal, which affects the body temperature of pigs;
[0245] Process the temperature of the pigsty until it returns to normal. Then, collect the body temperature of the pigs 3 times at the original collection time interval, and calculate the disease risk coefficient DRC. If DRC ≤ DWT is satisfied every time, it is determined that the risk of the pig being sick is related to environmental factors, that is, the abnormal body temperature of the pig is caused by the abnormal temperature of the pigsty.
[0246] Furthermore, in this embodiment, the equipment warning analysis includes:
[0247] Combined with the running real-time data, calculate the equipment risk coefficient δ according to the following formula:
[0248]
[0249] where μ1, μ2, μ3, and μ4 are all weight coefficients, satisfying μ1 + μ2 + μ3 + μ4 = 1;
[0250] If δ > 0.5, it is determined that the current equipment is at high risk, and a high-risk warning message for the equipment is issued;
[0251] If 0.2 < δ ≤ 0.5, it is determined that the current equipment is at medium risk, and a medium-risk warning message for the equipment is issued;
[0252] If 0 < δ ≤ 0.2, it is determined that the current equipment is at low risk, and a low-risk warning message for the equipment is issued;
[0253] If δ = 0, it is determined that the current equipment has no risk, and the original state management is maintained;
[0254] The example is as follows:
[0255] μ1 = 0.3, μ2 = 0.2, μ3 = 0.3, μ4 = 0.2;
[0256] δ = 0.3 * 0 + 0.2 * 0 + 0.3 * 1 + 0.2 * 0 = 0.3;
[0257] Then 0.2 < δ ≤ 0.5, it is determined that the current equipment is at medium risk, and a medium-risk warning message for the equipment is issued. The breeding personnel perform equipment maintenance or other processing according to the medium-risk warning message of the equipment.
[0258] In the description of this application, it should be understood that the orientation or positional relationship indicated by orientation words such as "front, back, up, down, left, right", "horizontal, vertical, horizontal", and "top, bottom" is usually based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing this application and simplifying the description. Without contrary instructions, these orientation words do not indicate and imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the protection scope of this application.
[0259] For those skilled in the art, various other corresponding changes and deformations can be made according to the technical solutions and concepts described above, and all such changes and deformations should fall within the protection scope of the claims of this application.
Claims
1. An Internet-based pig breeding environment early warning management system, characterized in that: include: The data acquisition and processing module is used to collect the environmental data of the pig house, the status data of the pigs and the operation data of the equipment, and perform data processing; A data transmission communication module, used to transmit the data collected by the data collection and processing module, and to send early warning information to the breeding personnel; A model building module is used to build an environmental prediction model, a disease prediction model and a risk prediction model, and train the three models in combination with the data collected by the data collection and processing module; The early warning management and analysis module is used to input the real-time data collected by the data collection and processing module into the three models of the model construction module, analyze the corresponding early warning situations and perform early warning management.
2. An Internet-based pig breeding environment early warning management method, applied to the Internet-based pig breeding environment early warning management system as claimed in claim 1, characterized in that: The following steps are involved: S1. Collect environmental data of the pig house, status data of the pigs, and operation data of the equipment, and transmit the data to the edge computing gateway for processing through Internet communication technology to obtain a pig parameter data set for model training; S2. Construct an environment prediction model, a disease prediction model and a risk prediction model, and train the three models in combination with the pig parameter data set to obtain a trained pig breeding environment early warning model, a pig breeding disease early warning model and a pig breeding risk early warning model; S3, collecting real-time environmental data of the pig house, real-time status data of the pigs, and real-time operation data of the equipment, and inputting them into the pig breeding environment early warning model, the pig breeding disease early warning model, and the pig breeding risk early warning model for analysis, obtaining corresponding early warning conditions, and performing early warning management according to the early warning conditions; S4. Record the early warning management process and early warning management data, and use data analysis technology to analyze to obtain analysis results, and optimize and adjust the pig breeding environment early warning management system according to the analysis results.
3. The Internet-based pig breeding environment early warning management method according to claim 2 is characterized in that: The step S1 specifically includes: Assume that a pig breeding cycle is T y ; The time interval for collecting environmental data of the pig house is set to Δt1. The environmental data collected includes: the temperature value T1, humidity value H1, ammonia concentration value A1, carbon dioxide concentration value C1 and light intensity L1 in the pig house, as well as the storage temperature value F of the feed. T1 , Storage humidity value F H1 , storage time F TS1 And feed quality test index F Q1 ; Set the specific collection time period of the pig status data to Δt2, and the status data collection includes: the body temperature value B of each pig T1 、Heart rate value B HR1 , respiratory rate value B RR1 , food intake value F C1 , water intake value W C1 、Activity duration A T1 , standing time S T1 and lying time L T1 ; Set the equipment operation data collection time interval to Δt3, with the normal state of the equipment as 1 and the abnormal state as 0. The operation data collection includes: the operation state V S1 , operating status of temperature control equipment R S1 , Operation status of feeding equipment S1 , operating status of drinking water equipment Y S1 ; Obtain the environmental data, the status data, and the operating data of N breeding cycles and transmit them to an edge computing gateway through Internet communication technology; where, Δt1 < T y ; Δt2 < T y ; Δt3 < T y .
4. The Internet-based pig breeding environment early warning management method according to claim 3 is characterized in that: The step S1 further comprises: The edge computing gateway converts the environmental data, the status data, and the operation data received in different formats into a standard format; Analyze the environmental data, the status data, and the operating data using statistical outlier detection technology to identify and remove outliers; An interpolation algorithm is used to process missing values of the environmental data and the status data, and a mode filling method is used to process missing values of the operation data; Aggregating the environmental data, the state data and the operating data to obtain an aggregated pig aggregate data set; The pig aggregate data set is divided into a training set and a validation set in a ratio of X1:X2, and the training set and the validation set constitute a pig parameter data set for model training.
5. The Internet-based pig breeding environment early warning management method according to claim 2 is characterized in that: The step S2 specifically includes: Constructing the environmental prediction model includes: The model is constructed using a long short-term memory network, with n layers and m neurons in each layer. The mean square error is used as the loss function, Adam is used as the optimizer, the number of training rounds is Q, and the batch size is b; The environment prediction model is trained using the training set, and after the training is completed, the environment prediction model is evaluated using the validation set to calculate the mean square error (MSE) and mean absolute error (MAE) between the predicted value and the actual value; If MSE≤0.1 and MAE≤0.05, the environmental prediction model is used as an early warning model for the pig breeding environment; If MSE>0.1 and / or MAE>0.05, retrain and evaluate the environment prediction model until MSE≤0.1 and MAE≤0.05 are satisfied; Constructing the disease prediction model includes: The disease prediction model is constructed using the random forest algorithm, with the number of decision trees being K and the maximum depth being D layers; The disease prediction model is trained using the training set, and after the training is completed, the disease prediction model is evaluated using the validation set to calculate the disease model accuracy Acc1, the disease model recall R1 and the disease model F1 value; If Acc1≥0.85, R1≥0.85 and F1≥0.85 are all satisfied, the disease prediction model is used as a pig breeding disease early warning model; If any one of Acc1≥0.85, R1≥0.85 and F1≥0.85 is not satisfied, the disease prediction model is retrained and evaluated until Acc1≥0.85, R1≥0.85 and F1≥0.85 are all satisfied; Constructing the risk prediction model includes: The risk prediction model is constructed by using a support vector machine, a radial basis kernel function is used, and the penalty parameter C is set to 1; The risk prediction model is trained using the training set, and after the training is completed, the risk prediction model is evaluated using the validation set to calculate the risk model accuracy Acc2, the risk model recall R2 and the risk model F1' value; If Acc2≥0.80, R2≥0.80 and F1'≥0.85 are all met, the disease prediction model is used as a pig farming risk warning model; If any one of Acc2≥0.80, R2≥0.80 and F1'≥0.80 is not satisfied, the risk prediction model is retrained and evaluated until Acc2≥0.85, R2≥0.85 and F1'≥0.85 are all satisfied.
6. The Internet-based pig breeding environment early warning management method according to claim 5 is characterized in that: The step S3 specifically includes: Collect real-time data on the pig house environment, pig status, and equipment operation; Inputting the real-time environmental data into the pig breeding environment early warning model and performing environmental early warning analysis; Inputting the real-time status data into the pig breeding disease early warning model and performing disease early warning analysis; Input the real-time operation data into the pig breeding risk early warning model, and perform equipment early warning analysis; The real-time environmental data include: the real-time value of the pig house temperature T2, the real-time value of the pig house humidity H2, the real-time value of the pig house ammonia concentration A2, the real-time value of the pig house carbon dioxide concentration C2, the real-time value of the pig house light intensity L2, and the real-time value of the feed storage temperature F T2 , Real-time value of feed storage humidity F H2 , Real-time value of feed storage time F TS2 and real-time value of feed quality detection index F Q2 ; The real-time status data includes: the real-time value of the pig's body temperature B T2 , Real-time value of pig heart rate B HR2 , Real-time value of pig respiratory rate B RR2 , Real-time value of pigs’ food intake F C2 , the real-time value of pig water drinking volume W C2 , Real-time value of pig activity time A T2 , the real-time value of the pig's standing time S T2 and the real-time value of the pig's lying time L T2 ; The real-time operation data includes: the real-time operation status V of the ventilation equipment S2 , Real-time operating status of temperature control equipment S2 , real-time operating status of feeding equipment S2 , Real-time operating status of drinking water equipment S2 .
7. The Internet-based pig breeding environment early warning management method according to claim 6 is characterized in that: The environmental early warning analysis includes: The real-time environmental data is input into the pig breeding environment early warning model to obtain the predicted values of environmental parameters in the future, and the predicted values of environmental parameters include: the predicted value of the temperature of the pig house; The predicted value of humidity in the pig house The predicted value of ammonia concentration in the pig house Predicted values of CO2 concentration in the pig house and the predicted value of the light intensity in the pig house and the predicted value of the feed storage temperature Predicted value of the feed storage humidity Prediction of the feed storage time and the predicted value of the feed quality detection index Combined with the predicted values of the environmental parameters, the environmental anomaly coefficient EAC is calculated, and the calculation formula is as follows: Among them, β i Represents the dynamic weight correction coefficient of the i-th environmental parameter value; ω t,i Represents the weight coefficient of the i-th environmental parameter changing with time; represents the predicted value of the i-th environmental parameter; X i represents the optimal theoretical value of the i-th environmental parameter; i=1 represents the temperature of the pig house, i=2 represents the humidity of the pig house, i=3 represents the ammonia concentration of the pig house, i=4 represents the carbon dioxide concentration of the pig house, i=5 represents the light intensity of the pig house, i=6 represents the feed storage temperature, i=7 represents the feed storage humidity, i=8 represents the feed storage time, and i=9 represents the feed quality detection index; The preset environmental anomaly coefficient threshold EAT = 0.3; If EAC≤EAT, the pig house environment is considered normal and the original management status is maintained; If EAC>EAT, the environment of the pig house is judged to be abnormal, and an abnormal environment warning message is issued.
8. The Internet-based pig breeding environment early warning management method according to claim 7 is characterized in that: The disease early warning analysis includes: The real-time data of the state is input into the early warning model of pig breeding diseases to obtain the probability value of pig disease The disease risk coefficient DRC is calculated according to the following formula: Among them, γ represents the correction factor of individual differences of pigs; α represents the adjustment coefficient; λ j represents the influence coefficient of the jth state parameter; X j represents the real-time value of the jth state parameter; Y j represents the optimal theoretical value of the jth state parameter; j=1 represents the body temperature of the pig; j=2 represents the heart rate of the pig; j=3 represents the respiratory rate of the pig; j=4 represents the amount of food intake of the pig; j=5 represents the amount of water drinking of the pig; j=6 represents the activity time of the pig; j=7 represents the standing time of the pig; j=8 represents the lying time of the pig; The preset disease warning threshold DWT = 0.5; If DRC≤DWT, it is judged that the pig is not at risk of disease at present and the original status management is maintained; If DRC>DWT, it is judged that the pig is currently at risk of disease, a pig disease risk warning message is issued, and the pig disease status is analyzed.
9. The Internet-based pig breeding environment early warning management method according to claim 8 is characterized in that: The pig disease status analysis includes: If EAC≤EAT, analyze the status parameters that cause the pigs to be at risk of disease; If EAC>EAT, then the correlation between the disease risk of pigs and environmental factors is analyzed in combination with the results of the environmental early warning analysis.
10. The Internet-based pig breeding environment early warning management method according to claim 6 is characterized in that: The equipment early warning analysis includes: Combined with the real-time operation data, the equipment risk coefficient δ is calculated according to the following formula: Among them, μ1, μ2, μ3 and μ4 are all weight coefficients, satisfying μ1+μ2+μ3+μ4=1; If δ>0.5, the current equipment is judged to be at high risk and a high-risk warning message is issued; If 0.2<δ≤0.5, the current equipment is judged to be at medium risk, and a medium risk warning message is issued; If 0<δ≤0.2, the current equipment is judged to be at low risk, and a low-risk warning message for the equipment is issued; If δ=0, the current device is judged to be risk-free and the original state management is maintained.
Citation Information
Cited By
Hog house disinfection, deodorization and epidemic prevention breeding system
CN120827090A
Common animal disease early warning method and system based on breeding environment detection data
CN120853889A
Chicken house environment linkage alarm abnormal control method and system adaptive to breeding scene
CN122618758A