Water network water resource multi-agent regulation method and system
Patent Information
- Application Number
- CN202611202342.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-11-03
AI Technical Summary
Traditional water resource regulation systems face challenges in dealing with dynamic and complex modern water network systems, including long decision-making timelines, poor timeliness, inability to achieve second-level or hour-level responses, and centralized scheduling that ignores the natural game between physical nodes and management units, resulting in a lack of feasibility in allocation schemes.
A multi-agent control method is adopted to construct a multi-agent system consisting of surface water agent, groundwater agent, user agent, and management unit agent. Through distributed decoupling, adaptive control, reinforcement learning, and multi-objective optimization algorithms, a self-organizing collaborative allocation strategy is generated, actions that violate safety red lines are pruned, and high-precision islanded control and water rights transfer game are carried out to achieve distributed decision-making.
It improves the timeliness and feasibility of water resource regulation, enabling responses to sudden supply and demand imbalances or over-extraction risks within seconds or hours, optimizing water resource allocation, reducing decision-making time, and improving operation and maintenance efficiency.
Smart Images

Figure CN123032061A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart water conservancy technology, and more specifically, to a method and system for multi-agent regulation of water resources in a water network. Background Technology
[0002] With the deepening of modern smart water network construction, the joint scheduling of surface water and groundwater has become an important means of optimizing water resource allocation and managing red line risks. Traditional water resource regulation systems mostly rely on centralized expert algorithms, hydrodynamic mechanism models, or single large-scale mathematical programming models for unified scheduling. These methods are effective in dealing with relatively fixed water resource allocation, but they expose many technical bottlenecks when facing highly dynamic and spatially complex modern water network systems.
[0003] Modern water networks encompass complex spatial data, such as multiple water intakes, intricate river sections, and jointly regulated reservoirs; and multidimensional business data, such as dynamic water rights, water withdrawal permit quotas, and groundwater level red lines. Traditional centralized optimization algorithms face a severe "curse of dimensionality" during computation, resulting in long decision-making timelines and poor timeliness, making it impossible to achieve second-level or hour-level responses to sudden supply-demand imbalances or over-extraction risks.
[0004] Secondly, water resource regulation involves multiple stakeholders, including surface water managers, groundwater regulators, and local water users. Traditional systems forcibly use a "single objective function" for centralized scheduling with a "one-size-fits-all" approach, ignoring the natural game between various physical nodes and management units, resulting in allocation schemes that lack feasibility in actual implementation. Summary of the Invention
[0005] In order to overcome the above-mentioned defects of the prior art, the embodiments of the present invention provide a multi-agent regulation method and system for water network water resources, so as to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a multi-agent regulation method for water resources in a water network, comprising the following steps:
[0007] S1. Collect spatial and operational data of the water network and decouple them to the corresponding spatial nodes in a distributed manner according to the physical topology of the water network; construct a multi-agent system including surface water agents, groundwater agents, user agents, and management unit agents, and inject the decoupled spatial node data and red line constraints into the corresponding agents respectively;
[0008] S2. Monitor the water resource status of each spatial node. When a specific area triggers the preset over-extraction threshold, drive the relevant intelligent swarm in that area to adaptively shorten the control time step and drill down to focus on spatial granularity.
[0009] S3. Based on the hydrological expert rule algorithm, the boundary conditions of red line control and over-extraction identification are used as constraints to prune the action space of multi-agent reinforcement learning, remove actions that violate the safety red line, and obtain a candidate action set.
[0010] S4. Based on the environmental penalty factor dynamically adjusted by the management unit agent, water rights transfer and dynamic compensation game are triggered between the surface water agent, the groundwater agent and the user agent. The multi-objective optimization algorithm is used to solve the problem under multiple constraints to generate a self-organizing collaborative allocation strategy set.
[0011] S5 executes the selected scheme from the self-organizing collaborative allocation strategy set, drives the physical control nodes to coordinate and allocate, and feeds back the allocated hydrological status and business data to S2. Based on the risk elimination effect, the control parameters of the multi-agent are iteratively optimized through the reward function of reinforcement learning.
[0012] Preferably, as a preferred embodiment of the multi-agent regulation method for water network water resources according to the present invention, S1 specifically includes the following:
[0013] Based on the physical connectivity and geographic spatial distribution of the water network, a spatiotemporal topology matrix of the water network is constructed. The number of rows and columns of the spatiotemporal topology matrix of the water network is equal to the total number of spatial nodes in the water network, and any matrix element in the spatiotemporal topology matrix of the water network represents the spatial adjacency weight between the corresponding horizontal axis node and the vertical axis node.
[0014] Using a spatiotemporal topology matrix, a preset local decoupling algorithm function is used to perform geographic correlation mapping and decomposition on the collected spatial data of multiple water intakes, complex river sections, and coordinated reservoirs, as well as the operational data of dynamic water rights, water withdrawal permits, and groundwater level red lines, decoupling them into local datasets belonging to each spatial node. The local dataset of each spatial node is equal to the intersection dataset output by the local decoupling algorithm function after parsing and calculating the global multidimensional dataset, the spatiotemporal topology matrix of the water network, and the current node index number.
[0015] Based on the physical attributes and management functions of spatial nodes, four types of heterogeneous intelligent agents are constructed, and these four types of heterogeneous intelligent agents are combined into a multi-agent heterogeneous model set. Specifically, spatial nodes corresponding to joint-regulation reservoirs and complex river sections are instantiated as surface water intelligent agents, spatial nodes corresponding to groundwater sources are instantiated as groundwater intelligent agents, spatial nodes corresponding to multiple water intakes are instantiated as user intelligent agents, and nodes with watershed supervision functions are instantiated as management unit intelligent agents.
[0016] The local datasets after decoupling each spatial node are input into the corresponding intelligent agent as state space vectors. The state space vector is equal to a one-dimensional column vector composed of node spatial topological feature data, real-time hydrological status data, and historical hydrological pattern feature data arranged in chronological order. The groundwater level red line constraint and water withdrawal permit quota are converted into hard boundary conditions and injected into the corresponding groundwater intelligent agent and user intelligent agent, respectively. The hard boundary conditions include two hard constraint inequalities. Hard constraint inequality one states that the current real-time evolving groundwater level of the groundwater intelligent agent is greater than or equal to the preset groundwater level red line threshold. Hard constraint inequality two states that the actual daily water withdrawal of the user intelligent agent is less than or equal to the user's corresponding water withdrawal permit quota. By restricting the initial action selection range of multiple intelligent agents through hard constraint inequalities one and two, the distributed independent decision-making basis is constructed.
[0017] Preferably, as a preferred embodiment of the multi-agent regulation method for water network water resources according to the present invention, step S2 specifically includes the following:
[0018] The management unit intelligent agent extracts the current water level data of the groundwater intelligent agent and the current water extraction data of the user intelligent agent in each spatial node in real time, and compares them with the preset groundwater level red line threshold; the risk deviation formula is used to calculate the groundwater level risk evolution deviation rate of each spatial node; the groundwater level risk evolution deviation rate is equal to the difference obtained by subtracting the current water level data from the preset groundwater level red line threshold, and then dividing it by the groundwater level red line threshold.
[0019] The calculated groundwater level risk evolution deviation rate is compared with the preset critical risk threshold: when the groundwater level risk evolution deviation rate is less than or equal to the critical risk threshold, the current spatial node is classified as a normal, risk-free state; when the groundwater level risk evolution deviation rate is greater than the critical risk threshold, the current spatial node is classified as a groundwater over-extraction risk state.
[0020] When a spatial node is assessed as being in a normal, risk-free state, its corresponding intelligent agent swarm maintains a daily-scale global coarse-grained time step for normal allocation calculations; wherein, the time control variable of the intelligent agent swarm in the reinforcement learning policy network is set to an initial constant of twenty-four hours.
[0021] When a groundwater over-extraction risk is assessed, the management unit agent drives the agent swarm of the node and its adjacent associated nodes to trigger the spatiotemporal scale adaptive decomposition control equations, specifically including:
[0022] The first control equation is: change the time control variable of the agent swarm in the reinforcement learning policy network from the initial constant of 24 hours to a constant of 1 hour, adaptively shorten the time step of regulation to the hour scale, and improve the update and iteration frequency of the local reinforcement learning policy.
[0023] The second control equation is as follows: assign the associated weight element value of the node representing the risk-free area in the spatial state topology matrix of the system to a constant of zero. While shortening the time step, shut down the unnecessary data interaction of the agent in the risk-free area, activate the topology drilling mechanism in the high-risk area, and adjust the spatial granularity of regulation from the sub-basin level to the independent agent corresponding to the control section of the specific river section and the multiple water intakes, so as to realize the high-precision islanding regulation of the high-risk local network.
[0024] Preferably, as a preferred embodiment of the multi-agent regulation method for water network water resources according to the present invention, S3 specifically includes the following:
[0025] Historical and real-time hydrological data are extracted, and hydrological expert rule algorithms are used to calculate the upper limit of permissible groundwater extraction, the lower limit of ecological flow for river sections, and the daily water withdrawal permit for each water user at each spatial node. The upper limit, lower limit, and permit are then transformed into a set of hard boundary constraint equations, which include:
[0026] Constraint Equation 1: The water pumping volume of the water source corresponding to the current node is less than or equal to the upper limit of the allowable groundwater extraction volume;
[0027] Constraint Equation 2: The real-time flow of the river corresponding to the current node is greater than or equal to the ecological flow baseline of the river section;
[0028] Constraint Equation 3: The flow rate allocation value of the water intake corresponding to the current node is less than or equal to the daily water withdrawal permit.
[0029] Each heterogeneous intelligent agent generates an original action space matrix composed of a set of control parameters of the physical control node based on the current local node data and optimization objectives. The original action space matrix is represented as a two-dimensional matrix of M rows and K columns, where M represents the total number of candidate action vectors and K represents the dimension of the control parameters in a single action vector. The control parameters in a single action vector include, in order of priority, the pump gate opening and closing degree, the water intake flow rate allocation value, and the water source pumping volume.
[0030] Before each agent performs a policy search, a one-dimensional action compliance indicator vector is constructed, wherein the total number of elements in the one-dimensional action compliance indicator vector is equal to the number of rows M of the original action space matrix.
[0031] The parameters of the m-th action vector in the original action space matrix are substituted into constraint equations one, two, and three for verification, where m is a positive integer greater than or equal to one and less than or equal to M.
[0032] When the m-th action vector simultaneously satisfies constraint equation one, constraint equation two, and constraint equation three, the value of the m-th element in the one-dimensional action compliance indication vector is assigned to compliance constant one.
[0033] When the m-th action vector violates any one of constraint equation 1, constraint equation 2 and constraint equation 3, the value of the m-th element in the one-dimensional action compliance indication vector is assigned the violation constant zero.
[0034] After traversing all action vectors, the original action space matrix is subjected to row filtering product calculation using the one-dimensional action compliance indicator vector. All whole action vectors with corresponding element values of zero are removed from the original action space matrix, completing online dynamic pruning and outputting a candidate action set composed of the remaining whole row compliant action vectors.
[0035] Preferably, as a preferred embodiment of the multi-agent regulation method for water network water resources according to the present invention, S4 specifically includes the following:
[0036] When an over-extraction risk is triggered in a specific area, the management unit agent extracts the groundwater level risk evolution deviation rate of the current spatial node and calculates the dynamic environmental penalty factor for groundwater extraction through a preset nonlinear exponential coupling formula. The dynamic environmental penalty factor is equal to the preset basic penalty coefficient value multiplied by the power of the base of the natural logarithm, where the exponent of the power is the product of the preset risk weight coefficient and the groundwater level risk evolution deviation.
[0037] After the calculation is completed, the management unit agent broadcasts the dynamic environmental penalty factor as a global state variable to the groundwater agent;
[0038] The system drives surface water agents, groundwater agents, and user agents to engage in a distributed Nash equilibrium game within a candidate action set. Each agent dynamically constructs its own comprehensive game payoff function based on the received variables, specifically including:
[0039] Groundwater agent revenue reconstruction: The comprehensive game revenue function of the groundwater agent is equal to its initial water supply revenue value, minus the operating cost value, and then minus the product of the dynamic environment penalty factor and the current pumping volume;
[0040] Surface water and user agent revenue reconstruction: Constrained by the dynamic environment penalty factor, the comprehensive game revenue function value of the groundwater agent decreases, driving it to trigger state interaction logic, and by relinquishing part of the groundwater extraction rights, it sends a water transfer request instruction to the surface water agent.
[0041] The surface water agent responds to the water transfer request command, constructs a compensation cost calculation formula that includes water transfer loss and allocation cost, calculates the dynamic economic compensation offer value and feeds it back to the user agent and the groundwater agent. The dynamic economic compensation offer value is simultaneously increased in the comprehensive game payoff function of the user agent to guide the user agent to actively switch from groundwater extraction to surface water use.
[0042] The following are multiple strong constraint boundary conditions: the water supply safety factor is greater than the preset safety threshold, the current real-time water level is greater than or equal to the groundwater level red line threshold, the real-time river flow is greater than or equal to the ecological flow bottom line of the river section, and the actual daily water withdrawal is less than or equal to the water withdrawal permit amount.
[0043] With the combined dual optimization objectives of maximizing total water supply revenue and minimizing groundwater ecological damage, a multi-objective game matrix is constructed. The Pareto front dynamic optimization algorithm is used to perform distributed iterative solution of the comprehensive game payoff function of each agent. In each iteration, the action selection of each agent is updated until the solution vectors output by two adjacent iterations meet the preset non-dominant convergence termination condition, at which point the calculation stops and a self-organizing collaborative allocation strategy set is generated.
[0044] Preferably, as a preferred embodiment of the multi-agent regulation method for water network water resources according to the present invention, S5 specifically includes the following:
[0045] The management unit agent employs a decision-selection mechanism to select a target allocation scheme from a set of self-organizing collaborative allocation strategies. This mechanism calculates the overall global expected value of each scheme in the strategy set and determines the solution vector with the largest overall global expected value as the target allocation scheme. The agent then converts the control parameters of the target allocation scheme into hardware control commands, which are distributed in parallel to the corresponding physical control nodes via a communication network. This drives each physical control node to perform coordinated operations, adjusting the pump gate opening / closing degree, the intake flow allocation value, and the water source pumping volume. The physical control nodes include:
[0046] The system coordinates the deployment of pump gates, multiple water intakes, and groundwater source pumps at different geographical coordinates of the water network. The driving physical control nodes are coordinated and allocated, specifically by distributing hardware control commands in parallel through the communication network to adjust the opening and closing degree of the pump gates, the flow rate allocation value of the multiple water intakes, and the pumping volume of the groundwater source pumps.
[0047] After the physical control nodes execute the set cycle, the distributed spatiotemporal data sensing layer collects the updated dynamic groundwater level, river ecological flow, and actual water withdrawal of each user in real time at each spatial node of the water network. The updated data is compared with the corresponding groundwater level red line constraints and water withdrawal permit limits. A deviation calculation formula is used to output the risk elimination deviation for each spatial node. The risk elimination deviation is equal to the absolute value obtained by subtracting the corresponding red line constraint threshold or permit threshold from the updated actual data. The underlying protection architecture of the distributed spatiotemporal data sensing layer includes:
[0048] Flow velocity meters, water level sensors, and 3D laser scanning radars are distributed and deployed at different spatial nodes of the water network physical topology. The flow velocity meters and water level sensors capture real-time updates of river ecological flow and groundwater level, and the 3D laser scanning radar is used to dynamically construct 3D spatial point cloud data of intricate river sections and coordinated reservoirs. A data cleaning operator based on edge computing is configured on the local control terminal of the perception layer to perform spatiotemporal synchronization alignment and multi-source noise removal on the captured real-time hydrological data, generating a highly reliable local dataset of spatial nodes.
[0049] The risk elimination deviation is input as a state feedback variable into the multi-agent collaborative decision-making layer. The total reinforcement learning reward value of each agent is reconstructed through a preset segmented reward calculation formula, specifically including:
[0050] The total reward value for reinforcement learning is equal to the product of constant one and the positive reward value, plus the product of constant two and the negative penalty value;
[0051] Wherein, when the risk elimination deviation indicates that the current water level is greater than the water level red line threshold and the ecological flow is greater than or equal to the ecological flow bottom line, the positive reward value is equal to the product of the preset incentive value and the reciprocal of the risk elimination deviation.
[0052] When the risk elimination deviation indicates that the current actual water intake is greater than the water intake permit amount, the negative penalty value is equal to the product of the preset penalty constant value and the risk elimination deviation.
[0053] After calculating the total reward value of reinforcement learning, each agent constructs a loss function, which is equal to the negative of the total reward value of reinforcement learning. The partial derivatives of the loss function with respect to each control weight in the multi-agent reinforcement learning policy network are calculated using the backpropagation algorithm. The control weights are then iteratively updated using gradient descent with the partial derivatives and a preset learning rate to achieve online self-optimization of the control parameters.
[0054] This application also provides a multi-agent regulation system for water resources in a water network, specifically including a spatiotemporal decoupling and multi-agent construction module, a spatiotemporal scale adaptive decomposition control module, an action space pruning module, a water rights distributed game module, and a reinforcement learning self-optimization module;
[0055] The spatiotemporal decoupling and multi-agent construction module is used to collect spatial and business data of the water network and decouple them to the corresponding spatial nodes in a distributed manner according to the physical topology of the water network. At the same time, it is used to construct a multi-agent system including surface water agents, groundwater agents, user agents, and management unit agents, and inject the decoupled spatial node data and red line constraints into the corresponding agents to complete the construction of the distributed independent decision-making basis.
[0056] The spatiotemporal scale adaptive decomposition control module is used to monitor the water resource status of each spatial node and calculate the groundwater level risk evolution deviation rate of each spatial node using the risk deviation formula. When the groundwater level risk evolution deviation rate of a specific area triggers a preset critical risk threshold, the module drives the relevant intelligent swarm in that area to adaptively shorten the control time step and drill down to focus on spatial granularity, thereby achieving high-precision island-based control of high-risk local networks.
[0057] The action space pruning module is used to transform the boundary conditions of red line control and over-extraction identification into a set of hard boundary constraint equations based on the hydrological expert rule algorithm; and to construct the original action space matrix. Before each agent executes the policy search, compliance is verified by a one-dimensional action compliance indicator vector. The original action space of the multi-agent reinforcement learning is dynamically pruned online to remove actions that violate the safety red line and obtain a set of candidate actions.
[0058] The water rights distributed game module is used to reconstruct the comprehensive game payoff function of each agent by using the environmental penalty factor dynamically adjusted by the management unit agent, triggering water rights transfer and dynamic compensation game between the surface water agent, the groundwater agent and the user agent; and to construct a multi-objective game matrix, and use the Pareto front dynamic optimization algorithm to perform distributed iterative solution under multiple strong constraint boundary conditions to generate a self-organizing collaborative allocation strategy set.
[0059] The reinforcement learning self-optimization module is used to select a target allocation scheme from the self-organizing collaborative allocation strategy set using a decision selection mechanism, convert control parameters into hardware control commands and issue them to drive physical control nodes to perform collaborative allocation; at the same time, it is used to collect updated actual data again after a set period, calculate the risk elimination deviation and reconstruct the piecewise reward function accordingly, and dynamically update the control weight parameters in the multi-agent reinforcement learning network online through the backpropagation algorithm to achieve iterative optimization of the control parameters.
[0060] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0061] Through multi-level data collection and fusion, the organic combination of deep learning and traditional models, and intelligent decision support, comprehensive health monitoring of power distribution equipment has been achieved. By utilizing dynamic coupling mechanisms and comprehensive evaluation strategies, operation and maintenance efficiency can be greatly improved and failure rates reduced, providing effective support for power operation and maintenance personnel. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0063] Figure 1 This is a flowchart of the method of the present invention.
[0064] Figure 2 This is a diagram of the architecture of a distributed spatiotemporal data perception layer. Detailed Implementation
[0065] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0066] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0067] In the description of this application, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0068] Example 1
[0069] This embodiment provides, for example Figure 1 The proposed method for multi-agent regulation of water resources in a water network includes the following steps:
[0070] S1. Collect spatial and operational data of the water network and decouple them to the corresponding spatial nodes in a distributed manner according to the physical topology of the water network; construct a multi-agent system including surface water agents, groundwater agents, user agents, and management unit agents, and inject the decoupled spatial node data and red line constraints into the corresponding agents respectively;
[0071] S2. Monitor the water resource status of each spatial node. When a specific area triggers the preset over-extraction threshold, drive the relevant intelligent swarm in that area to adaptively shorten the control time step and drill down to focus on spatial granularity.
[0072] S3. Based on the hydrological expert rule algorithm, the boundary conditions of red line control and over-extraction identification are used as constraints to prune the action space of multi-agent reinforcement learning, remove actions that violate the safety red line, and obtain a candidate action set.
[0073] S4. Based on the environmental penalty factor dynamically adjusted by the management unit agent, water rights transfer and dynamic compensation game are triggered between the surface water agent, the groundwater agent and the user agent. The multi-objective optimization algorithm is used to solve the problem under multiple constraints to generate a self-organizing collaborative allocation strategy set.
[0074] S5 executes the selected scheme from the self-organizing collaborative allocation strategy set, drives the physical control nodes to coordinate and allocate, and feeds back the allocated hydrological status and business data to S2. Based on the risk elimination effect, the control parameters of the multi-agent are iteratively optimized through the reward function of reinforcement learning.
[0075] Preferably, in step S1, spatial data and operational data of the water network are collected and distributedly decoupled to corresponding spatial nodes according to the physical topology of the water network; a multi-agent system is constructed, including surface water agents, groundwater agents, user agents, and management unit agents, and the decoupled spatial node data and red line constraints are injected into the corresponding agents, specifically including the following:
[0076] Based on the physical connectivity and geographic spatial distribution of the water network, a spatiotemporal topology matrix of the water network is constructed. The number of rows and columns of the spatiotemporal topology matrix of the water network is equal to the total number of spatial nodes in the water network, and any matrix element in the spatiotemporal topology matrix of the water network represents the spatial adjacency weight between the corresponding horizontal axis node and the vertical axis node.
[0077] Using a spatiotemporal topology matrix, a preset local decoupling algorithm function is used to perform geographic correlation mapping and decomposition on the collected spatial data of multiple water intakes, complex river sections, and coordinated reservoirs, as well as the operational data of dynamic water rights, water withdrawal permits, and groundwater level red lines, decoupling them into local datasets belonging to each spatial node. The local dataset of each spatial node is equal to the intersection dataset output by the local decoupling algorithm function after parsing and calculating the global multidimensional dataset, the spatiotemporal topology matrix of the water network, and the current node index number.
[0078] Based on the physical attributes and management functions of spatial nodes, four types of heterogeneous intelligent agents are constructed, and these four types of heterogeneous intelligent agents are combined into a multi-agent heterogeneous model set. Specifically, spatial nodes corresponding to joint-regulation reservoirs and complex river sections are instantiated as surface water intelligent agents, spatial nodes corresponding to groundwater sources are instantiated as groundwater intelligent agents, spatial nodes corresponding to multiple water intakes are instantiated as user intelligent agents, and nodes with watershed supervision functions are instantiated as management unit intelligent agents.
[0079] The local datasets after decoupling each spatial node are input into the corresponding intelligent agent as state space vectors. The state space vector is equal to a one-dimensional column vector composed of node spatial topological feature data, real-time hydrological status data, and historical hydrological pattern feature data arranged in chronological order. The groundwater level red line constraint and water withdrawal permit quota are converted into hard boundary conditions and injected into the corresponding groundwater intelligent agent and user intelligent agent, respectively. The hard boundary conditions include two hard constraint inequalities. Hard constraint inequality one is that the current real-time evolving groundwater level of the groundwater intelligent agent is greater than or equal to the preset groundwater level red line threshold. Hard constraint inequality two is that the actual daily water withdrawal of the user intelligent agent is less than or equal to the user's corresponding water withdrawal permit quota. By limiting the initial action selection range of the multiple intelligent agents through the above two hard constraint inequalities, the distributed independent decision-making basis is completed.
[0080] Preferably, in step S2, the water resource status of each spatial node is monitored. When a preset over-extraction threshold is triggered in a specific area, the relevant intelligent swarm in that area is driven to adaptively shorten the control time step and drill down to focus on spatial granularity. Specifically, this includes the following:
[0081] The management unit intelligent agent extracts the current water level data of the groundwater intelligent agent and the current water extraction data of the user intelligent agent in each spatial node in real time, and compares them with the preset groundwater level red line threshold; the risk deviation formula is used to calculate the groundwater level risk evolution deviation rate of each spatial node; the groundwater level risk evolution deviation rate is equal to the difference obtained by subtracting the current water level data from the preset groundwater level red line threshold, and then dividing it by the groundwater level red line threshold.
[0082] The calculated groundwater level risk evolution deviation rate is compared with the preset critical risk threshold: when the groundwater level risk evolution deviation rate is less than or equal to the critical risk threshold, the current spatial node is classified as a normal, risk-free state; when the groundwater level risk evolution deviation rate is greater than the critical risk threshold, the current spatial node is classified as a groundwater over-extraction risk state.
[0083] When a spatial node is assessed as being in a normal, risk-free state, its corresponding intelligent agent swarm maintains a daily-scale global coarse-grained time step for normal allocation calculations; the time control variable of the intelligent agent swarm in the reinforcement learning policy network is set to an initial constant of twenty-four hours.
[0084] When a groundwater over-extraction risk is assessed, the management unit agent drives the agent swarm of the node and its adjacent associated nodes to trigger the spatiotemporal scale adaptive decomposition control equations, specifically including:
[0085] The first control equation is: change the time control variable of the agent swarm in the reinforcement learning policy network from the initial constant of 24 hours to a constant of 1 hour, adaptively shorten the time step of regulation to the hour scale, and improve the update and iteration frequency of the local reinforcement learning policy.
[0086] The second control equation is as follows: assign the associated weight element value of the node representing the risk-free area in the spatial state topology matrix of the system to a constant of zero. While shortening the time step, shut down the unnecessary data interaction of the agent in the risk-free area, activate the topology drilling mechanism in the high-risk area, and adjust the spatial granularity of regulation from the sub-basin level to the independent agent corresponding to the control section of the specific river section and the multiple water intakes, so as to realize the high-precision islanding regulation of the high-risk local network.
[0087] Preferably, in step S3, based on the hydrological expert rule algorithm, the boundary conditions of red line control and over-extraction identification are used as constraints to prune the action space of multi-agent reinforcement learning, eliminating actions that violate the safety red line, and obtaining a candidate action set, which specifically includes the following:
[0088] Historical and real-time hydrological data are extracted, and hydrological expert rule algorithms are used to calculate the upper limit of permissible groundwater extraction, the lower limit of ecological flow for river sections, and the daily water withdrawal permit for each water user at each spatial node. The upper limit, lower limit, and permit are then transformed into a set of hard boundary constraint equations, which include:
[0089] Constraint Equation 1: The water pumping volume of the water source corresponding to the current node is less than or equal to the upper limit of the allowable groundwater extraction volume;
[0090] Constraint Equation 2: The real-time flow of the river corresponding to the current node is greater than or equal to the ecological flow baseline of the river section;
[0091] Constraint Equation 3: The flow rate allocation value of the water intake corresponding to the current node is less than or equal to the daily water withdrawal permit.
[0092] Each heterogeneous intelligent agent generates an original action space matrix composed of a set of control parameters of the physical control node based on the current local node data and optimization objectives. The original action space matrix is represented as a two-dimensional matrix of M rows and K columns, where M represents the total number of candidate action vectors and K represents the dimension of the control parameters in a single action vector. The control parameters in a single action vector include, in order of priority, the pump gate opening and closing degree, the water intake flow rate allocation value, and the water source pumping volume.
[0093] Before each agent performs a policy search, a one-dimensional action compliance indicator vector is constructed, wherein the total number of elements in the one-dimensional action compliance indicator vector is equal to the number of rows M of the original action space matrix.
[0094] The parameters of the m-th action vector in the original action space matrix are substituted into constraint equations one, two, and three for verification, where m is a positive integer greater than or equal to one and less than or equal to M.
[0095] When the m-th action vector simultaneously satisfies constraint equation one, constraint equation two, and constraint equation three, the value of the m-th element in the one-dimensional action compliance indication vector is assigned to compliance constant one.
[0096] When the m-th action vector violates any one of constraint equation 1, constraint equation 2 and constraint equation 3, the value of the m-th element in the one-dimensional action compliance indication vector is assigned the violation constant zero.
[0097] After traversing all action vectors, the original action space matrix is subjected to row filtering product calculation using the one-dimensional action compliance indicator vector. All whole action vectors with corresponding element values of zero are removed from the original action space matrix, completing online dynamic pruning and outputting a candidate action set composed of the remaining whole row compliant action vectors.
[0098] Preferably, in step S4, based on the environmental penalty factor dynamically adjusted by the management unit agent, a water rights transfer and dynamic compensation game is triggered between the surface water agent, the groundwater agent, and the user agent. A multi-objective optimization algorithm is then used to solve the problem under multiple constraints, generating a self-organizing collaborative allocation strategy set, specifically including the following:
[0099] When an over-extraction risk is triggered in a specific area, the management unit agent extracts the groundwater level risk evolution deviation rate of the current spatial node and calculates the dynamic environmental penalty factor for groundwater extraction through a preset nonlinear exponential coupling formula. The dynamic environmental penalty factor is equal to the preset basic penalty coefficient value multiplied by the power of the base of the natural logarithm, where the exponent of the power is the product of the preset risk weight coefficient and the groundwater level risk evolution deviation.
[0100] After the calculation is completed, the management unit agent broadcasts the dynamic environmental penalty factor as a global state variable to the groundwater agent;
[0101] The system drives surface water agents, groundwater agents, and user agents to engage in a distributed Nash equilibrium game within a candidate action set. Each agent dynamically constructs its own comprehensive game payoff function based on the received variables, specifically including:
[0102] The comprehensive game payoff function of the groundwater intelligent agent is equal to its initial water supply payoff value, minus the operating cost value, and then minus the product of the dynamic environment penalty factor and the current pumping volume.
[0103] Constrained by the dynamic environmental penalty factor, the comprehensive game payoff function value of the groundwater agent decreases, driving it to trigger state interaction logic, and by relinquishing part of the groundwater extraction rights, it sends a water transfer request instruction to the surface water agent.
[0104] The surface water agent responds to the water transfer request command, constructs a compensation cost calculation formula that includes water transfer loss and allocation cost, calculates the dynamic economic compensation offer value and feeds it back to the user agent and the groundwater agent. The dynamic economic compensation offer value is simultaneously increased in the comprehensive game payoff function of the user agent to guide the user agent to actively switch from groundwater extraction to surface water use.
[0105] The following are multiple strong constraint boundary conditions: the water supply safety factor is greater than the preset safety threshold, the current real-time water level is greater than or equal to the groundwater level red line threshold, the real-time river flow is greater than or equal to the ecological flow bottom line of the river section, and the actual daily water withdrawal is less than or equal to the water withdrawal permit amount.
[0106] With the combined dual optimization objectives of maximizing total water supply revenue and minimizing groundwater ecological damage, a multi-objective game matrix is constructed. The Pareto front dynamic optimization algorithm is used to perform distributed iterative solution of the comprehensive game payoff function of each agent. In each iteration, the action selection of each agent is updated until the solution vectors output by two adjacent iterations meet the preset non-dominant convergence termination condition, at which point the calculation stops and a self-organizing collaborative allocation strategy set is generated.
[0107] Preferably, in step S5, the selected scheme from the self-organizing collaborative allocation strategy set is executed to drive the physical control nodes to perform collaborative allocation, and the allocated hydrological status and business data are fed back to step S2. Based on the risk elimination effect, the control parameters of the multi-agent system are iteratively optimized through the reward function of reinforcement learning, specifically including the following:
[0108] The management unit agent employs a decision-selection mechanism to select a target allocation scheme from a set of self-organizing collaborative allocation strategies. This mechanism calculates the overall global expected value of each scheme in the strategy set and determines the solution vector with the largest overall global expected value as the target allocation scheme. The agent then converts the control parameters of the target allocation scheme into hardware control commands, which are distributed in parallel to the corresponding physical control nodes via a communication network. This drives each physical control node to perform coordinated operations, adjusting the pump gate opening / closing degree, the intake flow allocation value, and the water source pumping volume. The physical control nodes include:
[0109] The system coordinates the deployment of pump gates, multiple water intakes, and groundwater source pumps at different geographical coordinates of the water network. The driving physical control nodes are coordinated and allocated, specifically by distributing hardware control commands in parallel through the communication network to adjust the opening and closing degree of the pump gates, the flow rate allocation value of the multiple water intakes, and the pumping volume of the groundwater source pumps.
[0110] After the physical control nodes execute the set cycle, the distributed spatiotemporal data sensing layer collects the updated dynamic groundwater level, river ecological flow, and actual water withdrawal of each user in real time at each spatial node of the water network. The updated data is compared with the corresponding groundwater level red line constraints and water withdrawal permit limits. The risk elimination deviation of each spatial node is output using the deviation calculation formula. The risk elimination deviation is equal to the absolute value obtained by subtracting the corresponding red line constraint threshold or permit threshold from the updated actual data.
[0111] like Figure 2As shown, the underlying protection architecture of the distributed spatiotemporal data perception layer includes:
[0112] Flow velocity meters, water level sensors, and 3D laser scanning radars are distributed and deployed at different spatial nodes of the water network physical topology. The flow velocity meters and water level sensors capture real-time updates of river ecological flow and groundwater level, and the 3D laser scanning radar is used to dynamically construct 3D spatial point cloud data of intricate river sections and coordinated reservoirs. A data cleaning operator based on edge computing is configured on the local control terminal of the perception layer to perform spatiotemporal synchronization alignment and multi-source noise removal on the captured real-time hydrological data, generating a highly reliable local dataset of spatial nodes.
[0113] The risk elimination deviation is input as a state feedback variable into the multi-agent collaborative decision-making layer. The total reinforcement learning reward value of each agent is reconstructed through a preset segmented reward calculation formula, specifically including:
[0114] The total reward value for reinforcement learning is equal to the product of constant one and the positive reward value, plus the product of constant two and the negative penalty value;
[0115] Wherein, when the risk elimination deviation indicates that the current water level is greater than the water level red line threshold and the ecological flow is greater than or equal to the ecological flow bottom line, the positive reward value is equal to the product of the preset incentive value and the reciprocal of the risk elimination deviation.
[0116] When the risk elimination deviation indicates that the current actual water intake is greater than the water intake permit amount, the negative penalty value is equal to the product of the preset penalty constant value and the risk elimination deviation.
[0117] After calculating the total reward value of reinforcement learning, each agent constructs a loss function, which is equal to the negative of the total reward value of reinforcement learning. The partial derivatives of the loss function with respect to each control weight in the multi-agent reinforcement learning policy network are calculated using the backpropagation algorithm. The control weights are then iteratively updated using gradient descent with the partial derivatives and a preset learning rate to achieve online self-optimization of the control parameters.
[0118] Example 2
[0119] This embodiment provides a multi-agent regulation system for water resources in a water network, specifically including a spatiotemporal decoupling and multi-agent construction module, a spatiotemporal scale adaptive decomposition control module, an action space pruning module, a water rights distributed game module, and a reinforcement learning self-optimization module;
[0120] The spatiotemporal decoupling and multi-agent construction module is used to collect spatial and business data of the water network and decouple them to the corresponding spatial nodes in a distributed manner according to the physical topology of the water network. At the same time, it is used to construct a multi-agent system including surface water agents, groundwater agents, user agents, and management unit agents, and inject the decoupled spatial node data and red line constraints into the corresponding agents to complete the construction of the distributed independent decision-making basis.
[0121] The spatiotemporal scale adaptive decomposition control module is used to monitor the water resource status of each spatial node and calculate the groundwater level risk evolution deviation rate of each spatial node using the risk deviation formula. When the groundwater level risk evolution deviation rate of a specific area triggers a preset critical risk threshold, the module drives the relevant intelligent swarm in that area to adaptively shorten the control time step and drill down to focus on spatial granularity, thereby achieving high-precision island-based control of high-risk local networks.
[0122] The action space pruning module is used to transform the boundary conditions of red line control and over-extraction identification into a set of hard boundary constraint equations based on the hydrological expert rule algorithm; and to construct the original action space matrix. Before each agent executes the policy search, compliance is verified by a one-dimensional action compliance indicator vector. The original action space of the multi-agent reinforcement learning is dynamically pruned online to remove actions that violate the safety red line and obtain a set of candidate actions.
[0123] The water rights distributed game module is used to reconstruct the comprehensive game payoff function of each agent by using the environmental penalty factor dynamically adjusted by the management unit agent, triggering water rights transfer and dynamic compensation game between the surface water agent, the groundwater agent and the user agent; and to construct a multi-objective game matrix, and use the Pareto front dynamic optimization algorithm to perform distributed iterative solution under multiple strong constraint boundary conditions to generate a self-organizing collaborative allocation strategy set.
[0124] The reinforcement learning self-optimization module is used to select a target allocation scheme from the self-organizing collaborative allocation strategy set using a decision selection mechanism, convert control parameters into hardware control commands and issue them to drive physical control nodes to perform collaborative allocation; at the same time, it is used to collect updated actual data again after a set period, calculate the risk elimination deviation and reconstruct the piecewise reward function accordingly, and dynamically update the control weight parameters in the multi-agent reinforcement learning network online through the backpropagation algorithm to achieve iterative optimization of the control parameters.
[0125] Example 3
[0126] The following is another embodiment of the present invention, which provides a method and system for multi-agent regulation of water resources in a water network. In order to verify the beneficial effects of the present invention, a simulation experiment is conducted for scientific demonstration.
[0127] This experiment aims to verify the effectiveness of a multi-agent regulation method and system for water resources in a water network. Through data acquisition and distributed decoupling, spatiotemporal adaptive decomposition control, online action space pruning, multi-agent collaborative distributed game theory, and reward function self-optimization, the experiment enhances the early warning and self-organized collaborative allocation capabilities for the dynamic hydrological state of the entire water network. The experiment uses simulated and actual collected water network operation data, including risk characteristics under different over-extraction states, comprehensive game payoffs, dynamic environmental penalty factors, and multi-dimensional spatiotemporal characteristics. By analyzing the consistency between the model's regulation parameter results and the actual risk elimination effect, the accuracy and robustness of this invention in identifying groundwater over-extraction risks and collaboratively allocating water resources are verified.
[0128] The simulation experiment steps are implemented according to the content of the multi-agent regulation method for water resources in a water network provided in Example 1, and the specific steps include:
[0129] Spatial and operational data of the entire life cycle of the water network are collected, including spatial data of multiple water intakes, complex river sections, and jointly regulated reservoirs, as well as operational data of dynamic water rights, water withdrawal permit quotas, and groundwater level red lines. The collection frequency is set to once per hour.
[0130] Within the framework of a multi-agent heterogeneous model ensemble, a spatiotemporal topology matrix of a water network is constructed. The adjacency weights of spatial nodes are evaluated by considering the impact of various risk factors. A local decoupling algorithm is used to decompose the geographic correlation mapping. All collected data are comprehensively considered, and the following steps are performed:
[0131] a. Determine the evaluation criteria and hard boundary conditions for each state space vector;
[0132] b. Use the risk deviation formula to assess the over-extraction risk status and rank the evolution deviation rates;
[0133] c. Assign a local dataset to each spatial node to obtain four types of heterogeneous agent models;
[0134] A multi-agent reinforcement learning network is trained using state data from historical water network data and expert rule algorithms. High-dimensional boundary conditions are mapped to a set of hard boundary constraint equations through hydrological expert rule algorithms, and control features in the operation of the water network are extracted. Data is filtered through action compliance indicator vectors. The trained reinforcement learning network can update the control parameter results of each physical control node in real time.
[0135] In the actual operation of the water network, a pre-trained reinforcement learning policy network is used to update the water resource status in real time. Spatiotemporal adaptive decomposition control is combined with a game payoff function for dynamic decision analysis. Based on the convergent solution set of the Pareto front dynamic optimization algorithm, the following operations are performed:
[0136] 1) Dynamically identify and predict the risk of groundwater over-extraction, and take corresponding self-organizing and coordinated allocation measures in a timely manner;
[0137] 2) Adjust hardware control commands and policy network control weights in real time to optimize risk management across the entire water network;
[0138] 3) Continuously update risk control plans during operation to provide real-time support for the health management of the water network and the minimization of ecological damage.
[0139] The specific data from the above simulation experiment are shown in Table 1.
[0140] Table 1 Data Recording Table of Simulation Experiment of the Invention
[0141] Time / Period Spatial Node Types Real-time hydrological status Environmental changes (precipitation / evaporation) Operating parameters (water level / flow rate) Risk assessment weights (adjacency weights) Risk assessment results Static / Dynamic Risk Prediction (Normal / Over-extraction) Risk control measures (hardware coordination and allocation values) 0-5 Jointly regulated reservoir nodes Sufficient water storage Precipitation: 20mm; Evaporation: 2mm Water level: 85m; Flow rate: 45m³ / s 0.90 Normal and risk-free No / No Maintain daily-scale global coarse-grained allocation 5-10 Intricate river section nodes Ecological base flow stability Precipitation: 15mm; Evaporation: 3mm Water level: 12m; Flow rate: 18m³ / s 0.92 Normal and risk-free No / No Disable unnecessary data interactions and continue monitoring. 10-15 Multiple water intake nodes Water intake is normal on a single day Precipitation: 5mm; Evaporation: 5mm Water level: 8m; Flow rate: 12m³ / s 0.85 Normal and risk-free No / No Maintain the daily actual water withdrawal quota 15-20 groundwater source Rapid over-extraction Precipitation: 0 mm; Evaporation: 10 mm Water level: -16m; Flow rate: 2m³ / s 0.78 Over-extraction risk status Yes / Yes Shorten the step size to the hourly scale and focus drilling; initiate water rights transfer and dynamic compensation game. 20-25 groundwater source Risks gradually eliminated Precipitation: 10mm; Evaporation: 4mm Water level: -14.8m; Flow rate: 4m³ / s 0.85 Normal and risk-free whether Users reduce groundwater extraction and switch to using surface water. 25-30 Overall network nodes Return to normal state Precipitation: 12mm; Evaporation: 3mm Water level: stable; Flow rate: balanced 0.89 Normal and risk-free No / No Restore daily-scale global allocation and iteratively optimize the reward function.
[0142] Experimental Analysis:
[0143] By comparing the model prediction results with the risk elimination deviation effect, the accuracy and robustness of the present invention in identifying and predicting the risk of groundwater over-extraction and dynamically optimizing the total water supply revenue of the entire network are verified. The experiment shows that the present invention has high accuracy and reliability and can effectively improve the risk management and resource coordination capabilities of the water network throughout its entire life cycle.
[0144] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A multi-agent regulation method for water resources in a water network, characterized in that: Includes the following steps: S1. Collect spatial and operational data of the water network and decouple them to the corresponding spatial nodes in a distributed manner according to the physical topology of the water network; construct a multi-agent system including surface water agents, groundwater agents, user agents, and management unit agents, and inject the decoupled spatial node data and red line constraints into the corresponding agents respectively; S2. Monitor the water resource status of each spatial node. When a specific area triggers the preset over-extraction threshold, drive the relevant intelligent swarm in that area to adaptively shorten the control time step and drill down to focus on spatial granularity. S3. Based on the hydrological expert rule algorithm, the boundary conditions of red line control and over-extraction identification are used as constraints to prune the action space of multi-agent reinforcement learning, remove actions that violate the safety red line, and obtain a candidate action set. S4. Based on the environmental penalty factor dynamically adjusted by the management unit agent, water rights transfer and dynamic compensation game are triggered between the surface water agent, the groundwater agent and the user agent. The multi-objective optimization algorithm is used to solve the problem under multiple constraints to generate a self-organizing collaborative allocation strategy set. S5 executes the selected scheme from the self-organizing collaborative allocation strategy set, drives the physical control nodes to coordinate and allocate, and feeds back the allocated hydrological status and business data to S2. Based on the risk elimination effect, the control parameters of the multi-agent are iteratively optimized through the reward function of reinforcement learning.
2. The multi-agent regulation method for water resources in a water network according to claim 1, characterized in that: Specifically, S1 includes the following: Based on the physical connectivity and geographic spatial distribution of the water network, a spatiotemporal topology matrix of the water network is constructed. The number of rows and columns of the spatiotemporal topology matrix of the water network is equal to the total number of spatial nodes in the water network, and any matrix element in the spatiotemporal topology matrix of the water network represents the spatial adjacency weight between the corresponding horizontal axis node and the vertical axis node. Using a spatiotemporal topology matrix, a preset local decoupling algorithm function is used to perform geographic correlation mapping and decomposition on the collected spatial data of multiple water intakes, complex river sections, and coordinated reservoirs, as well as the operational data of dynamic water rights, water withdrawal permits, and groundwater level red lines, decoupling them into local datasets belonging to each spatial node. The local dataset of each spatial node is equal to the intersection dataset output by the local decoupling algorithm function after parsing and calculating the global multidimensional dataset, the spatiotemporal topology matrix of the water network, and the current node index number. Based on the physical attributes and management functions of spatial nodes, four types of heterogeneous intelligent agents are constructed, and these four types of heterogeneous intelligent agents are combined into a multi-agent heterogeneous model set. Specifically, spatial nodes corresponding to joint-regulation reservoirs and complex river sections are instantiated as surface water intelligent agents, spatial nodes corresponding to groundwater sources are instantiated as groundwater intelligent agents, spatial nodes corresponding to multiple water intakes are instantiated as user intelligent agents, and nodes with watershed supervision functions are instantiated as management unit intelligent agents. The local datasets after decoupling each spatial node are input into the corresponding intelligent agent as state space vectors. The state space vector is equal to a one-dimensional column vector composed of node spatial topological feature data, real-time hydrological status data, and historical hydrological pattern feature data arranged in chronological order. The groundwater level red line constraint and water withdrawal permit quota are converted into hard boundary conditions and injected into the corresponding groundwater intelligent agent and user intelligent agent, respectively. The hard boundary conditions include two hard constraint inequalities. Hard constraint inequality one states that the current real-time evolving groundwater level of the groundwater intelligent agent is greater than or equal to the preset groundwater level red line threshold. Hard constraint inequality two states that the actual daily water withdrawal of the user intelligent agent is less than or equal to the user's corresponding water withdrawal permit quota. By restricting the initial action selection range of multiple intelligent agents through hard constraint inequalities one and two, the distributed independent decision-making basis is constructed.
3. The multi-agent regulation method for water resources in a water network according to claim 1, characterized in that: Specifically, S2 includes the following: The management unit intelligent agent extracts the current water level data of the groundwater intelligent agent and the current water extraction data of the user intelligent agent in each spatial node in real time, and compares them with the preset groundwater level red line threshold; the risk deviation formula is used to calculate the groundwater level risk evolution deviation rate of each spatial node; the groundwater level risk evolution deviation rate is equal to the difference obtained by subtracting the current water level data from the preset groundwater level red line threshold, and then dividing it by the groundwater level red line threshold. The calculated groundwater level risk evolution deviation rate is compared with the preset critical risk threshold: when the groundwater level risk evolution deviation rate is less than or equal to the critical risk threshold, the current spatial node is classified as a normal, risk-free state. When the deviation rate of the groundwater level risk evolution is greater than the critical risk threshold, the current spatial node is classified as a groundwater over-extraction risk state. When a spatial node is assessed as being in a normal, risk-free state, its corresponding intelligent agent swarm maintains a daily-scale global coarse-grained time step for normal allocation calculations; wherein, the time control variable of the intelligent agent swarm in the reinforcement learning policy network is set to an initial constant of twenty-four hours. When a groundwater over-extraction risk is assessed, the management unit agent drives the agent swarm of the node and its adjacent associated nodes to trigger the spatiotemporal scale adaptive decomposition control equations, specifically including: The first control equation is: change the time control variable of the agent swarm in the reinforcement learning policy network from the initial constant of 24 hours to a constant of 1 hour, adaptively shorten the time step of regulation to the hour scale, and improve the update and iteration frequency of the local reinforcement learning policy. The second control equation is as follows: assign the associated weight element value of the node representing the risk-free area in the spatial state topology matrix of the system to a constant of zero. While shortening the time step, shut down the unnecessary data interaction of the agent in the risk-free area, activate the topology drilling mechanism in the high-risk area, and adjust the spatial granularity of regulation from the sub-basin level to the independent agent corresponding to the control section of the specific river section and the multiple water intakes, so as to realize the high-precision islanding regulation of the high-risk local network.
4. The multi-agent regulation method for water resources in a water network according to claim 1, characterized in that: Specifically, S3 includes the following: Historical and real-time hydrological data are extracted, and hydrological expert rule algorithms are used to calculate the upper limit of permissible groundwater extraction, the lower limit of ecological flow for river sections, and the daily water withdrawal permit for each water user at each spatial node. The upper limit, lower limit, and permit are then transformed into a set of hard boundary constraint equations, which include: Constraint Equation 1: The water pumping volume of the water source corresponding to the current node is less than or equal to the upper limit of the allowable groundwater extraction volume; Constraint Equation 2: The real-time flow of the river corresponding to the current node is greater than or equal to the ecological flow baseline of the river section; Constraint Equation 3: The flow rate allocation value of the water intake corresponding to the current node is less than or equal to the daily water withdrawal permit. Each heterogeneous intelligent agent generates an original action space matrix composed of a set of control parameters of the physical control node based on the current local node data and optimization objectives. The original action space matrix is represented as a two-dimensional matrix of M rows and K columns, where M represents the total number of candidate action vectors and K represents the dimension of the control parameters in a single action vector. The control parameters in a single action vector include, in order of priority, the pump gate opening and closing degree, the water intake flow rate allocation value, and the water source pumping volume. Before each agent performs a policy search, a one-dimensional action compliance indicator vector is constructed, wherein the total number of elements in the one-dimensional action compliance indicator vector is equal to the number of rows M of the original action space matrix. The parameters of the m-th action vector in the original action space matrix are substituted into constraint equations one, two, and three for verification, where m is a positive integer greater than or equal to one and less than or equal to M. When the m-th action vector simultaneously satisfies constraint equation one, constraint equation two, and constraint equation three, the value of the m-th element in the one-dimensional action compliance indication vector is assigned to compliance constant one. When the m-th action vector violates any one of constraint equation 1, constraint equation 2 and constraint equation 3, the value of the m-th element in the one-dimensional action compliance indication vector is assigned the violation constant zero. After traversing all action vectors, the original action space matrix is subjected to row filtering product calculation using the one-dimensional action compliance indicator vector. All whole action vectors with corresponding element values of zero are removed from the original action space matrix, completing online dynamic pruning and outputting a candidate action set composed of the remaining whole row compliant action vectors.
5. The multi-agent regulation method for water resources in a water network according to claim 1, characterized in that: Specifically, S4 includes the following: When the risk of over-extraction is triggered in a specific area, the management unit agent extracts the groundwater level risk evolution deviation rate of the current spatial node and calculates the dynamic environmental penalty factor for groundwater extraction through a preset nonlinear exponential coupling formula. The dynamic environmental penalty factor is equal to the preset base penalty coefficient value multiplied by the power of the base of the natural logarithm, wherein the exponent of the power is the product of the preset risk weight coefficient and the groundwater level risk evolution deviation. After the calculation is completed, the management unit agent broadcasts the dynamic environmental penalty factor as a global state variable to the groundwater agent; The system drives surface water agents, groundwater agents, and user agents to engage in a distributed Nash equilibrium game within a candidate action set. Each agent dynamically constructs its own comprehensive game payoff function based on the received variables, specifically including: Groundwater agent revenue reconstruction: The comprehensive game revenue function of the groundwater agent is equal to its initial water supply revenue value, minus the operating cost value, and then minus the product of the dynamic environment penalty factor and the current pumping volume; Surface water and user agent revenue reconstruction: Constrained by the dynamic environment penalty factor, the comprehensive game revenue function value of the groundwater agent decreases, driving it to trigger state interaction logic, and by relinquishing part of the groundwater extraction rights, it sends a water transfer request instruction to the surface water agent. The surface water agent responds to the water transfer request command, constructs a compensation cost calculation formula that includes water transfer loss and allocation cost, calculates the dynamic economic compensation offer value and feeds it back to the user agent and the groundwater agent. The dynamic economic compensation offer value is simultaneously increased in the comprehensive game payoff function of the user agent to guide the user agent to actively switch from groundwater extraction to surface water use. The following are multiple strong constraint boundary conditions: the water supply safety factor is greater than the preset safety threshold, the current real-time water level is greater than or equal to the groundwater level red line threshold, the real-time river flow is greater than or equal to the ecological flow bottom line of the river section, and the actual daily water withdrawal is less than or equal to the water withdrawal permit amount. With the combined dual optimization objectives of maximizing total water supply revenue and minimizing groundwater ecological damage, a multi-objective game matrix is constructed. The Pareto front dynamic optimization algorithm is used to perform distributed iterative solution of the comprehensive game payoff function of each agent. In each iteration, the action selection of each agent is updated until the solution vectors output by two adjacent iterations meet the preset non-dominant convergence termination condition, at which point the calculation stops and a self-organizing collaborative allocation strategy set is generated.
6. The multi-agent regulation method for water resources in a water network according to claim 1, characterized in that: Specifically, S5 includes the following: The management unit intelligent agent uses a decision-selection mechanism to select a target allocation scheme from a set of self-organizing collaborative allocation strategies. The decision-selection mechanism calculates the overall global expected value of each scheme in the strategy set and determines the set of solution vectors with the largest overall global expected value as the target allocation scheme. The control parameters in the target allocation scheme are converted into hardware control commands and distributed in parallel to the corresponding physical control nodes through the communication network. The physical control nodes are driven to perform linkage operations to adjust the opening and closing degree of pump gates, the flow allocation value of water intake, and the pumping volume of water source. After the physical control nodes execute the set cycle, the distributed spatiotemporal data sensing layer collects the updated dynamic groundwater level, river ecological flow, and actual water withdrawal of each user in real time at each spatial node of the water network. The updated data is compared with the corresponding groundwater level red line constraints and water withdrawal permit limits. The risk elimination deviation of each spatial node is output using the deviation calculation formula. The risk elimination deviation is equal to the absolute value obtained by subtracting the corresponding red line constraint threshold or permit threshold from the updated actual data. The risk elimination deviation is input as a state feedback variable into the multi-agent collaborative decision-making layer. The total reinforcement learning reward value of each agent is reconstructed through a preset segmented reward calculation formula, specifically including: The total reward value for reinforcement learning is equal to the product of constant one and the positive reward value, plus the product of constant two and the negative penalty value; Wherein, when the risk elimination deviation indicates that the current water level is greater than the water level red line threshold and the ecological flow is greater than or equal to the ecological flow bottom line, the positive reward value is equal to the product of the preset incentive value and the reciprocal of the risk elimination deviation. When the risk elimination deviation indicates that the current actual water intake is greater than the water intake permit amount, the negative penalty value is equal to the product of the preset penalty constant value and the risk elimination deviation. After calculating the total reward value of reinforcement learning, each agent constructs a loss function, which is equal to the negative of the total reward value of reinforcement learning. The partial derivatives of the loss function with respect to each control weight in the multi-agent reinforcement learning policy network are calculated using the backpropagation algorithm. The control weights are then iteratively updated using gradient descent with the partial derivatives and a preset learning rate to achieve online self-optimization of the control parameters.
7. The multi-agent regulation method for water resources in a water network according to claim 6, characterized in that: In S5, the underlying protection architecture of the distributed spatiotemporal data perception layer includes: Flow velocity meters, water level sensors, and 3D laser scanning radars are distributed and deployed at different spatial nodes of the water network physical topology. The flow velocity meters and water level sensors capture real-time updates of river ecological flow and groundwater level, and the 3D laser scanning radar is used to dynamically construct 3D spatial point cloud data of intricate river sections and coordinated reservoirs. A data cleaning operator based on edge computing is configured on the local control terminal of the perception layer to perform spatiotemporal synchronization alignment and multi-source noise removal on the captured real-time hydrological data, generating a highly reliable local dataset of spatial nodes.
8. A multi-agent regulation method for water resources in a water network according to claim 6, characterized in that: In S5, the physical control node includes: The system coordinates the deployment of pump gates, multiple water intakes, and groundwater source pumps at different geographical coordinates of the water network. Specifically, it distributes hardware control commands in parallel through a communication network to coordinately adjust the opening and closing degree of the pump gates, the flow rate allocation value of the multiple water intakes, and the pumping volume of the groundwater source pumps.
9. A multi-agent control system for water resources in a water network, specifically including a spatiotemporal decoupling and multi-agent construction module, a spatiotemporal scale adaptive decomposition control module, an action space pruning module, a water rights distributed game module, and a reinforcement learning self-optimization module; The spatiotemporal decoupling and multi-agent construction module is used to collect spatial and business data of the water network and decouple them to the corresponding spatial nodes in a distributed manner according to the physical topology of the water network. At the same time, it is used to construct a multi-agent system including surface water agents, groundwater agents, user agents, and management unit agents, and inject the decoupled spatial node data and red line constraints into the corresponding agents to complete the construction of the distributed independent decision-making basis. The spatiotemporal scale adaptive decomposition control module is used to monitor the water resource status of each spatial node and calculate the groundwater level risk evolution deviation rate of each spatial node using the risk deviation formula. When the groundwater level risk evolution deviation rate of a specific area triggers a preset critical risk threshold, the module drives the relevant intelligent swarm in that area to adaptively shorten the control time step and drill down to focus on spatial granularity, thereby achieving high-precision island-based control of high-risk local networks. The action space pruning module is used to transform the boundary conditions of red line control and over-extraction identification into a set of hard boundary constraint equations based on the hydrological expert rule algorithm; and to construct the original action space matrix. Before each agent executes the policy search, compliance is verified by a one-dimensional action compliance indicator vector. The original action space of the multi-agent reinforcement learning is dynamically pruned online to remove actions that violate the safety red line and obtain a set of candidate actions. The water rights distributed game module is used to reconstruct the comprehensive game payoff function of each agent by using the environmental penalty factor dynamically adjusted by the management unit agent, triggering water rights transfer and dynamic compensation game between the surface water agent, the groundwater agent and the user agent; and to construct a multi-objective game matrix, and use the Pareto front dynamic optimization algorithm to perform distributed iterative solution under multiple strong constraint boundary conditions to generate a self-organizing collaborative allocation strategy set. The reinforcement learning self-optimization module is used to select a target allocation scheme from the self-organizing collaborative allocation strategy set using a decision selection mechanism, convert control parameters into hardware control commands and issue them to drive physical control nodes to perform collaborative allocation; at the same time, it is used to collect updated actual data again after a set period, calculate the risk elimination deviation and reconstruct the piecewise reward function accordingly, and dynamically update the control weight parameters in the multi-agent reinforcement learning network online through the backpropagation algorithm to achieve iterative optimization of the control parameters.
10. A computer device or readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the multi-agent regulation method for water network water resources as described in any one of claims 1 to 8.
