Sampling energy-saving method and device for wireless sensor network of water supply system

By clustering wireless sensors in the water supply system and using LSTM model to predict and monitor data, the problem of frequent battery replacement of wireless sensor networks is solved, and significant energy savings and cost reduction are achieved.

CN120075968APending Publication Date: 2025-05-30ZHEJIANG UNIV +2
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510093657.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Due to the high cost of battery replacement in the water supply system, how to save battery power as much as possible and reduce the number of battery replacements has become a problem faced by water companies.

Method used

By introducing k-medoid algorithm to cluster the sensors, and using the LSTM model framework to build a prediction network, predict data monitoring within the target area, reduce data upload frequency, and reduce energy consumption at the sensor end.

Benefits of technology

Without having a significant impact on data accuracy, the data upload frequency is reduced, the energy saving effect is improved, and the energy consumption of sensors in the water supply system can be reduced by up to 75%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075968A_ABST
    Figure CN120075968A_ABST
Patent Text Reader

Abstract

The invention discloses a sampling energy-saving method for a wireless sensor network of a water supply system, and the method comprises the following steps: carrying out the clustering of sensors through employing a k-medoid algorithm based on the data collected by the sensors, carrying out the data de-noising of each class through employing a low-pass filtering method, carrying out the time series decomposition through employing a local weighted regression algorithm, and carrying out the sampling energy-saving of the wireless sensor network of the water supply system. Carrying out multi-step prediction on the trend term and the residual term after the time sequence decomposition by using an LSTM (Long Short Term Memory) model; the predicted value and the measured value of each sensor are compared, and only data of which the difference between the predicted value and the measured value is greater than a specified threshold value is sent to the cloud platform. The invention also provides a sampling energy-saving device. According to the method provided by the invention, the data uploading frequency can be reduced and the energy-saving effect can be improved on the premise that the data precision is not greatly influenced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of urban water supply system monitoring, and particularly relates to a sampling energy-saving method and device for a wireless sensor network of a water supply system. Background Art

[0002] The intelligent management of a water supply system is premised on having a large amount of real-time monitoring data. However, the water supply system is huge and complex, making it difficult to have power supply in the monitoring area. Therefore, the vast majority of the monitoring networks of water supply systems are wireless sensor networks. Due to the high cost and cumbersome process of replacing the batteries of wireless sensor networks, how to save the battery power of wireless sensor networks as much as possible and reduce the number of battery replacements has always been a difficult problem faced by water service enterprises.

[0003] Currently, in order to reduce the number of battery replacements of wireless sensor networks, water service enterprises usually adopt the method of packet uploading, that is, packing and uploading the monitoring data of sensors for half a day or a day at one time to reduce the uploading frequency of sensors and reduce energy consumption. However, this method ignores the requirements of real-time monitoring and operation of the pipe network, greatly weakening the role of monitoring data in the operation and management of the water supply system.

[0004] Patent document CN119129798A discloses a method for predicting the node pressure of an urban water supply pipe network, including the following steps: taking the water consumption nodes in the urban water supply pipe network as nodes, taking each connected pipe as an edge to construct a corresponding water supply pipe network topology structure; obtaining the node pressure data of each sensor in the urban water supply pipe network to construct a data set; constructing a prediction model based on the transformer model framework and the water supply pipe network topology structure; training the prediction model with the data set to obtain a node pressure prediction model for predicting the pressure of water consumption nodes without sensors; inputting the location information and prediction time point of the target water consumption node into the node pressure prediction model to obtain the node pressure data of the target water consumption node.

[0005] Patent document CN116401797A discloses a method for arranging sensors in a water supply network based on graph sampling theory, including: establishing an undirected graph of user nodes and determining the graph Fourier operator of the undirected graph of user nodes; obtaining the user node pressures in the water supply pipe network under different leakage conditions to obtain the pressure sensitivity matrix of the water supply pipe network and determining the useful information in the pressure sensitivity matrix; performing Fourier transform on the useful information using the graph Fourier operator to obtain the graph Fourier spectra of each user node under different leakage conditions; screening out the graph Fourier spectra greater than or equal to the spectrum threshold to form a new spectrum matrix, and screening out the frequency components corresponding to the new spectrum matrix to form a new frequency component matrix; using the number of spectra in the new spectrum matrix as the number of sensor nodes to obtain an updated signal; constructing an objective function according to the updated signal: screening out user nodes that satisfy the objective function one by one as sensor nodes until the number of sensor nodes is reached. Summary of the Invention

[0006] The object of the present invention is to provide a sampling energy-saving method and device for a wireless sensor network of a water supply system, which can reduce the data upload frequency and improve the energy-saving effect without significantly affecting the data accuracy.

[0007] To achieve the first object of the present invention, the following technical solutions are provided: A sampling energy-saving method for a wireless sensor network of a water supply system, comprising the following steps: Input the historical data collected by the wireless sensor network of the water supply system, where the historical data includes the monitoring data of the wireless sensors and the corresponding sensor monitoring sequences; Based on the sensor monitoring sequences of all wireless sensors, cluster the sensors by using the k-medoid algorithm to divide all the wireless sensors in the wireless sensor network of the water supply system into N regions; For the historical data of the wireless sensors in one region, perform time series decomposition along the time axis direction by using the locally weighted regression method to obtain the corresponding time series features, and form the data set of the corresponding region with the historical data and the time series features; Construct a prediction network based on the LSTM model framework, and train the prediction network by using the data sets corresponding to each region respectively to obtain a prediction model for predicting the monitoring data in the target region. At the same time, the cloud system sends the trained prediction model of each region to the wireless sensors in the corresponding region; In daily work, input the historical data of the target wireless sensor into the corresponding prediction model to output the offline prediction result, and compare the offline prediction result with the actual monitoring data sampled by the target wireless sensor. If the difference between the two is less than the pre-threshold, the actually sampled monitoring data will not be uploaded. Instead, the cloud system synchronously inputs the historical monitoring data of the target wireless sensor into the prediction model of the corresponding region to output the online prediction result. If there is no actual monitoring data of the target wireless sensor uploaded to the cloud system, the online prediction result is used as the sampling result of the target wireless sensor this time. Otherwise, the uploaded actual monitoring data is used as the sampling result of the target wireless sensor this time.

[0008] By introducing a prediction model of sensor data in the cloud platform and the sensor side, the present invention does not upload the data points with small prediction errors, which is beneficial to reducing the energy consumption at the sensor side and the maintenance cost of the wireless sensor network.

[0009] Specifically, the specific process of clustering the sensors by using the k-medoid algorithm is as follows: Based on the sensor monitoring sequences of the sensors, calculate the Pearson correlation coefficient between every two sensors; Subtract the set constant term from the Pearson correlation coefficient, and use the difference as the distance metric between the two sensors; Based on the obtained distance metric, construct a minimization objective function through the k-medoid algorithm to solve for the corresponding clustering distribution result.

[0010] Specifically, the calculation formula for the distance metric is as follows: where, , is the sensor monitoring sequence, is the time series and is the covariance of and is the time series and is the variance of.

[0011] Specifically, the expression of the minimization objective function is as follows: ; ; ; ; ; where, represents the distance metric between the i th wireless sensor and the j th wireless sensor, represents the number of wireless sensors, k represents the total number of categories, is a boolean value representing whether the sensor j belongs to the class with the sensor i as the clustering center, is also a boolean value representing whether the sensor i is the clustering center.

[0012] Specifically, the historical data needs to be filtered before performing the locally weighted regression method, and the process of the filtering is as follows: Set the cut-off frequency of the filter; Based on the cut-off frequency, use low-pass filtering to denoise the historical data.

[0013] Specifically, the time series features include a trend component and a residual component, and the expression of its time series decomposition is as follows: Among them, , , , respectively represent the original time series value, trend component, seasonal component, and residual component at time t. represents the time series value in the same format as at time t after prediction. , respectively represent the predicted trend component and residual component.

[0014] Specifically, the prediction network is obtained by introducing an attention mechanism for coupling construction on the basis of the LSTM model framework.

[0015] To achieve the second object of the present invention, the following technical solution is provided: A sampling energy-saving device is used to execute the steps of the above-mentioned sampling energy-saving method for a wireless sensor network of a water supply system.

[0016] Compared with the prior art, the beneficial effects of the present invention: Compared with the traditional sensor sampling method, the present application uses a prediction model to intervene between the cloud platform and wireless sensors, compares the predicted data with the actual monitoring data to control whether the data is uploaded to the cloud platform, thereby reducing the energy consumption at the sensor end and lowering the maintenance cost of the wireless sensor network. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a schematic diagram of the sampling energy-saving method for a wireless sensor network of a water supply system provided in this embodiment; Figure 2 is a clustering result diagram of sensor nodes in City H provided in this embodiment; Figure 3 is a denoising and time series decomposition result diagram of sensor nodes in City H provided in this embodiment; Figure 4 is the energy saving rate of all sensors in the water supply system after applying the sampling energy-saving method in City H provided in this embodiment; Figure 5 is the root mean square error of the monitoring data of all sensors in the water supply system after applying the sampling energy-saving method in City H provided in this embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention described and illustrated herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0019] As Figure 1 shown, a sampling energy-saving method for a wireless sensor network in a water supply system is provided for an embodiment. Taking City H as an example, there are 3 water sources, 4242 water demand nodes, 4841 pipeline segments, 44 pressure monitoring points are arranged in this city H, the sampling interval of the wireless sensor is 15 minutes, and there are a total of 8640 pressure monitoring data. The process is as follows: Step 1: Obtain the historical data collected by the wireless sensor network; Collect the monitoring data of all pressure sensors in the water supply system, and the data length is 3 months.

[0020] Step 2: Cluster the sensors based on the historical sensor data using the k-medoid algorithm; Using the k-medoid algorithm, the difference between the constant 1 and the Pearson correlation coefficient of the pressure data is used as the distance metric, and the 44 sensors in the water supply system are clustered into 4 categories. The sensor clustering results are as Figure 2 shown.

[0021] Step 3: Denoise the historical sensor data through a low-pass filtering method; The cut-off frequency is set to the Nyquist frequency * 0.6. The low-pass filtering method is used to filter out the signal components higher than the cut-off frequency. The denoised sensor data is as Figure 3 shown in (a) of it.

[0022] Step 4: Decompose the denoised historical sensor data using the locally weighted regression method for time series decomposition; Use the locally weighted regression method to decompose the denoised historical sensor data for time series decomposition, and decompose the original time series into a trend term, a seasonal term, and a residual term. The seasonal term has a fixed pattern and does not need to be predicted. By establishing prediction models for the trend term and the residual term respectively, and then adding the predicted values of the trend term, the predicted values of the residual term, and the seasonal term, the predicted value of the original time series can be obtained.

[0023] Among them, the trend term is as shown in Figure 3 (b) in

[0024] The seasonal term is as shown in Figure 3 (c) in

[0025] The residual term is as shown in Figure 3 (d) in

[0026] Step 5: According to the historical data, the cloud platform uses the historical data to train an LSTM model. The prediction step length of the LSTM model is fixed, and the number of prediction step lengths is one prediction cycle; Using the data of the first 21, 24, 30, 33, 36, 54, 78, 108, and 216 step lengths as inputs respectively, and the data of the next 2, 3, 4, 5, 6, 12, 24, 48, and 96 step lengths as outputs, predict the monitoring data of all sensors.

[0027] Step 6: The cloud platform locally saves the trained LSTM model and simultaneously distributes it to each sensor. More specifically, the LSTM model is divided into an input gate, a forget gate, and an output gate. The calculation process of each gate is as follows: The calculation process of the input gate is: Among them, is the input of the current cell, is the output of the previous cell, is the sigmoid function, and are the weights of the input gate, is the bias of the input gate.

[0028] The calculation process of the forget gate is: Among them, and are the weights of the forget gate, is the bias of the forget gate.

[0029] The generation and update of the candidate cell state are: Among them, and are the weights of the candidate cell state, is the bias of the candidate cell state, tanh is the hyperbolic tangent activation function, is the Hadamard product.

[0030] The calculation process of the output gate and the hidden state is as follows: Among them, and are the output gate weights, is the output gate bias.

[0031] To enhance the prediction performance of the LSTM model, the LSTM model is coupled with the attention mechanism. The attention mechanism is as follows: The hidden state at the previous time step and the current hidden state The correlation between them is: Here, is and The unnormalized score between them, is the attention score function.

[0032] The normalized attention weight is: The context vector at the current time step is: The final output is: .

[0033] Step 7: The sensor side compares the sampled prediction value generated by the LSTM model with the actual sampled value, and decides whether to upload the actual sampled value to the cloud platform according to the comparison result; The error thresholds are set to 0.1, 0.2, 0.3, 0.4, 0.5 m respectively. The energy saving rate of the sensors in the water supply system of City H after using the present invention is as Figure 4 shown. It can be seen from the figure that when the error threshold is 0.5 m and the prediction step is 48 steps, after using the technical solution provided in this embodiment, the energy consumption of the sensors in the water supply system of City H is 26.3% of that without using the present invention. The monitoring data error after uploading according to the present invention is as Figure 5 shown. It can be seen from the figure that after using the present invention, the data accuracy of the sensors uploaded to the cloud platform is relatively high. At worst, the RMSE is only 0.21 and the relative error is only 0.7%.

[0034] In summary, the present invention is used to reduce the energy consumption of sensors in the water supply system. While ensuring the data accuracy of the sensors, it can reduce the energy consumption of sensors in the water supply system by up to 75% at most, and solve the problems of difficult battery replacement and high operation and maintenance cost in the wireless sensor network of the water supply system.

[0035] This embodiment also provides a sampling energy-saving device for performing the steps of the sampling energy-saving method for the wireless sensor network of the water supply system provided in the above embodiment.

[0036] In summary, by introducing a sensor monitoring data prediction model at the cloud platform and the sensor end, this method only uploads the data points whose prediction errors are greater than the error threshold, reduces the data upload frequency of the sensors, saves the energy consumption of the sensors, and saves the maintenance and management costs of the water supply system.

[0037] In addition, the terms "upper", "lower", "inner", "outer", "front", and "rear" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. Unless otherwise specifically stated, the relative steps, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present invention.

[0038] Of course, the above are only specific embodiments of the present invention and are not intended to limit the scope of the present invention. Any equivalent changes or modifications made according to the structure, features, and principles described in the scope of the patent application of the present invention should be included in the scope of the patent application of the present invention.

[0039] Finally, it should be noted that the above embodiments are only specific implementation manners of the present invention, used to illustrate the technical solutions of the present invention, rather than limiting them. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that any person skilled in the art within the technical scope disclosed by the present invention can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications, changes, or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention and should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A sampling energy-saving method for a wireless sensor network in a water supply system, characterized in that: The following steps are involved: Inputting historical data collected by the wireless sensor network of the water supply system, wherein the historical data includes monitoring data of the wireless sensor and a corresponding sensor monitoring sequence; Based on the sensor monitoring sequences of all wireless sensors, the sensors are clustered by using the k-medoid algorithm to divide all wireless sensors in the wireless sensor network of the water supply system into N areas; For the historical data of wireless sensors in a region, the local weighted regression method is used to decompose the time series along the time axis to obtain the corresponding time series features, and the historical data and time series features are combined into a data set for the corresponding region; In the cloud system, a prediction network is constructed based on the LSTM model framework and the prediction network is trained using the data sets corresponding to each area to obtain a prediction model for predicting the monitoring data in the target area. At the same time, the cloud system sends the trained prediction model of each area to the wireless sensors in the corresponding area. In daily work, the historical data of the target wireless sensor is input into the corresponding prediction model to output the offline prediction result, and the offline prediction result is compared with the actual monitoring data sampled by the target wireless sensor. If the difference between the two is less than the preset threshold value, the actual monitoring data sampled is not uploaded, and the cloud system synchronously inputs the historical monitoring data of the target wireless sensor into the prediction model of the corresponding area to output the online prediction result. If the actual monitoring data of the target wireless sensor is not uploaded to the cloud system, the online prediction result is used as the current sampling result of the target wireless sensor, otherwise the uploaded actual monitoring data is used as the current sampling result of the target wireless sensor.

2. The sampling energy-saving method for a wireless sensor network of a water supply system according to claim 1, characterized in that: The specific process of clustering sensors by using the k-medoid algorithm is as follows: Based on the sensor monitoring sequence of the sensors, the Pearson correlation coefficient between every two sensors is calculated; The difference between the set constant term and the Pearson correlation coefficient is calculated, and the difference is used as the distance measure between the two sensors; According to the obtained distance metric, the minimization objective function is constructed through the k-medoid algorithm to solve and obtain the corresponding cluster distribution results.

3. The sampling energy-saving method for a wireless sensor network of a water supply system according to claim 2, characterized in that: The distance metric is calculated as follows: in, , is the sensor monitoring sequence, It is a time series and The covariance of and It is a time series and The variance of .

4. The sampling energy-saving method for a wireless sensor network of a water supply system according to claim 2, characterized in that: The expression of the minimization objective function is as follows: ; ; ; ; ; in, Indicates i A wireless sensor and j The distance measurement between wireless sensors, represents the number of wireless sensors, k represents the total number of categories, Is a Boolean value representing the sensor j Is it a sensor? i is the class of the cluster center, Also a Boolean value, representing the sensor i Whether it is a cluster center.

5. The sampling energy-saving method for a wireless sensor network of a water supply system according to claim 1, characterized in that: Before executing the local weighted regression method, the historical data needs to be filtered. The filtering process is as follows: Set the filter cutoff frequency; Based on the cutoff frequency, the historical data is denoised using low-pass filtering.

6. The sampling energy-saving method for a wireless sensor network of a water supply system according to claim 1, characterized in that: The time series characteristics include a trend component and a residual component.

7. The sampling energy-saving method for a wireless sensor network of a water supply system according to claim 1, characterized in that: The prediction network is constructed by coupling with the LSTM model framework by introducing the attention mechanism.

8. A sampling energy-saving device, characterized in that: Used to execute the steps of the sampling energy-saving method for a wireless sensor network of a water supply system as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Water supply network sensor arrangement method based on graph sampling theory

    CN116401797A

  • Method for predicting node pressure of urban water supply network

    CN119129798A

  • Data merging method based on Kalman filtering in wireless sensor network

    CN102316496A

  • A building energy consumption prediction method based on a recurrent neural network and a multi-task learning model

    CN109685252A

  • Equipment fault three-level bidirectional early warning method and system based on edge computing

    CN111651312A