CN111368975A - Method for predicting dynamic change of multi-environment factors in pigsty - Google Patents

Method for predicting dynamic change of multi-environment factors in pigsty Download PDF

Info

Publication number
CN111368975A
CN111368975A CN202010118786.2A CN202010118786A CN111368975A CN 111368975 A CN111368975 A CN 111368975A CN 202010118786 A CN202010118786 A CN 202010118786A CN 111368975 A CN111368975 A CN 111368975A
Authority
CN
China
Prior art keywords
data
prediction
environmental
pigsty
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010118786.2A
Other languages
Chinese (zh)
Inventor
谢秋菊
包军
刘洪贵
于海明
张继成
郑萍
仝志民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northeast Agricultural University
Original Assignee
Northeast Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northeast Agricultural University filed Critical Northeast Agricultural University
Priority to CN202010118786.2A priority Critical patent/CN111368975A/en
Publication of CN111368975A publication Critical patent/CN111368975A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/0004Gaseous mixtures, e.g. polluted air
    • G01N33/0009General constructional details of gas analysers, e.g. portable test equipment
    • G01N33/0027General constructional details of gas analysers, e.g. portable test equipment concerning the detector
    • G01N33/0031General constructional details of gas analysers, e.g. portable test equipment concerning the detector comprising two or more sensors, e.g. a sensor array
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/0004Gaseous mixtures, e.g. polluted air
    • G01N33/0009General constructional details of gas analysers, e.g. portable test equipment
    • G01N33/0062General constructional details of gas analysers, e.g. portable test equipment concerning the measuring method or the display, e.g. intermittent measurement or digital display
    • G01N33/0063General constructional details of gas analysers, e.g. portable test equipment concerning the measuring method or the display, e.g. intermittent measurement or digital display using a threshold to release an alarm or displaying means
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/0004Gaseous mixtures, e.g. polluted air
    • G01N33/0009General constructional details of gas analysers, e.g. portable test equipment
    • G01N33/0062General constructional details of gas analysers, e.g. portable test equipment concerning the measuring method or the display, e.g. intermittent measurement or digital display
    • G01N33/0068General constructional details of gas analysers, e.g. portable test equipment concerning the measuring method or the display, e.g. intermittent measurement or digital display using a computer specifically programmed
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/0004Gaseous mixtures, e.g. polluted air
    • G01N33/0009General constructional details of gas analysers, e.g. portable test equipment
    • G01N33/0073Control unit therefor
    • G01N33/0075Control unit therefor for multiple spatially distributed sensors, e.g. for environmental monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/02Agriculture; Fishing; Forestry; Mining
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/80Management or planning
    • Y02P90/84Greenhouse gas [GHG] management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Analytical Chemistry (AREA)
  • Medicinal Chemistry (AREA)
  • Biochemistry (AREA)
  • Food Science & Technology (AREA)
  • Combustion & Propulsion (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Strategic Management (AREA)
  • Artificial Intelligence (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Software Systems (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Agronomy & Crop Science (AREA)
  • Animal Husbandry (AREA)

Abstract

The invention provides a method for predicting dynamic change of multi-environment factors in a pigsty. The invention provides a pig house multi-environment factor change prediction method based on a long-short term memory time sequence (LSTM) through a pig house multi-environment factor dynamic change prediction method, combines various environment historical data (including temperature, humidity, ammonia concentration, hydrogen sulfide concentration and carbon dioxide concentration) monitored by an environment monitoring sensor in a pig house, trains an LSTM prediction model according to a set prediction precision allowable range, generates a prediction model meeting the precision requirement, and realizes accurate prediction of the temperature, the humidity, the ammonia concentration, the hydrogen sulfide concentration, the carbon dioxide concentration and the like in the pig house in a period of time in the future; when the environmental factor in the pig house is predicted to exceed the requirement of the environmental control in the pig house, an alarm is automatically sent out through the early warning device, the environmental control equipment in the pig house is started to control the corresponding environmental factor, the condition that the environmental control in the pig house is controlled in advance according to the predicted value is achieved, and the problem that the environmental control effect of the pig house is delayed is relieved.

Description

Method for predicting dynamic change of multi-environment factors in pigsty
Technical Field
The invention relates to the field of livestock and poultry breeding, in particular to a method for predicting dynamic change of multi-environmental factor in a pigsty.
Background
In modern large-scale pig raising production, due to the fact that feeding density is high, space in a pigsty is relatively closed, so that environment quality in the pigsty is particularly important for health of pigs, and the pigsty is another key factor which restricts pig raising production besides genetic genes. The pigsty environment mainly comprises the temperature and humidity of air in the pigsty, the concentration of harmful gas, dust, bacteria, illumination, ventilation and the like. The house temperature is one of the major environmental factors affecting the health and reproductive ability of pigs, and it directly affects the heat balance of pigs. The pig body maintains constant body temperature through heat production and heat dissipation balance, and normal life activities are carried out. The air humidity of the pigsty directly influences the heat dissipation of the pig body, and the high-humidity environment can cause bacterial breeding and disease induction. Harmful gas and dust particles can cause respiratory system diseases, and especially can cause serious damage to the health of the respiratory system of pigs when the pigs grow in a piggery environment with excessive ammonia for a long time. Therefore, a proper environment in the pigsty is created, the health level and the reproductive capacity of the swinery can be effectively improved, and the quality of the environment in the pigsty is an important component for the development of the pig industry.
Monitoring of environmental quality in the pigsty is an important basis for realizing precise and intelligent pigsty environmental control and management. However, most of the current piggery internal environment quality monitoring realizes the start and stop control of equipment by installing sensors of temperature, humidity, ammonia concentration and the like in the piggery or relying on traditional manual observation. However, the sensor data can only monitor the current environmental condition, and cannot predict the environmental change trend in the pigsty, and cannot adjust the running state of the environmental control equipment in advance, so that the environmental control effect is delayed to a certain extent. Considering the environmental change trend in the piggery is an important means for realizing the precise and timely control of the environment. The scholars in the future propose linear and nonlinear methods, CFD (computational fluid dynamics) method and neural network method for predicting the environmental change trend in the house. However, these methods are all prediction methods based on data-driven single environmental factor change, and because various types of sensors and monitoring data volume are continuously enlarged at present, these methods in the past cannot realize accurate, efficient and large-data-volume prediction of multi-environmental factor change such as temperature, humidity, ammonia concentration, hydrogen sulfide concentration and the like in a pigsty. Therefore, a method for predicting multi-environmental factors in a pigsty needs to be invented. At present, no intelligent dynamic prediction method for monitoring the change of environmental factors in a pigsty by combining various sensors in real time has been reported.
In summary, the present invention is directed to a method for predicting changes of environmental factors in a pigsty based on deep learning, which dynamically predicts and warns the next-time change trend of the environmental factors in the pigsty based on historical data monitored by a plurality of sensors, provides a decision for environmental control, and solves the problem of delayed environmental control effect caused by using real-time sensor monitoring data as an environmental control rule.
Disclosure of Invention
The core idea of the invention is to provide a pig house multi-environment factor change prediction method based on a long-short term memory time sequence (LSTM) deep learning algorithm, the core idea is to generate an LSTM prediction model through training according to various environment historical data (including temperature, humidity, ammonia concentration, hydrogen sulfide concentration and carbon dioxide concentration) monitored by an environment monitoring sensor in a pig house to predict the temperature, humidity, ammonia concentration, hydrogen sulfide concentration and carbon dioxide concentration in the pig house in a future period of time, and when the prediction precision exceeds an allowable range, the model is dynamically corrected by increasing the environment data monitored by the sensor in real time to achieve the expected prediction precision, so that the dynamic accurate prediction of multi-environment factor change in the pig house is realized. When predicting that the environmental factor in the pig house is likely to surpass the environmental control requirement in the house, send out the police dispatch newspaper through early warning device is automatic, starts the environmental control equipment in the house simultaneously and controls corresponding environmental factor, accomplishes to control pig house internal environment in advance according to the predicted value, prevents to control again when unusual and produce great environmental control effect hysteresis because of the environmental factor in the pig house.
The core idea of the invention is mainly realized by a method for predicting the dynamic change of the multi-environmental factors in the pigsty, and the method comprises the following steps:
① multiple environmental factor data collection in house
Through arranging the multiple spot environment in the pig house and gathering the sensor, carry out the time acquisition to temperature, humidity, ammonia concentration, carbon dioxide concentration, hydrogen sulfide concentration in the pig house, gather the time interval and set up to 1 minute. And uploading the collected various environmental data in the pigsty to a data server for storage.
② obtaining multiple environmental factor time sequence in pigsty
Taking out the data of temperature, humidity, ammonia concentration, hydrogen sulfide concentration and carbon dioxide concentration stored in the database server and monitored by various sensors installed in the pigsty, and respectively constructing a time sequence X with the length of nk=(xk1,xk2,......,xkn) (k ═ 1,2,3,4,5, and represents temperature, humidity, ammonia concentration, hydrogen sulfide concentration, and carbon dioxide concentration, respectively).
③ data preprocessing
There is a possibility that data retrieved from the server may have abnormal data due to a sensor failure, network transmission, or the like, and it is necessary to process the abnormal data. The value of the abnormal data point is calculated by linear interpolation to replace the abnormal data. In addition, normalization preprocessing needs to be performed on the data, the environmental data of a plurality of time series are normalized to a value range [0,1] interval, and the normalization method adopts a maximum and minimum method, as shown in formula (1).
Figure BDA0002391365740000031
Wherein, x', xmaxAnd xminAre respectively made intoIs normalized at [0,1]]Environmental data over the interval, monitoring the obtained environmental data, and the maximum value and the minimum value of the environmental data in the time series.
④ data set partitioning
The data set is divided into a training set and a test set. Will be time series Xk=(xk1,xk2,......,xkn) Division into training data sets S of length mk=(xk1,xk2,......,xkm) And a prediction dataset T of length p ═ n-mk=(xkm+1,xkm+2,......,xkn),Xk=(Sk,Tk) (k ═ 1,2,3,4,5, and represents temperature, humidity, ammonia concentration, hydrogen sulfide concentration, and carbon dioxide concentration, respectively). Training data set SkAnd the method is used for constructing the model and obtaining the model parameters. Test data set TkAnd (4) testing the model.
⑤ LSTM network structure and parameter optimization
The network structure design comprises the network layer number and the node number of each layer of the network. The invention adopts a three-layer network structure design.
The first layer is an input layer and is responsible for receiving the collected historical data of the temperature, the humidity, the ammonia concentration, the hydrogen sulfide concentration and the carbon dioxide concentration in the pigsty and external influence factor data and carrying out normalization processing on the data.
The second layer is the hidden layer, containing LSTM, full connectivity and back 3 sub-layers. The LSTM sublayer is responsible for learning the long-term dependencies between each step of the time series data to perform some interactions that help improve the long sequence gradient flow. All nodes in the fully connected sub-layer are connected with nodes in the LSTM sub-layer and external influence data to learn all characteristics of the previous layer and external influence factors on all input variables. Each step of fully connecting the sublayers is performed independently, multiplying the input variables by the weight matrix W, and adding the bias matrix vector b. The regression sublayer is connected to the full-link sublayer and is used to calculate the root mean square error loss (half-mean-squared-error) of the sequences to the sequence network. The unnormalized loss prediction response for each step is calculated from equation (2).
Figure BDA0002391365740000041
Wherein S is the length of the sequence, tkjAnd ykjRespectively is the sequence value and the network predicted value of the k step. The average loss of observations is calculated from small batches when the network is trained.
The third layer is an output layer. Output layer will imply layer output quantity O1And O2Inverse normalization processing into predicted value of temperature y in pigsty1And humidity y in the pigsty2Ammonia concentration y3Concentration of hydrogen sulfide y4Carbon dioxide concentration y5The inverse normalization formula is obtained by transforming the observation value in the normalization process by using the formula (1).
The number of nodes of the hidden layer, the learning speed of the network and the delay time length directly determine the performance of the whole network. Therefore, a node number set {200,400,800,1200,1600,2000}, a network learning rate set {0.001,0.003,0.005,0.008,0.01} and a delay time length set {1,2,3} are respectively set, the node number, the learning rate and the delay time are respectively valued in each set, and parameters are finally optimized according to model prediction performance.
⑥ model training
Training a large amount of historical data according to the set number of network nodes, the learning rate and the iteration times, obtaining the change rule of each environmental factor, and generating model parameters. And calculating an actual prediction output value of the piggery multi-environment factor prediction network according to the forward feedback. Calculating the expected output y of the entire time series according to equation (2)etAnd the actual output yatThe error between. And optimizing the parameters according to the difference between the predicted value and the expected value, and updating the LSTM network parameters. And adding 1 to the iteration times, judging whether the iteration times iter is less than or equal to the set maximum iteration times max _ iter, if so, continuing to train the model, and otherwise, finishing the training of the prediction model.
⑦ generating predictive models
And generating a prediction model according to the collected historical data, the model training method and the parameter optimization algorithm, and realizing the prediction of the change of the environmental factors in the house with a certain step length. Then the predicted value and the error of the measured value are compared with the allowable prediction error, if the prediction error is smaller than the allowable range, the prediction model and the predicted value can be used as a parameter model and a parameter number of an environment control decision, and the prediction data is sent to the early warning equipment; if the prediction error is larger than the allowable range, the prediction model is low in accuracy and cannot meet the prediction accuracy requirement, and new environment monitoring data needs to be added to retrain the updated model.
And sending the predicted multi-environment factor data in the pigsty into an early warning device. The early warning device comprises a parameter setting panel, a prediction data storage module, a data sending module, a data display module, an alarm module and an environment control strategy generation module; the parameter setting panel consists of a control parameter range and an alarm parameter and is used for setting the control parameter change range of various environmental factors in the pigsty and the alarm mode when abnormal environmental factor changes; a prediction data storage module: the multi-environment factor prediction value output by the prediction model is temporarily stored; a data sending module: the system is used for sending the prediction data to a user side or a control equipment side; a data display module: the system is used for displaying predicted multi-environment factor data in the pigsty in real time; an alarm module: when the environmental factor is abnormal, the alarm is sent out; and (3) generating an environment control strategy: and when the environmental factors are abnormally changed, an environmental control strategy is generated in time, and the start and stop of each environmental control device are controlled.
Drawings
FIG. 1 is a block diagram of a method for predicting dynamic changes of environmental factors in a pigsty
FIG. 2 is a schematic flow chart of a method for predicting environmental factors in a pigsty.
Detailed Description
The following further describes embodiments of the present invention with reference to the drawings.
Referring to fig. 1 and 2, a method for predicting dynamic changes of environmental factors in a pigsty includes the following steps:
① multiple environmental factor data collection in house
Through arranging the multiple spot environment in the pig house and gathering the sensor, carry out the time acquisition to temperature, humidity, ammonia concentration, carbon dioxide concentration, hydrogen sulfide concentration in the pig house, gather the time interval and set up to 1 minute. And uploading the collected various environmental data in the pigsty to a data server for storage.
② obtaining multiple environmental factor time sequence in pigsty
Taking out the data of temperature, humidity, ammonia concentration, hydrogen sulfide concentration and carbon dioxide concentration stored in the database server and monitored by various sensors installed in the pigsty, and respectively constructing a time sequence X with the length of nk=(xk1,xk2,......,xkn) (k ═ 1,2,3,4,5, and represents temperature, humidity, ammonia concentration, hydrogen sulfide concentration, and carbon dioxide concentration, respectively).
③ data preprocessing
There is a possibility that data retrieved from the server may have abnormal data due to a sensor failure, network transmission, or the like, and it is necessary to process the abnormal data. The value of the abnormal data point is calculated by linear interpolation to replace the abnormal data. In addition, normalization preprocessing needs to be performed on the data, the environmental data of a plurality of time series are normalized to a value range [0,1] interval, and the normalization method adopts a maximum and minimum method, as shown in formula (1).
Figure BDA0002391365740000061
Wherein, x', xmaxAnd xminAre respectively normalized at [0,1]]Environmental data over the interval, monitoring the obtained environmental data, and the maximum value and the minimum value of the environmental data in the time series.
④ data set partitioning
The data set is divided into a training set and a test set. Will be time series Xk=(xk1,xk2,......,xkn) Division into training data sets S of length mk=(xk1,xk2,......,xkm) And prediction of length p ═ n-mData set Tk=(xkm+1,xkm+2,......,xkn),Xk=(Sk,Tk) (k ═ 1,2,3,4,5, and represents temperature, humidity, ammonia concentration, hydrogen sulfide concentration, and carbon dioxide concentration, respectively). Training data set SkAnd the method is used for constructing the model and obtaining the model parameters. Test data set TkAnd (4) testing the model.
⑤ LSTM network structure and parameter optimization
The network structure design comprises the network layer number and the node number of each layer of the network. The invention adopts a three-layer network structure design.
The first layer is an input layer and is responsible for receiving the collected historical data of the temperature, the humidity, the ammonia concentration, the hydrogen sulfide concentration and the carbon dioxide concentration in the pigsty and external influence factor data and carrying out normalization processing on the data.
The second layer is the hidden layer, containing LSTM, full connectivity and back 3 sub-layers. The LSTM sublayer is responsible for learning the long-term dependencies between each step of the time series data to perform some interactions that help improve the long sequence gradient flow. All nodes in the fully connected sub-layer are connected with nodes in the LSTM sub-layer and external influence data to learn all characteristics of the previous layer and external influence factors on all input variables. Each step of fully connecting the sublayers is performed independently, multiplying the input variables by the weight matrix W, and adding the bias matrix vector b. The regression sublayer is connected to the full-link sublayer and is used to calculate the root mean square error loss (half-mean-squared-error) of the sequences to the sequence network. The unnormalized loss prediction response for each step is calculated from equation (2).
Figure BDA0002391365740000071
Wherein S is the length of the sequence, tkjAnd ykjRespectively is the sequence value and the network predicted value of the k step. The average loss of observations is calculated from small batches when the network is trained.
The third layer is an output layer. The output layer outputs the hidden layerQuantity O1And O2Inverse normalization processing into predicted value of temperature y in pigsty1And humidity y in the pigsty2Ammonia concentration y3Concentration of hydrogen sulfide y4Carbon dioxide concentration y5The inverse normalization formula is obtained by transforming the observation value in the normalization process by using the formula (1).
The number of nodes of the hidden layer, the learning speed of the network and the delay time length directly determine the performance of the whole network. Therefore, a node number set {200,400,800,1200,1600,2000}, a network learning rate set {0.001,0.003,0.005,0.008,0.01} and a delay time length set {1,2,3} are respectively set, the node number, the learning rate and the delay time are respectively valued in each set, and parameters are finally optimized according to model prediction performance.
⑥ model training
Training a large amount of historical data according to the set number of network nodes, the learning rate and the iteration times, obtaining the change rule of each environmental factor, and generating model parameters. And calculating an actual prediction output value of the piggery multi-environment factor prediction network according to the forward feedback. Calculating the expected output y of the entire time series according to equation (2)etAnd the actual output yatThe error between. And optimizing the parameters according to the difference between the predicted value and the expected value, and updating the LSTM network parameters. And adding 1 to the iteration times, judging whether the iteration times iter is less than or equal to the set maximum iteration times max _ iter, if so, continuing to train the model, and otherwise, finishing the training of the prediction model.
⑦ generating predictive models
And generating a prediction model according to the collected historical data, the model training method and the parameter optimization algorithm, and realizing the prediction of the change of the environmental factors in the house with a certain step length. Then the predicted value and the error of the measured value are compared with the allowable prediction error, if the prediction error is smaller than the allowable range, the prediction model and the predicted value can be used as a parameter model and a parameter number of an environment control decision, and the prediction data is sent to the early warning equipment; if the prediction error is larger than the allowable range, the prediction model is low in accuracy and cannot meet the prediction accuracy requirement, and new environment monitoring data needs to be added to retrain the updated model.
Referring to fig. 1, the predicted data of environmental factors in the pigsty are sent to an early warning device. The early warning device comprises a parameter setting panel, a prediction data storage module, a data sending module, a data display module, an alarm module and an environment control strategy generation module; the parameter setting panel consists of a control parameter range and an alarm parameter and is used for setting the control parameter change range of various environmental factors in the pigsty and the alarm mode when abnormal environmental factor changes; a prediction data storage module: the multi-environment factor prediction value output by the prediction model is temporarily stored; a data sending module: the system is used for sending the prediction data to a user side or a control equipment side; a data display module: the system is used for displaying predicted multi-environment factor data in the pigsty in real time; an alarm module: when the environmental factor is abnormal, the alarm is sent out; and (3) generating an environment control strategy: and when the environmental factors are abnormally changed, an environmental control strategy is generated in time, and the start and stop of each environmental control device are controlled.

Claims (1)

1. A method for predicting dynamic change of multi-environment factors in a pigsty is characterized by comprising the following steps. The method for predicting the dynamic change of the multi-environmental factors in the pigsty comprises the following steps:
① multiple environmental factor data collection in house
Through arranging the multiple spot environment in the pig house and gathering the sensor, carry out the time acquisition to temperature, humidity, ammonia concentration, carbon dioxide concentration, hydrogen sulfide concentration in the pig house, gather the time interval and set up to 1 minute. And uploading the collected various environmental data in the pigsty to a data server for storage.
② obtaining multiple environmental factor time sequence in pigsty
Taking out the data of temperature, humidity, ammonia concentration, hydrogen sulfide concentration and carbon dioxide concentration stored in the database server and monitored by various sensors installed in the pigsty, and respectively constructing a time sequence X with the length of nk=(xk1,xk2,......,xkn) (k is 1,2,3,4,5, respectively, temperature, humidityDegree, ammonia concentration, hydrogen sulfide concentration, carbon dioxide concentration).
③ data preprocessing
There is a possibility that data retrieved from the server may have abnormal data due to a sensor failure, network transmission, or the like, and it is necessary to process the abnormal data. The value of the abnormal data point is calculated by linear interpolation to replace the abnormal data. In addition, normalization preprocessing needs to be performed on the data, the environmental data of a plurality of time series are normalized to a value range [0,1] interval, and the normalization method adopts a maximum and minimum method, as shown in formula (1).
Figure FDA0002391365730000011
Wherein, x', xmaxAnd xminAre respectively normalized at [0,1]]Environmental data over the interval, monitoring the obtained environmental data, and the maximum value and the minimum value of the environmental data in the time series.
④ data set partitioning
The data set is divided into a training set and a test set. Will be time series Xk=(xk1,xk2,......,xkn) Division into training data sets S of length mk=(xk1,xk2,......,xkm) And a prediction dataset T of length p ═ n-mk=(xkm+1,xkm+2,......,xkn),Xk=(Sk,Tk) (k ═ 1,2,3,4,5, and represents temperature, humidity, ammonia concentration, hydrogen sulfide concentration, and carbon dioxide concentration, respectively). Training data set SkAnd the method is used for constructing the model and obtaining the model parameters. Test data set TkAnd (4) testing the model.
⑤ LSTM network structure and parameter optimization
The network structure design comprises the network layer number and the node number of each layer of the network. The invention adopts a three-layer network structure design.
The first layer is an input layer and is responsible for receiving the collected historical data of the temperature, the humidity, the ammonia concentration, the hydrogen sulfide concentration and the carbon dioxide concentration in the pigsty and external influence factor data and carrying out normalization processing on the data.
The second layer is the hidden layer, containing LSTM, full connectivity and back 3 sub-layers. The LSTM sublayer is responsible for learning the long-term dependencies between each step of the time series data to perform some interactions that help improve the long sequence gradient flow. All nodes in the fully connected sub-layer are connected with nodes in the LSTM sub-layer and external influence data to learn all characteristics of the previous layer and external influence factors on all input variables. Each step of fully connecting the sublayers is performed independently, multiplying the input variables by the weight matrix W, and adding the bias matrix vector b. The regression sublayer is connected to the full-link sublayer and is used to calculate the root mean square error loss (half-mean-squared-error) of the sequences to the sequence network. The unnormalized loss prediction response for each step is calculated from equation (2).
Figure FDA0002391365730000021
Wherein S is the length of the sequence, tkjAnd ykjRespectively is the sequence value and the network predicted value of the k step. The average loss of observations is calculated from small batches when the network is trained.
The third layer is an output layer. Output layer will imply layer output quantity O1And O2Inverse normalization processing into predicted value of temperature y in pigsty1And humidity y in the pigsty2Ammonia concentration y3Concentration of hydrogen sulfide y4Carbon dioxide concentration y5The inverse normalization formula is obtained by transforming the observation value in the normalization process by using the formula (1).
The number of nodes of the hidden layer, the learning speed of the network and the delay time length directly determine the performance of the whole network. Therefore, a node number set {200,400,800,1200,1600,2000}, a network learning rate set {0.001,0.003,0.005,0.008,0.01} and a delay time length set {1,2,3} are respectively set, the node number, the learning rate and the delay time are respectively valued in each set, and parameters are finally optimized according to model prediction performance.
⑥ model training
Training a large amount of historical data according to the set number of network nodes, the learning rate and the iteration times, obtaining the change rule of each environmental factor, and generating model parameters. And calculating an actual prediction output value of the piggery multi-environment factor prediction network according to the forward feedback. Calculating the expected output y of the entire time series according to equation (2)etAnd the actual output yatThe error between. And optimizing the parameters according to the difference between the predicted value and the expected value, and updating the LSTM network parameters. And adding 1 to the iteration times, judging whether the iteration times iter is less than or equal to the set maximum iteration times max _ iter, if so, continuing to train the model, and otherwise, finishing the training of the prediction model.
⑦ generating predictive models
And generating a prediction model according to the collected historical data, the model training method and the parameter optimization algorithm, and realizing the prediction of the change of the environmental factors in the house with a certain step length. Then the predicted value and the error of the measured value are compared with the allowable prediction error, if the prediction error is smaller than the allowable range, the prediction model and the predicted value can be used as a parameter model and a parameter number of an environment control decision, and the prediction data is sent to the early warning equipment; if the prediction error is larger than the allowable range, the prediction model is low in accuracy and cannot meet the prediction accuracy requirement, and new environment monitoring data needs to be added to retrain the updated model.
And sending the predicted multi-environment factor data in the pigsty into an early warning device. The early warning device comprises a parameter setting panel, a prediction data storage module, a data sending module, a data display module, an alarm module and an environment control strategy generation module; the parameter setting panel consists of a control parameter range and an alarm parameter and is used for setting the control parameter change range of various environmental factors in the pigsty and the alarm mode when abnormal environmental factor changes; a prediction data storage module: the multi-environment factor prediction value output by the prediction model is temporarily stored; a data sending module: the system is used for sending the prediction data to a user side or a control equipment side; a data display module: the system is used for displaying predicted multi-environment factor data in the pigsty in real time; an alarm module: when the environmental factor is abnormal, the alarm is sent out; and (3) generating an environment control strategy: and when the environmental factors are abnormally changed, an environmental control strategy is generated in time, and the start and stop of each environmental control device are controlled.
CN202010118786.2A 2020-02-25 2020-02-25 Method for predicting dynamic change of multi-environment factors in pigsty Pending CN111368975A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010118786.2A CN111368975A (en) 2020-02-25 2020-02-25 Method for predicting dynamic change of multi-environment factors in pigsty

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010118786.2A CN111368975A (en) 2020-02-25 2020-02-25 Method for predicting dynamic change of multi-environment factors in pigsty

Publications (1)

Publication Number Publication Date
CN111368975A true CN111368975A (en) 2020-07-03

Family

ID=71211013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010118786.2A Pending CN111368975A (en) 2020-02-25 2020-02-25 Method for predicting dynamic change of multi-environment factors in pigsty

Country Status (1)

Country Link
CN (1) CN111368975A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112130596A (en) * 2020-09-25 2020-12-25 创新奇智(青岛)科技有限公司 Farm environment adjusting method and device, electronic equipment and readable storage medium
CN112489402A (en) * 2020-11-27 2021-03-12 罗普特科技集团股份有限公司 Early warning method, device and system for pipe gallery and storage medium
CN112568141A (en) * 2020-12-09 2021-03-30 东莞中融数字科技有限公司 Supervision system for preventing diseases of pigs
CN112946187A (en) * 2021-01-22 2021-06-11 西安科技大学 Refuge chamber real-time state monitoring method based on neural network
CN113052527A (en) * 2021-03-17 2021-06-29 渤海大学 Dynamic aquatic product decay monitoring and early warning method in cold chain transportation
CN113240152A (en) * 2021-03-30 2021-08-10 广州朗国电子科技有限公司 Environment monitoring method, equipment and medium for live poultry feeding of intelligent cage
CN113341066A (en) * 2021-05-24 2021-09-03 西南石油大学 Multi-sensor fusion technology-based on-line detection method and system for tetrahydrothiophene concentration
CN114002303A (en) * 2021-12-31 2022-02-01 中国农业科学院农业资源与农业区划研究所 Calibration method for gas sensing in cold-chain logistics and multi-source sensing device
CN114077269A (en) * 2020-08-17 2022-02-22 青岛平行智能产业管理有限公司 Greenhouse environment prediction and optimization control method based on data-driven model
CN114326552A (en) * 2021-12-24 2022-04-12 珠海格力电器股份有限公司 Environment monitoring method and system
CN114486656A (en) * 2021-12-31 2022-05-13 扬州江净空调制造有限公司 Dynamic environment monitoring system for medical clean room
CN115202421A (en) * 2022-09-14 2022-10-18 广东省农业科学院动物科学研究所 Intelligent breeding environment control method and system
CN116224870A (en) * 2023-03-02 2023-06-06 东北农业大学 Intelligent planting environment control system and method based on multi-network fusion and plant photosynthesis feedback
CN116957169A (en) * 2023-09-18 2023-10-27 深圳市博安智控科技有限公司 Pig house environment perception regulation and control method and system based on informatization
CN117908369A (en) * 2023-04-23 2024-04-19 重庆市畜牧科学院 Pig farm cultivation environment dynamic adjustment method based on different temperature areas

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108133297A (en) * 2018-01-26 2018-06-08 广州大学 Dissolved oxygen prediction method and system based on shot and long term memory network
CN108665100A (en) * 2018-05-09 2018-10-16 中国农业大学 A kind of water quality prediction technique, system and device
CN108665106A (en) * 2018-05-15 2018-10-16 中国农业大学 A kind of aquaculture dissolved oxygen prediction method and device
CN108717586A (en) * 2018-05-10 2018-10-30 江南大学 A kind of culture environment of aquatic products dissolved oxygen prediction method based on long memory network in short-term
CN108764520A (en) * 2018-04-11 2018-11-06 杭州电子科技大学 A kind of water quality parameter prediction technique based on multilayer circulation neural network and D-S evidence theory
CN109684310A (en) * 2018-11-22 2019-04-26 安徽继远软件有限公司 A kind of information system performance Situation Awareness method based on big data analysis
CN110610061A (en) * 2019-09-30 2019-12-24 湖南大学 Concrete slump high-precision prediction method fusing multi-source information

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108133297A (en) * 2018-01-26 2018-06-08 广州大学 Dissolved oxygen prediction method and system based on shot and long term memory network
CN108764520A (en) * 2018-04-11 2018-11-06 杭州电子科技大学 A kind of water quality parameter prediction technique based on multilayer circulation neural network and D-S evidence theory
CN108665100A (en) * 2018-05-09 2018-10-16 中国农业大学 A kind of water quality prediction technique, system and device
CN108717586A (en) * 2018-05-10 2018-10-30 江南大学 A kind of culture environment of aquatic products dissolved oxygen prediction method based on long memory network in short-term
CN108665106A (en) * 2018-05-15 2018-10-16 中国农业大学 A kind of aquaculture dissolved oxygen prediction method and device
CN109684310A (en) * 2018-11-22 2019-04-26 安徽继远软件有限公司 A kind of information system performance Situation Awareness method based on big data analysis
CN110610061A (en) * 2019-09-30 2019-12-24 湖南大学 Concrete slump high-precision prediction method fusing multi-source information

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HUANG C G等: "A bidirectional LSTM prognostics method under multiple operational conditions", 《IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS》 *
李中兴等: "环境对养猪业的影响", 《当代畜禽养殖业》 *
陈亮等: "基于LSTM的大棚环境变量预测", 《沈阳理工大学学报》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114077269B (en) * 2020-08-17 2022-10-28 青岛平行智能产业管理有限公司 Greenhouse environment prediction and optimization control method based on data-driven model
CN114077269A (en) * 2020-08-17 2022-02-22 青岛平行智能产业管理有限公司 Greenhouse environment prediction and optimization control method based on data-driven model
CN112130596A (en) * 2020-09-25 2020-12-25 创新奇智(青岛)科技有限公司 Farm environment adjusting method and device, electronic equipment and readable storage medium
CN112489402A (en) * 2020-11-27 2021-03-12 罗普特科技集团股份有限公司 Early warning method, device and system for pipe gallery and storage medium
CN112568141A (en) * 2020-12-09 2021-03-30 东莞中融数字科技有限公司 Supervision system for preventing diseases of pigs
CN112946187A (en) * 2021-01-22 2021-06-11 西安科技大学 Refuge chamber real-time state monitoring method based on neural network
CN113052527A (en) * 2021-03-17 2021-06-29 渤海大学 Dynamic aquatic product decay monitoring and early warning method in cold chain transportation
CN113240152A (en) * 2021-03-30 2021-08-10 广州朗国电子科技有限公司 Environment monitoring method, equipment and medium for live poultry feeding of intelligent cage
CN113341066A (en) * 2021-05-24 2021-09-03 西南石油大学 Multi-sensor fusion technology-based on-line detection method and system for tetrahydrothiophene concentration
CN114326552A (en) * 2021-12-24 2022-04-12 珠海格力电器股份有限公司 Environment monitoring method and system
CN114002303B (en) * 2021-12-31 2022-04-05 中国农业科学院农业资源与农业区划研究所 Calibration method for gas sensing in cold-chain logistics and multi-source sensing device
CN114486656A (en) * 2021-12-31 2022-05-13 扬州江净空调制造有限公司 Dynamic environment monitoring system for medical clean room
CN114002303A (en) * 2021-12-31 2022-02-01 中国农业科学院农业资源与农业区划研究所 Calibration method for gas sensing in cold-chain logistics and multi-source sensing device
CN114486656B (en) * 2021-12-31 2022-12-02 扬州江净空调制造有限公司 Dynamic environment monitoring system for medical clean room
CN115202421A (en) * 2022-09-14 2022-10-18 广东省农业科学院动物科学研究所 Intelligent breeding environment control method and system
CN116224870A (en) * 2023-03-02 2023-06-06 东北农业大学 Intelligent planting environment control system and method based on multi-network fusion and plant photosynthesis feedback
CN116224870B (en) * 2023-03-02 2023-08-18 东北农业大学 Intelligent planting environment control system and method based on multi-network fusion and plant photosynthesis feedback
CN117908369A (en) * 2023-04-23 2024-04-19 重庆市畜牧科学院 Pig farm cultivation environment dynamic adjustment method based on different temperature areas
CN116957169A (en) * 2023-09-18 2023-10-27 深圳市博安智控科技有限公司 Pig house environment perception regulation and control method and system based on informatization
CN116957169B (en) * 2023-09-18 2023-12-19 深圳市博安智控科技有限公司 Pig house environment perception regulation and control method and system based on informatization

Similar Documents

Publication Publication Date Title
CN111368975A (en) Method for predicting dynamic change of multi-environment factors in pigsty
WO2023093820A1 (en) Device control optimization method, display platform, cloud server, and storage medium
CN110705743B (en) New energy consumption electric quantity prediction method based on long-term and short-term memory neural network
CN111829003B (en) Power plant combustion control system and control method
CN106765959A (en) Heat-air conditioner energy-saving control method based on genetic algorithm and depth B P neural network algorithms
CN114322199B (en) Digital twinning-based ventilation system autonomous optimization operation regulation and control platform and method
CN110045771B (en) Intelligent monitoring system for water quality of fishpond
CN109934422A (en) Neural network wind speed prediction method based on time series data analysis
CN110852498A (en) Method for predicting data center energy consumption efficiency PUE based on GRU neural network
CN113825356A (en) Energy-saving control method and device for cold source system, electronic equipment and storage medium
CN115034126A (en) Method and system for optimizing LSTM neural network model through wolf algorithm
CN114519451A (en) Intelligent island type park vehicle carbon emission prediction method and system
CN111367163B (en) Intelligent farm environment controller and application thereof
CN113821903A (en) Temperature control method and device, modular data center and storage medium
CN116227704A (en) Edge calculation and cloud calculation-based heat supply energy consumption diagnosis and energy-saving regulation and control method
CN112749473B (en) Energy efficiency safety diagnosis system based on real-time online analysis and simulated offline analysis
CN114330136A (en) Water meter based water living condition monitoring method, system, device and storage medium
CN116224870B (en) Intelligent planting environment control system and method based on multi-network fusion and plant photosynthesis feedback
CN117311422A (en) Method and system for regulating and controlling internal environment of greenhouse for crop planting
CN115434878B (en) Wind generating set temperature cluster control method, device, equipment and medium
Cai Evaluation of the Application Effect of Building Comfort Ventilation System Based on the Internet of Things
CN117956767A (en) Data center air conditioning system optimal control method, system, storage medium and equipment based on deep Q network
CN116724795A (en) Modularized intelligent plant factory and environmental parameter evaluation method
CN117826057A (en) Capacitive voltage transformer on-line monitoring and intelligent diagnosis system
CN116108940A (en) Power supply control method and device and user equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200703