Water quality monitoring method and system and electronic equipment
By integrating and predicting water quality information data, the problem of insufficient accuracy of existing water quality monitoring methods is solved, and higher monitoring accuracy and completeness are achieved.
Patent Information
- Application Number
- CN202510096331.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-23
AI Technical Summary
The accuracy of existing water quality monitoring methods is not high enough to meet the needs of users.
By obtaining the water quality information of the point to be measured, data fusion is performed to obtain the first fusion sequence, and water quality prediction is performed based on this, the second fusion sequence is obtained, and finally the water quality of the point to be measured is determined based on both.
The accuracy of water quality monitoring has been improved, and by considering the trend of water quality changes, the monitoring has been made more complete and accurate.
Smart Images

Figure CN120030451A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality monitoring, and in particular to a water quality monitoring method and system, and electronic equipment. Background Art
[0002] Water resources are important resources. Human production and life are inseparable from water resources. In the process of utilizing water resources, it is very important to monitor water quality.
[0003] Most of the water quality monitoring methods in the related art obtain various parameters of the water body to be tested through sensors, and then determine the water quality of the water body to be tested after data processing of the water body parameters.
[0004] However, the accuracy of water quality monitoring methods in related technologies is not high enough to meet the needs of users. Summary of the invention
[0005] The present invention provides a water quality monitoring method and system, and electronic equipment to solve the defect that the water quality monitoring method in the related art is not accurate enough. In the scheme of the present application, two data fusions can be performed from different angles based on the acquired water quality information, so that the integrity of the acquired data is better and the accuracy of water quality monitoring is improved.
[0006] The present invention provides a water quality monitoring method, comprising:
[0007] Obtain water quality information of the test point;
[0008] Performing data fusion on the water quality information to obtain a first fusion sequence;
[0009] Based on the water quality information, predict the water quality of the test point, and perform data fusion on the prediction result to obtain a second fusion sequence;
[0010] The water quality of the test point is determined based on the first fusion sequence and the second fusion sequence.
[0011] According to the water quality monitoring method provided by the present invention, the step of obtaining water quality information of the point to be tested includes:
[0012] Acquire initial data of a plurality of water quality detection nodes, wherein the water quality detection nodes are arranged at the points to be tested;
[0013] Calculating the support of the several water quality detection nodes and constructing a support matrix;
[0014] Based on the support matrix, the support consistency of any water quality detection node to other water quality detection nodes is determined by the following formula (1):
[0015]
[0016] Among them, i represents the i-th water quality detection node, k represents the time when the initial data is obtained, and Z ij (k) represents the support of water quality detection nodes, and n represents the number of water quality detection nodes;
[0017] If it is determined that the support consistency of several water quality detection nodes reaches a set threshold, the water quality information of the point to be tested is determined based on the initial data of the several water quality detection nodes.
[0018] According to the water quality monitoring method provided by the present invention, the step of obtaining water quality information of the test point further includes:
[0019] If it is determined that there is at least one target water quality detection node whose support consistency is lower than a set threshold, the initial data of the target water quality detection node is corrected;
[0020] The initial data of the target water quality detection node is corrected, including:
[0021] The data consistency mean of the i-th water quality parameter detection node at the k-th time is calculated by the following formula (2):
[0022]
[0023] The data consistency variance of the i-th water quality parameter detection node is calculated by the following formula (3):
[0024]
[0025] The data consistency variance of the i-th water quality parameter detection node at the k-th time is calculated by the following formula (4):
[0026]
[0027] The weight value corresponding to the i-th water quality parameter detection node is determined based on the data consistency mean and the data consistency variance through the following formula (5):
[0028]
[0029] The modified initial data of the target water quality detection node is determined based on the weight value by the following formula (6):
[0030]
[0031] According to the water quality monitoring method provided by the present invention, the calculation of the support of the plurality of water quality detection nodes complies with the following formula (7):
[0032]
[0033] Among them, β is the support attenuation factor, and the square root of the self-support of nodes i and j is used to detect water quality parameters. To express;
[0034] Among them, d i (k) is the closeness of the data collected by water quality parameter detection node i multiple times in the entire observation interval, which conforms to the following formula (8):
[0035]
[0036] According to the water quality monitoring method provided by the present invention, the step of performing data fusion on the water quality information to obtain a first fusion sequence includes:
[0037] The water quality information is converted into membership degree through the following formula (9):
[0038]
[0039] Among them, x is the value of the detected water quality parameter, a is the characteristic parameter of the water quality grade, and σ is the characteristic variance of the water quality grade;
[0040] The membership is fused by the following formula (10):
[0041]
[0042] Among them, n is the number of sensors collecting water quality information, and λ is the weight corresponding to the sensor;
[0043] The weight of the sensor can be determined by the following formula (11):
[0044]
[0045] Among them, σ′ is the variance of the sensor detection value;
[0046] The decision-level fusion is performed based on the DS evidence theory algorithm through the following formula (12):
[0047]
[0048] Among them, B and C are power sets 2 φ The elements in φ are an identification frame, which represents the domain set of all possible values. φ is the power set of φ, m1 and m2 are 2 φ The combination of the two different and independent basic probability distributions is the orthogonal sum of the basic probability distributions. Indicates that K is a normalization constant, and K conforms to the following formula (13):
[0049]
[0050] According to the water quality monitoring method provided by the present invention, the water quality of the test point is predicted based on the water quality information, including:
[0051] A grey model is constructed based on the water quality information, and the water quality of the test point is predicted by the grey model.
[0052] According to the water quality monitoring method provided by the present invention, the grey model is constructed based on the water quality information, and the water quality of the test point is predicted by the grey model, including:
[0053] The grey model is constructed by the following formula (14):
[0054]
[0055] Among them, a and q are the development coefficient and grey action of the selected water quality parameters, respectively, and x 0,1 The water quality information;
[0056] The output of the grey model is restored by the following formula (15) to obtain the predicted value of the water quality at the test point:
[0057]
[0058] According to the water quality monitoring method provided by the present invention, the grey model is constructed based on the water quality information, and the water quality of the test point is predicted by the grey model, and then the method further includes:
[0059] Based on the level ratio deviation test method, the grey model is tested by the following formula (16):
[0060]
[0061] If it is determined that the grey model fails the test, the residual sequence is constructed by the following formula (17):
[0062]
[0063] Constructing a grey model based on the residual sequence, and determining a residual correction value based on the grey model of the residual sequence;
[0064] The water quality prediction result of the test point is corrected based on the residual correction value.
[0065] The present invention also provides a water quality monitoring system, comprising:
[0066] An information acquisition unit, used to acquire water quality information of a test point;
[0067] A first fusion unit, used for performing data fusion on the water quality information to obtain a first fusion sequence;
[0068] A second fusion unit is used to predict the water quality of the test point based on the water quality information, and perform data fusion on the prediction result to obtain a second fusion sequence;
[0069] A water quality monitoring unit is used to determine the water quality of the test point based on the first fusion sequence and the second fusion sequence.
[0070] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned water quality monitoring methods is implemented.
[0071] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the computer program implements any of the water quality monitoring methods described above.
[0072] The present invention also provides a computer program product, including a computer program, which implements any of the above-mentioned water quality monitoring methods when executed by a processor.
[0073] In the water quality monitoring method provided by the present invention, after obtaining the water quality information of the test point, not only can data fusion be performed based on the current water quality information, but also water quality information for a period of time in the future can be predicted based on the current water quality information. After data fusion is also performed on the predicted water quality information, the water quality is determined based on the current water quality and the predicted water quality. In the above method, the changing trend of water quality is actually taken into consideration. Determining the water quality situation from the perspective of the changing trend of water quality can make water quality monitoring more complete and more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0075] Figure 1 This is one of the flow charts of the water quality monitoring method provided by the embodiment of the present invention;
[0076] Figure 2 This is the second flow chart of the water quality monitoring method provided by the embodiment of the present invention;
[0077] Figure 3 It is one of the structural schematic diagrams of the water quality monitoring system provided by the embodiment of the present invention;
[0078] Figure 4 This is the second structural diagram of the water quality monitoring system provided by the embodiment of the present invention;
[0079] Figure 5 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0081] Figure 1 This is one of the flow charts of the water quality monitoring method provided by the embodiment of the present invention.
[0082] Figure 2 This is the second flow chart of the water quality monitoring method provided by the embodiment of the present invention.
[0083] like Figure 1 and Figure 2 As shown, this embodiment provides a water quality monitoring method, including:
[0084] Step 101, obtaining water quality information of the point to be tested;
[0085] In practical applications, the point to be tested can be a relatively large area, such as a factory, a community or a city, or a relatively small area, such as a household or even a basin of water.
[0086] Water quality information refers to the physical, chemical and biological characteristics of the water body and the conditions of its composition. Furthermore, in this embodiment, information such as the physical, chemical and biological characteristics of the test point is also obtained. During implementation, the water quality information of the test point can be obtained through a sensor. For example, the pH information of the test point can be detected by a pH sensor, the TDS information (total dissolved solids) of the test point can be detected by a TDS sensor, the turbidity information of the test point can be detected by a turbidity sensor, and so on.
[0087] The solution of this embodiment can be applied to online monitoring of surface water, and can also be used for online monitoring of groundwater.
[0088] Step 102, performing data fusion on the water quality information to obtain a first fusion sequence;
[0089] In practical applications, the acquired water quality information may contain multiple data. When conducting water quality testing, all the data may be comprehensively considered, so the acquired water quality information may be subjected to data fusion processing.
[0090] Step 103, predicting the water quality of the test point based on the water quality information, and performing data fusion on the prediction results to obtain a second fusion sequence;
[0091] In practical applications, the specific method of data fusion processing in step 103 may be the same as the data fusion in step 102, that is, different data may be processed by the same data fusion processing method.
[0092] Step 104: determine the water quality of the test point based on the first fusion sequence and the second fusion sequence.
[0093] In practical applications, the main purpose of step 104 is to summarize and refine the acquired water quality information and finally obtain a conclusion about the water quality detection. In other words, the obscure water quality parameter data is converted into a professional water quality detection conclusion through the processing of step 104. Such processing can make it convenient for ordinary users to determine the water quality quickly and conveniently.
[0094] To sum up, in the water quality monitoring method provided by the present embodiment, after obtaining the water quality information of the test point, not only can data fusion be performed based on the current water quality information, but also water quality information for a period of time in the future can be predicted based on the current water quality information. After data fusion is also performed on the predicted water quality information, the water quality is determined based on the current water quality and the predicted water quality. In the above method, the changing trend of water quality is actually taken into consideration. Determining the water quality situation from the perspective of the changing trend of water quality can make water quality monitoring more complete and more accurate.
[0095] In an exemplary embodiment, the step of obtaining water quality information of a point to be tested includes:
[0096] Acquire initial data of a plurality of water quality detection nodes, wherein the water quality detection nodes are arranged at the points to be tested;
[0097] Calculating the support of the several water quality detection nodes and constructing a support matrix;
[0098] Based on the support matrix, the support consistency of any water quality detection node to other water quality detection nodes is determined by the following formula (1):
[0099]
[0100] Among them, i represents the i-th water quality detection node, k represents the time when the initial data is obtained, and Z ij(k) represents the support of water quality detection nodes, and n represents the number of water quality detection nodes;
[0101] If it is determined that the support consistency of several water quality detection nodes reaches a set threshold, the water quality information of the point to be tested is determined based on the initial data of the several water quality detection nodes.
[0102] In practical applications, when obtaining water quality information of the test point, water quality detection nodes can be set up in different areas of the test point, and sensors are set up at each water quality detection node to obtain water quality information. Collecting water quality information through different nodes can make the acquired data more credible and can more accurately reflect the actual water quality of the test point.
[0103] In the implementation, there may be inconveniences in setting up multiple nodes. Since sensors are set at each node, for example, there may be a fault in the sensor at a certain node, and the data collected by the node may be inaccurate, which may lead to inaccurate overall water quality information. Based on this, a method for detecting whether there is a faulty node is provided in this embodiment. The principle of this method is that for a point to be tested, its water quality may be slightly different in different areas, but this difference will not be too large. If the initial water quality data detected by the water quality detection node in a certain area is too different from the data of other nodes, it means that the node is abnormal. Specifically, it is to check whether there is a large deviation in the consistency of the data of a certain node from the data of other nodes by constructing a support matrix. If it is determined through the support consistency that there is no abnormal node, it means that the reliability of the obtained water quality information is relatively high.
[0104] In practical applications, the greater the support consistency calculated by the above formula (1), the closer the corresponding node is to the data of other nodes. If the calculated support consistency is smaller, the closer the corresponding node is to the data of other nodes, the lower the data closeness. Therefore, a threshold can be set. When the support consistency calculated by a node exceeds the threshold, it can be determined that the node is normal. If it is lower than the threshold, it means that there is an abnormality.
[0105] In an exemplary embodiment, the step of obtaining water quality information of the test point further includes:
[0106] If it is determined that there is at least one target water quality detection node whose support consistency is lower than a set threshold, the initial data of the target water quality detection node is corrected;
[0107] The initial data of the target water quality detection node is corrected, including:
[0108] The data consistency mean of the i-th water quality parameter detection node at the k-th time is calculated by the following formula (2):
[0109]
[0110] The data consistency variance of the i-th water quality parameter detection node is calculated by the following formula (3):
[0111]
[0112] The data consistency variance of the i-th water quality parameter detection node at the k-th time is calculated by the following formula (4):
[0113]
[0114] The weight value corresponding to the i-th water quality parameter detection node is determined based on the data consistency mean and the data consistency variance through the following formula (5):
[0115]
[0116] The modified initial data of the target water quality detection node is determined based on the weight value by the following formula (6):
[0117]
[0118] In practical applications, the solution of this embodiment also provides a method for correcting inaccurate sensors based on other accurate sensors. The principle of this method is that the data of the abnormal node can be corrected through the data of other nodes. Specifically, when performing data fusion, by calculating the mean and variance of all nodes, a greater weight can be given to water quality detection nodes with greater consistency and smaller consistency metric fluctuations. In this way, the impact of faulty nodes on the final fused data can be reduced, making the final fused data closer to the data collected by normal nodes, thereby improving the accuracy of the collected water quality information and thus improving the accuracy of the water quality monitoring conclusions.
[0119] In an exemplary embodiment, the calculation of the support of the plurality of water quality detection nodes complies with the following formula (7):
[0120] d ij =exp(-β×(αi(k)-αj(k)) 2 ) (7)
[0121] Among them, β is the support attenuation factor, and the square root of the self-support of nodes i and j is used to detect water quality parameters. To express;
[0122] Among them, di (k) is the closeness of the data collected by water quality parameter detection node i multiple times in the entire observation interval, which conforms to the following formula (8):
[0123]
[0124] In an exemplary embodiment, performing data fusion on the water quality information to obtain a first fusion sequence includes:
[0125] The water quality information is converted into membership degree through the following formula (9):
[0126]
[0127] Among them, x is the value of the detected water quality parameter, a is the characteristic parameter of the water quality grade, and σ is the characteristic variance of the water quality grade;
[0128] The water quality grade is obtained by referring to the "Conventional Indicators and Limits of Domestic Water Quality" in the Sanitary Standard for Drinking Water (GB 5749-2022). Taking the turbidity, pH and TDS in the above embodiment as an example, according to the above standards, the limit of turbidity is 1, the limit of pH is not less than 6.5 and not more than 8.5, and the limit of TDS is 1000. Based on this, a characteristic parameter table can be constructed according to the actual needs of water quality detection. For example, when conducting water quality detection in a certain water area, the following characteristic parameter table can be constructed. According to the table, it can be determined that the water quality grades include Class I, Class II and Class III. The characteristic parameters of the water quality grade are the values corresponding to different water quality parameters and water quality grades. In this example, the characteristic parameter of the pH class is 6.8. Furthermore, the characteristic variance of the water quality grade is the variance of the characteristic parameters of the same type of water quality parameters at different levels. For example, the characteristic variance of the pH value is the variance of the three values of 6.8, 7.8 and 8.5. In practice, different water environments may have different detection requirements, and the constructed characteristic parameter tables may also be different. Therefore, this embodiment does not limit the specific values in the characteristic parameter table.
[0129]
[0130] The membership is fused by the following formula (10):
[0131]
[0132] Among them, n is the number of sensors collecting water quality information, and λ is the weight corresponding to the sensor;
[0133] The weight of the sensor can be determined by the following formula (11):
[0134]
[0135] Among them, σ′ is the variance of the sensor detection value;
[0136] The decision-level fusion is performed based on the DS evidence theory algorithm through the following formula (12):
[0137]
[0138] Among them, B and C are power sets 2 φ The elements in φ are an identification frame, which represents the domain set of all possible values. φ is the power set of φ, m1 and m2 are 2 φ The combination of the two different and independent basic probability distributions is the orthogonal sum of the basic probability distributions. Indicates that K is a normalization constant, and K conforms to the following formula (13):
[0139]
[0140] In an exemplary embodiment, the predicting of the water quality of the test point based on the water quality information includes:
[0141] A grey model is constructed based on the water quality information, and the water quality of the test point is predicted by the grey model.
[0142] The full name of the grey model is GreyModel (GM). This is a tool for building a grey differential model through a small amount of incomplete information. It is mainly used to make a fuzzy long-term description of the development law of errors. The grey model constructed in this embodiment can be a GM (1,1) model, which is a first-order univariate model that can be used for short-term and medium- to long-term predictions of things.
[0143] In an exemplary embodiment, the gray model is constructed based on the water quality information, and the water quality of the test point is predicted by the gray model, including:
[0144] The grey model is constructed by the following formula (14):
[0145]
[0146] Among them, a and q are the development coefficient and grey action of the selected water quality parameters, respectively, and x 0,1 The water quality information;
[0147] The output of the grey model is restored by the following formula (15) to obtain the predicted value of the water quality at the test point:
[0148]
[0149] In practical applications, the construction process of the grey model can specifically include the following steps:
[0150] Select the data sequence of water quality parameters corrected by the improved exponential decay support function, and record it as X 0 ={x 0,1 ,x 0,2 ,...x 0,n}, perform a cumulative sum to get X 1 ={x 1,1 ,x 1,2 ,…x 1,n},(x 0,1 represents the first number of the 0th generation), where:
[0151]
[0152] Among them, n is the number of samples, that is, the amount of water quality information obtained.
[0153] To perform the level ratio test, first calculate the level ratio ρ k sequence:
[0154]
[0155] Determine whether ρ(k) is in the acceptable coverage interval If it is not within the interval, a translation transformation is required to make the level ratio of the transformed data within the capacitive coverage interval. The transformation process is:
[0156] Y 0 ={y 0,1 ,y 0,2 ,...y 0,n}
[0157] By sequence X 1 Set up a first-order differential equation:
[0158] x 0,k +0.5α(x 1,k ,x 1,k-1 )=q,(k=1,2,...,n)
[0159] The corresponding whitened differential equation is:
[0160]
[0161] Among them: a, q are the development coefficient and grey action of the selected water quality parameters respectively. The absolute value of a is related to the applicable conditions of the GM (1,1) model.
[0162] set up Using the least squares method to estimate Solve for a,q:
[0163]
[0164] in,
[0165] After solving a and q, we can get the grey model:
[0166]
[0167] Add the accumulated value Restore to predicted value
[0168]
[0169] In an exemplary embodiment, the gray model is constructed based on the water quality information, and the water quality of the test point is predicted by the gray model, and then the method further includes:
[0170] Based on the level ratio deviation test method, the grey model is tested by the following formula (16):
[0171]
[0172] If it is determined that the grey model fails the test, the residual sequence is constructed by the following formula (17):
[0173]
[0174] Constructing a grey model based on the residual sequence, and determining a residual correction value based on the grey model of the residual sequence;
[0175] The water quality prediction result of the test point is corrected based on the residual correction value.
[0176] In practical applications, when testing the grey model based on formula (16), if |λ K |≤0.2, it means that the grey model passes the test. If the grey model fails the test, the grey model can be corrected by the residual correction method.
[0177] In practical applications, after establishing the first-order residual sequence based on formula (17), the GM (1,1) model can be established for the first-order residual sequence using the following formula:
[0178]
[0179] Then, the GM(1,1) model corresponding to the first-order residual sequence is restored to obtain the residual correction value
[0180] Using residual correction Correct the predicted value to get the corrected value
[0181]
[0182] in
[0183] In practical applications, due to m 0,k The positive or negative value of will affect the correction of the GM(1,1) model by the residual correction method, so the Markov model can also be introduced to determine m 0,k The positive or negative value of can make the prediction of GM(1,1) model more accurate, that is, by introducing the Markov model, water quality monitoring can be more accurate from the side. It makes predictions based on the probability of state transitions, which can reduce the impact of random interference factors during the prediction process, and the model has high prediction accuracy for data with large volatility. The specific calculation process is as follows:
[0184] First, according to the residual sequence E 0 The state is divided into two states. State 1 means the residual is positive, and state 2 means the residual is negative.
[0185] Secondly, find the probability p of the number of times from state i to state j ij :
[0186]
[0187] Among them, M ij is the number of times state i transitions to state j, M i is the total number of times state i appears. According to the state transfer matrix P:
[0188]
[0189] Again, the state of the last value of the residual sequence is selected as the initial state vector μ 0 :
[0190] μ 0 =(μ 0,1 ,μ 0,2 )
[0191] Among them, μ 0,1 , μ 0,2 are the probabilities of state 1 and state 2 respectively. That is, the last residual value is positive, μ 0 =(1,0); if negative, μ 0 =(0,1).
[0192] Finally, according to μ t =μ 0 p t, find the probability of the tth state after t state transitions. Select the state with the highest probability as the final result. If the probabilities of the two states are the same, take the result of the last calculation.
[0193] The water quality monitoring system provided by the present invention is described below. The water quality monitoring system described below and the water quality monitoring system described above can be referenced to each other.
[0194] Figure 3 It is one of the structural schematic diagrams of the water quality monitoring system provided by the embodiment of the present invention.
[0195] like Figure 3 As shown, the water quality monitoring system provided in this embodiment includes:
[0196] The information acquisition unit 301 is used to acquire water quality information of the test point;
[0197] A first fusion unit 302 is used to perform data fusion on the water quality information to obtain a first fusion sequence;
[0198] The second fusion unit 303 is used to predict the water quality of the test point based on the water quality information, and perform data fusion on the prediction result to obtain a second fusion sequence;
[0199] The water quality monitoring unit 304 is configured to determine the water quality of the test point based on the first fusion sequence and the second fusion sequence.
[0200] In the exemplary embodiment, an information acquisition unit 301 is further included, and the information acquisition unit 301 is further used to:
[0201] Acquire initial data of a plurality of water quality detection nodes, wherein the water quality detection nodes are arranged at the points to be tested;
[0202] Calculating the support of the several water quality detection nodes and constructing a support matrix;
[0203] Based on the support matrix, the support consistency of any water quality detection node to other water quality detection nodes is determined by the following formula (1):
[0204]
[0205] Among them, i represents the i-th water quality detection node, k represents the time when the initial data is obtained, and Z ij (k) represents the support of water quality detection nodes, and n represents the number of water quality detection nodes;
[0206] If it is determined that the support consistency of several water quality detection nodes reaches a set threshold, the water quality information of the point to be tested is determined based on the initial data of the several water quality detection nodes.
[0207] In an exemplary embodiment, the information acquisition unit 301 is further used for:
[0208] If it is determined that there is at least one target water quality detection node whose support consistency is lower than a set threshold, the initial data of the target water quality detection node is corrected;
[0209] The initial data of the target water quality detection node is corrected, including:
[0210] The data consistency mean of the i-th water quality parameter detection node at the k-th time is calculated by the following formula (2):
[0211]
[0212] The data consistency variance of the i-th water quality parameter detection node is calculated by the following formula (3):
[0213]
[0214] The data consistency variance of the i-th water quality parameter detection node at the k-th time is calculated by the following formula (4):
[0215]
[0216] The weight value corresponding to the i-th water quality parameter detection node is determined based on the data consistency mean and the data consistency variance through the following formula (5):
[0217]
[0218] The modified initial data of the target water quality detection node is determined based on the weight value by the following formula (6):
[0219]
[0220] In an exemplary embodiment, the first fusion module is further configured to:
[0221] The water quality information is converted into membership degree through the following formula (9):
[0222]
[0223] Among them, x is the value of the detected water quality parameter, a is the characteristic parameter of the water quality grade, and σ is the characteristic variance of the water quality grade;
[0224] The membership is fused by the following formula (10):
[0225]
[0226] Among them, n is the number of sensors collecting water quality information, and λ is the weight corresponding to the sensor;
[0227] The weight of the sensor can be determined by the following formula (11):
[0228]
[0229] Among them, σ′ is the variance of the sensor detection value;
[0230] The decision-level fusion is performed based on the DS evidence theory algorithm through the following formula (12):
[0231]
[0232] Among them, B and C are power sets 2 φ The elements in φ are an identification frame, which represents the domain set of all possible values. φ is the power set of φ, m1 and m2 are 2 φ The combination of the two different and independent basic probability distributions is the orthogonal sum of the basic probability distributions. Indicates that K is a normalization constant, and K conforms to the following formula (13):
[0233]
[0234] In an exemplary embodiment, the second fusion unit is further configured to:
[0235] A grey model is constructed based on the water quality information, and the water quality of the test point is predicted by the grey model.
[0236] In an exemplary embodiment, the second fusion unit is further configured to:
[0237] The grey model is constructed by the following formula (14):
[0238]
[0239] Among them, a and q are the development coefficient and grey action of the selected water quality parameters, respectively, and x 0,1 The water quality information;
[0240] The output of the grey model is restored by the following formula (15) to obtain the predicted value of the water quality at the test point:
[0241]
[0242] In an exemplary embodiment, the second fusion unit is further configured to:
[0243] Based on the level ratio deviation test method, the grey model is tested by the following formula (16):
[0244]
[0245] If it is determined that the grey model fails the test, the residual sequence is constructed by the following formula (17):
[0246]
[0247] Constructing a grey model based on the residual sequence, and determining a residual correction value based on the grey model of the residual sequence;
[0248] The water quality prediction result of the test point is corrected based on the residual correction value.
[0249] The specific implementation method of the water quality monitoring system provided in this embodiment can be implemented with reference to the above embodiments, and will not be repeated here.
[0250] Figure 4 This is the second structural schematic diagram of the water quality monitoring system provided by the embodiment of the present invention.
[0251] like Figure 4 As shown, the water quality monitoring system provided in this embodiment can be implemented based on HUAWEI HarmonyOS, including three parts: perception layer, network layer, and application layer. The perception layer is used to measure water quality parameters such as pH, TDS and turbidity; the network layer is used to complete the data flow of the detection data of the perception layer; and the application layer is used to realize real-time display and analysis of water quality parameters.
[0252] In actual applications, the perception layer includes a single-chip microcomputer equipped with HarmonyOS, a power module, a water quality detection sensor, a signal conditioning circuit, a serial port display screen, and an NB-IOT module. The water quality sensor includes a pH sensor, a TDS sensor, and a turbidity sensor, and the signal conditioning circuit includes a pH conditioning circuit, a TDS conditioning circuit, and a turbidity conditioning circuit. The water quality detection sensor is connected in series with the signal conditioning circuit, and the remaining modules are electrically connected to the single-chip microcomputer. The single-chip microcomputer equipped with HarmonyOS is HiSilicon's Hi3861 chip, which has a Wi-Fi module integrated inside the chip. Since it is equipped with the Hongmeng system, it is conducive to data sharing and collaborative work between multiple water quality detection nodes. The NB-IOT module and the Wi-Fi module integrated inside the Hi3861 together constitute the two communication modes in this embodiment. The communication mode can be adaptively switched according to the signal strength, and the communication mode can also be switched according to user needs to ensure the best communication quality and meet the needs of different water quality monitoring scenarios.
[0253] The perception layer also includes a power module, which includes a DC-DC power supply circuit and a voltage stabilizing circuit, and uses a 0Ω resistor to isolate the analog circuit from the digital circuit to reduce mutual interference between the two; the water quality detection sensor and signal conditioning circuit are electrochemical detection modules, which mainly include pH detection, TDS detection and turbidity detection. Water quality information is collected through sensors, the conditioning circuit adjusts the signal, and the external ADC performs AD conversion, which is finally sent to the main control for processing; the display module uses the industrial serial port screen DMG80480C043_02WTC 4.3-inch serial port screen, which can display various water quality parameters in real time; the NB-IOT module uses the BC20 module of Quectel, which has the characteristics of high performance and low power consumption, and supports GNSS positioning function.
[0254] The network layer includes routers, operator base stations, and a cloud platform. The cloud platform is the Alibaba Cloud Internet of Things platform. The perception layer is connected to the Alibaba Cloud Internet of Things platform through routers and operator base stations, and the water quality parameter data is transmitted to the application layer through the platform's data flow function.
[0255] In the application, the network layer can implement an M2M device communication architecture based on the data flow function of Alibaba Cloud IoT by creating devices, configuring functions, setting object models, and building a rule engine. It also realizes cloud storage of water quality parameters and information interaction between lower and upper computers.
[0256] The application layer is the mobile phone APP and PC software. The data of the perception layer is sent to the mobile phone APP and PC software for real-time display and analysis through the data transfer function of the network layer. The mobile phone APP is connected to the Alibaba Cloud Internet of Things platform through the MQTT protocol, which can realize functions such as real-time display of water quality parameter data and switching of communication methods. The water quality monitoring PC software contains five interfaces including login, registration, monitoring, settings and history records, which mainly realize functions such as user registration and login, real-time display of water quality data, intelligent analysis of water quality status, and history record query.
[0257] During implementation, the perception layer will send the collected water quality parameters such as pH, TDS and turbidity to the network layer through NB-IOT communication or Wi-Fi communication; the Alibaba Cloud IoT platform of the network layer will transfer the water quality parameter data and send it to the application layer; the application layer will be able to display the water quality parameter data measured by the perception layer in real time, and analyze it to obtain the water status scientifically, accurately and quickly.
[0258] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the water quality monitoring method, which includes:
[0259] Obtain water quality information of the test point;
[0260] Performing data fusion on the water quality information to obtain a first fusion sequence;
[0261] Based on the water quality information, predict the water quality of the test point, and perform data fusion on the prediction result to obtain a second fusion sequence;
[0262] The water quality of the test point is determined based on the first fusion sequence and the second fusion sequence.
[0263] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0264] On the other hand, the present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the water quality monitoring method provided by the above methods, the method includes:
[0265] Obtain water quality information of the test point;
[0266] Performing data fusion on the water quality information to obtain a first fusion sequence;
[0267] Based on the water quality information, predict the water quality of the test point, and perform data fusion on the prediction result to obtain a second fusion sequence;
[0268] The water quality of the test point is determined based on the first fusion sequence and the second fusion sequence.
[0269] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the water quality monitoring method provided by the above methods, the method comprising:
[0270] Obtain water quality information of the test point;
[0271] Performing data fusion on the water quality information to obtain a first fusion sequence;
[0272] Based on the water quality information, predict the water quality of the test point, and perform data fusion on the prediction result to obtain a second fusion sequence;
[0273] The water quality of the test point is determined based on the first fusion sequence and the second fusion sequence.
[0274] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0275] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0276] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A water quality monitoring method, characterized in that: include: Obtain water quality information of the test point; Performing data fusion on the water quality information to obtain a first fusion sequence; Based on the water quality information, predict the water quality of the test point, and perform data fusion on the prediction result to obtain a second fusion sequence; The water quality of the test point is determined based on the first fusion sequence and the second fusion sequence.
2. The water quality monitoring method according to claim 1, characterized in that: The step of obtaining water quality information of the test point includes: Acquire initial data of a plurality of water quality detection nodes, wherein the water quality detection nodes are arranged at the points to be tested; Calculating the support of the several water quality detection nodes and constructing a support matrix; Based on the support matrix, the support consistency of any water quality detection node to other water quality detection nodes is determined by the following formula (1): Among them, i represents the i-th water quality detection node, k represents the time when the initial data is obtained, and Z ij (k) represents the support of water quality detection nodes, and n represents the number of water quality detection nodes; If it is determined that the support consistency of several water quality detection nodes reaches a set threshold, the water quality information of the point to be tested is determined based on the initial data of the several water quality detection nodes.
3. The water quality monitoring method according to claim 2, characterized in that: The step of obtaining the water quality information of the test point further includes: If it is determined that there is at least one target water quality detection node whose support consistency is lower than a set threshold, the initial data of the target water quality detection node is corrected; The initial data of the target water quality detection node is corrected, including: The data consistency mean of the i-th water quality parameter detection node at the k-th time is calculated by the following formula (2): The data consistency variance of the i-th water quality parameter detection node is calculated by the following formula (3): The data consistency variance of the i-th water quality parameter detection node at the k-th time is calculated by the following formula (4): The weight value corresponding to the i-th water quality parameter detection node is determined based on the data consistency mean and the data consistency variance through the following formula (5): The modified initial data of the target water quality detection node is determined based on the weight value by the following formula (6):
4. The water quality monitoring method according to claim 2, characterized in that: The calculation of the support of the plurality of water quality detection nodes complies with the following formula (7): d ij =exp(-β×(α i (k)-α j (k)) 2 ) (7) Among them, β is the support attenuation factor, and the square root of the self-support of nodes i and j is used to detect water quality parameters. To express; Among them, d i (k) is the closeness of the data collected by water quality parameter detection node i multiple times in the entire observation interval, which conforms to the following formula (8):
5. The water quality monitoring method according to claim 1, characterized in that: The step of fusing the water quality information to obtain a first fusion sequence includes: The water quality information is converted into membership degree through the following formula (9): Among them, x is the value of the detected water quality parameter, a is the characteristic parameter of the water quality grade, and σ is the characteristic variance of the water quality grade; The membership is fused by the following formula (10): Among them, n is the number of sensors collecting water quality information, and λ is the weight corresponding to the sensor; The weight of the sensor can be determined by the following formula (11): Among them, σ′ is the variance of the sensor detection value; The decision-level fusion is performed based on the DS evidence theory algorithm through the following formula (12): Among them, B and C are power sets 2 φ The elements in φ are an identification frame, which represents the domain set of all possible values. φ is the power set of φ, m1 and m2 are 2 φ The combination of the two different and independent basic probability distributions is the orthogonal sum of the basic probability distributions. Indicates that K is a normalization constant, and K conforms to the following formula (13):
6. The water quality monitoring method according to claim 1, characterized in that: The predicting of the water quality of the point to be tested based on the water quality information includes: A grey model is constructed based on the water quality information, and the water quality of the test point is predicted by the grey model.
7. The water quality monitoring method according to claim 6, characterized in that: The step of constructing a grey model based on the water quality information and predicting the water quality of the test point by using the grey model includes: The grey model is constructed by the following formula (14): Among them, a and q are the development coefficient and grey action of the selected water quality parameters, respectively, and x 0,1 The water quality information; The output of the grey model is restored by the following formula (15) to obtain the predicted value of the water quality at the test point:
8. The water quality monitoring method according to claim 6, characterized in that: The step of constructing a grey model based on the water quality information and predicting the water quality of the test point by using the grey model further comprises: Based on the level ratio deviation test method, the grey model is tested by the following formula (16): If it is determined that the grey model fails the test, the residual sequence is constructed by the following formula (17): Constructing a grey model based on the residual sequence, and determining a residual correction value based on the grey model of the residual sequence; The water quality prediction result of the test point is corrected based on the residual correction value.
9. A water quality monitoring system, characterized in that: include: An information acquisition unit, used to acquire water quality information of a test point; A first fusion unit, used for performing data fusion on the water quality information to obtain a first fusion sequence; A second fusion unit is used to predict the water quality of the test point based on the water quality information, and perform data fusion on the prediction result to obtain a second fusion sequence; A water quality monitoring unit is used to determine the water quality of the test point based on the first fusion sequence and the second fusion sequence.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the water quality monitoring method as described in any one of claims 1-8 is implemented.
Citation Information
Patent Citations
Marine water quality data on-line analysis and evaluation method based on DS evidence theory
CN110930042A
Data fusion system based on Internet of Things
CN115243215A