A warning decision recommendation method and system based on water affairs big model
By constructing a hydrodynamic model and early warning model, combining the time attention mechanism and a two-way long and short-term memory network, the problem of unconsidered impact of water flow on water quality is solved, and the decision-making output capacity of the water big model is improved and the accuracy of water quality control is achieved. .
Patent Information
- Application Number
- CN202411223094.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-09-03
AI Technical Summary
The prior art fails to effectively consider the impact of water flow on water quality in water quality warning and decision-making, resulting in insufficient decision-making output capability, high complexity and easy to fall into local optimal problems.
By constructing a hydrodynamic model, calculate water flow, combine the time attention mechanism and two-way long and short-term memory network to predict future water flow, use the water early warning model to output the early warning level, and determine the parameter selection order of the water controller based on the simulated early warning level and control parameters. , achieve precise control.
It improves the decision-making ability of the water industry big model early warning decision recommendation method, realizes accurate prediction and control of future water flow, reduces the complexity of decision-making, and avoids local optimal problems.
Smart Images

Figure CN118735308B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of neural network technology, and in particular to a water affairs big model-based early warning decision recommendation method and system. Background Art
[0002] The process of warning decision recommendation based on the water affairs big model refers to the process of using the water affairs neural network model to make abnormal warnings and recommend abnormal processing strategies for water affairs data.
[0003] At present, the existing technology for early warning and decision-making of water quality only considers the content of chemical elements in water, and rarely considers the impact of water flow on water quality. In some waters, the water flow rate is too fast, which will carry away pollutants in the water, thereby improving the water quality of the water area. In some waters, the water flow rate is too fast, which will cause excessive sediment to be carried, thereby reducing the water quality of the water area. Therefore, water flow will also have a certain impact on water quality. Secondly, water affairs data involves monitoring data of water areas and control data of controllers that control water volume and element content in water areas. The monitoring data includes water volume data such as speed, water level, and resistance. The monitoring data also includes COD (chemical oxygen demand), Total nitrogen, total phosphorus, ammonia nitrogen, SS and other element quantity data, and the controllers that control the water volume and element quantity of the water area include many controllers, and there are many types of parameters under each controller. If you want to rely on only a few neural network models to realize the early warning and decision-making of water affairs, you need to train more neural network models, that is, each controller needs to have a separate neural network model to train, which leads to the high complexity of relying on several neural network models to realize the early warning and decision-making of water affairs, and the decision neural network model is prone to fall into the problem of local optimality, and usually cannot handle the problem of continuous action space, and the final strategy is usually in the form of probability distribution. Therefore, the early warning decision recommendation method based on the large water affairs model is insufficient to output decision actions. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a warning decision recommendation method and system based on a water affairs big model, which can improve the ability of the warning decision recommendation method based on a water affairs big model to output decision actions.
[0005] In a first aspect, the present invention provides a warning decision recommendation method based on a water affairs big model, comprising:
[0006] Determine the water affairs area to be monitored, arrange device monitoring points in the area to be monitored, and collect monitoring data at the device monitoring points;
[0007] Using the monitoring data to construct a hydrodynamic model at the monitoring point of the device, using the hydrodynamic model to calculate the current water flow at the monitoring point of the device, analyzing the planned water flow of the current water flow, obtaining the current element quantity in the monitoring data, and analyzing the planned element quantity of the current element quantity, wherein the planned element quantity represents the element quantity in a future time period;
[0008] Input the current water flow and the current element quantity into a preset water affairs early warning model, so as to output the current warning level corresponding to the current water flow and the current element quantity through the water affairs early warning model, and input the planned water flow and the planned element quantity into the water affairs early warning model, so as to output the planned warning level corresponding to the planned water flow and the planned element quantity through the water affairs early warning model;
[0009] Acquire the current control parameters of the water controller in the area to be monitored, construct the simulated warning level in the area to be monitored and the simulated control parameters of the water controller, and determine the parameter selection order of the water controller using the simulated warning level and the simulated control parameters, wherein the parameter selection order refers to a sequence of different values of the same parameter type determined by the target parameter selection strategy;
[0010] Based on the current warning level, the planned warning level and the current control parameters, the planned control parameters of the water controller in the monitored area are selected in the parameter selection sequence, and the planned control parameters are used as the recommended results of the water warning decision.
[0011] In a possible implementation manner of the first aspect, arranging device monitoring points in the area to be monitored includes:
[0012] Acquire the monitoring area of the monitoring device in the area to be monitored;
[0013] Based on the monitoring area, the number of monitoring devices in the monitored area is calculated using the following formula:
[0014] ;
[0015] in, Indicates the number of devices. represents the area to be monitored, represents the monitoring area, The symbol for rounding up;
[0016] Calculate the center point of the area to be monitored;
[0017] Starting from the center point of the area, the monitoring area is spliced to obtain a spliced area;
[0018] When the number of monitoring areas in the spliced area is not less than the number of devices, selecting a minimum area from the spliced area;
[0019] The center coordinates of the monitoring area corresponding to the minimum area are used as the device monitoring point.
[0020] In a possible implementation of the first aspect, using the monitoring data to construct a hydrodynamic model at a monitoring point of the device includes:
[0021] Obtaining water flow velocity, water level, water wave velocity, waterway resistance and waterway slope from the monitoring data;
[0022] Based on the water flow velocity, the water level, the water wave velocity, the waterway resistance and the waterway slope, the hydrodynamic model is constructed using the following formula:
[0023] ;
[0024] in, represents the hydrodynamic model, Indicates the water level. Indicates the water flow rate, represents the acceleration due to gravity, represents the water wave speed, represents the waterway resistance, Indicates the slope of the waterway. The independent variable representing the length of the waterway, An independent variable representing time.
[0025] In a possible implementation of the first aspect, calculating the current water flow at the monitoring point of the device by using the hydrodynamic model includes:
[0026] According to the hydrodynamic model, the current water flow rate at the monitoring point of the device is calculated using the following formula:
[0027] ;
[0028] in, Indicates the current water flow at the current moment, represents the historical water flow at the historical moment, Indicates the current moment, Indicates the water level height, Indicates the water flow rate, represents the acceleration due to gravity, represents the water wave speed, represents the waterway resistance, Indicates the slope of the waterway. The independent variable representing the length of the waterway, The independent variable representing time, i represents The position number on the .
[0029] In a possible implementation manner of the first aspect, the analyzing the planned water flow of the current water flow includes:
[0030] Based on the preset time attention mechanism, the attention feature of the current water flow is calculated using the following formula:
[0031] ;
[0032] in, represents the current attention feature output by the temporal attention mechanism, Represents the output of the temporal attention mechanism The attention weight, represents the total amount of current water flow at time t, Indicates the sequence number of the current water flow under different monitoring devices at time t, represents the independent variable of time, Indicates the current water flow rate. represents the natural exponential function;
[0033] Inputting the current attention feature into a preset bidirectional long short-term memory network, so as to output a planned attention feature corresponding to the current attention feature through the bidirectional long short-term memory network;
[0034] The preset fully connected layer is used to output the planned water flow corresponding to the planned attention feature.
[0035] In a possible implementation manner of the first aspect, outputting, by the water affairs early warning model, a current early warning level corresponding to the current water flow and the current element amount, includes:
[0036] Based on the water affairs early warning model, the current early warning probability corresponding to the current water flow and the current element amount is calculated using the following formula:
[0037] ;
[0038] in, represents the current warning probability, represents the concatenation result between the current water flow and the current element quantity, represents the weight in the water affairs early warning model, represents the bias in the water affairs early warning model, represents the activation function in the water affairs early warning model;
[0039] The current warning probability is used to identify a current warning level corresponding to the current water flow and the current element amount.
[0040] In a possible implementation of the first aspect, the determining a parameter selection order of the water controller by using the simulated warning level and the simulated control parameter includes:
[0041] According to the simulated warning level and the simulated control parameters, the state space and action space of the water controller are constructed using the following formula:
[0042] ;
[0043] ;
[0044] in, represents the state space, represents the action space, Indicates the warning level in the current period of the simulated warning level. The warning level in the planning period of the simulated warning level, Indicates the difference between the warning level in the current period and the warning level in the planned period. Indicates the control parameters of the current period in the simulation control parameters. represents the measure of adjusting the e-th control parameter in the current period in the simulation control parameter, Indicates from The result of taking any one of them, Indicates adding operation to analog control parameters. Indicates that the analog control parameter is reduced;
[0045] Constructing a parameter selection strategy for the water controller;
[0046] Calculating the cumulative reward of the water controller under the parameter selection strategy according to the state space and the action space;
[0047] Obtaining a target parameter selection strategy corresponding to the maximum cumulative reward among the cumulative rewards in the parameter selection strategy;
[0048] The target parameter selection strategy is used to determine the parameter selection sequence of the water controller.
[0049] In a possible implementation of the first aspect, calculating the cumulative reward of the water controller under the parameter selection strategy according to the state space and the action space includes:
[0050] According to the state space and the action space, the reward value of the water controller under the parameter selection strategy is calculated using the following formula:
[0051] ;
[0052] ;
[0053] in, Indicates parameter selection strategy The reward value under represents the state in period t, Indicates the action taken under the state in time period t, represents the action-value function, represents the state value function, Indicates the state of the next period of period t, represents the state space, represents the discount factor, Indicates the status under period t. After the action the state becomes The state transition probability of
[0054] Based on the reward value, the following formula is used to calculate the cumulative reward of the water controller under the parameter selection strategy:
[0055] ;
[0056] in, Indicates the accumulated rewards. represents the independent variable of time, represents the discount factor, Indicates that it is used to control The upper limit parameter, , , Indicates parameter selection strategy Follow Increased reward value, express Timing and parameter selection strategy The reward value below.
[0057] In a possible implementation of the first aspect, based on the current warning level, the planned warning level and the current control parameter, selecting the planned control parameter of the water controller in the monitored area using the parameter selection sequence includes:
[0058] Calculate the reward value of the current warning level, the planned warning level, the current control parameter, and the level difference between the current warning level and the planned warning level in the parameter selection order;
[0059] The planning control parameters of the water controller in the area to be monitored are selected using the reward value under the parameter selection sequence.
[0060] In a second aspect, the present invention provides an early warning decision recommendation system based on a water affairs big model, the system comprising:
[0061] A data collection module, used to determine the area to be monitored of the water affairs, arrange device monitoring points in the area to be monitored, and collect monitoring data under the device monitoring points;
[0062] a flow calculation module, configured to construct a hydrodynamic model at the monitoring point of the device using the monitoring data, calculate the current water flow at the monitoring point of the device using the hydrodynamic model, analyze the planned water flow of the current water flow, obtain the current element quantity in the monitoring data, and analyze the planned element quantity of the current element quantity, wherein the planned element quantity represents the element quantity in a future time period;
[0063] A level output module, used for inputting the current water flow and the current element quantity into a preset water affairs early warning model, so as to output the current warning level corresponding to the current water flow and the current element quantity through the water affairs early warning model, and inputting the planned water flow and the planned element quantity into the water affairs early warning model, so as to output the planned warning level corresponding to the planned water flow and the planned element quantity through the water affairs early warning model;
[0064] A sequence determination module, used for obtaining the current control parameters of the water controller in the area to be monitored, constructing the simulated warning level in the area to be monitored and the simulated control parameters of the water controller, and determining the parameter selection sequence of the water controller using the simulated warning level and the simulated control parameters, wherein the parameter selection sequence refers to a sequence of different values of the same parameter type determined by the target parameter selection strategy;
[0065] The result determination module is used to select the planned control parameters of the water controller in the monitored area based on the current warning level, the planned warning level and the current control parameters using the parameter selection sequence, and use the planned control parameters as the recommended results of the water warning decision.
[0066] Compared with the prior art, the technical principle and beneficial effects of this solution are:
[0067] The embodiment of the present invention calculates the current water flow rate at the monitoring point of the device by using the hydrodynamic model, so as to be used for the subsequent prediction of the water flow rate in the future time period, thereby realizing the flow warning for the future time period. Furthermore, the embodiment of the present invention determines the parameter selection order of the water controller by using the simulated warning level and the simulated control parameter, so as to determine the parameters of the water controller in the planning time period by using the parameter selection strategy. The embodiment of the present invention selects the planning control parameters of the water controller in the monitored area by using the parameter selection order based on the current warning level, the planned warning level and the current control parameter, so as to realize the parameter selection by using the action value function and the state value function, thereby accurately controlling the water controller, and realizing the control of water flow and element quantity through the water controller. Therefore, the early warning decision recommendation method and system based on the water affairs big model proposed in the embodiment of the present invention can improve the ability of the early warning decision recommendation method based on the water affairs big model to output decision actions. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0070] Figure 1 A flowchart of a water affairs big model-based early warning decision recommendation method provided by an embodiment of the present invention;
[0071] Figure 2 A schematic diagram of device monitoring points of an early warning decision recommendation system based on a water affairs big model provided by an embodiment of the present invention;
[0072] Figure 3 A module diagram of an early warning decision recommendation system based on a water affairs big model provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0073] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0074] The embodiment of the present invention provides a method for recommending early warning decisions based on a water affairs big model, and the execution subject of the method for recommending early warning decisions based on a water affairs big model includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present invention. In other words, the method for recommending early warning decisions based on a water affairs big model can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0075] See also Figure 1 FIG. 1 is a flow chart of a method for early warning decision recommendation based on a water affairs big model provided by an embodiment of the present invention. Figure 1 The recommended methods for early warning decision-making based on the water affairs big model described in the paper include:
[0076] S1. Determine a water affairs area to be monitored, arrange device monitoring points in the area to be monitored, and collect monitoring data at the device monitoring points.
[0077] In the embodiment of the present invention, the water affairs refer to matters related to the development, utilization, protection, etc. of urban water resources, and the area to be monitored refers to the biochemical pool of the water plant.
[0078] Furthermore, in an embodiment of the present invention, the device monitoring point is used to place a monitoring device.
[0079] In one embodiment of the present invention, the step of arranging device monitoring points in the area to be monitored includes:
[0080] Acquire the monitoring area of the monitoring device in the area to be monitored;
[0081] Based on the monitoring area, the number of monitoring devices in the monitored area is calculated using the following formula:
[0082] ;
[0083] in, Indicates the number of devices. represents the area to be monitored, represents the monitoring area, The symbol for rounding up;
[0084] Calculate the center point of the area to be monitored;
[0085] Starting from the center point of the area, the monitoring area is spliced to obtain a spliced area;
[0086] When the number of monitoring areas in the spliced area is not less than the number of devices, selecting a minimum area from the spliced area;
[0087] The center coordinates of the monitoring area corresponding to the minimum area are used as the device monitoring point.
[0088] It should be noted that the monitoring device is mainly used to monitor water quality indicators in anoxic tanks, aerobic tanks and secondary sedimentation tanks.
[0089] See also Figure 2 FIG. 1 is a schematic diagram of a device monitoring point of a water affairs big model-based early warning decision recommendation system provided by an embodiment of the present invention. Figure 2 In the figure, the center point of the big circle is the area center point of the area to be monitored, the big circle is a circle including the area to be monitored formed with the area center point of the area to be monitored as the center, and the small circle is a circle including the monitoring area formed with the center point of the monitoring area as the center.
[0090] Optionally, the process of splicing the monitoring area from the center point of the area to obtain the spliced area refers to: placing monitoring devices from the center point of the area, and each time a monitoring device is placed, it is necessary to ensure that the monitoring area of the monitoring device (that is, Figure 2 The small circle in the figure is tangent to the monitoring area that has been placed previously (the two small circles are tangent). After placing multiple monitoring devices, the monitoring areas of the multiple monitoring devices constitute the splicing area. It should be noted that the center point of each small circle is the placement position of the monitoring device.
[0091] Furthermore, in an embodiment of the present invention, the monitoring data refers to water quality indicators, and the water quality indicators include water flow velocity, water level, water wave velocity, waterway resistance, waterway slope, COD (chemical oxygen demand), total nitrogen, total phosphorus, ammonia nitrogen and SS.
[0092] S2. Use the monitoring data to construct a hydrodynamic model at the monitoring point of the device, use the hydrodynamic model to calculate the current water flow at the monitoring point of the device, analyze the planned water flow of the current water flow, obtain the current element quantity in the monitoring data, and analyze the planned element quantity of the current element quantity, wherein the planned element quantity represents the element quantity in a future time period.
[0093] In one embodiment of the present invention, the step of constructing a hydrodynamic model at a monitoring point of the device using the monitoring data includes:
[0094] Obtaining water flow velocity, water level, water wave velocity, waterway resistance and waterway slope from the monitoring data;
[0095] Based on the water flow velocity, the water level, the water wave velocity, the waterway resistance and the waterway slope, the hydrodynamic model is constructed using the following formula:
[0096] ;
[0097] in, represents the hydrodynamic model, Indicates the water level height, Indicates the water flow rate, represents the acceleration due to gravity, represents the water wave speed, represents the waterway resistance, Indicates the slope of the waterway. The independent variable representing the length of the waterway, An independent variable representing time.
[0098] Furthermore, the embodiment of the present invention calculates the current water flow rate at the monitoring point of the device by using the hydrodynamic model, so as to be used for subsequently predicting the water flow rate in a future time period, thereby realizing flow warning for the future time period.
[0099] In one embodiment of the present invention, the step of calculating the current water flow rate at the monitoring point of the device by using the hydrodynamic model includes:
[0100] According to the hydrodynamic model, the current water flow rate at the monitoring point of the device is calculated using the following formula:
[0101] ;
[0102] in, Indicates the current water flow at the current moment, represents the historical water flow at the historical moment, Indicates the current moment, Indicates the water level height, Indicates the water flow rate, represents the acceleration due to gravity, represents the water wave speed, represents the waterway resistance, Indicates the slope of the waterway. The independent variable representing the length of the waterway, The independent variable representing time, i represents The position number on the .
[0103] Furthermore, in the embodiment of the present invention, the planned water flow refers to the water flow in a future period.
[0104] In one embodiment of the present invention, the analyzing the planned water flow of the current water flow includes:
[0105] Based on the preset time attention mechanism, the attention feature of the current water flow is calculated using the following formula:
[0106] ;
[0107] in, represents the current attention feature output by the temporal attention mechanism, Represents the output of the temporal attention mechanism The attention weight, represents the total amount of current water flow at time t, Indicates the sequence number of the current water flow under different monitoring devices at time t, represents the independent variable of time, Indicates the current water flow rate. represents the natural exponential function;
[0108] Inputting the current attention feature into a preset bidirectional long short-term memory network, so as to output a planned attention feature corresponding to the current attention feature through the bidirectional long short-term memory network;
[0109] The preset fully connected layer is used to output the planned water flow corresponding to the planned attention feature.
[0110] The temporal attention mechanism refers to a technique used in deep learning to process time series data, which allows the model to assign different importance or attention to information at different time steps when processing sequence data.
[0111] In the embodiment of the present invention, the current element amounts refer to COD (chemical oxygen demand), total nitrogen, total phosphorus, ammonia nitrogen and SS.
[0112] Optionally, the principle of analyzing the planned element quantity of the current element quantity is similar to the principle of analyzing the planned water flow of the standardized water flow, which is not further elaborated here.
[0113] S3. Input the current water flow and the current element quantity into a preset water affairs early warning model to output the current warning level corresponding to the current water flow and the current element quantity through the water affairs early warning model, and input the planned water flow and the planned element quantity into the water affairs early warning model to output the planned warning level corresponding to the planned water flow and the planned element quantity through the water affairs early warning model.
[0114] Furthermore, in the embodiment of the present invention, the current warning level and the planned warning level both include a normal level and an abnormal level, and the abnormal level includes mild, moderate, severe and other levels.
[0115] In one embodiment of the present invention, the outputting the current warning level corresponding to the current water flow and the current element quantity through the water affairs warning model includes:
[0116] Based on the water affairs early warning model, the current early warning probability corresponding to the current water flow and the current element amount is calculated using the following formula:
[0117] ;
[0118] in, represents the current warning probability, represents the concatenation result between the current water flow and the current element quantity, represents the weight in the water affairs early warning model, represents the bias in the water affairs early warning model, represents the activation function in the water affairs early warning model;
[0119] The current warning probability is used to identify a current warning level corresponding to the current water flow and the current element amount.
[0120] The water affairs early warning model is composed of the input layer, hidden layer and output layer of the BP neural network. In The weights shown summarize all weight parameters in the water affairs early warning model. In The bias represented summarizes all bias parameters in the water early warning model. In It does not mean that the water affairs early warning model has only one input layer, hidden layer and output layer, but it means that there are multiple input layers, hidden layers and output layers in the water affairs early warning model. and .
[0121] Optionally, the principle of outputting the planned water flow and the planned warning level corresponding to the planned element quantity through the water affairs warning model is similar to the principle of outputting the current water flow and the current warning level corresponding to the current element quantity through the water affairs warning model, and will not be further elaborated here.
[0122] S4. Obtain the current control parameters of the water controller in the monitored area, construct the simulated warning level in the monitored area and the simulated control parameters of the water controller, and use the simulated warning level and the simulated control parameters to determine the parameter selection order of the water controller, wherein the parameter selection order refers to a sequence of different values of the same parameter type determined by the target parameter selection strategy.
[0123] In an embodiment of the present invention, the water controller refers to a controller used to control water flow and element quantity. The water controller includes water hammer, water pump, gate, water quality controller, etc. The current control parameter refers to the parameter set by the water controller in the current time period.
[0124] Furthermore, in the embodiment of the present invention, the simulated warning level and the simulated control parameters refer to the simulated warning level of water affairs and the parameters of the water affairs controller, which may also be obtained from historical data.
[0125] Furthermore, the embodiment of the present invention determines the parameter selection order of the water controller by using the simulated warning level and the simulated control parameter, so as to determine the parameters of the water controller within the planning period by using the parameter selection strategy.
[0126] In one embodiment of the present invention, the step of determining the parameter selection sequence of the water controller by using the simulated warning level and the simulated control parameter includes:
[0127] According to the simulated warning level and the simulated control parameters, the state space and action space of the water controller are constructed using the following formula:
[0128] ;
[0129] ;
[0130] in, represents the state space, represents the action space, Indicates the warning level in the current period of the simulated warning level. Indicates the warning level in the planning period of the simulated warning level. Indicates the difference between the warning level in the current period and the warning level in the planned period. Indicates the control parameters of the current period in the simulation control parameters. represents the measure of adjusting the e-th control parameter in the current period in the simulation control parameter, Indicates from The result of taking any one of them, Indicates adding operation to analog control parameters. Indicates that the analog control parameter is reduced;
[0131] Constructing a parameter selection strategy for the water controller;
[0132] Calculating the cumulative reward of the water controller under the parameter selection strategy according to the state space and the action space;
[0133] Obtaining a target parameter selection strategy corresponding to the maximum cumulative reward among the cumulative rewards in the parameter selection strategy;
[0134] The target parameter selection strategy is used to determine the parameter selection sequence of the water controller.
[0135] Among them, the parameter selection strategy refers to a strategy of disrupting the order of all selectable parameters of each water controller. For example, in the temperature parameter control of water controller 1, temperature values 20~30 are available for selection. The order of 20~30 is disrupted to obtain k random sequences, and the length of each sequence is 30 minus 20. When calculating the cumulative reward later, the cumulative reward under each random sequence is calculated.
[0136] In another embodiment of the present invention, the calculating, according to the state space and the action space, the cumulative reward of the water controller under the parameter selection strategy comprises:
[0137] According to the state space and the action space, the reward value of the water controller under the parameter selection strategy is calculated using the following formula:
[0138] ;
[0139] ;
[0140] in, Indicates parameter selection strategy The reward value under represents the state in period t, Indicates the action taken under the state in time period t, represents the action-value function, represents the state value function, Indicates the state of the next period of period t, represents the state space, represents the discount factor, Indicates the status under period t. After the action the state becomes The state transition probability of
[0141] Based on the reward value, the following formula is used to calculate the cumulative reward of the water controller under the parameter selection strategy:
[0142] ;
[0143] in, Indicates the accumulated rewards. represents the independent variable of time, represents the discount factor, Indicates that it is used to control The upper limit parameter, , , Indicates parameter selection strategy Follow Increased reward value, express Timing and parameter selection strategy The reward value below.
[0144] S5. Based on the current warning level, the planned warning level and the current control parameters, the planned control parameters of the water controller in the monitored area are selected in the parameter selection sequence, and the planned control parameters are used as the recommended results of the water warning decision.
[0145] The embodiment of the present invention selects the planned control parameters of the water controller in the monitored area based on the current warning level, the planned warning level and the current control parameters, using the parameter selection sequence, so as to realize parameter selection by using the action value function and the state value function, thereby accurately controlling the water controller and realizing the control of water flow and element quantity through the water controller.
[0146] In one embodiment of the present invention, based on the current warning level, the planned warning level and the current control parameter, the planned control parameter of the water controller in the monitored area is selected using the parameter selection sequence, including:
[0147] Calculate the reward value of the current warning level, the planned warning level, the current control parameter, and the level difference between the current warning level and the planned warning level in the parameter selection order;
[0148] The planning control parameters of the water controller in the area to be monitored are selected using the reward value under the parameter selection sequence.
[0149] It can be seen that the embodiment of the present invention calculates the current water flow rate at the monitoring point of the device by using the hydrodynamic model, so as to be used for the subsequent prediction of the water flow rate in the future time period, thereby realizing the flow warning for the future time period. Furthermore, the embodiment of the present invention determines the parameter selection order of the water controller by using the simulated warning level and the simulated control parameter, so as to determine the parameters of the water controller in the planning period by using the parameter selection strategy. The embodiment of the present invention selects the planned control parameters of the water controller in the monitored area by using the parameter selection order based on the current warning level, the planned warning level and the current control parameter, so as to realize the parameter selection by using the action value function and the state value function, thereby accurately controlling the water controller, and realizing the control of water flow and element quantity through the water controller. Therefore, the early warning decision recommendation method and system based on the water affairs big model proposed in the embodiment of the present invention can improve the ability of the early warning decision recommendation method based on the water affairs big model to output decision actions.
[0150] like Figure 3 The figure shows a functional module diagram of an early warning decision recommendation system based on a water affairs big model of the present invention.
[0151] The water affairs big model-based early warning decision recommendation system 300 of the present invention can be installed in an electronic device. According to the functions implemented, the water affairs big model-based early warning decision recommendation system can include a flow calculation module 301, a flow calculation module 302, a level output module 303, a sequence determination module 304 and a result determination module 305. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0152] In the embodiment of the present invention, the functions of each module / unit are as follows:
[0153] The data collection module 301 is used to determine the area to be monitored of the water affairs, arrange device monitoring points in the area to be monitored, and collect monitoring data under the device monitoring points;
[0154] The flow calculation module 302 is used to construct a hydrodynamic model at the monitoring point of the device using the monitoring data, calculate the current water flow at the monitoring point of the device using the hydrodynamic model, analyze the planned water flow of the current water flow, obtain the current element quantity in the monitoring data, and analyze the planned element quantity of the current element quantity, wherein the planned element quantity represents the element quantity in a future period;
[0155] The level output module 303 is used to input the current water flow and the current element quantity into a preset water affairs early warning model, so as to output the current warning level corresponding to the current water flow and the current element quantity through the water affairs early warning model, and input the planned water flow and the planned element quantity into the water affairs early warning model, so as to output the planned warning level corresponding to the planned water flow and the planned element quantity through the water affairs early warning model;
[0156] The sequence determination module 304 is used to obtain the current control parameters of the water controller in the monitored area, construct the simulated warning level in the monitored area and the simulated control parameters of the water controller, and determine the parameter selection sequence of the water controller using the simulated warning level and the simulated control parameters, wherein the parameter selection sequence refers to a sequence of different values of the same parameter type determined by the target parameter selection strategy;
[0157] The result determination module 305 is used to select the planned control parameters of the water controller in the monitored area based on the current warning level, the planned warning level and the current control parameters using the parameter selection sequence, and use the planned control parameters as the recommended results of the water warning decision.
[0158] In detail, each module in the water affairs big model-based early warning decision recommendation system 300 in the embodiment of the present invention is used in the same manner as above. Figure 1 The technical means are the same as the early warning decision recommendation method based on the water affairs big model described in, and can produce the same technical effects, so they will not be repeated here.
[0159] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0160] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0161] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0162] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0163] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A warning decision recommendation method based on a water affairs big model, characterized in that: The method comprises: Determine the water affairs area to be monitored, arrange device monitoring points in the area to be monitored, and collect monitoring data at the device monitoring points; Using the monitoring data to construct a hydrodynamic model at the monitoring point of the device, using the hydrodynamic model to calculate the current water flow at the monitoring point of the device, analyzing the planned water flow of the current water flow, obtaining the current element quantity in the monitoring data, and analyzing the planned element quantity of the current element quantity, wherein the planned element quantity represents the element quantity in a future time period; Input the current water flow and the current element quantity into a preset water affairs early warning model, so as to output the current warning level corresponding to the current water flow and the current element quantity through the water affairs early warning model, and input the planned water flow and the planned element quantity into the water affairs early warning model, so as to output the planned warning level corresponding to the planned water flow and the planned element quantity through the water affairs early warning model; Acquire the current control parameters of the water controller in the area to be monitored, construct the simulated warning level in the area to be monitored and the simulated control parameters of the water controller, and determine the parameter selection order of the water controller using the simulated warning level and the simulated control parameters, wherein the parameter selection order refers to a sequence of different values of the same parameter type determined by the target parameter selection strategy, wherein the use of the simulated warning level and the simulated control parameters to determine the parameter selection order of the water controller includes: According to the simulated warning level and the simulated control parameters, the state space and action space of the water controller are constructed using the following formula: ; ; in, represents the state space, represents the action space, Indicates the warning level in the current period of the simulated warning level. The warning level in the planning period of the simulated warning level, Indicates the difference between the warning level in the current period and the warning level in the planned period. Indicates the control parameters of the current period in the simulation control parameters. represents the measure of adjusting the e-th control parameter in the current period of the simulation control parameter, Indicates from The result of taking any one of them, Indicates adding operation to analog control parameters. Indicates that the analog control parameter is reduced; Constructing a parameter selection strategy for the water controller; Calculating the cumulative reward of the water controller under the parameter selection strategy according to the state space and the action space; Obtaining a target parameter selection strategy corresponding to the maximum cumulative reward in the cumulative rewards in the parameter selection strategy; Determining the parameter selection order of the water controller by using the target parameter selection strategy; The step of calculating the cumulative reward of the water controller under the parameter selection strategy according to the state space and the action space includes: According to the state space and the action space, the reward value of the water controller under the parameter selection strategy is calculated using the following formula: ; ; in, Indicates parameter selection strategy The reward value under represents the state in period t, Indicates the action taken under the state in time period t, represents the action-value function, represents the state value function, Indicates the state of the next period of period t, represents the state space, represents the discount factor, Indicates the status under period t. After the action the state becomes The state transition probability of Based on the reward value, the following formula is used to calculate the cumulative reward of the water controller under the parameter selection strategy: ; in, Indicates the accumulated rewards. represents the independent variable of time, represents the discount factor, Indicates that it is used to control The upper limit parameter, , , Indicates parameter selection strategy Follow Increased reward value, express Timing and parameter selection strategy The reward value under Based on the current warning level, the planned warning level and the current control parameters, the planned control parameters of the water controller in the monitored area are selected in the parameter selection sequence, and the planned control parameters are used as the recommended results of the water warning decision.
2. The method according to claim 1, characterized in that The arrangement of device monitoring points in the area to be monitored includes: Acquire the monitoring area of the monitoring device in the area to be monitored; Based on the monitoring area, the number of monitoring devices in the monitored area is calculated using the following formula: ; in, Indicates the number of devices. represents the area to be monitored, represents the monitoring area, The symbol for rounding up; Calculate the center point of the area to be monitored; Starting from the center point of the area, the monitoring area is spliced to obtain a spliced area; When the number of monitoring areas in the spliced area is not less than the number of devices, selecting a minimum area from the spliced area; The center coordinates of the monitoring area corresponding to the minimum area are used as the device monitoring point.
3. The method according to claim 1, characterized in that The method of using the monitoring data to construct a hydrodynamic model at the monitoring point of the device includes: Obtaining water flow velocity, water level, water wave velocity, waterway resistance and waterway slope from the monitoring data; Based on the water flow velocity, the water level, the water wave velocity, the waterway resistance and the waterway slope, the hydrodynamic model is constructed using the following formula: ; in, represents the hydrodynamic model, Indicates the water level. Indicates the water flow rate, represents the acceleration due to gravity, represents the water wave speed, represents the waterway resistance, Indicates the slope of the waterway. The independent variable representing the length of the waterway, An independent variable representing time.
4. The method according to claim 3, characterized in that The method of calculating the current water flow rate at the monitoring point of the device by using the hydrodynamic model includes: According to the hydrodynamic model, the current water flow rate at the monitoring point of the device is calculated using the following formula: ; in, Indicates the current water flow at the current moment, represents the historical water flow at the historical moment, Indicates the current moment, Indicates the water level. Indicates the water flow rate, represents the acceleration due to gravity, represents the water wave speed, represents the waterway resistance, Indicates the slope of the waterway. The independent variable representing the length of the waterway, The independent variable representing time, i represents The position number on the .
5. The method according to claim 1, characterized in that The analyzing the planned water flow of the current water flow includes: Based on the preset time attention mechanism, the attention feature of the current water flow is calculated using the following formula: ; in, represents the current attention feature output by the temporal attention mechanism, Represents the output of the temporal attention mechanism The attention weight, represents the total amount of current water flow at time t, Indicates the sequence number of the current water flow under different monitoring devices at time t, represents the independent variable of time, Indicates the current water flow. represents the natural exponential function; Inputting the current attention feature into a preset bidirectional long short-term memory network, so as to output a planned attention feature corresponding to the current attention feature through the bidirectional long short-term memory network; The preset fully connected layer is used to output the planned water flow corresponding to the planned attention feature.
6. The method according to claim 1, characterized in that The outputting the current warning level corresponding to the current water flow and the current element quantity through the water affairs warning model includes: Based on the water affairs early warning model, the current early warning probability corresponding to the current water flow and the current element amount is calculated using the following formula: ; in, represents the current warning probability, represents the concatenation result between the current water flow and the current element quantity, represents the weight in the water affairs early warning model, represents the bias in the water affairs early warning model, represents the activation function in the water affairs early warning model; The current warning probability is used to identify a current warning level corresponding to the current water flow and the current element amount.
7. The method according to claim 1, characterized in that The selecting of the planned control parameters of the water controller in the monitored area by using the parameter selection sequence based on the current warning level, the planned warning level and the current control parameters includes: Calculate the reward value of the current warning level, the planned warning level, the current control parameter, and the level difference between the current warning level and the planned warning level in the parameter selection order; The planning control parameters of the water controller in the area to be monitored are selected using the reward value under the parameter selection sequence.
8. A warning decision recommendation system based on a water affairs big model, characterized in that: The system comprises: A data collection module, used to determine the area to be monitored of the water affairs, arrange device monitoring points in the area to be monitored, and collect monitoring data under the device monitoring points; a flow calculation module, configured to construct a hydrodynamic model at the monitoring point of the device using the monitoring data, calculate the current water flow at the monitoring point of the device using the hydrodynamic model, analyze the planned water flow of the current water flow, obtain the current element quantity in the monitoring data, and analyze the planned element quantity of the current element quantity, wherein the planned element quantity represents the element quantity in a future time period; A level output module, used for inputting the current water flow and the current element quantity into a preset water affairs early warning model, so as to output the current warning level corresponding to the current water flow and the current element quantity through the water affairs early warning model, and inputting the planned water flow and the planned element quantity into the water affairs early warning model, so as to output the planned warning level corresponding to the planned water flow and the planned element quantity through the water affairs early warning model; A sequence determination module is used to obtain the current control parameters of the water controller in the monitored area, construct the simulated warning level in the monitored area and the simulated control parameters of the water controller, and use the simulated warning level and the simulated control parameters to determine the parameter selection sequence of the water controller, wherein the parameter selection sequence refers to a sequence of different values of the same parameter type determined by the target parameter selection strategy, wherein the use of the simulated warning level and the simulated control parameters to determine the parameter selection sequence of the water controller includes: According to the simulated warning level and the simulated control parameters, the state space and action space of the water controller are constructed using the following formula: ; ; in, represents the state space, represents the action space, Indicates the warning level in the current period of the simulated warning level. The warning level in the planning period of the simulated warning level, Indicates the difference between the warning level in the current period and the warning level in the planned period. Indicates the control parameters of the current period in the simulation control parameters. represents the measure of adjusting the e-th control parameter in the current period of the simulation control parameter, Indicates from The result of taking any one of them, Indicates adding operation to analog control parameters. Indicates that the analog control parameter is reduced; Constructing a parameter selection strategy for the water controller; Calculating the cumulative reward of the water controller under the parameter selection strategy according to the state space and the action space; Obtaining a target parameter selection strategy corresponding to the maximum cumulative reward in the cumulative rewards in the parameter selection strategy; Determining the parameter selection order of the water controller by using the target parameter selection strategy; The step of calculating the cumulative reward of the water controller under the parameter selection strategy according to the state space and the action space includes: According to the state space and the action space, the reward value of the water controller under the parameter selection strategy is calculated using the following formula: ; ; in, Indicates parameter selection strategy The reward value under represents the state in period t, Indicates the action taken under the state in time period t, represents the action-value function, represents the state value function, Indicates the state of the next period of period t, represents the state space, represents the discount factor, Indicates the status under period t. After the action the state becomes The state transition probability of Based on the reward value, the following formula is used to calculate the cumulative reward of the water controller under the parameter selection strategy: ; in, Indicates the accumulated rewards. represents the independent variable of time, represents the discount factor, Indicates that it is used to control The upper limit parameter, , , Indicates parameter selection strategy Follow Increased reward value, express Timing and parameter selection strategy The reward value under The result determination module is used to select the planned control parameters of the water controller in the monitored area based on the current warning level, the planned warning level and the current control parameters using the parameter selection sequence, and use the planned control parameters as the recommended results of the water warning decision.
Citation Information
Cited By
Early warning decision recommendation method for large water affair model
CN122414679A
