Water conservancy model management platform based on web service
By designing a water conservancy model management platform based on web service, the problem of difficulty in unified management and efficient calculation of water conservancy models is solved, and the coordinated management of different watersheds and different types of water conservancy models and efficient utilization of computing resources is achieved.
Patent Information
- Application Number
- CN202111208651.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2041-12-20
AI Technical Summary
Due to the inconsistent Web interfaces, the water conservancy model is difficult to perform unified management and efficient calculations, resulting in bottlenecks in computing efficiency and user experience.
Design a water conservancy model management platform based on web service, including model service interface module, model registration module, model call service module, load balancing module, security management module and database module. Through unified standardized model interface, load balancing and security management, the efficiency of computing resource utilization is improved.
The coordinated management of different water conservancy models in different river basins and different types has been realized, the efficiency of computing resource utilization has been improved, and the computing efficiency and user experience of model services have been improved.
Smart Images

Figure CN114065070B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a water conservancy model management platform based on web service, which is applicable to the technical field of water conservancy data processing. Background Art
[0002] Since IBM proposed the concept of smart earth in November 2008, concepts such as smart city and smart water conservancy have also been proposed one after another. The overall goal of smart water conservancy is to minimize the human workload in water resource management decision-making and realize intelligent management decision-making based on traditional models, big data as the core, and intelligence as the main line. Among them, realizing model services through model construction is an important part of smart water affairs.
[0003] The water conservancy models mainly include: basin flood control and drainage forecast model, basin flood control and drainage scheduling model, basin water environment forecast model, basin water environment scheduling model, other types of models and coupling models of various models, etc. However, due to the inconsistency of Web interfaces and other issues, it is difficult to distinguish and coordinate each model for the different basins and different types of models deployed in a decentralized manner. It is also difficult to count the usage status of each model, such as the frequency and time of use of each model. In addition, the computational workload of professional models is large, and it takes a long time to calculate for effective service response for calculation requests. When solving optimization problems that require multi-scheme calculations and when there are concurrent access requirements for multiple users, decentralized models have bottlenecks in computing efficiency and user experience. Summary of the invention
[0004] The technical problem to be solved by the present invention is: in view of the above-mentioned existing problems, a water conservancy model management platform based on web service is provided to improve the utilization efficiency of computing resources and give full play to the supporting role of model services.
[0005] The technical solution adopted by the present invention is: a water conservancy model management platform based on web service, characterized in that it includes:
[0006] The model service interface module is used to encapsulate the original web interface of the water conservancy model according to the model interface specification, add a layer of web service shell, and make all models implement unified standards;
[0007] Model registration module, used to register the basic information of the water conservancy model for management by the background management module;
[0008] The model calling service module is used to provide the web application system with a calling service for the model registered to the platform through a reverse proxy;
[0009] The load balancing module is used to obtain the load information of each water conservancy model server from the resource probes set on the server, and when the load is too large, forward the new call request to the server with lower load through the load balancing strategy;
[0010] The security management module is used to issue AccessKey to the web application system to ensure the legitimacy of the source of the web call request; it ensures the security of the model service by calling the token generation interface of the model service;
[0011] The database module is used to store data and provide support for data calls from other modules and obtaining platform operation status.
[0012] Also includes:
[0013] The model information management module is used to display the basic information of the water conservancy model, the registered model information and the model service availability status.
[0014] The model service availability status indicates whether the model service can participate in the calculation;
[0015] When a web application system accesses a model service, it first obtains a token. While the web user holds the token, the model service instance is set to an unavailable state. After the token is returned or the preset timeout period has expired, the model service instance returns to an available state.
[0016] Also includes:
[0017] The model basic data catalog display module is used to realize the web display of the comprehensive monitoring data service of the big data center.
[0018] The model interface specifications include standardized specifications for spatial resolution, time scale, time step, grid type, file data format, data accuracy, generalization density, model configuration file, model parameter description information and information feedback during model operation among various water conservancy models.
[0019] Based on the interface form specifications, the interfaces are divided into registration interfaces, model service preparation interfaces, professional model information acquisition interfaces, operation data input and operation interfaces, and model output interfaces according to their purpose.
[0020] The data in the database module includes:
[0021] Web application information table, used to store basic information, deployment status, and AccessKey information of web applications;
[0022] Model service class information table, used to store the information registered by the model registration module;
[0023] Model service call information table, used to store the call status of the model service by the web application system through this platform, including the number of calls, response time, and call success rate;
[0024] The comprehensive monitoring data service cache table caches some data in the comprehensive monitoring data service of the big data center based on the access situation.
[0025] The basic information of the water conservancy model includes watershed code, monitoring data, model GUID, model type, model version and modeling scope.
[0026] The model registration module is also used to register the deployment and availability of the water conservancy model.
[0027] The model deployment status includes the model deployment address, deployment personnel and contact information, and the availability status includes the model status, the name of the calling web application business system and the calling personnel information.
[0028] The beneficial effects of the present invention are as follows: the present invention solves the problem of effective service response of water conservancy professional models with large computing workload and improves the efficiency of computing resource utilization by designing the architecture of water conservancy related models of different river basins and different types, including model classification and interface design. At the same time, it solves the problem that it is difficult to coordinate and manage water conservancy related models of different river basins and different types. The present invention fully plays the role of supporting water conservancy model services, improves the convenience of Web application system development, and improves the efficiency of computing resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 The overall architecture of the embodiment.
[0030] Figure 2 This is the model interface display and test page in the implementation example.
[0031] Figure 3 It is a flow chart of the load balancing module in the embodiment.
[0032] Figure 4 It is a schematic diagram of the process of the security management module model deployment phase in the embodiment.
[0033] Figure 5 This is a flow chart of the security management module model service calling phase in the embodiment. DETAILED DESCRIPTION
[0034] like Figure 1As shown, this embodiment is a water conservancy model management platform based on web service, including a model service interface standardization module, a model registration module, a model information management module, a model call service module, a load balancing module, a security management module, a model basic data directory display module and a database module.
[0035] (1) Model service interface standardization module
[0036] In this example, the model service interface standardization module is used to encapsulate the original web interface of the water conservancy model according to the model interface specification, add a layer of web service shell, implement unified standards for all models, and realize the standardized transformation of existing models.
[0037] The contents of the model parameter standard interface formulation include: standardization of spatial resolution, time scale, time step, grid type, file data format, data accuracy, generalization density, model configuration file, model parameter description information, and information feedback during model operation.
[0038] The standardization of model service interfaces first requires the definition of interface formal specifications in terms of data transmission format, interface style, version control, response parameters, etc. Based on the interface formal specifications, interfaces are divided into two categories: platform-defined interfaces and model-defined interfaces. The defined interfaces must be implemented by each model, otherwise they cannot be effectively managed; while the customized interfaces can be expanded according to the model itself to give full play to the model service potential. On this basis, Figure 2 As shown, this platform also provides an interface display and test page for users to view interface descriptions and perform simple tests on a single interface.
[0039] The model modular system platform in this embodiment is mainly composed of a model application client with a C / S architecture and a decision support server with a B / S architecture. The B / S server adopts technology, mainly through the establishment of a human-machine interface access interface based on the Web Service service architecture for interface integration. The external system independently determines the interface display form of the model results data, and outputs data and displays the numerous analysis methods and expression methods involved in boundary condition analysis, situation analysis and judgment, water resources forecasting, simulation calculation, scheduling decision-making, etc. The interface. The external system can open different ranges for different user levels or customize the standardized interface between the model system and the early warning application service for users in real time, which greatly improves the object-oriented maintenance and scalability of the water conservancy model system, and realizes high-standard secondary development support in the field of watershed water quantity and water quality coupling model research and development.
[0040] The model operation management client of C / S architecture deeply transforms the model interface by adopting the design concept of object-oriented, reuse, sharing and modularization, so that the platform can fully control the model call command, parameter transfer, operation status and result output. Each model submodule and platform functional component is the basic unit of system operation to build a model operation platform to meet the needs of professionals for model modeling, model configuration, solution management and model update, and realize the functions of model grid generation, boundary setting, parameter setting, model data management and model operation control.
[0041] In this embodiment, according to the different purposes of the interfaces, the water conservancy model can be divided into the following five categories: registration interface, model service preparation interface, professional model information acquisition interface, operation data input and operation interface, and model output interface. The specific interface contents are as follows:
[0042]
[0043] (2) Model registration module
[0044] In this example, the model registration module is used to register the basic information, deployment status, and availability of the water conservancy model for display and management by the background management module. The basic information of the water conservancy model is divided into basic model information and model deployment status. The basic information of the water conservancy model includes watershed code, model guid, model type, model version, modeling scope, construction unit, development unit, maintenance unit, etc. The model deployment status includes the model deployment address, deployment personnel, contact information, etc. The availability status includes the model status, the name of the calling web application business system, and the calling personnel information.
[0045] (3) Model information management module
[0046] In this embodiment, the model information management module is used to provide a web page, which can view the basic information of the water conservancy model, the registered model information and the model service availability status, usage statistics, call status, and manually perform online and offline processing of the model service.
[0047] The basic information of the model, including watershed code (geographic background data), monitoring data (rainfall, evaporation, water level, tide level, flow, water quality index concentration, project operation), model GUID, model type, model version, modeling scope, construction unit, development unit, maintenance unit, etc., is displayed in the form of a list.
[0048] Model availability information includes model status, name of the calling web application business system, calling personnel, etc. The model provides a token generation interface that is only called by the present invention, and only accepts web call requests with the correct token. When the web application system accesses the model service, it first obtains the token. While the web user holds the token, the present invention sets the model service instance to a busy state. After the token is returned or the preset timeout period is exceeded, the model service instance returns to an available state. At the same time, the module provides the online and offline functions of the model service instance. For service instances marked as offline, the web application system will not be able to access them.
[0049] The model information management module presents the called status and call information of each model service in a list form, and this information will be stored by the present invention as historical data to provide call statistics display function. Call statistics include call times, response time, call success rate, etc.
[0050] (4) Model call service module
[0051] In this example, the model call service module is registered to the platform model through the reverse proxy to provide model call services for the web application system. The proxy server accepts the client's network access connection request, and then the server strategically forwards the request to the actual business server in the network, and returns the result processed by the business server to the client that initiated the connection request on the network.
[0052] (5) Load balancing module
[0053] like Figure 3 As shown, the load balancing module in this embodiment provides service computing resource management functions. When the deployment environment permits, based on cloud service support, resource probes are set on each model server through the load balancing module. When the load is too large, the new call request is forwarded to the server with lower load through the load balancing strategy to achieve load balancing and improve model computing efficiency and user experience.
[0054] (6) Security Management Module
[0055] In this example, the security management module issues AccessKey to the web application system to ensure the legitimacy of the source of the web call request. It also ensures the security of the model service by calling the token generation interface of the model service. This includes two stages: deployment stage and service call stage.
[0056] like Figure 4As shown, in the deployment phase, the web application server needs to apply for AccessKey from this platform, which includes a public key and a private key. After the model service is registered with this embodiment, this embodiment can obtain the token of the model service through the specified token interface.
[0057] like Figure 5 As shown, in the service call phase, the web application server constructs an interface access request, then hashes the request together with the private key, and adds the result of the operation sign to the access request, initiates an access request to the present invention, verifies the sign, and if the verification fails, it means that the source of the access request is illegal and no response is given; for reasonable access requests, the present invention calls the load balancing module for the first access request, and reasonably distributes the service request according to the computing resources of the model server. Then distribute it to the appropriate model service. That is, after getting the token issued by the model service, this embodiment sends the service request together with the token to the model server, obtains the model calculation result, and forwards it to the web application server through the model call service module, and finally presents it to the user.
[0058] (7) Model basic data directory display module
[0059] In this embodiment, the model basic data directory display module is used to realize the web display of the comprehensive monitoring data service of the big data center. Users can view the basic data directory provided by the comprehensive monitoring data service through the web, and can display these basic data in the form of a data table.
[0060] (8) Database module
[0061] In this embodiment, the database module is the data storage and management support for other modules, mainly including web application class information table, model service class information table, model service call class information table, comprehensive monitoring data service cache table, etc. Among them, the web application class information table is used to store the basic information, deployment status, AccessKey and other information of the web application; the model service class information table stores the registered information of the model registration module, and supports the web display of the model information management module; the model service call class information table is used to store the call status of the model service by the web application system through the present invention, and the call status statistics include the number of calls, response time, call success rate, etc.; the comprehensive monitoring data service cache table caches some data in the comprehensive monitoring data service of the big data center according to the access status to improve access efficiency.
[0062] This embodiment can manage different types of water-related models in different river basins, improve the efficiency of computing resource utilization, coordinate model construction, standardize model services, and give full play to the supporting role of model services. The platform has the following 9 functions:
[0063] (1) Unify the management of different types of models, divide models of different basins, types, and principles according to model usage scenarios, and focus on the model management of each manufacturer.
[0064] (2) Provide model standardization transformation function to standardize the interfaces of each model, encapsulate the original web interface of the model according to the model interface specification, add a layer of web service shell, make all models implement unified standards, and realize the standardization transformation of existing models.
[0065] (3) Provide model registration and management functions to register the basic information, deployment status, and availability of water conservancy models for display and management by the background management module.
[0066] (4) Provide a web page to display the basic information of the water conservancy model in the form of a list, including watershed code, model GUID, model type, model version, modeling scope, construction unit, development unit, maintenance unit, etc.; registered model information, model service availability, usage statistics, call statistics, and provide manual model service online and offline processing functions.
[0067] (5) Provide model calling services, register the model to the platform through the reverse proxy, and provide model calling services for the web application system.
[0068] (6) Provide service computing resource management functions. When the deployment environment permits, based on cloud service support, resource probes are set on each model server through the load balancing module. When the load is too large, new call requests are forwarded to servers with lower loads through load balancing strategies to achieve load balancing and improve model computing efficiency and user experience.
[0069] (7) Ensure the security of model services. By issuing AccessKey to the web application system, the legitimacy of the source of the web call request is ensured; by calling the token generation interface of the model service, the security of the model service is ensured.
[0070] (8) Web display of the Big Data Center's monitoring data service. Users can view the basic data directory provided by the comprehensive monitoring data service through the web, and can also display these basic data in the form of data tables.
[0071] (9) Data storage management support. Mainly includes web application information table, model service information table, model service call information table, comprehensive monitoring data service cache table, etc.
Claims
1. A water conservancy model management platform based on web service, characterized in that: include: The model service interface module is used to encapsulate the original web interface of the water conservancy model according to the model interface specification, add a layer of web service shell, and make all models implement unified standards; Model registration module, used to register the basic information of the water conservancy model for management by the background management module; The model calling service module is used to provide the web application system with a calling service for the model registered to the platform through a reverse proxy; The load balancing module is used to obtain the load information of each water conservancy model server from the resource probes set on the server, and when the load is too large, forward the new call request to the server with lower load through the load balancing strategy; The security management module is used to issue AccessKey to the web application system to ensure the legitimacy of the source of the web call request; it ensures the security of the model service by calling the token generation interface of the model service; The database module is used to store data and provide support for data calls from other modules and obtaining platform operation status; The model interface specifications include the standardized specifications of spatial resolution, time scale, time step, grid type, file data format, data accuracy, generalization density, model configuration file, model parameter description information and information feedback during model operation between various water conservancy models; Based on the interface form specification, the interfaces are divided into registration interfaces, model service preparation interfaces, professional model information acquisition interfaces, operation data input and operation interfaces, and model output interfaces according to their purpose; The data in the database module includes: Web application information table, used to store basic information, deployment status, and AccessKey information of web applications; Model service class information table, used to store the information registered by the model registration module; Model service call information table, used to store the call status of the model service by the web application system through this platform, including the number of calls, response time, and call success rate; The comprehensive monitoring data service cache table caches some data in the comprehensive monitoring data service of the big data center based on the access situation.
2. The water conservancy model management platform based on web service according to claim 1, characterized in that: It is characterized by further comprising: Model information management module, used to display basic information of water conservancy models, registered model information and model service availability status; The model service availability status indicates whether the model service can participate in the calculation; When a Web application system accesses a model service, it first obtains a token. While the web user holds the token, the model service instance is set to an unavailable state. After the token is returned or the preset timeout period has expired, the model service instance returns to an available state.
3. The water conservancy model management platform based on web service according to claim 1, characterized in that: It is characterized by further comprising: The model basic data catalog display module is used to realize the web display of the comprehensive monitoring data service of the big data center.
4. The water conservancy model management platform based on web service according to claim 1, characterized in that: The basic information of the water conservancy model includes watershed code, monitoring data, model GUID, model type, model version and modeling scope.
5. The water conservancy model management platform based on web service according to claim 1, characterized in that: Features: The model registration module is also used to register the deployment and availability of the water conservancy model.
6. The water conservancy model management platform based on web service according to claim 5, characterized in that: The model deployment status includes the model deployment address, deployment personnel and contact information, and the availability status includes the model status, the name of the calling web application business system and the calling personnel information.
Citation Information
Patent Citations
Authentication method and device, computer equipment and storage medium
CN111949974A