A method for online monitoring of hydrological and water quality information fusion
Through the fusion method of online monitoring information of hydrological water quality, the target data correction model is used to process the basin monitoring data, which solves the problem of data error in the natural environment of hydrological water quality monitoring equipment, and realizes the accuracy of data and the reliability of early warning.
Patent Information
- Application Number
- CN202410813137.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-06-24
AI Technical Summary
Existing hydrological water quality monitoring equipment is susceptible to severe weather, biological pollution and water impurities in the natural environment, resulting in data errors and difficulty in maintaining and calibrating, affecting the accuracy of monitoring data.
Using the fusion method of online monitoring information of hydrological and water quality, the data of the basin monitoring equipment is obtained, and the target data correction model is used to perform data correction, including data preprocessing, feature extraction and assimilation correction of the initial data correction model, to generate accurate target hydrological and water quality monitoring data. , and make early warning based on this.
It improves the accuracy of monitoring data and the reliability of early warning, ensures effective monitoring and early warning of the river basin, and reduces data errors.
Smart Images

Figure CN118709136B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method for integrating hydrological and water quality online monitoring information. Background Art
[0002] Data monitoring equipment is widely used in hydrological and water quality monitoring, providing high-frequency and real-time data for river monitoring and environmental management. In the management of river basin hydrology and water environment, online monitoring has outstanding advantages in terms of cost, timeliness and coverage compared to traditional manual sampling and analysis. However, sensors installed in natural environments are easily disturbed by factors such as bad weather, biological pollution, and water impurities. They are difficult to maintain and calibrate, which leads to errors in the collected data.
[0003] Therefore, how to ensure the accuracy of the data obtained by the monitoring equipment and monitor the watershed based on accurate monitoring data has become an urgent problem to be solved. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method for fusing online hydrological and water quality monitoring information to solve the problem of how to ensure the accuracy of data obtained by monitoring equipment and monitor the watershed based on accurate monitoring data.
[0005] In a first aspect, an embodiment of the present invention provides a method for online monitoring information fusion of hydrology and water quality, the method comprising:
[0006] Obtain current hydrological and water quality monitoring data sent by watershed monitoring equipment in the preset area;
[0007] Based on the target data correction model, the current hydrological and water quality monitoring data is corrected to obtain the target hydrological and water quality monitoring data; the target data correction model is obtained by assimilation correction of the initial data correction model, and the initial data correction model is obtained by training based on the training data;
[0008] Based on the target hydrological and water quality monitoring data, early warning is issued for the river basins within the preset area.
[0009] The method for online monitoring of hydrology and water quality information fusion provided in the embodiment of the present application obtains the current hydrology and water quality monitoring data sent by the watershed monitoring equipment in the preset area; performs data correction on the current hydrology and water quality monitoring data based on the target data correction model to obtain the target hydrology and water quality monitoring data, thereby ensuring the accuracy of the generated target hydrology and water quality monitoring data. Based on the target hydrology and water quality monitoring data, an early warning is issued for the watershed in the preset area, thereby ensuring the accuracy of the early warning for the watershed in the preset area. It solves the problem in the prior art that sensors in the natural environment are easily disturbed by factors such as bad weather, biological pollution, and water impurities, are difficult to maintain and calibrate, and the collected data usually has errors. It solves the problem of how to ensure the accuracy of the data obtained by the monitoring equipment and monitor the watershed based on accurate monitoring data.
[0010] In an optional implementation of the present application, the current hydrological and water quality monitoring data is corrected based on the target data correction model to obtain the target hydrological and water quality monitoring data, including:
[0011] Obtain target data to calibrate the model;
[0012] Performing data preprocessing on the current hydrological and water quality monitoring data to obtain the preprocessed current hydrological and water quality monitoring data; the data preprocessing includes at least one of missing value processing and data standardization;
[0013] The preprocessed current hydrological and water quality monitoring data is input into the target data correction model, the target data correction model extracts features from the preprocessed current hydrological and water quality monitoring data, identifies the extracted features, and outputs the target hydrological and water quality monitoring data.
[0014] The hydrological and water quality online monitoring information fusion method provided in the embodiment of the present application obtains a target data correction model, performs data preprocessing on the current hydrological and water quality monitoring data, thereby removing impurities in the current hydrological and water quality monitoring data, and obtaining the preprocessed current hydrological and water quality monitoring data. The preprocessed current hydrological and water quality monitoring data is input into the target data correction model, and the target data correction model extracts features from the preprocessed current hydrological and water quality monitoring data, identifies the extracted features, and outputs the target hydrological and water quality monitoring data, thereby ensuring the accuracy of the output target hydrological and water quality monitoring data.
[0015] In an optional implementation of the present application, obtaining a target data correction model includes:
[0016] Obtaining initial data to calibrate the model;
[0017] Based on the target assimilation matrix, the initial data correction model is corrected to obtain the target data correction model.
[0018] The hydrological and water quality online monitoring information fusion method provided in the embodiment of the present application obtains an initial data correction model, corrects the initial data correction model based on the target assimilation matrix, and obtains a target data correction model, thereby ensuring the accuracy of the obtained target data correction model, and further ensuring the accuracy of the target hydrological and water quality monitoring data obtained by performing data correction on the current hydrological and water quality monitoring data based on the target data correction model.
[0019] In an optional implementation of the present application, obtaining an initial data correction model includes:
[0020] Acquire first historical hydrological and water quality monitoring data within a first historical time period collected by a watershed monitoring device in a preset area;
[0021] Clean the first historical hydrological and water quality monitoring data and remove missing values;
[0022] The first historical hydrological and water quality monitoring data after cleaning is processed in groups using different window widths and step sizes to obtain multiple groups of sub-historical hydrological and water quality monitoring data;
[0023] Calculate the mean and variance of each group of historical hydrological and water quality monitoring data;
[0024] Based on the mean and variance, outliers in each group of historical hydrological and water quality monitoring data were deleted;
[0025] Reorganize the sub-historical hydrological and water quality monitoring data of each group after outliers are removed in chronological order to generate the first target historical hydrological and water quality data;
[0026] Acquire first manually collected data corresponding to a watershed in a preset area within a first historical time period;
[0027] Generate training data corresponding to the initial data correction model based on the first target historical hydrological and water quality data and the first manually collected data;
[0028] Based on the training data, an initial data correction model is trained to generate an initial data correction model.
[0029] The method for online monitoring of hydrology and water quality information fusion provided in the embodiment of the present application obtains the first historical hydrology and water quality monitoring data collected by the watershed monitoring equipment in the preset area within the first historical time period; performs data cleaning on the first historical hydrology and water quality monitoring data to remove vacant values; uses different window widths and step sizes to group the cleaned first historical hydrology and water quality monitoring data to obtain multiple groups of sub-historical hydrology and water quality monitoring data; calculates the mean and variance of each group of sub-historical hydrology and water quality monitoring data; based on the mean and variance, deletes the abnormal values in each group of sub-historical hydrology and water quality monitoring data; reorganizes the sub-historical hydrology and water quality monitoring data of each group with the abnormal values deleted in chronological order to generate the first target historical hydrology and water quality data, thereby ensuring the accuracy of the generated first target historical hydrology and water quality data. The first manually collected data corresponding to the watershed in the preset area within the first historical time period is obtained; based on the first target historical hydrology and water quality data and the first manually collected data, the training data corresponding to the initial data correction model is generated; the accuracy of the generated training data is ensured, and the large error of the training data is avoided, resulting in the inaccuracy of the initial data correction model obtained by training. Based on the training data, an initial data correction model is trained to generate an initial data correction model, thereby ensuring the accuracy of the generated initial data correction model.
[0030] In an optional implementation of the present application, training an initial data correction model based on training data to generate an initial data correction model includes:
[0031] Group the training data to obtain training set and validation set;
[0032] The first target historical hydrological and water quality data in the training set is used as input, and the first artificially collected data in the training set is used as the target output. The first target historical hydrological and water quality data is fitted to the first artificially collected data through a linear adjustment factor, and the minimum value of the combination of the weight vector and the slack variable is used as the objective function to train the initial data correction network to obtain a candidate data correction model;
[0033] Among them, the objective function is:
[0034]
[0035] Among them, for the training samples in the training set, there are:
[0036] Yw·(aX+b)≤ε+ξ
[0037] Among them, X represents the first target historical hydrological and water quality data in the training set, Y represents the first manually collected data in the training set; a and b are linear adjustment factors, w is the weight vector, ε is the error indicator parameter, and ξ is the relaxation variable;
[0038] Using the validation set and the error indicator parameter to validate the candidate data correction model, and determine the accuracy of the candidate data correction model;
[0039] If the accuracy of the candidate data correction model is greater than or equal to a preset accuracy threshold, the candidate data correction model is determined as the initial data correction model;
[0040] If the accuracy of the candidate data correction model is less than the preset accuracy threshold, the candidate data correction model is trained again using the training set until the accuracy of the candidate data correction model is greater than or equal to the preset accuracy threshold, and the candidate data correction model is determined as the initial data correction model.
[0041] The hydrological and water quality online monitoring information fusion method provided in the embodiment of the present application groups the training data to obtain a training set and a validation set; the first target historical hydrological and water quality data in the training set is used as input, and the first manually collected data in the training set is used as the target output, and the first target historical hydrological and water quality data is fitted to the first manually collected data through a linear adjustment factor, and the initial data correction network is trained with the minimum value of the combination of the weight vector and the slack variable as the objective function to obtain a candidate data correction model, thereby ensuring the accuracy of the obtained candidate data correction model. The candidate data correction model is verified by using the validation set and the error indicator parameters to determine the accuracy of the candidate data correction model; if the accuracy of the candidate data correction model is greater than or equal to the preset accuracy threshold, the candidate data correction model is determined as the initial data correction model; if the accuracy of the candidate data correction model is less than the preset accuracy threshold, the candidate data correction model is trained again using the training set until the accuracy of the candidate data correction model is greater than or equal to the preset accuracy threshold, and the candidate data correction model is determined as the initial data correction model, thereby ensuring that the accuracy of the initial data correction model is high, thereby ensuring the accuracy of the target hydrological and water quality monitoring data corrected based on the initial data correction model.
[0042] In an optional implementation of the present application, based on the target assimilation matrix, the initial data correction model is corrected to obtain the target data correction model, including:
[0043] Acquire the second historical hydrological and water quality monitoring data in the second historical time period collected by the watershed monitoring equipment in the preset area; the first historical time period is earlier than the second historical time period,
[0044] Correcting the second historical hydrological and water quality monitoring data using the initial data correction model to generate second target hydrological and water quality data;
[0045] Acquire second manually collected data corresponding to the watershed in the preset area within the second historical time period;
[0046] Based on the difference between the second target hydrological and water quality data and the second artificially collected data, a cost function is established; the cost function includes a target assimilation matrix;
[0047] The minimum value of the cost function is solved using a preset method, and the target assimilation matrix is calculated;
[0048] Based on the target assimilation matrix, the initial data correction model is corrected to obtain the target data correction model.
[0049] The method for online monitoring of hydrology and water quality information fusion provided in the embodiment of the present application obtains the second historical hydrology and water quality monitoring data collected by the watershed monitoring equipment in the preset area within the second historical time period; uses the initial data correction model to correct the second historical hydrology and water quality monitoring data to generate the second target hydrology and water quality data, thereby ensuring the accuracy of the generated target hydrology and water quality data. The second manually collected data corresponding to the watershed in the preset area within the second historical time period is obtained; based on the difference between the second target hydrology and water quality data and the second manually collected data, a cost function is established to ensure the accuracy of the established cost function. The minimum value of the cost function is solved by the preset method, and the target assimilation matrix is calculated to ensure the accuracy of the generated target assimilation matrix. Based on the target assimilation matrix, the initial data correction model is corrected to obtain the target data correction model to ensure the accuracy of the generated target data correction model, thereby ensuring the accuracy of the current hydrology and water quality monitoring data based on the target data correction model to obtain the target hydrology and water quality monitoring data.
[0050] In an optional embodiment of the present application, the target assimilation matrix includes a correction matrix and a deviation matrix, and the cost function is expressed using the following formula:
[0051]
[0052] Among them, x k is the second target hydrological and water quality data, y k is the second manually collected data, k represents each data type in the second target hydrological and water quality data and the second manually collected data; k is the correction matrix, and P is the deviation matrix.
[0053] In the hydrological and water quality online monitoring information fusion method provided in the embodiment of the present application, the target assimilation matrix includes a correction matrix and a deviation matrix, and the cost function is expressed by the following formula: The accuracy of the obtained cost function is guaranteed.
[0054] In an optional implementation of the present application, a preset method is used to solve the minimum value of the cost function and calculate the target assimilation matrix, including:
[0055] converting the difference between the second target hydrological and water quality data and the second manually collected data into a binary target value;
[0056] Converting the cost function into an objective function based on a binary target value;
[0057] Solving the objective function using a preset method to obtain a first result;
[0058] The first result is restored and the target assimilation matrix is calculated.
[0059] The hydrological and water quality online monitoring information fusion method provided in the embodiment of the present application converts the difference between the second target hydrological and water quality data and the second manually collected data into a binary target value; based on the binary target value, the cost function is converted into an objective function, thereby ensuring the accuracy of the converted objective function. The objective function is solved using a preset method to obtain a first result, thereby ensuring the accuracy of the first result. The first result is restored to calculate the target assimilation matrix, thereby ensuring the accuracy of the target assimilation matrix.
[0060] In an optional embodiment of the present application, the cost function is converted into an objective function based on a binary target value, including:
[0061] Extract the quadratic term and the second term coefficient corresponding to the quadratic term from the cost function, and construct a quadratic term matrix based on the quadratic term and the second term coefficient corresponding to the quadratic term;
[0062] Extract the linear term and the linear term coefficient corresponding to the linear term from the cost function, and construct a linear term vector based on the linear term and the linear term coefficient corresponding to the linear term;
[0063] Construct the objective function based on the quadratic term matrix and the linear term vector;
[0064] Among them, the objective function is
[0065] H(d)=d T QD T d
[0066] in, Q is the quadratic term matrix and c is the linear term vector.
[0067] The hydrological and water quality online monitoring information fusion method provided in the embodiment of the present application extracts the quadratic term and the second term coefficient corresponding to the quadratic term from the cost function, and constructs a quadratic term matrix based on the quadratic term and the second term coefficient corresponding to the quadratic term, thereby ensuring the accuracy of the constructed quadratic term matrix. The linear term and the linear term coefficient corresponding to the linear term are extracted from the cost function, and the linear term vector is constructed based on the linear term and the linear term coefficient corresponding to the linear term, thereby ensuring the accuracy of the constructed linear term vector, and the objective function is constructed based on the quadratic term matrix and the linear term vector, thereby ensuring the accuracy of the constructed objective function.
[0068] In an optional implementation of the present application, based on the target assimilation matrix, the initial data correction model is corrected to obtain the target data correction model, including:
[0069] The linear adjustment factor in the initial data correction model is corrected using the following formula to obtain the target data correction model:
[0070] a'=α1O k a+β1Pa
[0071] b'=α2O k b+β2Pb
[0072] Among them, a and b are the linear adjustment factors in the initial data correction model, a' and b' are the linear adjustment factors in the corrected target data correction model, α1, α2, β1, β2 are weight coefficients, Ok is the correction matrix, and P is the deviation matrix.
[0073] The hydrological and water quality online monitoring information fusion method provided in the embodiment of the present application uses the formula a'=
[0074] α1O k a+β1Pa; b'=α2O k b+β2Pb; correct the linear adjustment factor in the initial data correction model to obtain the target data correction model, thereby ensuring the accuracy of the obtained target data correction model.
[0075] In a second aspect, an embodiment of the present invention provides a hydrological and water quality online monitoring information fusion device, the device comprising:
[0076] An acquisition module is used to obtain the current hydrological and water quality monitoring data sent by the watershed monitoring equipment in the preset area;
[0077] A correction module is used to correct the current hydrological and water quality monitoring data based on a target data correction model to obtain target hydrological and water quality monitoring data; the target data correction model is obtained by assimilation correction of the initial data correction model, and the initial data correction model is obtained by training based on the training data;
[0078] The early warning module is used to issue early warnings for river basins in a preset area based on target hydrological and water quality monitoring data.
[0079] The method for online monitoring of hydrology and water quality information fusion provided in the embodiment of the present application obtains the current hydrology and water quality monitoring data sent by the watershed monitoring equipment in the preset area; performs data correction on the current hydrology and water quality monitoring data based on the target data correction model to obtain the target hydrology and water quality monitoring data, thereby ensuring the accuracy of the generated target hydrology and water quality monitoring data. Based on the target hydrology and water quality monitoring data, an early warning is issued for the watershed in the preset area, thereby ensuring the accuracy of the early warning for the watershed in the preset area. It solves the problem in the prior art that sensors in the natural environment are easily disturbed by factors such as bad weather, biological pollution, and water impurities, are difficult to maintain and calibrate, and the collected data usually has errors. It solves the problem of how to ensure the accuracy of the data obtained by the monitoring equipment and monitor the watershed based on accurate monitoring data.
[0080] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for online hydrological and water quality monitoring information fusion of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0081] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for online monitoring information fusion of hydrology and water quality according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0083] Figure 1 is a schematic flow chart of a method for online monitoring of hydrological and water quality information according to some embodiments of the present invention;
[0084] Figure 2 is a flow chart of another method for online monitoring of hydrological and water quality information fusion according to some embodiments of the present invention;
[0085] Figure 3 is a structural block diagram of a hydrological and water quality online monitoring information fusion device according to an embodiment of the present invention;
[0086] Figure 4 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0087] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0088] It should be noted that the method for online monitoring information fusion of hydrology and water quality provided in the embodiment of the present application, its execution subject can be a device for online monitoring information fusion of hydrology and water quality, and the device for online monitoring information fusion of hydrology and water quality can be realized as part or all of an electronic device through software, hardware, or a combination of software and hardware, wherein the electronic device can be a server or a terminal, and can also be a processing device integrated in the monitoring device, wherein the server in the embodiment of the present application can be a single server, or a server cluster composed of multiple servers, and the terminal in the embodiment of the present application can be a smart phone, a personal computer, a tablet computer, a wearable device, and other intelligent hardware devices such as an intelligent robot. In the following method embodiments, the execution subject is an electronic device as an example for explanation.
[0089] According to an embodiment of the present invention, an embodiment of a method for online monitoring information fusion of hydrology and water quality is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0090] In this embodiment, a method for fusion of hydrological and water quality online monitoring information is provided, which can be used in the above-mentioned electronic equipment. Figure 1 is a flow chart of a method for online monitoring of hydrological and water quality information according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0091] Step S101, obtaining current hydrological and water quality monitoring data sent by watershed monitoring equipment in a preset area.
[0092] Specifically, the electronic device can obtain the current hydrological and water quality monitoring data sent by the watershed monitoring equipment in the preset area based on the communication connection with the watershed monitoring equipment in the preset area.
[0093] Among them, the current hydrological and water quality monitoring data include but are not limited to water level, flow, flow velocity, rainfall, evaporation, total phosphorus, total nitrogen, ammonia nitrogen, chlorophyll-a and other indicators.
[0094] Among them, the watershed monitoring equipment can be a real-time online collection device.
[0095] Step S102, performing data correction on current hydrological and water quality monitoring data based on the target data correction model to obtain target hydrological and water quality monitoring data.
[0096] The target data correction model is obtained after assimilation correction of the initial data correction model, and the initial data correction model is obtained by training based on the training data.
[0097] Specifically, the electronic device can input the current hydrological and water quality monitoring data into the target data correction model, correct the current hydrological and water quality monitoring data based on the target data correction model, and obtain the target hydrological and water quality monitoring data.
[0098] Among them, the target data correction model can be any one of a support vector machine, a random forest, a radial basis function (RBF) network, a feedforward neural network (FFNN), a convolutional neural network (CNN), a deconvolutional neural network (DN), a deep convolutional inverse graphics network (DCIGN), a generative adversarial network (GAN), a recurrent neural network (RNN), a long / short term memory network (LSTM), a deep residual network (DRN) and an extreme learning machine (ELM). The embodiment of the present application does not specifically limit the target data correction model.
[0099] This step will be described in detail below.
[0100] Step S103: Based on the target hydrological and water quality monitoring data, early warning is issued for the river basin in the preset area.
[0101] Optionally, the electronic device can compare various data in the target hydrological and water quality monitoring data with preset data thresholds, determine various warning data in the target hydrological and water quality monitoring data that exceed the preset data thresholds, and output warning information and the reason for the warning based on inputting various warning data into the first preset warning model.
[0102] Optionally, the electronic device may also directly input the target hydrological and water quality data into a second preset early warning model, which extracts features from the target hydrological and water quality data and outputs early warning information based on the extracted features. Exemplary examples may include sending alarm information to relevant departments, issuing warning notices, etc.
[0103] Optionally, the electronic device can also continuously monitor hydrological and water quality data and early warning results, and evaluate and improve the preset early warning model. According to real-time feedback and adjustment of model parameters, the accuracy of prediction and the reliability of early warning can be improved.
[0104] Among them, the preset warning model can be a decision tree, support vector machine, neural network or regression model, etc., and the embodiments of the present application do not specifically limit the preset warning model. The preset warning model can be trained using historical hydrological and water quality monitoring data, and cross-validation and other techniques can be used to evaluate the performance and generalization ability of the model. Ensure the accuracy and stability of the preset warning model in different time periods and locations, and then set warning thresholds for different hydrological and water quality indicators based on expert knowledge, regulatory standards or historical data. The warning threshold should match the natural variation of the warning indicator and the risk level of hydrological and water quality.
[0105] The method for online monitoring of hydrology and water quality information fusion provided in the embodiment of the present application obtains the current hydrology and water quality monitoring data sent by the watershed monitoring equipment in the preset area; performs data correction on the current hydrology and water quality monitoring data based on the target data correction model to obtain the target hydrology and water quality monitoring data, thereby ensuring the accuracy of the generated target hydrology and water quality monitoring data. Based on the target hydrology and water quality monitoring data, an early warning is issued for the watershed in the preset area, thereby ensuring the accuracy of the early warning for the watershed in the preset area. It solves the problem in the prior art that sensors in the natural environment are easily disturbed by factors such as bad weather, biological pollution, and water impurities, are difficult to maintain and calibrate, and the collected data usually has errors. It solves the problem of how to ensure the accuracy of the data obtained by the monitoring equipment and monitor the watershed based on accurate monitoring data.
[0106] In this embodiment, a method for fusion of hydrological and water quality online monitoring information is provided, which can be used in the above-mentioned electronic equipment. Figure 2 is a flow chart of a method for online monitoring of hydrological and water quality information according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0107] Step S201, obtaining current hydrological and water quality monitoring data sent by the watershed monitoring equipment in the preset area.
[0108] For more information about this step, see Figure 1 The introduction of step S101 is not repeated here.
[0109] Step S202, performing data correction on the current hydrological and water quality monitoring data based on the target data correction model to obtain target hydrological and water quality monitoring data.
[0110] Specifically, the above step S202 may include the following steps:
[0111] Step S2021, obtaining a target data correction model.
[0112] Specifically, the electronic device may receive a target data correction model input by a user, and may also receive a target data correction model sent by other devices.
[0113] Specifically, the above step S2021 may include the following steps:
[0114] Step a1, obtaining an initial data correction model.
[0115] Specifically, the above step a1 may include the following steps:
[0116] Step a11, obtaining first historical hydrological and water quality monitoring data within a first historical time period collected by a watershed monitoring device in a preset area.
[0117] Specifically, the electronic device can search the storage space for the first historical hydrological and water quality monitoring data within the first historical time period collected by the river basin monitoring equipment in the preset area, and can also receive the first historical hydrological and water quality monitoring data within the first historical time period collected by the river basin monitoring equipment in the preset area input by the user, and can also receive the first historical hydrological and water quality monitoring data within the first historical time period collected by the river basin monitoring equipment in the preset area sent by other devices, such as monitoring equipment.
[0118] The embodiment of the present application does not specifically limit the manner in which the electronic device obtains the first historical hydrological and water quality monitoring data within a first historical time period collected by a watershed monitoring device in a preset area.
[0119] The first historical time period may be one year ago, half a year ago, or any other time period. The embodiment of the present application does not specifically limit the first historical time period.
[0120] Step a12, cleaning the first historical hydrological and water quality monitoring data to remove missing values.
[0121] Specifically, the electronic device cleans the first historical hydrological and water quality monitoring data to remove missing values.
[0122] Step a13, using different window widths and step sizes to group the cleaned first historical hydrological and water quality monitoring data to obtain multiple groups of sub-historical hydrological and water quality monitoring data.
[0123] Specifically, the electronic device may use different window widths and step lengths to group the cleaned first historical hydrological and water quality monitoring data to obtain multiple groups of sub-historical hydrological and water quality monitoring data.
[0124] Exemplarily, the electronic device may use a sliding window to segment the first historical hydrological and water quality monitoring data into n1 groups, using different window widths and step sizes during segmentation.
[0125] The window width L refers to the number of data points corresponding to each group of data, which includes at least the following three types, which are divided into the data volume corresponding to one week, one month, and one quarter; the step size dL refers to the number of data points moved each time, which includes at least the following three types, which are the data volume of 3 days, 15 days, and 30 days.
[0126] For example, if water level monitoring data X wl The full period is 90 days; if L=30 days and dL=10 days, then there are 7 groups of data: 0-30; 10-40; 20-50; 30-60; 40-70; 50-80; 60-90 days; n1=7.
[0127] Step a14, calculating the mean and variance of each group of historical hydrological and water quality monitoring data.
[0128] Specifically, the electronic device can calculate the mean and variance of each group of sub-historical hydrological and water quality monitoring data.
[0129] The formula for calculating the mean can be as follows:
[0130]
[0131] The formula for calculating variance can be as follows:
[0132]
[0133] Among them, X j is any hydrological and water quality data in each group of historical hydrological and water quality monitoring data, such as water level, flow, flow rate, rainfall, evaporation, total phosphorus, total nitrogen, ammonia nitrogen, chlorophyll-a, etc. L is the number of data of any hydrological and water quality data in each group of historical hydrological and water quality monitoring data, is the mean value corresponding to each group of historical hydrological and water quality monitoring data, s i is the variance corresponding to each group of historical hydrological and water quality monitoring data
[0134] Step a15, based on the mean and variance, delete the outliers in each group of sub-historical hydrological and water quality monitoring data.
[0135] Specifically, the electronic device can calculate the normal value range corresponding to each group of sub-historical hydrological and water quality monitoring data based on the mean and variance corresponding to each group of sub-historical hydrological and water quality monitoring data. Then, each group of sub-historical hydrological and water quality monitoring data is compared with the maximum and minimum values in the corresponding normal value range, and the sub-historical hydrological and water quality monitoring data outside the normal value range is determined as an abnormal value, and then the abnormal value in each group of sub-historical hydrological and water quality monitoring data is deleted.
[0136] For example, if there is Then the electronic device determines X j Wherein, n can be 2, 3, or other values, and the embodiment of the present application does not specifically limit n.
[0137] In an optional implementation of the present application, after deleting the abnormal values in each group of sub-historical hydrological and water quality monitoring data, the electronic device can recalculate the mean and variance corresponding to the remaining data based on the remaining data corresponding to each group of sub-historical hydrological and water quality monitoring data, and then calculate the normal value range corresponding to each group of remaining data based on the mean and variance corresponding to the remaining data. Then, the maximum and minimum values in the normal value range corresponding to each group of remaining data are compared with the corresponding maximum and minimum values in the normal value range corresponding to each group of remaining data, and the remaining data outside the normal value range corresponding to the remaining data is determined as an abnormal value, and then the abnormal value in each group of remaining data is deleted.
[0138] The electronic device may cycle the above steps a preset number of times, where the preset number may be 3 times or 4 times. The embodiment of the present application does not specifically limit the preset number.
[0139] Step a16, reorganizing each group of sub-historical hydrological and water quality monitoring data with outliers deleted in chronological order to generate first target historical hydrological and water quality data.
[0140] Specifically, the electronic device may reorganize the groups of sub-historical hydrological and water quality monitoring data with abnormal values deleted in chronological order to generate first target historical hydrological and water quality data, wherein the generated first target historical hydrological and water quality data may be represented by X1.
[0141] Step a17, obtaining first manually collected data corresponding to a watershed in a preset area within a first historical time period.
[0142] Specifically, the electronic device can receive the first manually collected data corresponding to the watershed in the preset area within the first historical time period input by the user, and can also receive the first manually collected data corresponding to the watershed in the preset area within the first historical time period sent by other devices, and can also receive the first manually collected data corresponding to the watershed in the preset area within the first historical time period sent by other devices.
[0143] The embodiment of the present application does not specifically limit the manner in which the electronic device obtains the first manually collected data corresponding to the watershed in the preset area within the first historical time period.
[0144] Among them, it should be noted that the first manually collected data is more accurate than the first target historical hydrological and water quality data.
[0145] Step a18, generating training data corresponding to the initial data correction model based on the first target historical hydrological and water quality data and the first manually collected data.
[0146] Specifically, the electronic device can generate training data corresponding to the initial data correction model based on the first target historical hydrological and water quality data and the first manually collected data, wherein the first manually collected data can be used as standard data corresponding to the first target historical hydrological and water quality data.
[0147] Step a19, based on the training data, train the initial data correction network to generate an initial data correction model.
[0148] Specifically, the above step a19 may include the following steps:
[0149] Step a191, group the training data to obtain a training set and a validation set.
[0150] Specifically, the electronic device may group the training data based on a preset ratio to obtain a training set and a validation set.
[0151] Exemplarily, the training set may account for 80% of the training data, and the validation set may account for 20% of the training data; the training set may account for 70% of the training data, and the validation set may account for 30% of the training data.
[0152] Step a192, the first target historical hydrological and water quality data in the training set is used as input, and the first artificially collected data in the training set is used as the target output. The first target historical hydrological and water quality data is fit to the first artificially collected data through a linear adjustment factor, and the minimum value of the combination of the weight vector and the slack variable is used as the objective function to train the initial data correction network to obtain a candidate data correction model.
[0153] Among them, the objective function is:
[0154]
[0155] Among them, for the training samples in the training set, there are:
[0156] Yw·(aX+b)≤ε+ξ (4)
[0157] Among them, X represents the first target historical hydrological and water quality data in the training set, Y represents the first manually collected data in the training set; a and b are linear adjustment factors, w is the weight vector, ε is the error indicator parameter, and ξ is the relaxation variable.
[0158] Specifically, the electronic device can input the training set into the initial data correction network, and the initial data correction network extracts features from the first target historical hydrological and water quality data in the training set, and then corrects the first target historical hydrological and water quality data based on the extracted features, and outputs a first correction result. Then the electronic device calculates the first difference between the first correction result and the first manually collected data based on the objective function, and then adjusts the linear adjustment factor parameter according to the first difference, and calculates the value of the objective function based on the adjusted linear adjustment factor parameter. Then, based on the adjusted model parameters, the first target historical hydrological and water quality data is corrected again, and a second correction result is output. Then the electronic device calculates the second difference between the second correction result and the first manually collected data based on the objective function, and adjusts the linear adjustment factor parameter again based on the second difference, and calculates the value of the objective function based on the adjusted linear adjustment factor parameter. This cycle is repeated until the minimum value of the objective function is obtained, and the candidate data correction model is obtained.
[0159] Step a193, using the validation set and the error indicator parameter to validate the candidate data correction model to determine the accuracy of the candidate data correction model.
[0160] Specifically, the electronic device may utilize the verification set and the error indicator parameter to verify the candidate data correction model and determine the accuracy of the candidate data correction model.
[0161] Among them, the error index parameters can be parameters such as mean square error (MSE), mean absolute error (MAE), determination coefficient (R2) and Nash coefficient (NSE). The embodiment of the present application does not specifically limit the error index parameters.
[0162] Step a194: if the accuracy of the candidate data correction model is greater than or equal to a preset accuracy threshold, the candidate data correction model is determined as the initial data correction model.
[0163] Specifically, the electronic device may compare the accuracy of the candidate data correction model with a preset accuracy threshold, and if the accuracy of the candidate data correction model is greater than or equal to the preset accuracy threshold, determine the candidate data correction model as the initial data correction model.
[0164] Step a195, if the accuracy of the candidate data correction model is less than the preset accuracy threshold, the candidate data correction model is trained again using the training set until the accuracy of the candidate data correction model is greater than or equal to the preset accuracy threshold, and the candidate data correction model is determined as the initial data correction model.
[0165] Specifically, if the accuracy of the candidate data correction model is less than a preset accuracy threshold, the candidate data correction model is trained again using the training set until the accuracy of the candidate data correction model is greater than or equal to the preset accuracy threshold, and the candidate data correction model is determined as the initial data correction model.
[0166] Step a2: Based on the target assimilation matrix, the initial data correction model is corrected to obtain the target data correction model.
[0167] Specifically, the above step a2 may include the following steps:
[0168] Step a21, obtaining the second historical hydrological and water quality monitoring data within the second historical time period collected by the watershed monitoring equipment in the preset area.
[0169] Among them, the first historical time period is earlier than the second historical time period.
[0170] Specifically, the electronic device can search the storage space for the second historical hydrological and water quality monitoring data within the second historical time period collected by the river basin monitoring equipment in the preset area, and can also receive the second historical hydrological and water quality monitoring data within the second historical time period collected by the river basin monitoring equipment in the preset area input by the user, and can also receive the second historical hydrological and water quality monitoring data within the second historical time period collected by the river basin monitoring equipment in the preset area sent by other devices, such as monitoring equipment.
[0171] The embodiment of the present application does not specifically limit the manner in which the electronic device obtains the second historical hydrological and water quality monitoring data within the second historical time period collected by the watershed monitoring equipment in the preset area.
[0172] The second historical time period may be one month ago, one week ago, or other time periods. The embodiment of the present application does not specifically limit the second historical time period.
[0173] Step a22, using the initial data correction model to correct the second historical hydrological and water quality monitoring data to generate second target hydrological and water quality data.
[0174] Specifically, the electronic device can use the initial data correction model to correct the second historical hydrological and water quality monitoring data to generate second target hydrological and water quality data.
[0175] Step a23, obtaining second manually collected data corresponding to the watershed in the preset area within the second historical time period.
[0176] Specifically, the electronic device can receive the second manually collected data corresponding to the watershed in the preset area within the second historical time period input by the user, and can also receive the second manually collected data corresponding to the watershed in the preset area within the second historical time period sent by other devices, and can also receive the second manually collected data corresponding to the watershed in the preset area within the second historical time period sent by other devices.
[0177] The embodiment of the present application does not specifically limit the manner in which the electronic device obtains the second manually collected data corresponding to the watershed in the preset area within the second historical time period.
[0178] Step a24, establishing a cost function based on the difference between the second target hydrological and water quality data and the second manually collected data.
[0179] Among them, the cost function includes the target assimilation matrix.
[0180] Among them, the target assimilation matrix includes the correction matrix and the deviation matrix, and the cost function is expressed by the following formula:
[0181]
[0182] Among them, x k is the second target hydrological and water quality data, y k is the second manually collected data, k represents each data type in the second target hydrological and water quality data and the second manually collected data; k is the correction matrix, and P is the deviation matrix.
[0183] Specifically, the electronic device may calculate the difference between the second target hydrological and water quality data and the second manually collected data, and then establish a cost function based on the difference between the second target hydrological and water quality data and the second manually collected data.
[0184] Step a25, using a preset method to solve the minimum value of the cost function and calculate the target assimilation matrix.
[0185] Specifically, the above step a25 may include the following steps:
[0186] Step a251, converting the difference between the second target hydrological and water quality data and the second manually collected data into a binary target value.
[0187] Specifically, the electronic device can convert the difference between the second target hydrological and water quality data and the second manually collected data into a binary target value, as shown in the following formula:
[0188]
[0189] Step a252, converting the cost function into an objective function based on the binary target value.
[0190] The above step a252 may include the following steps:
[0191] Step a2521, extract the quadratic term and the second term coefficient corresponding to the quadratic term from the cost function, and construct a quadratic term matrix based on the quadratic term and the second term coefficient corresponding to the quadratic term.
[0192] Specifically, the electronic device may extract the quadratic term and the second term coefficient corresponding to the quadratic term from the cost function, and construct a quadratic term matrix based on the quadratic term and the second term coefficient corresponding to the quadratic term.
[0193] Step a2522, extract the linear term and the linear term coefficient corresponding to the linear term from the cost function, and construct a linear term vector based on the linear term and the linear term coefficient corresponding to the linear term.
[0194] Specifically, the electronic device may extract the linear term and the linear term coefficient corresponding to the linear term from the cost function, and construct a linear term vector based on the linear term and the linear term coefficient corresponding to the linear term.
[0195] Step a2523, construct the objective function based on the quadratic matrix and the linear matrix.
[0196] Specifically, the electronic device constructs an objective function based on a quadratic matrix and a linear matrix.
[0197] Among them, the objective function is:
[0198] H(d)=d T QD T d(7)
[0199] in, Q is the quadratic term matrix and c is the linear term vector.
[0200] For example, if J(d) accepts a binary vector d of length N as input and returns a real value as output, then N binary variables d1, d2, ..., dN can be defined.
[0201] Convert the function J(d) into QUBO form:
[0202] According to the definition of function J(d), it is converted into QUBO form. The goal of QUBO form is to minimize or maximize the objective function. For minimizing the objective function J(d), it can be converted into minimizing a QUBO formula. The QUBO formula consists of two parts: linear terms and quadratic terms.
[0203] Linear term: Convert the linear part of the function J(d) into QUBO form. For each input variable d_i, multiply it by a coefficient c_i to get a linear term (c_i*d_i). Then, square it to get a quadratic term (c_i*d_i)^2.
[0204] Quadratic term: Convert the quadratic part of the function J(d) into QUBO form. For each pair of input variables d_i and d_j, multiply it by a coefficient Q_ij to get a quadratic term (Q_ij*d_i*d_j).
[0205] The final QUBO formula is in the form of: QUBO = linear term + quadratic term.
[0206] Step a253, using a preset method to solve the objective function to obtain a first result.
[0207] Specifically, the electronic device may solve the objective function using a preset method to obtain a first result.
[0208] The preset method may be any one of the methods of using a D-Wave solver for solving, using an IBM Qiski solver for solving, or using other solvers for solving.
[0209] Step a254, restore the first result and calculate the target assimilation matrix.
[0210] Specifically, the electronic device may restore the first result according to the conversion relationship between the cost function and the objective function, and calculate the target assimilation matrix.
[0211] Step a26, based on the target assimilation matrix, correct the initial data correction model to obtain the target data correction model.
[0212] Specifically, the electronic device can use the following formula to correct the linear adjustment factor in the initial data correction model to obtain the target data correction model:
[0213] a'=α1O k a+β1Pa (8)
[0214] b'=α2O k b+β2Pb (9)
[0215] Among them, a and b are the linear adjustment factors in the initial data correction model, a' and b' are the linear adjustment factors in the corrected target data correction model, α1, α2, β1, β2 are weight coefficients, Ok is the correction matrix, and P is the deviation matrix.
[0216] After the electronic device calculates a' and b', it uses a' and b to replace the linear adjustment factors a and b in the initial data correction model to obtain the target data correction model.
[0217] Step S2022, preprocessing the current hydrological and water quality monitoring data to obtain preprocessed current hydrological and water quality monitoring data.
[0218] The data preprocessing includes at least one of missing value processing and data normalization.
[0219] Specifically, the electronic device can perform data recognition on the current hydrological and water quality monitoring data, propose abnormal values and duplicate values in the current hydrological and water quality monitoring data, and fill in missing values, and then normalize the current hydrological and water quality monitoring data to obtain the pre-processed current hydrological and water quality monitoring data.
[0220] Step S2023, input the preprocessed current hydrological and water quality monitoring data into the target data correction model, the target data correction model extracts features from the preprocessed current hydrological and water quality monitoring data, identifies the extracted features, and outputs the target hydrological and water quality monitoring data.
[0221] Specifically, the electronic device can input the preprocessed current hydrological and water quality monitoring data into the target data correction model, the target data correction model extracts features from the preprocessed current hydrological and water quality monitoring data, identifies the extracted features, and outputs the target hydrological and water quality monitoring data.
[0222] Step S203: Based on the target hydrological and water quality monitoring data, early warning is issued for the river basin in the preset area.
[0223] For more information about this step, see Figure 1 The introduction of step S103 is not repeated here.
[0224] The hydrological and water quality online monitoring information fusion method provided in this embodiment obtains the first historical hydrological and water quality monitoring data collected by the watershed monitoring equipment in the preset area within the first historical time period; performs data cleaning on the first historical hydrological and water quality monitoring data to remove vacant values; uses different window widths and step sizes to group the cleaned first historical hydrological and water quality monitoring data to obtain multiple groups of sub-historical hydrological and water quality monitoring data; calculates the mean and variance of each group of sub-historical hydrological and water quality monitoring data; based on the mean and variance, deletes the abnormal values in each group of sub-historical hydrological and water quality monitoring data; reorganizes the sub-historical hydrological and water quality monitoring data of each group with abnormal values deleted in chronological order to generate the first target historical hydrological and water quality data, thereby ensuring the accuracy of the generated first target historical hydrological and water quality data. The first manually collected data corresponding to the watershed in the preset area within the first historical time period is obtained; based on the first target historical hydrological and water quality data and the first manually collected data, the training data corresponding to the initial data correction model is generated; the accuracy of the generated training data is ensured, and the large error of the training data is avoided, resulting in the inaccuracy of the initial data correction model obtained by training.
[0225] Then, the training data is grouped to obtain a training set and a validation set; the first target historical hydrological and water quality data in the training set is used as input, and the first artificially collected data in the training set is used as the target output. The first target historical hydrological and water quality data is fitted to the first artificially collected data through a linear adjustment factor, and the minimum value of the combination of the weight vector and the slack variable is used as the objective function to train the initial data correction network to obtain a candidate data correction model, thereby ensuring the accuracy of the obtained candidate data correction model. Using the validation set, the candidate data correction model is verified using the error indicator parameter to determine the accuracy of the candidate data correction model; if the accuracy of the candidate data correction model is greater than or equal to the preset accuracy threshold, the candidate data correction model is determined as the initial data correction model; if the accuracy of the candidate data correction model is less than the preset accuracy threshold, the candidate data correction model is trained again using the training set until the accuracy of the candidate data correction model is greater than or equal to the preset accuracy threshold, and the candidate data correction model is determined as the initial data correction model, thereby ensuring that the accuracy of the obtained initial data correction model is high.
[0226] Next, obtain the second historical hydrological and water quality monitoring data collected by the watershed monitoring equipment in the preset area in the second historical time period; use the initial data correction model to correct the second historical hydrological and water quality monitoring data to generate the second target hydrological and water quality data, thereby ensuring the accuracy of the generated target hydrological and water quality data. Obtain the second manually collected data corresponding to the watershed in the preset area in the second historical time period; establish a cost function based on the difference between the second target hydrological and water quality data and the second manually collected data, thereby ensuring the accuracy of the established cost function. Convert the difference between the second target hydrological and water quality data and the second manually collected data into a binary target value. Extract the quadratic term and the second term coefficient corresponding to the quadratic term from the cost function, and construct a quadratic term matrix based on the quadratic term and the second term coefficient corresponding to the quadratic term, thereby ensuring the accuracy of the constructed quadratic term matrix. Extract the linear term and the linear term coefficient corresponding to the linear term from the cost function, and construct a linear term vector based on the linear term and the linear term coefficient corresponding to the linear term, thereby ensuring the accuracy of the constructed linear term vector, and construct an objective function based on the quadratic term matrix and the linear term vector, thereby ensuring the accuracy of the constructed objective function. The objective function is solved by a preset method to obtain a first result, thereby ensuring the accuracy of the first result. The first result is restored to obtain a target assimilation matrix by calculation, thereby ensuring the accuracy of the target assimilation matrix.
[0227] Based on the target assimilation matrix, the linear adjustment factor in the initial data correction model is corrected to obtain the target data correction model, which ensures the accuracy of the obtained target data correction model. This further ensures the accuracy of the target hydrological and water quality monitoring data obtained by correcting the current hydrological and water quality monitoring data based on the target data correction model.
[0228] Then, the current hydrological and water quality monitoring data is preprocessed to remove impurities in the current hydrological and water quality monitoring data, and the preprocessed current hydrological and water quality monitoring data is obtained. The preprocessed current hydrological and water quality monitoring data is input into the target data correction model, and the target data correction model extracts features from the preprocessed current hydrological and water quality monitoring data, identifies the extracted features, and outputs the target hydrological and water quality monitoring data, thereby ensuring the accuracy of the output target hydrological and water quality monitoring data.
[0229] In this embodiment, a hydrological and water quality online monitoring information fusion device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0230] This embodiment provides a hydrological and water quality online monitoring information fusion device, such as Figure 3 As shown, including:
[0231] An acquisition module 301 is used to acquire current hydrological and water quality monitoring data sent by a watershed monitoring device in a preset area;
[0232] The correction module 302 is used to perform data correction on the current hydrological and water quality monitoring data based on the target data correction model to obtain the target hydrological and water quality monitoring data; the target data correction model is obtained by assimilation correction of the initial data correction model, and the initial data correction model is obtained by training based on the training data;
[0233] The early warning module 303 is used to issue early warnings to the watersheds in the preset area based on the target hydrological and water quality monitoring data.
[0234] The hydrological and water quality online monitoring information fusion device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0235] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0236] The embodiment of the present invention also provides an electronic device having the above Figure 3 The hydrological and water quality online monitoring information fusion device shown.
[0237] See also Figure 4 , Figure 4 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0238] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0239] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0240] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of an electronic device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0241] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0242] The electronic device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0243] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0244] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0245] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for online monitoring of hydrological and water quality information fusion, characterized in that: The method comprises: Obtain current hydrological and water quality monitoring data sent by watershed monitoring equipment in the preset area; The current hydrological and water quality monitoring data is corrected based on a target data correction model to obtain target hydrological and water quality monitoring data; the target data correction model is obtained by assimilation correction of an initial data correction model, and the initial data correction model is obtained by training based on training data; Based on the target hydrological and water quality monitoring data, early warning is issued for the river basin within the preset area; The target data correction model is obtained by assimilating and correcting the initial data correction model, and includes: Acquire the initial data correction model; Based on the target assimilation matrix, the initial data correction model is corrected to obtain the target data correction model; The method of correcting the initial data correction model based on the target assimilation matrix to obtain the target data correction model includes: Acquire second historical hydrological and water quality monitoring data within a second historical time period collected by the watershed monitoring equipment in the preset area; Correcting the second historical hydrological and water quality monitoring data using the initial data correction model to generate second target hydrological and water quality data; Acquire second manually collected data corresponding to the watershed in the preset area within the second historical time period; Based on the difference between the second target hydrological and water quality data and the second manually collected data, a cost function is established; the cost function includes the target assimilation matrix; Solving the minimum value of the cost function using a preset method to calculate the target assimilation matrix; Based on the target assimilation matrix, the initial data correction model is corrected to obtain the target data correction model.
2. The method according to claim 1, characterized in that The method of performing data correction on the current hydrological and water quality monitoring data based on the target data correction model to obtain target hydrological and water quality monitoring data includes: Acquire the target data correction model; Performing data preprocessing on the current hydrological and water quality monitoring data to obtain preprocessed current hydrological and water quality monitoring data; the data preprocessing includes at least one of missing value processing and data standardization; The preprocessed current hydrological and water quality monitoring data is input into the target data correction model, and the target data correction model extracts features from the preprocessed current hydrological and water quality monitoring data, identifies the extracted features, and outputs the target hydrological and water quality monitoring data.
3. The method according to claim 1, characterized in that The obtaining of the initial data correction model comprises: Acquire first historical hydrological and water quality monitoring data collected by the watershed monitoring equipment in the preset area within a first historical time period; the first historical time period is earlier than the second historical time period; Performing data cleaning on the first historical hydrological and water quality monitoring data to remove missing values; The first historical hydrological and water quality monitoring data after cleaning is processed in groups using different window widths and step sizes to obtain multiple groups of sub-historical hydrological and water quality monitoring data; Calculate the mean and variance of each group of sub-historical hydrological and water quality monitoring data; Based on the mean and the variance, deleting outliers in each group of the sub-historical hydrological and water quality monitoring data; Reorganize the sub-groups of historical hydrological and water quality monitoring data after the abnormal values are deleted in chronological order to generate the first target historical hydrological and water quality data; Acquire first manually collected data corresponding to the watershed in the preset area within the first historical time period; Generate training data corresponding to the initial data correction model based on the first target historical hydrological and water quality data and the first manually collected data; Based on the training data, an initial data correction network is trained to generate the initial data correction model.
4. The method according to claim 3, characterized in that The step of training an initial data correction network based on the training data to generate the initial data correction model comprises: Grouping the training data to obtain a training set and a validation set; The first target historical hydrological and water quality data in the training set is used as input, the first manually collected data in the training set is used as target output, the first target historical hydrological and water quality data is fitted to the first manually collected data through a linear adjustment factor, and the minimum value of the combination of the weight vector and the slack variable is used as the objective function to train the initial data correction network to obtain a candidate data correction model; Wherein, the objective function is: Among them, for the training samples in the training set, there are: Yw·(aX+b)≤ε+ξ Wherein, X represents the first target historical hydrological and water quality data in the training set, Y represents the first manually collected data in the training set; a and b are the linear adjustment factors, w is the weight vector, ε is the error index parameter, and ξ is the relaxation variable; Using the validation set and an error indicator parameter to validate the candidate data correction model, and determining the accuracy of the candidate data correction model; If the accuracy of the candidate data correction model is greater than or equal to a preset accuracy threshold, determining the candidate data correction model as the initial data correction model; If the accuracy of the candidate data correction model is less than the preset accuracy threshold, the candidate data correction model is trained again using the training set until the accuracy of the candidate data correction model is greater than or equal to the preset accuracy threshold, and the candidate data correction model is determined as the initial data correction model.
5. The method according to claim 1, characterized in that The target assimilation matrix includes a correction matrix and a deviation matrix, and the cost function is expressed using the following formula: Among them, x k is the second target hydrological and water quality data, y k is the second manually collected data, k represents each data type in the second target hydrological and water quality data and the second manually collected data; k is the correction matrix, and P is the deviation matrix.
6. The method according to claim 5, characterized in that The method of solving the minimum value of the cost function by using a preset method to calculate the target assimilation matrix includes: converting the difference between the second target hydrological and water quality data and the second manually collected data into a binary target value; converting the cost function into an objective function based on the binary target value; Solving the objective function using a preset method to obtain a first result; The first result is restored to obtain the target assimilation matrix by calculation.
7. The method according to claim 6, characterized in that The converting the cost function into an objective function based on the binary target value comprises: Extracting a quadratic term and a second coefficient corresponding to the quadratic term from the cost function, and constructing a quadratic term matrix based on the quadratic term and the second coefficient corresponding to the quadratic term; Extracting linear terms and linear term coefficients corresponding to the linear terms from the cost function, and constructing a linear term vector based on the linear terms and the linear term coefficients corresponding to the linear terms; Constructing the objective function based on the quadratic term matrix and the linear term vector; Among them, the objective function is H(d)=d T Qd+c T d in, Q is the quadratic term matrix, and c is the linear term vector.
8. The method according to claim 1, characterized in that The step of correcting the initial data correction model based on the target assimilation matrix to obtain the target data correction model includes: The linear adjustment factor in the initial data correction model is corrected using the following formula to obtain the target data correction model: a'=α1O k a+β1Pa b'=α2O k b+β2Pb Among them, a and b are the linear adjustment factors in the initial data correction model, a' and b' are the linear adjustment factors in the corrected target data correction model, α1, α2, β1, β2 are weight coefficients respectively, Ok is the correction matrix, and P is the deviation matrix.
