System and method for checking data credibility of water pollution monitor
Through multiple judgment methods of numerical range verification, correlation coefficient and KL divergence analysis, the problem of temporary distortion of water pollution monitor data is solved, ensuring the credibility and accuracy of the data.
Patent Information
- Application Number
- CN202510563293.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Due to sensor interference or occasional failure, local data of the water pollution monitor is temporarily distorted, and real-time verification of data credibility is required to avoid misjudgment.
Through the calculation of statistical numerical calculations, including numerical range verification, correlation coefficient determination and KL divergence analysis, the credibility of the detection data of the water pollution monitor is determined multiple times.
Real-time credibility verification of water pollution monitor data is achieved, misjudgment caused by local data distortion is avoided, and the authority and accuracy of the data is improved.
Smart Images

Figure CN120408018A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water pollution monitoring, and particularly to a method for verifying the data credibility of a water pollution monitor. Background Art
[0002] Due to the discharge of industrial, agricultural, and domestic sewage, the problem of water pollution is a problem with a continuously increasing focus. A water pollution monitor can collect and summarize relevant data reflecting the degree of water pollution through sensors and a computing unit, and can timely and accurately reflect the water quality status and change law in a region. Therefore, it is a common technical solution to use a water pollution monitor to monitor water pollution in water bodies.
[0003] However, during the process of using a water pollution monitor to monitor water pollution in a water body, due to sensor interference or occasional failures, transient distortion of local water pollution data may occur. In response to this phenomenon, it is necessary to perform real-time credibility verification on the detection data of the water pollution monitor. Summary of the Invention
[0004] The purpose of the present invention is to provide a system and method for verifying the data credibility of a water pollution monitor, aiming to solve the problem that during the process of using a water pollution monitor to monitor water pollution in a water body, due to sensor interference or occasional failures, transient distortion of local water pollution data may occur, and it is necessary to perform real-time credibility verification on the detection data of the water pollution monitor for this phenomenon.
[0005] In view of the above problems, the present application provides a system and method for verifying the data credibility of a water pollution monitor.
[0006] In the first aspect disclosed in the present application, a method for verifying the data credibility of a water pollution monitor is provided, and the method includes: Step 1: Divide the monitoring periods of all water pollution monitors into monitoring cycles according to a preset time length. Within each monitoring cycle, sample water pollution data in sequence according to a preset sampling interval to generate a water pollution data sequence with a fixed length; Step 2: For the water pollution data sequence of the current water pollution monitor, perform numerical range verification on each water pollution data therein. If there is water pollution data that exceeds the physical range, it is determined that the credibility is insufficient; Step 3: If there is no water pollution data that exceeds the physical range, obtain the water pollution data sequence of the water pollution detector at adjacent monitoring points of the current water pollution monitor within the same monitoring cycle, calculate the correlation coefficient of the two water pollution data sequences. If the correlation coefficient is less than a preset coefficient threshold, it is determined that the credibility is insufficient; Step 4: If the correlation coefficient is not less than the preset coefficient threshold, calculate the KL divergence of the two water pollution data sequences. If the KL divergence is greater than the preset divergence threshold, it is determined that the credibility is insufficient; otherwise, it is determined that the credibility is sufficient.
[0007] Preferably, the specific steps of step 1 include: Step 1.1: Through the time control component of the water pollution monitor, divide the continuous monitoring periods of all water pollution monitors into monitoring cycles according to a preset time length; Step 1.2: Within each monitoring cycle, the water pollution monitor samples water pollution data in sequence according to a preset sampling interval, and arranges the water pollution data in sequence according to the sampling order to form a water pollution data sequence with a fixed length; Step 1.3: For each monitoring cycle, the water pollution monitor sets an independent data storage unit and stores the water pollution data sequence in the form of a linear list.
[0008] Preferably, the specific steps of step 3 include: Step 3.1: If there is no water pollution data exceeding the physical range, use the water pollution data sequence of the current water pollution monitor as the current water pollution data sequence, and at the same time obtain the water pollution data sequence of the water pollution detector at the adjacent monitoring point of the current water pollution monitor in the same monitoring cycle as the adjacent water pollution data sequence; Step 3.2: Calculate the average values of the water pollution data in the current water pollution data sequence and the adjacent water pollution data sequence respectively, and calculate the Pearson correlation coefficient of the current water pollution data sequence and the adjacent water pollution data sequence accordingly; Step 3.3: If the Pearson correlation coefficient is less than the preset coefficient threshold, it is determined that the credibility is insufficient.
[0009] Preferably, the specific steps of step 4 include: Step 4.1: If the correlation coefficient is not less than the preset coefficient threshold, use the water pollution data sequence of the current water pollution monitor as the current water pollution data sequence, use the water pollution data sequence of the water pollution detector at the adjacent monitoring point of the current water pollution monitor in the same monitoring cycle as the adjacent water pollution data sequence, and perform normalization processing on the current water pollution data sequence and the adjacent water pollution data sequence respectively, so that the sum of the water pollution data in the current water pollution data sequence and the adjacent water pollution data sequence is 1 and both are positive values; Step 4.2: Calculate the ratios of the water pollution data corresponding to the same time series in the current water pollution data sequence and the adjacent water pollution data sequence respectively to generate a ratio sequence; Step 4.3: Take the logarithm of the data in the comparison value sequence one by one, and use the water pollution data in the current water pollution data sequence as weights to perform weighted summation to generate the KL divergence between the current water pollution data sequence and the adjacent water pollution data sequence; Step 4.4: If the KL divergence is greater than the preset divergence threshold, it is determined that the credibility is insufficient; otherwise, it is determined that the credibility is sufficient.
[0010] The second aspect disclosed in this application provides a data credibility verification system for a water pollution monitor. The system is used for the data credibility verification method of the above-mentioned water pollution monitor. The system includes: A sampling module, which is used to divide the monitoring periods of all water pollution monitors into monitoring cycles according to a preset time length. In each monitoring cycle, water pollution data is sampled in sequence according to a preset sampling interval to generate a water pollution data sequence with a fixed length; A first verification module, which is used to verify the numerical range of each water pollution data in the water pollution data sequence of the current water pollution monitor. If there is water pollution data that exceeds the physical range, it is determined that the credibility is insufficient; A second verification module, which is used to, if there is no water pollution data that exceeds the physical range, obtain the water pollution data sequence of the water pollution detector at the adjacent monitoring point of the current water pollution monitor in the same monitoring cycle, calculate the correlation coefficient of the two water pollution data sequences, and if the correlation coefficient is less than the preset coefficient threshold, it is determined that the credibility is insufficient; A third verification module, which is used to, if the correlation coefficient is not less than the preset coefficient threshold, calculate the KL divergence of the two water pollution data sequences. If the KL divergence is less than the preset divergence threshold, it is determined that the credibility is insufficient; otherwise, it is determined that the credibility is sufficient.
[0011] The third aspect disclosed in this application provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned data credibility verification method for a water pollution monitor are implemented.
[0012] The fourth aspect disclosed in this application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data credibility verification method for a water pollution monitor are implemented.
[0013] The fifth aspect disclosed in this application provides a computer program product, including a computer program or instruction. When the computer program or instruction is executed by a processor, the steps of the above-mentioned data credibility verification method for a water pollution monitor are implemented.
[0014] The beneficial effects of the present invention are as follows: (1) By calculating the statistical values for threshold determination, real-time credibility verification of the detection data of the water pollution monitor is achieved, avoiding the problem of misjudgment in water pollution detection caused by distorted local water pollution data. (2) By successively performing multiple determinations on the detection data of the water pollution monitor through various determination conditions, the authority of the data and the accuracy of the water pollution determination mechanism are improved. Description of the Drawings
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0016] Figure 1 It is an overall flowchart of a method for verifying the data credibility of a water pollution monitor.
[0017] Figure 2 It is an overall structural diagram of a system for verifying the data credibility of a water pollution monitor. Detailed Embodiments
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0019] Embodiment 1: As Figure 1 shown, the embodiment of the present application provides a method for verifying the data credibility of a water pollution monitor, and the method includes: Step 1: Divide the monitoring periods of all water pollution monitors into monitoring cycles according to a preset duration. In each monitoring cycle, sample water pollution data at a preset sampling interval in sequence to generate a water pollution data sequence with a fixed length.
[0020] Step 1 specifically includes the following steps: Step 1.1: Through the time control component of the water pollution monitor, divide the continuous monitoring periods of all water pollution monitors into monitoring cycles according to a preset duration; Step 1.2: During each monitoring period, the water pollution monitor samples water pollution data in sequence according to a preset sampling interval, and arranges the water pollution data in the order of sampling to form a water pollution data sequence with a fixed length. Step 1.3: For each monitoring period, the water pollution monitor sets up an independent data storage unit and stores the water pollution data sequence in the form of a linear list.
[0021] Step 2: For the water pollution data sequence of the current water pollution monitor, perform a numerical range check on each water pollution data. If there is water pollution data beyond the physical range, it is determined to be of insufficient credibility.
[0022] Step 3: If there is no water pollution data beyond the physical range, obtain the water pollution data sequence of the water pollution detector at the adjacent monitoring point of the current water pollution monitor during the same monitoring period, and calculate the correlation coefficient of the two water pollution data sequences. If the correlation coefficient is less than the preset coefficient threshold, it is determined to be of insufficient credibility.
[0023] Step 3 specifically includes the following steps: Step 3.1: If there is no water pollution data beyond the physical range, use the water pollution data sequence of the current water pollution monitor as the current water pollution data sequence, and at the same time obtain the water pollution data sequence of the water pollution detector at the adjacent monitoring point of the current water pollution monitor during the same monitoring period as the adjacent water pollution data sequence. Step 3.2: Calculate the average values of the water pollution data in the current water pollution data sequence and the adjacent water pollution data sequence respectively, and calculate the Pearson correlation coefficient of the current water pollution data sequence and the adjacent water pollution data sequence in the form of Equation (1) accordingly, where and are the current water pollution data sequence and the adjacent water pollution data sequence respectively, i is the time sequence number of the water pollution data in the sequence, N is the number of water pollution data in the sequence, and are the average values of the water pollution data in the current water pollution data sequence and the adjacent water pollution data sequence respectively, and r is the Pearson correlation coefficient: Equation (1); Step 3.3: If the Pearson correlation coefficient is less than the preset coefficient threshold, it is determined to be of insufficient credibility.
[0024] Step 4: If the correlation coefficient is not less than the preset coefficient threshold, calculate the KL divergence of the two water pollution data sequences. If the KL divergence is greater than the preset divergence threshold, it is determined to be of insufficient credibility, otherwise, it is determined to be credible.
[0025] Step 4 specifically includes the following steps: Step 4.1: If the correlation coefficient is not less than the preset coefficient threshold, then use the water pollution data sequence of the current water pollution monitor as the current water pollution data sequence, use the water pollution data sequence of the water pollution detectors at adjacent monitoring points of the current water pollution monitor within the same monitoring period as the adjacent water pollution data sequence, and perform normalization processing on the current water pollution data sequence and the adjacent water pollution data sequence respectively, so that the sum of the water pollution data in the current water pollution data sequence and the adjacent water pollution data sequence is 1, and both are positive values; Step 4.2: Calculate the ratios of the water pollution data at the corresponding time series in the current water pollution data sequence and the adjacent water pollution data sequence respectively to generate a ratio sequence; Step 4.3: Perform logarithmic calculations on the data in the ratio sequence in turn, and use the water pollution data in the current water pollution data sequence as weights to perform weighted summation to generate the KL divergence between the current water pollution data sequence and the adjacent water pollution data sequence, which can be expressed in the form of Equation (2), where, and are the results after normalization processing of the current water pollution data sequence and the adjacent water pollution data sequence respectively, is the KL divergence between the current water pollution data sequence and the adjacent water pollution data sequence: Equation (2); Step 4.4: If the KL divergence is greater than the preset divergence threshold, then it is determined that the credibility is insufficient, otherwise, it is determined that it has credibility.
[0026] For example, assume A = [2, 5, 3], B = [1, 6, 3], then a = [0.2, 0.5, 0.3], b = [0.1, 0.6, 0.3]. Calculate the ratios item by item as [2, 0.833, 1], take the logarithms as [0.693, -0.182, 0], and perform weighted summation with a as the weight. The result is 0.2×0.693 + 0.5×(-0.182) + 0.3×0 = 0.0476. Then the KL divergence between the current water pollution data sequence and the adjacent water pollution data sequence is 0.0476, where the above calculations are rounded to three decimal places.
[0027] In summary, the data credibility verification method for a water pollution monitor provided by the embodiments of the present application has the following technical effects: (1) By calculating the threshold through statistical numerical calculations, real-time credibility verification of the detection data of the water pollution monitor is achieved, avoiding the problem of misjudgment of water pollution detection caused by distortion of local water pollution data; (2) The detection data of the water pollution monitor is judged multiple times through various judgment conditions in sequence, which improves the authority of the data and the accuracy of the water pollution judgment mechanism.
[0028] Embodiment 2: Based on the same inventive concept as a data credibility verification method for a water pollution monitor in Embodiment 1, as Figure 2 shown, the present application provides a data credibility verification system for a water pollution monitor, and the system includes: A sampling module, which is used to divide the monitoring periods of all water pollution monitors into monitoring cycles according to a preset time length. Within each monitoring cycle, water pollution data is sampled in sequence according to a preset sampling interval to generate a water pollution data sequence with a fixed length; A first verification module, which is used to perform a numerical range verification on each water pollution data in the water pollution data sequence of the current water pollution monitor. If there is water pollution data exceeding the physical range, it is determined that the credibility is insufficient; A second verification module, which is used to, if there is no water pollution data exceeding the physical range, obtain the water pollution data sequence of the water pollution detector at adjacent monitoring points of the current water pollution monitor within the same monitoring cycle, and calculate the correlation coefficient of the two water pollution data sequences. If the correlation coefficient is less than a preset coefficient threshold, it is determined that the credibility is insufficient; A third verification module, which is used to, if the correlation coefficient is not less than the preset coefficient threshold, calculate the KL divergence of the two water pollution data sequences. If the KL divergence is less than a preset divergence threshold, it is determined that the credibility is insufficient, otherwise, it is determined that the credibility is available.
[0029] Through the foregoing detailed description of a data credibility verification method for a water pollution monitor in this specification, those skilled in the art can clearly know a data credibility verification system for a water pollution monitor in this embodiment. Since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for related parts, reference can be made to the description in the method part.
[0030] Embodiment 3: In Embodiment 3, a computer device is provided, which includes a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps of the above-mentioned data credibility verification method for a water pollution monitor are implemented.
[0031] Embodiment 4: In Embodiment 4, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data credibility verification method for a water pollution monitor are implemented.
[0032] Example 5: In Example 5, a computer program product is provided, including a computer program or instruction, and when the computer program or instruction is executed by a processor, the steps of the above data credibility verification method of a water pollution monitor are implemented.
[0033] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0034] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for verifying the data credibility of a water pollution monitor, characterized in that The method includes: Step 1: Divide the monitoring periods of all water pollution monitors into monitoring cycles according to a preset duration. Within each monitoring cycle, sample water pollution data sequentially at a preset sampling interval to generate a water pollution data sequence of a fixed length; Step 2: For the water pollution data sequence of the current water pollution monitor, check the numerical range of each water pollution data. If there is water pollution data beyond the physical range, it is determined to be of insufficient credibility; Step 3: If there is no water pollution data beyond the physical range, obtain the water pollution data sequence of the water pollution detector at the adjacent monitoring point of the current water pollution monitor within the same monitoring cycle, and calculate the correlation coefficient of the two water pollution data sequences. If the correlation coefficient is less than the preset coefficient threshold, it is determined to be of insufficient credibility; Step 4: If the correlation coefficient is not less than the preset coefficient threshold, calculate the KL divergence of the two water pollution data sequences. If the KL divergence is greater than the preset divergence threshold, it is determined to be of insufficient credibility; otherwise, it is determined to be credible.
2. The data credibility verification method of a water pollution monitor according to claim 1, characterized in that, The specific content of Step 1 includes: Step 1.1: Through the time control component of the water pollution monitor, divide the continuous monitoring periods of all water pollution monitors into monitoring cycles according to a preset duration; Step 1.2: Within each monitoring cycle, the water pollution monitor samples water pollution data sequentially at a preset sampling interval, and arranges the water pollution data in the sampling order to form a water pollution data sequence of a fixed length; Step 1.3: For each monitoring cycle, the water pollution monitor sets an independent data storage unit and stores the water pollution data sequence in the form of a linear list.
3. The data credibility verification method of a water pollution monitor according to claim 1, characterized in that, The specific content of Step 3 includes: Step 3.1: If there is no water pollution data beyond the physical range, use the water pollution data sequence of the current water pollution monitor as the current water pollution data sequence, and at the same time obtain the water pollution data sequence of the water pollution detector at the adjacent monitoring point of the current water pollution monitor within the same monitoring cycle as the adjacent water pollution data sequence; Step 3.2: Calculate the average values of the water pollution data in the current water pollution data sequence and the adjacent water pollution data sequence respectively, and calculate the Pearson correlation coefficient of the current water pollution data sequence and the adjacent water pollution data sequence accordingly; Step 3.3: If the Pearson correlation coefficient is less than the preset coefficient threshold, it is determined to be of insufficient credibility.
4. The data credibility verification method of a water pollution monitor according to claim 1, wherein, The specific content of Step 4 includes: Step 4.1: If the correlation coefficient is not less than the preset coefficient threshold, use the water pollution data sequence of the current water pollution monitor as the current water pollution data sequence, use the water pollution data sequence of the water pollution detector at the adjacent monitoring point of the current water pollution monitor within the same monitoring cycle as the adjacent water pollution data sequence, and normalize the current water pollution data sequence and the adjacent water pollution data sequence respectively, so that the sum of the water pollution data in the current water pollution data sequence and the adjacent water pollution data sequence is 1 and both are positive values; Step 4.2: Calculate the ratio of the water pollution data at the corresponding time series in the current water pollution data sequence and the adjacent water pollution data sequence respectively to generate a ratio sequence; Step 4.3: Take the logarithm of the data in the comparison value sequence one by one, and use the water pollution data in the current water pollution data sequence as the weight to perform weighted summation to generate the KL divergence between the current water pollution data sequence and the adjacent water pollution data sequence; Step 4.4: If the KL divergence is greater than the preset divergence threshold, it is determined that the credibility is insufficient; otherwise, it is determined that the credibility is sufficient.
5. A data credibility verification system for a water pollution monitor, characterized in that, The system includes: A sampling module, which is used to divide the monitoring periods of all water pollution monitors into monitoring cycles according to a preset time length. In each monitoring cycle, water pollution data is sampled sequentially at a preset sampling interval to generate a water pollution data sequence of a fixed length; A first verification module, which is used to verify the numerical range of each water pollution data in the water pollution data sequence of the current water pollution monitor. If there is water pollution data that exceeds the physical range, it is determined that the credibility is insufficient; A second verification module, which is used to, if there is no water pollution data that exceeds the physical range, obtain the water pollution data sequence of the water pollution detector at the adjacent monitoring point of the current water pollution monitor in the same monitoring cycle, calculate the correlation coefficient of the two water pollution data sequences, and if the correlation coefficient is less than the preset coefficient threshold, it is determined that the credibility is insufficient; A third verification module, which is used to, if the correlation coefficient is not less than the preset coefficient threshold, calculate the KL divergence of the two water pollution data sequences, and if the KL divergence is less than the preset divergence threshold, it is determined that the credibility is insufficient; otherwise, it is determined that the credibility is sufficient.
6. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method for verifying the data credibility of a water pollution monitor according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for verifying the data credibility of a water pollution monitor according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instruction is executed by the processor, it implements the steps of the method for verifying the data credibility of a water pollution monitor according to any one of claims 1 to 4.