Water service performance data matching method and system
By constructing orderly information of water services and using GAN generation model, the problem of water age calculation based on idealized assumptions in the existing technology is solved, and more accurate water age calculation is achieved, meeting the physical and chemical constraints of the actual pipeline network.
Patent Information
- Application Number
- CN202510258727.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-03-06
AI Technical Summary
When calculating the water age in water business performance, the prior art is difficult to accurately reflect nonlinear and sudden problems in the real pipeline network based on idealized assumptions, resulting in deviations from the calculation results from actual data.
By obtaining the basic information and monitoring information of water services, we build orderly information, and using a Generative Adversarial Network (GAN) combined with the basic information identification model and the monitoring information identification model, we generate more accurate water age data.
It realizes the water age calculation that meets the physical and chemical constraints required for actual pipeline operation while achieving statistically realistic and meeting the physical and chemical constraints required for actual pipeline operation, and improves the accuracy of water business performance data matching.
Smart Images

Figure CN119809452A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water conservancy detection technology, and more specifically, to a water service performance data matching method and system. Background Art
[0002] The performance evaluation of water services includes KPI evaluation and PRI evaluation. An important indicator of PRI evaluation is the water quality qualification rate, and one of the indicators of water quality qualification rate is the household water age qualification rate. Since the household water age will be dynamically affected by pipeline blockage, temperature, and water pressure, there will be a situation where the water pressure is temporarily increased to reduce the household water age during the evaluation sampling. In order to ensure the accuracy of performance evaluation, it is necessary to predict the water age through daily monitoring data; however, when using engineering calculation methods to calculate the water age, it is based on idealized assumptions, such as pipeline smoothness, valve switching rules, etc. The problems with the physical simulation method are also based on some idealized assumptions; but there are many nonlinear, sudden, and cross-departmental problems in the real pipeline network, such as leakage of old pipelines, unexpected water outages, changes in user behavior patterns, etc., which are likely to exceed the original range set by the physical simulation model, resulting in deviations between the calculation results of the pipeline network hydraulic model and the physical simulation results and the actual data. Summary of the invention
[0003] The purpose of the present invention is to provide a water business performance data matching method and system in order to solve the above problems.
[0004] The present invention provides a water service performance data matching method, comprising the following steps:
[0005] Obtain basic information, including water source basic information, branch basic information and user end basic information;
[0006] Obtain monitoring information, including water source monitoring information, branch monitoring information and user end information;
[0007] Based on basic information and monitoring information, order information of two structural dimensions is constructed. The basic structural elements included in the first structural dimension are objects, including: water source, branch, user end; the basic structural elements included in the second structural dimension are time sequence units; the method for processing and obtaining order information includes:
[0008] Objects for extracting orderliness information;
[0009] Extract specific features associated with the object. The specific features include two types, namely, first features derived from basic information and second features derived from monitoring information. The extracted second features are divided into multiple parts according to the data collection cycle. One part is mapped to a time sequence unit. The order of the time sequence units is consistent with the time order of the collection cycle of the second features.
[0010] Inputting the first feature of the object connection of the ordered information into the basic information recognition model, the basic information recognition model includes a first backbone network, the first backbone network includes a first graph network layer and a first output layer, wherein the first graph network layer inputs the first feature of the object connection of the ordered information, outputs the first hidden feature to the first output layer, and the first output layer outputs the basic feature of the pipeline network;
[0011] Inputting the second feature of the object connection of the ordered information into the monitoring information recognition model, the monitoring information recognition model includes a second backbone network, the second backbone network includes a first time sequence layer, a second graph network layer and a second output layer, wherein the first time sequence layer inputs the second feature of the object connection of the ordered information, outputs the second hidden feature to the second graph network layer, the second graph network layer outputs the third hidden feature to the second output layer, and the second output layer outputs the monitoring feature;
[0012] The basic characteristics of the pipeline network and the monitoring characteristics are spliced and input into the generation model, which then outputs the current water age data of each object.
[0013] Further, a mapping is established between the extracted objects and their associated specific features;
[0014] For any two objects, if there is a correlation between the associated specific features related to the feature task or there is a correlation between the objects related to the feature task, an object relationship is established between the two objects.
[0015] Furthermore, the first characteristics associated with the water source include: water source ID, pipe segment location, pipe diameter, pipe material, valve location, water pump location, terrain elevation, and water pressure at the initial or design stage;
[0016] The first characteristics of branch association: branch ID, pipe segment location, pipe diameter, pipe material, valve location, water pump location, terrain elevation, water pressure at the initial or design stage;
[0017] The first features associated by the user: water source ID, pipe segment location, pipe diameter, pipe material, valve location, water pump location, terrain elevation, and water pressure at the initial or design stage;
[0018] The second characteristics associated with water sources: water source ID, water source location, pressure, water flow, water quality index, and water temperature;
[0019] Secondary features associated with branches: branch ID, branch location, pressure, water flow, water quality index, and water temperature;
[0020] Secondary features associated with the user: user ID, user location, pressure, water flow, water quality index, and water temperature.
[0021] Furthermore, the correlations related to the feature tasks include:
[0022] The branch to which the water source is connected;
[0023] The branch the user is connected to.
[0024] Furthermore, the generative model uses GAN, which includes a generator and a discriminator. The loss function of the generative model is as follows:
[0025] ;
[0026] in, represents a generator, represents the discriminator, represents the game objective function between the discriminator and the generator, Indicates the distribution of real water age data Water age data sampled in The expected value of the discriminator is the logarithm of the probability of correctly classifying these water age data with the natural constant e as the base, Indicates that from the splicing feature The data sampled in , through the generator Generated data Discriminator The logarithm of the probability of correctly identifying a false positive to the base of the natural constant e, , Indicates the basic characteristics of the pipe network. Indicates monitoring characteristics, It means to splice the basic characteristics of the pipeline network and the monitoring characteristics together.
[0027] Furthermore, the existing water age simulation data is used to pre-train the generative model and initialize the parameters θ of the generator and ϕ of the discriminator.
[0028] Furthermore, the training steps of the discriminator are as follows:
[0029] Step 611: Sampling a batch of water age samples from real data ,calculate ;
[0030] Step 612: Sampling from noise or prior distribution ,generate ,calculate ;
[0031] Step 613: Update the discriminator parameters , so that the discriminator can distinguish between real and generated samples;
[0032] The training steps of the generator are as follows:
[0033] Step 621: Generate a new water age sample ;
[0034] Step 622: Calculate the discriminator's discrimination result for the generated sample and call the physical simulation / constraint module at the same time Do a quick check to get the loss value that violates the laws of physics ;
[0035] ;
[0036] in, represents the generated water age data, represents the hydraulic / water quality mechanism model, Penalty(·) represents the metric function for violating physical laws, is the measurement weight coefficient, the default value is 0.9, Represents the samples generated by the generator The expected value of the applied physical feasibility penalty;
[0037] Step 623: Minimize the generator’s loss function To update the generator parameters , gradually reducing the degree of violation of physical mechanisms, The formula is as follows:
[0038] ;
[0039] in, Indicates that from the splicing feature The data sampled in , by using the parameter Generator Generated data Discriminator The logarithm of the probability of correctly identifying a false positive with the natural constant e as the base, λ is the training balance weight, which is used to balance the weight of statistical loss and physical constraint loss, The initial value of is 0.1, and it increases with the increase of training rounds. The upper limit is 0.6. In the early stage of training, the generator is required to meet the distribution of training data. As the number of training rounds increases, the constraints of physical laws are improved.
[0040] Further, And training rounds The relationship is:
[0041] ;
[0042] The maximum number of training rounds is 500 by default.
[0043] The present invention provides a water service performance data matching system, which is used to store computer-readable instructions. When the computer-readable instructions are read, the aforementioned water service performance data matching method can be executed.
[0044] The beneficial effect of the present invention is that the present invention analyzes the basic information and monitoring information of the pipeline network, extracts the features therein, and calculates the water age of the pipeline network based on this. Compared with calculating the water age only through pure data, the system combines hydraulic, water quality and other characteristics to make the generated water age statistically realistic while meeting the physical and chemical constraints required for the actual operation of the pipeline network. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a flow chart of a water business performance data matching method of the present invention. DETAILED DESCRIPTION
[0046] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that the discussion of these embodiments is only to enable those skilled in the art to better understand and implement the subject matter described herein, and the functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the contents of this specification. Each example may omit, replace or add various processes or components as needed. In addition, the features described relative to some examples may also be combined in other examples.
[0047] At least one embodiment of the present invention discloses a water service performance data matching method, such as Figure 1 As shown, the following steps are included:
[0048] Step 100, obtaining basic information, the basic information includes water source basic information, branch basic information and user terminal basic information;
[0049] Step 200, obtaining monitoring information, the monitoring information including water source monitoring information, branch monitoring information and user terminal information;
[0050] Step 300, constructing ordered information of two structural dimensions based on basic information and monitoring information, wherein the basic structural elements included in the first structural dimension are objects, including: water sources, branches, and user terminals; and the basic structural elements included in the second structural dimension are time sequence units;
[0051] In some embodiments of the present invention, the method for processing and obtaining orderliness information includes:
[0052] Objects for extracting orderliness information;
[0053] Extract specific features associated with the object. The specific features include two types, namely, first features derived from basic information and second features derived from monitoring information. The extracted second features are divided into multiple parts according to the data collection cycle. One part is mapped to a time sequence unit. The order of the time sequence units is consistent with the time order of the collection cycle of the second features.
[0054] Establishing a mapping between the extracted objects and their associated specific features;
[0055] For any two objects, if there is a correlation between the associated specific features related to the feature task or there is a correlation between the objects related to the feature task, an object relationship is established between the two objects.
[0056] In some embodiments of the present invention, the first feature associated with the water source: water source ID, pipe segment location, pipe diameter, pipe material, valve location, water pump location, terrain elevation, water pressure at the initial or design stage;
[0057] The first characteristics of branch association: branch ID, pipe segment location, pipe diameter, pipe material, valve location, water pump location, terrain elevation, water pressure at the initial or design stage;
[0058] The first features associated by the user: water source ID, pipe segment location, pipe diameter, pipe material, valve location, water pump location, terrain elevation, and water pressure at the initial or design stage;
[0059] In some embodiments of the present invention, the second characteristics associated with the water source include: water source ID, water source location, pressure, water flow, water quality indicators (residual chlorine, turbidity, dissolved oxygen, etc.), and water temperature;
[0060] Secondary features associated with branches: branch ID, branch location, pressure, water flow, water quality indicators (residual chlorine, turbidity, dissolved oxygen, etc.), water temperature;
[0061] Secondary features associated with users: user ID, user location, pressure, water flow, water quality indicators (residual chlorine, turbidity, dissolved oxygen, etc.), water temperature;
[0062] In some embodiments of the present invention, the associations related to the feature tasks include:
[0063] The branch to which the water source is connected;
[0064] The branch the user is connected to.
[0065] Step 400, input the first feature of the object connection of the ordered information into the basic information recognition model, the basic information recognition model includes a first backbone network, the first backbone network includes a first graph network layer and a first output layer, wherein the first graph network layer inputs the first feature of the object connection of the ordered information, outputs the first hidden feature to the first output layer, and the first output layer outputs the basic feature of the pipeline network.
[0066] Step 500, input the second feature of the object connection of the ordered information into the monitoring information recognition model, the monitoring information recognition model includes a second backbone network, the second backbone network includes a first time series layer, a second graph network layer and a second output layer, wherein the first time series layer inputs the second feature of the object connection of the ordered information, outputs the second hidden feature to the second graph network layer, the second graph network layer outputs the third hidden feature to the second output layer, and the second output layer outputs the monitoring feature.
[0067] In one embodiment of the present invention, the first sequential layer adopts a sequential neural network, such as RNN or LSTM or GRU.
[0068] One form of expression for the first temporal layer is as follows:
[0069]
[0070]
[0071]
[0072]
[0073] and : No. The activation vectors of the reset gate and update gate of the step;
[0074] : No. The candidate states generated by the step;
[0075] : No. The second hidden feature of the step;
[0076] : 1st, 2nd, 3rd, 4th, 5th, 6th transformation matrices (trainable parameters);
[0077] : 1st, 2nd, 3rd deviations (trainable parameters);
[0078] Indicates Timing units;
[0079] , hour
[0080] : Sigmoid activation function;
[0081] : tanh activation function.
[0082] The first network layer and the second network layer both adopt a multi-layer structure. The calculation formula of the layer is as follows:
[0083]
[0084] Indicates Layer object hidden features of objects, Indicates Layer object hidden features of objects, and Respectively represent and object and objects A collection of objects with object relationships. represents the cardinality of a set, Indicates the second network layer or the fourth network layer The plane recognition weight matrix of the layer, , Represents the total number of layers. In the first graph network, hour , Represents the specific features associated with the u-th object. In the second graph network, hour , , Indicates When the specific features of all sequential units associated with an object are input into the first sequential layer, the last one is output A hidden feature, is the total number of sequential units, hour Equal to object The second or third hidden feature of (the first graph network layer outputs the second hidden feature, and the second graph network layer outputs the third hidden feature, but the trainable parameters of the first graph network layer and the second graph network layer are different), is the sigmoid function.
[0085] The expression of the first output layer is as follows:
[0086]
[0087] in Represents a basic feature of a pipe network. Indicates Layer The second hidden feature of the object, Represents the collection of all objects, Represents the total number of layers, and FC represents fully connected.
[0088] The expression of the second output layer is as follows:
[0089]
[0090] in represents a monitoring feature, Indicates Layer The third hidden feature of the object, Represents the collection of all objects, Represents the total number of layers, and FC represents fully connected.
[0091] Step 600, the basic characteristics of the pipe network and the monitoring characteristics are spliced and input into the generation model, and the generation model outputs the current water age data of each object.
[0092] In one embodiment of the present invention, the generative model adopts GAN, which includes a generator and a discriminator. The loss function of the generative model is as follows:
[0093]
[0094] in, represents a generator, represents the discriminator, represents the game objective function between the discriminator and the generator, Indicates the distribution of real water age data Water age data sampled in The expected value of the discriminator is the logarithm of the probability of correctly classifying these water age data with the natural constant e as the base, Indicates that from the splicing feature The data sampled in , through the generator Generated data Discriminator The logarithm of the probability of correctly identifying a false positive to the base of the natural constant e, , Indicates the basic characteristics of the pipe network. Indicates monitoring characteristics, It means to splice the basic characteristics of the pipeline network and the monitoring characteristics together.
[0095] In one embodiment of the present invention, the existing water age simulation data is used to pre-train the generation model and initialize the parameters of the generator. and the parameters of the discriminator .
[0096] In one embodiment of the present invention, the training steps of the discriminator are as follows:
[0097] Step 611: Sampling a batch of water age samples from real data ,calculate ;
[0098] Step 612: Sampling from noise or prior distribution ,generate ,calculate ;
[0099] Step 613: Update the discriminator parameters , so that the discriminator can distinguish between real and generated samples;
[0100] The training steps of the generator are as follows:
[0101] Step 621: Generate a new water age sample ;
[0102] Step 622: Calculate the discriminator's discrimination result for the generated sample and call the physical simulation / constraint module at the same time Do a quick check to get the loss value that violates the laws of physics ;
[0103]
[0104] in, represents the generated water age data, represents the hydraulic / water quality mechanism model, Penalty(·) represents the measurement function for violations of physical laws (such as pressure gradient and water quality attenuation), is the measurement weight coefficient, the default value is 0.9, Represents the samples generated by the generator The expected value of the applied physical feasibility penalty;
[0105] Step 623: Minimize the generator’s loss function To update the generator parameters , gradually reducing the degree of violation of physical mechanisms, The formula is as follows:
[0106]
[0107] in, Indicates that from the splicing feature The data sampled in , by using the parameter Generator Generated data Discriminator The logarithm of the probability of correctly identifying a false positive with the natural constant e as the base, λ is the training balance weight, which is used to balance the weight of statistical loss and physical constraint loss, The initial value of is 0.1, and it increases with the increase of training rounds. The upper limit is 0.6. In the early stage of training, the generator is required to generate data that conforms to the distribution of training data. As the number of training rounds increases, the constraints of physical laws are improved.
[0108] And training rounds For linear or nonlinear growth relationships, e.g. ,in The maximum number of training rounds, the default value is 500.
[0109] In one embodiment of the present invention, steps 611-623 are repeated until a certain convergence condition is met or the maximum number of training rounds is reached, and the convergence condition includes the loss function of the generator If the value is less than the set threshold (for example, 0.01), the default value of the maximum number of training rounds is 500.
[0110] In at least one embodiment of the present invention, a water service performance data matching system is provided, which is used to store computer-readable instructions, and when the computer-readable instructions are read, the aforementioned water service performance data matching method can be executed.
[0111] The above describes an embodiment of the present invention, but this embodiment is not limited to the above-mentioned specific implementation mode. The above-mentioned specific implementation mode is merely illustrative and not restrictive. Under the guidance of this embodiment, ordinary technicians in this field can also make more forms of equivalent embodiments, all of which are within the protection of this embodiment.
Claims
1. A water service performance data matching method, characterized in that: The following steps are involved: Obtain basic information, including water source basic information, branch basic information and user end basic information; Obtain monitoring information, including water source monitoring information, branch monitoring information and user end information; Based on basic information and monitoring information, order information of two structural dimensions is constructed. The basic structural elements included in the first structural dimension are objects, including: water source, branch, user end; the basic structural elements included in the second structural dimension are time sequence units; the method for processing and obtaining order information includes: Objects for extracting orderliness information; Extract specific features associated with the object. The specific features include two types, namely, first features derived from basic information and second features derived from monitoring information. The extracted second features are divided into multiple parts according to the data collection cycle. One part is mapped to a time sequence unit. The order of the time sequence units is consistent with the time order of the collection cycle of the second features. Inputting the first feature of the object connection of the ordered information into the basic information recognition model, the basic information recognition model includes a first backbone network, the first backbone network includes a first graph network layer and a first output layer, wherein the first graph network layer inputs the first feature of the object connection of the ordered information, outputs the first hidden feature to the first output layer, and the first output layer outputs the basic feature of the pipeline network; Inputting the second feature of the object connection of the ordered information into the monitoring information recognition model, the monitoring information recognition model includes a second backbone network, the second backbone network includes a first time sequence layer, a second graph network layer and a second output layer, wherein the first time sequence layer inputs the second feature of the object connection of the ordered information, outputs the second hidden feature to the second graph network layer, the second graph network layer outputs the third hidden feature to the second output layer, and the second output layer outputs the monitoring feature; The basic characteristics of the pipeline network and the monitoring characteristics are spliced and input into the generation model, which then outputs the current water age data of each object.
2. A water service performance data matching method according to claim 1, characterized in that: Establishing a mapping between the extracted objects and their associated specific features; For any two objects, if there is a correlation between the associated specific features related to the feature task or there is a correlation between the objects related to the feature task, an object relationship is established between the two objects.
3. A water service performance data matching method according to claim 2, characterized in that: The first characteristics associated with water sources: water source ID, pipe segment location, pipe diameter, pipe material, valve location, water pump location, terrain elevation, and water pressure at the initial or design stage; The first characteristics of branch association: branch ID, pipe segment location, pipe diameter, pipe material, valve location, water pump location, terrain elevation, water pressure at the initial or design stage; The first features associated by the user: water source ID, pipe segment location, pipe diameter, pipe material, valve location, water pump location, terrain elevation, and water pressure at the initial or design stage; The second characteristics associated with water sources: water source ID, water source location, pressure, water flow, water quality index, and water temperature; Secondary features associated with branches: branch ID, branch location, pressure, water flow, water quality index, and water temperature; Secondary features associated with the user: user ID, user location, pressure, water flow, water quality index, and water temperature.
4. A water service performance data matching method according to claim 2, characterized in that: The correlations related to the feature tasks include: The branch to which the water source is connected; The branch the user is connected to.
5. A water service performance data matching method according to claim 1, characterized in that: The generative model uses GAN, which includes a generator and a discriminator. The loss function of the generative model is as follows: ; in, represents a generator, represents the discriminator, represents the game objective function between the discriminator and the generator, Indicates the distribution of real water age data Water age data sampled in The expected value of the discriminator is the logarithm of the probability of correctly classifying these water age data with the natural constant e as the base, Indicates that from the splicing feature The data sampled in , through the generator Generated data Discriminator The logarithm of the probability of correctly identifying a false positive to the base of the natural constant e, , Indicates the basic characteristics of the pipe network. Indicates monitoring characteristics, It means to splice the basic characteristics of the pipeline network and the monitoring characteristics together.
6. A water service performance data matching method according to claim 5, characterized in that: Use the existing water age simulation data to pre-train the generative model and initialize the parameters θ of the generator and ϕ of the discriminator.
7. A water service performance data matching method according to claim 6, characterized in that: The training steps of the discriminator are as follows: Step 611: Sampling a batch of water age samples from real data ,calculate ; Step 612: Sampling from noise or prior distribution ,generate ,calculate ; Step 613: Update the discriminator parameters , so that the discriminator can distinguish between real and generated samples; The training steps of the generator are as follows: Step 621: Generate a new water age sample ; Step 622: Calculate the discriminator's discrimination result for the generated sample and call the physical simulation / constraint module at the same time Do a quick check to get the loss value that violates the laws of physics ; ; in, represents the generated water age data, represents the hydraulic / water quality mechanism model, Penalty(·) represents the metric function for violating physical laws, is the measurement weight coefficient, the default value is 0.9, Represents the samples generated by the generator The expected value of the applied physical feasibility penalty; Step 623: Minimize the generator’s loss function To update the generator parameters , gradually reducing the degree of violation of physical mechanisms, The formula is as follows: ; in, Indicates that from the splicing feature The data sampled in , by using the parameter Generator Generated data Discriminator The logarithm of the probability of correctly identifying a false positive with the natural constant e as the base, λ is the training balance weight, which is used to balance the weight of statistical loss and physical constraint loss, The initial value of is 0.1, and it increases with the increase of training rounds. The upper limit is 0.
6. In the early stage of training, the generator is required to generate data that conforms to the distribution of training data. As the number of training rounds increases, the constraints of physical laws are improved.
8. A water service performance data matching method according to claim 7, characterized in that: And training rounds The relationship is: ; The maximum number of training rounds is 500 by default.
9. A water service performance data matching system, characterized in that: It is used to store computer-readable instructions, which, when read, can execute a water service performance data matching method as described in any one of claims 1-8.
Citation Information
Patent Citations
Water age monitoring system and method for water supply network
CN111143992A
Meteorological information feature data generation method for multi-service application scene
CN114266283A
Water quality abnormal event identification and early warning method based on pipe network water quality spatio-temporal data
CN115470850A
Intelligent water affair internet-of-things partition metering early warning system and method
CN118959894A
Water affair system energy consumption optimization method based on multi-dimensional joint learning prediction
CN119048274A