Construction method and equipment of drainage flow prediction model, medium and program product
By constructing a pulse neural network model, mapping the physical elements of the drainage system into neurons and training the model, the problems of low efficiency and accuracy in drainage flow prediction in existing technologies were solved, and more accurate flow prediction was achieved.
Patent Information
- Application Number
- CN202510737730.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-09
AI Technical Summary
In the existing technology, the drainage flow prediction of urban drainage systems relies on manual fitting of statistical relationships, which makes it difficult to capture dynamic characteristics, resulting in low prediction efficiency and accuracy.
A pulse neural network model is constructed by mapping the physical elements of the drainage system as neurons, using historical monitoring data to train the model, establishing connections between the input, hidden and output layers, and forming a drainage flow prediction model.
It improves the prediction accuracy and efficiency of drainage flow, can dynamically simulate the flow changes of the drainage system, and adapt to the complex environment of the urban drainage system.
Smart Images

Figure CN120611871A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water flow prediction, and in particular to a method, equipment, medium and program product for constructing a drainage flow prediction model. Background Art
[0002] With the acceleration of urbanization and the increase in extreme climate events, urban drainage systems are facing increasing pressure. Waterlogging has become a major issue affecting urban safety and residents' lives. To effectively prevent and control waterlogging and improve drainage system management, accurate drainage network flow prediction methods are urgently needed.
[0003] In the prior art, historical drainage data is generally used to fit statistical relationships and to manually predict the drainage flow rate at the drainage outlet of the drainage system.
[0004] This prediction method is highly dependent on data and is difficult to capture the dynamic characteristics of the drainage system. The prediction efficiency and accuracy of the drainage flow at the drainage outlet of the drainage system are low. Summary of the Invention
[0005] The present invention provides a method, device, medium and program product for constructing a drainage flow prediction model to improve the prediction accuracy of the drainage flow of a drainage system.
[0006] According to one aspect of the present invention, a method for constructing a drainage flow prediction model is provided, comprising:
[0007] Acquire multiple pipe network physical elements and pipe network connection relationships of the drainage system, wherein the pipe network physical elements include: input physical elements, hidden physical elements, and output physical elements, and the pipe network connection relationships are used to represent the connection relationships between the elements in the pipe network physical elements;
[0008] Mapping the input-type physical elements to input-layer neurons of a spiking neural network model, mapping the hidden-type physical elements to hidden-layer neurons of the spiking neural network, and mapping the output-type physical elements to output-layer neurons of the spiking neural network model; establishing connections between the input-layer neurons, the hidden-layer neurons, and the output-layer neurons according to the pipe network connection relationship to obtain the spiking neural network model;
[0009] Obtain historical monitoring data of the drainage system, construct a model training sample set based on the historical monitoring data, train the pulse neural network model through the model training sample set, and when the pulse neural network meets the preset training end conditions, determine the pulse neural network model as a drainage flow prediction model, wherein the drainage flow prediction model is used to predict the drainage flow of the drainage system based on the actual detection data of the drainage system.
[0010] According to another aspect of the present invention, there is provided a device for constructing a drainage flow prediction model, comprising:
[0011] Acquire multiple pipe network physical elements and pipe network connection relationships of the drainage system, wherein the pipe network physical elements include: input physical elements, hidden physical elements, and output physical elements, and the pipe network connection relationships are used to represent the connection relationships between the elements in the pipe network physical elements;
[0012] Mapping the input-type physical elements to input-layer neurons of a spiking neural network model, mapping the hidden-type physical elements to hidden-layer neurons of the spiking neural network, and mapping the output-type physical elements to output-layer neurons of the spiking neural network model; establishing connections between the input-layer neurons, the hidden-layer neurons, and the output-layer neurons according to the pipe network connection relationship to obtain the spiking neural network model;
[0013] Obtain historical monitoring data of the drainage system, construct a model training sample set based on the historical monitoring data, train the pulse neural network model through the model training sample set, and when the pulse neural network meets the preset training end conditions, determine the pulse neural network model as a drainage flow prediction model, wherein the drainage flow prediction model is used to predict the drainage flow of the drainage system based on the actual detection data of the drainage system.
[0014] According to another aspect of the present invention, an electronic device is provided, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for constructing a drainage flow prediction model described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for constructing a drainage flow prediction model according to any embodiment of the present invention when executed.
[0019] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method for constructing a drainage flow prediction model according to any embodiment of the present invention is implemented.
[0020] The technical solution of the embodiment of the present invention obtains the connection relationship between the input physical elements, hidden physical elements and output physical elements of the drainage system and the pipe network, maps the input physical elements, hidden physical elements and output physical elements to the input layer neurons, hidden physical neurons and output layer neurons of the pulse neural network model, establishes the connection between the input layer neurons, hidden layer neurons and output layer neurons according to the pipe network connection relationship, and obtains the pulse neural network model. It can establish a strong correspondence between the model and the drainage structure of the drainage system, thereby improving the prediction accuracy of the model. A model training sample set is constructed based on historical monitoring data, and the pulse neural network model is trained using the model training sample set. When the pulse neural network meets the preset training end conditions, the pulse neural network model is determined as a drainage flow prediction model for predicting the drainage flow of the drainage system based on the actual detection data of the drainage system. The drainage flow of the drainage system is predicted by the drainage flow prediction model, which can improve the prediction accuracy and efficiency of the drainage flow.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of a method for constructing a drainage flow prediction model according to the first embodiment of the present invention;
[0024] Figure 2 This is a schematic diagram of the mapping relationship between the physical elements of the pipe network and the pulse neurons in the drainage system provided by an embodiment of the present invention;
[0025] Figure 3 Schematic diagram of the topological relationship between input layer neurons, hidden layer neurons, and output layer neurons in a spiking neural network provided by an embodiment of the present invention;
[0026] Figure 4 A schematic diagram of a leakage current integration and release neuron model provided by an embodiment of the present invention;
[0027] Figure 5 A schematic diagram of input data pulse coding provided by an embodiment of the present invention;
[0028] Figure 6 A schematic diagram of the spiking neural network training process provided by an embodiment of the present invention;
[0029] Figure 7 This is a flowchart of another method for constructing a drainage flow prediction model according to the second embodiment of the present invention;
[0030] Figure 8 An example diagram of the drainage outlet flow prediction results provided by an embodiment of the present invention;
[0031] Figure 9 A schematic structural diagram of a device for constructing a drainage flow prediction model according to a third embodiment of the present invention;
[0032] Figure 10 It is a structural diagram of an electronic device for implementing the method for constructing a drainage flow prediction model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] Example 1
[0036] Figure 1A flowchart of a method for constructing a drainage flow prediction model is provided for the first embodiment of the present invention. This embodiment is applicable to the construction and use of a prediction model for predicting drainage flow in a drainage system. The method can be executed by a device for constructing a drainage flow prediction model. The device for constructing a drainage flow prediction model can be implemented in the form of hardware and / or software. The device for constructing a drainage flow prediction model can be configured in an electronic device. Figure 1 As shown, the method may include:
[0037] S110. Acquire multiple pipe network physical elements and pipe network connection relationships of the drainage system, wherein the pipe network physical elements include: input physical elements, hidden physical elements, and output physical elements, and the pipe network connection relationships are used to represent the connection relationships between the elements in the pipe network physical elements.
[0038] A drainage system can be a network of engineering facilities used to collect, transport, treat, and discharge rainwater, sewage, and other wastewater within a city or region. This system manages a city's water resources in an orderly manner, ensuring smooth drainage and preventing the harm caused by waterlogging and water pollution. A drainage system can include multiple network physical elements. These network physical elements can include input physical elements, hidden physical elements, and output physical elements.
[0039] Among them, the input-type physical element can be a physical device located at the starting end or key monitoring point of the drainage system, which is used to collect and input data or signals related to the operating status of the drainage system. The input-type physical element can be used to monitor the key parameters of the external environment or the inside of the drainage system. The input-type physical element can include at least one of the rainfall sensor, liquid level sensor, flow rate sensor, pump station status monitor and river water level monitor of the drainage system. The rainfall sensor can be used to detect the rainfall intensity in the area. The liquid level sensor can be used to monitor the water level height of the inspection well. The flow rate sensor can be used to monitor the water flow velocity in each pipe in the drainage system. The pump station status monitor can be used to monitor the start and stop status of the pump station. The river water level monitor can be used to monitor the water level height of the downstream river.
[0040] Among them, the hidden physical elements can be physical structures or facilities located within the drainage system that are responsible for transporting, regulating or treating wastewater. The hidden physical elements can include at least one of the following: pipe sections, inspection wells, catchment areas, regulating pools and diversion nodes of the drainage system. A pipe section can be a conveying unit in the drainage system that is used to transport water from one place to another. A inspection well can be a facility in the drainage system for inspecting, cleaning and maintaining drainage pipes, and can be a node for collecting water flow and performing maintenance and inspection on drainage pipes. A catchment area can be an area in the drainage system used to collect rainfall. A diversion node can be a node in the drainage system used to distribute water flow.
[0041] The output-type physical element may be a physical structure or facility located at the end of a drainage system, used to discharge treated wastewater into a natural body of water or further treatment facilities. The output-type physical element may include an outlet of the drainage system, which may be the terminal drainage point of the drainage system, used to discharge treated wastewater into a natural body of water or further treatment facilities.
[0042] The pipe network connection relationship may be a physical connection relationship between various pipe network physical elements in the drainage system. The pipe network connection relationship may be used to represent the connection relationship between input physical elements, hidden physical elements, and output physical elements in the pipe network physical elements.
[0043] Specifically, to obtain multiple pipe network physical elements and pipe network connection relationships of the drainage system, the elements in the drainage system can be classified to determine the input physical elements in the drainage system (such as rainfall sensors, liquid level sensors, flow rate sensors, pump station status monitors and river water level monitors, which are used to collect data or signals related to the operation status of the drainage system), hidden physical elements (such as pipe sections, inspection wells, catchment areas, regulating tanks and diversion nodes, which are responsible for transporting, regulating or treating wastewater) and output physical elements (such as the drainage system's outlets, which are used to discharge treated wastewater into natural water bodies or further treatment facilities). At the same time, the physical connection relationships between the physical elements in the drainage system are clarified to obtain multiple pipe network physical elements and pipe network connection relationships of the drainage system, thereby providing a physical data basis for model construction.
[0044] S120. Map the input physical elements to the input layer neurons of the pulse neural network model, map the hidden physical elements to the hidden layer neurons of the pulse neural network, map the output physical elements to the output layer neurons of the pulse neural network model, and establish connections between the input layer neurons, hidden layer neurons and output layer neurons according to the pipeline network connection relationship to obtain the pulse neural network model.
[0045] The pipeline network connection relationship includes a first connection relationship between an input physical element and a hidden physical element, a second connection relationship between each physical element in the hidden physical element, and a third connection relationship between the hidden physical element and the output physical element. The first connection relationship is used to represent the connection relationship between the input physical element and the hidden physical element. The second connection relationship is used to represent the connection relationship between each physical element in the hidden physical element. The third connection relationship is used to represent the connection relationship between the hidden physical element and the output physical element.
[0046] The input layer neurons may correspond to input-type physical elements and are used to construct a spiking neural network model. The hidden layer neurons may correspond to hidden-type physical elements and are used to construct a spiking neural network model. The output layer neurons may correspond to output-type physical elements and are used to construct a spiking neural network model.
[0047] The spiking neural network model can be constructed based on input layer neurons corresponding to input physical elements, input layer neurons corresponding to input physical elements, and the connection relationship between pipe networks corresponding to the drainage system. This neural network model is used to dynamically model the drainage system. Further training of the constructed spiking neural network model can yield a prediction model for predicting drainage flow in the drainage system.
[0048] Specifically, mapping input-type physical elements to input layer neurons of a pulse neural network model may include: mapping rainfall sensors, liquid level sensors, flow rate sensors, pump station status monitors and river water level monitors to rainfall sensor neurons, liquid level sensor neurons, flow rate sensor neurons, pump station status monitor neurons and river water level monitor neurons of a pulse neural network model; mapping hidden-type physical elements to hidden layer neurons of a pulse neural network may include: mapping pipe sections, inspection wells, catchment areas, regulating pools and diversion nodes of a drainage system to pipe section neurons, inspection well neurons, catchment area neurons, regulating pool neurons and diversion node neurons of a pulse neural network model; mapping output-type physical elements to output layer neurons of a pulse neural network model may include: mapping the drainage outlet of a drainage system to the outlet flow neurons of a pulse neural network model.
[0049] The input layer neurons correspond to the various monitoring points in the drainage system and are used to receive external input signals. Rainfall sensor neurons correspond to rain gauges distributed throughout the urban drainage area and are used to receive regional rainfall intensity data. Liquid level sensor neurons correspond to liquid level gauges installed at drainage inspection wells and key nodes and are used to receive water level data. Flow rate sensor neurons correspond to flow meters installed within drainage pipe sections and are used to receive water flow velocity data within the pipes. Pump station status monitor neurons correspond to the operation monitoring devices of drainage pump stations and are used to receive pump station start and stop status data. River water level monitor neurons correspond to water level monitoring stations in the downstream receiving river of the drainage system and are used to receive river water level data.
[0050] Among them, the hidden layer neurons correspond to the internal structural elements of the drainage system and are used to simulate the dynamic process of convergence and transmission within the drainage system. Pipe segment neurons: corresponding to the pipe segments in the drainage network, used to simulate the propagation and delay effect of water flow in the pipes; manhole neurons correspond to the manholes in the drainage network, used to simulate the convergence, distribution and overflow of water flow at the nodes; catchment area neurons correspond to the catchment area of the drainage system, used to simulate the process of rainfall forming surface runoff and converging into the pipe network; regulating tank neurons correspond to the regulating tanks or water collection tanks in the system, used to simulate the temporary storage and balancing effect of rainwater; diversion node neurons correspond to the diversion or confluence nodes in the pipe network, used to simulate the merging and distribution process of water flow in the pipes.
[0051] The output layer neurons correspond to the terminal outlets of the drainage system and are used to output the drainage flow rate predicted by the model. The outlet flow neurons correspond to the discharge outlets of the urban drainage network, and their pulse emission frequency represents the predicted instantaneous drainage flow rate.
[0052] For example, Figure 2 The embodiment of the present invention provides a schematic diagram of the mapping relationship between the physical elements of the pipe network and the pulse neurons in the drainage system, as shown in FIG. Figure 2 As shown, the rainfall sensor, liquid level sensor, flow rate sensor, pump station status monitor and river water level monitor are mapped to the rainfall sensor neurons, liquid level sensor neurons, flow rate sensor neurons, pump station status monitor neurons and river water level monitor neurons of the pulse neural network model; the pipe sections, inspection wells, catchment areas, regulating pools and diversion nodes of the drainage system are mapped to the pipe section neurons, inspection well neurons, catchment area neurons, regulating pool neurons and diversion node neurons of the pulse neural network model; the drainage outlet of the drainage system is mapped to the outlet flow neurons of the pulse neural network model.
[0053] Specifically, the connection between the input layer neurons, the hidden layer neurons and the output layer neurons is established according to the pipeline network connection relationship. The connection relationship between the input layer neurons corresponding to the input physical element and the hidden layer neurons corresponding to the hidden physical element can be determined according to the first connection relationship between the input physical element and the hidden physical element, and then the connection between the input layer neurons and the hidden layer neurons is established according to the connection relationship between the input layer neurons and the hidden layer neurons; the connection relationship between the hidden layer neurons corresponding to the hidden physical element is determined according to the second connection relationship between the physical elements in the hidden physical element, and then the connection between the hidden layer neurons is established according to the connection relationship between the hidden layer neurons; the connection relationship between the hidden layer neurons corresponding to the hidden physical element and the output layer neurons corresponding to the output physical element is determined according to the third connection relationship between the hidden physical element and the output physical element, and then the connection between the hidden layer neurons and the output layer neurons is established according to the connection relationship between the hidden layer neurons and the output layer neurons.
[0054] Optionally, establishing connections between input layer neurons, hidden layer neurons and output layer neurons according to the pipe network connection relationship may include: establishing connections between rainfall sensor neurons and catchment area neurons, connections between liquid level sensor neurons and inspection well neurons and catchment area neurons, connections between flow rate sensor neurons and first pipe segment neurons and second pipe segment neurons, connections between pump station status monitor neurons and second pipe segment neurons and regulating pool neurons, and establishing connections between river water level monitor neurons and third pipe segment neurons and regulating pool neurons according to a first connection relationship; establishing connections between inspection well neurons and third pipe segment neurons and connections between third pipe segment neurons and second pipe segment neurons according to a second connection relationship; establishing connections between third pipe segment neurons and diversion node neurons and outlet flow neurons according to a third connection relationship.
[0055] For example, Figure 3 A schematic diagram of the topological relationship between the input layer neurons, hidden layer neurons and output layer neurons in the pulse neural network provided by the embodiment of the present invention, such as Figure 3 As shown, each neuron in the input layer is connected to each neuron in the hidden layer according to the first connection relationship (the spatial correspondence between monitoring points and drainage network elements). Each neuron in the hidden layer is connected to each other according to the second connection relationship (the physical connection relationship between drainage network elements). Each neuron in the hidden layer is connected to each neuron in the output layer according to the third connection relationship (the node connected to the drain outlet).
[0056] For example, the rainfall sensor neuron is connected to the catchment area neuron corresponding to the coverage area to transmit rainfall information to the catchment process; the liquid level sensor neuron is connected to the manhole neuron where the sensor is installed and the pipe section neuron connected to the manhole to affect the water level changes on the corresponding pipe network part; the flow rate sensor neuron is connected to the pipe section neuron corresponding to the location to provide local flow rate information of the pipeline; the pump station status neuron is connected to the pipe section neuron and regulating tank neuron affected by the pump station to reflect the impact of pumping and drainage operation on the water flow in the pipe network; the river water level neuron is connected to the downstream pipe section neuron near the drain outlet to transmit the back pressure impact of the external river water level on the drain outlet to the model.
[0057] For example, connections are established between corresponding hidden layer neurons based on the physical connection relationship between the elements within the drainage network. The catchment area neuron is connected to the manhole neuron into which it flows, simulating the process of surface runoff flowing into the drainage node; the manhole neuron is connected to the downstream pipe segment neuron connected to it, transferring the water collected at the node to the pipeline; the pipe segment neurons are connected sequentially according to the upstream and downstream relationship of the pipeline in the drainage network, simulating the conduction of water along the pipeline; the regulating pool neuron is connected to the relevant pipe segment neuron and the diversion node neuron, simulating the peak-shaving and valley-filling effect of the regulating pool on the pipeline flow; the diversion node neuron is connected to the downstream pipe segment neuron from which it diverts, simulating the impact of the diversion at the node on the downstream pipeline. It should be noted that loop connections (feedback connections) can also be introduced between hidden layer neurons to simulate the retention and circulation characteristics of water flow in the pipeline network. For example, a loop can be formed between two adjacent pipe segment neurons to reflect the reciprocating impact of water level fluctuations in the pipeline network. The weights and delays of the loop connections can be set according to the hydraulic characteristics of the pipeline network, thereby enhancing the model's ability to represent dynamic processes.
[0058] For example, the pipeline segment neurons directly related to the outlet flow rate, as well as other key hidden layer neurons that influence the outlet flow rate, are connected to the outlet flow rate neurons. For example, neurons corresponding to the last few sections of pipe directly connected to the outlet, the manholes before the outlet, or the diversion nodes all act on the output layer neurons through synaptic connections. In this way, when the relevant hidden layer neurons are excited, they affect the membrane potential accumulation and pulse firing frequency of the output layer neurons, thereby affecting the final predicted flow rate value.
[0059] Optionally, the spiking neural network model may adopt a leaky integrate-and-fire neuron model (LIF), which can simulate the dynamic changes of neuron membrane potential through a first-order differential equation.
[0060] Figure 4 A schematic diagram of a leakage integration and release neuron model provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown in Figure 1, the circuit equivalent model of a neuron in the leaky integrate-and-shoo neuron model is shown, as well as the process of integrating the membrane potential over time, reaching the threshold trigger pulse, and resetting. For example, the leaky integrate-and-shoo neuron model can be expressed by the following formula:
[0061]
[0062] Among them, u(t) is the neuron membrane potential, u rest is the resting potential, τ is the membrane potential time constant, R is the membrane resistance, and I(t) is the input current (accumulated from synaptic input). When the membrane potential rises and reaches the predetermined threshold u th When the neuron triggers a pulse discharge, the membrane potential is instantly reset to the set reset potential u rest This process is similar to the "charge-discharge" behavior of biological neurons.
[0063] Optionally, by further adjusting the parameter settings of the leakage integral release neuron model, different types of neurons can exhibit different dynamic characteristics to adapt to the functional requirements of the simulated drainage network elements. For example, the input layer neurons can be set to a smaller time constant τ, so that they can respond quickly to changes in the input signal and reflect the sensor surge as a pulse output in real time; the catchment area neurons can increase the time constant τ to simulate the lag in the process of converting rainfall to runoff, so that they have a delayed response to the input rainfall pulse signal; the pipe segment neurons can associate the time constant τ with factors such as the pipe segment length and flow rate to reflect the time required for water flow to be transmitted along the pipeline. For example, the length of the pipe segment is proportional to the value of τ, and the flow rate of water in the pipe segment is inversely proportional to the value of τ; the inspection well neurons can be set to a threshold potential u th Associated with the manhole volume threshold, when the simulated water storage in the manhole exceeds the capacity threshold, the neuron's pulse firing corresponds to overflow in the actual system. By setting the outlet flow neuron to have no fixed threshold limit, changes in its membrane potential can be continuously accumulated and linearly mapped to the flow output value (or assuming the threshold is far above the normal range to prevent pulse saturation), allowing the pulse frequency to accurately reflect changes in flow rate. By setting up the leakage current integration and firing neuron model, the spiking neural network model can simulate the dynamic behavior of each component of the drainage system in a bioinspired manner, integrating hydrological processes into the spatiotemporal pulse activity of neurons, thereby achieving the initial construction of the spiking neural network model and providing a foundation for further training and use of the model.
[0064] S130. Obtain historical monitoring data of the drainage system, construct a model training sample set based on the historical monitoring data, train the pulse neural network model through the model training sample set, and determine the pulse neural network model as a drainage flow prediction model when the pulse neural network meets the preset training end conditions, wherein the drainage flow prediction model is used to predict the drainage flow of the drainage system based on the actual detection data of the drainage system.
[0065] Historical monitoring data may include various operating parameters and status information recorded by the drainage system at preset times, and can be used to construct a sample set for training a prediction model. Historical monitoring data may include historical rainfall data, historical liquid level data, historical flow rate data, historical pump station status, historical river water level data, and historical outfall flow data for the drainage system at multiple preset times. Historical rainfall data may include rainfall intensity or rainfall volume data recorded at preset times in the monitoring area corresponding to the drainage system's rainfall sensor. Historical liquid level data may include water level data recorded at preset times in manholes in the drainage system. Historical flow rate data may include water flow velocity data within pipelines recorded at preset times by the drainage system. Historical pump station status may include pump station start and stop data recorded at preset times by the drainage system. Historical river water level data may include downstream river water level data recorded at preset times by the drainage system. Historical outfall flow data may include data recorded at system terminal drainage points at preset times by the drainage system. The embodiments of the present invention do not specifically limit the method for acquiring historical monitoring data or the amount of data acquired. Those skilled in the art may independently select the method for acquiring historical monitoring data and the amount of data acquired based on their needs.
[0066] Among them, the model training sample set can be sample data used to train the pulse neural network model after processing the historical monitoring data. The model training sample set can include a training sample set, a test sample set, and a validation sample set. The training sample set can be used to train the model so that the model can complete parameter learning, the validation sample set can be used to adjust the hyperparameters of the model and prevent the model from overfitting, and the test sample set can be used to evaluate the predictive performance of the model. Optionally, when training the model through the model training set sample set, the time resolution of the training data is consistent with the input (for example, both are 1 minute) to ensure that the model can learn the dynamic change characteristics at the minute level.
[0067] Among them, the preset training end condition can be a pre-set condition or threshold used to determine whether the pulse neural network model can stop training during the training process. For example, at least one of the training rounds reaches a set value, the loss function value reaches a threshold, or convergence and the model parameter change is less than a threshold. The drainage flow prediction model can be a pulse neural network model that meets the preset training end condition after training the pulse neural network model by constructing a model training sample set based on historical monitoring data. The drainage flow prediction model can be used to predict the drainage flow of the drainage system based on the actual detection data of the drainage system. The actual detection data can be monitoring data such as the status or operation status of each physical element in the drainage system collected in real time by various monitoring equipment during the operation of the drainage system.
[0068] Optionally, after completing the preliminary construction of the pulse neural network model, the original monitoring data obtained (for example, historical monitoring data used for model training or actual detection data used to predict the drainage flow at the drainage system outlet) is preprocessed and converted before being input into the model to ensure that the data can meet the training or prediction requirements of the model. For example, multi-source data is obtained from the urban drainage pipe network monitoring system as a model-driven input, and the obtained original monitoring data is preprocessed before being input into the model, and the preprocessed time series data is further converted into a discrete pulse signal acceptable to the pulse neural network to ensure that the data can meet the training and prediction requirements of the model. For example, the input data encoding adopts a frequency encoding method to convert the continuous monitoring data into a pulse sequence: that is, the larger the data value, the higher the corresponding pulse emission frequency. By preprocessing the data, the pulse neural network can accept the input of multi-source monitoring data in the form of a pulse time series.
[0069] Specifically, multi-source data can be obtained from the urban drainage network monitoring system according to the predicted collection frequency (for example, the data collection frequency is once per minute, that is, the time resolution is 1 minute) as the model-driven input. For example, rainfall data is monitored by rain gauges installed in various parts of the city, recording the changes in regional rainfall intensity over time; liquid level data is monitored by liquid level gauges installed in inspection wells or flood-prone points, recording the changes in water level height at the nodes of the network; flow velocity data is monitored by flow velocity sensors in the pipeline, recording the changes in water flow velocity in key pipe sections over time; the operation status of the pump station is monitored by the drainage pump station monitoring system, recording the start and stop (open or close) status of the pump station and the corresponding time; the water level data of the river is monitored by the water level gauge of the receiving water body downstream of the drainage system (such as the river), recording the changes in the water level of the external river. By obtaining multi-source data of the urban drainage system, it is possible to understand the dynamic changes of the urban drainage system and provide a data basis for model input for training and real-time prediction.
[0070] Specifically, after obtaining the original monitoring data (such as historical monitoring data used for model training or actual detection data used to predict the drainage flow rate at the drainage system outlet), the obtained original monitoring data can be preprocessed before being input into the model to ensure that the data can meet the model training and drainage volume prediction requirements. For example, outliers in the original monitoring data are detected and processed, such as by applying statistical analysis methods to identify abnormal fluctuations or obvious erroneous values in the data, and correcting or eliminating outliers based on business rules or historical distributions; missing values in the original monitoring data are interpolated, such as using time series interpolation, neighboring site inference and other methods to fill in the missing sections in the monitoring data to reduce the impact of missing information on model training; the data in the original monitoring data are standardized, such as normalizing data from different sources and different dimensions to the interval [0,1] to eliminate the adverse effects of different dimensions on model training and ensure that the encoded pulse frequency falls within a reasonable range, thereby obtaining time series data corresponding to the original monitoring data. By preprocessing the original monitoring data, a continuous, reliable and dimensionally unified model input data sequence can be obtained.
[0071] Specifically, after preprocessing the acquired raw monitoring data, the preprocessed time series data is converted into a discrete pulse signal acceptable to the pulse neural network. For example, Figure 5 A schematic diagram of input data pulse coding provided by an embodiment of the present invention, such as Figure 5 As shown in Figure 1, frequency encoding can be used to map numerical data to corresponding pulse emission frequencies. The encoding rules can be: Rainfall data encoding: The larger the rainfall intensity, the higher the pulse frequency generated by the encoding, reflecting the strong excitation of the model by heavy rainfall events; Liquid level data encoding: The higher the liquid level (indicating a higher degree of water filling in the pipe network or a greater likelihood of waterlogging), the higher the pulse emission frequency; Flow rate data encoding: The faster the water flow in the pipe, the stronger the water flow capacity, corresponding to a higher pulse frequency; Pump station status encoding: The on / off state of the pump station is discretized into pulse frequencies, where high-frequency pulses represent when the pump is on, and low-frequency pulses represent when the pump is off (or no pulses are emitted); River water level data encoding: The higher the river water level, the more obvious the water level support on the outlet (the rising water level in the upstream river creates an upward pressure and obstruction on the water flow at the downstream outlet, making it difficult for the water flow at the outlet to be discharged smoothly), so a higher pulse frequency is used to represent high water levels.
[0072] Among them, the linear mapping formula of frequency coding can be expressed as:
[0073] f=f min +(f max -f min )×x norm
[0074] Among them, f is the pulse frequency obtained by encoding (Hz, Hertz), f min and f max The preset minimum and maximum pulse frequency thresholds (e.g. f min =10Hz, f max =100Hz), x norm is the normalized value of the pre-processed monitoring data, ranging between 0 and 1. Through the frequency coding rule, the continuous monitoring data is converted into (f min ,f max ) range, feeding the model's input neurons and completing the model training. By encoding the data and leveraging the information-carrying power of pulse frequency, the model can perceive changes in input signal strength.
[0075] Optionally, a model training sample set is constructed based on historical monitoring data, including: dividing historical rainfall data, historical liquid level data, historical flow rate data, historical pump station status, historical river water level data and historical outlet flow data corresponding to the preset time at multiple preset times into a training sample set, a test sample set and a verification sample set according to a preset ratio. Among them, the preset time can be a pre-set time node for obtaining various rainfall intensities and drainage condition monitoring data covering different seasons. By using various rainfall intensities and drainage condition monitoring data covering different seasons as training data, the generalization ability of the model can be enhanced. The preset ratio can be a pre-selected setting, which is used to divide the ratio of the training sample set, the test sample set and the verification sample set. For example, the training sample set is 70% of the total sample set, and the test sample set and the verification sample set are 15% each.
[0076] Optionally, the pulse neural network model is trained through a model training sample set, including: unsupervised pre-training of the pulse neural network model through an unlabeled model training sample set, and updating the synaptic weights between hidden layer neurons through a pulse time-dependent plasticity algorithm; supervised training of the unsupervised pre-trained pulse neural network model based on the training sample set through a spatiotemporal backpropagation algorithm, determining a loss function according to the predicted value and actual value of the pulse neural network model, and ending the supervised training when the loss function converges; optimizing the pulse neural network model through a reward signal that is negatively correlated with the prediction error value, enhancing the synaptic weight adjustment when the error between the predicted value and the actual value of the pulse neural network model is less than a preset threshold, and weakening the synaptic weight adjustment when the error between the predicted value and the actual value of the pulse neural network model is less than a preset threshold; verifying the pulse neural network model through a verification sample set to obtain the predicted value output by the pulse neural network model.
[0077] Among them, the unlabeled model training sample set can be a set of training data that is not pre-labeled with the corresponding output results during the training process, and can be used for unsupervised pre-training of the spiking neural network model. Unsupervised pre-training can be a training process that performs preliminary training on the spiking neural network model using unlabeled data. Unsupervised training of the spiking neural network model using unlabeled data allows the model to automatically learn the inherent structure and patterns in the data without external supervisory signals (i.e., labels), further adaptively adjust the synaptic weights between hidden layer neurons, form an expression of the dynamic characteristics of the drainage system, and provide a basis for subsequent supervised training.
[0078] Among them, the spike time-dependent plasticity algorithm can be a biologically inspired local learning mechanism for updating the weights of synapses between neurons. Specifically, the synaptic weights can be adjusted based on the time difference between the spikes fired by presynaptic and postsynaptic neurons. For example, when the presynaptic neuron spikes earlier than the postsynaptic neuron, "long-term potentiation" is triggered, and the synaptic weight increases; conversely, if the postsynaptic neuron spikes first, "long-term depression" is triggered, and the synaptic weight decreases. This can simulate the characteristics of synaptic plasticity in biological neural systems and enable the model to adaptively form an internal topology of the neural network that is more consistent with the dynamic structure of the drainage system. The synaptic weight can be the strength of the connection between two neurons in a spiking neural network. The synaptic weight can be used to characterize the degree of influence of the spike fired by the presynaptic neuron on the membrane potential of the postsynaptic neuron. By adjusting the synaptic weight through the algorithm, the model's data processing accuracy can be improved, thereby improving the model's prediction accuracy.
[0079] Among them, the spatiotemporal backpropagation algorithm can be an algorithm obtained by improving the standard backpropagation algorithm in the pulse neural network, and is used for supervised training of the pulse neural network. The spatiotemporal backpropagation algorithm can take into account the propagation characteristics of the pulse in time and space, and by approximating the pulse emission function in a continuous manner, it is possible to use methods such as gradient descent to update the network parameters, thereby realizing supervised training of the pulse neural network. The pulse neural network model after unsupervised pre-training can be a pulse neural network model obtained by using an algorithm to update the synaptic weights between hidden layer neurons during the unsupervised pre-training stage. Supervised training can be the process of training the entire pulse neural network using labeled training data based on the unsupervised pre-training of the model. For example, by defining the prediction error loss function, calculating the gradient of each neural network parameter to the loss based on the error backpropagation algorithm, and using methods such as gradient descent to update the network parameters, the prediction accuracy of the model in the traffic prediction task is optimized.
[0080] Among them, the predicted value of the pulse neural network model can be the predicted value of the outlet flow obtained by the model based on the input monitoring data (such as rainfall data, liquid level data, etc.). The actual value of the pulse neural network model can be the true value of the outlet flow actually measured at the same time point as the predicted value. The loss function can be a function used to measure the difference between the model prediction value and the actual value. The convergence of the loss function can be that during the training process of the pulse neural network model, as the model parameters are continuously updated, the value of the loss function gradually decreases and tends to stabilize, reaching a preset threshold range or a state where it no longer decreases significantly. If the loss function converges, it means that the pulse neural network model can achieve accurate prediction of the outlet flow.
[0081] The prediction error value can be determined based on the prediction value of the spiking neural network model and the actual value of the outlet flow obtained through actual measurement, representing the magnitude of the error in the prediction value of the spiking neural network model. The reward signal can be defined based on the model's prediction results and inversely proportional to the prediction error value. For example, a larger prediction error value results in a weaker reward signal, while a smaller prediction error value results in a stronger reward signal. The preset threshold value can be a pre-set standard value used to determine the magnitude of the model's prediction error. During the optimization training phase, the error between the model's prediction value and the actual value can be compared with the preset threshold value to determine whether to strengthen or weaken synaptic weight adjustments. Strengthening synaptic weight adjustments can be achieved by enhancing the synaptic strengthening adjustments caused by the original STDP (spike timing dependent plasticity) through reward modulation rules when the model performs well. Weakening synaptic weight adjustments can be achieved by suppressing or ignoring the weight changes caused by the original STDP (spike timing dependent plasticity) through reward modulation rules when the model performs poorly.
[0082] The predicted value output by the spiking neural network model can be a drainage outlet flow prediction result calculated by the spiking neural network model based on the input real-time monitoring data. The predicted value output by the spiking neural network model can be used to predict and monitor the drainage flow of the drainage system in real time, providing data support for drainage system management and decision-making.
[0083] Optionally, when the pulse neural network meets the preset training end conditions, the pulse neural network model is determined as a drainage flow prediction model, including: determining a model evaluation index corresponding to the pulse neural network model based on multiple predicted values and multiple actual values output by the pulse neural network model; wherein the model evaluation index includes at least one of the mean absolute error, the root mean square error, the determination coefficient and the peak flow prediction accuracy; when the model evaluation index meets the preset index compliance conditions, the pulse neural network model is determined as the drainage flow prediction model.
[0084] Among them, the model evaluation index can be a quantitative standard for evaluating the performance of the pulse neural network model in the drainage flow prediction task. The model evaluation index can be obtained by comparing the predicted value and the actual value output by the model. The model evaluation index includes at least one of the mean absolute error, the root mean square error, the determination coefficient and the peak flow prediction accuracy. The mean absolute error can be the average value of the absolute value of the difference between the predicted value and the actual value. The root mean square error can be obtained by taking the square root of the square mean of the prediction error, which can be used to characterize the standard deviation of the prediction error. The determination coefficient can be used to characterize the degree to which the model explains the fluctuations in actual data. The peak flow prediction accuracy can be the correct rate of drainage system drainage prediction at critical high flow peaks, which is used to characterize the effectiveness of the model in sudden waterlogging scenarios.
[0085] Among them, the preset indicator compliance conditions can be pre-set and used to determine whether the model evaluation indicators meet the required standards. The preset indicator compliance conditions can be formulated according to the needs of the actual application scenario and the requirements for model performance. For example, the mean absolute error can be set not to exceed a certain threshold, the root mean square error can be less than a certain value, the determination coefficient can be greater than a set value, the peak flow prediction accuracy can reach a certain percentage, etc. Only when all the evaluation indicators of the model meet these preset conditions, the model is considered to have achieved the expected performance level. The embodiment of the present invention does not specifically limit the setting method of the preset indicator compliance conditions, and those skilled in the art can set them independently according to their needs.
[0086] The drainage flow prediction model may be a model that is used to predict the drainage flow of the drainage system based on actual detection data of the drainage system after training and evaluation.
[0087] Specifically, using a drainage flow prediction model to predict the drainage flow of a drainage system based on actual test data from the drainage system can involve preprocessing and encoding the actual test data, and then inputting the encoded data into the drainage flow prediction model, so that the drainage flow prediction model can predict the drainage flow of the drainage system based on the actual test data of the water system. Using the drainage flow prediction model to predict the drainage flow of a drainage system can quickly provide a highly accurate data foundation for drainage system management, scheduling, and decision-making, thereby reducing the risks of disasters such as waterlogging.
[0088] Figure 6 A schematic diagram of the pulse neural network training process provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, the model training process includes unsupervised STDP (spike time-dependent plasticity) pre-training, supervised spatiotemporal backpropagation training, and reinforcement learning optimization. For example, in a model training scenario of an embodiment of the present invention, training a spiking neural network model to obtain a drainage flow prediction model may include the following process:
[0089] Step 1: Obtain training data
[0090] Specifically, historical monitoring data within a preset time interval can be obtained for model training, such as historical rainfall data, historical liquid level data, historical flow rate data, historical pump station status, historical river water level data, and historical outlet flow data at the corresponding time within the preset time interval. It should be noted that the preset time interval corresponding to the training data covers different seasons, various rainfall intensities and drainage conditions to enhance the generalization ability of the model. The complete data set is divided into a training set (for example, 70% of the total data volume), a validation set (15%), and a test set (15%). Among them, the training set can be used for model parameter learning, the validation set can be used to adjust hyperparameters and prevent overfitting, and the test set can be used to finally evaluate the predictive performance of the model. The time resolution of the data is consistent with the input (both are 1 minute) to ensure that the model can learn dynamic change characteristics at the minute level.
[0091] Step 2: Pre-training of the Spiking Neural Network Model (Unsupervised Learning)
[0092] Specifically, unsupervised pre-training of the hidden layers of the spiking neural network model can be performed, using historical unlabeled data to drive the self-organizing adjustments of the model's internal structure. Through pre-training, the spiking neural network model can initially acquire the ability to extract patterns under unsupervised conditions.
[0093] For example, the Spiking Time-Dependent Plasticity (STDP) algorithm can be used to update the synaptic weights between hidden layer neurons. The Spiking Time-Dependent Plasticity algorithm is a biologically inspired local learning mechanism. Specifically, when the presynaptic neuron fires a spike earlier than the postsynaptic neuron (i.e., the time difference Δ t >0), triggering "long-term potentiation"
[0094] (Long-Term Potentiation, LTP), the synaptic weight increases; if the postsynaptic neuron fires a pulse first (Δ t <0), then "Long-Term Depression" (LTD) is triggered, and the synaptic weight is weakened. For example, the spike time-dependent plasticity algorithm mechanism can be expressed in the following mathematical form:
[0095] If Δ t >0, then Δ w =A + ×exp(-Δ t / τ + ); if Δ t <0, then Δ w =A- ×exp(Δ t / τ - );
[0096] Among them, Δ w is the change in synaptic weight; Δ t is the time difference between the pre-synaptic and post-synaptic neuron pulses, that is, Δ t =t pre -t post ; A + and A - is the amplitude factor of synaptic enhancement or inhibition; τ + and τ - is the time-dependent scaling factor.
[0097] Pre-training the spiking neural network model through the pulse time-dependent plasticity algorithm can enable the spiking neural network model to automatically enhance the neuronal connections that are often synchronously active and weaken the connections that are irrelevant or asynchronously activated, thereby adaptively forming an internal topology of the neural network that is more in line with the dynamic structure of the drainage system.
[0098] Step 3: Model supervised training
[0099] Specifically, after obtaining the initial network through unsupervised pre-training of the spiking neural network model, the entire spiking neural network can be trained through a supervised global error back propagation algorithm to further improve the prediction accuracy of the model in traffic prediction tasks.
[0100] For example, the model can be supervised and trained using an improved spatiotemporal backpropagation algorithm. During the training process, the pulse emission function of the leaky integrate-and-fire (LIF) neuron can be approximated by a smooth logistic function (Sigmoid function), which can be expressed by the following formula:
[0101] σ(u)=1 / [1+exp(-β×(uu th ))]
[0102] Where u is the neuronal membrane potential; u th is the firing threshold of the neuron; β is the parameter that controls the steepness of the function; when the value of β is large, σ(u) will be close to a step function, which is used to simulate the discontinuous discharge characteristics of the model. By replacing the activation function with a continuously differentiable one, it is possible to use gradient descent and other methods to update the network parameters.
[0103] For example, the prediction error loss function L can be defined as the mean squared error (MSE) between the model prediction value and the actual value, which can be expressed as follows:
[0104]
[0105] Where N is the number of training samples; Q actual(i) represents the actual flow of the i-th sample; Q predicted(i) represents the model predicted flow of the i-th sample.
[0106] Based on the loss function L, the gradient of each neural network parameter (such as synaptic weight, neuron threshold, etc.) to the loss can be calculated through the error back propagation algorithm, and the parameters can be updated using the following formula:
[0107]
[0108] Among them, θ is any parameter to be trained, and η is the learning rate; is the gradient of the loss function with respect to θ.
[0109] Through continuous iterative training, the model can more accurately predict the actual drainage flow rate through supervised training until the loss function converges to the set threshold range or the preset training rounds are reached.
[0110] Step 4: Model Enhancement and Optimization Training
[0111] Specifically, the model can be fine-tuned and optimized using reward-modulated STDP. Model-enhanced optimization training can appropriately adjust the synaptic plasticity rules based on the model's prediction performance. For example, a negative correlation function between the reward signal $R$ and the prediction error can be defined, for example:
[0112] R=exp[-α×|Q actual -Q predicted |]
[0113] Among them, Q actual is the actual observed outfall flow rate; Q predicted is the flow predicted by the model; α is the scaling factor used to control the decay rate of the reward function.
[0114] For example, when the prediction error is small, that is, the model prediction value is close to the actual value, R approaches 1, indicating a high reward; when the prediction error is large, R approaches 0, indicating a low reward. Based on this, the model weight update rule can be modified as follows:
[0115] Δw ′ =R×Δw STDP
[0116] Where: Δw STDP is the change in synaptic weight calculated under the original STDP rule; Δw′ is the actual weight change after reward modulation. When the model performs well (i.e., with small error and large R), the synaptic enhancement adjustments caused by STDP are retained or even enhanced. When the model performs poorly (i.e., with large error and small R), the weight changes caused by STDP are suppressed or ignored. This effectively prevents the model from incorrectly adjusting synaptic connections when prediction errors are large, improving the model's self-tuning capabilities. By introducing multiple rounds of reinforcement fine-tuning, the model can be further optimized to reduce prediction errors and enhance its adaptability to complex traffic flow changes.
[0117] Step 5: Model Evaluation and Selection
[0118] The performance of the model in the training phase is evaluated using the validation set data. The optimal model parameters are selected based on the evaluation indicators and the training is terminated. The evaluation indicators may include but are not limited to: mean absolute error (MAE): the average of the absolute values of the difference between the predicted value and the actual value; root mean square error (RMSE): the square root of the mean square of the prediction error, reflecting the standard deviation of the prediction error; coefficient of determination (R 2 ): reflects the degree to which the model explains actual data fluctuations; Peak flow prediction accuracy: the accuracy of predictions for key high-flow peaks, measuring the model's effectiveness in sudden waterlogging scenarios. The above indicators are used to evaluate the accuracy and robustness of the model, and the model parameter configuration with the best performance on the validation set is selected as the final model. If the model is found to have deficiencies in certain indicators, the network structure or parameters can be adjusted and training can be continued until the conditions for training are met. The trained spiking neural network model is then determined to be the drainage flow prediction model.
[0119] The technical solution of the embodiment of the present invention obtains the connection relationship between the input physical elements, hidden physical elements and output physical elements of the drainage system and the pipe network, maps the input physical elements, hidden physical elements and output physical elements to the input layer neurons, hidden physical neurons and output layer neurons of the pulse neural network model, establishes the connection between the input layer neurons, hidden layer neurons and output layer neurons according to the pipe network connection relationship, and obtains the pulse neural network model. It can establish a strong correspondence between the model and the drainage structure of the drainage system, thereby improving the prediction accuracy of the model. A model training sample set is constructed based on historical monitoring data, and the pulse neural network model is trained using the model training sample set. When the pulse neural network meets the preset training end conditions, the pulse neural network model is determined as a drainage flow prediction model for predicting the drainage flow of the drainage system based on the actual detection data of the drainage system. The drainage flow of the drainage system is predicted by the drainage flow prediction model, which can improve the prediction accuracy and efficiency of the drainage flow.
[0120] Example 2
[0121] Figure 7 This is a flowchart of another method for constructing a drainage flow prediction model provided by the second embodiment of the present invention. Based on the above embodiments, this embodiment, after training the drainage flow prediction model, also includes: periodically acquiring actual detection data of the drainage system, preprocessing the actual detection data, obtaining time series data corresponding to the actual detection data, and converting the time series data into pulse coded data through frequency coding; inputting the pulse coded data into the input layer neurons of the drainage flow prediction model, and counting the pulse emission frequencies output by the output layer neurons of the drainage flow prediction model in multiple preset time windows; decoding the pulse emission frequencies output by the output layer neurons in the preset time window through a preset decoding algorithm to obtain the instantaneous drainage flow prediction values of the drainage system at multiple preset prediction moments. Figure 7 As shown, the method may include:
[0122] S710. Acquire multiple pipe network physical elements and pipe network connection relationships of the drainage system, where the pipe network physical elements include: input physical elements, hidden physical elements, and output physical elements, and the pipe network connection relationships are used to represent the connection relationships between the elements in the pipe network physical elements.
[0123] S720. Map the input physical elements to the input layer neurons of the pulse neural network model, map the hidden physical elements to the hidden layer neurons of the pulse neural network, map the output physical elements to the output layer neurons of the pulse neural network model, and establish connections between the input layer neurons, hidden layer neurons and output layer neurons according to the pipeline network connection relationship to obtain the pulse neural network model.
[0124] S730. Obtain historical monitoring data of the drainage system, construct a model training sample set based on the historical monitoring data, train the pulse neural network model using the model training sample set, and determine the pulse neural network model as a drainage flow prediction model when the pulse neural network meets preset training end conditions.
[0125] S740 , periodically acquiring actual detection data of the drainage system, preprocessing the actual detection data to obtain time series data corresponding to the actual detection data, and converting the time series data into pulse code data through frequency coding.
[0126] Preprocessing the actual test data can be the process of processing the actual test data obtained from the drainage system so that the actual test data can meet the input requirements of the model. For example, after the actual test data is obtained, outlier detection and processing, missing value interpolation, and data standardization are performed on the actual test data to eliminate noise, errors, and missing data, and unify the data dimensions, thereby obtaining a continuous, reliable, and dimensionally unified model input data series. Time series data can be the actual test data after preprocessing, and a series of data points arranged in chronological order can provide a data basis for drainage system discharge prediction.
[0127] Among them, frequency coding can be a method of mapping continuous numerical data (such as rainfall, liquid level, flow rate, etc.) into discrete pulse frequencies. Frequency coding can be used to convert time series data into pulse signals that can be processed by neural networks. The encoding rules can be determined based on the physical meaning of the data. For example, the greater the rainfall intensity, the higher the pulse frequency generated by the encoding. Pulse coding data can be discrete pulse signal data obtained after frequency coding. The pulse signal is passed as input to the pulse neural network to simulate the information transmission and processing methods of the biological nervous system.
[0128] Specifically, this involves acquiring real-time data from the drainage network monitoring system, including current rainfall, liquid level, flow rate, pump station status, and river water level, consistent with the data type used during model training. This real-time data is then subjected to the same data preprocessing (outlier handling, missing value interpolation, and normalization) and pulse encoding as used during the training phase. This processed, up-to-date data is converted into a pulse train input format, providing the data foundation for the model input.
[0129] S750: Input the pulse coding data into the input layer neurons of the drainage flow prediction model, and count the pulse emission frequencies output by the output layer neurons of the drainage flow prediction model in multiple preset time windows.
[0130] The preset time window may be a pre-set prediction data output time window, and the output layer neurons of the drainage flow prediction model may output a predicted pulse emission frequency within the preset time window. The pulse emission frequency may be coded data associated with the drainage flow of the drainage system, predicted by the drainage flow prediction model based on pulse coding data corresponding to actual monitoring data.
[0131] Specifically, the encoded pulse signal can be input into the input layer neurons of the trained pulse neural network model. After the model receives the real-time data pulse input and evolves over a period of time, the output layer drainage flow neurons will generate pulses of a certain frequency. By counting the pulse emission frequency of the output neurons within a given time window, data is provided for the prediction of drainage flow.
[0132] S760. Decode the pulse emission frequency output by the output layer neurons in the preset time window through a preset decoding algorithm to obtain the instantaneous drainage flow prediction value of the drainage system at multiple preset prediction moments.
[0133] The preset decoding algorithm may be an algorithm for converting the pulse emission frequency of neurons in the output layer of a pulse neural network into a specific flow value, and may be a linear decoding algorithm or a nonlinear decoding algorithm. The preset prediction moment is a pre-set time point at which the drainage flow prediction result of the drainage system needs to be obtained. The instantaneous drainage flow prediction value may be a drainage flow prediction value obtained by converting the pulse emission frequency of neurons in the output layer through a decoding algorithm. The instantaneous drainage flow prediction value can be used to characterize the instantaneous drainage flow of the drainage outlet of the drainage system at that moment, and can be used to evaluate the operating status of the drainage outlet of the drainage system and predict future flow changes.
[0134] Specifically, after counting the pulse emission frequency of the output neuron within a given time window, the frequency can be converted into a specific flow value through a preset decoding algorithm. For example, the frequency can be converted into a specific flow value through the following formula:
[0135] Q=Q min +(Q max -Q min )×[(ff min ) / f max -f min ]
[0136] Among them, Q is the predicted instantaneous flow rate of the drainage outlet, Q max and Q min are the upper and lower limits of the preset flow range (which can be obtained based on historical data statistics, for example, combined with the maximum flow capacity of the drainage channel); f is the actual pulse frequency of the model output neuron, and f min and f max Set the minimum and maximum values for the pulse frequency encoding (e.g. 10Hz to 100Hz).
[0137] Optionally, flow forecast results at multiple time scales can be output simultaneously based on actual forecasting needs. For example, by inputting sequence data covering a period of history and running the model in a rolling manner, short-term, medium-term, and long-term forecasts of drainage flow at the drainage outlet of the drainage system can be achieved. Among them, the short-term forecast can be a minute-by-minute flow forecast sequence for the next hour, the medium-term forecast can be a flow trend forecast for the next 3 hours and 6 hours, and the long-term forecast can be an estimate of flow changes for the next 24 hours. Multi-time scale forecasts can be obtained by the model through rolling simulation of input sequences of different lengths, or based on the prediction results of the recursive input model. Through the multi-scale forecast of the model, the urban drainage department can obtain timely short-term waterlogging warnings and deploy medium- and long-term scheduling plans in advance.
[0138] Optionally, after completing the drainage volume prediction for the drainage system outlet, the flow prediction results output by the model can be integrated with the historical measured data to generate an intuitive visual chart. Figure 8 This is an example diagram of the drainage outlet flow prediction results provided by the embodiment of the present invention, such as Figure 8 As shown, the flow time series graph can plot the actual flow data of the recent period and the future flow series predicted by the model in the same coordinate system, intuitively showing the changes in flow over time and the trend of the predicted value, and how it connects with the measured value; the prediction confidence interval graph can draw confidence intervals or error bands based on the prediction curve, reflecting the uncertainty range of the model prediction (the confidence interval range can be obtained based on the error statistics of the validation set); the key threshold marker can mark the warning water level flow threshold of the drainage system or the upper limit of the pipe network capacity in the graph. When the prediction curve exceeds the threshold, it is highlighted with different colors or symbols to remind people of the period of possible waterlogging risk. Further processing and displaying the prediction results in a visual way can provide a more intuitive understanding of the model prediction results.
[0139] The technical solution of the embodiment of the present invention obtains the connection relationship between the input physical elements, hidden physical elements and output physical elements of the drainage system and the pipe network, maps the input physical elements, hidden physical elements and output physical elements to the input layer neurons, hidden physical neurons and output layer neurons of the pulse neural network model, establishes the connection between the input layer neurons, hidden layer neurons and output layer neurons according to the pipe network connection relationship, and obtains the pulse neural network model. It can establish a strong correspondence between the model and the drainage structure of the drainage system, thereby improving the prediction accuracy of the model. A model training sample set is constructed based on historical monitoring data, and the pulse neural network model is trained using the model training sample set. When the pulse neural network meets the preset training end conditions, the pulse neural network model is determined as a drainage flow prediction model for predicting the drainage flow of the drainage system based on the actual detection data of the drainage system. The drainage flow of the drainage system is predicted by the drainage flow prediction model, which can improve the prediction accuracy and efficiency of the drainage flow.
[0140] Example 3
[0141] Figure 9 This is a schematic diagram of a device for constructing a drainage flow prediction model according to the third embodiment of the present invention. Figure 9 As shown, the device includes: a data acquisition module 910, a model construction module 920, and a model training module 930.
[0142] A data acquisition module 910 is used to acquire multiple pipe network physical elements and pipe network connection relationships of the drainage system, wherein the pipe network physical elements include: input physical elements, hidden physical elements and output physical elements, and the pipe network connection relationship is used to characterize the connection relationship between each element in the pipe network physical elements; a model construction module 920 is used to map the input physical elements to input layer neurons of a pulse neural network model, map the hidden physical elements to hidden layer neurons of a pulse neural network, and map the output physical elements to output layer neurons of a pulse neural network model, establish connections between the input layer neurons, the hidden layer neurons and the output layer neurons according to the pipe network connection relationship to obtain the pulse neural network model, and a model training module 930 is used to acquire historical monitoring data of the drainage system, construct a model training sample set according to the historical monitoring data, train the pulse neural network model through the model training sample set, and when the pulse neural network meets the preset training end condition, determine the pulse neural network model as a drainage flow prediction model, wherein the drainage flow prediction model is used to predict the drainage flow of the drainage system based on actual detection data of the drainage system.
[0143] Furthermore, the input-type physical elements include at least one of the drainage system's rainfall sensor, liquid level sensor, flow rate sensor, pump station status monitor, and river water level monitor; the hidden-type physical elements include at least one of the drainage system's pipe sections, inspection wells, catchment areas, regulating pools, and diversion nodes; and the output-type physical elements include the drainage system's outlets.
[0144] Furthermore, the neurons of the pipe segment include first pipe segment neurons, second pipe segment neurons and third pipe segment neurons, and the pipe network connection relationship includes a first connection relationship between the input physical element and the hidden physical element, a second connection relationship between each physical element in the hidden physical element, and a third connection relationship between the hidden physical element and the output physical element.
[0145] Furthermore, the model construction module 920 is specifically used to: establish the connection between the rainfall sensor neuron and the catchment area neuron, the connection between the liquid level sensor neuron and the inspection well neuron and the catchment area neuron, the connection between the flow rate sensor neuron and the first pipe segment neuron and the second pipe segment neuron, the connection between the pump station status monitor neuron and the second pipe segment neuron and the regulating pool neuron, and establish the connection between the river water level monitor neuron and the third pipe segment neuron and the regulating pool neuron according to the first connection relationship; establish the connection between the monitoring well neuron and the third pipe segment neuron and the connection between the third pipe segment neuron and the second pipe segment neuron according to the second connection relationship; establish the connection between the third pipe segment neuron and the diversion node neuron and the outlet flow neuron according to the third connection relationship.
[0146] Furthermore, the historical monitoring data includes historical rainfall data, historical liquid level data, historical flow rate data, historical pump station status, historical river water level data and historical outlet flow data of the drainage system at multiple preset times, and the model training sample set includes a training sample set, a test sample set and a verification sample set.
[0147] Furthermore, the model training module 910 includes a sample set construction unit 911, which is used to divide the historical rainfall data, historical liquid level data, historical flow rate data, historical pump station status, historical river water level data and historical outlet flow data corresponding to the preset time at multiple preset times into training sample sets, test sample sets and verification sample sets according to preset proportions.
[0148] Furthermore, the model training module 910 includes a model training unit 912, which is used to perform unsupervised pre-training on the pulse neural network model through an unlabeled model training sample set, and update the synaptic weights between the hidden layer neurons through a pulse time-dependent plasticity algorithm; supervise the pulse neural network model after unsupervised pre-training based on the training sample set through a spatiotemporal backpropagation algorithm, determine the loss function according to the predicted value and actual value of the pulse neural network model, and end the supervised training when the loss function converges; optimize the pulse neural network model through a reward signal that is negatively correlated with the prediction error value, enhance the synaptic weight adjustment when the error between the predicted value and the actual value of the pulse neural network model is less than a preset threshold, and weaken the synaptic weight adjustment when the error between the predicted value and the actual value of the pulse neural network model is less than a preset threshold; verify the pulse neural network model through the verification sample set to obtain the predicted value output by the pulse neural network model.
[0149] Furthermore, the model training unit 912 is specifically used to: determine the model evaluation index corresponding to the pulse neural network model based on multiple predicted values and multiple actual values output by the pulse neural network model; wherein, the model evaluation index includes at least one of the mean absolute error, the root mean square error, the determination coefficient and the peak flow prediction accuracy; when the model evaluation index meets the preset index compliance conditions, the pulse neural network model is determined as a drainage flow prediction model.
[0150] Furthermore, the device for constructing a drainage flow prediction model also includes a drainage flow prediction module, which is used to periodically obtain actual detection data of the drainage system after training the drainage flow prediction model, preprocess the actual detection data to obtain time series data corresponding to the actual detection data, and convert the time series data into pulse coding data through frequency coding; input the pulse coding data into the input layer neurons of the drainage flow prediction model, and count the pulse emission frequencies output by the output layer neurons of the drainage flow prediction model in multiple preset time windows; decode the pulse emission frequencies output by the output layer neurons in the preset time window through a preset decoding algorithm to obtain the instantaneous drainage flow prediction values of the drainage system at multiple preset prediction moments.
[0151] The device for constructing a drainage flow prediction model provided in an embodiment of the present invention can execute the method for constructing a drainage flow prediction model provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.
[0152] Example 4
[0153] Figure 10A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0154] like Figure 10 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0155] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0156] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the method for constructing a drainage flow prediction model.
[0157] In some embodiments, the construction of the drainage flow prediction model can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method for constructing the drainage flow prediction model described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the method for constructing the drainage flow prediction model by any other appropriate means (e.g., by means of firmware).
[0158] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0159] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0160] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0161] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0162] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0163] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0164] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0165] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for constructing a drainage flow prediction model, characterized in that: include: Acquire multiple pipe network physical elements and pipe network connection relationships of the drainage system, wherein the pipe network physical elements include: input physical elements, hidden physical elements, and output physical elements, and the pipe network connection relationships are used to represent the connection relationships between the elements in the pipe network physical elements; Mapping the input-type physical elements to input-layer neurons of a spiking neural network model, mapping the hidden-type physical elements to hidden-layer neurons of the spiking neural network, and mapping the output-type physical elements to output-layer neurons of the spiking neural network model; establishing connections between the input-layer neurons, the hidden-layer neurons, and the output-layer neurons according to the pipe network connection relationship to obtain the spiking neural network model; Obtain historical monitoring data of the drainage system, construct a model training sample set based on the historical monitoring data, train the pulse neural network model through the model training sample set, and when the pulse neural network meets the preset training end conditions, determine the pulse neural network model as a drainage flow prediction model, wherein the drainage flow prediction model is used to predict the drainage flow of the drainage system based on the actual detection data of the drainage system.
2. The method according to claim 1, characterized in that The input-type physical elements include at least one of the drainage system's rainfall sensor, liquid level sensor, flow rate sensor, pump station status monitor, and river water level monitor; the hidden-type physical elements include at least one of the drainage system's pipe sections, inspection wells, catchment areas, regulating pools, and diversion nodes; and the output-type physical elements include the drainage system's outlets.
3. The method according to claim 2, characterized in that The neurons of the pipe segment include first pipe segment neurons, second pipe segment neurons, and third pipe segment neurons. The pipe network connection relationship includes a first connection relationship between the input physical element and the hidden physical element, a second connection relationship between each physical element in the hidden physical element, and a third connection relationship between the hidden physical element and the output physical element. Establishing the connection between the input layer neurons, the hidden layer neurons, and the output layer neurons according to the pipe network connection relationship includes: According to the first connection relationship, a connection is established between the rainfall sensor neuron and the catchment area neuron, a connection is established between the liquid level sensor neuron and the inspection well neuron and the catchment area neuron, a connection is established between the flow rate sensor neuron and the first pipe segment neuron and the second pipe segment neuron, a connection is established between the pump station status monitor neuron and the second pipe segment neuron and the regulating pool neuron, and a connection is established between the river water level monitor neuron and the third pipe segment neuron and the regulating pool neuron; Establishing a connection between the monitoring well neuron and the third pipe segment neuron, and a connection between the third pipe segment neuron and the second pipe segment neuron according to the second connection relationship; The connection between the third pipe segment neuron, the shunt node neuron and the drain outlet flow neuron is established according to the third connection relationship.
4. The method according to claim 1, wherein The historical monitoring data includes historical rainfall data, historical liquid level data, historical flow rate data, historical pump station status, historical river water level data, and historical drainage outlet flow data corresponding to the preset time for the drainage system. The model training sample set includes a training sample set, a test sample set, and a validation sample set. The model training sample set is constructed based on the historical monitoring data, including: The historical rainfall data, historical liquid level data, historical flow rate data, historical pump station status, historical river water level data and historical outlet flow data of the corresponding preset time at multiple preset times are divided into training sample sets, test sample sets and verification sample sets according to preset proportions.
5. The method according to claim 1, wherein Training the spiking neural network model using the model training sample set includes: Performing unsupervised pre-training on the spiking neural network model using an unlabeled model training sample set, and updating the synaptic weights between the neurons in the hidden layer using a spike time-dependent plasticity algorithm; Performing supervised training on the unsupervised pre-trained spiking neural network model based on the training sample set using a spatiotemporal backpropagation algorithm, determining a loss function according to predicted values and actual values of the spiking neural network model, and ending the supervised training when the loss function converges; Optimizing and training the spiking neural network model through a reward signal that is negatively correlated with the prediction error value, enhancing synaptic weight adjustment when the error between the predicted value and the actual value of the spiking neural network model is less than a preset threshold, and weakening synaptic weight adjustment when the error between the predicted value and the actual value of the spiking neural network model is less than a preset threshold; The spiking neural network model is verified using the verification sample set to obtain a predicted value output by the spiking neural network model.
6. The method according to claim 5, characterized in that When the spiking neural network meets a preset training end condition, determining the spiking neural network model as a drainage flow prediction model includes: Determining a model evaluation index corresponding to the spiking neural network model based on a plurality of predicted values and a plurality of actual values output by the spiking neural network model; wherein the model evaluation index comprises at least one of a mean absolute error, a root mean square error, a coefficient of determination, and a peak flow prediction accuracy rate; When the model evaluation index meets the preset index compliance condition, the pulse neural network model is determined as the drainage flow prediction model.
7. The method according to claim 1, characterized in that After the drainage flow prediction model is obtained through training, the method further includes: Periodically acquiring actual detection data of the drainage system, preprocessing the actual detection data to obtain time series data corresponding to the actual detection data, and converting the time series data into pulse code data through frequency coding; Inputting the pulse code data into the input layer neurons of the drainage flow prediction model, and counting the pulse emission frequencies output by the output layer neurons of the drainage flow prediction model in multiple preset time windows; The pulse emission frequency output by the output layer neurons in a preset time window is decoded by a preset decoding algorithm to obtain the instantaneous drainage flow prediction value of the drainage system at multiple preset prediction moments.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for constructing a drainage flow prediction model according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for constructing a drainage flow prediction model according to any one of claims 1 to 7 when executed.
10. A computer program product comprising a computer program / instructions, wherein: When the computer program / instructions are executed by a processor, the method for constructing a drainage flow prediction model according to any one of claims 1 to 7 is implemented.