Cow and sheep farm feeding safety detection method and system based on real-time monitoring
By installing sensors in the feed conveying pipeline of the cattle and sheep farm to collect data and using deep learning models to predict, the problem of difficult timely discovery of abnormal situations during feed conveying is solved, real-time monitoring and abnormal detection of feed conveying status is achieved, and the reliability and safety of the system are improved.
Patent Information
- Application Number
- CN202510178355.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-06-10
AI Technical Summary
During the feed conveying process of cattle and sheep farms, it is difficult to monitor the multi-parameter status of the feed conveying pipeline in real time, continuously and comprehensively, resulting in difficulty in detecting and positioning abnormal situations in a timely manner.
By installing sensors at key locations in the feed conveying pipeline, time sequence data such as flow rate, flow rate and pressure are collected, preprocessed and feature extraction are performed, multi-dimensional feature vectors are constructed, and long-term memory network models are used for training to establish a prediction model of feed conveying status. Online prediction is performed based on this model. When the deviation between the predicted value and the actual value exceeds the threshold, it is determined to be an abnormal state, triggers the early warning mechanism, and pushes it to the operation and maintenance personnel in real time through the mobile app.
Real-time monitoring and abnormal detection of feed conveying status is realized, and abnormal situations such as pipeline blockage, leakage or equipment failure can be detected and located in a timely manner, improving the operating reliability and safety of feed conveying pipelines.
Smart Images

Figure CN120123903A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of livestock and poultry breeding, and particularly relates to a method and system for detecting the feeding safety of cattle and sheep farms based on real-time monitoring. Background Art
[0002] During the feed supply process in cattle and sheep farms, various problems may occur during the transportation of feed from the storage bin to the feeding point. The flow state of the feed in the conveying pipeline directly affects the timeliness and sufficiency of feed supply. If the feed flow in the pipeline is abnormal, such as too slow flow rate, insufficient flow, or pipeline blockage, it will cause untimely feed supply at the feeding point and affect the normal feeding of cattle and sheep. At the same time, the feed may also leak during transportation due to equipment failures, pipeline damage, etc., resulting in unnecessary waste. Feed conveying pipelines are often long and widely distributed, making it difficult for manual inspections to cover comprehensively and with low efficiency. The internal state of the pipeline cannot be directly observed by the naked eye. Therefore, there is an urgent need for a technical means to monitor the multi-parameter state of the entire feed transportation process in real time, continuously, and comprehensively, discover abnormalities in the first time and locate the problem occurrence position for quick processing. Summary of the Invention
[0003] To solve the above technical problems, the present invention provides a method and system for detecting the feeding safety of cattle and sheep farms based on real-time monitoring. Among them, a method for detecting the feeding safety of cattle and sheep farms based on real-time monitoring includes:
[0004] Collecting parameter data through sensors installed at key positions of the feed conveying pipeline to obtain time series data;
[0005] After preprocessing the time series data, extracting key features that can reflect the feed transportation state and constructing a multi-dimensional feature vector;
[0006] Constructing a long short-term memory network model, training the long short-term memory network model through the multi-dimensional feature vector to obtain a prediction model for the feed transportation state;
[0007] Based on the prediction model, performing online prediction on the time series data collected in real time. If the deviation between the predicted value and the actual value exceeds the preset threshold, it is determined as an abnormal state and the early warning mechanism is triggered;
[0008] According to the time point and sensor position where the abnormal state occurs, determining the pipeline section where the abnormality occurs, analyzing the change trend of the data before and after the abnormality, judging the type of abnormality, and corresponding generating an abnormal alarm message and pushing it to the operation and maintenance personnel in real time through the mobile App.
[0009] Preferably, the process of collecting parameter data through sensors installed at key positions of the feed conveying pipeline to obtain time series data includes:
[0010] According to the pre-set key positions of the pipeline, flow velocity sensors, flow sensors and pressure sensors are installed at the corresponding positions of the feed conveying pipeline to collect the time series data of flow velocity, flow rate and pressure during the feed conveying process in the pipeline in real time.
[0011] Preferably, after preprocessing the time series data, the process of extracting the key features that can reflect the feed conveying state and constructing a multi-dimensional feature vector includes:
[0012] Identifying the outliers in the time series data through an outlier detection algorithm, and removing the identified outliers from the original time series data to obtain the time series data after removing outliers;
[0013] Performing noise reduction processing on the time series data after removing outliers by using wavelet transform to remove the high-frequency noise components in the data and obtain smooth time series data;
[0014] Performing periodic analysis on the smooth time series data, calculating the periodic characteristics of the data through the autocorrelation function, and obtaining the characteristic values reflecting the periodicity of the data;
[0015] Performing trend analysis on the smooth time series data, fitting the trend of the data by using the least squares method, and obtaining the characteristic values reflecting the long-term change trend of the data;
[0016] For the smooth time series data, using a mutation point detection algorithm to identify the mutation points in the data and extract the characteristic values reflecting the mutation characteristics of the data;
[0017] Combining the periodic characteristics, trend characteristics and mutation point characteristics of the data into a multi-dimensional feature vector as the input for subsequent feed conveying state analysis.
[0018] Preferably, the process of constructing a long short-term memory network model and training the long short-term memory network model through the multi-dimensional feature vector to obtain a prediction model for the feed conveying state includes:
[0019] According to the multi-dimensional feature vector, using a long short-term memory network model to train the feature vector to obtain a preliminary prediction model for the feed conveying state;
[0020] Adjusting the model hyperparameters of the preliminary prediction model for the feed conveying state, continuously optimizing the model performance until the preset performance threshold is met; wherein, the model hyperparameters include the number of hidden layers, the number of neurons in each layer and the learning rate;
[0021] During the model training process, the batch size and the number of iterations are dynamically adjusted according to the dimension of the feature vector and the amount of data. Multiple candidate prediction models obtained through training are evaluated according to the evaluation metrics, and the model with the optimal comprehensive performance is selected as the final feed conveying state prediction model.
[0022] Preferably, the process of evaluating multiple candidate prediction models obtained through training according to the evaluation metrics and selecting the model with the optimal comprehensive performance as the final feed conveying state prediction model includes:
[0023] Obtain multiple candidate prediction models obtained through training. For each candidate prediction model, make predictions on the validation set to obtain prediction results;
[0024] According to the prediction results and the true labels of the validation set, calculate the prediction accuracy, precision, and recall rate of each candidate model; perform a weighted sum of the prediction accuracy, precision, and recall rate of the candidate models to obtain the comprehensive performance score of each model;
[0025] Sort the candidate models in descending order according to the comprehensive performance score, and determine whether the comprehensive performance score of the candidate model with the highest score after sorting exceeds a preset threshold. If it exceeds, determine the corresponding model as the final feed conveying state prediction model. If it does not exceed, based on the sorted list of candidate models, combined with the model complexity and training time, manually select the optimal model as the feed conveying state prediction model.
[0026] Preferably, the process of performing online prediction on the time series data collected in real time based on the prediction model and triggering the warning mechanism if the deviation between the predicted value and the actual value exceeds the preset threshold includes:
[0027] Obtain the time series data collected in real time as the input of the prediction model, and use the pre-trained prediction model to perform online prediction on the input time series data to obtain the predicted value;
[0028] Obtain the actual value corresponding to the predicted value, and calculate the deviation between the predicted value and the actual value;
[0029] Determine whether the deviation exceeds the preset deviation threshold. If it exceeds the threshold, determine the current state as an abnormal state;
[0030] According to the determination result, if it is an abnormal state, trigger the warning mechanism to issue a warning signal or notification;
[0031] Through continuous online prediction and abnormal judgment, realize the real-time monitoring and abnormal detection of time series data.
[0032] Preferably, the process of using a pre-trained prediction model to perform online prediction on the input time series data to obtain a predicted value includes:
[0033] Obtain a pre-trained time series prediction model for online prediction of the input time series data;
[0034] Determine whether the input time series data meets the input format requirements of the prediction model. If not, perform data preprocessing and conversion;
[0035] Input the preprocessed time series data into the pre-trained time series prediction model and start the model for online real-time prediction;
[0036] During the model prediction process, dynamically obtain the input time series data and continuously update the input data of the model in the form of a sliding time window;
[0037] According to the type and characteristics of the prediction model, select a suitable optimization algorithm to fine-tune the model parameters in real time, obtain the prediction result of the time series prediction model for the input data, post-process the predicted value, and save it in a format;
[0038] If the prediction error exceeds the preset threshold, trigger the incremental learning of the prediction model and use the new time series data to fine-tune and update the model.
[0039] Preferably, the process of determining the pipeline segment where the anomaly occurs based on the time point and sensor location of the abnormal state, analyzing the change trend of the data before and after the anomaly, and judging the type of anomaly includes:
[0040] Obtain the data stream of the sensors in the pipeline network for real-time monitoring, and establish a spatio-temporal data model based on the time point of data acquisition and the sensor installation location;
[0041] Preprocess the spatio-temporal data of the pipeline network, remove noise and outliers, smooth the data fluctuations, and extract the statistical features and change trends of the data;
[0042] Based on the ARIMA model, adopt a time series analysis algorithm to model the historical data of the pipeline network and learn the change law of the data under normal operating conditions;
[0043] Use the trained time series model to perform anomaly detection on the real-time collected pipeline data, and judge whether the current data deviates from the normal range through residual analysis or confidence interval estimation;
[0044] If data anomalies are detected, determine the pipeline segment where the anomalies occur based on the time point of the anomaly and the location of the abnormal sensor.
[0045] Preferably, the process of judging the type of anomaly includes:
[0046] If the data shows a mutation point and drops rapidly, it is determined that the pipeline is blocked;
[0047] If the data shows a slow downward trend, it is determined that the pipeline is leaking;
[0048] If the data shows periodic fluctuations, it is determined that there is a device failure;
[0049] The abnormal alarm information includes the abnormal type, occurrence time, location, and the change curve of relevant data.
[0050] The present invention also provides a feeding safety detection system for cattle and sheep farms based on real-time monitoring, including:
[0051] A data acquisition module for collecting parameter data through sensors installed at key positions of the feed conveying pipeline to obtain time series data;
[0052] A data preprocessing module for preprocessing the time series data, extracting key features that can reflect the feed conveying state, and constructing a multi-dimensional feature vector;
[0053] A model training module for constructing a long short-term memory network model, training the long short-term memory network model through the multi-dimensional feature vector, and obtaining a prediction model for the feed conveying state;
[0054] An anomaly detection module for online prediction of the time series data collected in real time based on the prediction model;
[0055] An anomaly analysis module for determining an abnormal state and triggering an early warning mechanism if the deviation between the predicted value and the actual value exceeds a preset threshold;
[0056] An alarm and optimization module for determining the pipeline segment where the anomaly occurs according to the time point and sensor position where the abnormal state occurs, analyzing the change trend of the data before and after the anomaly, judging the abnormal type, and generating corresponding abnormal alarm information and pushing it to the operation and maintenance personnel in real time through the mobile App.
[0057] Compared with the prior art, the present invention has the following advantages and technical effects:
[0058] In the present invention, sensors are installed at key positions of the pipeline to collect time-series data such as flow rate, flow volume, and pressure. After preprocessing and feature extraction of the data, deep learning models such as LSTM or TCN are used for training to construct a feed conveying state prediction model, which can perform online prediction of the conveying state in real time. When the deviation between the predicted value and the actual value exceeds the threshold, an alarm is triggered. By analyzing the change trend of abnormal data, specific abnormal types such as pipeline blockage, leakage, or equipment failure can be determined. The abnormal information is pushed to the operation and maintenance personnel through the mobile App to assist in quickly locating and handling problems. The present invention can also continuously optimize the model using new abnormal data, improve the recognition ability of different types of abnormalities, provide a decision-making basis for pipeline maintenance, and effectively improve the operation reliability and safety of the feed conveying pipeline. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation of this application. In the drawings:
[0060] Figure 1 It is a schematic flowchart of the method according to an embodiment of the present invention;
[0061] Figure 2 It is a schematic structural diagram of the system according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0062] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will refer to the drawings and combine the embodiments to detail this application.
[0063] It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0064] Embodiment 1
[0065] As Figure 1 shown, in this embodiment, a feed supply safety detection method for cattle and sheep farms based on real-time monitoring is provided, including:
[0066] Collect parameter data through sensors installed at key positions of the feed conveying pipeline to obtain time-series data;
[0067] After preprocessing the time-series data, extract key features that can reflect the feed conveying state and construct a multi-dimensional feature vector;
[0068] Build a long short-term memory network model, train the long short-term memory network model through multi-dimensional feature vectors, and obtain a prediction model for the feed conveying state;
[0069] Based on the prediction model, conduct online prediction on the time series data collected in real time. If the deviation between the predicted value and the actual value exceeds the preset threshold, it is determined as an abnormal state and the early warning mechanism is triggered;
[0070] According to the time point and sensor location where the abnormal state occurs, determine the pipeline section where the abnormality occurs, analyze the change trend of the data before and after the abnormality, judge the type of abnormality, and generate corresponding abnormal alarm information and push it to the operation and maintenance personnel in real time through the mobile App.
[0071] Furthermore, the process of collecting parameter data through sensors installed at key positions of the feed conveying pipeline to obtain time series data includes:
[0072] According to the preset key positions of the pipeline, install flow velocity sensors, flow sensors and pressure sensors at the corresponding positions of the feed conveying pipeline to collect the time series data of flow velocity, flow and pressure during the feed conveying process in the pipeline in real time.
[0073] Specifically, the process of installing sensors and collecting data in this embodiment is as follows: In the feed conveying pipeline, such as in the automatic feeding system of a pig farm, sensors are installed at the outlet of the feed mixing tank, the pipeline branch and the end of the feeding. Specifically, a flow velocity sensor is installed at the outlet of the mixing tank to monitor the rate at which the feed is output from the mixing tank in real time. It is set that when the flow velocity is lower than a certain threshold, such as 1 kilogram per second, it may mean that there is a blockage in the feeding system. The flow sensor is installed at the pipeline branch to measure the amount of feed allocated to each pigsty. For example, it is set that each pigsty is supplied with 10 kilograms of feed per hour. If the flow of a certain pigsty is abnormally low, it may indicate a leak in the feeding pipeline of that pigsty. The pressure sensor is installed at the end of the feeding to monitor the pressure at the end of the pipeline. For example, when the pressure exceeds the set value of 50 pascals, it may be due to the accumulation of pressure caused by a blockage at the end of the pipeline. The data collected by these sensors are time series data. For example, the flow velocity, flow and pressure values are collected once per second, forming a data sequence that changes over time.
[0074] Furthermore, after preprocessing the time series data, the process of extracting key features that can reflect the feed conveying state and constructing multi-dimensional feature vectors includes:
[0075] Identify the outliers in the time series data through the anomaly detection algorithm, remove the identified outliers from the original time series data, and obtain the time series data after removing the outliers;
[0076] Wavelet transform is used to denoise the time series data after removing outliers, removing the high-frequency noise components in the data, and obtaining smooth time series data;
[0077] Perform periodic analysis on the smooth time series data, calculate the periodic characteristics of the data through the autocorrelation function, and obtain the characteristic values reflecting the periodicity of the data;
[0078] Perform trend analysis on the smooth time series data, use the least squares method to fit the trend of the data, and obtain the characteristic values reflecting the long-term change trend of the data;
[0079] For the smooth time series data, use the mutation point detection algorithm to identify the mutation points in the data and extract the characteristic values reflecting the mutation characteristics of the data;
[0080] Combine the periodic characteristics, trend characteristics, and mutation point characteristics of the data into a multi-dimensional feature vector, which is used as the input for subsequent feed conveying state analysis.
[0081] Specifically, obtaining the collected time series data is the basis for monitoring the feed conveying system. Suppose a set of flow rate data in the feed conveying pipeline is collected, and the data is recorded at a frequency of one sampling point per second for a duration of 24 hours. The original data may contain various noises and outliers, which affect the accuracy of subsequent analysis. First, perform preprocessing operations on this data. Identify outliers in the data through outlier detection algorithms. For example, in this embodiment, a method based on the standard deviation is used to calculate the mean and standard deviation of the flow rate data, and a threshold (such as 3 times the standard deviation) is set. Data points exceeding this threshold are regarded as outliers. Suppose the flow rate suddenly soars to 5 times the normal range at a certain moment. Obviously, this is an abnormal situation, which may be caused by sensor failure or instantaneous pipeline blockage. Remove these outliers from the original data to obtain the time series data after removing outliers. Next, use signal processing methods such as wavelet transform to denoise the time series data after removing outliers. Wavelet transform can decompose the signal into components of different frequencies. By filtering out the high-frequency noise components, the low-frequency effective signal is retained. Suppose there is high-frequency noise caused by electrical interference in the original data. After wavelet transform processing, these noises are effectively removed, and smooth time series data is obtained. Perform periodic analysis on the smoothed time series data, and calculate the periodic characteristics of the data through the autocorrelation function. The autocorrelation function can reflect the similarity of the data at different time lags. Suppose it is found that the flow rate data has a peak every 12 hours, which indicates that there is a 12-hour periodic change in the feed conveying process, which may be due to the periodic adjustment of the production plan. Obtain the characteristic values reflecting the periodicity of the data, such as the period length and the periodic intensity. Further, perform trend analysis on the smoothed time series data, and use the least squares method to fit the trend of the data. The least squares method finds the best fitting straight line or curve by minimizing the sum of the squares of the errors. Suppose it is found that the flow rate data shows a gradually increasing trend within 24 hours, which may be due to the gradual increase in the feed supply. Obtain the characteristic values reflecting the long-term change trend of the data, such as the trend slope and the trend stability. For the smoothed time series data, use the breakpoint detection algorithm to identify the breakpoints in the data. The breakpoint detection algorithm can identify the points where the data suddenly changes, reflecting the mutation of the system state. Suppose the flow rate suddenly drops to zero at a certain moment and recovers after a period of time, which indicates that a pipeline blockage event may have occurred. Extract the characteristic values reflecting the mutation characteristics of the data, such as the breakpoint position and the mutation amplitude. Combine the periodic characteristics, trend characteristics, and breakpoint characteristics of the data into a multi-dimensional feature vector. For example, the feature vector can include multiple dimensions such as the period length, the periodic intensity, the trend slope, the trend stability, and the breakpoint position. This multi-dimensional feature vector is used as the input for subsequent feed conveying state analysis, providing comprehensive data support for state classification and anomaly detection. Through the above steps, not only the noises and outliers in the data are removed, but also multi-dimensional information reflecting the essential characteristics of the data is extracted.This information helps to more accurately judge the status of the feed delivery system, detect and handle abnormal situations in a timely manner. For example, periodic characteristics can help predict future feed demand, trend characteristics can guide the adjustment of production plans, and mutation point characteristics can promptly detect emergencies such as pipeline blockages. This multi-dimensional data analysis method can significantly improve the intelligence level of the feed delivery system, ensuring the continuity and reliability of the system. By continuously optimizing data processing and analysis algorithms, the early warning accuracy and response speed of the system can be further improved, reducing risks and losses during the production process. Ultimately, the intelligent control of the feed delivery process is achieved, enhancing the overall production efficiency and safety.
[0082] Furthermore, the process of constructing a long short-term memory network model and training the long short-term memory network model with multi-dimensional feature vectors to obtain a prediction model for the feed delivery status includes:
[0083] According to the multi-dimensional feature vectors, use the long short-term memory network model to train the feature vectors to obtain a preliminary prediction model for the feed delivery status;
[0084] Adjust the model hyperparameters of the preliminary prediction model for the feed delivery status, continuously optimize the model performance until it meets the preset performance threshold; among them, the model hyperparameters include the number of hidden layers, the number of neurons in each layer, and the learning rate;
[0085] During the model training process, dynamically adjust the batch size and the number of iterations according to the dimension and data volume of the feature vectors, evaluate multiple candidate prediction models obtained through training according to the evaluation index, and select the model with the optimal comprehensive performance as the final prediction model for the feed delivery status.
[0086] Specifically, according to the multi-dimensional feature vectors, an LSTM model is used to train the feature vectors to obtain a preliminary feed delivery status prediction model. Among them, the extracted feature vectors include periodic features, trend features, and mutation point features, and each feature vector has 10 dimensions. These feature vectors are input into the LSTM model, the structure of the model is set to 3 hidden layers, each layer contains 50 neurons, and the learning rate is set to 0.001. Through training with a large amount of historical data, the model gradually learns the complex relationship between the feature vectors and the feed delivery status, and initially forms a prediction model. For the preliminary prediction model, by adjusting the hyperparameters of the LSTM model, including the number of hidden layers, the number of neurons in each layer, the learning rate, etc., the model performance is continuously optimized until the preset performance threshold is met. For example, the accuracy of the preliminary model on the validation set is only 75%, which does not reach the preset threshold of 85%. At this time, it can be tried to increase the number of hidden layers to 4 layers, increase the number of neurons in each layer to 100, and adjust the learning rate to 0.01, and then retrain the model. After multiple adjustments and trainings, the model performance is gradually improved, and finally the accuracy on the validation set reaches 87%, meeting the preset threshold. If the performance of the prediction model obtained by training with the LSTM model is not ideal, then switch to using the TCN model for training, and also optimize the model performance by adjusting the hyperparameters of the TCN model.
[0087] As an additional approach, this embodiment can also adopt the TCN model. The TCN model has a better ability to capture long sequence dependencies. The number of layers of the TCN model is set to 5 layers, the number of convolutional kernels in each layer is 64, and the dilation factor is 2. By adjusting these hyperparameters and using the same historical data for training, the accuracy of the TCN model on the validation set reaches 90%, which is significantly better than the LSTM model. During the model training process, the batch size and the number of iterations are dynamically adjusted according to the dimension and quantity of the feature vectors to balance the training efficiency and effect. For example, assume there are 10,000 feature vector data, and each feature vector has 10 dimensions. The initial batch size is set to 64, and the number of iterations is 100. During the training process, it is found that the model converges slowly, so the batch size is adjusted to 128, and the number of iterations is increased to 200 to improve the training efficiency. At the same time, monitor the change of the loss function of the model to ensure that the model is not overfitted or underfitted. Evaluate multiple candidate prediction models obtained by training, including calculating metrics such as the prediction accuracy, precision, recall, etc. of each model on the validation set, and select the model with the best comprehensive performance as the final feed delivery status prediction model.
[0088] For example, in this embodiment, three candidate models are trained: LSTM model A, LSTM model B, and TCN model C. On the validation set, the accuracy of model A is 85%, the precision is 80%, and the recall rate is 82%; the accuracy of model B is 87%, the precision is 82%, and the recall rate is 85%; the accuracy of model C is 90%, the precision is 88%, and the recall rate is 89%. After comprehensive evaluation, model C is selected as the final prediction model because it performs optimally in all indicators. The trained prediction model is deployed to the production environment, and the model is incrementally trained and updated regularly using newly collected data to adapt to the changes in the feed delivery working conditions. For example, after the model is deployed, new time series data containing new feature vectors are collected every quarter. These new data are used to incrementally train the model and update the model parameters so that it can adapt to the new working condition changes. In this way, the prediction performance of the model can be continuously maintained at a high level. A monitoring and early warning mechanism for the prediction model is established. When the online prediction performance of the model significantly decreases, the model retraining or model structure adjustment is automatically triggered to ensure the continuous effectiveness of the prediction model. For example, the threshold for the online prediction accuracy of the model is set to 85%, and the prediction accuracy of the model is monitored in real time. Once it is found that the accuracy is lower than 85% for several consecutive days, the system automatically triggers an early warning, indicating that model retraining or adjustment is required. At this time, data can be recollected, the model hyperparameters can be adjusted, or even the model type can be tried to be changed to restore the prediction performance of the model. Through the above steps and methods, not only can a high-performance feed delivery state prediction model be constructed, but also the continuous effectiveness and adaptability of the model in the actual production environment can be ensured. This comprehensive model training and optimization strategy can significantly improve the intelligent level and operation efficiency of the feed delivery system, reduce the failure rate and maintenance cost, and bring significant economic benefits and technical advantages to the enterprise.
[0089] Further, the process of evaluating multiple candidate prediction models obtained by training according to the evaluation indicators and selecting the model with the optimal comprehensive performance as the final feed delivery state prediction model includes:
[0090] Obtain multiple candidate prediction models obtained by training. For each candidate prediction model, make predictions on the validation set to obtain prediction results;
[0091] According to the prediction results and the true labels of the validation set, calculate the prediction accuracy, precision, and recall rate of each candidate model; perform a weighted sum of the prediction accuracy, precision, and recall rate of the candidate models to obtain the comprehensive performance score of each model;
[0092] Sort the candidate models in descending order according to their comprehensive performance scores, and determine whether the comprehensive performance score of the candidate model with the highest score after sorting exceeds the preset threshold. If it exceeds, determine the corresponding model as the final feed delivery state prediction model. If it does not exceed, manually select the optimal model as the feed delivery state prediction model according to the sorted candidate model list, combining model complexity and training time.
[0093] Specifically, taking the above three candidate models as examples: LSTM model A, LSTM model B, and TCN model C. These models have shown different performance characteristics during the training process through different hyperparameter settings and structural optimizations. For each candidate prediction model, predictions are made on the validation set to obtain prediction results. For example, there is a validation set containing 5000 pieces of data, and each piece of data has a corresponding true label (such as normal, abnormal, etc.). These data are input into each candidate model to obtain their respective predicted labels. According to the prediction results and the true labels of the validation set, the prediction accuracy, precision, and recall of each candidate model are calculated. Suppose the prediction results of model A on the validation set are: accuracy 85%, precision 80%, and recall 82%; the prediction results of model B are: accuracy 87%, precision 82%, and recall 85%; the prediction results of model C are: accuracy 90%, precision 88%, and recall 89%. These metrics reflect the performance of the models in different aspects. The accuracy represents the proportion of correct overall predictions by the model, the precision represents the proportion of actual positive classes among the predicted positive classes, and the recall represents the proportion of actual positive classes that are predicted as positive classes. The prediction accuracy, precision, and recall of the candidate models are weighted and summed to obtain the comprehensive performance score of each model. Suppose the weights for accuracy, precision, and recall are 0.4, 0.3, and 0.3 respectively. Then the comprehensive performance score of model A is 0.4 * 85 + 0.3 * 80 + 0.3 * 82 = 82.6, the comprehensive performance score of model B is 0.4 * 87 + 0.3 * 82 + 0.3 * 85 = 85.1, and the comprehensive performance score of model C is 0.4 * 90 + 0.3 * 88 + 0.3 * 89 = 89.3. The method of weighted summation comprehensively considers the importance of each metric, making the score more comprehensive. The candidate models are sorted in descending order according to the comprehensive performance score. According to the above calculation results, model C has the highest comprehensive performance score, followed by model B, and finally model A. The purpose of sorting is to intuitively compare the comprehensive performance of each model for subsequent selection. Determine whether the comprehensive performance score of the candidate model with the highest score after sorting exceeds a preset threshold. Suppose the set threshold is 88 points, and the comprehensive performance score of model C is 89.3, which exceeds the preset threshold. Therefore, model C can be directly determined as the final feed delivery status prediction model. If the score of model C does not exceed the threshold, other factors need to be further considered. If it does not exceed the preset threshold, then according to the sorted list of candidate models, combined with factors such as model complexity and training time, the optimal model is manually selected as the feed delivery status prediction model. For example, although model C has the highest score, its complexity is relatively high and the training time is relatively long. While model B has a slightly lower score, its complexity and training time are relatively low, making it easier to deploy and maintain. In this case, model B may be selected as the final model.The process of manual selection comprehensively considers the actual application scenarios and operation and maintenance costs of the model, ensuring the feasibility and efficiency of the model in actual production. Through the above steps, not only can the optimal model be scientifically evaluated and selected, but also the performance and stability of the model in actual applications can be ensured. The introduction of the comprehensive performance score makes the model selection more objective and comprehensive, avoiding the limitations of single-index evaluation. The method of weighted summation balances the importance of different indicators, making the scoring results more in line with actual needs. The process of manual selection takes into account the actual application scenarios of the model, ensuring the operability and economy of the model. This comprehensive model selection strategy can significantly improve the intelligent level and operation efficiency of the feed conveying system, reduce the failure rate and maintenance costs, and bring significant economic benefits and technical advantages to the enterprise. Through scientific evaluation and selection, the continuous effectiveness and adaptability of the model in actual production are ensured, providing a strong guarantee for the stable operation of the feed conveying system.
[0094] Further, based on the prediction model, online prediction is performed on the time series data collected in real time. If the deviation between the predicted value and the actual value exceeds the preset threshold, the process of determining the abnormal state and triggering the warning mechanism includes:
[0095] Obtain the time series data collected in real time as the input of the prediction model, and use the pre-trained prediction model to perform online prediction on the input time series data to obtain the predicted value;
[0096] Obtain the actual value corresponding to the predicted value, and calculate the deviation between the predicted value and the actual value;
[0097] Judge whether the deviation exceeds the preset deviation threshold. If it exceeds the threshold, determine the current state as an abnormal state;
[0098] According to the determination result, if it is an abnormal state, trigger the warning mechanism and issue a warning signal or notification;
[0099] Through continuous online prediction and abnormal judgment, real-time monitoring and abnormal detection of time series data are achieved.
[0100] Specifically, in this embodiment, an online prediction is performed on the input time series data using a pre-trained LSTM prediction model to obtain a predicted value. This model is trained with a large amount of historical data and can capture long-term dependencies in the time series data. For example, the model may predict that the flow rate at the next moment is 5 kilograms per second, and this predicted value is obtained based on a comprehensive analysis of the current and historical data. Obtaining the actual value corresponding to the predicted value is a key step in verifying the prediction accuracy. The actual value can be collected by sensors at the same time point. For example, the actual flow rate may be 4.8 kilograms per second. By comparing the predicted value and the actual value, the prediction performance of the model can be evaluated. Calculating the deviation between the predicted value and the actual value is a direct indicator of measuring the prediction accuracy. The deviation can be obtained through simple subtraction. For example, if the predicted value is 5 kilograms and the actual value is 4.8 kilograms, the deviation is 0.2 kilograms. This deviation value reflects the gap between the model prediction and the actual situation. Judging whether the calculated deviation exceeds a preset deviation threshold is the core link of anomaly detection. The preset deviation threshold can be determined according to the actual business requirements and statistical analysis of historical data. For example, if the set threshold is 0.3 kilograms, then the above 0.2-kilogram deviation does not exceed the threshold, and the system is operating normally; if the deviation is 0.4 kilograms, then it exceeds the threshold, and the system may have an anomaly. If the threshold is exceeded, the current state is determined to be an abnormal state. The determination of the abnormal state helps to detect and solve problems in a timely manner. For example, an abnormal flow rate may mean that the conveying pipeline is blocked or the sensor fails, and timely warning can avoid greater losses. According to the determination result, if it is an abnormal state, the warning mechanism is triggered to send a warning signal or notification. The warning mechanism can be implemented in various forms such as text messages, emails, or system alarms. For example, the system can automatically send a text message to the maintenance personnel, indicating "Abnormal flow rate, please check the conveying pipeline". Through continuous online prediction and anomaly judgment, real-time monitoring and anomaly detection of time series data are achieved. This real-time monitoring mechanism can ensure the stability and security of the system operation. For example, during the feed conveying process, real-time monitoring can promptly detect abnormal flow rates and avoid feed spoilage or production interruption caused by unsmooth conveying. Continuously updating and optimizing the prediction model is an important means to improve the prediction accuracy and anomaly detection accuracy. As new data accumulates continuously, the model can be updated through incremental learning. For example, every month, the newly collected data can be used to retrain the model and adjust the model parameters to make it better adapt to the new working conditions. Doing so can not only improve the prediction accuracy of the model but also enhance the robustness of the model, enabling it to maintain a high prediction accuracy when facing a complex and changing production environment. For example, seasonal changes may cause changes in the physical properties of the feed, and by regularly updating the model, it can be ensured that the prediction model always conforms to the actual working conditions. In addition, the optimization of the model can be achieved through hyperparameter adjustment. For example, increasing the number of hidden layers of the LSTM model or adjusting the learning rate can further improve the prediction performance of the model.Through continuous experiments and optimizations, the most suitable model configuration for the current business requirements can be found.
[0101] In summary, through a series of steps such as real-time data collection, online prediction, deviation calculation, anomaly judgment, early warning mechanism, and model update and optimization, the accurate prediction and effective monitoring of the feed conveying state can be achieved, ensuring the stability and safety of the production process.
[0102] Furthermore, the process of using a pre-trained prediction model to perform online prediction on the input time series data includes:
[0103] Obtain a pre-trained time series prediction model for online prediction of the input time series data;
[0104] Judge whether the input time series data meets the input format requirements of the prediction model. If not, perform data preprocessing and conversion;
[0105] Input the preprocessed time series data into the pre-trained time series prediction model and start the model for online real-time prediction;
[0106] During the model prediction process, dynamically obtain the input time series data and continuously update the input data of the model in the form of a sliding time window;
[0107] According to the type and characteristics of the prediction model, select a suitable optimization algorithm to fine-tune the model parameters in real time, obtain the prediction result of the time series prediction model for the input data, post-process the prediction value, and save it in a specific format;
[0108] If the prediction error exceeds the preset threshold, trigger the incremental learning of the prediction model and use the new time series data to fine-tune and update the model.
[0109] Specifically, judging whether the input time series data meets the input format requirements of the prediction model is a prerequisite for ensuring prediction accuracy. Suppose the model requires the input data to be parameter data records once an hour, while the actual collected data is once every 15 minutes. At this time, it is necessary to perform data preprocessing and conversion to convert the 15-minute interval data into hourly data through averaging or interpolation methods to meet the input requirements of the model.
[0110] Post-process the prediction value and save it as a CSV format file in a specific format for subsequent analysis and storage.
[0111] If the prediction error exceeds the preset threshold, incremental learning of the prediction model is triggered, and the model is fine-tuned and updated using new time-series data. Suppose the preset error threshold is 5%, and the actual prediction error reaches 8%. At this time, the incremental learning mechanism needs to be activated. Incremental learning can be achieved through online learning algorithms. For example, use new time-series data to retrain the ARIMA model and adjust the model parameters to better adapt to the new data characteristics. The advantage of this incremental learning mechanism is that it can enable the model to maintain a high prediction accuracy in a constantly changing environment. For example, with the influence of seasonal changes or holidays, some data parameters may change significantly. Through incremental learning, the model can capture these changes in a timely manner and avoid prediction errors caused by an outdated model.
[0112] Furthermore, the process of determining the pipeline segment where the anomaly occurs based on the time point and sensor location of the abnormal state, analyzing the change trend of the data before and after the anomaly, and judging the type of anomaly includes:
[0113] Obtain the data stream continuously monitored by sensors in the pipeline network, and establish a spatio-temporal data model according to the time point of data acquisition and the sensor installation location;
[0114] Preprocess the spatio-temporal data of the pipeline network, remove noise and outliers, smooth data fluctuations, and extract the statistical characteristics and change trends of the data;
[0115] Based on the ARIMA model, adopt time-series analysis algorithms to model the historical data of the pipeline network and learn the change rules of the data under normal operating conditions;
[0116] Use the trained time-series model to detect anomalies in the pipeline data collected in real time, and judge whether the current data deviates from the normal range through residual analysis or confidence interval estimation;
[0117] If data anomalies are detected, determine the pipeline segment where the anomaly occurs according to the time point of the anomaly and the location of the abnormal sensor.
[0118] Specifically, obtaining the data streams real-time monitored by each sensor in the pipeline network is the first step to achieve real-time monitoring of the pipeline health status. For example, the pressure, flow rate, and water quality data inside the pipeline are collected in real-time through pressure sensors, flow sensors, and water quality sensors distributed at various key nodes. These data carry timestamp and sensor location information, providing a basis for the subsequent establishment of the spatio-temporal data model. Establishing the spatio-temporal data model is to combine time series data with spatial location information to form a multi-dimensional data structure. Suppose three sensors A, B, and C are installed on a certain section of the pipeline, located at the starting section, middle section, and end section of the pipeline respectively. By collecting the data of these sensors at different time points, a three-dimensional spatio-temporal data matrix can be constructed, with the horizontal axis representing time, the vertical axis representing sensor location, and the values inside the matrix being sensor readings. This model helps to analyze the variation patterns of data in time and space. Preprocessing the spatio-temporal data of the pipeline network is a crucial step to ensure data quality. For example, if the reading of sensor A suddenly increases abnormally at a certain time point, it may be caused by external interference or sensor failure. Through smoothing processing, such as moving average or low-pass filtering, these noises and outliers can be removed. At the same time, extracting the statistical features of the data, such as mean, variance, maximum value, and minimum value, as well as the variation trends, such as growth rate or periodic fluctuations, provides a basis for further analysis. Using time series analysis algorithms, such as ARIMA model or RNN network, to model the historical data of the pipeline network is an important means to learn the variation patterns of data under normal operating conditions. Suppose the ARIMA model is used to model the historical pressure data of sensor A. By analyzing the autocorrelation and partial autocorrelation of the historical data, the parameters of the model are determined, thus establishing a mathematical model that can describe the normal pressure variation. The RNN network, through its recurrent structure, can capture the long-term dependencies in the data and is suitable for modeling complex non-linear variations. Using the trained time series model to perform anomaly detection on the real-time collected pipeline data is achieved by comparing the deviation between the predicted value and the actual value. For example, the model predicts that the pressure value of sensor A at a certain time point is 5 MPa, while the actual reading is 8 MPa, and the calculated deviation is 3 MPa. By setting a reasonable deviation threshold, such as 2 MPa, if the actual deviation exceeds this threshold, it is determined to be in an abnormal state. If data anomalies are detected, the pipeline section where the anomaly occurs is determined according to the time point of the anomaly occurrence and the location of the abnormal sensor. Suppose an anomaly occurs in the pipeline section between sensors A and B. By analyzing the historical data and real-time data of this section of the pipeline, the scope of fault troubleshooting can be narrowed down and the maintenance efficiency can be improved. Further analyzing the variation trends before and after the abnormal data and extracting features such as mutation points, decline rates, and fluctuation periods helps to judge the type of anomaly. For example, if the pressure value of sensor A drops sharply in a short period of time, it may be a pipeline leak; if the pressure value fluctuates periodically, it may be a pipeline blockage; if multiple sensors show anomalies simultaneously, it may be a device failure.Through classification algorithms such as decision trees or support vector machines, the type of anomaly can be further confirmed. Assuming that a decision tree model is constructed based on historical data and expert experience, and the features of the abnormal data are input, the model outputs the anomaly type as "pipe leakage". This classification method combines data-driven and knowledge-driven approaches, improving the accuracy of diagnosis. According to the diagnosed anomaly type and location, a health status report of the pipeline network is generated, and the operation and maintenance personnel are notified in a timely manner for on-site repair. For example, the report details the time, location, type, and possible causes of the anomaly, and attaches relevant data charts to facilitate the operation and maintenance personnel to quickly locate and solve the problem. This timely warning and response mechanism can effectively prevent the expansion of anomalies and prevent major accidents. Through the above series of steps, real-time monitoring and anomaly detection of the health status of the pipeline network are achieved, which not only improves the operation and maintenance efficiency but also ensures the safe and stable operation of the pipeline system. By continuously updating and optimizing the prediction model and combining with actual operation data, the prediction accuracy and the accuracy of anomaly detection are further improved, forming a virtuous cycle of intelligent operation and maintenance system.
[0119] Further, the process of determining the anomaly type includes:
[0120] If the data has a mutation point and drops rapidly, it is determined that there may be a pipe blockage;
[0121] If the data shows a slow downward trend, it is determined that there may be a pipe leakage;
[0122] If the data shows periodic fluctuations, it is determined that there may be a device failure;
[0123] The anomaly alarm information includes the anomaly type, occurrence time, location, and the change curve of relevant data.
[0124] Further, the method of this embodiment also includes feeding back the confirmed abnormal situation to the machine learning model, optimizing and updating the model with new training data, and improving the model's recognition ability for different types of anomalies. At the same time, analyze the laws and influencing factors of anomaly occurrence to provide a decision-making basis for pipeline design and maintenance.
[0125] More specifically, it includes obtaining abnormal situation data during the pipeline operation, extracting features from the abnormal situation data to obtain an abnormal situation feature vector. The abnormal situation feature vector is used as new training data for the machine learning model, and the original machine learning model is optimized and updated through incremental learning to obtain a new machine learning model with stronger recognition ability. The new machine learning model is used to perform real-time anomaly detection on the pipeline operation data. If an abnormal situation is detected, an anomaly alarm is triggered, and the abnormal situation data is fed back to the machine learning model as new training data. According to the feature vector of the abnormal situation, the abnormal situations are classified through a clustering algorithm to obtain the clustering centers of different types of anomalies, and the occurrence rules and influencing factors of each type of anomaly are analyzed. For the influencing factors of different types of anomalies, through the association rule mining algorithm, the association rules for the occurrence of anomalies are obtained, and the main influencing factors for the occurrence of anomalies are determined. According to the clustering centers and association rules of the abnormal situations, the links that need to be focused on and optimized in pipeline design and maintenance are judged, and corresponding decision-making bases and optimization suggestions are provided. The above process is continuously iterated to continuously optimize the machine learning model and the pipeline design and maintenance strategy, and improve the safety and reliability of pipeline operation.
[0126] Embodiment 2
[0127] As Figure 2 shown, in this embodiment, a feeding safety detection system for cattle and sheep farms based on real-time monitoring is provided, including:
[0128] A data acquisition module for collecting parameter data through sensors installed at key positions of the feed conveying pipeline to obtain time series data;
[0129] A data preprocessing module for preprocessing the time series data and then extracting key features that can reflect the feed conveying state to construct a multi-dimensional feature vector;
[0130] A model training module for constructing a long short-term memory network model and training the long short-term memory network model through the multi-dimensional feature vector to obtain a prediction model for the feed conveying state;
[0131] An anomaly detection module for performing online prediction on the time series data collected in real time based on the prediction model;
[0132] An anomaly analysis module for determining an abnormal state and triggering an early warning mechanism if the deviation between the predicted value and the actual value exceeds a preset threshold;
[0133] An alarm and optimization module for determining the pipeline section where the anomaly occurs according to the time point and sensor position where the abnormal state occurs, analyzing the change trend of the data before and after the anomaly, judging the type of anomaly, and corresponding generating an anomaly alarm message and pushing it to the operation and maintenance personnel in real time through the mobile App.
[0134] The above are only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A feeding safety detection method for cattle and sheep farms based on real-time monitoring, characterized in that: include: The time series data is obtained by collecting parameter data through sensors installed at key locations of the feed delivery pipeline; After preprocessing the time series data, key features that can reflect the feed delivery status are extracted to construct a multi-dimensional feature vector; Constructing a long short-term memory network model, and training the long short-term memory network model through the multi-dimensional feature vector to obtain a prediction model for feed delivery status; Based on the prediction model, online prediction is performed on the time series data collected in real time. If the deviation between the predicted value and the actual value exceeds a preset threshold, it is determined to be an abnormal state and an early warning mechanism is triggered; According to the time point and sensor location of the abnormal state, the pipeline section where the abnormality occurs is determined, the changing trend of the data before and after the abnormality is analyzed, the type of abnormality is determined, and the corresponding abnormal alarm information is generated and pushed to the operation and maintenance personnel in real time through the mobile App.
2. The method according to claim 1, characterized in that The process of collecting parameter data by installing sensors at key locations in the feed delivery pipeline and obtaining time series data includes: According to the pre-set key positions of the pipeline, flow rate sensors, flow sensors and pressure sensors are installed at the corresponding positions of the feed conveying pipeline to collect the flow rate, flow rate and pressure time series data in real time during the feed conveying process in the pipeline.
3. The method according to claim 1, characterized in that After preprocessing the time series data, the key features that can reflect the feed delivery status are extracted, and the process of constructing a multi-dimensional feature vector includes: Identifying outliers in the time series data by using an anomaly detection algorithm, removing the identified outliers from the original time series data, and obtaining time series data after the outliers are removed; Using wavelet transform to perform noise reduction processing on the time series data after removing outliers, remove high-frequency noise components in the data, and obtain smooth time series data; Performing periodicity analysis on the smoothed time series data, calculating the periodicity characteristics of the data through an autocorrelation function, and obtaining a characteristic value reflecting the periodicity of the data; Performing trend analysis on the smoothed time series data, fitting the trend of the data using the least squares method, and obtaining characteristic values reflecting the long-term change trend of the data; For the smoothed time series data, using a mutation point detection algorithm to identify mutation points in the data, and extracting feature values reflecting the mutation characteristics of the data; The periodicity, trend and mutation point characteristics of the data are combined into a multi-dimensional feature vector as input for subsequent feed delivery status analysis.
4. The method according to claim 1, characterized in that: The process of constructing a long short-term memory network model, training the long short-term memory network model through the multi-dimensional feature vector, and obtaining a prediction model of feed delivery status includes: According to the multi-dimensional feature vector, a long short-term memory network model is used to train the feature vector to obtain a preliminary feed delivery state prediction model; Adjusting model hyperparameters of the preliminary feed delivery state prediction model to continuously optimize model performance until a preset performance threshold is met; wherein the model hyperparameters include the number of hidden layers, the number of neurons in each layer, and a learning rate; During the model training process, the batch size and number of iterations are dynamically adjusted according to the dimension and data volume of the feature vector. The multiple candidate prediction models obtained through training are evaluated according to the evaluation indicators, and the model with the best comprehensive performance is selected as the final feed delivery status prediction model.
5. The method according to claim 4, characterized in that The process of evaluating multiple candidate prediction models obtained through training according to the evaluation indicators and selecting the model with the best comprehensive performance as the final feed delivery status prediction model includes: Obtain multiple candidate prediction models obtained through training, and perform prediction on the validation set for each candidate prediction model to obtain prediction results; According to the prediction results and the true labels of the validation set, the prediction accuracy, precision and recall of each candidate model are calculated; the prediction accuracy, precision and recall of the candidate models are weighted summed to obtain the comprehensive performance score of each model; The candidate models are sorted from high to low according to the comprehensive performance score, and it is determined whether the comprehensive performance score of the candidate model with the highest score after sorting exceeds the preset threshold. If it exceeds, the corresponding model is determined as the final feed conveying state prediction model. If it does not exceed, the optimal model is manually selected as the feed conveying state prediction model based on the sorted candidate model list, combined with the model complexity and training time.
6. The method according to claim 1, characterized in that Based on the prediction model, online prediction is performed on the time series data collected in real time. If the deviation between the predicted value and the actual value exceeds a preset threshold, it is determined to be an abnormal state, and the process of triggering the early warning mechanism includes: Obtain the real-time collected time series data as the input of the prediction model, and use the pre-trained prediction model to perform online prediction on the input time series data to obtain the predicted value; Obtaining an actual value corresponding to the predicted value, and calculating a deviation between the predicted value and the actual value; Determine whether the deviation exceeds a preset deviation threshold, and if so, determine the current state as an abnormal state; According to the judgment result, if it is an abnormal state, the early warning mechanism is triggered and an early warning signal or notification is issued; Through continuous online prediction and anomaly judgment, real-time monitoring and anomaly detection of time series data can be achieved.
7. The method according to claim 6, characterized in that The process of using the pre-trained prediction model to perform online prediction on the input time series data to obtain the predicted value includes: Obtain a pre-trained time series prediction model for online prediction of input time series data; Determine whether the input time series data meets the input format requirements of the prediction model. If not, perform data preprocessing and conversion; Input the preprocessed time series data into the pre-trained time series prediction model and start the model for online real-time prediction; In the process of model prediction, the input time series data is dynamically obtained, and the input data of the model is continuously updated in the form of a sliding time window; According to the type and characteristics of the forecast model, select the appropriate optimization algorithm to fine-tune the model parameters in real time, obtain the forecast results of the time series forecast model for the input data, post-process the forecast values, and save them in a format; If the prediction error exceeds the preset threshold, the incremental learning of the prediction model is triggered, and the model is fine-tuned and updated using new time series data.
8. The method according to claim 1, characterized in that According to the time point and sensor location of the abnormal state, the pipeline section where the abnormality occurs is determined, and the change trend of the data before and after the abnormality is analyzed. The process of judging the abnormality type includes: Obtain the data stream of real-time monitoring by sensors in the pipeline network, and establish a spatiotemporal data model based on the time point of data collection and the sensor installation location; Preprocess the spatiotemporal data of the pipeline network to remove noise and outliers, smooth data fluctuations, and extract statistical features and change trends of the data; Based on the ARIMA model, a time series analysis algorithm is used to model the historical data of the pipeline network and learn the changing patterns of the data under normal working conditions; Use the trained time series model to detect anomalies in the pipeline data collected in real time, and use residual analysis or confidence interval estimation to determine whether the current data deviates from the normal range; If data anomalies are detected, the pipeline segment where the anomaly occurs is determined based on the time point when the anomaly occurs and the location of the anomaly sensor.
9. The method according to claim 1, characterized in that: The process of determining the type of anomaly includes: If the data shows a sudden change point and drops rapidly, it is considered that the pipeline is blocked; If the data shows a slow downward trend, it is judged to be a pipeline leak; If the data fluctuates periodically, it is considered to be a device failure; The abnormal alarm information includes the abnormal type, occurrence time, location and the change curve of related data.
10. A feeding safety detection system for cattle and sheep farms based on real-time monitoring, characterized in that: include: A data acquisition module is used to collect parameter data through sensors installed at key locations of the feed delivery pipeline to obtain time series data; A data preprocessing module, used to extract key features that can reflect the feed delivery status after preprocessing the time series data, and construct a multi-dimensional feature vector; A model training module, used for constructing a long short-term memory network model, training the long short-term memory network model through the multi-dimensional feature vector, and obtaining a prediction model of feed delivery status; An anomaly detection module, used for performing online prediction on the time series data collected in real time based on the prediction model; The abnormality analysis module is used to determine that if the deviation between the predicted value and the actual value exceeds the preset threshold, it is considered an abnormal state and triggers the early warning mechanism; The alarm and optimization module is used to determine the pipeline section where the abnormality occurs according to the time point and sensor location of the abnormal state, analyze the changing trend of the data before and after the abnormality, determine the type of abnormality, and generate the corresponding abnormal alarm information and push it to the operation and maintenance personnel in real time through the mobile app.
Citation Information
Cited By
Pressure controller for water supply and drainage system and regulation and control method
CN120371039A
Equipment monitoring method and system for oil chromatography detection
CN120778943A
Abnormity alarm method and system for feed production control system
CN121069951A
Fault diagnosis method and system for pressure transmitter
CN121678035A