Urban drainage pipe network real-time simulation method, device and equipment and storage medium
By applying the node water level inversion and timing prediction model of random forest and Crossformer algorithm in urban drainage networks, combined with online learning and real-time update frameworks, the calculation speed and data limitation problems of prediction models in the existing technology are solved, and the correct implementation is achieved. The efficient, accurate prediction and control of urban drainage pipelines improves the operating efficiency of the drainage system.
Patent Information
- Application Number
- CN202411295685.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-27
AI Technical Summary
The existing urban drainage network prediction model is limited by calculation speed and monitoring data, and cannot accurately predict future events, resulting in poor management and control performance.
The urban drainage pipeline node water level inversion and timing prediction model is adopted based on random forest and Crossformer algorithm, combined with online continuous learning and real-time update framework, the latest monitoring data is used to inversion and prediction of global node water level data, and drainage warning information and decision-making are generated. plan.
It realizes simultaneous prediction and real-time update of the water levels of the global nodes of the urban drainage pipeline network, improves prediction accuracy and application flexibility, reduces the risk loss of heavy rain and flooding and overflow pollution, and improves the operation and control efficiency of the drainage system.
Smart Images

Figure CN119203451A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban drainage pipe networks, and in particular to a real-time simulation method, device, equipment and storage medium for an urban drainage pipe network. Background Art
[0002] Under the influence of rapid urbanization and changing climate, the world is faced with the arduous task of improving the efficiency, safety and sustainability of urban drainage networks. The core of efficient operation of urban drainage networks is accurate monitoring, intelligent management and timely predictive analysis, and the foundation is the development of models that can accurately reflect or predict the dynamics of urban drainage networks. Previously, there have been schemes that use high-fidelity numerical models based on physical mechanisms to analyze and couple the two main processes of surface runoff and underground pipe network confluence, but they are limited by the calculation speed and can only calculate the corresponding response under specified input conditions. They lack the foresight to predict future events. Therefore, with the development of artificial intelligence, some researchers have turned to data-driven methods for predictive modeling. However, due to the constraints of limited monitoring data, the existing schemes can only predict local variables, or use a simple one-dimensional pipe network mechanism model to construct a data set, and the prediction results still rely on the reliability of numerical simulation results. In actual application, there is still a certain gap with the observed data, and this gap will increase over time, which leads to poor operation and control efficiency of urban drainage networks based on the prediction results of urban drainage networks. Summary of the invention
[0003] The embodiments of the present invention provide a method, device, equipment and storage medium for real-time simulation of an urban drainage network.
[0004] In a first aspect, an embodiment of the present invention provides a real-time simulation method for an urban drainage network, the method comprising:
[0005] Obtain water level data from each monitoring point of the urban drainage network, and inspect and clean the acquired water level data to obtain water level data that meets the input format requirements of the global node water level model for water level inversion at the monitoring point;
[0006] Construct a global node water level model for water level inversion at monitoring points, and input water level data that meets the input format requirements of the global node water level model for water level inversion at monitoring points into the global node water level model for water level inversion at monitoring points to obtain water level data of other nodes of the urban drainage network except for the monitoring points;
[0007] Construct a time series prediction model for the water level of nodes in the urban drainage network, input the global node water level data of the urban drainage network in the historical period into the time series prediction model for the water level of nodes in the urban drainage network, and obtain the water level data of each node in the urban drainage network in the prediction period;
[0008] Construct a real-time update framework for the model and couple it with the urban drainage network node water level time series prediction model. Use the latest water level data of each monitoring point in the urban drainage network to invert the global node water level data of the urban drainage network to form an online data stream, so as to update the urban drainage network node water level time series prediction model in real time and update the next prediction output in real time.
[0009] According to the prediction output results, the development status of the urban drainage network is analyzed, drainage warning information and decision-making plans are generated, and the corresponding drainage facilities are dispatched according to the decision-making plans.
[0010] In some implementable methods of the first aspect, water level data of each monitoring point of the urban drainage network is obtained, and the obtained water level data is inspected and cleaned to obtain water level data that meets the input format requirements of the global node water level model for water level inversion at the monitoring point, including:
[0011] The water level data of each monitoring point in the urban drainage network is monitored by the intelligent data collection equipment for water level monitoring in the urban drainage network, and the water level data is transmitted to the data processing center through network communication; the water level data is inspected and cleaned by the data processing center to obtain water level data that meets the input format requirements of the global node water level model for water level inversion at the monitoring point.
[0012] In some possible implementations of the first aspect, the urban drainage network water level monitoring data intelligent collection equipment is a complete intelligent data collection terminal in the target network area of the urban drainage network, including: basic components, external components and wireless transmission components, with built-in lithium batteries and support for external power supply to ensure its continuous operation in the inspection well; the intelligent data collection terminal is set to upload measurement data within a specified period, and save data in the event of communication abnormalities, and automatically resend the data after communication is restored.
[0013] In some possible implementations of the first aspect, constructing a global node water level model for inverting water levels at monitoring points includes:
[0014] Based on the random forest algorithm, a water level inversion model of the remaining nodes of the urban drainage network except the monitoring points is constructed. The data set used in the construction of the water level inversion model is obtained by constructing several fields with different rainfall conditions as boundary conditions and inputting the numerical mechanism model. The input of the water level inversion model is the water level data of the monitoring points, and the output is the water level data of the target nodes. The number of water level inversion models is determined by the number of target nodes.
[0015] In some possible implementations of the first aspect, constructing a time series prediction model for water levels at nodes in an urban drainage network includes:
[0016] Based on the Crossformer algorithm, a time-series prediction model for node water level in urban drainage network is constructed, and the model is trained through the data set of numerical mechanism model. The input of the water level time-series prediction model is the node water level data in the historical period, and the output is the node water level data in the prediction period. The samples include samples spanning different rainfall periods, and the length of each sample is the sum of the length of the input period and the output period.
[0017] In some possible implementations of the first aspect, real-time updating of the urban drainage network node water level time series prediction model includes:
[0018] Based on the principle of online continuous learning, the output period length of the urban drainage network node water level time series prediction model is used as the interval to obtain the latest water level data of each monitoring point in the urban drainage network, so as to invert the global node water level data of the urban drainage network and add it to the online data stream; using the samples in the online data stream and the specified learning rate, the urban drainage network node water level time series prediction model is quickly trained, and then the corresponding samples are added to the memory pool, and the samples in the memory pool are used to deeply train the urban drainage network node water level time series prediction model after rapid training. The training strategy adopts elastic weight integration with regularized loss terms to update the model parameters.
[0019] In some implementable manners of the first aspect, updating the next step prediction output in real time includes:
[0020] The latest updated urban drainage network node water level time series prediction model is used to output the next prediction result.
[0021] In a second aspect, an embodiment of the present invention provides a real-time simulation device for an urban drainage network, the device comprising:
[0022] The acquisition module is used to acquire the water level data of each monitoring point of the urban drainage network, and to inspect and clean the acquired water level data to obtain water level data that meets the input format requirements of the global node water level model for water level inversion at the monitoring point;
[0023] The first construction module is used to construct a global node water level model for water level inversion at a monitoring point, and input water level data that meets the input format requirements of the global node water level model for water level inversion at a monitoring point into the global node water level model for water level inversion at a monitoring point, to obtain water level data of other nodes of the urban drainage network except the monitoring point;
[0024] The second construction module is used to construct a time series prediction model for the water level of nodes in the urban drainage network, input the global node water level data of the urban drainage network in the historical period into the time series prediction model for the water level of nodes in the urban drainage network, and obtain the water level data of each node in the urban drainage network in the prediction period;
[0025] The third construction module is used to construct a real-time update framework for the model and couple it with the urban drainage network node water level time series prediction model. The global node water level data of the urban drainage network obtained by inverting the latest water level data of each monitoring point in the urban drainage network forms an online data stream to update the urban drainage network node water level time series prediction model in real time and update the next prediction output in real time.
[0026] The analysis module is used to analyze the development status of the urban drainage network according to the prediction output results, generate drainage warning information and decision-making plans, and dispatch the corresponding drainage facilities according to the decision-making plans.
[0027] In a third aspect, an embodiment of the present invention provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described above.
[0028] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to cause a computer to execute the method described above.
[0029] In an embodiment of the present invention, the urban drainage network node water level time series prediction model based on the mechanism model data set can simultaneously predict the water levels of all nodes of the drainage network, and in actual use, it can absorb new monitored water level data to update the parameters of the prediction model in real time, and update the next prediction output in real time, so as to achieve a balance between the actual monitored water level data and the numerical mechanism model data, so that the urban drainage network node water level time series prediction model has higher application flexibility and applicability to different data modes, and then effectively grasp the development dynamics and trends of the urban drainage network based on the prediction results, so as to make corresponding drainage decisions and scheduling, improve the operation and control efficiency of the drainage system, and reduce the risk losses caused by problems such as heavy rain waterlogging and overflow pollution.
[0030] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are provided for a better understanding of the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0032] Figure 1is a flow chart of a real-time simulation method for an urban drainage network provided by an embodiment of the present invention;
[0033] Figure 2 Schematic diagram of the topographic distribution of the rainwater system and the drainage network topology in the NJ area in an embodiment of the present invention;
[0034] Figure 3 It is a schematic diagram of the arrangement of monitoring points of the drainage network in NJ area in an embodiment of the present invention;
[0035] Figure 4 is a schematic diagram of the random forest model structure of global inversion in an embodiment of the present invention;
[0036] Figure 5 2 is a schematic diagram of a framework of a drainage network node water level time series prediction model in an embodiment of the present invention;
[0037] Figure 6 Schematic diagram of the algorithm structure of the drainage network node water level time series prediction model application in the embodiment of the present invention;
[0038] Figure 7 It is a box diagram for evaluating the test effect of the drainage network node water level time series prediction model in an embodiment of the present invention;
[0039] Figure 8 It is a typical node location schematic diagram for analyzing the performance of the drainage network node water level time series prediction model in an embodiment of the present invention;
[0040] Fig. 9 It is a typical node performance diagram for analyzing the performance of the drainage network node water level time series prediction model in the embodiment of the present invention;
[0041] Fig.10 is a schematic diagram of a real-time update framework of a model in an embodiment of the present invention;
[0042] Fig.11 It is a schematic diagram of a real-time update application algorithm of a drainage network node water level time series prediction model in an embodiment of the present invention;
[0043] Fig.12 is a schematic diagram of the performance evaluation of the real-time update strategy on a new task in an embodiment of the present invention;
[0044] Fig.13 is a schematic diagram of the performance evaluation of the real-time update strategy on the old task in an embodiment of the present invention;
[0045] Fig.14 It is a structural diagram of a real-time simulation device for urban drainage pipe network provided by an embodiment of the present invention;
[0046] Fig.15It is a structural diagram of an exemplary electronic device provided by an embodiment of the present invention and capable of implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, 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 described embodiments are 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 creative work are within the scope of protection of the present invention.
[0048] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0049] In response to the problems in the background technology, the embodiments of the present invention provide a real-time simulation method, device, equipment and storage medium for urban drainage network. The urban drainage network node water level time series prediction model based on the mechanism model data set can simultaneously predict the water levels of all nodes of the drainage network, and can absorb new monitoring water level data in real time to update the parameters of the prediction model during actual use, and update the next prediction output in real time, so as to obtain a balance between the actual monitoring water level data and the numerical mechanism model data, so that the urban drainage network node water level time series prediction model has higher application flexibility and applicability to different data modes, and then effectively grasp the development dynamics and trends of the urban drainage network based on the prediction results, so as to make corresponding drainage decisions and scheduling, improve the operation and control efficiency of the drainage system, and reduce the risk losses caused by problems such as rainstorm waterlogging and overflow pollution.
[0050] In conjunction with the accompanying drawings, a method, device, equipment and storage medium for real-time simulation of an urban drainage network provided by an embodiment of the present invention will be described in detail below through specific embodiments.
[0051] Figure 1 A flow chart of a real-time simulation method for an urban drainage network provided by an embodiment of the present invention is shown. Figure 1 As shown, the urban drainage network real-time simulation method 100 may include the following steps:
[0052] S110, obtaining water level data of each monitoring point of the urban drainage network, and inspecting and cleaning the obtained water level data to obtain water level data that meets the input format requirements of the global node water level model for water level inversion at the monitoring point.
[0053] In some embodiments, the water level data of each monitoring point in the urban drainage network can be monitored by an intelligent collection device for urban drainage network water level monitoring data, and the water level data can be transmitted to a data processing center through network communication; the water level data can be inspected and cleaned by the data processing center to obtain water level data that meets the input format requirements of the global node water level model for water level inversion at the monitoring point.
[0054] Exemplarily, the urban drainage network water level monitoring data intelligent collection equipment is a complete intelligent data collection terminal in the target network area of the urban drainage network, including: basic components, external components and wireless transmission components. It has a built-in lithium battery and supports external power supply, which can ensure its continuous operation in the inspection well; the intelligent data collection terminal is set to upload measurement data within a specified period, and save data in the event of communication abnormalities, and automatically resend the data after communication is restored.
[0055] S120, constructing a global node water level model for water level inversion at monitoring points, and inputting water level data that meets the input format requirements of the global node water level model for water level inversion at monitoring points into the global node water level model for water level inversion at monitoring points, to obtain water level data of the remaining nodes of the urban drainage network except the monitoring points.
[0056] In some embodiments, a water level inversion model of the remaining nodes of the urban drainage network except the monitoring points can be constructed based on the random forest algorithm. The data set used in the process of constructing the water level inversion model is obtained by constructing several different rainfall conditions as boundary conditions and inputting the numerical mechanism model; the input of the water level inversion model is the water level data of the monitoring point, and the output is the water level data of the target node; the number of water level inversion models is determined by the number of target nodes.
[0057] S130, constructing a time series prediction model for water level at nodes in the urban drainage network, inputting global node water level data of the urban drainage network in a historical period into the time series prediction model for water level at nodes in the urban drainage network, and obtaining water level data of each node in the urban drainage network in a prediction period.
[0058] In some embodiments, a time series prediction model for water level at the nodes of an urban drainage network can be constructed based on the Crossformer algorithm, and the model can be trained using a data set of a numerical mechanism model. The input of the water level time series prediction model is the node water level data within the historical period, and the output is the node water level data within the prediction period; the samples include samples spanning different rainfall periods, and the length of each sample is the sum of the lengths of the input period and the output period.
[0059] S140, construct a real-time update framework for the model and couple it with the urban drainage network node water level time series prediction model, use the latest acquired water level data of each monitoring point in the urban drainage network to invert the global node water level data of the urban drainage network to form an online data stream, so as to update the urban drainage network node water level time series prediction model in real time, and update the next prediction output in real time.
[0060] In some embodiments, based on the principle of online continuous learning, the output period length of the urban drainage network node water level time series prediction model can be used as an interval to obtain the latest water level data of each monitoring point in the urban drainage network, so as to invert the global node water level data of the urban drainage network and add it to the online data stream; using the samples in the online data stream, using a specified learning rate, the urban drainage network node water level time series prediction model is quickly trained, and then the corresponding samples are added to the memory pool, and the samples in the memory pool are used to perform deep training on the urban drainage network node water level time series prediction model after the rapid training, and the training strategy adopts elastic weight integration with a regularized loss term to update the model parameters. Furthermore, the latest updated urban drainage network node water level time series prediction model can be used to output the next prediction result.
[0061] For further understanding, the above steps are described in detail below in conjunction with specific embodiments:
[0062] Figure 2 Schematic diagram of the topographic distribution of the rainwater system and the drainage network topology in the NJ area in an embodiment of the present invention. Figure 2 As shown in the figure, the dots are nodes of the drainage network, the triangles are discharge outlets, and the line segment between two nodes is the pipe segment. The coverage area of the NJ region is about 18.34 km 2 The drainage network includes 358 inspection wells, 357 pipe sections and 76 discharge outlets, and the pipe diameters range from 500 to 2000 mm.
[0063] Figure 3 FIG. 1 is a schematic diagram of the arrangement of monitoring points of the drainage network in NJ area in an embodiment of the present invention. Figure 3 As shown, there are five drainage network node water level monitoring points (pentagram symbol) in the JD area, numbered No.117, No.145, No.281, No.306 and No.344.
[0064] Figure 4 Schematic diagram of the random forest model structure of global inversion in an embodiment of the present invention. Figure 4As shown, random forest is composed of multiple decision trees and is an integrated algorithm. First, construct a data set with input features as water level data of 5 monitoring points and output as water level data of each target node. The data set is in a two-dimensional matrix format, in which each row represents a sample at a moment and each column represents a node feature. During model training, samples are randomly extracted from the training set with replacement to form multiple sub-datasets. For each sub-dataset, a decision tree is independently constructed. In the process of building a decision tree, each time a node is split, a part of the features are randomly selected from all the features as candidate features, and then the best split feature is selected. The prediction result of the random forest is the average of the prediction results of all decision trees. In an embodiment of the present invention, the number of decision trees contained in the random forest is 100, and the overall performance evaluation of the inversion model in the test set is shown in Table 1. Table 1 statistics the inversion of 353 target nodes:
[0065] Table 1
[0066] Statistical indicators MAE(m) RMSE(m) Average 0.003 0.014 median 0.003 0.004 Maximum 0.072 0.273 Minimum 0.000 0.000
[0067] Table 1 lists the results of evaluating the trained random forest model in 353 designated target nodes. The results show that the average values of mean absolute error (MAE) and mean square error (RMSE) are controlled at a low level. This result proves that the global inversion model can accurately infer the water level state of nodes lacking monitoring data, thereby indirectly confirming the strategic selection and high representativeness of the monitoring points used in the embodiments of the present invention.
[0068] Figure 5 Schematic diagram of the framework of the drainage network node water level time series prediction model in an embodiment of the present invention. Figure 5 As shown, the solid-line column represents the input features of the previous period, and the dotted-line column represents the output features of the prediction period. The input features and output features are the global node water level and accumulated rainfall characteristics of the drainage network. The input and output differ only in time scale. When the input window accumulates a sufficient amount of new data, the model can gradually advance to the next prediction. The length of the input and output time windows can be adjusted according to the data characteristics, task requirements and model effects. In the embodiment of the present invention, a structure with an input of 40 time steps (20 minutes) and an output of 20 time steps (10 minutes) is used as the benchmark prediction structure.
[0069] Figure 6 Schematic diagram of the algorithm structure of the drainage network node water level time series prediction model application in the embodiment of the present invention. Figure 6As shown, the present invention applies a variant algorithm of Transformer, the Crossformer algorithm, which introduces an innovative "Dimension-Segment-Wise embedding" method, that is, instead of embedding all dimension values of a single time step into a vector, the time series of each dimension is divided into segments of length L_seg, and then embedded into a vector using linear projection and position embedding (Formula (1)-(2)). In this way, both time information and feature information can be retained.
[0070]
[0071] Among them, X 1:T For input, is the i-th segment on dimension d, with a length of L seg ; T is the number of input time steps; D is the feature dimension.
[0072] Subsequently, through the two-stage attention layer, Crossformer can effectively capture the dependencies between time steps and between different feature scales. First, multiple self-attention mechanisms are directly applied to each dimension across time stages as shown below:
[0073]
[0074] in, is the input of the two-stage attention layer; L and D are the number of segments and feature dimension respectively; d model is the feature dimension after embedding; Z :,d Represents a vector of all time steps in dimension d.
[0075] The dependencies between time periods in the same dimension are expressed by Z time Come capture, Z time It is also the input of the cross-feature stage to capture cross-dimensional dependencies, as shown below:
[0076]
[0077] in, (c is a small fixed value) is the learnable vector array of router router; is the aggregate information from all dimensions; Z i,: Represents the vector composed of all dimensions at time step i; Represents the output of the router mechanism; and Z dim They represent the outputs of the skip connection and the fully connected layer MLP, respectively.
[0078] Finally, the proposed dimension-wise segmented embedding and two-stage attention layers are applied to construct a hierarchical encoder-decoder to capture information at different temporal and feature scales.
[0079] Figure 7 : is a box diagram of the test effect evaluation of the drainage network node water level time series prediction model in the embodiment of the present invention, such as Figure 7 As shown in the figure, the prediction performance of the Crossformer algorithm on the test set is compared with the traditional time series prediction algorithm LSTM and other representative Transformer variant algorithms PatchTST and iTransformer. Figure 7 (a) is a box plot of the evaluation of different rainfall events in the test set. Figure 7 (b) Box plot of the evaluation at different nodes after rainfall for all the fields in the spliced test set. Figure 7 (a) highlights the relative advantages of Crossformer. Whether it is MAE, RMSE, Nash coefficient (NSE) or correlation coefficient (CORR) indicators, the prediction effects of different rainfall events are generally excellent and surpass other algorithms. The prediction effects between single rainfall events are relatively small and do not show obvious patterns, that is, there is a random correlation between these differences and factors such as rainfall duration, return period and noise percentage. Figure 7 (b) shows that Crossformer exhibits good prediction performance on all nodes, while other algorithms have their own poor performance.
[0080] Figure 8 and Fig. 9 The following is a typical node location diagram and performance diagram for analyzing the performance of the drainage network node water level time series prediction model in the embodiment of the present invention. Although the prediction performance of most nodes is excellent, it is observed that there is a certain degree of performance difference between different nodes. The embodiment of the present invention selects four representative nodes (such as Figure 8 ), their performance levels vary, and the water level prediction results for a specific test set rainfall event are analyzed (e.g. Fig. 9As shown). Nodes No.162 and No.243 were selected as models with satisfactory prediction performance, which can accurately capture the time trends of short-term and long-term rainfall events. More than 90% of the nodes have achieved this level of accuracy, indicating that the model has a high predictive ability at these nodes. The NSE (0.918) of node No.52 is slightly lower. The main reason is that it is difficult for the model to predict such irregular changes in detail due to the fluctuations and mutations related to the numerical calculation process simulated by the hydrodynamic model, but the overall trend can still be captured well. Node No.90 was selected as a typical point with slightly worse RMSE (0.413), which is mainly affected by the time lag of the water level drop (related to the simulation calculation engine processing the conversion between different manhole hydraulic states). In the urban drainage model, the focus is on the overall trend, amplitude and overflow risk of the manhole water level change, rather than the details of the transformation between the pipe network states. Therefore, despite the prediction obstacles of local details, the prediction model proposed in the present invention is still considered to be accurate and reliable.
[0081] Fig.10 Schematic diagram of real-time model update framework in an embodiment of the present invention. Fig.10 As shown in the figure, the online continuous learning idea is applied to update the time series prediction model of water level of drainage network nodes in real time, where the training samples of each task are obtained from the data stream one by one, and the calculation and memory budget are small. By acquiring the monitored water level data in real time and performing global inversion, the global state of the drainage network is obtained, and these data are used as the online training data stream of the model update framework. Model 0 represents the pre-trained prediction model. During the online training phase, the model periodically receives new training samples in the format defined by the pre-trained model. Each new sample is regarded as a new task. Each task contains a new set of inputs and outputs, prompting the model to adjust its parameters accordingly (such as Fig.10 ). The iteratively updated models (such as Model 1, Model 2, and Model 3) will be used immediately for subsequent prediction tasks. In short, this framework ensures that the latest model parameters are used to predict the future state of the pipeline network, thereby improving the accuracy and adaptability of the model. In an embodiment of the present invention, the training data stream generates a sample every 10 minutes as a new task. During the training process of each new task, the current sample is first "quickly trained" and the learning rate is reduced to 10% of the initial learning rate. This step is intended to allow the model to quickly adapt to the latest data. The sample is then incorporated into the memory pool, where it undergoes multiple cycles of in-depth training together with existing samples. In order to prevent the memory usage of the model from growing indefinitely during operation, the upper limit of the memory pool is a predetermined maximum value (300 samples in the embodiment of the present invention). Samples exceeding the upper limit are randomly cut to maintain the upper limit.
[0082] Fig.11The figure is a schematic diagram of the real-time update application algorithm of the drainage network node water level time series prediction model in the embodiment of the present invention. The present invention applies the elastic weight integration (EWC) algorithm to implement the online continuous learning strategy. Elastic weight integration is a representative regularization method, that is, by imposing constraints on weight adjustment during the model update process, existing knowledge is maintained while acquiring new tasks. This method has low memory requirements and high computational efficiency, so it has advantages in expanding online learning scenarios. Fig.11 As shown, the main goal of EWC is to maintain proficiency in Task A while training Task B. Fig.11 The training trajectory in the parameter space diagram is shown, highlighting the parameter region that achieves the best performance in Task A (without padding) and Task B (with padding). After taking Task A, the model parameters are located at If gradient steps are taken based only on data from Task B (dashed arrows), this may minimize the loss of Task B but sacrifice the knowledge previously acquired in Task A. In contrast, if a uniform limit is applied to all weights (solid arrows), it will result in overly strict restrictions, hindering the model's ability to efficiently learn Task B. Elastic Weight Integration solves this dilemma by estimating the importance of the weight parameters of Task A, thereby acquiring knowledge of Task B without severely affecting the performance of Task A (dotted arrows).
[0083] The loss function that needs to be minimized in elastic weight integration is as follows:
[0084]
[0085] Among them, L B (θ) is the loss of task B only; λ is the weight adjustment coefficient; i is the label of each parameter; F i It represents the importance of the parameter on task A (old task), that is, the diagonal element of the Fisher information matrix, which can be calculated by the following formula:
[0086]
[0087] Where D is the dataset; L(d,θ) is the loss of sample d on the model with parameter θ.
[0088] Fig.12 is a schematic diagram of the performance evaluation of the real-time update strategy on a new task in an embodiment of the present invention, such as Fig.12As shown in the figure, in order to include more new samples and effectively evaluate the impact of different model updating methods, three new rainfall events with longer rainfall duration (240 minutes, 480 minutes and 720 minutes respectively) were selected. The global state was inferred from the monitoring data to generate the real-time data stream of each event. A trained prediction model was used as the pre-training model to compare the prediction effects of three different strategies on the entire rainfall event: no model update, update by fine-tuning, and update by the EWC algorithm using the update framework of the present invention. The three rainfall events all showed the same conclusion, that is, compared with the unupdated model, both the fine-tuning and EWC strategies improved the prediction performance (the slight decrease in CORR was due to the frequent model update slightly destroying the continuity of data changes), which confirmed the necessity and effectiveness of model updating. In addition, the prediction performance achieved by the EWC algorithm was better than that of the fine-tuning strategy, which shows that the model update strategy adopted by the present invention has superiority in processing new tasks. The comprehensive comparative analysis of different rainfall events shows that for events with unsatisfactory prediction accuracy of the pre-training model, the EWC algorithm shows a more obvious advantage. In contrast, for events that the pre-trained model already handles well, the relative advantage is less clear (e.g., the 720-minute rainfall event).
[0089] Fig.13 is a schematic diagram of the performance evaluation of the real-time update strategy on the old task in an embodiment of the present invention, such as Fig.13 As shown in the figure, the non-updated model completely avoids the problem of catastrophic forgetting, thus becoming the best comparison benchmark. By comparing the performance of EWC and fine-tuning strategies on the old test set, it can be seen that although both EWC and fine-tuning strategies will inevitably lead to a certain degree of forgetting of old knowledge, the degree of forgetting of EWC is significantly lower than that of the fine-tuning strategy, thus ensuring that the performance degradation on the old test set remains within a more controllable range. Further comparison of different rainfall events shows that in the 720-minute rainfall event, both strategies show a correspondingly low degree of forgetting, so the gap between the two strategies is not obvious. In short, the model update framework proposed in this invention shows excellent performance in both integrating new knowledge and retaining old knowledge.
[0090] According to the embodiments of the present invention, at least the following technical effects are achieved:
[0091] The present invention realizes the simultaneous prediction of the global node liquid level of the pipe network by innovatively applying the Crossformer algorithm that comprehensively considers the dependency of the time scale and the characteristic scale, thereby improving the prediction accuracy and practicality; the present invention realizes the real-time update of the prediction model through an online continuous learning strategy, which not only ensures the continuous prediction reliability and data adaptability of the model, but also greatly reduces the computational load of retraining, so that the prediction results of the drainage pipe network node water level prediction model are more adapted to the actual observation situation while having the robustness to low-quality monitoring data; the present invention provides a powerful framework that integrates monitoring, prediction and updating mechanisms, which will improve the efficiency and flexibility of urban drainage pipe networks, and ultimately promote more intelligent and responsive drainage facility management and operation and maintenance, improve the operation efficiency of drainage pipe networks and reduce disaster risks.
[0092] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0093] The above is an introduction to a method embodiment. The following is a further explanation of the solution of the present invention through an apparatus embodiment.
[0094] Fig.14 is a structural diagram of a real-time simulation device for urban drainage pipe network provided by an embodiment of the present invention, such as Fig.14 As shown, the urban drainage network real-time simulation device 1400 may include:
[0095] The acquisition module 1410 is used to acquire the water level data of each monitoring node of the urban drainage network, and to inspect and clean the acquired water level data to obtain water level data that meets the input format requirements of the global node water level model for inverting the monitoring node water level.
[0096] The first construction module 1420 is used to construct a global node water level model for inverting the water level of a monitoring node, and input water level data that meets the input format requirements of the global node water level model for inverting the water level of a monitoring node into the global node water level model for inverting the water level of a monitoring node, to obtain water level data of the remaining nodes of the urban drainage network except the monitoring nodes.
[0097] The second construction module 1430 is used to construct a time series prediction model for the water level of urban drainage network nodes, input the global node water level data of the urban drainage network in the historical period into the time series prediction model for the water level of urban drainage network nodes, and obtain the water level data of each node of the urban drainage network in the prediction period.
[0098] The third construction module 1440 is used to construct a real-time update framework for the model and couple it with the urban drainage network node water level time series prediction model, and use the global node water level data of the urban drainage network obtained by inverting the latest water level data of each monitoring node in the urban drainage network to form an online data stream, so as to update the urban drainage network node water level time series prediction model in real time and update the next prediction output in real time.
[0099] The analysis module 1450 is used to analyze the development status of the urban drainage network according to the prediction output results, generate drainage warning information and decision-making plans, and dispatch corresponding drainage facilities according to the decision-making plans.
[0100] Understandably, Fig.14 Each module / unit in the real-time simulation device 1400 of the urban drainage network shown in FIG. Figure 1 The functions of the various steps in the urban drainage network real-time simulation method 100 shown and the corresponding technical effects achieved are not described here for the sake of brevity.
[0101] Fig.15 is a structural diagram of an exemplary electronic device that can implement an embodiment of the present invention, provided by an embodiment of the present invention. Fig.15 As shown, the electronic device may include a computing unit 1501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1502 or a computer program loaded from a storage unit 1508 into a random access memory (RAM) 1503. In RAM 1503, various programs and data required for the operation of the electronic device may also be stored. The computing unit 1501, ROM 1502, and RAM 1503 are connected to each other via a bus 1504. An input / output (I / O) interface 1505 is also connected to the bus 1504.
[0102] Multiple components in the electronic device are connected to the I / O interface 1505, including: an input unit 1506, such as a keyboard, a mouse, etc.; an output unit 1507, such as various types of displays, speakers, etc.; a storage unit 1508, such as a disk, an optical disk, etc.; and a communication unit 1509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1509 allows the electronic device to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0103] The computing unit 1501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1501 performs the various methods 100 and processes described above. For example, in some embodiments, the method 100 may be implemented as a computer program product, including a computer program, which is tangibly contained in a computer-readable medium, such as a storage unit 1508. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via ROM 1502 and / or a communication unit 1509. When the computer program is loaded into RAM 1503 and executed by the computing unit 1501, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 1501 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).
[0104] It should be noted that the present invention also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute method 100 and achieve the corresponding technical effect achieved by executing the method in an embodiment of the present invention. For the sake of concise description, they will not be repeated here.
[0105] In addition, the present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method 100 is implemented.
[0106] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and the present invention is not limited here.
[0107] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A real-time simulation method for urban drainage network, characterized in that: The method comprises: Obtain water level data from each monitoring point of the urban drainage network, and inspect and clean the acquired water level data to obtain water level data that meets the input format requirements of the global node water level model for water level inversion at the monitoring point; Construct a global node water level model for water level inversion at monitoring points, and input water level data that meets the input format requirements of the global node water level model for water level inversion at monitoring points into the global node water level model for water level inversion at monitoring points to obtain water level data of other nodes of the urban drainage network except for the monitoring points; Construct a time series prediction model for the water level of nodes in the urban drainage network, input the global node water level data of the urban drainage network in the historical period into the time series prediction model for the water level of nodes in the urban drainage network, and obtain the water level data of each node in the urban drainage network in the prediction period; Construct a real-time update framework for the model and couple it with the urban drainage network node water level time series prediction model. Use the latest water level data of each monitoring point in the urban drainage network to invert the global node water level data of the urban drainage network to form an online data stream, so as to update the urban drainage network node water level time series prediction model in real time and update the next prediction output in real time. According to the prediction output results, the development status of the urban drainage network is analyzed, drainage warning information and decision-making plans are generated, and the corresponding drainage facilities are dispatched according to the decision-making plans.
2. The method according to claim 1, characterized in that The water level data of each monitoring point of the urban drainage network is obtained, and the obtained water level data is inspected and cleaned to obtain water level data that meets the input format requirements of the global node water level model for water level inversion at the monitoring point, including: The water level data of each monitoring point in the urban drainage network is monitored by the intelligent data collection equipment for water level monitoring in the urban drainage network, and the water level data is transmitted to the data processing center through network communication; the water level data is inspected and cleaned by the data processing center to obtain water level data that meets the input format requirements of the global node water level model for water level inversion at the monitoring point.
3. The method according to claim 2, characterized in that The urban drainage network water level monitoring data intelligent collection equipment is a complete intelligent data collection terminal in the target network area of the urban drainage network, including: basic components, external components and wireless transmission components. It is equipped with a lithium battery and supports an external power supply to ensure its continuous operation in the inspection well; the intelligent data collection terminal is set to upload measurement data within a specified period, and save data when communication is abnormal, and automatically resend it after communication is restored.
4. The method according to claim 1, characterized in that: The construction of a global node water level model for water level inversion at monitoring points includes: Based on the random forest algorithm, a water level inversion model of the remaining nodes of the urban drainage network except the monitoring points is constructed. The data set used in the construction of the water level inversion model is obtained by constructing several fields with different rainfall conditions as boundary conditions and inputting the numerical mechanism model. The input of the water level inversion model is the water level data of the monitoring points, and the output is the water level data of the target nodes. The number of water level inversion models is determined by the number of target nodes.
5. The method according to claim 1, characterized in that The construction of the urban drainage network node water level time series prediction model includes: Based on the Crossformer algorithm, a time-series prediction model for node water level in urban drainage network is constructed, and the model is trained through the data set of numerical mechanism model. The input of the water level time-series prediction model is the node water level data in the historical period, and the output is the node water level data in the prediction period. The samples include samples spanning different rainfall periods, and the length of each sample is the sum of the length of the input period and the output period.
6. The method according to claim 1, characterized in that The real-time updating of the urban drainage network node water level time series prediction model includes: Based on the principle of online continuous learning, the output period length of the urban drainage network node water level time series prediction model is used as the interval to obtain the latest water level data of each monitoring point in the urban drainage network, so as to invert the global node water level data of the urban drainage network and add it to the online data stream; using the samples in the online data stream and the specified learning rate, the urban drainage network node water level time series prediction model is quickly trained, and then the corresponding samples are added to the memory pool, and the samples in the memory pool are used to deeply train the urban drainage network node water level time series prediction model after rapid training. The training strategy adopts elastic weight integration with regularized loss terms to update the model parameters.
7. The method according to claim 1, characterized in that The real-time updating of the next step prediction output includes: The latest updated urban drainage network node water level time series prediction model is used to output the next prediction result.
8. A real-time simulation device for urban drainage network, characterized in that: The device comprises: The acquisition module is used to acquire the water level data of each monitoring point of the urban drainage network, and to inspect and clean the acquired water level data to obtain water level data that meets the input format requirements of the global node water level model for water level inversion at the monitoring point; The first construction module is used to construct a global node water level model for water level inversion at a monitoring point, and input water level data that meets the input format requirements of the global node water level model for water level inversion at a monitoring point into the global node water level model for water level inversion at a monitoring point, to obtain water level data of other nodes of the urban drainage network except the monitoring point; The second construction module is used to construct a time series prediction model for the water level of nodes in the urban drainage network, input the global node water level data of the urban drainage network in the historical period into the time series prediction model for the water level of nodes in the urban drainage network, and obtain the water level data of each node in the urban drainage network in the prediction period; The third construction module is used to construct a real-time update framework for the model and couple it with the urban drainage network node water level time series prediction model. The global node water level data of the urban drainage network obtained by inverting the latest water level data of each monitoring point in the urban drainage network forms an online data stream to update the urban drainage network node water level time series prediction model in real time and update the next prediction output in real time. The analysis module is used to analyze the development status of the urban drainage network according to the prediction output results, generate drainage warning information and decision-making plans, and dispatch the corresponding drainage facilities according to the decision-making plans.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to make a computer execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
High-precision multi-time-sequence water depth inversion method, computing device and storage medium
CN117237430A
Reservoir level combined prediction method based on multi-factor correlation analysis, electronic equipment and medium
CN118428523A
Urban inland inundation prevention and control method, device and equipment and storage medium
CN118504404A
Indirect liquid level monitoring and analysis method for urban drainage system based on directed topological network
WO2024148660A1
Cited By
Cooperative early warning method and device for liquid level and flow of municipal drainage pipe network
CN122508389A
A method and device for co-warning of liquid level and flow of municipal drainage pipe network
CN122508389B