Online water quality intelligent monitoring method and system and electronic equipment

Through the online intelligent water quality monitoring method, multiple sensors are used to obtain water quality data and train intelligent monitoring models, combined with Transformer and ResNet network layers, the problems of large water quality monitoring errors and difficult to judge abnormalities in the existing technology are solved, and efficient and reliable water quality detection is achieved.

CN119720041AInactive Publication Date: 2025-03-28LUKONG DIGITAL TECH (SHANDONG) CO LTD

Patent Information

Application Number
CN202411962182.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-03-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, water quality monitoring is carried out through the setting of a single or multiple thresholds, and there is a large error and it is difficult to accurately determine whether the water quality fluctuations are abnormal, so it is impossible to effectively evaluate the overall data of water quality.

Method used

The online water quality intelligent monitoring method is adopted, and water quality data is obtained and the online water quality intelligent monitoring model is trained through GPS sensors, water temperature sensors, PH sensors, dissolved oxygen sensors and conductivity sensors set in the target water area. The model combined with the Transformer network layer and the ResNet network layer is used to predict and judge water quality data.

Benefits of technology

The overall online evaluation and judgment of water quality data is realized, and the water quality is abnormal is more accurately judged, which improves the safety, reliability and intelligence of water quality detection, and solves the problem that a single or multiple threshold settings cannot accurately judge water quality abnormality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720041A_ABST
    Figure CN119720041A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of online water quality intelligent monitoring scheme design, in particular to an online water quality intelligent monitoring method and system and electronic equipment. The method comprises the following steps: acquiring GPS data, water temperature data, PH data, dissolved oxygen content data and conductivity data of a target point location of a target water area within a preset duration according to a preset time interval through a GPS sensor, a water temperature sensor, a PH sensor, a dissolved oxygen sensor and a conductivity sensor which are arranged at the target point location of the target water area, and acquiring timestamp data; the online water quality intelligent monitoring model is trained, whether the water quality data of the target water area is abnormal or not is judged, overall online evaluation and judgment on the overall water quality data of the target water area are achieved, whether the overall water quality data of the target water area is abnormal or not is accurately judged, and the safety, reliability and intelligent degree of water quality detection are improved to a great extent. The intelligent degree and usability of the system are improved to a great extent, and the application scenarios of the system are greatly expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of online water quality intelligent monitoring scheme design, and in particular to an online water quality intelligent monitoring method and system, and electronic equipment. Background Art

[0002] With the development of modern industry, the use of chemical substances in people's production and life is increasing. When chemical substances are discharged into industrial water, domestic sewage or water for emergencies, it will cause sudden changes in water quality and seriously damage the water quality ecological environment. Therefore, timely and effective monitoring of sudden changes in water quality is an urgent and important need, which can help protect water flows and then help to manage and improve the ecological environment.

[0003] In the prior art, water quality is monitored to see if it is abnormal by setting a single or multiple thresholds of multiple sensors. However, since the thresholds are all obtained through manual experience, there are large errors. Since the water quality changes in a water area are usually complex and there are many influencing factors, such as industrial emissions, agricultural activities, and domestic sewage discharge, the setting of a single or multiple thresholds cannot accurately determine whether there is an abnormality in the water quality fluctuation of a certain water area, and it is easy to be misjudged by the system. It is difficult to conduct an overall evaluation and judgment of the overall water quality data of a certain water area, that is, it is difficult to accurately determine whether the overall water quality data of a certain water area is in an abnormal state.

[0004] Therefore, the prior art needs to be further developed. Summary of the invention

[0005] The purpose of the present invention is to overcome the above technical deficiencies and provide an online water quality intelligent monitoring method and system, and electronic equipment to solve the problems existing in the prior art.

[0006] To achieve the above technical objectives, according to a first aspect of the present invention, the present invention provides an online water quality intelligent monitoring method, comprising: S100, using a GPS sensor, a water temperature sensor, a pH sensor, a dissolved oxygen sensor, and a conductivity sensor disposed at a target point in the target water area to obtain GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data of a target point in the target water area within a preset time period at preset time intervals, and obtaining timestamp data when the GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data are collected, and recorded as a water quality data set of the target point in the target water area, a water quality data set of all target points in the target water area collected within a preset time period is recorded as a water quality data set of the target water area, a preset number of water quality data sets of the target water area are collected, and the collected water quality data set is divided into a training data set and a verification data set according to a first preset ratio; S200, using the collected training data set to train the online water quality intelligent monitoring model, using the verification data set to optimize the online water quality intelligent monitoring model, optimize the model parameters, and complete the online water quality intelligent monitoring model training; S300. After the model training is completed, the water quality data set of all target points of the target water area collected at a certain time point is obtained again, the water quality data set of all target points of the target water area is input into the online water quality intelligent monitoring model, and the recognition result is output to determine whether the water quality data of the target water area is abnormal, and whether to output an alarm signal of abnormal water quality data of the target water area according to the judgment result.

[0007] Specifically, the method further includes: The water temperature sensor, pH sensor, dissolved oxygen sensor, conductivity sensor and GPS sensor at the same target point are all installed on the same fixed rod, one end of which is fixed in the soil layer below the target water area by plugging. After plugging, the water temperature sensor, pH sensor, dissolved oxygen sensor and conductivity sensor are located below the water surface, and the GPS sensor is located above the water surface.

[0008] Specifically, the method further includes: The target points are set to be multiple, and the multiple target points are evenly distributed in the target water area according to a preset number of rows and a preset number of columns.

[0009] Specifically, the online intelligent water quality monitoring model is trained by using the training data set; the trained online intelligent water quality monitoring model is optimized by using the verification data set, the model parameters are optimized, and the online intelligent water quality monitoring model training is completed, including: The training data set is input into the preset network layer in batches for training, and the preset network layer includes a Transformer network layer. The Transformer network layer is used to forward propagate the water quality data set of the target water area collected at the current time point to predict the water quality data set of the target water area at the next time point, and then obtain the predicted loss value; the loss value of the preset network layer is calculated and input into the optimizer for optimization to determine the direction in which the parameter gradient of the online water quality intelligent monitoring model decreases fastest; the online water quality intelligent monitoring model performs back propagation according to the loss value and the parameter gradient of the model to optimize the parameters of the online water quality intelligent monitoring model.

[0010] Specifically, the method of using the training data set to train the online water quality intelligent monitoring model; using the verification data set to optimize the trained online water quality intelligent monitoring model, optimizing the model parameters, and completing the online water quality intelligent monitoring model training also includes: After each training, the verification data set is input into the preset network layer of the previous training in batches for model parameter verification, and cyclic training is performed, with the total number of training rounds set to the first preset round; the loss value of the preset network layer is recorded, and it is determined whether the loss value meets the first preset condition, and whether to end the training and output the model parameters based on the judgment result.

[0011] Specifically, the determining whether the loss value satisfies the first preset condition, and determining whether to end the training and output the model parameters according to the determination result, includes: If the loss value meets the first preset condition, the training is terminated and the parameters of the current online water quality intelligent monitoring model are output; if the loss value does not meet the first preset condition, the training continues.

[0012] Specifically, the first preset condition is: after the second preset round of training, the loss values ​​obtained in the next round of training are greater than or equal to the loss values ​​that occurred during the second preset round of training.

[0013] Specifically, the recognition result is that the water quality data of the target water area is abnormal or the water quality data of the target water area is normal, the water quality data set of all target points of the target water area is input into the online water quality intelligent monitoring model, the recognition result is output, and then it is determined whether the water quality data of the target water area is abnormal, and whether to output an alarm signal of abnormal water quality data of the target water area according to the judgment result, including: If the output result is that the water quality data of the target water area is abnormal, an alarm signal regarding the abnormal water quality data of the target water area is output; If the output result is that the water quality data of the target water area is normal, a prompt signal indicating that the water quality data of the target water area is normal is output.

[0014] According to a second aspect of the present invention, there is provided an online water quality intelligent monitoring system, comprising: The acquisition module includes a GPS sensor, a water temperature sensor, a pH sensor, a dissolved oxygen sensor, and a conductivity sensor arranged at a target point in the target water area; the acquisition module is used to acquire GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data of a target point in the target water area within a preset time period at a preset time interval, and acquire timestamp data when the GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data are collected, which is recorded as a water quality data set of the target point in the target water area; and the water quality data set of all target points in the target water area collected within the preset time period is recorded as a water quality data set of the target water area; A control module is used to collect a preset number of water quality data sets of target waters, and divide the collected water quality data sets into a training data set and a verification data set according to a first preset ratio; and is used to train an online water quality intelligent monitoring model using the collected training data set, and optimize the online water quality intelligent monitoring model using the verification data set, optimize the model parameters, and complete the online water quality intelligent monitoring model training; After the model training is completed, it is used to obtain the water quality data set of all target points in the target water area collected at a certain time point again, input the water quality data set of all target points in the target water area into the online water quality intelligent monitoring model, output the recognition result, and then judge whether the water quality data of the target water area is abnormal, and determine whether to output an alarm signal of abnormal water quality data of the target water area based on the judgment result.

[0015] According to a third aspect of the present invention, there is provided an electronic device, comprising: a memory; and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the above-mentioned online intelligent water quality monitoring method is implemented.

[0016] Beneficial effects: The present invention obtains GPS data, water temperature data, PH data, dissolved oxygen content data, and conductivity data of the target point in the target water area within a preset time period at preset time intervals through a GPS sensor, a water temperature sensor, a PH sensor, a dissolved oxygen sensor, and a conductivity sensor arranged at the target point in the target water area, and obtains timestamp data, thereby training an online water quality intelligent monitoring model, and then judging whether the water quality data of the target water area is abnormal, thereby realizing overall online evaluation and judgment of the overall water quality data of the target water area, and more accurately judging whether the overall water quality data of the target water area is abnormal, thereby greatly improving the safety, reliability, and intelligence of water quality detection, and solving the problem that the setting of a single or multiple thresholds cannot accurately judge whether the water quality of the target area is abnormal, thereby greatly improving the intelligence and usability of the present invention, and greatly expanding the application scenarios of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a flow chart of an online water quality intelligent monitoring method provided in a specific embodiment of the present invention; Figure 2 Schematic diagram of the system composition of the online water quality intelligent monitoring system provided in a specific embodiment of the present invention; Figure 3 It is a structural schematic diagram of an online water quality intelligent monitoring model provided in a specific embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention is clearly and completely described below in conjunction with the accompanying drawings of the present invention. Based on the embodiments in this application, other similar embodiments obtained by ordinary technicians in this field without making creative work should all fall within the scope of protection of this application. In addition, the directional words mentioned in the following embodiments, such as "up", "down", "left", "right", etc., are only reference to the directions of the accompanying drawings. Therefore, the directional words used are used to illustrate rather than limit the invention.

[0019] The present invention will be further described below in conjunction with the accompanying drawings and preferred embodiments.

[0020] See also Figure 1 The present invention provides an online water quality intelligent monitoring method, comprising: S100, using GPS sensors, water temperature sensors, pH sensors, dissolved oxygen sensors, and conductivity sensors set at target points in the target water area to obtain GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data of target points in the target water area within a preset time period at preset time intervals, and obtain timestamp data when the GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data are collected, which are recorded as a water quality data set of the target points in the target water area, and a water quality data set of all target points in the target water area collected within a preset time period is recorded as a water quality data set of the target water area, a preset number of water quality data sets of the target water area are collected, and the collected water quality data sets are divided into a training data set and a verification data set according to a first preset ratio.

[0021] Specifically, the method further includes: The water temperature sensor, pH sensor, dissolved oxygen sensor, conductivity sensor and GPS sensor at the same target point are all installed on the same fixed rod, one end of which is fixed in the soil layer below the target water area by plugging. After plugging, the water temperature sensor, pH sensor, dissolved oxygen sensor and conductivity sensor are located below the water surface, and the GPS sensor is located above the water surface.

[0022] Specifically, the method further includes: The target points are set to be multiple, and the multiple target points are evenly distributed in the target water area according to a preset number of rows and a preset number of columns.

[0023] It should be noted that the steps before step S100 include: A preset number, a preset duration, a preset time interval, a first preset ratio, a first preset round, a second preset round, a preset number of rows, and a preset number of columns are preset in the control module.

[0024] It can be understood that the preset number, preset duration, preset time interval, first preset ratio, first preset round, second preset round, preset number of rows, and preset number of columns can be specifically set according to the actual needs of the user of the present invention. The present invention does not limit the specific values ​​of the above parameters, and there is no regularity in setting the specific values ​​of the above parameters, as long as it is applicable to the online water quality intelligent monitoring method proposed in the present invention.

[0025] Preferably, the present invention sets the preset number to 300, sets the preset duration to 24 hours, sets the preset time interval to 1 minute, sets the first preset ratio to 8:2, sets the first preset round to 20,000 times, sets the second preset round to 200, and preferably sets the preset number of rows to 10 rows. The present invention preferably sets the preset number of columns to 10 columns. The above settings can further improve the performance of the model and the efficiency of model training, and greatly improve the accuracy and reliability of the prediction of the online water quality intelligent monitoring model of the present invention.

[0026] It is understandable that the water quality data sets of the preset number of target water areas all require relevant management personnel to confirm that the water quality data they represent are not abnormal. The specific method of confirming that the water quality data they represent are not abnormal can be determined by referring to relevant industry specifications, and the present invention is not limited here.

[0027] It is understandable that since industrial emissions, agricultural activities, domestic sewage discharge, etc. are usually repetitive behaviors, there are certain time coupling laws between industrial emissions, agricultural activities, domestic sewage discharge, etc. For example, industrial emissions or agricultural activities or domestic sewage discharge are often concentrated in a certain time period, which will cause the water quality in that time period to fluctuate more obviously; and since water is usually flowing, impurities in the water are also in a dynamic diffusion state. When the water quality in the target area is in a normal state, there is also a certain dynamic coupling law between the GPS data, water temperature data, PH data, dissolved oxygen content data, and conductivity data of each target point in the target water area. When the water quality of the target water area is abnormal, this balance relationship will be broken. Based on this, the present invention designs and trains an online water quality intelligent monitoring model.

[0028] S200: Use the collected training data set to train the online water quality intelligent monitoring model, use the verification data set to optimize the online water quality intelligent monitoring model, optimize the model parameters, and complete the online water quality intelligent monitoring model training.

[0029] Specifically, the online intelligent water quality monitoring model is trained by using the training data set; the trained online intelligent water quality monitoring model is optimized by using the verification data set, the model parameters are optimized, and the online intelligent water quality monitoring model training is completed, including: The training data set is input into the preset network layer in batches for training, and the preset network layer includes a Transformer network layer. The Transformer network layer is used to forward propagate the water quality data set of the target water area collected at the current time point to predict the water quality data set of the target water area at the next time point, and then obtain the predicted loss value; the loss value of the preset network layer is calculated and input into the optimizer for optimization to determine the direction in which the parameter gradient of the online water quality intelligent monitoring model decreases fastest; the online water quality intelligent monitoring model performs back propagation according to the loss value and the parameter gradient of the model to optimize the parameters of the online water quality intelligent monitoring model.

[0030] It can be understood that Transformer is a deep learning model based on the self-attention mechanism, which consists of a multi-head attention mechanism and a feedforward neural network. It can process sequence data and capture long-distance dependencies. The Transformer model does not contain traditional convolutional layers, but processes each element in the input sequence through an attention layer. The typical structure of Transformer includes an encoder and a decoder, wherein the encoder is composed of multiple identical layers stacked together, and the decoder adds a self-attention layer on the basis of the encoder to process sequence generation tasks. The present invention uses Transformer to supplement global context information, enhances the model's capabilities in feature extraction and global understanding, greatly improves the performance of the model, and greatly reduces the computational cost.

[0031] Specifically, the preset network layer also includes a ResNet network layer, and the ResNet network layer is used to classify and predict the output results according to the collected water quality data set of the target water area, and the classification results include that the water quality data of the target water area is abnormal or the water quality data of the target water area is normal.

[0032] It should be noted here that ResNet is a deep convolutional neural network that solves the gradient vanishing problem in deep network training by introducing residual connections. The core component of ResNet is the residual block, which usually contains two or three convolutional layers and a jump connection, which allows the gradient to bypass these convolutional layers directly. The network structure of ResNet can be very deep. These networks extract the features of the data in the water quality data set of the target water area by stacking multiple residual blocks, and classify and predict the output results through global average pooling and fully connected layers. The classification results include abnormal water quality data of the target water area or normal water quality data of the target water area.

[0033] See also Figure 3The present invention combines the ResNet network layer and the Transformer network layer. ResNet is good at extracting local features of data in the water quality data set of the target water area in the training data set, while Transformer can supplement the global context information. This combination can enhance the model's capabilities in feature extraction and global understanding, greatly improve the performance of the model, and greatly reduce the computational cost.

[0034] It can be understood that the ResNet network layer is used to classify and predict the output results through the data in the water quality data set of the target water area collected in the training data set and the verification data set. The specific steps are: (1) First, the training data set is placed in the Backbones network layer of the model. Backbone refers to a series of convolutional layers that constitute the skeleton of the neural network. The main function of these layers is to extract the features of the input data. The Backbone network is usually composed of multiple convolutional layers, pooling layers, and activation functions, which can extract meaningful feature representations from the original data. Backbones is composed of multiple Backbones, and the core network layer in Backbone is the Resnet network layer. After the data set is input into the model, the water quality data set of the first target water area will be input into Backbones for training; (2) Position encoding and Resnet network layers were added when constructing Backbone. After the training data set was input, Resnet began to train layer by layer to extract the features of the data in the water quality data set of the target water area, and assist Transformer in predicting whether the water quality of the target water area is abnormal. The extracted features can obtain the location information of the target point with the help of position encoding, which is convenient for relevant personnel to quickly locate the abnormal point.

[0035] Specifically, the method of using the training data set to train the online water quality intelligent monitoring model; using the verification data set to optimize the trained online water quality intelligent monitoring model, optimizing the model parameters, and completing the online water quality intelligent monitoring model training also includes: After each training, the verification data set is input into the preset network layer of the previous training in batches for model parameter verification, and cyclic training is performed, with the total number of training rounds set to the first preset round; the loss value of the preset network layer is recorded, and it is determined whether the loss value meets the first preset condition, and whether to end the training and output the model parameters based on the judgment result.

[0036] Specifically, after each training, the verification data set is input into the preset network layer of the previous training in batches to verify the model parameters, and the cyclic training is performed, including the following methods: When the number of training times is not enough and the model needs to be optimized, the training can only be performed from the beginning. Therefore, the present invention develops a method for continuing the following training based on the previously trained model parameter file; (1) Provide custom parameters, which can be set according to user needs to continue training based on any training parameters; (2) Load the parameters of the custom model file; (3) Put the verification data set into the custom parameter network layer for verification, obtain the loss value and record the model parameters of the model corresponding to the minimum loss value during the training process; (4) Based on this set of model parameters, forward propagation training and back propagation are performed, and the optimizer optimizes the parameters to obtain a new set of data; (5) Put the verification data into the new data network layer for inference to obtain the loss value; (6) Perform cyclic training to obtain the best model and complete model optimization.

[0037] It is understandable that the training method adopted by the present invention is batch training, which means that each time the model parameters are updated, only a part of the samples in the validation data set is used, which is called a batch. The advantages of batch training are that it can reduce memory consumption, speed up training, increase randomness, and facilitate the generalization of the model.

[0038] It should be noted here that, in the present invention, batch_size=4, and the batch_size is the batch size. For example, when batch_size=4, it means that four water quality data sets of the first target water areas are selected from the verification data set each time and put into the model for verification.

[0039] Specifically, the determining whether the loss value satisfies the first preset condition, and determining whether to end the training and output the model parameters according to the determination result, includes: If the loss value meets the first preset condition, the training is terminated and the parameters of the current online water quality intelligent monitoring model are output; if the loss value does not meet the first preset condition, the training continues.

[0040] Specifically, the first preset condition is: after the second preset round of training, the loss values ​​obtained in the next round of training are greater than or equal to the loss values ​​that occurred during the second preset round of training.

[0041] It can be understood that the present invention preferably sets the maximum round of cyclic training to 20,000 times, which can effectively ensure the accuracy of the model prediction of the present invention and record the loss value of the model training. The present invention sets the second preset round to 200, that is, when the loss value of the training no longer decreases within 200 rounds of training, the round with the smallest loss value in the 200 rounds of training is saved as the best verification round parameter to generate the best model file. The above setting makes the training rounds no longer rely on manual judgment, but uses the deep learning model for automatic training, which improves the accuracy of the model prediction, and automatically ends the training when the accuracy meets the requirements, which greatly saves the training time, and can also effectively prevent overfitting, which greatly improves the intelligence level of the present invention and the efficiency of model training.

[0042] Furthermore, the specific process of the online water quality intelligent monitoring model of the present invention is as follows: (1) Obtain the potential vector mean mu and logarithmic variance logvar in the forward propagation process of the online water quality intelligent monitoring model; (2) Calculate a reasonable loss value representing the training effect: Calculate the divergence: k1=-0.5*(1+logvar-mu^2-(e^logvar)); Calculate the loss between the data and the predicted values ​​in the water quality data set in the validation data set: loss=L1+k1*k1_weight; Among them, loss is the loss value, k1 is the divergence, k1_weight is the proportion of k1, the value is 10, L1 is the absolute difference between the predicted value and the true value, and the calculation formula of L1 is as follows: ; Among them, A is the L1 loss in pytorch, which calculates the average or sum of the absolute differences between two tensors; A has a shape of N*C*H*W, which indicates that it is a four-dimensional tensor, N represents the number of samples (Batch Size), indicating that there are N data points, C represents the number of channels (Channels), H and W represent the height and width respectively, which are usually the two-dimensional spatial dimensions of the input features; P represents the padding value, which is a Boolean type, and the shape of P is c*h*w*1. The dimensions of P are the same as those of A in terms of channel, height, and width, but there is no sample number N, which means that P is a mask or padding information for a feature map of each sample, and the Boolean value of P may be used to mark whether the elements in A are filled (True) or valid (False).

[0043] (3) The loss value when using the validation data set to validate the current model network; (4) If the validation loss of this round is less than that of the previous round, the best model parameters are replaced with the training model of this round; (5) Put the rounds and loss values ​​into the dictionary one by one; (6) Compare the loss value of the current round with the loss values ​​of the 200 rounds before this round (parameters are provided and can be set according to actual needs, the default is 200), that is, traverse the loss values ​​from epoch-200 to epoch-1 (epoch is the training round, and the comparison is performed when the epoch is greater than 200). If the loss values ​​of the current round of epoch are all greater than the loss values ​​from (epoch-200) to (epoch-1), then stop training.

[0044] (7) Save the best model parameters in the cyclic verification as a ckpt model file.

[0045] S300. After the model training is completed, the water quality data set of all target points of the target water area collected at a certain time point is obtained again, the water quality data set of all target points of the target water area is input into the online water quality intelligent monitoring model, and the recognition result is output to determine whether the water quality data of the target water area is abnormal, and whether to output an alarm signal of abnormal water quality data of the target water area according to the judgment result.

[0046] Specifically, the recognition result is that the water quality data of the target water area is abnormal or the water quality data of the target water area is normal, the water quality data set of all target points of the target water area is input into the online water quality intelligent monitoring model, the recognition result is output, and then it is determined whether the water quality data of the target water area is abnormal, and whether to output an alarm signal of abnormal water quality data of the target water area according to the judgment result, including: If the output result is that the water quality data of the target water area is abnormal, an alarm signal regarding the abnormal water quality data of the target water area is output; If the output result is that the water quality data of the target water area is normal, a prompt signal indicating that the water quality data of the target water area is normal is output.

[0047] It can be understood that the present invention obtains the GPS data, water temperature data, PH data, dissolved oxygen content data, and conductivity data of the target point in the target water area within a preset time period at preset time intervals through the GPS sensor, water temperature sensor, PH sensor, dissolved oxygen sensor, and conductivity sensor set at the target point in the target water area, and obtains timestamp data, and then trains the online water quality intelligent monitoring model, and then determines whether the water quality data of the target water area is abnormal, thereby realizing the overall online evaluation and judgment of the overall water quality data of the target water area, and more accurately judging whether the overall water quality data of the target water area is abnormal, which greatly improves the safety, reliability and intelligence of water quality detection, and solves the problem that the setting of a single or multiple thresholds cannot accurately judge whether the water quality of the target area is abnormal, which greatly improves the intelligence and usability of the present invention and greatly expands the application scenarios of the present invention.

[0048] See also Figure 2 The present invention provides another embodiment, which provides an online water quality intelligent monitoring system, the online water quality intelligent monitoring system comprising: The acquisition module 100 includes a GPS sensor, a water temperature sensor, a pH sensor, a dissolved oxygen sensor, and a conductivity sensor arranged at a target point in the target water area; and is used to acquire GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data of a target point in the target water area within a preset time period at a preset time interval, and acquire timestamp data when the GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data are collected, and recorded as a water quality data set of the target point in the target water area; and the water quality data set of all target points in the target water area collected within the preset time period is recorded as a water quality data set of the target water area; The control module 200 is used to collect a preset number of water quality data sets of the target water area, and divide the collected water quality data sets into a training data set and a verification data set according to a first preset ratio; and is used to train the online water quality intelligent monitoring model using the collected training data set, and optimize the online water quality intelligent monitoring model using the verification data set, optimize the model parameters, and complete the online water quality intelligent monitoring model training; After the model training is completed, it is used to obtain the water quality data set of all target points in the target water area collected at a certain time point again, input the water quality data set of all target points in the target water area into the online water quality intelligent monitoring model, output the recognition result, and then judge whether the water quality data of the target water area is abnormal, and determine whether to output an alarm signal of abnormal water quality data of the target water area based on the judgment result.

[0049] It should be noted here that the present invention obtains GPS data, water temperature data, PH data, dissolved oxygen content data, and conductivity data of the target point in the target water area within a preset time period at preset time intervals through a GPS sensor, a water temperature sensor, a PH sensor, a dissolved oxygen sensor, and a conductivity sensor set at the target point in the target water area, and obtains timestamp data, and then trains an online water quality intelligent monitoring model, and then determines whether the water quality data of the target water area is abnormal, thereby realizing an overall online evaluation and judgment of the overall water quality data of the target water area, and more accurately judging whether the overall water quality data of the target water area is abnormal, which greatly improves the safety, reliability and intelligence of water quality detection, and solves the problem that the setting of a single or multiple thresholds cannot accurately judge whether the water quality of the target area is abnormal, which greatly improves the intelligence and usability of the present invention and greatly expands the application scenarios of the present invention.

[0050] In a preferred embodiment, the present application further provides an electronic device, the electronic device comprising: A memory; and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the online water quality intelligent monitoring method is implemented. The computer device can be broadly a server, a terminal, or any other electronic device with necessary computing and / or processing capabilities. In one embodiment, the computer device may include a processor, a memory, a network interface, a communication interface, etc. connected via a system bus. The processor of the computer device can be used to provide necessary computing, processing and / or control capabilities. The memory of the computer device may include a non-volatile storage medium and an internal memory. An operating system, a computer program, etc. may be stored in or on the non-volatile storage medium. The internal memory can provide an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface and the communication interface of the computer device can be used to connect and communicate with external devices through a network. When the computer program is executed by the processor, the steps of the method of the present invention are performed.

[0051] The present invention may be implemented as a computer-readable storage medium having a computer program stored thereon, which causes the steps of the method of an embodiment of the present invention to be executed when executed by a processor. In one embodiment, the computer program is distributed on a plurality of computer devices or processors coupled to a network so that the computer program is stored, accessed and executed in a distributed manner by one or more computer devices or processors. A single method step / operation, or two or more method steps / operations, may be performed by a single computer device or processor or by two or more computer devices or processors. One or more method steps / operations may be performed by one or more computer devices or processors, and one or more other method steps / operations may be performed by one or more other computer devices or processors. One or more computer devices or processors may perform a single method step / operation, or perform two or more method steps / operations.

[0052] It will be appreciated by a person skilled in the art that the method steps of the present invention may be performed by instructing related hardware such as a computer device or a processor through a computer program, and the computer program may be stored in a non-temporary computer-readable storage medium, which causes the steps of the present invention to be performed when the computer program is executed. Depending on the circumstances, any reference to memory, storage, database, or other media herein may include non-volatile and / or volatile memory. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, etc. Examples of volatile memory include random access memory (RAM), external cache memory, etc.

[0053] It can be understood that the present invention obtains the GPS data, water temperature data, PH data, dissolved oxygen content data, and conductivity data of the target point in the target water area within a preset time period at preset time intervals through the GPS sensor, water temperature sensor, PH sensor, dissolved oxygen sensor, and conductivity sensor set at the target point in the target water area, and obtains timestamp data, and then trains the online water quality intelligent monitoring model, and then determines whether the water quality data of the target water area is abnormal, thereby realizing the overall online evaluation and judgment of the overall water quality data of the target water area, and more accurately judging whether the overall water quality data of the target water area is abnormal, which greatly improves the safety, reliability and intelligence of water quality detection, and solves the problem that the setting of a single or multiple thresholds cannot accurately judge whether the water quality of the target area is abnormal, which greatly improves the intelligence and usability of the present invention and greatly expands the application scenarios of the present invention.

[0054] The various technical features described above can be combined arbitrarily. Although all possible combinations of these technical features are not described, any combination of these technical features should be considered to be covered by this specification as long as there is no contradiction in such combination.

[0055] The specific implementation of the present invention described above does not constitute a limitation on the protection scope of the present invention. Any other corresponding changes and modifications made based on the technical concept of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. An online water quality intelligent monitoring method, characterized in that: The method comprises: S100, using a GPS sensor, a water temperature sensor, a pH sensor, a dissolved oxygen sensor, and a conductivity sensor disposed at a target point in the target water area to obtain GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data of a target point in the target water area within a preset time period at preset time intervals, and obtaining timestamp data when the GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data are collected, and recorded as a water quality data set of the target point in the target water area, a water quality data set of all target points in the target water area collected within a preset time period is recorded as a water quality data set of the target water area, a preset number of water quality data sets of the target water area are collected, and the collected water quality data set is divided into a training data set and a verification data set according to a first preset ratio; S200, using the collected training data set to train the online water quality intelligent monitoring model, using the verification data set to optimize the online water quality intelligent monitoring model, optimize the model parameters, and complete the online water quality intelligent monitoring model training; S300. After the model training is completed, the water quality data set of all target points of the target water area collected at a certain time point is obtained again, the water quality data set of all target points of the target water area is input into the online water quality intelligent monitoring model, and the recognition result is output to determine whether the water quality data of the target water area is abnormal, and whether to output an alarm signal of abnormal water quality data of the target water area according to the judgment result.

2. The online water quality intelligent monitoring method according to claim 1 is characterized in that: The method further comprises: The water temperature sensor, pH sensor, dissolved oxygen sensor, conductivity sensor and GPS sensor at the same target point are all installed on the same fixed rod, one end of which is fixed in the soil layer below the target water area by plugging. After plugging, the water temperature sensor, pH sensor, dissolved oxygen sensor and conductivity sensor are located below the water surface, and the GPS sensor is located above the water surface.

3. The online water quality intelligent monitoring method according to claim 1 is characterized in that: The method further comprises: The target points are set to be multiple, and the multiple target points are evenly distributed in the target water area according to a preset number of rows and a preset number of columns.

4. The online water quality intelligent monitoring method according to claim 1 is characterized in that: The method of using the training data set to train the online water quality intelligent monitoring model; using the verification data set to optimize the trained online water quality intelligent monitoring model, optimizing the model parameters, and completing the online water quality intelligent monitoring model training includes: The training data set is input into the preset network layer in batches for training, and the preset network layer includes a Transformer network layer. The Transformer network layer is used to forward propagate the water quality data set of the target water area collected at the current time point to predict the water quality data set of the target water area at the next time point, and then obtain the predicted loss value; the loss value of the preset network layer is calculated and input into the optimizer for optimization to determine the direction in which the parameter gradient of the online water quality intelligent monitoring model decreases fastest; the online water quality intelligent monitoring model performs back propagation according to the loss value and the parameter gradient of the model to optimize the parameters of the online water quality intelligent monitoring model.

5. The online water quality intelligent monitoring method according to claim 4 is characterized in that: The method of using the training data set to train the online water quality intelligent monitoring model; using the verification data set to optimize the trained online water quality intelligent monitoring model, optimizing the model parameters, and completing the online water quality intelligent monitoring model training also includes: After each training, the verification data set is input into the preset network layer of the previous training in batches for model parameter verification, and cyclic training is performed, with the total number of training rounds set to the first preset round; the loss value of the preset network layer is recorded, and it is determined whether the loss value meets the first preset condition, and whether to end the training and output the model parameters based on the judgment result.

6. The online water quality intelligent monitoring method according to claim 5 is characterized in that: The determining whether the loss value satisfies the first preset condition, and determining whether to end the training and output the model parameters according to the determination result, includes: If the loss value meets the first preset condition, the training is terminated and the parameters of the current online water quality intelligent monitoring model are output; if the loss value does not meet the first preset condition, the training continues.

7. The online water quality intelligent monitoring method according to claim 5, characterized in that: The first preset condition is that after the second preset round of training, the loss values ​​obtained in the next round of training are greater than or equal to the loss values ​​that occurred during the second preset round of training.

8. The online water quality intelligent monitoring method according to claim 1, characterized in that: The recognition result is that the water quality data of the target water area is abnormal or the water quality data of the target water area is normal. The water quality data set of all target points of the target water area is input into the online water quality intelligent monitoring model, and the recognition result is output, and then it is determined whether the water quality data of the target water area is abnormal. According to the judgment result, it is determined whether to output an alarm signal of abnormal water quality data of the target water area, including: If the output result is that the water quality data of the target water area is abnormal, an alarm signal regarding the abnormal water quality data of the target water area is output; If the output result is that the water quality data of the target water area is normal, a prompt signal indicating that the water quality data of the target water area is normal is output.

9. An online water quality intelligent monitoring system, characterized in that: include: An acquisition module, including a GPS sensor, a water temperature sensor, a pH sensor, a dissolved oxygen sensor, and a conductivity sensor, which are set at a target point in a target water area; Used to obtain GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data of target points in a target water area within a preset time period at preset time intervals, and obtain timestamp data when the GPS data, water temperature data, pH data, dissolved oxygen content data, and conductivity data are collected, and recorded as a water quality data set of the target points in the target water area, and the water quality data set of all target points in the target water area collected within the preset time period is recorded as the water quality data set of the target water area; A control module, configured to collect a preset number of water quality data sets of a target water area, and divide the collected water quality data sets into a training data set and a verification data set according to a first preset ratio; Used to train the online water quality intelligent monitoring model using the collected training data set, and use the verification data set to optimize the online water quality intelligent monitoring model, optimize the model parameters, and complete the online water quality intelligent monitoring model training; After the model training is completed, it is used to obtain the water quality data set of all target points in the target water area collected at a certain time point again, input the water quality data set of all target points in the target water area into the online water quality intelligent monitoring model, output the recognition result, and then judge whether the water quality data of the target water area is abnormal, and determine whether to output an alarm signal of abnormal water quality data of the target water area based on the judgment result.

10. An electronic device, characterized in that: include: Memory; and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the online water quality intelligent monitoring method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Waterfowl breeding water quality prediction method

    CN117171624A

  • Water quality prediction method and system based on GAT-Transform time sequence model

    CN117273203A

  • Intelligent construction site water quality monitoring, regulating and controlling system and method and storage medium

    CN118822158A

  • Target area water quality early warning method and system, computer equipment and readable medium

    CN119068354A

Cited By

  • Intelligent conductivity pollution diagnosis method based on multi-modal feature fusion and adaptive density clustering

    CN120763767A

  • Conductivity pollution intelligent diagnosis method based on multi-modal feature fusion and adaptive density clustering

    CN120763767B