Method and medium for water saving decision making of piping system embedded with optical probing device

The intelligent pipeline system, which combines FBG fiber array and PPO algorithm, enables rapid leak location and accurate water usage prediction, thereby improving the water-saving efficiency and response speed of the pipeline system.

CN121025397BActive Publication Date: 2026-02-06GUANGDONG HONGYI XINGBANG INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511534731.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-02-06
Estimated Expiration
2045-10-27

AI Technical Summary

Technical Problem

The existing pipeline system has a long leakage detection time, low valve opening adjustment accuracy, and lacks an intelligent water-saving decision-making mechanism.

Method used

FBG fiber array is used to monitor pipeline pressure and water quality spectrum, combined with PPO algorithm to optimize valve control, water demand is predicted by spatiotemporal attention model, and differentiated control is triggered based on spectral anomalies.

Benefits of technology

It enables rapid location of leaks, improves the accuracy of water usage forecasting and water-saving efficiency, reduces false alarm rates, and achieves a technological leap from passive response to proactive prevention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121025397B_ABST
    Figure CN121025397B_ABST
Patent Text Reader

Abstract

The application discloses a pipeline system water-saving decision generation method embedded with an optical detection device and a medium, and belongs to the field of fluid transportation and intelligent detection, wherein the method comprises the following steps: S100, synchronously collecting pressure distribution data and water quality spectrum data at different positions of a pipeline through an FBG optical fiber array arranged along the pipeline; S200, constructing a three-dimensional feature vector input space-time attention model to predict water demand; S300, based on the future water consumption prediction for several hours, taking the system overall water-saving rate and user water consumption satisfaction as reward signals, and iteratively optimizing the control strategy of valve opening degree through a PPO algorithm; S400, triggering differentiated control instructions according to the spectrum anomaly grades divided by the water quality spectrum data collected by the FBG sensor; the control instructions are sent to each monitoring terminal through LoRa wireless networking, and localized decision response is realized by relying on an edge computing node. The application can improve water-saving efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of fluid transportation and intelligent detection, and particularly relates to a pipeline system water-saving decision generation method embedded with an optical detection device and a medium. BACKGROUND

[0002] The existing pipeline system water-saving technology mainly includes leakage detection based on manual inspection, valve control with fixed time and quantity, and a simple threshold alarm system. These technologies generally have limitations such as response lag, extensive control, and isolated decision-making. The average time for discovering leakage in the existing pipeline system is more than 24 hours, and the valve opening adjustment precision is low.

[0003] There is an urgent need for a pipeline system water-saving decision generation method that organically combines optical detection technology and water-saving mechanisms to improve water resource utilization efficiency and achieve intelligent management. SUMMARY

[0004] The present application aims to at least solve one of the technical problems existing in the prior art. To this end, the present application proposes a pipeline system water-saving decision generation method embedded with an optical detection device, which can accurately locate pipeline leakage and dynamically predict water demand, and through a valve control strategy optimized by a PPO algorithm and a hierarchical response mechanism triggered by spectral anomalies, water-saving efficiency is improved while ensuring water supply safety.

[0005] The embodiment of the present application provides a pipeline system water saving decision generation method embedded in an optical detection device, and the method comprises the following steps: S100, pressure distribution data and water quality spectrum data at different positions of a pipeline are synchronously collected through an FBG fiber array arranged along the pipeline; when a leakage occurs, a position of a leakage point is located based on a strain response time difference generated by propagation of a pressure wave to different FBG sensor nodes and in combination with a propagation speed of the pressure wave in the pipeline; the position of the leakage point is used to dynamically reduce a weight value of a pipe section where the leakage point is located in a pipeline network topology weight matrix; S200, a three-dimensional feature vector input space-time attention model is constructed to predict water demand, the three-dimensional feature vector comprises a pipeline network topology weight matrix, a periodic water use mode feature and a turbidity-organic matter correlation spectrum; the pipeline network topology weight matrix represents a matrix of hydraulic correlation degrees between pipeline nodes, and an element weight value of the matrix is dynamically calculated according to diameters and lengths of connected pipelines; the periodic water use mode feature is a water use regularity feature with a period of 24 hours extracted from historical data based on an expanded convolutional neural network; the turbidity-organic matter correlation spectrum is a parameter representing comprehensive quality of water bodies analyzed from water quality spectrum data; the space-time attention model comprises an input encoding layer, an LSTM branch and a Transformer branch, and a future water consumption prediction is output through a gated fusion layer; S300, based on the future water consumption prediction, a system overall water saving rate and user water use satisfaction are taken as reward signals, and a control strategy of valve opening degree is iteratively optimized online through a PPO algorithm; S400, a differentiated control instruction is triggered according to a spectrum anomaly level divided by water quality spectrum data collected by the FBG sensor; the control instruction is sent to each monitoring terminal through LoRa wireless networking, and fast localized decision response is realized relying on an edge computing node.

[0006] The embodiment of the present application at least realizes the following beneficial effects: through real-time monitoring of the FBG fiber array, water use prediction of the space-time attention model and precise control of the PPO algorithm, the embodiment of the present application realizes a technical leap from passive response to active prevention and from experience decision to intelligent optimization, greatly improves response speed and improves water saving efficiency, and especially in complex scenes such as water quality mutation and pressure fluctuation, through triggering of differentiated control according to the spectrum anomaly level, the false alarm rate of the alarm can be reduced.

[0007] According to some embodiments of the present application, the construction method of the three-dimensional feature vector in step S200 comprises: a spatial correlation degree between nodes is calculated through a graph convolution network, a weight value is dynamically adjusted according to a pipeline diameter and a connection distance, and a pipeline network topology weight matrix is obtained; a spatial correlation degree between nodes is calculated through a graph convolution network, a weight value is dynamically adjusted according to a pipeline diameter and a connection distance, and a pipeline network topology weight matrix is obtained; and a formula for dynamically adjusting the weight value is:

[0008] ;

[0009] wherein Di, Dj is the pipe diameter of node i, j, is the pipe length between node i, j, is the smoothing coefficient, is the learnable parameter, and C is the material correction coefficient;

[0010] According to some embodiments of the present application, the formula for dynamically adjusting the weight value when detecting turbidity mutation introduces an attenuation term:

[0011] ;

[0012] wherein, is the formula for dynamically adjusting the weight value after introducing the attenuation term, is the turbidity gradient difference between node i, j, is the sensitivity coefficient; the 24-hour inflation convolution feature is obtained by extracting the water consumption feature pattern with a period of 24 hours through an inflation convolution kernel with a specific inflation rate; the coupling strength of absorbance at wavelengths of 254 nm and 365 nm is calculated by the Pearson correlation coefficient to obtain the turbidity-organic matter correlation spectrum.

[0013] According to some embodiments of the present application, the spatio-temporal attention model comprises: an input encoding layer for converting time information and spatial coordinates into learnable feature vectors; an LSTM branch with 128 hidden units, a sigmoid activation function for the forget gate, and a residual connection introduced for the output gate, for capturing the time evolution law of water consumption through the gating mechanism; a Transformer branch configured with 4 attention heads, a key-value dimension of 64, and a relative position encoding range covering 24 hours, for analyzing the spatial correlation of water consumption behavior in different regions; a feature fusion layer dynamically integrates the output results of the two branches to generate a future water consumption prediction with confidence evaluation.

[0014] According to some embodiments of the present application, the PPO algorithm in step S300 comprises: designing a comprehensive reward function containing water saving effect and user satisfaction indicators; constructing a deep neural network as a policy function approximator, which receives system state information and outputs a valve adjustment scheme; and continuously optimizing the control policy through a policy gradient method.

[0015] According to some embodiments of the present application, the design of the comprehensive reward function containing water saving effect and user satisfaction indicators comprises: integrating a water consumption deviation penalty term and a pressure comfort reward term through linear weighting to obtain a comprehensive reward function; the water consumption deviation penalty term is calculated based on the squared error of the actual water consumption and the target value, and the pressure comfort reward term quantitatively evaluates the deviation of pressure from the ideal value in the form of an exponential function; the calculation formula is:

[0016] ;

[0017] wherein R is a composite reward function, , is a weight coefficient, Qa is an actual flow rate, Qt is a target flow rate, P is a measured pressure, and Pi is an ideal pressure value.

[0018] According to some embodiments of the present application, the constructing a deep neural network as a policy function approximator comprises a double network structure adopting an Actor-Critic architecture, wherein an Actor network receives system state information input containing pressure and flow rate time series features, extracts time series features through an LSTM layer, and then outputs Gaussian distribution parameters of valve adjustment actions, and a Critic network shares a feature extraction layer and outputs state value estimates.

[0019] According to some embodiments of the present application, the continuously optimizing the control policy through a policy gradient method comprises calculating action advantage values using generalized advantage estimation, limiting parameter variation amplitude through clipping a policy update ratio, and a target function containing both a policy optimization term and a value function error term.

[0020] According to some embodiments of the present application, the spectrum anomaly level in step S400 comprises a first-level anomaly, and the corresponding control instruction is to trigger a warning; a second-level anomaly, and the corresponding control instruction is to trigger valve fine tuning to isolate a local pipe section; and a third-level anomaly, and the corresponding control instruction is to trigger emergency closing of related valves and starting a purification program.

[0021] Another aspect of the embodiments of the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method described above.

[0022] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS

[0023] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, including the appended drawings.

[0024] Figure 1 FIG. 4 is a flowchart of a method according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] Embodiments of the present application are described below in detail, examples of which are shown in the drawings, wherein the same or similar reference numbers represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the drawings are exemplary only, and are for the purpose of explanation of the present application, and are not to be understood as a limitation of the present application.

[0026] In the description of the present application, the meaning of one or more is one or more, the meaning of multiple is two or more, greater than, less than, more than, etc. are understood as not including the number, above, below, within, etc. are understood as including the number. If it is described that the first, the second is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or implicitly indicating the order of indicated technical features.

[0027] Noun explanation:

[0028] FBG fiber array: a sensing network composed of multiple fiber Bragg gratings (FBG), which monitors pipeline pressure, temperature and other parameters by measuring the change of grating reflection wavelength. Its core principle is that the change of external physical quantity leads to the change of grating period, and then causes the displacement of reflected spectrum.

[0029] Space-time attention model: a hybrid neural network that combines time series modeling (LSTM) and spatial correlation analysis (Transformer), dynamically integrates local time series features and global spatial dependencies through gating mechanism. The input encoding layer converts the space-time information into vector representation, and the output layer generates prediction values with confidence interval.

[0030] PPO algorithm: a reinforcement learning algorithm for proximal policy optimization, which uses clipping objective function to limit the amplitude of policy update, balances exploration and utilization through advantage estimation, and is suitable for valve control optimization in continuous action space.

[0031] Reference Figure 1 , the embodiment of the present application proposes a pipeline system water saving decision generation method embedded with optical detection equipment, comprising:

[0032] S100, synchronously collecting pressure distribution data and water quality spectrum data at different positions of the pipeline through the FBG fiber array arranged along the pipeline; when a leak occurs, based on the strain response time difference generated by the propagation of pressure wave to different FBG sensor nodes, combined with the propagation speed of pressure wave in the pipeline, the position of the leak point is located; the position of the leak point is used to dynamically reduce the weight value of the pipe section where the leak point is located in the pipe network topology weight matrix.

[0033] S200. Construct a three-dimensional feature vector input spatiotemporal attention model for water demand prediction. The three-dimensional feature vector includes: a pipe network topology weight matrix, periodic water use pattern features, and a turbidity-organic matter correlation spectrum. The pipe network topology weight matrix represents the hydraulic correlation between pipe nodes, and the element weights of the matrix are dynamically calculated based on the diameter and length of the connected pipes. The periodic water use pattern features are water use regularity features with a 24-hour cycle extracted from historical data based on a dilated convolutional neural network. The turbidity-organic matter correlation spectrum is a parameter representing the overall water quality obtained from water quality spectral data. The spatiotemporal attention model includes an input encoding layer, an LSTM branch, and a Transformer branch, and outputs a water consumption prediction for the next few hours through a gated fusion layer.

[0034] S300 uses the PPO algorithm to iteratively optimize valve opening control strategy online based on water consumption forecasts for the next few hours, with the overall system water saving rate and user water satisfaction as reward signals.

[0035] The S400 triggers differentiated control commands based on the spectral anomaly levels determined by the water quality spectral data collected by the FBG sensor; it then distributes these commands to each monitoring terminal via LoRa wireless networking and achieves rapid localized decision-making response by relying on edge computing nodes.

[0036] Traditional water demand forecasting models typically rely solely on basic time-series data such as historical water consumption and ambient temperature and humidity. However, the three-dimensional feature vector constructed in this invention incorporates key parameters such as a pipeline topology weight matrix (reflecting the strength of hydraulic correlations within the pipelines) and a turbidity-organic matter correlation spectrum (quantifying water quality change trends). Through 24-hour dilated convolution features, it can simultaneously capture hourly fluctuations and daily cycle patterns, thereby reducing the prediction error rate.

[0037] Compared to existing LSTM models, which can only process single-point time series data and are difficult to analyze the spatial correlation of cross-regional water use behavior, the spatiotemporal attention model of this invention can establish global correlations between pipeline network nodes through Transformer branches and dynamically integrate local time series features (such as morning and evening peak hours in residential areas) with global patterns (such as periodic water use in industrial areas) by combining gating fusion mechanisms, thereby improving the prediction response speed in sudden water use scenarios (such as fire emergency).

[0038] Traditional water quality threshold alarm systems cannot handle complex scenarios such as sudden changes in water quality. However, the model in this invention monitors water quality changes in real time using a turbidity-organic matter correlation spectrum. When a pollution event is detected, the prediction weights can be adjusted immediately, triggering a differentiated control strategy.

[0039] In some embodiments, the data acquisition process of the FBG fiber array in step S100 includes: real-time monitoring of the internal pressure change of the pipeline by measuring the wavelength shift of the fiber Bragg grating, while using the transmission spectrum analysis technology to obtain the turbidity parameter and the organic matter concentration index of the water body; calculating the strain response time based on the time difference of the propagation of the light signal in the optical fiber, and determining the spatial position coordinates of the leakage point in combination with the pipeline network topology.

[0040] In some embodiments, the construction method of the three-dimensional feature vector in step S200 includes: calculating the spatial correlation degree between nodes through a graph convolution network, and dynamically adjusting the weight value according to the pipeline diameter and the connection distance to obtain a pipeline network topology weight matrix; extracting a 24-hour water consumption feature mode through an inflation convolution kernel with a specific inflation rate to obtain a 24-hour inflation convolution feature; calculating the coupling strength of the absorbance at 254 nm and 365 nm wavelengths through a Pearson correlation coefficient to obtain a turbidity-organic matter correlation spectrum.

[0041] In this embodiment, the formula for dynamically adjusting the weight value is:

[0042] ;

[0043] wherein Di and Dj are the pipe diameters of nodes i and j, is the length of the pipeline between nodes i and j, is a smoothing coefficient, is a learnable parameter, and C is a material correction coefficient;

[0044] When a turbidity mutation is detected, the formula for dynamically adjusting the weight value introduces a decay term:

[0045] ;

[0046] wherein, is the formula for dynamically adjusting the weight value after introducing the decay term, is the turbidity gradient difference between nodes i and j, is a sensitivity coefficient. This embodiment increases the dynamic influence mechanism of the water quality parameter (turbidity gradient) on the weight matrix. When a pollutant diffusion is detected, the system will automatically enhance the correlation weight of the downstream nodes.

[0047] In this embodiment, by adjusting the weight distribution, the system can preferentially allocate resources to high-weight nodes (such as trunk pipes and booster pump stations), achieving precision flow control. For example, during peak water consumption periods, the weight can be tilted towards key water distribution pipes to reduce the risk of local pressure fluctuations. The weight matrix of this embodiment can reduce pipe network leakage rates. When the weight matrix of this embodiment is linked with a real-time monitoring system, it can quickly locate high-risk nodes. When the pressure of a pipe in a certain area is abnormal, the system automatically increases the weight of the node and triggers an early warning, shortening the average response time to faults. In the event of a sudden pipe explosion, the weight of the faulty pipe segment can be automatically reduced, while the weight of the backup path is increased, achieving second-level flow redistribution; in the event of water pollution, the weight of the pollution source node is zero, triggering an emergency shutdown mechanism, and a flushing program is started through a high-weight branch.

[0048] In some embodiments, the spatio-temporal attention model includes: an input encoding layer for converting time information and spatial coordinates into learnable feature vectors; an LSTM branch with 128 hidden units, a sigmoid activation function for the forget gate, and a residual connection for the output gate, for capturing the temporal evolution of water consumption through a gating mechanism; a Transformer branch with 4 attention heads, a key-value dimension of 64, and a relative position encoding range of 24 hours, for analyzing the spatial correlation of water consumption behavior in different regions; a feature fusion layer that dynamically integrates the output results of the two branches to generate a future water consumption prediction with confidence assessment.

[0049] In some embodiments, the PPO algorithm in step S300 includes: designing a comprehensive reward function that includes water saving effect and user satisfaction indicators; constructing a deep neural network as a policy function approximator that receives system state information and outputs a valve adjustment scheme; and continuously optimizing the control policy through a policy gradient method.

[0050] In some embodiments, designing a comprehensive reward function that includes water saving effect and user satisfaction indicators includes: integrating a water consumption deviation penalty term and a pressure comfort reward term through linear weighting to obtain a comprehensive reward function; calculating the water consumption deviation penalty term based on the squared error of the actual water consumption and the target value, and quantitatively evaluating the pressure deviation from the ideal value using an exponential function form for the pressure comfort reward term; the calculation formula is:

[0051] ;

[0052] where R is the comprehensive reward function, , is the weight coefficient, Qa is the actual flow, Qt is the target flow, P is the measured pressure, and Pi is the ideal pressure value.

[0053] In some embodiments, constructing the deep neural network as a policy function approximator comprises adopting a two-network structure of Actor-Critic architecture, wherein the Actor network receives system state information input containing pressure and flow time series features, outputs the Gaussian distribution parameters of valve adjustment actions after extracting time series features through an LSTM layer, and the Critic network shares the feature extraction layer and outputs state value estimates.

[0054] In some embodiments, continuously optimizing the control policy by a policy gradient method comprises adopting generalized advantage estimation to calculate action advantage values, limiting the parameter variation amplitude by clipping the policy update ratio, and the objective function containing both policy optimization terms and value function error terms.

[0055] In some embodiments, the spectrum anomaly level in step S400 comprises a first-level anomaly, corresponding control instruction being triggering a warning; a second-level anomaly, corresponding control instruction being triggering valve fine tuning to isolate local pipe sections; and a third-level anomaly, corresponding control instruction being triggering emergency closing of related valves and starting a purification program.

[0056] While specific embodiments are described herein, one of ordinary skill in the art will appreciate that many other modifications or alternative embodiments are within the scope of the present disclosure. For example, any of the functions and / or processing capabilities described in connection with a particular device or component can be performed by any other device or component. Additionally, while various illustrative implementations and architectures have been described in accordance with embodiments of the present disclosure, one of ordinary skill in the art will appreciate that many other modifications to the illustrative implementations and architectures described herein are within the scope of the present disclosure.

[0057] Certain aspects of the present disclosure are described above with reference to flowchart and block diagrams of systems, methods, systems, and / or computer program products according to example embodiments. It will be understood that each block of the flowchart and block diagrams, and combinations of blocks in the flowchart and block diagrams, can be implemented by computer executable program instructions. Also, it will be understood that one or more blocks of the flowchart and block diagrams, and combinations of blocks in the flowchart and block diagrams, can be implemented by special purpose hardware-based computer systems which perform the specified functions, or combinations of special purpose hardware and computer instructions.

[0058] Accordingly, blocks in the flowchart and block diagrams support combinations of means for performing the specified functions, combinations of elements or steps for performing the specified functions, and program instruction means for performing the specified functions. It will also be understood that each block of the flowchart and block diagrams, and combinations of blocks in the flowchart and block diagrams, can be implemented by special purpose hardware-based computer systems which perform the specified functions either unilaterally or in conjunction with other systems.

[0059] The program modules, applications, and the like described herein can include one or more software components, including, for example, software objects, methods, data structures, and the like. Each such software component can include computer-executable instructions that, in response to execution by a computer, cause at least a portion of the functionality described herein (e.g., one or more operations of the example methods described herein) to be performed.

[0060] Software components can be encoded in any of a variety of programming languages. One example programming language can be a low-level programming language, such as an assembly language associated with a particular hardware architecture and / or operating system platform. Software components including assembly language instructions can need to be translated by an assembler into executable machine code before execution by the hardware architecture and / or platform. Another example programming language can be a higher-level programming language, which can be portable across multiple architectures. Software components including a higher-level programming language can need to be translated by an interpreter or compiler into an intermediate representation before execution. Other examples of programming languages include, but are not limited to, a macro language, a shell or command language, a job control language, a script language, a database query or search language, or a report writing language. In one or more example embodiments, a software component including instructions of one of the above examples of programming languages can be executed directly by an operating system or other software component without first being translated into another form.

[0061] Software components can be stored as files or other data storage constructs. Software components of a similar type or related function can be stored together in a particular directory, folder, or library. Software components can be static (e.g., preset or fixed) or dynamic (e.g., created or modified at execution time).

[0062] The above embodiments of the present application have been described in detail but not limited to the above examples, within the scope of knowledge of those skilled in the art, various changes can be made without departing from the spirit of the present application.

Claims

1. A method for water saving decision making for embedded pipeline system of optical probing equipment, characterized in that, The method comprises the following steps: S100, synchronously collecting pressure distribution data and water quality spectrum data at different positions of the pipeline through an FBG optical fiber array arranged along the pipeline; When a leakage occurs, the position of the leakage point is located based on a time difference in strain response generated by propagation of a pressure wave to different FBG sensor nodes, in combination with a propagation speed of the pressure wave in the pipeline; the position of the leakage point is used to dynamically lower a weight value of a pipe section where the leakage point is located in a pipe network topology weight matrix; S200, a three-dimensional feature vector input space-time attention model is constructed for water demand prediction, the three-dimensional feature vector comprising: a pipe network topology weight matrix, a periodic water use mode feature, and a turbidity-organic matter correlation spectrum; the pipe network topology weight matrix represents a matrix of hydraulic correlation degrees between pipe nodes, and an element weight value of the matrix is dynamically calculated according to diameters and lengths of connected pipelines; the periodic water use mode feature is a water use regularity feature with a period of 24 hours extracted from historical data based on an expanded convolutional neural network; the turbidity-organic matter correlation spectrum is a parameter representing comprehensive water quality analyzed from water quality spectrum data; the space-time attention model comprises an input encoding layer, an LSTM branch, and a Transformer branch, and outputs future water consumption prediction with confidence evaluation through a gated fusion layer; S300, based on the future water consumption prediction, a control strategy of valve opening degree is iteratively optimized online by a PPO algorithm, with system overall water saving rate and user water use satisfaction degree as reward signals; S400, a differentiated control instruction is triggered according to a spectrum anomaly level divided based on water quality spectrum data collected by the FBG sensor; the control instruction is issued to each monitoring terminal through LoRa wireless networking, and localized decision response is realized relying on an edge computing node; The construction method of the three-dimensional feature vector in step S200 comprises: A graph convolution network is used to calculate spatial correlation degrees between nodes, and a weight value is dynamically adjusted according to pipeline diameters and connection distances, to obtain the pipe network topology weight matrix; a formula for dynamic adjustment of the weight value is as follows: ; wherein Di, Dj is the pipe diameter of nodes i, j, is the pipe length between nodes i, j, is the smoothing coefficient, is the learnable parameter, and C is the material correction coefficient.

2. The method of claim 1, wherein, The construction method of the three-dimensional feature vector in step S200 comprises: When a turbidity mutation is detected, the formula for dynamic adjustment of the weight value introduces a decay term: ; wherein, is the formula for dynamic adjustment of the weight value after introducing the attenuation term, is the turbidity gradient difference between nodes i, j, is the sensitivity coefficient.

3. The method of claim 1, wherein, The space-time attention model comprises: An input encoding layer is used to convert time information and spatial coordinates into learnable feature vectors; An LSTM branch is provided with 128 hidden units, a forgetting gate adopts a sigmoid activation function, and an output gate introduces a residual connection, and is used to capture time sequence evolution rules of water consumption through a gating mechanism; A Transformer branch is configured with 4 attention heads, a key-value dimension is set to 64, and a relative position encoding range covers 24 hours, and is used to analyze spatial correlation of water use behaviors in different regions; A feature fusion layer dynamically integrates output results of the two branches, to generate future water consumption prediction with confidence evaluation.

4. The method of claim 1, wherein, The PPO algorithm in step S300 comprises: A comprehensive reward function is designed to include water saving effect and user satisfaction indicators; A deep neural network is constructed as a policy function approximator, which receives system state information and outputs a valve regulation scheme; The control policy is continuously optimized by a policy gradient method.

5. The method of claim 4, wherein, The design includes a comprehensive reward function that integrates water saving effect and user satisfaction indicators, which comprises: The comprehensive reward function is obtained by linearly weighting a water consumption deviation penalty term and a pressure comfort reward term; the water consumption deviation penalty term is calculated based on the squared error of the actual water consumption and the target value, and the pressure comfort reward term quantitatively evaluates the deviation of pressure from the ideal value in the form of an exponential function; the calculation formula is: ; where R is the composite reward function, , is the weight coefficient, Qa is the actual flow, Qt is the target flow, P is the measured pressure, and Pi is the ideal pressure value.

6. The method of claim 4, wherein the method further comprises: The deep neural network is constructed as a policy function approximator, which includes a dual network structure with an Actor-Critic architecture, wherein the Actor network receives system state information including pressure and flow time series features as input, extracts time series features through an LSTM layer, and outputs Gaussian distribution parameters of valve regulation actions; the Critic network shares the feature extraction layer and outputs state value estimates.

7. The method of claim 4, wherein the method further comprises: The control policy is continuously optimized by a policy gradient method, which includes calculating action advantage values using generalized advantage estimation, limiting the parameter variation range by clipping the policy update ratio, and including both policy optimization terms and value function error terms in the objective function.

8. The method of claim 1, wherein, The spectral anomaly level in step S400 includes: First-level anomaly, the corresponding control instruction is to trigger a warning; Second-level anomaly, the corresponding control instruction is to trigger valve fine tuning to isolate the local pipe section; Third-level anomaly, the corresponding control instruction is to trigger emergency shutdown of related valves and start the purification program.

9. A computer-readable storage medium having stored thereon a computer program, the computer program being executed by a processor to implement the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Optical fiber leakage detection system suspended in water supply pipeline and monitoring method

    CN118959909A

  • Underground drainage pipeline hidden danger data analysis method based on big data

    CN120257103A