Water network professional model servitization method and system oriented to digital twin platform
Through the professional water network model service method for digital twin platforms, the existing water network models are solved, the problems of difficulty in integrating, insufficient flexibility and low service level in the application of digital twin platforms are achieved, flexible configuration, efficient operation and convenient service of the water network model are realized, and the reusability and scalability of the model are improved.
Patent Information
- Application Number
- CN202510077601.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-06-10
AI Technical Summary
The existing water network model has problems such as difficulty in integration, insufficient flexibility and low service level in the application of digital twin platforms, making it difficult to achieve data interaction and model calls with external systems, and the closedness of model boundaries limits users' customization and adjustment of model behavior.
The professional water network model service method for digital twin platforms is adopted. By building a professional water network model based on the open source hydrodynamic model, and a service interface based on the microservice framework is designed to achieve flexible configuration and efficient operation of the model. The boundary condition data is input to the model through a service interface, and the model is integrated into the digital twin platform based on container technology.
It realizes flexible configuration, efficient operation and convenient service of the water network model, improves the reusability and scalability of the model, enhances the openness of the model boundaries, and enables users to customize and optimize the model according to actual needs, so as to achieve inversion, forecasting and scheduling optimization of the water network state.
Smart Images

Figure CN120124249A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent water conservancy, and particularly relates to a method and system for service-izing a water network professional model for a digital twin platform. Background Art
[0002] With the rapid development of information technology, digital twin technology has been increasingly widely applied in the field of water conservancy. Digital twin technology realizes real-time monitoring, prediction, and optimization of the state of physical entities by constructing virtual models of physical entities. However, existing water network models have problems such as high integration difficulty, insufficient flexibility, and low degree of service-ization in the application of digital twin platforms. Specifically, existing models often lack standardized service-ization interfaces and are difficult to achieve data interaction and model invocation with external systems; at the same time, the closed nature of model boundaries also limits the ability of users to customize and adjust model behaviors according to actual needs.
[0003] Therefore, through beneficial exploration and research, the applicant has found a method to solve the above problems, and the technical solution to be introduced below has emerged under this background. Summary of the Invention
[0004] One of the technical problems to be solved by the present invention is: aiming at the deficiencies of existing water network models in the application of digital twin platforms, to provide a method for service-izing a water network professional model for a digital twin platform, so as to achieve flexible configuration, efficient operation, and convenient service of the water network model.
[0005] Another technical problem to be solved by the present invention is: to provide a system for service-izing a water network professional model for a digital twin platform.
[0006] As a method for service-izing a water network professional model for a digital twin platform according to the first aspect of the present invention, it includes the following steps:
[0007] Step S10, construction of a water network professional model: constructing a water network professional model based on an open-source hydrodynamic model and combining with the water network characteristics of a specific area;
[0008] Step S20, design of service-ization interfaces: designing service-ization interfaces for the water network professional model based on a microservice framework;
[0009] Step S30, opening of model boundaries: inputting boundary condition data into the water network professional model through the service-ization interfaces, and integrating and applying the input boundary condition data to the water network professional model;
[0010] Step S40, system integration and deployment: integrating the constructed water network professional model and its service-ization interfaces into the digital twin platform based on container technology.
[0011] In a preferred embodiment of the present invention, in step S10, constructing a water network professional model based on an open-source hydrodynamic model and combining with the water network characteristics of a specific area includes the following steps:
[0012] Step S11, generalizing the river network structure and inputting river cross-section parameters;
[0013] Step S12, dividing sub-catchments using the Thiessen polygon method according to the distribution of river forks and river cross-sections;
[0014] Step S13, inputting rain gauges and determining the coverage range of rain gauges using the Thiessen polygon method;
[0015] Step S14, determining the rain gauges corresponding to the sub-catchments divided in step S12 based on the coverage range of rain gauges divided in step S13;
[0016] Step S15, inputting water level stations and determining the coverage range of water level stations using the Thiessen polygon method;
[0017] Step S16, determining the water level stations corresponding to the river network structure in step S11 based on the coverage range of water level stations divided in step S15 to determine the initial water level of the river;
[0018] Step S17, inputting sluices, pumping stations and their scheduling rules, and calibrating various parameters of the model's hydrology and hydrodynamics.
[0019] In a preferred embodiment of the present invention, in step S20, designing a service-oriented interface for the water network professional model based on a microservice framework includes the following steps:
[0020] Step S21, obtaining all object ID numbers, accessing through a specified path using a GET request, and obtaining the corresponding JSON text;
[0021] Step S22, submitting a working condition simulation task, accessing through a specified path using a POST request, and obtaining the corresponding JSON text;
[0022] Step S23, deleting historical simulation tasks, accessing through a specified path using a DELETE request;
[0023] Step S24, obtaining the results of a specified object, accessing through a specified path using a GET request, and obtaining the corresponding JSON text;
[0024] Step S25, obtaining scenario setting information, accessing through a specified path using a GET request, and obtaining the corresponding JSON text;
[0025] Step S26: Obtain the simulation status of the scenario, access it via a GET request through a specified path, and obtain the corresponding JSON text.
[0026] In a preferred embodiment of the present invention, in step S30, inputting boundary condition data into the water network professional model through the service interface and integrating the input boundary condition data into the water network professional model includes the following steps:
[0027] Step S31: Model start and end simulation time: Obtain the model start and end simulation time in the JSON text sent by submitting the working condition simulation task in step S20 and write it into the engineering file;
[0028] Step S32: Result output step size: Obtain the result output step size in the JSON text sent by submitting the working condition simulation task in step S20 and write it into the engineering file;
[0029] Step S33: Precipitation time series: Obtain the precipitation time series in the JSON text sent by submitting the working condition simulation task in step S20 and write it into the engineering file;
[0030] Step S34: Boundary water (tide) level: Obtain the boundary water (tide) level in the JSON text sent by submitting the working condition simulation task in step S20 and write it into the engineering file;
[0031] Step S35: Initial water level: Obtain the initial water level in the JSON text sent by submitting the working condition simulation task in step S20 and write it into the engineering file.
[0032] In a preferred embodiment of the present invention, in step S40, integrating the built water network professional model and its service interface into the digital twin platform based on container technology includes the following steps:
[0033] Step S41: Create a Docker container environment: A Docker container needs to be created for the water network model service system;
[0034] Step S42: Configure Uvicorn as an ASGI server: Use Uvicorn as the application server gateway interface (ASGI) to run the FastAPI application;
[0035] Step S43: Set up the FastAPI application: Develop API interfaces under the FastAPI framework to implement the service interface described in step S20;
[0036] Step S44: Write a Docker Compose file: Use Docker Compose to define and run a multi-container Docker application;
[0037] Step S45, Deployment: Deploy the application in a local or cloud environment, run the Docker container, and test the responsiveness and correctness of the API interface.
[0038] A water network professional model service system for a digital twin platform according to the second aspect of the present invention includes:
[0039] A water network professional model construction module, which is used to construct a water network professional model based on an open-source hydrodynamic model and combined with the water network characteristics of a specific area;
[0040] A service interface design module, which is used to design service interfaces for the water network professional model based on a microservice framework;
[0041] A model boundary opening module, which is used to input boundary condition data into the water network professional model through the service interface and integrate the input boundary condition data into the water network professional model; and
[0042] A system integration and deployment module, which is used to integrate the constructed water network professional model and its service interfaces into the digital twin platform based on container technology.
[0043] Due to the adoption of the above technical solutions, the beneficial effects of the present invention are as follows:
[0044] 1. The present invention can simulate hydrodynamic processes such as water levels, flows, and flow velocities in river networks, providing basic data support for the digital twin platform;
[0045] 2. The present invention designs a service structure, enabling external users or systems to conveniently interact with the water network professional model for data and model calls, improving the reusability and scalability of the model;
[0046] 3. The openness of the model boundary of the present invention improves the applicability and flexibility of the model, allowing users to customize and optimize the model according to actual needs;
[0047] 4. The present invention realizes the inversion, prediction, and scheduling optimization of the water network state through the data processing and analysis capabilities of the platform;
[0048] 5. The present invention realizes the flexible configuration, efficient operation, and convenient service of the water network model. Description of the Drawings
[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0050] Figure 1 It is a flowchart of the method for service-ifying the water network professional model oriented to the digital twin platform of the present invention.
[0051] Figure 2 It is a structure diagram of the content returned by the request for all object interfaces of the present invention.
[0052] Figure 3 It is a test diagram of the request for all object interfaces of the present invention.
[0053] Figure 4 It is a structure diagram of the content sent by the request for the interface of submitting a working condition simulation task of the present invention.
[0054] Figure 5 It is a structure diagram of the content returned by the request for the interface of submitting a working condition simulation task of the present invention.
[0055] Figure 6 It is a test diagram of the request for the interface of submitting a working condition simulation task of the present invention.
[0056] Figure 7 It is a structure diagram of the content returned by the request for the interface of deleting a historical simulation task of the present invention.
[0057] Figure 8 It is a test diagram of the request for the interface of deleting a submitted simulation task of the present invention.
[0058] Figure 9 It is a structure diagram of the content returned by the request for the interface of obtaining the result of a specified object of the present invention.
[0059] Figure 10 It is a test diagram of the request for the interface of obtaining the result of a specified object of the present invention.
[0060] Figure 11 It is a structure diagram of the content returned by the request for the interface of obtaining scenario setting information of the present invention.
[0061] Figure 12 It is a test diagram of the request for the interface of obtaining scenario setting information of the present invention.
[0062] Figure 13 It is a structure diagram of the content returned by the request for the interface of obtaining the simulation status of a session of the present invention.
[0063] Figure 14 It is a test diagram of the request for the interface of obtaining the simulation status of a session of the present invention.
[0064] Figure 15 It is a structural schematic diagram of the water network professional model service system for the digital twin platform of the present invention. DETAILED DESCRIPTION
[0065] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below with reference to specific diagrams.
[0066] See also Figure 1 ,The figure shows a water network professional model service method for the digital twin platform, which includes the following steps:
[0067] Step S10, water network professional model construction: Based on the SWMM open source hydrodynamic model and combined with the water network characteristics of a specific area, a high-precision and high-reliability water network professional model is constructed. This model can simulate the water level, flow, flow velocity and other hydrodynamic processes in the river network, providing basic data support for the digital twin platform.
[0068] Step S20, service interface design: Design RESTful-style service interfaces for the water network professional model based on the FastAPI microservice framework. These interface functions include but are not limited to obtaining the ID numbers of all objects (river channels, sections, sluice gates, pumping stations), submitting working condition tasks to perform simulations, deleting historical simulation tasks, obtaining results of specified objects, obtaining scenario setting information, and obtaining the status of simulation sessions. Through these interfaces, external users or systems can easily interact with the water network professional model for data and model calls, improving the reusability and scalability of the model.
[0069] Step S30, model boundary opening: input boundary condition data to the water network professional model through the service interface, and integrate the input boundary condition data into the water network professional model. Specifically, through the service interface, external users or systems are allowed to input boundary condition data such as start and end simulation time, result output step length, precipitation time series, boundary water level, boundary tide level, initial water level, etc. into the water network professional model. These data will be automatically integrated and applied to the model to achieve customization and dynamic adjustment of model behavior. The openness of the model boundary improves the applicability and flexibility of the model, allowing users to customize and optimize the model according to actual needs.
[0070] Step S40, system integration and deployment: Based on container technology, the constructed water network professional model and its service-oriented interface are integrated into the digital twin platform. Through the platform's data processing and analysis capabilities, the inversion, forecasting and scheduling optimization of the water network status are realized. At the same time, the design of the service-oriented interface also enables the water network professional model to be provided as an independent service to other systems.
[0071] In step S10, a professional water network model is constructed based on an open-source hydrodynamic model and combined with the water network characteristics of a specific area, including the following steps:
[0072] Step S11, generalize the river network structure and input the channel cross-section parameters;
[0073] Step S12, divide the sub-catchments using the Thiessen polygon method according to the distribution of river channel bifurcations and channel cross-sections;
[0074] Step S13, input the rain gauges and determine the coverage range of the rain gauges using the Thiessen polygon method;
[0075] Step S14, determine the rain gauges corresponding to the sub-catchments divided in step S12 based on the coverage range of the rain gauges divided in step S13;
[0076] Step S15, input the water level stations and determine the coverage range of the water level stations using the Thiessen polygon method;
[0077] Step S16, based on the coverage range of the water level stations divided in step S15, determine the water level stations corresponding to the river network structure in step S11 to determine the initial water level of the river channel;
[0078] Step S17, input the sluices, pumping stations and their scheduling rules, and calibrate the hydrological and hydrodynamic parameters of the model.
[0079] In step S20, the service-oriented interface is designed for the professional water network model based on the microservice framework, including the following steps:
[0080] Step S21, obtain all object ID numbers, access through the specified path using a GET request, and obtain the corresponding JSON text. Specifically, see Figure 2 and Figure 3, obtain the ID numbers of all objects (rivers, sections, sluices, pumps). Use a GET request to access through the path: http: / / {IP address}:{port number} / {project code}_api / objects / id, where {IP address} represents the IP address of the server, {port number} represents the port number listened by the server, and {project code} represents the unique identifier of a specific project used to distinguish different models. After a successful GET request, a JSON text is returned. The JSON structure contains a top-level object that has four keys, corresponding to four different types of entities: rivers, sections, sluices, and pumps. Each key maps to an object containing two fields. The first field of rivers is "riverIds", which is an array containing multiple ID strings of rivers, and the array elements are unique; the second field is "totalRiverCount", which is an integer representing the total number of rivers. The first field of sections is "sectionIds", which is an array containing multiple ID strings of sections, and the array elements are unique; the second field is "totalSectionCount", which is an integer representing the total number of sections. The first field of sluices is "sluiceIds", which is an array containing multiple ID strings of sluices, and the array elements are unique; the second field is "totalSluiceCount", which is an integer representing the total number of sluices. The first field of pumps is "pumpIds", which is an array containing multiple ID strings of pumps, and the array elements are unique; the second field is "totalPumpCount", which is an integer representing the total number of pumps.
[0081] Step S22, submit a working condition simulation task, use a POST request to access through a specified path, and obtain the corresponding JSON text. Specifically, see Figures 4 to 6, submit a scenario simulation task, use a POST request, and access it through the path: http: / / {IP address}:{port number} / {project code}_api / run_model. The top-level object of the JSON sent by the POST request has six keys. "scenarioTag" provides a description of the scenario; "startTime" and "endTime" respectively define the start and end times of the scenario; "resultStep" represents the time step of the result; "warningLevel" inputs the scenario conditions of the gate scheduling. The "scenarioSetting" key maps to an object containing boundary conditions, including "rainfall" (rain gauge data), "initWaterLevel" (initial water level station data), and "waterLevel" (water or tide level station data). In "rainfall", each rain gauge has a unique numbered field and associated time-rainfall data. In "initWaterLevel" and "waterLevel", the initial water level of the water level station and the water (tide) level data changing over time are recorded respectively, and each water level station has a unique number. After the POST request is successful, a JSON text will be returned. The top-level object has three keys. "submissionId" represents the unique Id number of the submitted scenario; "normalResult" and "optimizedResult" respectively represent the simulation information under the normal and optimized scheduling schemes. The subsequent objects include the unique Id number of the simulation scenario (scenarioId), the number of the pump-gate scheduling rule executed (scheme), and the description of the simulation information (description).
[0082] Step S23, delete the historical simulation task, and access it using a DELETE request through the specified path. Specifically, see Figure 7 and Figure 8 , delete the historical simulation task, use a DELETE request, and access it through the path: http: / / {IP address}:{port number} / {project code}_api / model_library / info / delete?submissionId={submitted scenario Id number}, where {submitted scenario Id number} represents the unique numbered task of the scenario after submission. After the DELETE request is successful, "success" is returned, and "failed" is returned if it fails.
[0083] Step S24, obtain the results of the specified object, access it using a GET request through the specified path, and obtain the corresponding JSON text. Specifically, see Figure 9 and Figure 10, To obtain the results of a specified object, use a GET request and access through the path: http: / / {IP address}:{port number} / {project code}_api / model_library / results?scenarioId={simulation scenario ID}&type={object type}&variable={attribute}&id={object ID}. Here, {simulation scenario ID} refers to the unique ID of the scenario returned after submitting a simulation task. {Object type} can be entered as rivers, sections, sluices, and pumps. When {object type} is entered as rivers or sections, {attribute} can be entered as depth, volume, or velocity to obtain water depth, flow rate, and flow velocity information. When {object type} is entered as sluices or pumps, {attribute} can be entered as volume or statue to obtain flow rate and status information. {Object ID} identifies the unique ID corresponding to the object. After the GET request is successful, a JSON text will be returned. In the text, "scenarioId" is the unique ID of the simulation scenario, "type" is the object type, "variable" is the object attribute, and "id" is the unique identifier of the object. In addition, this structure also defines the time range of the record, which is represented in the format of "yyyy-mm-ddThh:mm:ss" through the "startTime" and "endTime" fields. Under the "result" key, there is an object attribute value corresponding to the time point with the timestamp as the key.
[0084] Step S25, To obtain the scenario setting information, use a GET request to access through a specified path and obtain the corresponding JSON text. Specifically, refer to Figure 11 and Figure 12 , To obtain the scenario setting information, use a GET request and access through the path: http: / / {IP address}:{port number} / {project code}_api / model_library / settings?submissionId={submitted working condition ID}. After the GET request is successful, a JSON text will be returned, and the content is the JSON content submitted using a POST request in the submitted working condition simulation task. This interface is used to query the setting information and boundary conditions of historical submitted simulation tasks.
[0085] Step S26, To obtain the simulation status of a session, use a GET request to access through a specified path and obtain the corresponding JSON text. Specifically, refer to Figure 13 and Figure 14, get the simulation status of the session, use GET request, and access through the path: http: / / {IP address}:{port number} / {project code}_api / model_library / info. A successful GET request will return a JSON text, which includes "scenarioId" representing the unique identifier of the scenario; "submissionTime" is the time when the simulation condition is submitted; "submissionId" is the unique ID of the submitted condition; "progress" indicates the simulation progress; the "description" field describes the basic information of the simulation; "scenarioTag" represents the language description information of the simulation scenario; the "status" field indicates whether the simulation task execution is successful or failed; the value of "scheme" represents the scheduling rule executed by the pump gate.
[0086] In step S30, the step of inputting boundary condition data to the water network professional model through the service interface and integrating the input boundary condition data into the water network professional model includes the following steps:
[0087] Step S31, model start and end simulation time: obtain the model start and end simulation time in the JSON text sent when submitting the working condition simulation task in step S20, and write it into the project file. Specifically, obtain the value of "startTime" in the JSON text sent when submitting the working condition simulation task in step S20 and write it into START_DATE, START_TIME, and REPORT_START_DATE in the project file; obtain the value of "endTime" in the JSON text and write it into END_DATE, END_TIME, and REPORT_START_TIME in the project file.
[0088] Step S32, result output step: obtain the result output step in the JSON text sent by submitting the working condition simulation task in step S20, and write it into the project file. Specifically, obtain the value of "resultStep" in the JSON text sent by submitting the working condition simulation task in step S20 and write it into REPORT_STEP in the project file.
[0089] Step S33, precipitation time series: Obtain the precipitation time series in the JSON text sent by the submitted working condition simulation task in Step S20 and write it into the engineering file. Specifically, obtain the "rainfall" field in the JSON text sent by the submitted working condition simulation task in Step S20. The "raingateId" under "rainfall" is used as the value of "Source" for the corresponding precipitation station under [RAINGAGES] in the engineering file; the "data" under rainfall is used as the value of the time series under [TIMESERIES], and the name of the time series is the same as the raingateId.
[0090] Step S34, boundary water (tide) level: Obtain the boundary water (tide) level in the JSON text sent by the submitted working condition simulation task in Step S20 and write it into the engineering file. Specifically, obtain the "waterLevel" field in the JSON text sent by the submitted working condition simulation task in Step S20. The "outfallId" under "waterLevel" is used as the value of "StageData" under [OUTFALLS]; the "data" under waterLevel is used as the value of the time series under [TIMESERIES], and the name of the time series is the same as the "outfallId".
[0091] Step S35, initial water level: Obtain the initial water level in the JSON text sent by the submitted working condition simulation task in Step S20 and write it into the engineering file. Specifically, obtain the "initWaterLevel" field in the JSON text sent by the submitted working condition simulation task in Step S20. According to the river network range under the water level station coverage obtained in Step 6 of Step 1 according to the "initWaterLevelID" under "initWaterLevel", the "data" under "initWaterLevel" is used as the value of "InitDepth" under [JUNCTIONS].
[0092] In Step S40, integrating the constructed water network professional model and its service interface into the digital twin platform based on container technology includes the following steps:
[0093] Step S41, create a Docker container environment: A Docker container needs to be created for the water network model service system. Define the required operating system environment, dependency libraries, and runtime environment by writing a Dockerfile. The Dockerfile should include installing a Python environment, the SWMM calculation engine, and other necessary server software packages (uvicorn, fastapi).
[0094] Step S42, Configure Uvicorn as the ASGI server: Use Uvicorn as the Application Server Gateway Interface (ASGI) to run the FastAPI application. Configure the CMD command in the Dockerfile to specify the FastAPI application module loaded when Uvicorn starts, as well as the host and port number to run on.
[0095] Step S43, Set up the FastAPI application: Develop API interfaces under the FastAPI framework to implement the service interfaces described in Step S20. The FastAPI application will be responsible for handling HTTP requests, performing model operations, and returning model results.
[0096] Step S44, Write the Docker Compose file: Use Docker Compose to define and run multi-container Docker applications. In the Compose file, define services, networks, and volumes to ensure efficient communication between services and data persistence. This file should also specify the startup dependencies of the containers to ensure that the services start in the correct order.
[0097] Step S45, Deployment: Deploy the application in a local or cloud environment, run the Docker containers, and test the responsiveness and correctness of the API interfaces. Verify the accuracy of the model and the stability of the interfaces by simulating requests for different working condition scenarios.
[0098] See Figure 15 , the figure shows a water network professional model service system for a digital twin platform, including a water network professional model construction module 100, a service interface design module 200, a model boundary opening module 300, and a system integration and deployment module 400.
[0099] The water network professional model construction module 100 is used to construct a water network professional model based on an open-source hydrodynamic model and combined with the water network characteristics of a specific area;
[0100] The service interface design module 200 is used to design service interfaces for the water network professional model based on the microservice framework;
[0101] The model boundary opening module 300 is used to input boundary condition data into the water network professional model through the service interface and integrate the input boundary condition data into the water network professional model.
[0102] The system integration and deployment module 400 is used to integrate the constructed water network professional model and its service interfaces into the digital twin platform based on container technology.
[0103] Each module in the water network professional model service system for the digital twin platform of the present invention can be implemented in whole or in part by software, hardware, or a combination thereof. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0104] The above has shown and described the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and what is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A water network professional model service method for a digital twin platform, characterized in that: The following steps are involved: Step S10, constructing a professional water network model: constructing a professional water network model based on an open source hydrodynamic model and in combination with water network characteristics of a specific area; Step S20, service-oriented interface design: design a service-oriented interface based on the water network professional model and the microservice framework; Step S30, model boundary opening: inputting boundary condition data into the water network professional model through the service-oriented interface, and integrating and applying the input boundary condition data into the water network professional model; Step S40, system integration and deployment: Integrate the constructed water network professional model and its service interface into the digital twin platform based on container technology.
2. The water network professional model service method for the digital twin platform according to claim 1, characterized in that: In step S10, the water network professional model is constructed based on the open source hydrodynamic model and in combination with the water network characteristics of a specific area, including the following steps: Step S11, generalizing the river network structure and inputting river section parameters; Step S12, dividing the sub-catchment area using the Thiessen polygon method according to the distribution of river branch points and river sections; Step S13, inputting the rainfall stations, and using the Thiessen polygon method to determine the coverage of the rainfall stations; Step S14, determining the rainfall stations corresponding to the sub-catchment areas divided in step S12 based on the rainfall station coverage areas divided in step S13; Step S15, inputting water level stations, and using the Thiessen polygon method to determine the coverage of the water level stations; Step S16, based on the water level station coverage divided in step S15, determining the water level station corresponding to the river network structure in step S11 to determine the initial water level of the river; Step S17, input the sluice gates, pumping stations and their dispatching rules, and calibrate the model's hydrological and hydrodynamic parameters.
3. The water network professional model service method for the digital twin platform according to claim 2, characterized in that: In step S20, the service-oriented interface is designed based on the water network professional model and the microservice framework, including the following steps: Step S21, obtain all object ID numbers, use a GET request to access through a specified path, and obtain the corresponding JSON text; Step S22, submitting the working condition simulation task, using a POST request to access through the specified path, and obtaining the corresponding JSON text; Step S23, deleting the historical simulation task, using a DELETE request to access through a specified path; Step S24, obtaining the specified object result, using a GET request to access through the specified path, and obtaining the corresponding JSON text; Step S25, obtaining scenario setting information, using a GET request to access through a specified path, and obtaining the corresponding JSON text; Step S26, obtain the session simulation status, use a GET request to access through the specified path, and obtain the corresponding JSON text.
4. The water network professional model service method for the digital twin platform as claimed in claim 3 is characterized in that: In step S30, the step of inputting boundary condition data to the water network professional model through the service interface and integrating the input boundary condition data into the water network professional model includes the following steps: Step S31, model start and end simulation time: obtain the model start and end simulation time in the JSON text sent when submitting the working condition simulation task in step S20, and write it into the project file; Step S32, result output step length: obtain the result output step length in the JSON text sent when submitting the working condition simulation task in step S20, and write it into the project file; Step S33, precipitation time series: obtain the precipitation time series in the JSON text sent by submitting the working condition simulation task in step S20, and write it into the project file; Step S34, boundary water (tide) level: obtain the boundary water (tide) level in the JSON text sent when submitting the working condition simulation task in step S20, and write it into the project file; Step S35, initial water level: obtain the initial water level in the JSON text sent when submitting the working condition simulation task in step S20, and write it into the project file.
5. The water network professional model service method for the digital twin platform as claimed in claim 4 is characterized in that: In step S40, the constructed water network professional model and its service interface are integrated into the digital twin platform based on container technology, including the following steps: Step S41, creating a Docker container environment: a Docker container needs to be created for the water network model service system; Step S42, configure Uvicorn as an ASGI server: use Uvicorn as an Application Server Gateway Interface (ASGI) to run the FastAPI application; Step S43, setting up FastAPI application: developing an API interface under the FastAPI framework to implement the service-oriented interface described in step S20; Step S44, writing a Docker Compose file: using Docker Compose to define and run a multi-container Docker application; Step S45, deployment: deploy the application in a local or cloud environment, run the Docker container, and test the responsiveness and correctness of the API interface.
6. A water network professional model service system for a digital twin platform that implements the water network professional model service method for a digital twin platform as described in any one of claims 1 to 5, characterized in that: include: A water network professional model building module, wherein the water network professional model building module is used to build a water network professional model based on an open source hydrodynamic model and in combination with water network characteristics of a specific area; A service-oriented interface design module, which is used to design a service-oriented interface for a water network professional model based on a microservice framework; A model boundary opening module, wherein the model boundary opening module is used to input boundary condition data to the water network professional model through a service-oriented interface, and integrate and apply the input boundary condition data to the water network professional model; and A system integration and deployment module, which is used to integrate the constructed water network professional model and its service interface into the digital twin platform based on container technology.