A Construction Method of Short- and Medium-Term Hydrological Forecasting and Scheduling System Based on Microservice Architecture

By adopting a microservice architecture-based method in the short- and medium-term hydrological forecasting and scheduling system of multi-blocking large river basins, the problem of data management and hydrological modeling complexity is solved, and the system is efficient and flexible, and is suitable for hydrological forecasting and reservoir scheduling in complex river basins.

CN117610281BActive Publication Date: 2025-06-24CHINA YANGTZE POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311604011.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-28
Publication Date
2025-06-24
Estimated Expiration
2043-11-28

AI Technical Summary

Technical Problem

When building a short- and medium-term hydrological forecasting and scheduling system with multiple blocking large river basins, we face problems such as data management difficulties, complex hydrological modeling and poor system universality.

Method used

Using a microservice architecture-based approach, the standardized data management and processization of basin hydrological modeling are realized through the steps of basin data preparation, basin hydrological modeling and application system development. The specific steps include generalization of watershed object, coding, topology construction, model coupling and parameter rate determination, and the system is built using the microservice architecture.

Benefits of technology

Overcoming data management difficulties and hydrological modeling complexity in traditional systems, improving the universality and efficiency of the system, being able to adapt to complex watershed scenarios more flexibly, and significantly improving the efficiency of basin hydrological modeling and short- and medium-term hydrological forecasting scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117610281B_ABST
    Figure CN117610281B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for constructing a short- and medium-term hydrological forecasting and scheduling system based on a microservices architecture, which comprises the following steps: S1. Basin data preparation: collecting and processing meteorological and hydrological data, geographic information data, and hydraulic structure data; S2. Basin hydrological modeling: completing generalization of basin objects, coding of basin objects, construction of basin topology, coupling of basin models, and calibration of model parameters; S3. Development of application systems: selection of development tools, construction of database tables, back-end development, front-end development, docking between the front-end and the back-end, system testing and deployment; The present invention standardizes the management of multi-blocked large-basin data, makes the basin hydrological modeling process efficient and convenient by using process-based modeling, and constructs the system by using a lightweight microservices framework. The system constructed according to the present invention overcomes the shortcomings of traditional forecasting and scheduling systems, such as difficult data management, complex hydrological modeling, and weak generality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hydrological forecasting and reservoir operation, and particularly to a method for constructing a short and medium-term hydrological forecasting and operation system based on a microservices architecture. Background Art

[0002] The short and medium-term hydrological forecasting and operation system plays an important decision-making support role in the operation and management of cascade hydropower stations in a basin. The short and medium-term hydrological forecasting and operation system is required to provide decision-making support in the fields of flood control and disaster reduction, hydropower generation, ecological protection, etc. Flood control and power production practices have verified that an efficient and convenient short and medium-term hydrological forecasting and operation system helps to improve the efficiency of water resource utilization, effectively reduce the risk of flood disasters, give full play to the power generation benefits of reservoirs, and efficiently realize the conversion of the "air flow - water flow - current" value chain. Thus, it is of great significance to construct an efficient and convenient short and medium-term hydrological forecasting and operation system.

[0003] The construction of a short and medium-term hydrological forecasting and operation system involves multidisciplinary knowledge such as water science, computer science, software engineering, and geographic information science, and is a typical multidisciplinary cross-technology. At present, there are not many technical obstacles to constructing a short and medium-term hydrological forecasting and operation system for a basin with a small area and a small number of water conservancy projects. However, there are still many difficulties in constructing a short and medium-term hydrological forecasting and operation system for a large multi-blocked basin with a large area and a large number of water conservancy projects. The difficulties are mainly manifested in the following aspects: (1) The large multi-blocked basin involves a large amount of data, and data management is difficult; (2) The large multi-blocked basin involves many basins and water conservancy projects, and hydrological modeling is complex; (3) The forecasting and operation services involved in the large multi-blocked basin are complex, and it is difficult to make the system completely universal. Summary of the Invention

[0004] The purpose of the present invention is to overcome the above deficiencies and provide a method for constructing a short and medium-term hydrological forecasting and operation system based on a microservices architecture, which standardizes the management of data in a large multi-blocked basin, makes the process of basin hydrological modeling efficient and convenient by using process-based modeling, and constructs the system by using a lightweight microservices architecture to overcome the shortcomings of traditional forecasting and operation systems such as difficult data management, complex hydrological modeling, and weak universality.

[0005] To solve the above technical problems, the technical solution adopted by the present invention is:

[0006] A method for constructing a short and medium-term hydrological forecasting and operation system based on a microservices architecture, which includes the following steps:

[0007] S1. Basin data preparation: Collect and process meteorological and hydrological data, geographic information data, and hydraulic structure data;

[0008] S2, Watershed Hydrological Modeling: Complete the generalization of watershed objects, coding of watershed objects, construction of watershed topology, coupling of watershed models, and calibration of model parameters;

[0009] S3, Application System Development: Select development tools, construct database tables, develop the backend, develop the frontend, interface the frontend and backend, and conduct system testing and deployment.

[0010] Furthermore, the meteorological and hydrological data described in step S1 refer to the measured rainfall, flow, water level, etc. data within the watershed, the geographical information data refer to the terrain, geology, water system, etc. data of the watershed, and the hydraulic structure data refer to the basic information data and production operation data of the reservoirs within the watershed.

[0011] Furthermore, the watershed hydrological modeling described in step S2 includes the following steps:

[0012] S21, Generalization of Watershed Objects: Generalize the watershed targeted by the short- and medium-term hydrological forecasting and scheduling system into two elements, namely runoff generation and concentration sub-areas and rivers. Among them, the runoff generation and concentration sub-areas consist of one or more sub-watersheds. There are rivers flowing into and out of the runoff generation and concentration sub-areas. For the uppermost runoff generation and concentration sub-area, there is no river flowing in, and for the lowermost runoff generation and concentration sub-area, there is no river flowing out;

[0013] S22, Coding of Watershed Objects: Code the watershed objects according to certain rules;

[0014] S23, Construction of Watershed Topology: That is, based on the coding of watershed objects, establish the watershed topology structure and determine the calculation order of the runoff generation and concentration sub-areas;

[0015] S24, Coupling of Watershed Models: That is, couple watershed models such as meteorological models, hydrological models, reservoir operation models, and river flow concentration calculation models to the watershed objects and establish the connections between the models;

[0016] S25, Calibration of Model Parameters: That is, use the hydrological model parameter calibration method to determine the parameters of the watershed models.

[0017] Furthermore, the construction of watershed topology described in step S23 includes the following steps:

[0018] S231, Loop through all river objects , and find out through the river coding the different river level numbers included in . These river level numbers are represented by the set as:

[0019] ;

[0020] S232, Loop through the set , and currently traverse to a certain element in When traversing the production and confluence partition objects in a loop , find All production and confluence partition objects in which the highest river level number of the production and confluence partition is equal to , and use the set to represent the production and confluence partition objects found from ; after the loop for the production and confluence partition object ends, continue to loop through the set until all elements in are traversed and then stop; through step S232, the production and confluence partition objects in can be classified according to the river level numbers in , and finally multiple production and confluence partition sets are generated: , , ,..., ;

[0021] S233. For , , ,..., Sort the production and confluence partition objects in each set in descending order according to the unique identification symbol; since the smaller the river level number, the higher the river level, and the lower-level rivers flow into the higher-level rivers, the calculation order of the production and confluence partition is as follows:

[0022] ;

[0023] The set , , ,..., executes the calculation order of the production and confluence partition in the order sorted by step S233.

[0024] Furthermore, step S24 couples the basin models such as the meteorological model, hydrological model, reservoir operation model, and river confluence calculation model to the basin object. Specifically: the output provided by the meteorological model is the rainfall time series data of each coordinate point. By calculating the average rainfall of all coordinate points within the production and confluence partition range, the average areal rainfall time series of the production and confluence partition can be obtained, and this series will be used as the input of the hydrological model; use the hydrological model to simulate the production and confluence processes of each sub-basin in the production and confluence partition. For the reservoir-type production and confluence partition, the reservoir operation model needs to be used to simulate the regulation effect of the reservoir in the production and confluence partition, and the river confluence model is used to simulate the movement process of water in the river; the above hydrological model, reservoir operation model, and river confluence calculation model are connected according to the connection order of each basin object.

[0025] Further, the hydrological model parameter calibration method described in step S25 adopts a method combining intelligent optimization algorithms and manual experience. Specifically: taking the hydrological model parameters as variables to be optimized, first, a set of optimal hydrological model parameters are solved through intelligent optimization algorithms to make the simulated flow process of the hydrological model and the measured flow process achieve the best degree of fitting, and then the solved hydrological model parameters are further optimized and adjusted through manual experience.

[0026] Further, step S3 includes the following steps:

[0027] S31. Selection of development tools. Specifically: Select IntelliJ IDEA as the backend development tool; select VisualStudio Code as the frontend development tool; select ApacheMaven as the project management and automatic build tool; select JDK as the running environment and JAVA tool for JAVA.

[0028] S32. Construction of database tables. Specifically: Establish a database, store the data prepared in step S1 in the database, and store the data involved in the basin hydrological modeling process described in step S2 in the database as needed.

[0029] S33. Backend development. Specifically: Select Spring Boot to build the backend; select Mybatis as the data persistence layer framework for the backend; use Java programming to implement the basin hydrological modeling process described in step S2.

[0030] S34. Frontend development. Specifically: Select Vue as the frontend development framework; develop the frontend page using HTML, CSS, and JavaScript according to the needs of the multi-blocked large basin short- and medium-term hydrological forecasting and scheduling service.

[0031] S35. Frontend and backend docking. Specifically: The frontend sends requests to the backend in the form of HTTP requests through the browser. After receiving the requests, the backend processes them and returns responses. After receiving the responses from the backend, the frontend performs corresponding processing.

[0032] S36. System deployment and testing. The specific steps include: (1) Prepare the hardware according to the system requirements and load; (2) Install the operating system according to the system application environment and requirements; (3) Install the database, as well as necessary software and tools; (4) Install the multi-blocked large basin short- and medium-term hydrological forecasting and scheduling system; (5) Conduct pressure, load, and performance tests on the system.

[0033] Advantages of the present invention:

[0034] 1. The present invention standardizes the management of multi-blocked large-watershed data, makes the process of watershed hydrological modeling efficient and convenient by using process-based modeling, and constructs a system using a lightweight microservices architecture. The system constructed according to the present invention overcomes the disadvantages of traditional prediction and scheduling systems, such as difficult data management, complex hydrological modeling, and weak generality.

[0035] 2. The method of the present invention can not only adapt to complex watershed hydrological modeling scenarios, but also simply and conveniently complete the construction of a short- and medium-term hydrological prediction and scheduling system. The constructed system can be widely applied to production practice, especially in the hydrological prediction and reservoir scheduling of multi-blocked large watersheds.

[0036] 3. The method of the present invention can conduct watershed hydrological modeling and application system development for complex multi-blocked large watersheds. Compared with traditional short- and medium-term hydrological prediction and scheduling systems, the present invention can perform watershed hydrological modeling more flexibly. Moreover, the system constructed by this method is flexible, lightweight, and easy to deploy, which can greatly improve the efficiency of watershed hydrological modeling and short- and medium-term hydrological prediction and scheduling under complex watershed scenarios. It has strong universality and can be widely applied to the operation and management of cascade reservoirs. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a flowchart of a method for constructing a short- and medium-term hydrological prediction and scheduling system based on a microservices architecture;

[0038] Figure 2 is a schematic diagram of watershed object generalization;

[0039] Figure 3 is a schematic diagram of the coupling of a meteorological model and runoff-yielding and confluence sub-regions;

[0040] Figure 4 is a schematic diagram of watershed model coupling;

[0041] Figure 5 is a map of the upper Yangtze River basin in the specific embodiment of the present invention;

[0042] Figure 6 is a map of the runoff-yielding and confluence sub-regions and rivers in the upper Yangtze River basin in the specific embodiment of the present invention;

[0043] Figure 7 is a partial map of the coding of the upper Yangtze River basin in the specific embodiment of the present invention;

[0044] Figure 8 is a web page diagram of the short- and medium-term hydrological prediction and scheduling system for multi-blocked large watersheds in the specific embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0045] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0046] Embodiment 1: As Figure 1 shown, a flowchart of a method for constructing a short - and medium - term hydrological forecasting and scheduling system based on a microservice architecture, including the steps:

[0047] S1. Watershed data preparation: Collect and process meteorological and hydrological data, geographic information data, and hydraulic structure data;

[0048] S2. Watershed hydrological modeling: Complete generalization of watershed objects, coding of watershed objects, construction of watershed topology, coupling of watershed models, and calibration of model parameters;

[0049] S3. Application system development: Selection of development tools, construction of database tables, backend development, frontend development, docking between the frontend and the backend, system testing, and deployment.

[0050] Preferably, the meteorological and hydrological data in step S1 mainly refer to measured rainfall, flow, water level and other data within the watershed, the geographic information data refer to data such as the terrain, geology, and water system of the watershed, and the hydraulic structure data refer to the basic information data and production operation data of reservoirs within the watershed.

[0051] Preferably, the watershed hydrological modeling in step S2 includes the following steps:

[0052] S21. Generalization of watershed objects, specifically: As shown in the appendix Figure 2 shown, the watershed targeted by the short - and medium - term hydrological forecasting and scheduling system is generalized into two elements: runoff - generating and confluence sub - regions and rivers. Among them, the runoff - generating and confluence sub - regions are composed of one or more sub - watersheds. There are rivers flowing into and out of the runoff - generating and confluence sub - regions. For the uppermost runoff - generating and confluence sub - region, there is no river flowing in, and for the lowermost runoff - generating and confluence sub - region, there is no river flowing out. As shown in the appendix Figure 2 shown, the river flowing out of runoff - generating and confluence sub - region 1 flows into the river connecting runoff - generating and confluence sub - regions 2 and 3, serving as the inflow between runoff - generating and confluence sub - regions 2 and 3.

[0053] S22. Coding of watershed objects, that is, coding the watershed objects according to certain rules. The specific coding rules are described as follows:

[0054] The coding rules of the watershed objects of the present invention mainly involve two elements: runoff - generating and confluence sub - regions and rivers, and basically meet the requirements of watershed hydrological modeling. Use the letter "B" to represent the runoff - generating and confluence sub - regions, and the letter "R" to represent the rivers. The following uses specific examples to illustrate the coding rules of the watershed objects:

[0055] (1) Coding rules for runoff - generating and confluence sub - regions

[0056] Example: B1_1_1

[0057] Explanation: "B" indicates that the object is a runoff-yielding and confluence partition. "B1" indicates that the runoff-yielding and confluence partition is a non-reservoir type, and "B2" indicates that the runoff-yielding and confluence partition is a reservoir type. The middle digit "1" in the code represents the highest river level number, that is, the highest level number among all the rivers flowing into this runoff-yielding and confluence partition. The rightmost digit "1" in the code is the unique identification symbol of the runoff-yielding and confluence partition, and the unique identification symbols of each runoff-yielding and confluence partition object are different. The basin coding rule stipulates that the unique identification symbol of the upstream runoff-yielding and confluence partition should be greater than that of the downstream runoff-yielding and confluence partition connected to it.

[0058] (2) River coding rule

[0059] Example: R_1_1

[0060] Explanation: R indicates that the object is a river. The middle digit "1" in the code represents the river level, and the rightmost digit "1" is the unique identification symbol of the river. The basin coding rule stipulates that the river level is represented by natural numbers. The smaller the natural number, the higher the river level, and the lower-level rivers flow into the higher-level rivers.

[0061] During basin hydrological modeling, the runoff-yielding and confluence partitions and river objects can be added or deleted according to the actual application situation. When the number of basin objects changes, the entire basin objects need to be recoded. Therefore, the coding of basin objects is dynamic, which is significantly different from the traditional coding of basin objects. The dynamic basin coding method can well adapt to the application scenarios of the increase and decrease of basin objects and is more flexible than the traditional fixed coding method. After the coding of basin objects is completed, the upstream and downstream position relationships of basin objects can be clarified, laying a foundation for determining the basin topological relationship.

[0062] S23. Basin topology construction, that is, based on the basin object coding, establish the basin topological structure and determine the calculation order of the runoff-yielding and confluence partitions.

[0063] S24. Basin model coupling, that is, couple basin models such as meteorological models, hydrological models, reservoir operation models, and river confluence calculation models to basin objects and establish the connections between the models.

[0064] S25. Model parameter calibration, that is, use the hydrological model parameter calibration method to determine the parameters of the basin model.

[0065] Preferably, the basin topology construction described in step S23 includes the following steps:

[0066] S231. Loop through all river objects , and find out through the river coding the different river level numbers included in These numbers representing river level numbers are in a set Expressed as:

[0067] ;

[0068] S232. Loop through the set , and when currently traversing to a certain element in , loop through the production and confluence partition objects , find out all the production and confluence partition objects in where the highest river level number of the production and confluence partition is equal to . The production and confluence partition objects found from are represented by the set . After the loop for the production and confluence partition object ends, continue to loop through the set until all elements in are traversed and stop. Through step S232, the production and confluence partition objects in can be classified according to the river level numbers in , and finally multiple production and confluence partition sets are generated: , , ,..., .

[0069] S233. Sort the production and confluence partition objects in each of , , ,..., the sets in descending order according to the unique identification symbol. Since the smaller the river level number, the higher the river level, and the lower-level rivers flow into the higher-level rivers, the calculation order of the production and confluence partition is:

[0070] ;

[0071] The set , , ,..., executes the calculation order of the production and confluence partition according to the sorted order in step S233.

[0072] Preferably, in step S24, coupling the meteorological model and the equal-watershed model to the watershed object is specifically as follows: As shown in Appendix Figure 3 , the output provided by the meteorological model is the rainfall time series data of each coordinate point in Appendix Figure 3 . By calculating the rainfall mean value of all coordinate points within the production and confluence partition range, the production and confluence partition average areal rainfall time series can be obtained, and this series will be used as the input of the hydrological model; As shown in Appendix Figure 4As shown in the figure, a hydrological model (such as the Xin'anjiang model, API model, NAM model, etc.) is used to simulate the runoff generation and concentration process of each sub-basin in the runoff generation and concentration area. For the reservoir-type runoff generation and concentration area, a reservoir operation model needs to be used to simulate the regulation function of the reservoir in the runoff generation and concentration area, and a river routing model (such as the Muskingum model, one-dimensional hydrodynamic model, etc.) is used to simulate the movement process of water in the river. The above hydrological models, reservoir operation models, and river routing calculation models are connected through the connection sequence of each basin object shown in the appendix Figure 4 shown.

[0073] Preferably, the hydrological model parameter calibration method described in step S25 generally adopts a method combining intelligent optimization algorithms and manual experience. Specifically: taking the hydrological model parameters as variables to be optimized, first, a set of optimal hydrological model parameters are solved through an intelligent optimization algorithm to make the simulated flow process of the hydrological model and the measured flow process reach the best degree of fitting, and then the solved hydrological model parameters are further optimized and adjusted through manual experience.

[0074] Preferably, step S3 mainly includes the following steps:

[0075] S31. Selection of development tools, specifically: Select IntelliJ IDEA (an integrated development environment for the Java programming language provided by JetBrains) as the back-end (usually also called the server side, which is the part responsible for data processing and logic processing in a Web application) development tool; select Visual Studio Code as the front-end (usually also called the client side, which refers to the part of a Web application that users directly interact with) development tool; select Apache Maven as the project management and automatic build tool; select JDK (full name Java Development Kit, which is a software development kit for the Java language) as the running environment of JAVA and JAVA tools.

[0076] S32. Construction of database tables, specifically: Establish a database, store the data prepared in step S1 in the database, and store the data involved in the basin hydrological modeling process described in step S2 in the database as needed.

[0077] S33. Back-end development, specifically: Select Spring Boot (a new framework provided by the Pivotal team to simplify the construction and development process of Spring applications) to build the back-end; select Mybatis (a Java-based persistence layer framework) as the data persistence layer framework for the back-end; use Java programming to implement the basin hydrological modeling process described in step S2.

[0078] S34. Front-end development, specifically: Select Vue (a JavaScript framework developed by You Yuxi, aiming to help developers build scalable web applications) as the front-end development framework; Develop the front-end page using HTML, CSS, and JavaScript according to the needs of the multi-block large-watershed short- and medium-term hydrological forecasting and scheduling business.

[0079] S35. Front-end and back-end docking, specifically: The front-end sends requests to the back-end in the form of HTTP requests through the browser. After receiving the requests, the back-end processes them and returns responses. After receiving the responses from the back-end, the front-end performs corresponding processing.

[0080] S36. System deployment and testing, the specific steps mainly include: (1) Prepare the hardware according to the system requirements and load; (2) Install the operating system according to the system application environment and requirements; (3) Install the database, as well as necessary software and tools; (4) Install the developed multi-block large-watershed short- and medium-term hydrological forecasting and scheduling system; (5) Conduct stress, load, and performance tests on the system.

[0081] The method proposed in this embodiment can perform watershed hydrological modeling and application system development for complex multi-block large watersheds. Compared with the traditional short- and medium-term hydrological forecasting and scheduling system, this embodiment can perform watershed hydrological modeling more flexibly. Moreover, the system constructed by this method is flexible, lightweight, and easy to deploy, which can greatly improve the efficiency of watershed hydrological modeling and short- and medium-term hydrological forecasting and scheduling under complex watershed scenarios, has strong universality, and can be widely applied to the operation and management of cascade reservoirs.

[0082] Embodiment 2:

[0083] This implementation takes the Figure 5 upstream Yangtze River basin shown as an example to illustrate the application of this method. The main stream of the Yangtze River from the source to Yichang, Hubei is the upstream of the Yangtze River, including the source section, Tongtian River section, Jinsha River section, and Chuanjiang section. The length of the upstream section of the main stream of the Yangtze River is 4,504 km, and the basin area is about 1 million km 2 . In the annual average runoff of the Yangtze River basin, the water inflow from the middle and upper reaches accounts for 47.0%, among which the Jinsha River system accounts for 16.1%, the Minjiang and Tuojiang rivers account for 10.9%, the Jialing River accounts for 7.4%, the Wujiang River accounts for 5.7%, and the main stream of the upper reaches of the Yangtze River accounts for 6.9%. The implementation of the method for constructing a multi-block large-watershed short- and medium-term hydrological forecasting and scheduling system based on the microservices architecture in this embodiment can be carried out according to the following steps:

[0084] Step 1: Collect and process meteorological and hydrological data, geographic information data, and hydraulic structure data

[0085] Meteorological and hydrological data of 130 hydrological stations and 58 reservoirs in the upper reaches of the Yangtze River Basin from 2020 to 2023 were collected. The data mainly include rainfall, flow, water level and other data. After interpolation processing, the time step of the data is 1 hour; Geographical information layer data of the upper reaches of the Yangtze River Basin were collected, and the data contains key data information such as runoff generation and concentration sub-regions, rivers, reservoirs, hydrological stations, and rainfall stations; Basic information data and production operation data of 58 reservoirs in the upper reaches of the Yangtze River Basin were collected.

[0086] Step 2: Complete the generalization of basin objects, coding of basin objects, construction of basin topology, coupling of basin models, and calibration of model parameters

[0087] The geographical information layer of the upper reaches of the Yangtze River Basin obtained in Step 1 was divided into 423 runoff generation and concentration sub-regions as shown in the appendix Figure 6 After generalization, the upper reaches of the Yangtze River Basin contains two elements: runoff generation and concentration sub-regions and rivers; Coding was carried out for the runoff generation and concentration sub-regions and rivers in the upper reaches of the Yangtze River Basin. A part of the coding map of the upper reaches of the Yangtze River Basin is shown in the appendix Figure 7 According to the methods shown in Steps S231 to S233, the topological structure of the upper reaches of the Yangtze River Basin was constructed to determine the calculation order of the runoff generation and concentration sub-regions of the part of the upper reaches of the Yangtze River Basin shown in the appendix Figure 7 Table 1 shows the specific calculation order of the runoff generation and concentration sub-regions.

[0088] Table 1 Calculation order table of runoff generation and concentration sub-regions

[0089]

[0090] Step 3: Selection of development tools, construction of database tables, back-end development, front-end development, docking of front-end and back-end, system testing and deployment

[0091] S31. Selection of development tools, specifically: Select IntelliJ IDEA (an integrated development environment for the Java programming language by JetBrains) as the back-end (usually also called the server-side, which is the part responsible for data processing and logic processing in a Web application) development tool; Select Visual Studio Code as the front-end (usually also called the client-side, which refers to the part of a Web application that users directly interact with) development tool; Select Apache Maven as the project management and automatic build tool; Select JDK (fully known as Java Development Kit, which is the software development kit for the Java language) as the running environment of JAVA and JAVA tools.

[0092] S32. Construction of database tables, specifically: Establish a database, store the data prepared in Step S1 in the database, and store the data involved in the basin hydrological modeling process described in Step S2 in the database as needed.

[0093] S33. Back-end development, specifically: Select Spring Boot (a new framework provided by the Pivotal team, a framework used to simplify the process of building and developing Spring applications) to build the back-end; select Mybatis (a Java-based persistence framework) as the data persistence framework for the back-end; use Java programming to implement the basin hydrological modeling process described in step S2.

[0094] S34. Front-end development, specifically: Select Vue (a JavaScript framework developed by You Yuxi, aiming to help developers build scalable web applications) as the front-end development framework; develop the front-end page using HTML, CSS, and JavaScript according to the business needs of multi-blocked large-basin short- and medium-term hydrological forecasting and scheduling.

[0095] S35. Front-end and back-end docking, specifically: The front-end sends requests to the back-end in the form of HTTP requests through the browser. After receiving the requests, the back-end processes them and returns responses. After receiving the responses from the back-end, the front-end performs corresponding processing.

[0096] S36. System deployment and testing, the specific steps mainly include: (1) Prepare the hardware according to the system requirements and load; (2) Install the operating system according to the system application environment and requirements; (3) Install the database, as well as necessary software and tools; (4) Install the developed multi-blocked large-basin short- and medium-term hydrological forecasting and scheduling system; (5) Conduct stress, load, and performance tests on the system.

[0097] Through step three, the development and deployment of the multi-blocked large-basin short- and medium-term hydrological forecasting and scheduling system as shown in the appendix Figure 8 is completed. This system includes two functions: forecasting and scheduling, and can efficiently complete the short- and medium-term hydrological forecasting and scheduling work in the upper reaches of the Yangtze River Basin.

[0098] The above embodiments are only the preferred technical solutions of the present invention and should not be regarded as limitations on the present invention. The embodiments in this application and the features in the embodiments can be combined arbitrarily without conflict. The protection scope of the present invention should be the technical solutions recorded in the claims, including equivalent replacement solutions of the technical features in the technical solutions recorded in the claims. That is, equivalent replacement improvements within this scope are also within the protection scope of the present invention.

Claims

1. A method for constructing a short- and medium-term hydrological forecasting and scheduling system based on a microservices architecture, characterized in that: It includes the following steps: S1. Watershed data preparation: Collect and process meteorological and hydrological data, geographic information data, and hydraulic structure data; S2. Watershed hydrological modeling: Complete the generalization of watershed objects, coding of watershed objects, construction of watershed topology, coupling of watershed models, and calibration of model parameters; S3. Application system development: Selection of development tools, construction of database tables, back-end development, front-end development, docking between the front-end and the back-end, system testing and deployment; The watershed hydrological modeling described in step S2 includes the following steps: S21. Generalization of watershed objects: Generalize the watershed targeted by the short- and medium-term hydrological forecasting and scheduling system into two elements, namely runoff generation and concentration sub-regions and rivers. The runoff generation and concentration sub-regions consist of one or more sub-watersheds. There are rivers flowing into and out of the runoff generation and concentration sub-regions. For the uppermost runoff generation and concentration sub-region, there is no river flowing in, and for the lowermost runoff generation and concentration sub-region, there is no river flowing out; S22. Coding of watershed objects: Code the watershed objects according to certain rules; S23. Construction of watershed topology: That is, based on the coding of watershed objects, establish the watershed topological structure and determine the calculation sequence of the runoff generation and concentration sub-regions; S24. Coupling of watershed models: That is, couple the meteorological model, hydrological model, reservoir operation model, and river routing calculation model to the watershed objects and establish the connections between the models; S25. Calibration of model parameters: That is, use the hydrological model parameter calibration method to determine the parameters of the watershed model.

2. A method for constructing a short - and medium - term hydrological forecasting and scheduling system based on a microservices architecture according to claim 1, characterized in that: The meteorological and hydrological data described in step S1 refers to the measured rainfall, flow, and water level data within the watershed. The geographic information data refers to the terrain, geology, and water system data of the watershed. The hydraulic structure data refers to the basic information data and production operation data of the reservoirs within the watershed.

3. A method for constructing a short- and medium-term hydrological forecasting and scheduling system based on a microservices architecture according to claim 1, characterized in that: The construction of watershed topology described in step S23 includes the following steps: S231. Traverse all river objects cyclically , find out through the river code the different river level numbers contained, and these river level numbers are represented by the set as follows: ; S232. Traverse the set cyclically , when currently traversing to a certain element in , traverse the production and confluence partition objects cyclically , and find out all the production and confluence partition objects in whose highest river level number of the production and confluence partition is equal to . The production and confluence partition objects found from are represented by the set ; after the loop for the production and confluence partition object ends, continue to loop the set , until all elements in are traversed and then stop; through step S232, the production and confluence partition objects in can be classified according to the river level numbers in , and finally multiple production and confluence partition sets are generated: , , ,..., ; S233. For , , ,..., the runoff-yielding and confluence sub-region objects in each set are sorted in descending order according to the unique identification symbol; since the smaller the river level number, the higher the river level, and the lower-level rivers flow into the higher-level rivers, the calculation order of the runoff-yielding and confluence sub-regions is as follows: ; Set , , ,..., The calculation order of the production and confluence sub-areas in the set is executed according to the order after sorting by step S233.

4. A method for constructing a short- and medium-term hydrological forecasting and scheduling system based on a microservices architecture according to claim 1, characterized in that: In step S24, the meteorological model, hydrological model, reservoir operation model, and river routing calculation model are coupled to the watershed objects. Specifically, the output provided by the meteorological model is the rainfall time series data of each coordinate point. By calculating the rainfall mean value of all coordinate points within the runoff generation and concentration sub-region, the average areal rainfall time series of the runoff generation and concentration sub-region can be obtained, and this series will be used as the input of the hydrological model; Use the hydrological model to simulate the runoff generation and concentration processes of each sub-watershed in the runoff generation and concentration sub-region. For the runoff generation and concentration sub-region of the reservoir type, it is necessary to use the reservoir operation model to simulate the regulation function of the reservoir in the runoff generation and concentration sub-region, and use the river routing model to simulate the movement process of water in the river; The above hydrological model, reservoir operation model, and river routing calculation model are connected according to the connection sequence of each watershed object.

5. A method for constructing a short- and medium-term hydrological forecasting and scheduling system based on a microservices architecture according to claim 1, characterized in that: The hydrological model parameter calibration method described in step S25 adopts a method combining intelligent optimization algorithms and artificial experience. Specifically, take the hydrological model parameters as the variables to be optimized. First, use the intelligent optimization algorithm to solve a set of optimal hydrological model parameters to make the simulated flow process of the hydrological model and the measured flow process reach the best degree of fitting, and then further optimize and adjust the solved hydrological model parameters through artificial experience.

6. A method for constructing a short - and medium - term hydrological forecasting and scheduling system based on a microservices architecture according to claim 1, characterized in that: The said step S3 includes the following steps: S31. Selection of development tools, specifically: Select IntelliJ IDEA as the back-end development tool; select VisualStudio Code as the front-end development tool; select ApacheMaven as the project management and automatic build tool; select JDK as the JAVA runtime environment and JAVA tool; S32. Construction of database tables, specifically: Establish a database, store the data prepared in step S1 in the database, and store the data involved in the basin hydrological modeling process described in step S2 as required in the database; S33. Back-end development, specifically: Select Spring Boot to build the back-end; select Mybatis as the data persistence layer framework for the back-end; use Java programming to implement the basin hydrological modeling process described in step S2; S34. Front-end development, specifically: Select Vue as the front-end development framework; develop the front-end page using HTML, CSS, and JavaScript according to the needs of the multi-blocked large basin short- and medium-term hydrological forecasting and scheduling business; S35. Front-end and back-end docking, specifically: The front-end sends requests to the back-end in the form of HTTP requests through the browser. After receiving the requests, the back-end processes them and returns responses. After receiving the responses from the back-end, the front-end performs corresponding processing; S36. System deployment and testing, the specific steps include: (1) Prepare the hardware according to the system requirements and load; (2) Install the operating system according to the system application environment and requirements; (3) Install the database, as well as necessary software and tools; (4) Install the multi-blocked large basin short- and medium-term hydrological forecasting and scheduling system; (5) Conduct stress, load, and performance tests on the system.

Citation Information

Patent Citations

  • Flood control forecast scheduling method based on regional production and confluence coupling model system

    CN113919125A

  • Scene flood forecasting method and system based on Xinanjiang and deep learning coupling model

    CN114970377A