Abnormity diagnosis method for agricultural underwater wireless sensor network
By using data preprocessing and machine learning algorithms for abnormal detection in agricultural underwater wireless sensor networks, the problem of untimely and accurate abnormal diagnosis in underwater environments is solved, efficient and accurate abnormal identification and processing is achieved, and the System stability and data reliability.
Patent Information
- Application Number
- CN202411258723.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing agricultural underwater wireless sensor networks have problems of untimely diagnosis and low accuracy in abnormal diagnosis, especially in complex and diverse underwater environments, which are difficult for traditional methods to effectively detect intermittent and sudden abnormalities, and The existing research mainly focuses on terrestrial sensor networks, which are not effective in direct application in underwater environments.
Using data acquisition, data preprocessing, feature extraction, model training and real-time monitoring methods, combined with machine learning algorithms such as support vector machines and decision trees, abnormal detection and diagnosis are performed, and data preprocessing such as moving average filtering and Kalman filtering Remove noise, extract key features such as signal strength, packet loss rate and transmission delay, and collect data in real time for abnormal detection and processing.
It significantly improves the accuracy and efficiency of abnormal detection, can timely identify and handle abnormal situations, ensure stable network operation and data monitoring reliability, dynamically adapt to underwater environment changes, and improves the overall stability and monitoring accuracy of the system.
Smart Images

Figure CN119071843A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of underwater wireless sensor network abnormality diagnosis, and in particular to an agricultural underwater wireless sensor network abnormality diagnosis method. Background Art
[0002] In modern agricultural production, with the continuous advancement of technology and the improvement of information technology, refined management and intelligent control have become important means to improve agricultural production efficiency and product quality. Especially in aquaculture and agricultural water management, underwater wireless sensor networks (UWSN) are widely used in water quality monitoring, aquaculture environment monitoring, pollution detection and other fields because of their ability to monitor water quality parameters, environmental changes and biological activities in real time.
[0003] At present, agricultural underwater wireless sensor networks usually consist of several sensor nodes, aggregation nodes and data processing centers. Sensor nodes are installed underwater to collect water quality parameters including water temperature, dissolved oxygen, pH value, turbidity, and the working status information of the nodes themselves, such as battery power, signal strength, etc. Aggregation nodes are usually set on the water surface or on the shore to receive data from each sensor node and forward it to the data processing center, which is responsible for data storage, processing and analysis.
[0004] Existing UWSN systems face many challenges in practical applications. First, the underwater environment is complex and changeable. Factors such as water flow, temperature, and pressure can affect the normal operation of sensor nodes, resulting in unstable data collection. Secondly, underwater wireless communication channels are complex, signal propagation distances are short, and they are susceptible to interference, resulting in low reliability of data transmission. In addition, since sensor nodes are generally powered by batteries and it is difficult to replace batteries, node energy consumption management has also become a key issue. The existence of the above problems makes agricultural underwater wireless sensor networks prone to node failures, data transmission interruptions, data anomalies, etc., which seriously affects the stability of the system and the accuracy of monitoring data.
[0005] Although existing technologies have made some progress in the design and application of UWSN, there are still significant deficiencies in anomaly diagnosis. Traditional anomaly detection methods mainly rely on regular inspections and manual monitoring, and cannot achieve real-time diagnosis. In addition, statistical methods, such as mean comparison and standard deviation analysis, can detect obvious anomalies, but have limited detection effects on complex and diverse anomaly types, especially intermittent and sudden anomalies.
[0006] Some studies have tried to introduce machine learning and data mining techniques to perform anomaly detection by training models. For example, methods such as support vector machines (SVM), decision trees, and random forests have been applied to the field of network anomaly detection. However, due to the particularity of the underwater environment and the uncertainty of the data, these methods face problems such as insufficient model generalization ability, high training data requirements, and high computational complexity in practical applications.
[0007] In addition, most of the existing research focuses on anomaly detection in terrestrial sensor networks, while relatively few studies have been conducted on underwater environments. The particularities of underwater sensor networks, including channel characteristics, node mobility, and deployment difficulty, make it difficult to directly apply anomaly detection methods for terrestrial sensor networks to underwater environments. Therefore, it is urgent to develop dedicated anomaly diagnosis methods for agricultural underwater wireless sensor networks to improve the real-time monitoring capabilities of the system and the reliability of data. Summary of the invention
[0008] The purpose of the present invention is to provide an abnormality diagnosis method for an agricultural underwater wireless sensor network to solve the problems raised in the above background technology.
[0009] To achieve the above object, the present invention provides the following technical solution: a method for diagnosing abnormalities in an agricultural underwater wireless sensor network, the method comprising the following steps:
[0010] Data collection: Collect water quality data and node status data through wireless sensor nodes deployed in agricultural waters;
[0011] Data preprocessing: preprocess the collected data, including data cleaning and filtering, to remove noise and invalid data;
[0012] Feature extraction: Extract key features from preprocessed data, including node signal strength, packet loss rate, and transmission delay;
[0013] Model training: Use historical data and machine learning algorithms to train anomaly detection models;
[0014] Real-time monitoring: input the real-time collected data into the trained model for anomaly detection and diagnosis;
[0015] Exception handling: Take corresponding measures based on the diagnosis results, such as node restart, data retransmission, and alarm prompts.
[0016] As a preferred technical solution of the present invention, the data preprocessing step includes the following sub-steps:
[0017] Data cleaning: Using a moving average filter Smooth the data, where y t is the smoothed data, xt-i is the original data, N is the smoothing window size;
[0018] Data filtering: Apply Kalman filter to remove noise. The state update equation of Kalman filter is:
[0019]
[0020] in, is the predicted state estimate, A is the state transfer matrix, B is the control matrix, u k is the control input, P k |k-1 is the predicted covariance matrix, and Q is the process noise covariance matrix.
[0021] As a preferred technical solution of the present invention, the feature extraction step includes calculating the following features:
[0022] Node signal strength Among them, RSSI is the received signal strength indicator, P t is the transmission power, P r is the received power;
[0023] Packet loss rate Among them, PLR is the packet loss rate, N l is the number of lost packets, N t is the total number of packets sent;
[0024] Data transmission delay Among them, Delay is the data transmission delay, is the receiving time of the ith data packet, is the sending time of the ith data packet, N t The total number of packets sent.
[0025] As a preferred technical solution of the present invention, the model training step uses a support vector machine (SVM) algorithm to train the anomaly detection model. The objective function of the SVM algorithm is:
[0026]
[0027] Among them, w is the weight vector, b is the bias, ξ i is the slack variable, C is the penalty parameter, and N is the number of samples.
[0028] As a preferred technical solution of the present invention, the real-time monitoring step includes the following sub-steps:
[0029] Real-time data collection: collect data regularly through sensor nodes;
[0030] Data input: input the collected data into the trained anomaly detection model;
[0031] Anomaly detection: The model performs anomaly diagnosis based on the input data and determines whether anomalies exist by comparing the calculated feature values with the threshold.
[0032] As a preferred technical solution of the present invention, the exception handling step includes the following sub-steps:
[0033] Node restart: remotely restart nodes that have detected abnormalities;
[0034] Data retransmission: Retransmit abnormal data packets to ensure data integrity;
[0035] Alarm prompt: Issue abnormal alarm prompts on the system interface or through other means, and record the time and type of the abnormality.
[0036] As a preferred technical solution of the present invention, the machine learning algorithm can also use a decision tree algorithm to train the anomaly detection model. The loss function of the decision tree algorithm is:
[0037]
[0038] Among them, L(T) is the loss function, y i is the actual value, f(x i ) is the predicted value, and N is the number of samples.
[0039] As a preferred technical solution of the present invention, the training process of the decision tree algorithm includes the following steps:
[0040] Data partitioning: Divide the data set into different subsets based on feature values;
[0041] Node splitting: Select the best splitting point and divide the node into two sub-nodes according to the value of a certain feature;
[0042] Recursive splitting: Recursively apply the above steps for each child node until a stopping condition is met, such as reaching a maximum depth or the number of samples in a node is less than a threshold.
[0043] As a preferred technical solution of the present invention, the abnormal data recording step includes the following contents:
[0044] Abnormality occurrence time: record the specific time when the abnormality is detected;
[0045] Exception type: records the specific type of exception, such as node failure and data packet loss;
[0046] Processing measures: record the processing measures taken for the exception;
[0047] Processing results: record the execution results of the processing measures and evaluate the processing effects.
[0048] As a preferred technical solution of the present invention, the system framework includes a data acquisition module, a data preprocessing module, a feature extraction module, a model training module, a real-time monitoring module and an exception handling module, and each module transmits and interacts data through wireless communication.
[0049] Beneficial effects:
[0050] The agricultural underwater wireless sensor network abnormality diagnosis method of the present invention effectively solves the problems of untimely diagnosis and low accuracy in the prior art by combining multiple technical means such as data preprocessing, feature extraction, model training, real-time monitoring and abnormality handling. In particular, by introducing machine learning and deep learning algorithms, the accuracy and efficiency of abnormality detection are significantly improved, so that the system can identify and handle various abnormal situations in a timely and accurate manner, which not only ensures the stable operation of the network, but also improves the reliability of data monitoring.
[0051] The beneficial effects of this technical solution are first reflected in its high efficiency and real-time performance. By timely preprocessing and feature extraction of the data collected by the sensor nodes and using the trained model for real-time monitoring, the system can quickly detect abnormal situations and take corresponding treatment measures immediately. This efficient abnormal diagnosis capability not only improves the response speed of the monitoring system, but also reduces the possibility of data loss and false alarms caused by abnormalities.
[0052] In addition, the present invention significantly improves the accuracy and robustness of anomaly detection through multi-model fusion and multi-source data fusion technology. By comprehensively utilizing multiple algorithms such as support vector machines, decision trees, and deep learning, and combining multiple data features for comprehensive analysis, the system can still maintain a high anomaly detection accuracy rate when facing complex and changeable underwater environments. At the same time, by automatically adjusting the working parameters of sensor nodes, the system can dynamically adapt to different environmental changes, improving the overall stability and reliability of the monitoring system. Description of the drawings:
[0053] Figure 1 This is a method flow chart of an abnormality diagnosis method for an agricultural underwater wireless sensor network proposed by the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] The following is a specific implementation method for the above claims. This section will elaborate on how to implement each key step of the method:
[0056] Example 1: Anomaly detection method based on support vector machine (SVM)
[0057] Step 1: Data Collection
[0058] Several wireless sensor nodes are deployed in an agricultural water area. These nodes are used to collect water quality data (such as water temperature, dissolved oxygen, pH value, turbidity, etc.) and node status data (such as battery power, signal strength, data transmission delay, etc.). The sensor nodes send data to the aggregation node through wireless communication, and the aggregation node then transmits the data to the data processing center.
[0059] Step 2: Data Preprocessing
[0060] The collected data is preprocessed, including data cleaning, denoising and filtering. First, a moving average filter is applied to smooth the data to remove short-term noise:
[0061]
[0062] Among them, y t is the smoothed data, x t-i is the original data, and N is the smoothing window size.
[0063] Then, a Kalman filter is used to further filter out the noise:
[0064]
[0065] P k|k-1 =AP k-1|k-1 A T +Q
[0066] in, is the predicted state estimate, A is the state transfer matrix, B is the control matrix, u k is the control input, P k|k-1 is the predicted covariance matrix, and Q is the process noise covariance matrix.
[0067] Step 3: Feature Extraction
[0068] The following key features are extracted from the preprocessed data:
[0069] Node signal strength (RSS I): Among them, P t is the transmission power, P r is the received power;
[0070] Packet Loss Rate (PLR): Among them, N l is the number of lost packets, N t is the total number of packets sent;
[0071] Data transmission delay (Delay): in, is the receiving time of the ith data packet, is the sending time of the i-th data packet.
[0072] Step 4: Model training
[0073] The anomaly detection model is trained using historical data and the support vector machine (SVM) algorithm. The objective function of the SVM algorithm is: Among them, w is the weight vector, b is the bias, ξ i is the slack variable, C is the penalty parameter, and N is the number of samples. The model parameters are optimized through multiple iterations to improve the accuracy of the model.
[0074] Step 5: Real-time monitoring
[0075] The real-time collected data is input into the trained SVM model for anomaly detection and diagnosis. The model compares the characteristic value of the input data with the preset threshold to determine whether there is an anomaly. If an anomaly is detected, the system will immediately record the anomaly information and process it.
[0076] Step 6: Exception handling
[0077] According to the diagnosis results, take appropriate treatment measures, including:
[0078] Node restart: remotely restart nodes that have detected abnormalities;
[0079] Data retransmission: Retransmit abnormal data packets to ensure data integrity;
[0080] Alarm prompt: Issue abnormal alarm prompts on the system interface or through other means, and record the time and type of abnormality.
[0081] Example 2: Anomaly detection method based on decision tree
[0082] Step 1: Data Collection
[0083] In a certain farm, multiple wireless sensor nodes are deployed to collect water quality data and node status data.
[0084] The nodes transmit data to the aggregation node on the shore through the wireless network, and the aggregation node then transmits the data to the data processing center.
[0085] Step 2: Data Preprocessing
[0086] The collected data is preprocessed, including data cleaning and filtering. Kalman filter is used to filter out noise to ensure the accuracy of the data.
[0087] Step 3: Feature Extraction
[0088] The following features are extracted from the preprocessed data:
[0089] Node signal strength Among them, RSSI is the received signal strength indicator, P t is the transmission power, P r is the received power;
[0090] Packet loss rate Among them, PLR is the packet loss rate, N l is the number of lost packets, N t is the total number of packets sent;
[0091] Data transmission delay Among them, Delay is the data transmission delay, is the receiving time of the ith data packet, is the sending time of the ith data packet, N t The total number of packets sent.
[0092] Step 4: Model training
[0093] The anomaly detection model is trained using historical data and the decision tree algorithm. The training process of the decision tree algorithm includes the following steps:
[0094] Data partitioning: Divide the data set into different subsets based on feature values;
[0095] Node splitting: Select the best splitting point and divide the node into two sub-nodes according to the value of a certain feature; the best splitting point is determined by:
[0096] Based on the value of the feature: select a feature and decide how to split the node based on its value. For example, you can select a feature value as a threshold, and data less than the threshold enters one child node, and data greater than or equal to the threshold enters another child node. Judgment indicator: Information Gain: Measure the splitting effect by calculating the reduction in information entropy before and after the split, and select the split point with the largest information gain.
[0097] Gini Index: It is used to measure the degree of impurity of data and select the split point that minimizes the Gini Index.
[0098] Variance Reduction: For regression problems, the split point is selected by calculating the reduction in variance before and after the split.
[0099] Recursive splitting: Recursively apply the above steps to each child node until the stopping condition is met, that is, the maximum depth is reached or the number of samples in the node is less than the threshold.
[0100] The loss function of the decision tree algorithm is:
[0101]
[0102] Among them, L(T) is the loss function, y i is the actual value, f(x i ) is the predicted value, and N is the number of samples.
[0103] Step 5: Real-time monitoring
[0104] The real-time collected data is input into the trained decision tree model for anomaly detection and diagnosis. The model performs real-time analysis based on the input data to determine whether there is an anomaly. If an anomaly is detected, the system will automatically issue an alarm and record the anomaly information.
[0105] Step 6: Exception handling
[0106] According to the diagnosis results, take appropriate measures. In the case of low node power or high packet loss rate, the system will automatically restart the relevant nodes and retransmit data to ensure data integrity and system stability.
[0107] Example 3: Comprehensive anomaly detection method
[0108] Step 1: Data Collection
[0109] In a water quality monitoring area, various types of wireless sensor nodes are deployed, including fixed nodes and mobile nodes, which collect water quality parameters and upload status data. These nodes transmit data to the aggregation node on the shore through the wireless communication network, and the aggregation node then transmits the data to the data processing center.
[0110] Step 2: Data Preprocessing
[0111] All collected data are pre-processed comprehensively, including data cleaning, filtering, and normalization, to improve data consistency. First, a moving average filter is applied to smooth the data to remove short-term noise. Then, a Kalman filter is used to further filter out noise to ensure data accuracy.
[0112] Step 3: Feature Extraction
[0113] The following features are extracted from multi-source data:
[0114] Node signal strength (RSSI);
[0115] Packet Loss Rate (PLR);
[0116] Data transmission delay (Delay);
[0117] Battery level (BatteryLevel);
[0118] Water temperature change rate (TemperatureRate).
[0119] Step 4: Model training
[0120] Utilize multi-source historical data, combined with support vector machine (SVM) and decision tree algorithm to train comprehensive anomaly detection model. Through multi-model fusion technology, improve the anomaly detection accuracy of the model. Specific training steps include:
[0121] Data preparation: Divide historical data into training sets and test sets;
[0122] Model training: train the SVM model and decision tree model separately;
[0123] Model fusion: Use weighted average method or voting mechanism to fuse the output results of multiple models to form the final anomaly detection model. Weighted average method: Suitable for regression and classification problems, using weights to combine the output results of each model, more flexible but requires weight optimization.
[0124] Voting mechanism: More suitable for classification problems, using simple majority votes or weighted votes to determine the final result, which is more intuitive but may be unstable when the number of models is small.
[0125] Step 5: Real-time monitoring
[0126] The real-time collected data is input into the comprehensive anomaly detection model for real-time anomaly diagnosis. Through model fusion, multiple feature values are comprehensively considered to perform more accurate anomaly detection. If an anomaly is detected, the system will immediately record the anomaly information and process it.
[0127] Step 6: Exception handling
[0128] Based on the diagnosis results, multi-level treatment measures are taken, including:
[0129] For minor abnormalities, restart the node and retransmit the data;
[0130] For serious abnormalities, an alarm will be issued and abnormal information will be automatically recorded;
[0131] For specific types of anomalies, the sensor node's operating parameters are automatically adjusted to improve the system's robustness.
[0132] Processing method: Restart the node and retransmit the data
[0133] Specific exceptions:
[0134] Slight data transmission delay: When the transmission delay of a data packet is slightly longer than expected but does not significantly affect the performance of the overall system, it can be resolved by restarting the node and retransmitting the data packet.
[0135] Minor packet loss: When the packet loss rate is low and the impact on the overall data is not significant, data integrity can be restored by retransmitting the lost packets.
[0136] Abnormal node status: If the node signal strength fluctuates greatly or the battery power is low, you can try to restore its normal working state by restarting the node.
[0137] Severe abnormalities
[0138] Processing method: Issue an alarm and automatically record abnormal information
[0139] Specific exceptions:
[0140] Node failure: When a sensor node completely loses response and cannot collect or transmit data, the system needs to issue an alarm and record the specific time and type of node failure so that timely maintenance and repair can be carried out.
[0141] Severe packet loss: When the packet loss rate is high and significantly affects the integrity and accuracy of the data, an alarm needs to be issued and detailed loss information needs to be recorded.
[0142] Severe data transmission delay: When data transmission delay seriously affects the real-time monitoring effect, an alarm needs to be issued and the specific circumstances and time of the delay need to be recorded.
[0143] Specific types of exceptions
[0144] Processing method: Automatically adjust the working parameters of sensor nodes to improve the robustness of the system
[0145] Specific exceptions:
[0146] Abnormalities caused by environmental interference: For example, changes in the underwater environment (temperature, pressure, flow rate, etc.) cause sensor data fluctuations. The sensor can be adapted to environmental changes by adjusting parameters such as sampling frequency and transmission power.
[0147] Sensor failure: If the sensor readings are abnormal or have large errors, the data accuracy can be improved by adjusting the sensor's calibration parameters or sampling strategy.
[0148] Network communication anomalies: If the wireless communication channel is disturbed and the signal strength fluctuates, the communication stability can be improved by adjusting the communication frequency of the node or switching to the backup channel.
[0149] Example 4: Anomaly detection method based on deep learning
[0150] Step 1: Data Collection
[0151] In an agricultural water area, a large number of wireless sensor nodes are deployed to collect water quality data and node status data. The nodes transmit the data to the aggregation node through the wireless communication network, and the aggregation node transmits the data to the data processing center.
[0152] Step 2: Data Preprocessing
[0153] The collected data is preprocessed, including data cleaning, denoising and normalization. Long short-term memory (LSTM) neural network is used to smooth and denoise the time series data to ensure the accuracy of the data.
[0154] Step 3: Feature Extraction
[0155] Extract key features from the preprocessed data, including:
[0156] Node signal strength (RSSI);
[0157] Packet Loss Rate (PLR);
[0158] Data transmission delay (Delay);
[0159] Battery level (BatteryLevel);
[0160] Water quality parameters (such as water temperature, pH value, etc.).
[0161] Step 4: Model training
[0162] Use historical data and deep learning algorithms (such as LSTM networks) to train anomaly detection models. The training process of LSTM networks includes:
[0163] Build an LSTM model and design the input layer, hidden layer, and output layer;
[0164] Use historical data to train the model and adjust model parameters;
[0165] Verify the accuracy of the model to ensure its reliability in practical applications.
[0166] Step 5: Real-time monitoring
[0167] The real-time collected data is input into the trained LSTM model for anomaly detection and diagnosis. The model analyzes the eigenvalues and time series characteristics of the input data to determine whether there is an anomaly. If an anomaly is detected, the system will immediately record the anomaly information and process it.
[0168] Step 6: Exception handling
[0169] According to the diagnosis results, take appropriate treatment measures, including:
[0170] Node restart: remotely restart nodes that have detected abnormalities;
[0171] Data retransmission: Retransmit abnormal data packets to ensure data integrity;
[0172] Alarm prompt: Issue abnormal alarm prompts on the system interface or through other means, and record the time and type of abnormality.
[0173] Example 5: Anomaly detection method based on multi-source data fusion
[0174] Step 1: Data Collection
[0175] In a large agricultural water area, multiple types of wireless sensor nodes are deployed, including fixed nodes, mobile nodes, and floating nodes. These nodes collect water quality data, their own status data, and environmental data (such as weather, flow rate, etc.).
[0176] Step 2: Data Preprocessing
[0177] All collected data are pre-processed, including data cleaning, denoising, filtering and normalization. A variety of filtering techniques (such as moving average filtering, Kalman filtering, etc.) are used to process the data to ensure data accuracy and consistency.
[0178] Step 3: Feature Extraction
[0179] Extract key features from multi-source data, including:
[0180] Node signal strength (RSSI);
[0181] Packet Loss Rate (PLR);
[0182] Data transmission delay (Delay);
[0183] Battery level (BatteryLevel);
[0184] Water temperature change rate (TemperatureRate);
[0185] Environmental parameters (such as weather, flow rate, etc.).
[0186] Step 4: Model training
[0187] Utilize multi-source historical data and combine deep learning, machine learning and statistical methods to train a comprehensive anomaly detection model. The specific steps include:
[0188] Data preparation: Divide historical data into training sets and test sets;
[0189] Model training: train LSTM, SVM and decision tree models respectively;
[0190] Model fusion: Use weighted average method, voting mechanism or neural network fusion method to fuse the output results of multiple models to form the final anomaly detection model.
[0191] Step 5: Real-time monitoring
[0192] The real-time collected data is input into the comprehensive anomaly detection model for real-time anomaly diagnosis. The accuracy of anomaly detection is improved through multi-model fusion and multi-source data fusion. If an anomaly is detected, the system will immediately record the anomaly information and process it.
[0193] Step 6: Exception handling
[0194] Based on the diagnosis results, multi-level treatment measures are taken, including:
[0195] For minor abnormalities, restart the node and retransmit the data;
[0196] For serious abnormalities, an alarm will be issued and abnormal information will be automatically recorded;
[0197] For specific types of anomalies, the operating parameters of the sensor nodes are automatically adjusted to improve the robustness of the system.
[0198] Through the above embodiments, the present invention provides an efficient and accurate method for diagnosing abnormalities in an agricultural underwater wireless sensor network, which can significantly improve the real-time monitoring capability and data reliability of the system and provide strong technical support for agricultural production.
[0199] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0200] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for abnormal diagnosis of agricultural underwater wireless sensor networks, characterized in that: The method comprises the following steps: Data collection: Collect water quality data and node status data through wireless sensor nodes deployed in agricultural waters; Data preprocessing: preprocess the collected data, including data cleaning and filtering, to remove noise and invalid data; Feature extraction: Extract key features from preprocessed data, including node signal strength, packet loss rate, and transmission delay; Model training: Use historical data and machine learning algorithms to train anomaly detection models; Real-time monitoring: input the real-time collected data into the trained model for anomaly detection and diagnosis; Exception handling: Take corresponding measures based on the diagnosis results, such as node restart, data retransmission, and alarm prompts.
2. The method for abnormal diagnosis of an underwater wireless sensor network in agriculture according to claim 1, characterized in that: The data preprocessing step includes the following sub-steps: Data cleaning: Using a moving average filter Smooth the data, where y t is the smoothed data, x t-i is the original data, N is the smoothing window size; Data filtering: Apply Kalman filter to remove noise. The state update equation of Kalman filter is: in, is the predicted state estimate, A is the state transfer matrix, B is the control matrix, u k is the control input, P k |k-1 is the predicted covariance matrix, and Q is the process noise covariance matrix.
3. The method for abnormal diagnosis of an underwater wireless sensor network in agriculture according to claim 1, characterized in that: The feature extraction step includes calculating the following features: Node signal strength Among them, RSSI is the received signal strength indicator, P t is the transmission power, P r is the received power; Packet loss rate Where PLR is the packet loss rate, N l is the number of lost packets, N t is the total number of packets sent; Data transmission delay Among them, Delay is the data transmission delay, is the receiving time of the ith data packet, is the sending time of the ith data packet, N t The total number of packets sent.
4. The method for abnormal diagnosis of an underwater wireless sensor network in agriculture according to claim 1, characterized in that: The model training step uses a support vector machine (SVM) algorithm to train the anomaly detection model. The objective function of the SVM algorithm is: Among them, w is the weight vector, b is the bias, ξ i is the slack variable, C is the penalty parameter, and N is the number of samples.
5. The method for abnormal diagnosis of an underwater wireless sensor network in agriculture according to claim 1, characterized in that: The real-time monitoring step includes the following sub-steps: Real-time data collection: collect data regularly through sensor nodes; Data input: input the collected data into the trained anomaly detection model; Anomaly detection: The model performs anomaly diagnosis based on the input data and determines whether anomalies exist by comparing the calculated feature values with the threshold.
6. The method for abnormal diagnosis of an agricultural underwater wireless sensor network according to claim 1, characterized in that: The exception handling step includes the following sub-steps: Node restart: remotely restart nodes that have detected abnormalities; Data retransmission: Retransmit abnormal data packets to ensure data integrity; Alarm prompt: Issue abnormal alarm prompts on the system interface or through other means, and record the time and type of the abnormality.
7. The method for diagnosing abnormalities in an underwater wireless sensor network for agriculture according to claim 1, It is characterized in that The machine learning algorithm is a decision tree algorithm, which is used to train an anomaly detection model; The loss function of the decision tree algorithm is: Among them, L(T) is the loss function, y i is the actual value, f(x i ) is the predicted value, and N is the number of samples.
8. The method for abnormal diagnosis of an underwater wireless sensor network in agriculture according to claim 1, characterized in that: The training process of the decision tree algorithm includes the following steps: Data partitioning: Divide the data set into different subsets based on feature values; Node splitting: Select the best splitting point and divide the node into two sub-nodes according to the value of a certain feature; Recursive splitting: Recursively apply the above steps for each child node until a stopping condition is met, such as reaching a maximum depth or the number of samples in a node is less than a threshold.
9. The method for abnormal diagnosis of an agricultural underwater wireless sensor network according to claim 1, characterized in that: The abnormal data recording step includes the following contents: Abnormality occurrence time: record the specific time when the abnormality is detected; Exception type: records the specific type of exception, such as node failure and data packet loss; Processing measures: record the processing measures taken for the exception; Processing results: record the execution results of the processing measures and evaluate the processing effects.
10. The method for abnormal diagnosis of an agricultural underwater wireless sensor network according to claim 1, characterized in that: The system framework includes a data acquisition module, a data preprocessing module, a feature extraction module, a model training module, a real-time monitoring module and an exception handling module, and each module transmits and interacts data through wireless communication.
Citation Information
Patent Citations
Detection method and equipment for MongoDB data fragment cluster
CN110275793A
Water quality sensor fault detection method based on machine learning algorithm
CN116451142A
Water environment dynamic monitoring system and method based on Internet of Things
CN116796907A
Water conservancy management system based on digital twinning
CN117455242A
Abnormity detection method and system for water service culvert box based on machine learning
CN117540310A
Cited By
Sensing node communication system and method with self-healing mechanism
CN120417121A
