Water quality detection equipment parameter correction method based on intelligent sensing system
Through the deep learning model projection recovery network (PRNet) in the intelligent sensing system, the drift data of the water quality detection equipment is corrected in real time, which solves the problems of large manual operation error, high cost and poor real-time performance in traditional methods, and achieves efficient and accurate correction of water quality detection parameters.
Patent Information
- Application Number
- CN202510421303.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-07-22
AI Technical Summary
The parameter correction method of existing water quality detection equipment requires manual operation, which has large errors, high cost, poor real-time and accuracy. The traditional methods lack adaptability and high computational complexity.
The intelligent sensing system is adopted, and the sensor unit, data preprocessing unit, communication unit and adaptive correction unit are configured. The projection recovery network (PRNet) of the deep learning model is used to correct the drift data in the water quality detection data in real time, and the water quality detection data is analyzed through the adaptive correction unit using the projection recovery network.
The automatic and simplified process of parameter correction of water quality detection equipment is realized, the calibration accuracy and efficiency are improved, and the accuracy and reliability of parameter correction are ensured.
Smart Images

Figure CN120352385A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technologies, and particularly to a method for calibrating parameters of a water quality detection device based on an intelligent sensing system. Background Art
[0002] During the long-term operation of water quality detection devices, measurement errors occur due to reasons such as sensor aging, environmental changes, and chemical substance deposition. Through parameter calibration, the measurement accuracy of the devices can be significantly improved. Accurate water quality data is crucial for environmental monitoring, pollution control, and water resource management.
[0003] Traditional methods for calibrating parameters of water quality detection devices include standard solution calibration, temperature compensation calibration, zero-point and multi-point calibration, etc. These methods all require manual operation and are prone to errors due to improper operation. In addition, traditional methods require the purchase and preparation of various standard solutions, increasing the calibration cost, and the long calibration time affects the normal operation of the devices, making it difficult to ensure the real-time and accuracy of parameter calibration.
[0004] With the development of technology, great attention has been paid to the method for calibrating water quality detection parameters based on an intelligent sensing system. The patent CN119355228A proposes to determine a change data sequence based on a target water quality detection data array and an adjacent water quality detection data sequence, then judge whether there is a characteristic value in the change characteristic data that meets a preset characteristic condition, generate a device parameter calibration instruction, and calculate calibration data using different methods according to the type of detection data. This method requires a preset change deviation characteristic threshold, and the setting of the threshold is random and does not have an adaptive ability. Moreover, each type of data requires an additional calculation program to achieve calibration, with a low degree of automation and high computational complexity. Summary of the Invention
[0005] Aiming at the technical problems existing in the above-mentioned prior art, this application provides a method for calibrating parameters of a water quality detection device based on an intelligent sensing system, which is applied to a water quality detection device to collect real-time data of water quality detection, and uses a deep learning model to adaptively calibrate drift data in the water quality detection data and feedback it to the data management unit, improving the accuracy and efficiency of the method for calibrating parameters of the water quality detection device.
[0006] This application provides a method for calibrating parameters of a water quality detection device based on an intelligent sensing system. The intelligent sensing system is configured in the water quality detection device, and the system includes: a sensor unit, a data preprocessing unit, a communication unit, an adaptive calibration unit, and a data management unit. The specific steps of the method are as follows:
[0007] (1) Obtain water quality detection data of the target water area through the sensor unit;
[0008] (2) The data preprocessing unit preprocesses the collected water quality detection data;
[0009] (3) The preprocessed water quality detection data is transmitted in real time to the adaptive correction unit through the communication unit;
[0010] (4) The adaptive correction unit applies a projection recovery network to analyze the preprocessed water quality detection data and correct the drift data in the water quality detection data;
[0011] (5) The correction result is fed back to the data management unit in real time through the communication unit, and a correction completion signal is sent.
[0012] Furthermore, multiple sensors are deployed in the sensor unit to collect various water quality detection data, including electrochemical sensors, optical sensors, and physical sensors, to collect the pH value, dissolved oxygen, turbidity value, and temperature of the target water area. Each sensor realizes data collection based on its respective principle:
[0013] The electrochemical sensors include a pH sensor and a dissolved oxygen sensor. The pH sensor determines the pH value by measuring the potential difference generated by the hydrogen ion concentration in the aqueous solution, and the potential difference has a linear relationship with the pH value; the dissolved oxygen sensor uses an electrochemical reaction to measure the reduction current of dissolved oxygen on the electrode, and the magnitude of the current is proportional to the concentration of dissolved oxygen;
[0014] The optical sensor is a turbidity sensor, which determines the turbidity by emitting a light beam into the target water area and measuring the scattering or absorption of light. When light passes through a water sample containing suspended particles, scattering and absorption occur, and the intensity change of the scattered light or transmitted light detected by the sensor is inversely proportional to the turbidity of the water sample;
[0015] The physical sensor is a temperature sensor, which is usually based on the thermoelectric effect or the principle that the resistance changes with temperature. The thermocouple sensor consists of two different metal conductors. When there is a temperature difference at both ends, a thermoelectric potential will be generated, and the temperature is determined by measuring the thermoelectric potential. The thermistor sensor measures the temperature by utilizing the characteristic that its resistance value changes with temperature.
[0016] Furthermore, all the water quality detection data collected by the sensors in the sensor unit are continuous analog signals. The data preprocessing unit performs signal amplification, A / D conversion, and normalization processing on the analog signals collected by the sensors to facilitate subsequent analysis. The specific methods include:
[0017] Use an operational amplifier to amplify the weak signal output by the sensor to the range of A / D conversion, and select the amplification factor according to the measured data during the process to avoid signal saturation or distortion;
[0018] An successive approximation A / D converter is used to convert the amplified sensor signal into a digital signal. The resolution and sampling rate of the A / D converter should be selected according to different water quality detection data to ensure the accuracy and real-time performance of the signal;
[0019] The normalization of the signal is realized through a potentiometer and a resistor voltage division circuit. Different types of water quality detection data are normalized to a specific range according to their data distribution rules for subsequent processing;
[0020] Furthermore, the communication unit in the intelligent sensing system consists of hardware such as a communication module, an antenna, and an interface circuit. The communication module encodes and modulates the preprocessed water quality detection data and then sends it out through a wireless signal. The communication module supports the 5G frequency band and communication protocol to ensure efficient data interaction with the receiving end and guarantee the real-time transmission of data. At the same time, the 5G communication technology uses an encryption mechanism to ensure the security of data transmission.
[0021] Furthermore, the calibration process of the adaptive calibration unit is as follows: Let the preprocessed water quality detection data be represented by the following formula:
[0022] Y = X + D + v
[0023] where X represents the water quality detection data without drift; Y represents the preprocessed water quality detection data, which contains the drift amount D and the noise v. Each variable is a matrix of size N×T, where N is the number of types of water quality detection data and T is the time length. The calibration process is described as the process of recovering X from Y containing the unknown drift amount D and noise v, and f c (·) represents the calibration function, and the calibration goal is to find a function f c (·) that minimizes the calibration error. This optimization problem is expressed as
[0024]
[0025] where ‖·‖ represents the norm operation. When the optimization goal is completed, the calibrated water quality detection data without drift is obtained.
[0026] Furthermore, the calibration function adopted in the adaptive calibration unit is the Projection Recovery Network (PRNet). PRNet is a deep learning model that projects the drift data in the water quality detection data into the feature space and uses a deep convolutional network to recover the drift-free data. PRNet includes a projection layer and a recovery layer. The projection layer uses a global convolutional layer to project the drift data into the feature space, and the recovery layer uses a residual unit (ResUnit) to estimate the drift and recover the drift-free data from the drift data. PRNet also includes a sensor rearrangement step to improve the local correlation of features. The water quality detection data from adjacent waters may vary greatly. Therefore, the water quality detection results from sensors in adjacent waters cannot be directly used as a reference. PRNet predicts the drift-free amount through the temporal and spatial correlation of the target water quality detection data without comparing with the water quality detection data in adjacent waters, realizing the adaptive calibration of the water quality detection data.
[0027] Furthermore, considering that there are significant differences in the characteristics of water quality detection data obtained by different sensors, in order to improve the adaptive calibration ability of the model for different water quality detection data, when training PRNet, data synthesis and augmentation methods are used to construct the training dataset. Represent the drift-free water quality detection data as X, which is a matrix of size N×T. Randomly crop a data block of size N×T from X P and denote it as X P , where T P is the time length of the data block. Therefore, T - T P data blocks are obtained by random cropping, which is expressed by the following formula:
[0028]
[0029] where {X P} represents the set of generated data blocks, is a sub-data block of size N×T P from the τ-th column to the (τ + T P )-th column of X.
[0030] While cropping to generate drift-free data blocks, randomly generate N drift amounts D P and noise samples v P . Therefore, by adding the drift amounts and noise samples to the drift-free data blocks, drift data blocks Y P are generated, denoted as: Y P = X P + D P + v P . By cropping the water quality detection data into multiple data blocks, the randomness and diversity of the training set are increased, which helps to avoid overfitting.
[0031] Furthermore, the training process of the projection recovery network is to minimize the loss function with respect to the input data by adjusting the network parameters. The loss function L of PRNet PR consists of the projection loss L P and the recovery loss L R and is expressed by the formula:
[0032] L PR = L P + L R
[0033] The key role of the projection layer in PRNet is to obtain the drift amount observation value from the drift data to approximate the true drift amount of the projection. Therefore, the projection loss is expressed as:
[0034]
[0035] where and respectively represent the non-drift data block and the drift data block of the j-th sample obtained by random cropping, f P (·) represents the projection layer function, represents the training data set, and ‖·‖ F is the Frobenius norm, which is used to measure the magnitude of matrix elements. For the recovery loss, the mean square error between the estimated value of the non-drift data and the true value is simply used:
[0036]
[0037] where f PR (·) is the overall forward propagation function of PRNet. When the loss function converges, PRNet will learn to extract the spatial and temporal features of the water quality detection data and suppress the drift.
[0038] The present invention discloses the following technical effects:
[0039] The present invention provides a method for calibrating the parameters of a water quality detection device based on an intelligent sensing system. The data preprocessing unit in the intelligent sensing system preprocesses the water quality detection data collected by the sensor unit, converting the analog signal into a digital signal for subsequent analysis. The sensor unit is configured with various types of sensors to collect different kinds of water quality detection data, improving the diversity of the water quality detection data. In addition, the adaptive calibration unit applies a projection recovery network based on deep learning to learn the temporal and spatial correlations of the target water quality detection data and directly outputs drift-free data, i.e., calibrated data. This calibration method omits the complex calculation process and does not need to compare with adjacent water quality detection data, simplifying the calibration process of the water quality detection data. At the same time, combining the deep learning method greatly improves the calibration accuracy and efficiency. The present invention combines an intelligent algorithm and a sensor to form an intelligent sensing system, realizing the intelligent calibration of the parameters of the water quality detection device and ensuring the accuracy and reliability of the parameter calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments of the present invention will be briefly introduced below. Flowcharts are used in this application to illustrate the operations performed by the systems according to the embodiments of this application. It should be understood that the operations described above or below do not necessarily need to be executed precisely in order. On the contrary, as needed, they can be executed in reverse order or simultaneously. At the same time, other operations can also be added to these processes, or one or more steps can be removed from these processes.
[0041] Figure 1 It is a schematic flowchart of a method for calibrating the parameters of a water quality detection device based on an intelligent sensing system provided by an embodiment of this application.
[0042] Figure 2 It is a schematic structural diagram of the intelligent sensing system provided by an embodiment of this application.
[0043] Figure 3 It is a detailed structural diagram of the projection recovery network in the adaptive calibration unit provided by an embodiment of this application.
[0044] Figure 4 It is a schematic structural diagram of the residual unit in the projection recovery network provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] The above description is only an overview of the technical solutions of this application. In order to be able to understand the technical means of this application more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features, and advantages of this application more obvious and understandable, the following specifically illustrates the specific embodiments of this application.
[0046] To make the objectives, technical solutions, and advantages of this application clearer, the following will further describe this application in detail in conjunction with the accompanying drawings. The described embodiments should not be construed as limitations on this application. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
[0047] In the following description, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or modules that are not clearly listed or are inherent to these processes, methods, products, or devices. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of this application. The terms used herein are only for the purpose of describing the embodiments of this application.
[0048] Embodiment 1. The embodiments of this application provide a method for calibrating water quality detection equipment parameters based on an intelligent sensing system, as Figure 1 shown. The intelligent sensing system configured in the water quality detection equipment is as Figure 2 shown, including: a sensor unit, a data preprocessing unit, a communication unit, an adaptive calibration unit, and a data management unit. The method includes the following steps:
[0049] Step S10, obtain water quality detection data of the target water area through the sensor unit.
[0050] In this embodiment, the sensor unit deploys multiple sensors for collecting various water quality detection data, including electrochemical sensors, optical sensors, and physical sensors, to collect the pH value, dissolved oxygen, turbidity value, and temperature of the target water area. Each sensor realizes data collection based on its respective principle:
[0051] The electrochemical sensors include a pH sensor and a dissolved oxygen sensor. The pH sensor determines the pH value by measuring the potential difference generated by the hydrogen ion concentration in the aqueous solution, and the potential difference has a linear relationship with the pH value; the dissolved oxygen sensor uses an electrochemical reaction to measure the reduction current of dissolved oxygen on the electrode, and the magnitude of the current is proportional to the concentration of dissolved oxygen;
[0052] The optical sensor is a turbidity sensor, which emits a light beam into the target water area and measures the light scattering to determine the turbidity. When light passes through a water sample containing suspended particles, scattering occurs, and the change in the intensity of the scattered light detected by the sensor is inversely proportional to the turbidity of the water sample;
[0053] The physical sensor is a temperature sensor, which is based on the thermoelectric effect or the principle that resistance changes with temperature. The thermocouple sensor consists of two different metal conductors. When there is a temperature difference at both ends, a thermoelectric potential will be generated, and the temperature is determined by measuring the thermoelectric potential. The thermistor sensor measures the temperature by utilizing the characteristic that its resistance value changes with temperature. In this embodiment, a thermistor sensor is adopted.
[0054] The above sensors collect the water quality detection data of each type in the target water area within a certain period of time, obtain the analog signals of the water quality detection data of each type changing with time, and each detection data has a specific unit and value range.
[0055] Step S20: The data preprocessing unit preprocesses the collected water quality detection data.
[0056] The water quality detection data collected by all sensors in the sensor unit are continuous analog signals. The data preprocessing unit performs signal amplification, A / D conversion, and normalization processing on the analog signals collected by the sensors for subsequent analysis. The specific process is as follows:
[0057] First, set the amplifier according to the characteristics of the signals collected by each sensor, and use the amplifier to amplify the weak signals output by each sensor in the sensor unit to the range of A / D conversion. During the process, select the amplification factor according to the measured data to avoid signal saturation or distortion;
[0058] Second, use a successive approximation type A / D converter to convert the amplified sensor signals into digital signals. The resolution and sampling rate of the A / D converter should be selected according to different water quality detection data to ensure the accuracy and real-time performance of the signals. The A / D converter samples the sensor signals at the set sampling rate and selects the water quality detection data of a finite number of sampling points as the output;
[0059] Finally, realize the normalization of the signals through a potentiometer and a resistor voltage division circuit, and normalize different types of water quality detection data to a specific range according to their data distribution rules for subsequent processing.
[0060] Step S30: Transmit the preprocessed water quality detection data to the adaptive correction unit in real time through the communication unit.
[0061] In this embodiment, the communication unit consists of hardware such as a communication module, an antenna, and an interface circuit. The communication module encodes and modulates the preprocessed water quality detection data and then sends it out through a wireless signal. The communication module supports the 5G frequency band and communication protocol to ensure efficient data interaction with the receiving end and guarantee the real-time transmission of data. At the same time, the 5G communication technology adopts an encryption mechanism to ensure the security of data transmission.
[0062] While transmitting the pre - processed water quality detection data to the adaptive correction unit through the communication unit, the data is synchronously uploaded to the data management unit for storage. Retaining historical data is of great significance for predicting water quality and sending water pollution warning information.
[0063] Step S40, the adaptive correction unit uses the projection recovery network to analyze the pre - processed water quality detection data and correct the drift data in the water quality detection data.
[0064] In this embodiment, the correction process of the adaptive correction unit is as follows: Suppose the pre - processed water quality detection data is represented by the following formula:
[0065] Y = X + D + v
[0066] Where X represents the water quality detection data without drift; Y represents the pre - processed water quality detection data, which contains the drift amount D and noise v. Each variable is a matrix of size N×T, where N is the number of types of water quality detection data and T is the time length. The correction process is described as the process of recovering X from Y containing the unknown drift amount D and noise v, and define f c (·) represents the correction function, and the correction objective is to find a function f c (·) to minimize the correction error, and this optimization problem is expressed as
[0067]
[0068] Where ‖·‖ represents the norm operation. When the optimization objective is completed, the corrected water quality detection data without drift is obtained.
[0069] The correction function adopted in the adaptive correction unit is the projection recovery network (PRNet). PRNet is a deep learning model, and the detailed structure of the model is as Figure 3 shown. This model projects the drift data in the water quality detection data into the feature space and uses a deep convolutional network to recover the data without drift. PRNet includes a projection layer and a recovery layer. The projection layer uses a global convolutional layer to project the drift data into the feature space, and the recovery layer uses a residual unit (ResUnit) to estimate the drift and recover the data without drift from the drift data. PRNet also includes a sensor rearrangement step to improve the local correlation of features. The water quality detection data from adjacent waters may vary greatly. Therefore, the water quality detection results from sensors in adjacent waters cannot be directly used as a reference. PRNet predicts the drift - free amount through the temporal and spatial correlation of the target water quality detection data without comparing with the water quality detection data in adjacent waters, realizing the adaptive correction of the water quality detection data.
[0070] Considering that there are significant differences in the characteristics of water quality detection data obtained by different sensors, in order to improve the adaptive correction ability of the model for different water quality detection data, when training the PRNet, data synthesis and augmentation methods are used to construct the training dataset:
[0071] Assume that the sensor is calibrated before deployment, and the sensor data collected in a short time after deployment should contain negligible drift. These data are used as real drift-free data. On the contrary, sensor drift and noise are usually caused by errors and non-ideal factors of the sensor hardware. Therefore, drift-free data and simulated sensor drift are used to synthesize drift data, and random cropping is applied to generate small pieces of data: The initial drift-free water quality detection data is represented as X, which is a matrix of size N×T. Randomly crop a data block of size N×T from X P and denote it as X P , T P is the time length of the data block. Therefore, T-T P data blocks are obtained by random cropping, which is expressed by the following formula:
[0072]
[0073] where, {X P} represents the set of generated data blocks, is a sub-data block of size N×T from the τ-th column to the (τ+T) P -th column of X. P
[0074] While cropping to generate drift-free data blocks, randomly generate N drift amounts D P and noise samples v P . Therefore, by adding the drift amount and noise samples to the drift-free data blocks, drift data blocks Y P are generated, denoted as:
[0075] Y P =X P +D P +v P
[0076] In this embodiment, the generation models of the drift amount and noise are determined according to the sensor type, and specific noise and drift amounts are generated for each sensor. To generalize the calibration process, without loss of generality, the noise is modeled as Gaussian white noise, and the drift amount is modeled as a random walk process. The noise follows a Gaussian distribution:
[0077]
[0078] where, v i,t represents the noise of the i-th sensor at time t, is the variance of the Gaussian distribution.
[0079] Assume that the drift amounts of different sensors are independent of each other, and the drift increment at each moment is fixed and follows a Gaussian distribution:
[0080]
[0081] where d i,t represents the drift amount of the i-th sensor at time t, and δ i,t is the drift increment of the i-th sensor at time t. In the specific implementation process, when PRNet learns data features from the drift data, the simulated drift amount is slightly larger than the actual drift amount. By cropping the water quality detection data into multiple data blocks, the randomness and diversity of the training set are increased, which helps to avoid overfitting.
[0082] The training process of the projection recovery network is to minimize the loss function with respect to the input data by adjusting the network parameters. The loss function L PR of PRNet consists of the projection loss L P and the recovery loss L R and is expressed by the formula:
[0083] L PR = L P + L R
[0084] The key role of the projection layer in PRNet is to obtain the drift amount observation value from the drift data to approximate the true drift amount of the projection. Therefore, the projection loss is expressed as:
[0085]
[0086] where and respectively represent the drift-free data block and the drift data block of the j-th sample randomly cropped, f P (·) represents the projection layer function, represents the training data set, and ‖·‖ F is the Frobenius norm, which is used to measure the size of matrix elements. For the recovery loss, simply use the mean square error between the estimated value of the drift-free data and the true value:
[0087]
[0088] where f PR(·) is the overall forward propagation function of PRNet. The Adam optimizer is used to minimize the loss function. When the loss function converges, PRNet will learn to extract the spatial and temporal features of water quality detection data and suppress drift. During training, the neural network with small drift and noise is pre-trained first, and then the neural network with large drift and noise is fine-tuned. Therefore, this neural network has the ability to handle different degrees of drift.
[0089] Step S50, the correction result is fed back to the data management unit in real time through the communication unit, and a correction completion signal is sent.
[0090] Embodiment 2. The embodiment of the present application provides a method for correcting the parameters of a water quality detection device based on an intelligent sensing system. According to Figure 3 , the detailed process of using the PRNet model based on deep learning in the adaptive correction unit to correct the drift data of water quality detection is described as follows:
[0091] For the input feature with a size of N×T×1, N = 4 in this embodiment. The input feature includes the drift data, drift amount, and noise of the water quality detection data. The projection layer first projects the input feature into the feature space. The projection layer consists of a convolutional layer with a convolutional kernel size of N×7, a batch normalization layer, and a tanh activation function. The tanh activation function is expressed as:
[0092]
[0093] The output of this activation function is zero-centered. The model applies the tanh activation function, and the gradient update is more stable, which helps to accelerate the training process.
[0094] The output feature size of the projection layer is 1×T×R. The hyperparameter R is the dimension of the projection space, which is determined by the number of sensors. In this embodiment, R = 2N. The feature is upsampled and its shape is changed, and the feature size is converted to N×T×4. This process is realized by a convolutional layer and a shape transformation layer. Then, a special rearrangement layer is used to rearrange the row order of the original feature. The specific method of rearrangement is as follows:
[0095] The recovery layer in the model estimates the drift amount using the data correlation in the receptive field of the feature. However, their receptive field sizes are limited, and the adjacent rows and columns of the feature are as correlated as possible. The columns of the feature represent time, and they are naturally ordered, and the adjacent data is naturally correlated. However, the row order of the feature depends on the sensor number. Therefore, the rows of the feature are rearranged in an appropriate order. The rearrangement operation is modeled as a simple matrix multiplication. For a matrix M (K,N) , when and only when the following conditions are met, it is a rearrangement matrix:
[0096]
[0097] The above conditions indicate that a rearrangement matrix consists of 0s and 1s, where each row contains only one 1 and each column contains at least one 1. In this embodiment, the input feature X (N,T) is left-multiplied by an M (K,N) to obtain the rearranged feature
[0098]
[0099] Since K≥N, each row in X (N,T) appears multiple times in . By modeling the rearrangement operation as matrix multiplication, it is easy to implement as a rearrangement layer in a neural network.
[0100] Taking the rearranged feature as the input feature of the recovery layer, after the rearrangement layer, a convolutional layer with a kernel size of 3×3 raises the last dimension of the feature, i.e., the channel dimension, to 16. The structure of the recovery layer is derived from ResNet, which is a state-of-the-art convolutional neural network architecture widely used in computer vision applications. The basic structure of the recovery layer is a residual unit, and the detailed structure of this unit is as Figure 4 shown. Each residual unit contains two branches. The main branch is a simple linear mapping used to directly add the input and output, and the auxiliary branch contains multiple layers of convolution. The outputs of the two branches are added and then output to the next layer. In the main branch of the first residual unit, a convolutional layer with a kernel size of 1×1 is applied to raise the channel dimension of the feature from 16 to 64. The purpose of this operation is to ensure that the output features of the two branches have the same channel dimension. The auxiliary branch of the residual unit adopts a bottleneck structure to first compress and then expand the channel dimension of the feature, which is easy to extract detailed features. This special structure of the residual unit has better representational ability than traditional convolutional neural networks and is easier to train.
[0101] The output of the last convolution layer of the model is the estimated value of the drift amount. By subtracting the estimated drift value from the drift data, an estimate of the drift-free data is obtained. In addition, before outputting the drift-free data, the rows of the drift estimation matrix are rearranged in reverse to match the order of the original sensor. This operation is achieved by left-multiplying the drift estimation matrix by the inverse permutation matrix to achieve,[ which is the row-normalized transpose matrix of the rearrangement matrix.
[0102] The above specific embodiments do not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present application shall be included within the protection scope of the present application. In some cases, the actions or steps described in the present application can be executed in a different order from that in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require the specific order or consecutive order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A method for calibrating parameters of a water quality detection device based on an intelligent sensing system, characterized in that, The intelligent sensing system is configured in the water quality detection device. The system includes: a sensor unit, a data preprocessing unit, a communication unit, an adaptive correction unit, and a data management unit. The method includes: (1) Obtain water quality detection data of the target water area through the sensor unit; (2) The data preprocessing unit preprocesses the collected water quality detection data; (3) Transmit the preprocessed water quality detection data to the adaptive correction unit in real time through the communication unit; (4) The adaptive correction unit applies a projection recovery network to analyze the preprocessed water quality detection data and correct the drift data in the water quality detection data; (5) Transmit the correction result to the data management unit in real time through the communication unit and send a correction completion signal.
2. The parameter calibration method of a water quality detection device based on an intelligent sensing system according to claim 1, characterized in that A plurality of sensors are deployed in the sensor unit for collecting various water quality detection data, including electrochemical sensors, optical sensors, and physical sensors, to collect the pH value, dissolved oxygen, turbidity value, and temperature of the target water area.
3. A parameter calibration method for a water quality detection device based on an intelligent sensing system according to claim 2, characterized in that, The electrochemical sensor includes a pH sensor and a dissolved oxygen sensor. The pH sensor determines the pH value by measuring the potential difference generated by the hydrogen ion concentration in the aqueous solution; the dissolved oxygen sensor measures the reduction current of dissolved oxygen on the electrode by using an electrochemical reaction; The optical sensor is a turbidity sensor, which determines the turbidity by emitting a light beam into the target water area and measuring the light scattering; the physical sensor is a temperature sensor, which measures the temperature by using the characteristic that its resistance value changes with temperature.
4. A method for calibrating parameters of a water quality detection device based on an intelligent sensing system according to claim 1, characterized in that, All the water quality detection data collected by the sensors in the sensor unit are continuous analog signals. The data preprocessing unit performs signal amplification, A / D conversion, and normalization processing on the analog signals collected by the sensors to facilitate subsequent analysis.
5. A method for calibrating parameters of a water quality detection device based on an intelligent sensing system according to claim 4, characterized in that, For the signal amplification, an operational amplifier is used to amplify the weak signal output by the sensor to the range of A / D conversion, and the amplification factor is selected according to the measured data during the process; for the A / D conversion, a successive approximation type A / D converter is used to convert the amplified sensor signal into a digital signal, and the resolution and sampling rate of the A / D converter are determined according to different water quality detection data; the signal normalization is realized through a potentiometer and a resistor voltage division circuit, and different types of water quality detection data are normalized to a specific range according to their data distribution rules.
6. A method for calibrating parameters of a water quality detection device based on an intelligent sensing system according to claim 1, characterized in that, The communication unit consists of a communication module, an antenna, and an interface circuit; the communication module encodes and modulates the preprocessed water quality detection data and then sends it out through a wireless signal. The communication module supports the frequency band and communication protocol of 5G.
7. A method for calibrating parameters of a water quality detection device based on an intelligent sensing system according to claim 1, characterized in that, The correction process of the adaptive correction unit is as follows: Assume that the preprocessed water quality detection data is represented by the following formula: Y = X + D + v where, X represents the water quality detection data without drift; Y represents the preprocessed water quality detection data, which contains the drift amount D and noise v; each variable is a matrix of size N×T, where N is the number of types of water quality detection data and T is the time length; the calibration process is described as the process of recovering X from Y containing the unknown drift amount D and noise v, and define f c (·) represents the calibration function, and the calibration objective is to find a function f c (·) that minimizes the calibration error, and this optimization problem is expressed as where ‖·‖ represents the norm operation; when the optimization target is completed, the drift-free water quality detection data after correction is obtained.
8. A method for calibrating the parameters of a water quality detection device based on an intelligent sensing system according to claim 7, characterized in that, The calibration function adopted in the adaptive calibration unit is the projection recovery network, which is a deep learning model that projects the drift data in the water quality detection data into the feature space and uses a deep convolutional network to recover the drift-free data; the model includes a projection layer and a recovery layer. The projection layer uses a global convolutional layer to project the drift data into the feature space, and the recovery layer uses residual units to estimate the drift and recover the drift-free data from the drift data; the model also includes a sensor rearrangement step to improve the local correlation of features; the adaptive calibration unit predicts the drift-free amount through the temporal and spatial correlations of the target water quality detection data without comparing with the water quality detection data of adjacent waters, realizing the adaptive calibration of the water quality detection data.
9. A method for calibrating parameters of a water quality detection device based on an intelligent sensing system according to claim 8, characterized in that, When training the projection recovery network, a data synthesis and augmentation method is adopted to construct the training dataset; Let the drift-free water quality detection data be represented as X, which is a matrix of size N×T; randomly crop a data block of size N×T from X P and represent it as X P , where T P is the time length of the data block. Therefore, T - T P data blocks are obtained by random cropping, which is expressed by the following formula: Among them, {X P} represents the set of data blocks after cropping, is a sub-data block of size N×T from the τ-th column to the (τ + T)-th P column of X; P While cropping to generate drift-free data blocks, randomly generate N drift amounts D P and noise samples v P , and generate drift data blocks Y by adding the drift amounts and noise samples to the drift-free data blocks P , denoted as: Y P = X P + D P + v P .
10. A method for calibrating parameters of a water quality detection device based on an intelligent sensing system according to claim 8, characterized in that, The training process of the projection recovery network is to minimize the loss function with respect to the input data by adjusting the network parameters; the loss function L of the projection recovery network PR consists of the projection loss L P and the recovery loss L R and is expressed by the formula as: L PR = L P + L R The projection loss is expressed as: Among them, and respectively represent the non-drift data block and the drift data block of the j-th sample after random cropping. f P (·) represents the projection layer function, represents the training data set, and ‖·‖ F is the Frobenius norm, which is used to measure the magnitude of matrix elements; the recovery loss is expressed as: where f PR (·) is the overall forward propagation function of the projection recovery network; when the loss function converges, the projection recovery network will learn to extract the spatial and temporal features of the water quality detection data and suppress drift.
Citation Information
Cited By
Quantum sensing technology-driven water quality pollution rapid detection method
CN120870182A