A hydrological model scheduling method, device, storage medium and electronic device

By constructing a directional acyclic graph and priority list, large-scale watershed hydrological model is dispatched, and the problem of long execution time of hydrological prediction schemes is solved, and efficient resource utilization and computational efficiency are achieved.

CN118114842BActive Publication Date: 2024-11-05CHINA INST OF WATER RESOURCES & HYDROPOWER RES
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202410443748.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-13
Publication Date
2024-11-05
Estimated Expiration
2044-04-13

AI Technical Summary

Technical Problem

In the hydrological model scheduling of large-scale river basins, the existing technology causes some tributary hydrological models to be in an invalid waiting state, and the computing resources are not fully utilized, resulting in a long execution time of the hydrological prediction scheme and low calculation efficiency.

Method used

By obtaining the model identification and topological relationship information of the hydrological model to be dispatched, the model execution time is determined, and a directed acyclic graph is constructed, and the path with the longest execution time is given priority, a priority list is formed, and the model is gradually scheduled to avoid invalid waiting.

Benefits of technology

Effectively utilize computing resources, shorten the execution time of hydrological prediction schemes, improve computing efficiency, and avoid invalid waiting for simple execution paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118114842B_ABST
    Figure CN118114842B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, storage medium and electronic device for scheduling a hydrological model, and to the technical field of model scheduling, wherein the method comprises: determining a model directed graph based on the model identification and model topological relationship information of each hydrological model to be scheduled, summarizing each first path hydrological model in the longest execution path and the first upper-layer hydrological model on which it depends, obtaining a first execution list, removing the hydrological models to be scheduled in the first execution list from all the hydrological models to be scheduled, obtaining the remaining hydrological models, and determining a second execution list and a third execution list based on each remaining hydrological model; searching for the hydrological models to be scheduled from the first execution list, the second execution list and the third execution list in turn according to the search priority and forming a model execution sequence, and scheduling the hydrological models to be scheduled in the model execution sequence in turn. The present application has the effect of shortening the execution time of the hydrological prediction scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of model scheduling, and in particular to a hydrological model scheduling method, device, storage medium and electronic device. Background Art

[0002] A hydrological model is an approximate scientific model that generalizes complex hydrological phenomena and processes using simulation methods. With the development of computer technology and hydrological science, hydrological models have evolved from simple empirical models to complex physical models that can simulate hydrological processes at various scales. Hydrological models play a vital role in water resources management and meteorological forecasting. They are widely used in weather forecasting, flood forecasting, water resources management, climate change impact assessment and other fields. In real life, the hydrological models established for water areas often involve multiple ones, so the scheduling of each hydrological model plays an important role in water resources management.

[0003] At present, when scheduling the hydrological model established for a large-scale river basin, the method usually adopted is: adopt the idea of ​​sending the full model, that is, the hydrological model with upstream dependencies is run first. However, when scheduling the hydrological model in this way, it is easy for the hydrological models corresponding to some tributaries of the large-scale river basin to be in an invalid waiting state, resulting in incomplete utilization of computing resources and low computing efficiency, which leads to a long execution time of the hydrological prediction plan corresponding to the hydrological model. Summary of the invention

[0004] In order to shorten the execution time of a hydrological prediction scheme, the present application provides a hydrological model scheduling method, device, storage medium and electronic device.

[0005] In a first aspect of the present application, a hydrological model scheduling method is provided, which specifically includes:

[0006] Obtain model identifiers and model topological relationship information of multiple hydrological models to be scheduled, and determine the model execution duration of each of the hydrological models to be scheduled, wherein the hydrological models to be scheduled are hydrological models corresponding to various regions in a large-scale river basin, and the model topological relationship information includes the execution level of each of the hydrological models to be scheduled, and the smaller the execution level, the closer the area to which the corresponding hydrological model to be scheduled belongs is to the most upstream of the large-scale river basin;

[0007] Determine a directed acyclic graph based on the model identifier of each of the hydrological models to be scheduled and the model topological relationship information, and add the execution time of each model as the weight of the corresponding hydrological model to be scheduled to the directed acyclic graph to obtain a model directed graph;

[0008] Determine the first model execution path starting from each first initial hydrological model in all the hydrological models to be scheduled from the model directed graph, determine the longest execution path with the longest execution time from each of the first model execution paths, and summarize each first path hydrological model in the longest execution path and the first upper-layer hydrological model on which it depends to obtain a first execution list, wherein the execution level of the first initial hydrological model is the smallest among all the hydrological models to be scheduled, the execution level of the first upper-layer hydrological model is smaller than the execution level of the corresponding first path hydrological model, and the sum of the weights of each of the first path hydrological models in the longest execution path is the largest;

[0009] Eliminating the hydrological models to be scheduled in the first execution list from all the hydrological models to be scheduled to obtain remaining hydrological models, and determining a second execution list and a third execution list based on the remaining hydrological models;

[0010] According to the search priority, the hydrological models to be scheduled are searched from the first execution list, the second execution list and the third execution list in turn to form a model execution sequence, and the hydrological models to be scheduled in the model execution sequence are scheduled in turn. The search priority of the first execution list is higher than the search priority of the second execution list, and the search priority of the second execution list is higher than the search priority of the third execution list.

[0011] By adopting the above technical solution, the model directed graph is determined, so as to facilitate the subsequent selection of various model execution paths. Then, the longest execution path with the longest execution time and the most complexity is determined. Further, each first path hydrological model in the longest execution path and the first upper-level hydrological model on which it depends are summarized, and finally the first execution list with the highest search priority is obtained, so that when the hydrological model to be scheduled is subsequently searched from the first execution list, the second execution list and the third execution list, priority is given to searching from the first execution list, so that the upper-level hydrological model on which the first path hydrological model in the complex longest execution path depends can be executed first, and then the complex longest execution path can be executed first, so as to better avoid the long invalid waiting time of the simple execution path with short calculation time, which helps to shorten the execution time of the hydrological prediction scheme.

[0012] Optionally, the determining of the model execution duration of each of the hydrological models to be scheduled specifically includes:

[0013] Based on the model topology relationship information, determining the execution level of each of the hydrological models to be scheduled;

[0014] The number of river sections and the predicted duration of hydrological conditions corresponding to each of the hydrological models to be scheduled are obtained, and the execution level, number of river sections and predicted duration of hydrological conditions corresponding to each of the hydrological models to be scheduled are substituted into the preset execution duration calculation formula to obtain the corresponding model execution duration.

[0015] By adopting the above technical solution, after obtaining the execution level, number of river sections and hydrological condition prediction time of each hydrological model to be scheduled, it is equivalent to determining the value of the independent variable related to the model execution time of the hydrological model to be scheduled. Finally, the execution level, number of river sections and hydrological condition prediction time are substituted into the execution time calculation formula, so as to accurately determine the model execution time of the hydrological model to be scheduled.

[0016] Optionally, the execution time calculation formula is:

[0017] y=0.0279*x1+0.0436*x2+0.1105*x3+0.6137;

[0018] In the formula, y represents the model execution time corresponding to each of the hydrological models to be scheduled, x1 represents the execution level corresponding to each of the hydrological models to be scheduled, x2 represents the number of river sections corresponding to each of the hydrological models to be scheduled, and x3 represents the hydrological condition prediction time corresponding to each of the hydrological models to be scheduled.

[0019] By adopting the above technical solution, the product of the model execution time and parameter 0.0279, the product of the number of river sections and parameter 0.0436, and the product of the hydrological condition prediction time and parameter 0.1105 are added together and then 0.6137 is added, so as to finally accurately determine the model execution time of the hydrological model to be scheduled.

[0020] Optionally, determining the second execution list and the third execution list based on each of the remaining hydrological models specifically includes:

[0021] Determine a second initial hydrological model from each of the remaining hydrological models, and determine a second model execution path starting from each of the second initial hydrological models from the model directed graph, wherein the execution level of the second initial hydrological model is the smallest among all the remaining hydrological models;

[0022] Determine the second upper-layer hydrological model on which each second-path hydrological model in the second-longest execution path depends from the second-longest execution path with the longest execution time among the second-model execution paths, and summarize each second-path hydrological model and the second upper-layer hydrological model on which it depends to obtain a second execution list;

[0023] The remaining hydrological models among all the remaining hydrological models except the remaining hydrological models in the second execution list are aggregated to obtain a third execution list.

[0024] By adopting the above technical solution, the second longest execution path after the longest execution path is determined, and the second path hydrological model in the second longest execution path and the second upper-level hydrological model it depends on are summarized to obtain a second execution list. Therefore, under the premise of giving priority to the execution of the longest execution path, the priority of the second longest execution path is improved, so that in the execution of the hydrological prediction scheme, more complex execution paths are executed preferentially, which helps to shorten the execution time of the hydrological prediction scheme.

[0025] Optionally, after determining the second execution list and the third execution list based on the remaining hydrological models, the method further includes:

[0026] Prioritize each hydrological model to be scheduled in the third execution list according to the corresponding execution level to obtain a sorted execution list, wherein the smaller the execution level, the higher the corresponding priority ranking;

[0027] Determine whether there is a target hydrological model with the same execution level in the sorted execution list;

[0028] If so, prioritize the target hydrological models in the sorted execution list according to the corresponding model execution time to obtain a final execution list. The longer the model execution time, the higher the corresponding priority ranking;

[0029] The step of searching the first execution list, the second execution list, and the third execution list in sequence according to the search priority to form a model execution sequence specifically includes:

[0030] According to the search priority, the hydrological model to be scheduled is searched from the first execution list, the second execution list and the final execution list in turn to form a model execution sequence.

[0031] By adopting the above technical solution, a sorted execution list is obtained, so that when searching for the hydrological model to be scheduled from the third execution list, the hydrological model to be scheduled with a small execution level is preferentially searched, so as to facilitate the execution of the model path downward; if there are target hydrological models with the same execution level in the sorted execution list, in order to further distinguish the priority sorting, the priority is sorted according to the corresponding model execution time. The longer the model execution time, the higher the corresponding priority ranking. Finally, the final execution list is obtained, so that the hydrological model to be scheduled with a larger model execution time is preferentially searched from the final execution list, thereby shortening the execution time of the hydrological prediction scheme.

[0032] Optionally, searching for the hydrological models to be scheduled from the first execution list, the second execution list, and the third execution list in sequence according to the search priority to form a model execution sequence, and scheduling the hydrological models to be scheduled in the model execution sequence in sequence, specifically includes:

[0033] According to the search priority, searching the first execution list, the second execution list, and the third execution list in turn for the hydrological model requiring scheduling with a preset optimal scheduling quantity;

[0034] Aggregating the hydrological models that need to be dispatched to obtain a model execution sequence, and sequentially dispatching the hydrological models that need to be dispatched in the model execution sequence;

[0035] Repeat the steps of searching for a preset optimal scheduling quantity of hydrological models to be scheduled from the first execution list, the second execution list, and the third execution list in turn according to the search priority until all the hydrological models to be scheduled are traversed.

[0036] By adopting the above technical scheme, each time the model execution sequence is determined, the search priority from the first execution list to the second execution list and then to the third execution list will be followed, so that each first path hydrological model in the longest execution path with the longest execution time and the first upper-level hydrological model it depends on can be executed first, thereby achieving the longest execution path with the longest calculation time and complex execution path being executed first, thereby better avoiding long invalid waiting times for other simple execution paths with short calculation time, which helps to shorten the execution time of the hydrological prediction scheme.

[0037] Optionally, searching for the hydrological models requiring scheduling with a preset optimal scheduling quantity from the first execution list, the second execution list, and the third execution list in sequence according to the search priority specifically includes:

[0038] According to the search priority, searching the first hydrological model with the smallest current execution level from the first execution list, the second execution list, and the third execution list in turn and determining it as the hydrological model to be scheduled;

[0039] If the total number of the hydrological models that need to be scheduled is less than the preset optimal scheduling number, the second hydrological model with the smallest current execution level is searched from the third execution list and determined as the hydrological model that needs to be scheduled, until the total number of the hydrological models that need to be scheduled is equal to the preset optimal scheduling number.

[0040] By adopting the above technical solution, if the total number of hydrological models that need to be scheduled is less than the preset optimal scheduling number, it means that the first hydrological model found from the three execution lists has not reached the optimal scheduling number this time, then continue to find the second hydrological model with the smallest current execution level from the third execution list and determine it as the hydrological model that needs to be scheduled, until the total number of hydrological models that need to be scheduled is equal to the preset optimal scheduling number, so that the currently scheduled hydrological model that needs to be scheduled can be executed on the longest execution path first, while also taking into account the synchronous execution of other execution paths, which helps to shorten the execution time of the hydrological prediction plan.

[0041] In a second aspect of the present application, a hydrological model scheduling device is provided, which specifically includes:

[0042] An information acquisition module, used to obtain model identifications and model topological relationship information of multiple hydrological models to be scheduled, and determine the model execution duration of each of the hydrological models to be scheduled, wherein the hydrological models to be scheduled are hydrological models corresponding to various regions in a large-scale river basin, and the model topological relationship information includes the execution level of each of the hydrological models to be scheduled, and the smaller the execution level, the closer the area to which the corresponding hydrological model to be scheduled belongs is to the most upstream of the large-scale river basin;

[0043] A directed determination module, used to determine a directed acyclic graph based on the model identifier of each hydrological model to be scheduled and the model topological relationship information, and add the execution time of each model as the weight of the corresponding hydrological model to be scheduled to the directed acyclic graph to obtain a model directed graph;

[0044] A first execution module is used to determine, from the model directed graph, a first model execution path starting from each first initial hydrological model in all the hydrological models to be scheduled, determine the longest execution path with the longest execution time from each of the first model execution paths, and summarize each first path hydrological model in the longest execution path and the first upper-layer hydrological model on which it depends to obtain a first execution list, wherein the execution level of the first initial hydrological model is the smallest among all the hydrological models to be scheduled, the execution level of the first upper-layer hydrological model is smaller than the execution level of the corresponding first path hydrological model, and the sum of the weights of each of the first path hydrological models in the longest execution path is the largest;

[0045] A second execution module, used for removing the hydrological models to be scheduled in the first execution list from all the hydrological models to be scheduled, obtaining remaining hydrological models, and determining a second execution list and a third execution list based on the remaining hydrological models;

[0046] A model scheduling module is used to search for the hydrological models to be scheduled from the first execution list, the second execution list and the third execution list in turn according to the search priority and form a model execution sequence, and to schedule the hydrological models to be scheduled in the model execution sequence in turn, the search priority of the first execution list is higher than the search priority of the second execution list, and the search priority of the second execution list is higher than the search priority of the third execution list.

[0047] By adopting the above technical solution, the information acquisition module obtains the model identification, model topological relationship information and model execution time of the hydrological model to be scheduled, the directed determination module determines the model directed graph corresponding to the hydrological model to be scheduled, and then the first execution module determines the first execution list from each hydrological model to be scheduled, and then the second execution module determines the second execution list and the third execution list based on the remaining hydrological models. Finally, the model scheduling module searches for the hydrological models to be scheduled from the first execution list, the second execution list and the third execution list in turn and forms a model execution sequence, so as to schedule the model according to the model execution sequence.

[0048] In a third aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is loaded and executed by a processor, the method steps described in any one of the first aspects are performed.

[0049] In a fourth aspect of the present application, an electronic device is provided, specifically comprising:

[0050] A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the processor is used to load and execute the computer program stored in the memory so that the electronic device performs the method as described in any one of the first aspects.

[0051] In summary, the present application includes at least one of the following beneficial technical effects: determining a model directed graph, thereby facilitating the subsequent selection of various model execution paths. Then determine the longest execution path with the longest execution time and the most complexity, and further, summarize the first path hydrological models in the longest execution path and the first upper-level hydrological models on which they depend, and finally obtain the first execution list with the highest search priority, so that when searching for the hydrological model to be scheduled for scheduling from the first execution list, the second execution list, and the third execution list, priority is given to searching from the first execution list, so that the upper-level hydrological model on which the first path hydrological model in the complex longest execution path depends can be executed first, and then the complex longest execution path can be executed first, thereby better avoiding the long invalid waiting time of the simple execution path with short calculation time, which helps to shorten the execution time of the hydrological prediction scheme. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a flow chart of a hydrological model scheduling method provided in an embodiment of the present application;

[0053] Figure 2 This is a schematic diagram of correlation analysis between various influencing factors and model execution time provided in an embodiment of the present application;

[0054] Figure 3 It is an example diagram of a directed acyclic graph of each hydrological model to be scheduled provided in an embodiment of the present application;

[0055] Figure 4 It is an example diagram of a model acyclic graph of each hydrological model to be scheduled provided in an embodiment of the present application;

[0056] Figure 5 This is a schematic diagram of the execution time of a single hydrological model to be scheduled under 1 core and 2 cores provided in an embodiment of the present application;

[0057] Figure 6 It is a flow chart of another hydrological model scheduling method provided in an embodiment of the present application;

[0058] Figure 7 It is a structural schematic diagram of a hydrological model scheduling device provided in an embodiment of the present application;

[0059] Figure 8 It is a structural schematic diagram of another hydrological model scheduling device provided in an embodiment of the present application.

[0060] Explanation of the accompanying drawings: 11. Information acquisition module; 12. Directed determination module; 13. First execution module; 14. Second execution module; 15. Model scheduling module; 16. List sorting module. DETAILED DESCRIPTION

[0061] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.

[0062] In the description of the embodiments of the present application, words such as "illustrative", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "illustrative", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "illustrative", "for example" or "for example" is intended to present related concepts in a concrete way.

[0063] In the description of the embodiments of the present application, the term "and / or" is only a kind of association relationship describing the associated objects, indicating that there may be three kinds of relationships, for example, A and / or B, which can represent: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.

[0064] See also Figure 1 The present application embodiment discloses a flow chart of a hydrological model scheduling method, which can be implemented by a computer program or run on a hydrological model scheduling device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application, specifically including:

[0065] S101: Obtain model identifiers and model topological relationship information of multiple hydrological models to be scheduled, and determine the model execution time of each hydrological model to be scheduled.

[0066] Specifically, the hydrological model to be scheduled is the hydrological model corresponding to each area in the large-scale river basin. This is mainly because the hydrological environment of each area in the large-scale river basin may be different. Therefore, it is necessary to establish a hydrological model for the corresponding area in a targeted manner, and each hydrological model to be scheduled participates in the hydrological prediction of the entire large-scale river basin. In an embodiment of the present application, the hydrological prediction can be a flood prediction, and the hydrological model to be scheduled can be a variable infiltration capacity (VLC) hydrological model, which is a large-scale distributed hydrological model used to simulate the hydrological process of a large river basin. The model takes into account the energy balance and water balance between land and air, and can flexibly handle various complex application conditions. It also makes up for the shortcomings of traditional hydrological models in describing energy processes. In other embodiments, the hydrological model to be scheduled can also be a soil and water integrated model (SWIM) model.

[0067] The model topological relationship information is the spatial connection and adjacency relationship between each hydrological model to be scheduled, which can be understood as the adjacency or upstream and downstream relationship of the areas corresponding to each hydrological model to be scheduled, etc. The model topological relationship information includes the execution level of each hydrological model to be scheduled. The execution level is mainly based on the location level of the hydrological model to be scheduled after sorting the model topological relationship information. The smaller the execution level, the closer the area to which the corresponding hydrological model to be scheduled belongs is to the upstream of the large-scale basin. For example, if the execution level of the hydrological model A to be scheduled is 1 at the minimum, it means that it corresponds to the upstream, and there is no other pre-placed hydrological model before it, that is, there is no upstream model. If there is no corresponding hydrological model in the downstream area corresponding to the hydrological model B to be scheduled, that is, when there is no downstream model, the execution level of the hydrological model B to be scheduled is the largest.

[0068] In addition, the model execution time is the overall model operation time or calculation time when a single hydrological model to be scheduled performs hydrological prediction. The model identifier refers to the unique identifier of a single hydrological model to be scheduled and the number, name or other identifier that distinguishes different hydrological models.

[0069] A feasible way to obtain model identifiers of multiple hydrological models to be scheduled is: input to the server through the user's terminal. The server is the executor of a hydrological model scheduling method disclosed in an embodiment of the present application. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. The terminal can be a tablet computer or a personal computer. The server and the terminal can be directly or indirectly connected via a wired or wireless network. In addition, a feasible way to obtain model topological relationship information is: based on the terrain, river network, rainfall distribution and other information of the large-scale watershed, the large-scale watershed is divided into regions, and further, the spatial connection and adjacency relationship between each region are analyzed through the Geographic Information System (GIS) tool, which can be finally determined.

[0070] Further, the model execution time of each hydrological model to be scheduled is determined. In one achievable implementation: based on the model topological relationship information, the execution level of each hydrological model to be scheduled is determined;

[0071] The number of river sections and the predicted duration of hydrological conditions corresponding to each hydrological model to be scheduled are obtained, and the execution level, number of river sections and predicted duration of hydrological conditions corresponding to each hydrological model to be scheduled are substituted into the preset execution duration calculation formula to obtain the corresponding model execution time.

[0072] Specifically, the number of river sections, also known as the number of basic river sections, is the number of parts with specific natural attributes and hydrological characteristics in the basin. River sections are often used as the basic unit for constructing hydrological models to describe information such as water flow and water level in the corresponding river sections. After the model topological relationship information is determined, the execution level of each hydrological model to be scheduled can be directly extracted from it. When the hydrological models to be scheduled at different execution levels are executed, the CPU occupancy of the server is different, resulting in differences in the execution time of the corresponding models. At the same time, the corresponding number of river sections is extracted from the model parameters of each hydrological model to be scheduled, where the impact of the number of river sections on the execution time of the hydrological model to be scheduled is mainly reflected in the storage time of the predicted data of the hydrological model to be scheduled. Furthermore, the user inputs the hydrological condition prediction time of each hydrological model to be scheduled through the terminal, and the server side obtains the hydrological condition prediction time. Among them, the hydrological condition prediction time refers to the prediction time that the user needs to perform hydrological prediction. For example, if the user wants to predict the rainfall in a large-scale basin in the next thirty days, the hydrological condition prediction time corresponding to a single model to be scheduled is thirty days. The longer the hydrological condition prediction time is, the longer the time required for the scheduling model to run will be.

[0073] Since the execution level, number of river sections and hydrological condition prediction time are all related to the model execution time of the hydrological model to be scheduled, the correlation analysis can be found in Figure 2 , it can be seen from the figure that the number of river sections has a greater impact on the model execution time, with a correlation of 0.75, the correlation of the hydrological condition prediction time is 0.34, and the correlation of the execution level is 0.03. Furthermore, under the comprehensive consideration of saving computing resources and ensuring the interpretability of the model, the multivariate linear regression model is selected as the basic model of the model execution time. Among them, the core idea of ​​the multivariate linear regression model is to find the mathematical expression that best represents the relationship between the independent variable and the dependent variable, which is mainly achieved through the least squares method. Finally, the mathematical expression of the independent variables (execution level, number of river sections and hydrological condition prediction time) and the dependent variable (model execution time) is determined, that is, the execution time calculation formula. The execution time calculation formula is as follows:

[0074] y=0.0279*x1+0.0436*x2+0.1105*x3+0.6137;

[0075] In the formula, y represents the model execution time corresponding to each hydrological model to be scheduled, x1 represents the execution level corresponding to each hydrological model to be scheduled, x2 represents the number of river sections corresponding to each hydrological model to be scheduled, and x3 represents the hydrological condition prediction time corresponding to each hydrological model to be scheduled. Among them, 0.6137 is the bias term, which is an important parameter of linear regression. Through the bias term, linear regression can have a degree of freedom to move up and down on the y-axis, so as to better adapt to the distribution of data.

[0076] Furthermore, the execution level, number of river sections and hydrological condition prediction time corresponding to each hydrological model to be called are substituted into the execution time calculation formula to obtain the corresponding model execution time.

[0077] S102: Determine a directed acyclic graph based on the model identification and model topological relationship information of each hydrological model to be scheduled, and add the execution time of each model as the weight of the corresponding hydrological model to be scheduled to the directed acyclic graph to obtain a model directed graph.

[0078] Specifically, a directed acyclic graph (DAG) is a special graph structure, which is characterized by the fact that the edges in the graph are directional and there is no loop that starts from a vertex and goes back to the vertex through several edges. In the embodiment of the present application, the directed acyclic graph containing each model identifier can be determined through the preset networkx library according to the model identifier of each hydrological model to be scheduled and the model topological relationship information representing the adjacency relationship between each hydrological model to be scheduled. For details, please refer to Figure 3 Furthermore, the model execution time of each hydrological model to be scheduled is taken as the corresponding weight and added to the directed acyclic graph, and finally a model directed graph is obtained, thereby quantifying the execution time of each hydrological model to be scheduled represented in the directed acyclic graph.

[0079] S103: Determine the first model execution path starting from each first initial hydrological model in all the hydrological models to be scheduled from the model directed graph, determine the longest execution path with the longest execution time from each first model execution path, and summarize each first path hydrological model in the longest execution path and the first upper-level hydrological model on which it depends to obtain a first execution list.

[0080] Specifically, the first initial hydrological model is the hydrological model to be scheduled with the smallest execution level among all the hydrological models to be scheduled, that is, it is located at the top of the model directed graph. After the model directed graph is determined, each first initial hydrological model is determined from the model directed graph as the starting point for execution, and the corresponding first model execution path is determined. Each first model execution path includes hydrological models to be scheduled at different execution levels, which are executed layer by layer in the order of execution level from small to large, or in the order of upstream to downstream of the corresponding area, to form an execution path, wherein each hydrological model to be scheduled can only start execution after the execution of the upper layer of hydrological model to be scheduled on which it depends is completed. Further, the sum of the weights corresponding to each hydrological model to be scheduled in each first model execution path is calculated, and the longest execution path with the largest sum of weights, that is, the longest execution time and the most complex execution path is selected, and each hydrological model to be scheduled in the longest execution path is determined as the first path hydrological model.

[0081] Furthermore, the upper-layer hydrological model to be scheduled that each first-path hydrological model depends on is found from the model directed graph, and is determined to be the first upper-layer hydrological model to be dependent on, that is, the hydrological model to be scheduled whose execution level is smaller than the corresponding first-path hydrological model. Further, each first-path hydrological model in the longest execution path and the first upper-layer hydrological model on which it depends are summarized to obtain a first execution list. It should be noted that in an embodiment of the present application, in the model directed graph, the first upper-layer hydrological model is all the hydrological models to be scheduled in the upper two layers of the corresponding first-path hydrological model. In other embodiments, it may also be all the hydrological models to be scheduled in the upper three layers of the corresponding first-path hydrological model. For example, if the execution level of the first-path hydrological model C is 3, then the corresponding first upper-layer hydrological models are the upper two layers of the hydrological models to be scheduled that the execution of the first-path hydrological model C depends on, and have execution levels of 2 and 1, respectively. Figure 4 shown.

[0082] S104: Eliminate the hydrological models to be scheduled in the first execution list from all the hydrological models to be scheduled to obtain remaining hydrological models, and determine the second execution list and the third execution list based on the remaining hydrological models.

[0083] In an achievable implementation, a second initial hydrological model is determined from each remaining hydrological model, and a second model execution path starting from each second initial hydrological model is determined from the model directed graph;

[0084] Determine the second upper-layer hydrological model on which each second-path hydrological model in the second-longest execution path depends from the second-model execution path with the longest execution time, and summarize each second-path hydrological model and the second upper-layer hydrological model on which it depends to obtain a second execution list;

[0085] The remaining hydrological models except the remaining hydrological models in the second execution list are aggregated to obtain a third execution list.

[0086] Specifically, after the first execution list is determined, each hydrological model to be scheduled in the first execution list is eliminated from all the hydrological models to be scheduled to obtain the remaining hydrological models. Then, based on the model directed graph, the second initial hydrological model is determined from each remaining hydrological model, wherein the execution level of the second initial hydrological model is the smallest among all the remaining hydrological models. Further, taking each second initial hydrological model as the starting point of execution, the corresponding second model execution path is determined, and then the sum of the weights of each hydrological model to be scheduled in each second model execution path is calculated, and the second longest execution path with the largest sum of weights, i.e., the longest execution time, is selected, and each hydrological model to be scheduled in the second longest execution path is determined as the second path hydrological model. Further, the upper-layer hydrological model to be scheduled on which each second path hydrological model depends is found from the model directed graph, and is determined as the second upper-layer hydrological model on which it depends. Finally, each second path hydrological model and the second upper-layer hydrological model on which it depends are summarized to obtain the second execution list. The second upper layer hydrological model is all the hydrological models to be scheduled in the two upper layers of the corresponding second path hydrological model. In other embodiments, it may also be all the hydrological models to be scheduled in the three upper layers of the corresponding second path hydrological model.

[0087] Furthermore, the remaining hydrological models after excluding the remaining hydrological models in the second execution list from all the remaining hydrological models are summarized to obtain a third execution list.

[0088] S105: According to the search priority, search for the hydrological models to be scheduled from the first execution list, the second execution list, and the third execution list in turn to form a model execution sequence, and schedule the hydrological models to be scheduled in the model execution sequence in turn.

[0089] Specifically, the search priority refers to searching for the hydrological model to be scheduled that is currently required to be scheduled, that is, the priority of the hydrological model to be scheduled. The larger the search priority, the higher the corresponding search order. The priority of searching for the hydrological model to be scheduled from each hydrological model to be scheduled in the first execution list is prior to the priority of searching from the second execution list, and the priority of searching from the second execution list is prior to the priority of searching from the third execution list. In other words, the search priority of the first execution list is higher than the search priority of the second execution list, and the search priority of the second execution list is higher than the search priority of the third execution list. As a result, each first path hydrological model in the longest execution path with the longest execution time and the first upper-level hydrological model it depends on can be executed first, thereby realizing that the longest execution path with the longest calculation time and complex execution path can be executed first, thereby better avoiding the simple execution path with a short calculation time (a hydrological model with a higher execution level in common with the longest execution path) from having a long period of invalid waiting, which helps to shorten the execution time of the hydrological prediction scheme.

[0090] Furthermore, since a single hydrological model to be scheduled is configured with 1 core, compared with a single hydrological model to be scheduled with 2 cores, where 1 core refers to the number of CPU cores being 1. The model calculation speed is faster, for details, see Figure 5 Therefore, in the embodiment of the present application, the server can be an 8-core server, and the preset optimal scheduling number can be further determined to be 8, that is, the optimal number of hydrological models scheduled each time is 8, which makes the overall execution time shorter and the model calculation efficiency higher. In other embodiments, the server can also be a 4-core server, and the corresponding preset optimal scheduling number is 4.

[0091] Further, according to the search priority, the hydrological model that needs to be scheduled with a preset optimal scheduling quantity is searched from the first execution list, the second execution list, and the third execution list in turn. The specific process is: the first hydrological model with the minimum current execution level is searched from the first execution list, the second execution list, and the third execution list in turn and determined as the hydrological model that needs to be scheduled,

[0092] For example, if it is the first search, the current minimum execution level in the first execution list is 1. If it is not the first search, and the hydrological model to be scheduled with execution level 1 in the first execution list has been searched, then the current minimum execution level is 2.

[0093] If the total number of hydrological models that need to be scheduled is less than the preset optimal scheduling number, it means that the first hydrological model found from the three execution lists has not reached the optimal scheduling number this time, then continue to find the second hydrological model with the smallest current execution level from the third execution list and determine it as the hydrological model that needs to be scheduled, until the total number of hydrological models that need to be scheduled is equal to the preset optimal scheduling number. Further, the various hydrological models that need to be scheduled found this time are summarized to obtain a model execution sequence, and each hydrological model that needs to be scheduled in the model execution sequence is scheduled for use. In other embodiments, when searching for a hydrological model that needs to be scheduled from the hydrological models to be scheduled that have not been scheduled in the third execution list, priority is given to searching for the hydrological model to be scheduled with the longest model execution time and the lowest execution level. In other words, the model to be scheduled in the third execution list has the longest current model execution time and the lowest execution level.

[0094] Then, the steps of searching for the preset optimal scheduling quantity of the hydrological models to be scheduled from the first execution list, the second execution list and the third execution list are repeated according to the search priority until all the hydrological models to be scheduled are traversed, and finally a new round of model execution sequence is obtained, and a new round of model scheduling is performed, and so on, until all the hydrological models to be scheduled are traversed and all the hydrological models to be scheduled are scheduled.

[0095] See also Figure 6The present application embodiment discloses a flow chart of another hydrological model scheduling method, which can be implemented by a computer program or run on a hydrological model scheduling device based on the von Neumann system. The computer program can be integrated into an application or run as an independent tool application, specifically including:

[0096] S201: Obtain model identifiers and model topological relationship information of multiple hydrological models to be scheduled, and determine the model execution time of each hydrological model to be scheduled.

[0097] S202: Determine a directed acyclic graph based on the model identification and model topological relationship information of each hydrological model to be scheduled, and add the execution time of each model as the weight of the corresponding hydrological model to be scheduled to the directed acyclic graph to obtain a model directed graph.

[0098] S203: Determine the first model execution path starting from each first initial hydrological model in all the hydrological models to be scheduled from the model directed graph, determine the longest execution path with the longest execution time from each first model execution path, and summarize each first path hydrological model in the longest execution path and the first upper-level hydrological model on which it depends to obtain a first execution list.

[0099] S204: Eliminate the hydrological models to be scheduled in the first execution list from all the hydrological models to be scheduled to obtain remaining hydrological models, and determine the second execution list and the third execution list based on the remaining hydrological models.

[0100] For details, please refer to steps S101-S104, which will not be described in detail here.

[0101] S205: Prioritize each to-be-scheduled hydrological model in the third execution list according to the corresponding execution level to obtain a sorted execution list. The smaller the execution level, the higher the corresponding priority ranking.

[0102] S206: Determine whether there is a target hydrological model with the same execution level in the sorted execution list.

[0103] S207: If so, prioritize each target hydrological model in the sorted execution list according to the corresponding model execution time to obtain a final execution list. The longer the model execution time, the higher the corresponding priority ranking.

[0104] S208: According to the search priority, search for the hydrological models to be scheduled from the first execution list, the second execution list and the final execution list in turn to form a model execution sequence, and schedule the hydrological models to be scheduled in the model execution sequence in turn.

[0105] Specifically, each hydrological model to be scheduled in the third execution list is prioritized to obtain a sorted execution list. The smaller the execution level of the hydrological model to be scheduled, the higher the corresponding priority ranking is. When searching for the hydrological model to be scheduled from the third execution list, the hydrological model to be scheduled with a small execution level is prioritized to facilitate the execution of the model path downward. Furthermore, if there are target hydrological models with the same execution level in the sorted execution list, each target hydrological model is prioritized according to the corresponding model execution time. The longer the model execution time is, the higher the corresponding priority ranking is. Finally, the final execution list is obtained, so that the hydrological model to be scheduled with a longer model execution time is prioritized from the final execution list, thereby shortening the execution time of the hydrological prediction scheme. Furthermore, according to the search priority, the hydrological models to be scheduled are searched from the first execution list, the second execution list, and the final execution list in turn to form a model execution sequence. For details, please refer to step S105, which will not be repeated here.

[0106] The implementation principle of a hydrological model scheduling method in an embodiment of the present application is: determine a directed graph of the model, so as to facilitate the subsequent selection of various model execution paths. Then determine the longest execution path with the longest execution time and the most complexity, and further, summarize the first path hydrological models in the longest execution path and the first upper-level hydrological models on which they depend, and finally obtain the first execution list with the highest search priority, so that when searching for the hydrological model to be scheduled for scheduling from the first execution list, the second execution list, and the third execution list, priority is given to searching from the first execution list, so that the upper-level hydrological model on which the first path hydrological model in the complex longest execution path depends can be executed first, and then the complex longest execution path can be executed first, so as to better avoid the long invalid waiting time of the simple execution path with short calculation time, which helps to shorten the execution time of the hydrological prediction scheme.

[0107] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0108] See also Figure 7 , is a schematic diagram of the structure of a hydrological model scheduling device provided in an embodiment of the present application. The hydrological model scheduling device can be implemented as all or part of the device through software, hardware or a combination of both. The device includes an information acquisition module 11, a directional determination module 12, a first execution module 13, a second execution module 14 and a model scheduling module 15.

[0109] The information acquisition module 11 is used to obtain the model identification and model topological relationship information of multiple hydrological models to be scheduled, and determine the model execution time of each hydrological model to be scheduled. The hydrological model to be scheduled is the hydrological model corresponding to each area in the large-scale basin. The model topological relationship information includes the execution level of each hydrological model to be scheduled. The smaller the execution level, the closer the area to which the corresponding hydrological model to be scheduled belongs is to the uppermost part of the large-scale basin.

[0110] A directed determination module 12 is used to determine a directed acyclic graph based on the model identification and model topological relationship information of each hydrological model to be scheduled, and add the execution time of each model as the weight of the corresponding hydrological model to be scheduled to the directed acyclic graph to obtain a model directed graph;

[0111] The first execution module 13 is used to determine the first model execution path starting from each first initial hydrological model in all the hydrological models to be scheduled from the model directed graph, determine the longest execution path with the longest execution time from each first model execution path, and summarize each first path hydrological model in the longest execution path and the first upper-layer hydrological model on which it depends to obtain a first execution list, the execution level of the first initial hydrological model is the smallest among all the hydrological models to be scheduled, the execution level of the first upper-layer hydrological model is smaller than the execution level of the corresponding first path hydrological model, and the sum of the weights of each first path hydrological model in the longest execution path is the largest;

[0112] The second execution module 14 is used to remove the hydrological models to be scheduled in the first execution list from all the hydrological models to be scheduled, obtain the remaining hydrological models, and determine the second execution list and the third execution list based on the remaining hydrological models;

[0113] The model scheduling module 15 is used to search for the hydrological models to be scheduled from the first execution list, the second execution list and the third execution list in turn according to the search priority and form a model execution sequence, and schedule the hydrological models to be scheduled in the model execution sequence in turn. The search priority of the first execution list is higher than the search priority of the second execution list, and the search priority of the second execution list is higher than the search priority of the third execution list.

[0114] Optionally, the information acquisition module 11 is specifically used for:

[0115] Based on the model topology information, determine the execution level of each hydrological model to be scheduled;

[0116] The number of river sections and the predicted duration of hydrological conditions corresponding to each hydrological model to be scheduled are obtained, and the execution level, number of river sections and predicted duration of hydrological conditions corresponding to each hydrological model to be scheduled are substituted into the preset execution duration calculation formula to obtain the corresponding model execution time.

[0117] Optionally, the second execution module 14 is specifically configured to:

[0118] Determine a second initial hydrological model from each remaining hydrological model, and determine a second model execution path starting from each second initial hydrological model from a model directed graph, wherein the execution level of the second initial hydrological model is the smallest among all remaining hydrological models;

[0119] Determine the second upper-layer hydrological model on which each second-path hydrological model in the second-longest execution path depends from the second-model execution path with the longest execution time, and summarize each second-path hydrological model and the second upper-layer hydrological model on which it depends to obtain a second execution list;

[0120] The remaining hydrological models except the remaining hydrological models in the second execution list are aggregated to obtain a third execution list.

[0121] Optional, such as Figure 8 As shown, the device also includes a list sorting module 16, which is specifically used to:

[0122] Prioritize each hydrological model to be scheduled in the third execution list according to the corresponding execution level to obtain a sorted execution list, wherein the smaller the execution level, the higher the corresponding priority ranking;

[0123] Determine whether there is a target hydrological model with the same execution level in the sorted execution list;

[0124] If it exists, the target hydrological models in the sorted execution list are prioritized according to the corresponding model execution time to obtain the final execution list. The longer the model execution time, the higher the corresponding priority ranking.

[0125] Optionally, the model scheduling module 15 is specifically used for:

[0126] According to the search priority, searching for the hydrological model requiring scheduling with a preset optimal scheduling quantity from the first execution list, the second execution list, and the third execution list in turn;

[0127] The hydrological models that need to be dispatched are summarized to obtain a model execution sequence, and the hydrological models that need to be dispatched in the model execution sequence are dispatched in sequence;

[0128] Repeat the steps of searching for a preset optimal scheduling quantity of hydrological models to be scheduled from the first execution list, the second execution list, and the third execution list in turn according to the search priority until all the hydrological models to be scheduled are traversed.

[0129] Optionally, the model scheduling module 15 is further configured to:

[0130] According to the search priority, the first hydrological model with the smallest current execution level is searched from the first execution list, the second execution list, and the third execution list in turn, and is determined as the hydrological model to be scheduled;

[0131] If the total number of hydrological models that need to be scheduled is less than the preset optimal scheduling number, the second hydrological model with the smallest current execution level is searched from the third execution list and determined as the hydrological model that needs to be scheduled until the total number of hydrological models that need to be scheduled is equal to the preset optimal scheduling number.

[0132] Optionally, the model scheduling module 15 is further configured to:

[0133] According to the search priority, the hydrological model to be scheduled is searched from the first execution list, the second execution list and the final execution list in turn to form a model execution sequence.

[0134] It should be noted that the hydrological model scheduling device provided in the above embodiment only uses the division of the above functional modules as an example when executing the hydrological model scheduling method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the hydrological model scheduling device provided in the above embodiment and the hydrological model scheduling method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0135] An embodiment of the present application further discloses a computer-readable storage medium, and the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, a hydrological model scheduling method of the above embodiment is adopted.

[0136] Among them, the computer program can be stored in a computer-readable medium, the computer program includes computer program code, the computer program code can be in the form of source code, object code, executable file or certain middleware, etc. The computer-readable medium includes any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the computer-readable medium includes but is not limited to the above-mentioned components.

[0137] Among them, through this computer-readable storage medium, a hydrological model scheduling method of the above embodiment is stored in a computer-readable storage medium, and is loaded and executed on a processor to facilitate the storage and application of the above method.

[0138] An embodiment of the present application further discloses an electronic device, wherein a computer program is stored in a computer-readable storage medium, and when the computer program is loaded and executed by a processor, the above-mentioned hydrological model scheduling method is adopted.

[0139] The electronic device may be a desktop computer, a laptop computer, a cloud server or other electronic device, and the electronic device includes but is not limited to a processor and a memory. For example, the electronic device may also include input and output devices, a network access device, and a bus.

[0140] Among them, the processor can adopt a central processing unit (CPU). Of course, according to actual usage, other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. can also be adopted. The general-purpose processor can adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.

[0141] Among them, the memory can be an internal storage unit of the electronic device, such as a hard disk or memory of the electronic device, or it can be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital card (SD) or a flash memory card (FC) equipped on the electronic device. Moreover, the memory can also be a combination of an internal storage unit and an external storage device of the electronic device. The memory is used to store computer programs and other programs and data required by the electronic device. The memory can also be used to temporarily store data that has been output or is to be output, and this application does not impose any restrictions on this.

[0142] Among them, through this electronic device, a hydrological model scheduling method of the above embodiment is stored in the memory of the electronic device, and is loaded and executed on the processor of the electronic device for easy use.

[0143] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A hydrological model scheduling method, characterized in that: The method comprises: Obtain model identifiers and model topological relationship information of multiple hydrological models to be scheduled, and determine the model execution duration of each of the hydrological models to be scheduled, wherein the hydrological models to be scheduled are hydrological models corresponding to various regions in a large-scale river basin, and the model topological relationship information includes the execution level of each of the hydrological models to be scheduled, and the smaller the execution level, the closer the area to which the corresponding hydrological model to be scheduled belongs is to the most upstream of the large-scale river basin; Determine a directed acyclic graph based on the model identifier of each of the hydrological models to be scheduled and the model topological relationship information, and add the execution time of each model as the weight of the corresponding hydrological model to be scheduled to the directed acyclic graph to obtain a model directed graph; Determine the first model execution path starting from each first initial hydrological model in all the hydrological models to be scheduled from the model directed graph, determine the longest execution path with the longest execution time from each of the first model execution paths, and summarize each first path hydrological model in the longest execution path and the first upper-layer hydrological model on which it depends to obtain a first execution list, wherein the execution level of the first initial hydrological model is the smallest among all the hydrological models to be scheduled, the execution level of the first upper-layer hydrological model is smaller than the execution level of the corresponding first path hydrological model, and the sum of the weights of each of the first path hydrological models in the longest execution path is the largest; Eliminating the hydrological models to be scheduled in the first execution list from all the hydrological models to be scheduled to obtain remaining hydrological models, and determining a second execution list and a third execution list based on the remaining hydrological models; According to the search priority, the hydrological models to be scheduled are searched from the first execution list, the second execution list and the third execution list in turn to form a model execution sequence, and the hydrological models to be scheduled in the model execution sequence are scheduled in turn, the search priority of the first execution list is higher than the search priority of the second execution list, and the search priority of the second execution list is higher than the search priority of the third execution list; wherein, according to the search priority, the hydrological models to be scheduled with a preset optimal scheduling quantity are searched from the first execution list, the second execution list and the third execution list in turn; Aggregating the hydrological models that need to be dispatched to obtain a model execution sequence, and sequentially dispatching the hydrological models that need to be dispatched in the model execution sequence; Repeating the step of searching for a preset optimal scheduling quantity of hydrological models to be scheduled from the first execution list, the second execution list, and the third execution list in turn according to the search priority until all the hydrological models to be scheduled are traversed; searching for a preset optimal scheduling quantity of hydrological models to be scheduled from the first execution list, the second execution list, and the third execution list in turn according to the search priority specifically includes: According to the search priority, searching the first hydrological model with the smallest current execution level from the first execution list, the second execution list, and the third execution list in turn and determining it as the hydrological model to be scheduled; If the total number of the hydrological models that need to be scheduled is less than the preset optimal scheduling number, the second hydrological model with the smallest execution level at the current time is searched in the first execution list, the second execution list, and the third execution list in turn to determine it as the hydrological model that needs to be scheduled, until the total number of the hydrological models that need to be scheduled is equal to the preset optimal scheduling number; Among them, the hydrological models to be scheduled in the first execution list, the second execution list and the third execution list are prioritized according to the corresponding execution levels to obtain the corresponding prioritized execution list, and the smaller the execution level, the higher the corresponding priority ranking; Determine whether there is a target hydrological model with the same execution level in the sorted execution list; If so, prioritize the target hydrological models in the sorted execution list according to the corresponding model execution time to obtain a final execution list. The longer the model execution time, the higher the corresponding priority ranking. According to the search priority, search for the hydrological models to be scheduled from the first execution list, the second execution list, and the final execution list corresponding to the third execution list in turn to form a model execution sequence.

2. The hydrological model scheduling method according to claim 1, characterized in that: The determining of the model execution time of each of the hydrological models to be scheduled specifically includes: Based on the model topology relationship information, determining the execution level of each of the hydrological models to be scheduled; The number of river sections and the predicted duration of hydrological conditions corresponding to each of the hydrological models to be scheduled are obtained, and the execution level, number of river sections and predicted duration of hydrological conditions corresponding to each of the hydrological models to be scheduled are substituted into the preset execution duration calculation formula to obtain the corresponding model execution duration.

3. The hydrological model scheduling method according to claim 2, characterized in that: The execution time calculation formula is: y=0.0279*x1+0.0436*x2+0.1105*x3+0.6137; In the formula, y represents the model execution time corresponding to each of the hydrological models to be scheduled, x1 represents the execution level corresponding to each of the hydrological models to be scheduled, x2 represents the number of river sections corresponding to each of the hydrological models to be scheduled, and x3 represents the hydrological condition prediction time corresponding to each of the hydrological models to be scheduled.

4. The hydrological model scheduling method according to claim 1, characterized in that: The determining of the second execution list and the third execution list based on each of the remaining hydrological models specifically includes: Determine a second initial hydrological model from each of the remaining hydrological models, and determine a second model execution path starting from each of the second initial hydrological models from the model directed graph, wherein the execution level of the second initial hydrological model is the smallest among all the remaining hydrological models; Determine the second upper-layer hydrological model on which each second-path hydrological model in the second-longest execution path depends from the second-longest execution path with the longest execution time among the second-model execution paths, and summarize each second-path hydrological model and the second upper-layer hydrological model on which it depends to obtain a second execution list; The remaining hydrological models among all the remaining hydrological models except the remaining hydrological models in the second execution list are aggregated to obtain a third execution list.

5. A hydrological model scheduling device, used to implement the hydrological model scheduling method according to any one of claims 1 to 4, characterized in that: include: An information acquisition module (11) is used to acquire model identifiers and model topological relationship information of multiple hydrological models to be scheduled, and determine the model execution time of each of the hydrological models to be scheduled, wherein the hydrological models to be scheduled are hydrological models corresponding to various regions in a large-scale river basin, and the model topological relationship information includes the execution level of each of the hydrological models to be scheduled, and the smaller the execution level, the closer the region to which the corresponding hydrological model to be scheduled belongs is to the uppermost stream of the large-scale river basin; A directed determination module (12) is used to determine a directed acyclic graph based on the model identifier of each hydrological model to be scheduled and the model topological relationship information, and add the execution time of each model as the weight of the corresponding hydrological model to be scheduled to the directed acyclic graph to obtain a model directed graph; A first execution module (13) is used to determine, from the model directed graph, a first model execution path starting from each first initial hydrological model in all the hydrological models to be scheduled, determine a longest execution path with the longest execution time from each of the first model execution paths, and summarize each first path hydrological model in the longest execution path and the first upper-layer hydrological model on which it depends to obtain a first execution list, wherein the execution level of the first initial hydrological model is the smallest among all the hydrological models to be scheduled, the execution level of the first upper-layer hydrological model is smaller than the execution level of the corresponding first path hydrological model, and the sum of the weights of each of the first path hydrological models in the longest execution path is the largest; A second execution module (14) is used to remove the hydrological models to be scheduled in the first execution list from all the hydrological models to be scheduled, obtain remaining hydrological models, and determine a second execution list and a third execution list based on each of the remaining hydrological models; A model scheduling module (15) is used to search for the hydrological models to be scheduled from the first execution list, the second execution list and the third execution list in sequence according to the search priority and form a model execution sequence, and to schedule the hydrological models to be scheduled in the model execution sequence in sequence, wherein the search priority of the first execution list is higher than the search priority of the second execution list, and the search priority of the second execution list is higher than the search priority of the third execution list; wherein the hydrological models to be scheduled in the first execution list, the second execution list and the third execution list are prioritized according to the corresponding execution levels to obtain a corresponding prioritized execution list, wherein the smaller the execution level, the higher the corresponding priority ranking; Determine whether there is a target hydrological model with the same execution level in the sorted execution list; If so, prioritize the target hydrological models in the sorted execution list according to the corresponding model execution time to obtain a final execution list. The longer the model execution time, the higher the corresponding priority ranking. According to the search priority, search for the hydrological models to be scheduled from the first execution list, the second execution list, and the final execution list corresponding to the third execution list in turn to form a model execution sequence.

6. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, characterized in that: When the computer program is loaded and executed by a processor, the method according to any one of claims 1 to 4 is adopted.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: When the processor loads and executes the computer program, the method according to any one of claims 1 to 4 is adopted.

Citation Information

Patent Citations

  • Runoff production parallel task scheduling method based on a distributed hydrological model

    CN109767120A

  • Database scheduling method and device, computer equipment and storage medium

    CN110147270A

  • Task scheduling method and device, computer equipment and storage medium

    CN115729687A

  • Task scheduling method and device, electronic equipment and readable storage medium

    CN116185588A

  • Simulation system and method applied to scheduling system

    CN116560811A