Water quality detection stability control feature extraction method

By constructing a regional water system network model and a water pollution diffusion model, analyzing the importance of nodes and performing reverse inference of pollution locations, the stability problem of surface water quality monitoring was solved, and sample data collection and effective detection of pollutant components at key nodes were achieved.

CN116701911BActive Publication Date: 2026-03-03SHANGHAI BOQU INSTR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310675528.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-08
Publication Date
2026-03-03
Estimated Expiration
2043-06-08

AI Technical Summary

Technical Problem

In existing technologies, surface water quality testing lacks stability, and the selection of testing sites based on proximity leads to incomplete testing, making it impossible to effectively avoid missed detection of pollutants and loss of components.

Method used

By constructing a regional water system network model, analyzing the importance of nodes, selecting key nodes for sample data collection, and using a water pollution diffusion model to reverse-engineer the pollution location, combined with an evolutionary algorithm to update the pollution location and intensity, the representativeness and stability of the sample data are ensured.

Benefits of technology

It enables the collection of stable sample data at key locations, improves the stability and representativeness of water quality testing, reduces missed detection of pollutants, and supports effective river water quality management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116701911B_ABST
    Figure CN116701911B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of water quality detection, and discloses a water quality detection stability control feature extraction method, which comprises the following steps: collecting water area data to construct a regional water system network model; performing node importance analysis on the constructed regional water system network model to obtain a key node set; collecting sample data at the key node positions; if pollution components are detected in the sample data, then combining a water pollution diffusion model to perform reverse deduction on the pollution positions, and collecting stable sample data at the pollution positions to perform water quality detection. The water system node with higher importance is selected as the key node, sample data is collected in the key node, water system pollutant missing detection is avoided, according to the concentration change trend of the pollutant components in the sample data, the water pollution diffusion model is used to calculate the probability density function of different pollution positions and pollution intensities, the pollution positions are determined, sample data is collected, and sample data with higher stability is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of water quality testing, and in particular to a method for extracting stability control features in water quality testing. Background Technology

[0002] Surface water quality testing requires not only timely detection but also high-quality testing, which increases the difficulty of the work. Water quality testing refers to the process of inspecting and evaluating water quality according to certain standards, using methods such as observation, smelling, and examination, to ensure that the water quality meets actual needs. Currently, testing institutions and personnel mainly rely on proximity as a single factor when selecting water quality testing sites, lacking a comprehensive understanding of the entire river system and thus lacking a foundation for water quality testing stability. To address this issue, this invention proposes a method for extracting water quality testing stability control features. By analyzing the dynamic characteristics of the river system, the optimal testing location is located, ensuring the stability and reliability of water quality testing. Summary of the Invention

[0003] In view of this, the present invention provides a method for extracting features for stability control in water quality detection. The purpose is to: 1) construct a regional water system network model using a graph network structure. Nodes in the regional water system network model include river source locations, river confluence locations, river inflection points, and river outlet locations, with edges representing river channels between nodes. Then, the importance of nodes in the regional water system network model is analyzed. Nodes with higher importance have a larger proportion of rivers flowing through them, containing more water system flow information. If pollutants exist in the water system to be detected, the probability of pollutants passing through nodes with high river flow weights during their flow is higher, the upstream river channel length is shorter, and the relationship with upstream nodes is closer, avoiding excessive loss of pollutant components. This allows for sampling at key nodes. 1) Collect sample data to avoid missing pollutants in the water system; 2) Based on the concentration change trend of pollutant components in the sample data, input the water parameters data of the collected locations into the water pollution diffusion model, use the water pollution diffusion model to calculate the probability density function of different pollution locations and pollution intensities, and update the pollution location and pollution intensity based on the evolutionary algorithm and the state transition probability combined with the probability density function, which speeds up the source tracing of pollution locations, and then collect sample data at the pollution locations. The collected sample data does not change much over a considerable period of time and space, and has better representativeness and stability. Therefore, it contains most of the components of pollutants in the pollution source, which is conducive to the detection and analysis of pollutant components, and then to the treatment of river water quality.

[0004] To achieve the above objectives, the present invention provides a method for extracting stability control features for water quality detection, comprising the following steps:

[0005] S1: Collect water area data to construct a regional water system network model, wherein the model uses regional water system nodes as points and water system pathways as edges;

[0006] S2: Perform node importance analysis on the constructed regional water system network model to obtain the set of key nodes;

[0007] S3: Construct a water pollution diffusion model, which takes the pollution location as input and the diffusion concentration value as output;

[0008] S4: Collect sample data at the calculated key node locations. If pollutants are detected in the sample data, the pollution location is reversed using the water pollution diffusion model. Stable sample data is collected at the pollution location for water quality testing.

[0009] As a further improvement of the present invention:

[0010] Optionally, the step S1, which involves collecting water area data to construct a regional water system network model, includes:

[0011] Collect water area data, which includes the location of river source, river confluence, river inflection point, river outlet, river flow, river width, river length, and river water level. The location of river outlet includes the location of lakes, reservoirs, and marshes.

[0012] A regional water system network model G = (E, V) is constructed based on the collected water area data. The regional water system network model uses regional water system nodes as points and water system pathways as edges.

[0013] E={e n |n∈[1,N]}

[0014] V = {v} ij = <e i ,e j >|i,j∈[1,N],i≠j}

[0015] in:

[0016] E represents the set of regional water system nodes, which include the locations of river sources, river confluences, river inflection points, and river outlets. These water system nodes are used as points in the regional water system network model.

[0017] V represents the set of waterway pathways, including the waterways between waterway nodes in different regions;

[0018] e n This represents the nth node in the set of nodes of the regional water system.

[0019] v ij Indicates the regional water system node ei To regional water system node e j The river channels between them, and the direction of the river flow within them, are the regional water system nodes e. i To regional water system node e j Where there are no regional water system nodes between the river channels, if regional water system node e j The river at that location cannot flow to the regional water system node e. i Then there is no river channel v ji .

[0020] Optionally, step S2 involves performing node importance analysis on the constructed regional water system network model, including:

[0021] The importance of nodes in the constructed regional water system network model is analyzed. The process of node importance analysis is as follows:

[0022] S21: Find the shortest river path between any two distinct regional water system nodes, where the river path length is the number of regional water system nodes the river path passes through, and the number of regional water system nodes is e. j With regional water system node e i The shortest river path between them is the regional water system node e. j Flowing along the river to reach the regional water system node e i Among several river paths, the shortest river path is the one that passes through the fewest nodes. This shortest river path consists of waterway pathways and passes through several regional waterway nodes. In this embodiment of the invention, if the regional waterway node e... j Flowing along the river towards the inaccessible regional water system node e i If the two nodes are not connected, then there is no shortest river path between them.

[0023] S22: Calculate the arbitrary water system node e n River flow weight w n (1):

[0024]

[0025] in:

[0026] count(e h ,e k ) indicates the regional water system node e h Reaching regional water system node e k The number of shortest river paths;

[0027] Indicates the regional water system node e h Reaching regional water system node e k Of all the shortest river paths, the one that passes through the regional water system node e nThe number of shortest river paths;

[0028] In this embodiment of the invention, the higher the river flow weight, the greater the proportion of rivers flowing through that node, and the more flow information of the water system it contains. If there are pollutants in the water system to be detected, the probability that the pollutants will pass through nodes with high river flow weights during their flow is greater.

[0029] S23: Calculate the arbitrary water system node e n River flow weight w n (2):

[0030]

[0031] in:

[0032] Q n Represents water system node e n Average runoff;

[0033] Q0 represents the average runoff at the river's source location;

[0034] H n (up) represents the water system node e n The average river level in the upstream channel;

[0035] H n (down) indicates water system node e n The average river level in the downstream channel, where the upstream channel represents the endpoint e. n The downstream section of the river indicates the starting point as e. n The waterways are divided into two sections, each containing only two nodes: the starting point and the ending point.

[0036] L n (up) represents the water system node e n The length of the upstream river channel; in this embodiment of the invention, if the water system node e n If there are multiple upstream channels, the shortest upstream channel length is selected for calculating the channel flow weight.

[0037] S24: Calculate the arbitrary water system node e n density weight w n (3):

[0038]

[0039] in:

[0040] Indicates that at water system node e n The total number of water system nodes contained in a circular region with radius R centered at R; in this embodiment of the invention, the water system nodes in the circular region include the center of the circle;

[0041] S25: Calculation of water system node e n Importance:

[0042] r n =w n (1)w n (2)w n (3)

[0043] in:

[0044] r n Represents water system node e n The importance of;

[0045] The water system nodes are sorted in descending order of importance, and the M most important water system nodes are selected as key nodes. The set of key nodes is as follows:

[0046] {g m |m∈[1,M]}

[0047] in:

[0048] g m This represents the m-th critical node.

[0049] Optionally, the construction of the water pollution diffusion model in step S3 includes:

[0050] A water pollution diffusion model is constructed, which takes the pollution location and pollution intensity as inputs and the diffusion concentration value as output. The water pollution diffusion model is in the following form:

[0051]

[0052]

[0053] in:

[0054] C(δ,(x,y),t) represents water pollution with intensity δ emitted from pollution location (x,y), and the concentration values ​​of pollutants in the sample data are obtained when sample data is collected at time t.

[0055] exp(·) denotes an exponential function with the natural constant as its base;

[0056] (x,y) represents the coordinates of the contamination location, with the origin of the coordinate system used as the coordinates of the location where the sample data was collected.

[0057] δ represents the pollution intensity of the pollutant, and t represents the duration of pollution;

[0058] H represents the average river level in the upstream channel where the sample data was collected;

[0059] D X D represents the diffusion coefficient of pollutants in the upstream river channel in the horizontal direction from the location where the sample data was collected. Y This represents the diffusion coefficient of pollutants in the upstream river channel in the horizontal direction from the location where the sample data was collected;

[0060] u X u represents the horizontal velocity of the river. Y Indicates the vertical velocity of the river flow;

[0061] σ represents the degradation coefficient of the pollutant. In this embodiment of the invention, σ is 1 by default.

[0062] I represents the hydraulic gradient, which is set to 0.003;

[0063] g represents gravitational acceleration;

[0064] W represents the average width of the upstream channel at the location where the sample data was collected.

[0065] Optionally, step S4, which involves collecting sample data at key node locations, includes:

[0066] Sample data is periodically collected at key node locations. The data collection is automatically started and stopped at specified time intervals Δt using a timing device. The collected sample data is stored in a container according to the collection sequence to obtain time-series sample data, which consists of water body data of the river near the key node locations.

[0067] Optionally, if pollutants are detected in the sample data during step S4, the location of the pollution is reverse-engineered using a water pollution diffusion model, including:

[0068] If pollutants are detected in the sample data, the location of the pollution is deduced by combining the water pollution diffusion model. The deduction process for the pollution location corresponding to any sample data in which pollutants are detected is as follows:

[0069] S41: By screening and obtaining sample data of detected pollutants and their corresponding key node locations, a time-series change sequence of pollutant concentrations is obtained, where key nodes... The time series of changes in the concentration of the corresponding pollutant components is as follows:

[0070]

[0071] in:

[0072] Indicates key nodes In t LThe concentration of pollutant components in the sample data collected at time t, and the time interval between adjacent collection times is Δt;

[0073] The location where sample data was collected to detect contaminants;

[0074] S42: Initialize and generate F groups of individuals, where each individual has a dimension of 3. The initialization result of any f-th individual is: s f (0)=(x f (0),y f (0),δ f (0)), to obtain the key node where pollutants were detected. The parameter data includes the average river level, diffusion coefficient, river velocity, and average width of the upstream channel, x f (0),y f (0) indicates that the key node The coordinates of the contaminated location corresponding to the origin;

[0075] S43: Let the current number of deductions be d, the initial value of d be 0, and the maximum value be Max. Then the deduction result of the f-th individual obtained from the d-th deduction is s. f (d);

[0076] S44: s f (d) and key nodes The parameter data were input into the water pollution diffusion model to obtain s f (d) The probability density function P(s) of the corresponding pollution location and pollution intensity f (d)):

[0077]

[0078]

[0079] in:

[0080] ε represents the standard deviation, which is set to 0.01;

[0081] Indicates that s f (d) and key nodes The parameter data are input into the model output concentration of the water pollution diffusion model;

[0082] S45: s f (d) As the initial value, two different individuals s are randomly selected from the remaining individuals in the d-th iteration. 1 (d),s 2 (d) The perturbation results for generating the initial values:

[0083]

[0084] in:

[0085] rand(0,1) represents a random number between 0 and 1;

[0086] Calculate the probability density function of the perturbation result

[0087] S46: Regarding s f (d) Update:

[0088]

[0089] in:

[0090] rand(0,1) represents a random number between 0 and 1;

[0091] S47: Let d = d + 1, return to step S44, until d = Max, and select the individual with the largest current probability density function. The coordinates of the contaminated locations contained in this individual are the key nodes. The source location of pollutant components in the sample data collected at the site.

[0092] Optionally, in step S4, stable sample data is collected at the contaminated location for water quality testing, including:

[0093] Water quality testing is conducted by collecting water samples from rivers near the pollution site, which have more stable water composition. The pollution location is closer to the pollution source, and the collected sample data does not change much over a considerable period of time and space, thus having better representativeness and stability. Therefore, it contains most of the components of pollutants in the pollution source, which is beneficial for the detection and analysis of pollutant components, and then for river water quality treatment.

[0094] To address the above problems, the present invention provides an electronic device, the electronic device comprising:

[0095] Memory, storing at least one instruction;

[0096] Communication interfaces enable communication between electronic devices; and

[0097] The processor executes the instructions stored in the memory to implement the water quality detection stability control feature extraction method described above.

[0098] To address the aforementioned problems, the present invention also provides a computer-readable storage medium storing at least one instruction, which is executed by a processor in an electronic device to implement the water quality detection stability control feature extraction method described above.

[0099] Compared with existing technologies, this invention proposes a method for extracting stability control features in water quality testing, which has the following advantages:

[0100] First, this proposal suggests a method for analyzing the importance of regional water system nodes. This involves obtaining the shortest river path between any two different regional water system nodes, where the river path length is equal to the number of regional water system nodes the river path passes through, and the number of regional water system nodes is e. j With regional water system node e i The shortest river path between them is the regional water system node e. j Flowing along the river to reach the regional water system node e i Among several river paths, the shortest river path is the one with the fewest nodes. This shortest river path consists of waterway pathways and passes through several regional waterway nodes. The number of any waterway node e is calculated. n River flow weight w n (1):

[0101]

[0102] Where: count(e h ,e k ) indicates the regional water system node e h Reaching regional water system node e k The number of shortest river paths; Indicates the regional water system node e h Reaching regional water system node e k Of all the shortest river paths, the one that passes through the regional water system node e n The number of shortest river paths; where a higher river flow weight indicates a larger proportion of rivers flowing through that node, and more flow information about the water system contained therein. If there are pollutants in the water system to be detected, the probability that the pollutants will pass through nodes with high river flow weights during their flow is greater; the value of any water system node e is calculated. n River flow weight w n (2):

[0103]

[0104] Among them: Q n Represents water system node e n The average runoff; Q0 represents the average runoff at the river's source; H n (up) represents the water system node e n The average river level in the upstream channel; H n (down) indicates water system node e n The average river level in the downstream channel, where the upstream channel represents the endpoint e.n The downstream section of the river indicates the starting point as e. n The river channels are defined as follows: each channel contains only two nodes: a starting point and an ending point. n (up) represents the water system node e n The upstream channel length is calculated; the arbitrary water system node e is obtained. n density weight w n (3):

[0105]

[0106] in: Indicates that at water system node e n The total number of water system nodes contained in a circular region centered at R with radius R; the number of water system nodes e is calculated. n Importance:

[0107] r n =w n (1)w n (2)w n (3)

[0108] Where: r n Represents water system node e n The importance of the nodes is determined by ranking them from most important to least important, and the M most important nodes are selected as key nodes. The set of key nodes is as follows:

[0109] {g m |m∈[1,M]}

[0110] Wherein: g m Let m represent the m-th key node. This scheme constructs a regional water system network model using a graph network structure. The nodes in the regional water system network model include the locations of river sources, river confluences, river inflection points, and river outlets. The edges represent the river channels between nodes. Then, the importance of the nodes in the regional water system network model is analyzed. The higher the importance of a node, the greater the proportion of rivers flowing through that node, and the more flow information it contains. If there are pollutants in the water system to be detected, the pollutants are more likely to pass through nodes with high river flow weights during their flow, the shorter the upstream river channel, and the closer the relationship with upstream nodes, thus avoiding excessive loss of pollutants. Sample data is then collected at the key nodes to avoid missed detection of water system pollutants.

[0111] Meanwhile, this scheme proposes a method for inferring pollution locations. If a pollutant is detected in the sample data, the pollution location is inverted using a water pollution diffusion model. The inverted pollution location process for any sample data where a pollutant is detected is as follows: Sample data containing detected pollutants and their corresponding key node locations are selected, and the temporal variation sequence of pollutant concentration is obtained. The key node locations are... The time series of changes in the concentration of the corresponding pollutant components is as follows:

[0112]

[0113] in: Indicates key nodes In t L The concentration of pollutant components in the sample data collected at time t, and the time interval between adjacent collection times is Δt; The data collection locations for detected contaminants are determined; F groups of individuals are initialized, each with a dimension of 3. The initialization result for any f-th individual is as follows:

[0114] s f (0)=(x f (0),y f (0),δ f (0)), to obtain the key node where pollutants were detected. The parameter data includes the average river level, diffusion coefficient, river velocity, and average width of the upstream channel, x f (0),y f (0) indicates that the key node Let be the coordinates of the contaminated location corresponding to the origin; let d be the current number of simulations, with an initial value of 0 and a maximum value of Max. Then, the simulation result of the f-th individual obtained from the d-th simulation is s. f (d); s f (d) and key nodes The parameter data were input into the water pollution diffusion model to obtain s f (d) The probability density function P(s) of the corresponding pollution location and pollution intensity f (d)):

[0115]

[0116]

[0117] Where: ε represents the standard deviation, which is set to 0.01; Indicates that s f (d) and key nodes The parameter data are input into the model output concentration of the water pollution diffusion model; s f (d) As the initial value, two different individuals s are randomly selected from the remaining individuals in the d-th iteration. 1 (d),s 2 (d) The perturbation results for generating the initial values:

[0118]

[0119] Where: rand(0,1) represents a random number between 0 and 1; the probability density function for calculating the perturbation result. For s f (d) Update:

[0120]

[0121] Where: rand(0,1) represents a random number between 0 and 1; let d = d + 1, until d = Max, and select the individual with the largest current probability density function, where the coordinates of the contaminated location contained in the individual are the key nodes. The source location of pollutants in the sample data collected at the pollution site is determined. Water quality testing is conducted on samples from rivers near the pollution location, where the water composition is more stable. This scheme, based on the concentration trends of pollutants in the sample data, inputs the water parameters from the collected location into a water pollution diffusion model. The model calculates the probability density function for different pollution locations and intensities. An evolutionary algorithm, combined with the state transition probability of the probability density function, is used to update the pollution location and intensity, accelerating the source tracing of pollution. Sample data is then collected at the pollution location. The collected sample data shows little variation over a considerable time and spatial range, exhibiting better representativeness and stability. Therefore, it contains most of the pollutant components from the pollution source, facilitating the detection and analysis of pollutant components and ultimately, river water quality remediation. Attached Figure Description

[0122] Figure 1 This is a flowchart illustrating a method for extracting stability control features for water quality testing according to an embodiment of the present invention.

[0123] Figure 2 This is a schematic diagram of an electronic device for implementing a water quality detection stability control feature extraction method according to an embodiment of the present invention.

[0124] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0125] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0126] This application provides a method for extracting stability control features in water quality testing. The execution entity of this method includes, but is not limited to, at least one electronic device configured to execute the method provided in this application, such as a server or a terminal. In other words, the method can be executed by software or hardware installed on a terminal device or a server device, and the software may be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.

[0127] Example 1:

[0128] S1: Collect water area data to construct a regional water system network model, wherein the model uses regional water system nodes as points and water system pathways as edges.

[0129] The S1 step of collecting water area data to construct a regional water system network model includes:

[0130] Collect water area data, which includes the location of river source, river confluence, river inflection point, river outlet, river flow, river width, river length, and river water level. The location of river outlet includes the location of lakes, reservoirs, and marshes.

[0131] A regional water system network model G = (E, V) is constructed based on the collected water area data. The regional water system network model uses regional water system nodes as points and water system pathways as edges.

[0132] E={e n |n∈[1,N]}

[0133] V = {v} ij = <e i ,e j >|i,j∈[1,N],i≠j}

[0134] in:

[0135] E represents the set of regional water system nodes, which include the locations of river sources, river confluences, river inflection points, and river outlets. These water system nodes are used as points in the regional water system network model.

[0136] V represents the set of waterway pathways, including the waterways between waterway nodes in different regions;

[0137] e n This represents the nth node in the set of nodes of the regional water system.

[0138] v ij Indicates the regional water system node e i To regional water system node e j The river channels between them, and the direction of the river flow within them, are the regional water system nodes e. i To regional water system node e j Where there are no regional water system nodes between the river channels, if regional water system node e j The river at that location cannot flow to the regional water system node e. i Then there is no river channel v ji .

[0139] S2: Perform node importance analysis on the constructed regional water system network model to obtain the set of key nodes.

[0140] Step S2 involves performing node importance analysis on the constructed regional water system network model, including:

[0141] The importance of nodes in the constructed regional water system network model is analyzed. The process of node importance analysis is as follows:

[0142] S21: Find the shortest river path between any two distinct regional water system nodes, where the river path length is the number of regional water system nodes the river path passes through, and the number of regional water system nodes is e. j With regional water system node e i The shortest river path between them is the regional water system node e. j Flowing along the river to reach the regional water system node e i Among several river paths, the shortest river path is the one that passes through the fewest nodes. This shortest river path consists of waterway pathways and passes through several regional waterway nodes. In this embodiment of the invention, if the regional waterway node e... j Flowing along the river towards the inaccessible regional water system node e i If the two nodes are not connected, then there is no shortest river path between them.

[0143] S22: Calculate the arbitrary water system node e n River flow weight w n (1):

[0144]

[0145] in:

[0146] count(e h ,e k ) indicates the regional water system node e h Reaching regional water system node e k The number of shortest river paths;

[0147] Indicates the regional water system node e h Reaching regional water system node e k Of all the shortest river paths, the one that passes through the regional water system node e n The number of shortest river paths;

[0148] In this embodiment of the invention, the higher the river flow weight, the greater the proportion of rivers flowing through that node, and the more flow information of the water system it contains. If there are pollutants in the water system to be detected, the probability that the pollutants will pass through nodes with high river flow weights during their flow is greater.

[0149] S23: Calculate the arbitrary water system node e n River flow weight w n (2):

[0150]

[0151] in:

[0152] Q n Represents water system node e n Average runoff;

[0153] Q0 represents the average runoff at the river's source location;

[0154] H n (up) represents the water system node e n The average river level in the upstream channel;

[0155] H n (down) indicates water system node e n The average river level in the downstream channel, where the upstream channel represents the endpoint e. n The downstream section of the river indicates the starting point as e. n The waterways are divided into two sections, each containing only two nodes: the starting point and the ending point.

[0156] L n (up) represents the water system node e n The length of the upstream river channel;

[0157] S24: Calculate the arbitrary water system node e n density weight w n (3):

[0158]

[0159] in:

[0160] Indicates that at water system node e nThe total number of water system nodes contained in a circular region centered at R with radius R;

[0161] S25: Calculation of water system node e n Importance:

[0162] r n =w n (1)w n (2)w n (3)

[0163] in:

[0164] r n Represents water system node e n The importance of;

[0165] The water system nodes are sorted in descending order of importance, and the M most important water system nodes are selected as key nodes. The set of key nodes is as follows:

[0166] {g m |m∈[1,M]}

[0167] in:

[0168] g m This represents the m-th critical node.

[0169] S3: Construct a water pollution diffusion model, which takes the pollution location as input and the diffusion concentration value as output.

[0170] The water pollution diffusion model constructed in step S3 includes:

[0171] A water pollution diffusion model is constructed, which takes the pollution location and pollution intensity as inputs and the diffusion concentration value as output. The water pollution diffusion model is in the following form:

[0172]

[0173]

[0174] in:

[0175] C(δ,(x,y),t) represents water pollution with intensity δ emitted from pollution location (x,y), and the concentration values ​​of pollutants in the sample data are obtained when sample data is collected at time t.

[0176] exp(·) denotes an exponential function with the natural constant as its base;

[0177] (x,y) represents the coordinates of the contamination location, with the origin of the coordinate system used as the coordinates of the location where the sample data was collected.

[0178] δ represents the pollution intensity of the pollutant, and t represents the duration of pollution;

[0179] H represents the average river level in the upstream channel where the sample data was collected;

[0180] D X D represents the diffusion coefficient of pollutants in the upstream river channel in the horizontal direction from the location where the sample data was collected. Y This represents the diffusion coefficient of pollutants in the upstream river channel in the horizontal direction from the location where the sample data was collected;

[0181] u X u represents the horizontal velocity of the river. Y Indicates the vertical velocity of the river flow;

[0182] σ represents the degradation coefficient of the pollutant. In this embodiment of the invention, σ is 1 by default.

[0183] I represents the hydraulic gradient, which is set to 0.003;

[0184] g represents gravitational acceleration;

[0185] W represents the average width of the upstream channel at the location where the sample data was collected.

[0186] S4: Collect sample data at the calculated key node locations. If pollutants are detected in the sample data, the pollution location is reversed using the water pollution diffusion model. Stable sample data is collected at the pollution location for water quality testing.

[0187] Step S4 involves collecting sample data at key node locations, including:

[0188] Sample data is periodically collected at key node locations. The data collection is automatically started and stopped at specified time intervals Δt using a timing device. The collected sample data is stored in a container according to the collection sequence to obtain time-series sample data, which consists of water body data of the river near the key node locations.

[0189] If pollutants are detected in the sample data in step S4, the location of the pollution is reverse-engineered using a water pollution diffusion model, including:

[0190] If pollutants are detected in the sample data, the location of the pollution is deduced by combining the water pollution diffusion model. The deduction process for the pollution location corresponding to any sample data in which pollutants are detected is as follows:

[0191] S41: By screening and obtaining sample data of detected pollutants and their corresponding key node locations, a time-series change sequence of pollutant concentrations is obtained, where key nodes... The time series of changes in the concentration of the corresponding pollutant components is as follows:

[0192]

[0193] in:

[0194] Indicates key nodes In t L The concentration of pollutant components in the sample data collected at time t, and the time interval between adjacent collection times is Δt;

[0195] The location where sample data was collected to detect contaminants;

[0196] S42: Initialize and generate F groups of individuals, where each individual has a dimension of 3. The initialization result of any f-th individual is: s f (0)=(x f (0),y f (0),δ f (0)), to obtain the key node where pollutants were detected. The parameter data includes the average river level, diffusion coefficient, river velocity, and average width of the upstream channel, x f (0),y f (0) indicates that the key node The coordinates of the contaminated location corresponding to the origin;

[0197] S43: Let the current number of deductions be d, the initial value of d be 0, and the maximum value be Max. Then the deduction result of the f-th individual obtained from the d-th deduction is s. f (d);

[0198] S44: s f (d) and key nodes The parameter data were input into the water pollution diffusion model to obtain s f (d) The probability density function P(s) of the corresponding pollution location and pollution intensity f (d)):

[0199]

[0200]

[0201] in:

[0202] ε represents the standard deviation, which is set to 0.01;

[0203] Indicates that s f (d) and key nodes The parameter data are input into the model output concentration of the water pollution diffusion model;

[0204] S45: s f (d) As the initial value, two different individuals s are randomly selected from the remaining individuals in the d-th iteration. 1 (d),s 2 (d) The perturbation results for generating the initial values:

[0205]

[0206] in:

[0207] rand(0,1) represents a random number between 0 and 1;

[0208] Calculate the probability density function of the perturbation result

[0209] S46: Regarding s f (d) Update:

[0210]

[0211] in:

[0212] rand(0,1) represents a random number between 0 and 1;

[0213] S47: Let d = d + 1, return to step S44, until d = Max, and select the individual with the largest current probability density function. The coordinates of the contaminated locations contained in this individual are the key nodes. The source location of pollutant components in the sample data collected at the site.

[0214] In step S4, stable sample data is collected at the contaminated location for water quality testing, including:

[0215] Water quality testing is conducted by collecting water samples from rivers near the pollution site, which have more stable water composition. The pollution location is closer to the pollution source, and the collected sample data does not change much over a considerable period of time and space, thus having better representativeness and stability. Therefore, it contains most of the components of pollutants in the pollution source, which is beneficial for the detection and analysis of pollutant components, and then for river water quality treatment.

[0216] Example 2:

[0217] like Figure 2 The diagram shown is a schematic diagram of an electronic device for implementing a water quality detection stability control feature extraction method according to an embodiment of the present invention.

[0218] The electronic device 1 may include a processor 10, a memory 11, a communication interface 13 and a bus, and may also include a computer program, such as program 12, stored in the memory 11 and executable on the processor 10.

[0219] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the electronic device 1. Furthermore, the memory 11 can include both internal and external storage units of the electronic device 1. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of program 12, but also to temporarily store data that has been output or will be output.

[0220] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (such as program 12 for extracting stability control features for water quality detection) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0221] The communication interface 13 may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device 1 and other electronic devices, and to enable communication between internal components of the electronic device.

[0222] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.

[0223] Figure 2 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 2 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0224] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0225] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual user interface.

[0226] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.

[0227] The program 12 stored in the memory 11 of the electronic device 1 is a combination of multiple instructions, which, when run in the processor 10, can achieve the following:

[0228] A regional water system network model is constructed by collecting water area data. The model uses regional water system nodes as points and water system pathways as edges.

[0229] Node importance analysis was performed on the constructed regional water system network model to obtain the set of key nodes;

[0230] Construct a water pollution diffusion model;

[0231] Sample data is collected at the calculated key node locations. If pollutants are detected in the sample data, the pollution location is reversed using the water pollution diffusion model. Stable sample data is then collected at the pollution location for water quality testing.

[0232] Specifically, the processor 10's implementation method for the above instructions can be found in [reference needed]. Figures 1 to 2 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0233] It should be noted that the sequence numbers of the above embodiments of the present invention are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, apparatus, article, or method. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0234] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0235] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for extracting a water quality detection stability control feature, characterized by, The method comprises: S1: collecting water area data to construct a regional river system network model, the model taking regional river system nodes as points and water system paths as edges; S2: performing node importance analysis on the constructed regional river system network model to obtain a key node set; S3: constructing a water pollution diffusion model, the model taking a pollution location as input and a diffusion concentration value as output; S4: collecting sample data at the calculated key node position, if a pollution component is detected in the sample data, then combining the water pollution diffusion model to perform reverse deduction on the pollution location, and collecting stable sample data at the pollution location for water quality detection; The key node position sample data collection comprises: periodically collecting sample data at the key node position, automatically starting and stopping the collection of sample data at a specified time interval Δt through a timing device, and storing the collected sample data in a container according to the collection order to obtain sample data at a time sequence, wherein the sample data is the water body data of the river near the key node position; The reverse deduction process for any pollution location corresponding to sample data in which a pollution component is detected is as follows: S41: The sample data detected to contain the pollution component and the corresponding key node position are screened to obtain a time sequence change sequence of the pollution component concentration, wherein the key node g m The time sequence change sequence of the corresponding pollution component concentration is: Wherein: representing the key node g m the concentration of the pollutant component in the sample data collected at time t L the time interval between adjacent collection times is Δt; g m * the acquisition position of the sample data for which a contaminating component was detected; S42: initialize to generate F groups of individuals, wherein the dimension of each individual is 3, and the initialization result of any fth individual is: s f (x f (0), y f (0), δ f (0)) m Obtain the parameter data of the key node g f * that detects the pollution component, including the average river level, the diffusion coefficient, the river flow rate, and the average width of the upstream river channel, x f (0), y m (0) represent the pollution position coordinates corresponding to the origin of the key node g * S43: set the current deduction times as d, the initial value of d is 0, the maximum value is Max, the deduction result of the fth individual obtained by the dth deduction is s f (d); S44: s f (d) and the parameter data of the key node g m are brought into the water pollution diffusion model, and the s f (d) corresponding to the pollution location and the pollution intensity probability density function P(s f (d)) is obtained: Wherein: ε represents a standard deviation, which is set to 0.01; s f (d) and the parameter data of the key node g m * are brought into the model output concentration of the water pollution diffusion model; S45: select two different individuals s f (d) randomly select two different individuals s from the remaining individuals of the dth deduction result as initial values 1 (d),s 2 (d) generate a perturbation result of the initial values: Wherein: rand(0,1) represents a random number between 0 and 1; Computing a probability density function of perturbation results S46: To s f (d) Update: Wherein: rand(0,1) represents a random number between 0 and 1; S47: Let d = d + 1, return to step S44 until d = Max, and select the individual with the largest current probability density function, wherein the coordinates of the pollution location contained in the individual are the key node g m The source position of the pollutant component in the sample data collected at the site.

2. The water quality detection stability control feature extraction method of claim 1, wherein, The S1 step of collecting water area data to construct a regional river system network model comprises: Collecting water area data, wherein the water area data includes river source position, river intersection position, river inflection point position, river outlet position, river flow data, river width data, river length data, and river water level data, and the river outlet position includes lake position, reservoir position, and marsh position; According to the collected water area data, a regional river system network model G=(E, V) is constructed, the regional river system network model taking regional river system nodes as points and water system paths as edges: E = {e n | n e [1, N]} V = {v ij = <e i , e j > | i, j e [1, N], i ≠ j} Wherein: E represents a set of regional river system nodes, including river source position, river intersection position, river inflection point position, and river outlet position, and the water system node is taken as a point in the regional river system network model; V represents a set of water system paths, including river channels between different regional river system nodes; e n represents the nth node in the set of regional water system nodes; v ij representing a regional water system node e i to a regional water system node e j between the river courses, the flow direction of the river courses being from the regional water system node e i to a regional water system node e j where no regional water system node exists between the river courses, if the river at the regional water system node e j cannot flow to the regional water system node e i then no river course v ji exists.

3. The water quality detection stability control feature extraction method of claim 2, wherein, The S2 step of performing node importance analysis on the constructed regional river system network model comprises: Performing node importance analysis on the regional river system nodes in the constructed regional river system network model, wherein the node importance analysis process is as follows: S21: Find the shortest river path between any two distinct regional water system nodes, where the river path length is the number of regional water system nodes the river path passes through, and the number of regional water system nodes is e. j With regional water system node e i The shortest river path between them is the regional water system node e. j Flowing along the river to reach the regional water system node e i Among several river paths, the shortest river path is the one that passes through the fewest nodes. The shortest river path consists of waterway pathways and passes through several regional waterway nodes. S22: Calculate the arbitrary water system node e n River flow weight w n (1): Wherein: count(e h ,e k ) represents the number of shortest river paths from the regional water system node e h to the regional water system node e k ; represents the number of shortest river paths passing through the regional water system node e h the number of shortest river paths passing through the regional water system node e k the number of shortest river paths passing through the regional water system node e n the number of shortest river paths passing through the regional water system node e S23: Calculate the river flow weight w of any water system node e n n (2):​ Wherein: Q n represents the average runoff of the water system node e n ; Q0 represents the average runoff of the river source position; h n (up) denotes the average river level of the upstream river of the water system node e n of the water system node e H n (down) denotes the average river level of the downstream river of the water system node e n , where the upstream river denotes the river whose end point is e n , and the downstream river denotes the river whose start point is e n , and each river contains only two water system nodes, the start point and the end point. L n (up) denotes the length of the upstream river course of the water system node e n ; S24: Calculate the density weight w of any water system node e n n (3):​ Wherein: represents the total number of water system nodes contained in a circular area with the water system node e n as the center and R as the radius; S25: Calculate the water system node e n Importance: r n = w n (1) w n (2) w n (3) Wherein: r n representing the water system node e n of importance; The water system nodes are sorted in descending order of importance, and the M water system nodes with the highest importance are selected as key nodes, and the key node set is: {g m |m∈[1,M]} Wherein: g m represents the mth key node.

4. The water quality detection stability control feature extraction method of claim 1, wherein, The S3 step of constructing a water pollution diffusion model comprises: Constructing a water pollution diffusion model, the water pollution diffusion model taking a pollution location and a pollution intensity as input and a diffusion concentration value as output, wherein the water pollution diffusion model is of the form: Wherein: C(δ,(x,y),t) represents the water pollution intensity of δ at the pollution position (x,y) at the time t, and the concentration value of the pollution component in the sample data; exp(·) represents the exponential function with the natural constant as the base; (x,y) represents the pollution position coordinates, and the coordinate origin is the position coordinates of the collected sample data; δ represents the pollution intensity of the pollutant, and t represents the pollution duration; H represents the average river level of the upstream river of the position where the sample data is collected; D X D represents the dispersion coefficient of the pollutant in the horizontal direction upstream of the river course at the position where the sample data is collected Y D represents the dispersion coefficient of the pollutant in the horizontal direction upstream of the river course at the position where the sample data is collected u X u represents the horizontal river flow velocity, Y u represents the vertical river flow velocity; σ represents the degradation coefficient of the pollutant; I represents the hydraulic gradient, which is set to 0.003; g represents the acceleration of gravity; W represents the average width of the upstream river of the position where the sample data is collected.

5. The water quality detection stability control feature extraction method of claim 1, wherein, The stable sample data collected at the pollution position in the S4 step is used for water quality detection, which comprises: The sample data with more stable water body composition is collected in the river near the pollution position for water quality detection, wherein the deduced pollution position is closer to the pollution source, and the collected sample data changes little in a relatively long time and space range.

Citation Information

Patent Citations

  • A water resource sudden water pollutant diffusion simulation system

    CN109711107A

  • Drainage basin pollutant monitoring system and monitoring method thereof

    CN111693672A