Standardized water conservancy professional model packaging and operating method of Docker container technology

Through the standardization of the packaging and operation of professional water conservancy models in Docker container technology, the problem of lack of flexibility in the model construction process and poor cross-organization collaboration capabilities in the existing technology is solved, efficient model development and computing performance is achieved, and data integrity and consistency are ensured.

CN119940714AActive Publication Date: 2025-05-06GUANGZHOU CHINASOFT INFORMATION TECH

Patent Information

Application Number
CN202510003940.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-05-06
Estimated Expiration
2045-01-02

AI Technical Summary

Technical Problem

In the prior art, the development and application process of water conservancy professional models rely on the experience of experts and static rules, which leads to the lack of flexibility in the model construction process and is difficult to adapt to the multi-scene needs in the dynamic environment. At the same time, the cross-organization collaboration capabilities are poor, resulting in reduced efficiency and difficult to ensure data integrity and consistency.

Method used

The packaging and operation methods of the professional water conservancy model are standardized using Docker container technology. By collecting and analyzing various sets of data from the water conservancy model, a visual model knowledge graph is built. The packaging calculation unit is an independent Docker image, dynamically creates container instances, allocates computing resources, and monitors resource usage in real time, and dynamically optimizes the container scheduling process.

Benefits of technology

It improves the development efficiency and computing performance of the water conservancy model, realizes cross-platform deployment and multi-user collaboration, enhances the adaptability and expansion of the model, ensures the integrity and consistency of data, and reduces the efficiency reduction caused by deviation or one-sidedness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119940714A_ABST
    Figure CN119940714A_ABST
Patent Text Reader

Abstract

The invention discloses a standardized water conservancy professional model packaging and operating method of a Docker container technology, and belongs to the field of water conservancy project, and the packaging and operating method specifically comprises the following steps: Q1, collecting each group of data of a target water conservancy model, constructing a visual model knowledge graph, and analyzing a key calculation module and a data dependency relationship; according to the method, the cross-organization cooperation capability can be improved, the limitation caused by a data island in a traditional model is broken, the efficiency reduction caused by deviation or one-sidedness is avoided, the development cost of model packaging and operation is reduced, and technical support can be provided for large-scale hydraulic engineering deployment; according to the method, the integrity and consistency of data can be ensured, errors and uncertainty caused by data dispersion are reduced, the quality and accuracy of model output are improved, more intelligent result optimization is realized, and the adaptability and expansibility of the model are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of water conservancy projects, and in particular to a standardized water conservancy professional model encapsulation and operation method based on Docker container technology. Background Art

[0002] Water conservancy projects need to cope with more complex and changeable hydrological conditions, which puts higher requirements on the accuracy, computational efficiency and adaptability of water conservancy professional models. Traditional water conservancy models usually adopt a single-machine computing method, with fixed computing resources and limited scalability, which cannot meet the needs of the growth of modern hydrological data volume and the increase in computational complexity. At the same time, the development and application process of water conservancy models usually rely on the experience and static rules of experts, resulting in the lack of flexibility in the model construction process and difficulty in adapting to the needs of multiple scenarios in a dynamic environment. In recent years, the rapid development of cloud computing and cloud native technologies has provided new solutions for the construction, operation and management of water conservancy models. Docker container technology solves the problems of complex environmental dependence and poor portability in the operation of traditional software by uniformly encapsulating applications and their operating environments; Kubernetes, as a container orchestration tool, can realize dynamic allocation and automated management of computing resources, and provides strong support for parallel computing and load balancing of distributed tasks. The integration of these technologies can significantly improve the development efficiency and computing performance of water conservancy models, while realizing cross-platform deployment and multi-user collaboration; therefore, it is particularly important to invent a standardized water conservancy professional model encapsulation and operation method based on Docker container technology.

[0003] The existing standardized water conservancy professional model packaging and operation methods have poor cross-organizational collaboration capabilities and are easily reduced in efficiency due to deviations or one-sidedness, increasing the reduction in efficiency caused by deviations or one-sidedness; in addition, the existing standardized water conservancy professional model packaging and operation methods cannot ensure the integrity and consistency of the data, and the errors and uncertainties caused by data dispersion increase, reducing the quality and accuracy of the model output; for this reason, we propose a standardized water conservancy professional model packaging and operation method based on Docker container technology. Summary of the invention

[0004] The purpose of the present invention is to solve the defects in the prior art and propose a standardized water conservancy professional model encapsulation and operation method based on Docker container technology.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] A standardized water conservancy professional model packaging and operation method using Docker container technology, the specific steps of the packaging and operation method are as follows:

[0007] Q1. Collect data from each group of the target water conservancy model, build a visual model knowledge graph, and analyze key calculation modules and data dependencies;

[0008] Q2: Encapsulate the computing units of each water conservancy professional model into independent Docker images, and divide the computing units into different priorities to form an orderly computing task queue;

[0009] Q3. Dynamically create container instances, allocate computing resources required for model operation, monitor resource usage of each container in real time, and dynamically optimize the scheduling process of container instances;

[0010] Q4. According to the topological relationship of the task queue, the computing tasks are assigned to different computing nodes for parallel execution. During the parallel process, the task execution order is dynamically adjusted;

[0011] Q5. Set up automatic container restart and fault recovery mechanisms to handle abnormal or failed tasks, and collect and optimize the calculation results after the distributed tasks are completed;

[0012] Q6. Verify the rationality of the model calculation results, and continuously optimize the Docker image packaging, task queue division and scheduling strategy based on the model operation effect and user feedback.

[0013] As a further solution of the present invention, the specific steps of analyzing the key computing modules and data dependencies described in Q1 are as follows:

[0014] S1.1: Collect various basic data of the target hydraulic model from monitoring equipment, remote sensing data, historical records and expert knowledge, including topographic data, hydrological data, hydraulic parameters and engineering rules, and clean, remove duplicates and standardize the collected basic data;

[0015] S1.2: Establish a structured database based on the types and relationships of each group of processed basic data, extract the hydraulic engineering rules of the target hydraulic model, and establish the dependency relationship between data nodes based on the rules;

[0016] S1.3: Convert the organized data, rules and formulas into model knowledge graph nodes and edges, where nodes represent data, computing units or rules, and edges represent upstream and downstream topological relationships or data dependency relationships;

[0017] S1.4: Convert the model knowledge graph into an interactive graph through the Neo4j graph database, analyze the key computing modules in the graph, remove redundant data or irrelevant nodes in the graph based on the analysis results, and determine the computing priority of each computing module.

[0018] As a further solution of the present invention, the specific steps of encapsulating the computing units of each water conservancy professional model into an independent Docker image as described in Q2 are as follows:

[0019] S2.1: Analyze the nodes and edges in the model knowledge graph, extract the nodes representing the key calculations of the water conservancy model, decompose the algorithms of the calculation units corresponding to each node, clarify the input, processing logic and output, and write the core algorithm programs of each calculation unit of the water conservancy professional model based on various development languages ​​according to the analysis results;

[0020] S2.2: Determine the operating environment required for algorithm implementation, including programming language version, third-party libraries, and operating system, and use Docker tools to build Docker images, clearly defining all dependencies in the container environment configuration file;

[0021] S2.3: Encapsulate the algorithm code and its dependent environment, and then test the image's functions and performance locally. After the local test passes, push the built image to the container registry and add metadata tags to the image, marking the version number and functional module information.

[0022] As a further solution of the present invention, the specific steps of dividing the computing units into different priorities to form an ordered computing task queue as described in Q2 are as follows:

[0023] S3.1: Based on the information of nodes and edges in the model knowledge graph, a directed acyclic graph is constructed, and the adjacency matrix or adjacency list is used to represent the DAG structure. The in-degree of each node, that is, the number of nodes that depend on its output, is calculated, and then a set of nodes with an in-degree of 0 is initialized as the starting point of the topological sorting.

[0024] S3.2: Use the queue structure to record the nodes with current in-degree 0, take out the nodes from the queue in order, add them to the topological sort list, remove their outgoing edges, update the in-degree of the downstream nodes, if there is a downstream node whose in-degree becomes 0, add it to the queue, repeat the queue extraction until the queue is empty, and finally generate a hierarchical topological sort;

[0025] S3.3: Output the node set of each layer after topological sorting to represent the task groupings of different priorities. After the grouping is completed, collect the information of each participant and the DAG structure and task layering information managed by each participant. Then each participant generates the DAG topology locally, including computing unit nodes and dependency edges.

[0026] S3.4: Each participant calculates the importance of each dependency edge, updates its DAG topology and task priority information locally, and uses the gradient descent algorithm to optimize and adjust the parameters of its corresponding priority model. After the adjustment is completed, each participant uploads its locally optimized DAG model parameters to the central federated server;

[0027] S3.5: The server performs weighted average aggregation on the uploaded parameters and updates the global model parameters to generate more comprehensive DAG topology and priority information. Each participant downloads the aggregated global model parameters and re-updates its local DAG topology structure.

[0028] S3.6: Based on the globally optimized priority information, the hierarchy is re-divided according to the priority of the nodes, and the nodes with the highest priority are processed first. At the same time, the local update and global aggregation steps are repeated, and the DAG topology relationship and task layering strategy are gradually iterated and improved.

[0029] As a further solution of the present invention, the specific steps of the scheduling process of dynamically optimizing container instances described in Q3 are as follows:

[0030] S4.1: Collect resource usage data of Docker containers through monitoring tools or integrated monitoring platforms, associate the real-time monitored resource usage data with the current task allocation, form a task load matrix, and collect the current load of each node;

[0031] S4.2: With the goal of minimizing the load difference between nodes, set the objective function of the task allocation scheme, set the initial temperature and cooling rate, and randomly perturb the task allocation scheme at the current temperature to generate a new scheme, calculate the target value of the new scheme through the objective function, and compare the target value of the new scheme with the target value of the current scheme;

[0032] S4.3: If the target value of the new solution is lower than the current task allocation solution, the new solution is accepted and the original task allocation solution is replaced. Otherwise, the acceptance probability of the new solution is calculated, and based on the acceptance probability, it is decided whether to accept the new solution. The task allocation solution is updated repeatedly, and the temperature is gradually reduced based on the preset cooling rate.

[0033] S4.4: When the temperature reaches the set minimum value or the objective function converges to the preset range, the final task allocation plan is output, and according to the optimized task allocation plan, the Kubernetes API is called to dynamically adjust the Pod's allocation node.

[0034] As a further solution of the present invention, the specific steps of collecting and optimizing the calculation results after the distributed tasks are completed in Q5 are as follows:

[0035] S5.1: Collect the output data of each group of task calculations and integrate the calculation results into a unified model output format. According to the predefined rules of the model, perform basic data cleaning on the results. Then, express the overall output results of the model as points in the state space, and construct the objective function based on the various indicators of the economy, stability or accuracy of the water conservancy model;

[0036] S5.2: Set up the path search model in state space and pass Generate the corresponding decision path, and identify the control points corresponding to the key state points based on the calculation results. Each control point corresponds to an important decision point on the optimization path, where P(t) represents the control curve of the decision path, t represents the progress of the path, and n represents the total number of decision points. represents the kth order Bellstein basis function, C k represents the control point, indicating the key decision variable configuration in the path;

[0037] S5.3: According to the current state and objective function value, the path is optimized by adjusting the position of the control point. Through multiple iterations, the decision path is sampled multiple times, and the objective function value of each path point is calculated at the same time. The optimal path point is selected to generate the final output result. After that, the optimized result is post-processed to generate a water conservancy project scheduling plan.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] 1. The present invention constructs a directed acyclic graph according to the information of nodes and edges in the model knowledge graph, and uses an adjacency matrix or an adjacency list to represent the DAG structure. The queue structure is used to record the nodes with the current in-degree of 0, and the nodes are taken out of the queue in order, added to the topological sorting list, and their out-edges are removed. The in-degree of the downstream node is updated. If there is a downstream node whose in-degree becomes 0, it is added to the queue, and the queue extraction is repeated until the queue is empty. Finally, a hierarchical topological sorting is generated, and the node set of each layer after the topological sorting is output to represent the task grouping of different priorities. After the grouping is completed, the information of each participant and the DAG structure and task hierarchical information managed by each participant are collected. After that, each participant generates a DAG topology locally, including computing unit nodes and dependent edges. Each participant calculates the importance of each dependent edge, and updates its DAG topological relationship and task priority information locally. The gradient descent is used The algorithm optimizes and adjusts the parameters of its corresponding priority model. After the adjustment is completed, each participant uploads its locally optimized DAG model parameters to the central federal server. The server performs weighted average aggregation on the uploaded parameters and updates the global model parameters to generate a more comprehensive DAG topology relationship and priority information. Each participant downloads the aggregated global model parameters and re-updates its local DAG topology structure. Based on the globally optimized priority information and the node priority, the hierarchy is re-divided, and the nodes with the highest priority are processed first. At the same time, the local update and global aggregation steps are repeated, and the DAG topology relationship and task layering strategy are gradually iterated to improve the cross-organizational collaboration capabilities, break the limitations of traditional models caused by data silos, avoid efficiency reduction due to deviation or one-sidedness, reduce the development cost of model packaging and operation, and provide technical support for the deployment of large-scale water conservancy projects.

[0040] 2. The present invention collects each group of output data of the task calculation, and integrates the calculation results into a unified model output format. According to the predefined rules of the model, the basic data of the results are cleaned, and then the overall output results of the model are represented as points in the state space, and the objective function is constructed according to the various indicators of the economy, stability or accuracy of the water conservancy model. A path search model is set in the state space, and a corresponding decision path is generated. The control points corresponding to the key state points are identified based on the calculation results. Each control point corresponds to an important decision point on the optimization path. According to the current state and the objective function value, the position of the control point is adjusted to optimize the path. Through multiple iterations, the decision path is sampled multiple times, and the objective function value of each path point is calculated at the same time. The optimal path point is selected to generate the final output result. The optimized result is then post-processed to generate a water conservancy project scheduling plan, which can ensure the integrity and consistency of the data, reduce the error and uncertainty caused by data dispersion, improve the quality and accuracy of the model output, achieve more intelligent result optimization, and enhance the adaptability and expansibility of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0042] Figure 1 This is a flowchart of a standardized water conservancy professional model encapsulation and operation method based on Docker container technology proposed in the present invention. DETAILED DESCRIPTION

[0043] Example 1

[0044] Reference Figure 1 , a standardized water conservancy professional model packaging and operation method based on Docker container technology, the specific steps of the packaging and operation method are as follows:

[0045] Collect various groups of data of the target water conservancy model, build a visual model knowledge graph, and analyze key calculation modules and data dependencies.

[0046] Specifically, various groups of basic data of the target water conservancy model, including terrain data, hydrological data, hydraulic parameters and engineering rules, are collected from monitoring equipment, remote sensing data, historical records and expert knowledge, and each group of collected basic data is cleaned, deduplicated and standardized. A structured database is established according to the types and relationships of each group of processed basic data, and the water conservancy engineering rules of the target water conservancy model are extracted. At the same time, the dependency relationship between data nodes is established according to the rules, and the sorted data, rules and formulas are converted into the form of model knowledge graph nodes and edges, where nodes represent data, computing units or rules, and edges represent upstream and downstream topological relationships or data dependency relationships. The model knowledge graph is converted into an interactive graph through the Neo4j graph database, and the key computing modules in the graph are analyzed. According to the analysis results, redundant data or irrelevant nodes in the graph are removed, and the calculation priority of each computing module is determined.

[0047] The computing units of each water conservancy professional model are encapsulated into independent Docker images, and the computing units are divided into different priorities to form an orderly computing task queue.

[0048] Specifically, analyze the nodes and edges in the model knowledge graph, extract the nodes representing the key calculations of the water conservancy model, decompose the algorithms of the computing units corresponding to each node, clarify the input, processing logic and output, and based on the analysis results, determine the operating environment required for the algorithm implementation based on the core algorithm programs of each computing unit of the water conservancy professional model written in various development languages, including programming language version, third-party libraries and operating system, and use the Docker tool to build a Docker image. Clearly define all dependencies in the container environment configuration file, encapsulate the algorithm code and its dependent environment, and then test the functions and performance of the image locally. After the local test passes, push the built image to the container registry, and add metadata tags to the image to mark the version number and functional module information.

[0049] Specifically, a directed acyclic graph is constructed based on the information of nodes and edges in the model knowledge graph, and an adjacency matrix or adjacency list is used to represent the DAG structure. The in-degree of each node, that is, the number of nodes that depend on its output, is calculated. Then, a set of nodes with an in-degree of 0 is initialized as the starting point of topological sorting. The queue structure is used to record the nodes with the current in-degree of 0. Nodes are taken out of the queue in order, added to the topological sorting list, and their out-edges are removed. The in-degree of downstream nodes is updated. If the in-degree of a downstream node becomes 0, it is added to the queue. The queue extraction is repeated until the queue is empty. Finally, a hierarchical topological sorting is generated. The node set of each layer after topological sorting is output to represent the task grouping of different priorities. After the grouping is completed, the information of each participant and the DAG structure and task hierarchical information managed by each participant are collected. Then, each participant generates a DAG locally. Topology, including computing unit nodes and dependent edges. Each participant calculates the importance of each dependent edge and updates its DAG topological relationship and task priority information locally. The gradient descent algorithm is used to optimize and adjust the parameters of its corresponding priority model. After the adjustment is completed, each participant uploads its locally optimized DAG model parameters to the central federal server. The server performs weighted average aggregation on the uploaded parameters and updates the global model parameters to generate a more comprehensive DAG topological relationship and priority information. Each participant downloads the aggregated global model parameters and re-updates its local DAG topological structure. Based on the globally optimized priority information, the hierarchy is re-divided according to the priority of the nodes, and the nodes with the highest priority are processed first. At the same time, the local update and global aggregation steps are repeated to gradually iterate and improve the DAG topological relationship and task layering strategy.

[0050] Example 2

[0051] Reference Figure 1 , a standardized water conservancy professional model packaging and operation method based on Docker container technology, the specific steps of the packaging and operation method are as follows:

[0052] Dynamically create container instances, allocate computing resources required for model running, monitor resource usage of each container in real time, and dynamically optimize the scheduling process of container instances.

[0053] Specifically, the resource usage data of the Docker container is collected through a monitoring tool or an integrated monitoring platform, and the real-time monitored resource usage data is associated with the current task allocation situation to form a task load matrix, and the current load of each node is collected. The objective function of the task allocation scheme is set to minimize the load difference between nodes, and the initial temperature and cooling rate are set. The task allocation scheme is randomly perturbed at the current temperature to generate a new scheme, and the target value of the new scheme is calculated through the objective function. The target value of the new scheme is compared with the target value of the current scheme. If the target value of the new scheme is lower than the current task allocation scheme, the new scheme is accepted and the original task allocation scheme is replaced. Otherwise, the acceptance probability of the new scheme is calculated, and based on the acceptance probability, it is decided whether to accept the new scheme. The task allocation scheme is updated repeatedly, and the temperature is gradually reduced based on the preset cooling rate. When the temperature reaches the set minimum value or the objective function converges to a preset range, the final task allocation scheme is output, and according to the optimized task allocation scheme, the Kubernetes API is called to dynamically adjust the allocation nodes of the Pod.

[0054] According to the topological relationship of the task queue, the computing tasks are assigned to different computing nodes for parallel execution. During the parallel process, the task execution order is dynamically adjusted.

[0055] Set up container automatic restart and fault recovery mechanisms to handle abnormal or failed tasks, and collect and optimize the calculation results after distributed tasks are completed.

[0056] Specifically, collect each group of output data of the task calculation, and integrate the calculation results into a unified model output format. According to the predefined rules of the model, clean up the basic data of the results, and then represent the overall output results of the model as points in the state space. Construct the objective function according to the various indicators of the economy, stability or accuracy of the water conservancy model, set up a path search model in the state space, generate the corresponding decision path, and identify the control points corresponding to the key state points based on the calculation results. Each control point corresponds to an important decision point on the optimization path. According to the current state and the objective function value, the path is optimized by adjusting the position of the control point. Through multiple iterations, the decision path is sampled multiple times, and the objective function value of each path point is calculated at the same time. The optimal path point is selected to generate the final output result. Then, the optimized result is post-processed to generate a water conservancy project scheduling plan.

[0057] In this embodiment, the specific calculation formula of the decision path is as follows:

[0058]

[0059] In the formula, P(t) represents the control curve of the decision path, t represents the progress of the path, and n represents the total number of decision points. represents the kth order Bellstein basis function, Ck Represents the control point, which indicates the key decision variable configuration in the path.

[0060] Verify the rationality of the model calculation results, and continuously optimize Docker image packaging, task queue division, and scheduling strategies based on the model operation results and user feedback.

Claims

1. A standardized water conservancy professional model packaging and operation method based on Docker container technology, characterized in that: The specific steps of the encapsulation operation method are as follows: Q1. Collect data from each group of the target water conservancy model, build a visual model knowledge graph, and analyze key calculation modules and data dependencies; Q2: Encapsulate the computing units of each water conservancy professional model into independent Docker images, and divide the computing units into different priorities to form an orderly computing task queue; Q3. Dynamically create container instances, allocate computing resources required for model operation, monitor resource usage of each container in real time, and dynamically optimize the scheduling process of container instances; Q4. According to the topological relationship of the task queue, the computing tasks are assigned to different computing nodes for parallel execution. During the parallel process, the task execution order is dynamically adjusted; Q5. Set up automatic container restart and fault recovery mechanisms to handle abnormal or failed tasks, and collect and optimize the calculation results after the distributed tasks are completed; Q6. Verify the rationality of the model calculation results, and continuously optimize the Docker image packaging, task queue division and scheduling strategy based on the model operation effect and user feedback.

2. According to the method for encapsulating and operating a standardized water conservancy professional model using Docker container technology in claim 1, it is characterized in that: The specific steps for analyzing key computing modules and data dependencies described in Q1 are as follows: S1.1: Collect various basic data of the target hydraulic model from monitoring equipment, remote sensing data, historical records and expert knowledge, including topographic data, hydrological data, hydraulic parameters and engineering rules, and clean, remove duplicates and standardize the collected basic data; S1.2: Establish a structured database based on the types and relationships of each group of processed basic data, extract the hydraulic engineering rules of the target hydraulic model, and establish the dependency relationship between data nodes based on the rules; S1.3: Convert the organized data, rules and formulas into model knowledge graph nodes and edges, where nodes represent data, computing units or rules, and edges represent upstream and downstream topological relationships or data dependency relationships; S1.4: Convert the model knowledge graph into an interactive graph through the Neo4j graph database, analyze the key computing modules in the graph, remove redundant data or irrelevant nodes in the graph based on the analysis results, and determine the computing priority of each computing module.

3. According to the method for encapsulating and operating a standardized water conservancy professional model using Docker container technology in claim 2, it is characterized in that: The specific steps for encapsulating the computing units of each water conservancy professional model into an independent Docker image as described in Q2 are as follows: S2.1: Analyze the nodes and edges in the model knowledge graph, extract the nodes representing the key calculations of the water conservancy model, decompose the algorithms of the calculation units corresponding to each node, clarify the input, processing logic and output, and write the core algorithm programs of each calculation unit of the water conservancy professional model based on various development languages ​​according to the analysis results; S2.2: Determine the operating environment required for algorithm implementation, including programming language version, third-party libraries, and operating system, and use Docker tools to build Docker images, clearly defining all dependencies in the container environment configuration file; S2.3: Encapsulate the algorithm code and its dependent environment, and then test the image's functions and performance locally. After the local test passes, push the built image to the container registry and add metadata tags to the image, marking the version number and functional module information.

4. According to the method for encapsulating and operating a standardized water conservancy professional model using Docker container technology in claim 3, it is characterized in that: The specific steps for dividing the computing units into different priorities and forming an orderly computing task queue as described in Q2 are as follows: S3.1: Based on the information of nodes and edges in the model knowledge graph, a directed acyclic graph is constructed, and the adjacency matrix or adjacency list is used to represent the DAG structure. The in-degree of each node, that is, the number of nodes that depend on its output, is calculated, and then a set of nodes with an in-degree of 0 is initialized as the starting point of the topological sorting. S3.2: Use the queue structure to record the nodes with current in-degree 0, take out the nodes from the queue in order, add them to the topological sort list, remove their outgoing edges, update the in-degree of the downstream nodes, if there is a downstream node whose in-degree becomes 0, add it to the queue, repeat the queue extraction until the queue is empty, and finally generate a hierarchical topological sort; S3.3: Output the node set of each layer after topological sorting to represent the task groupings of different priorities. After the grouping is completed, collect the information of each participant and the DAG structure and task layering information managed by each participant. Then each participant generates the DAG topology locally, including computing unit nodes and dependency edges. S3.4: Each participant calculates the importance of each dependency edge, updates its DAG topology and task priority information locally, and uses the gradient descent algorithm to optimize and adjust the parameters of its corresponding priority model. After the adjustment is completed, each participant uploads its locally optimized DAG model parameters to the central federated server; S3.5: The server performs weighted average aggregation on the uploaded parameters and updates the global model parameters to generate more comprehensive DAG topology and priority information. Each participant downloads the aggregated global model parameters and re-updates its local DAG topology structure. S3.6: Based on the globally optimized priority information, the hierarchy is re-divided according to the priority of the nodes, and the nodes with the highest priority are processed first. At the same time, the local update and global aggregation steps are repeated, and the DAG topology relationship and task layering strategy are gradually iterated and improved.

5. According to the method for encapsulating and operating a standardized water conservancy professional model using Docker container technology in claim 4, it is characterized in that: The specific steps of the dynamic optimization container instance scheduling process described in Q3 are as follows: S4.1: Collect resource usage data of Docker containers through monitoring tools or integrated monitoring platforms, associate the real-time monitored resource usage data with the current task allocation, form a task load matrix, and collect the current load of each node; S4.2: With the goal of minimizing the load difference between nodes, set the objective function of the task allocation scheme, set the initial temperature and cooling rate, and randomly perturb the task allocation scheme at the current temperature to generate a new scheme, calculate the target value of the new scheme through the objective function, and compare the target value of the new scheme with the target value of the current scheme; S4.3: If the target value of the new solution is lower than the current task allocation solution, the new solution is accepted and the original task allocation solution is replaced. Otherwise, the acceptance probability of the new solution is calculated, and based on the acceptance probability, it is decided whether to accept the new solution. The task allocation solution is updated repeatedly, and the temperature is gradually reduced based on the preset cooling rate. S4.4: When the temperature reaches the set minimum value or the objective function converges to the preset range, the final task allocation plan is output, and according to the optimized task allocation plan, the Kubernetes API is called to dynamically adjust the Pod's allocation node.

6. According to the method for encapsulating and operating a standardized water conservancy professional model using Docker container technology in claim 1, it is characterized in that: The specific steps for collecting and optimizing the calculation results after the distributed tasks are completed as described in Q5 are as follows: S5.1: Collect the output data of each group of task calculations and integrate the calculation results into a unified model output format. According to the predefined rules of the model, perform basic data cleaning on the results. Then, express the overall output results of the model as points in the state space, and construct the objective function based on the various indicators of the economy, stability or accuracy of the water conservancy model; S5.2: Set up the path search model in state space and pass Generate the corresponding decision path, and identify the control points corresponding to the key state points based on the calculation results. Each control point corresponds to an important decision point on the optimization path, where P(t) represents the control curve of the decision path, t represents the progress of the path, and n represents the total number of decision points. represents the kth order Bellstein basis function, C k represents the control point, indicating the key decision variable configuration in the path; S5.3: According to the current state and objective function value, the path is optimized by adjusting the position of the control point. Through multiple iterations, the decision path is sampled multiple times, and the objective function value of each path point is calculated at the same time. The optimal path point is selected to generate the final output result. After that, the optimized result is post-processed to generate a water conservancy project scheduling plan.

Citation Information

Patent Citations

  • Model management and scheduling method, medium and system based on cloud native deployment

    CN118502970A

  • Method and system for constructing machine learning model automated production line

    WO2023071075A1

Cited By

  • Dynamic integrated water conservancy forecasting model architecture design method, product and equipment

    CN121501251A