Optimization method and system for water conservancy facility scheduling scheme and storage medium
Through mathematical models and predictive models, the scheduling of water conservancy facilities has been solved, and the problem of lack of scientificity in the scheduling model and insufficient improvement of water quality in the existing technology has been solved, and the scientificization of reservoir scheduling and the improvement of water quality has been achieved.
Patent Information
- Application Number
- CN202510552345.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-29
AI Technical Summary
The existing water conservancy facility dispatching model lacks scientific decision-making support, it is difficult to adapt to complex and changeable hydrological conditions and water needs, and it is not effectively considered to improve water quality.
By converting the target problem into a mathematical model, using historical data to establish a predictive model, optimizing river water level, reservoir water level and gate opening, to minimize water quality data, and formulating an optimized water conservancy facility scheduling plan.
The scientific and refined reservoir scheduling has been achieved, the water quality of the target river area has been improved, and the reasonable protection of water resources and the achievement of environmental protection goals has been ensured.
Smart Images

Figure CN120069243A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and particularly relates to an optimization method, system and storage medium for a water conservancy facility scheduling scheme. Background Art
[0002] Traditional water conservancy facility scheduling modes often rely on experience, lack scientific decision-making support, and are difficult to adapt to complex and changeable hydrological conditions and water use demands. For example, some reservoirs cannot effectively cope with water resource shortages during the dry season, while facing water resource waste problems during the flood season. This scheduling method not only affects the sustainable utilization of water resources but also has an adverse impact on the ecological environment. To solve these problems, various water conservancy facility scheduling optimization models have been proposed, aiming to achieve the scientific and refined management of reservoir scheduling through mathematical methods and computer technologies.
[0003] A similar prior art is the Chinese patent application with the publication number CN118536766A, which provides a reservoir flood control scheduling method and system. The method includes obtaining and processing the historical hydrological data and historical flood event data of the target reservoir to determine the hydrological event pattern; establishing constraint conditions and boundary conditions based on the flow capacity of the target reservoir and using them as the simulation scheduling control conditions of the target reservoir; inputting the hydrological event pattern, real-time weather forecast results, real-time rainfall conditions, and the flow information flowing into the target reservoir into a pre-constructed reservoir scheduling model, performing simulation and prediction under the simulation scheduling control conditions, and formulating a joint scheduling strategy for water conservancy facilities in the target reservoir according to the prediction results.
[0004] Another similar prior art is the Chinese patent application with the publication number CN118536773A, which discloses a water resource optimization scheduling management method and system based on digital twin, including: obtaining the basic data of water conservancy facilities, regional geographical feature data, and water resource supply end data of the target area to construct a water conservancy scheduling twin model; extracting regional precipitation records from the historical weather records of the target area for training to obtain a precipitation prediction model; constructing a water supply and drainage demand prediction model according to the historical water supply and drainage records of the target area; obtaining the precipitation prediction result and water supply and drainage demand prediction result through model prediction; optimizing the water resource scheduling scheme through the water conservancy scheduling twin model, combining real-time water resource reserve data, precipitation prediction results, and water supply and drainage demand prediction results, and obtaining the optimal scheduling scheme for water resource scheduling management.
[0005] However, neither of the above two documents considers the problem of improving water quality by optimizing the scheduling scheme. Therefore, the present invention provides an optimization method, system and storage medium for a water conservancy facility scheduling scheme. Summary of the Invention
[0006] The present invention converts the target problem into a mathematical model, obtains the optimal solution through the mathematical model, and formulates a corresponding optimized water conservancy facility scheduling plan based on the optimal solution.
[0007] In order to achieve the above-mentioned invention purpose, the present invention provides an optimization method for a water conservancy facility scheduling plan as described below, which is implemented by performing the following steps: Step S1: Collect relevant data of the target river basin in chronological order. The relevant data includes meteorological data, hydrological data, and real-time status data of water conservancy facilities. The meteorological data includes rainfall, temperature, humidity, and wind speed. The hydrological data includes river flow, river water level, and water quality data. The status data includes reservoir water level and gate opening. Step S2: Integrate the collected historical relevant data to generate data objects. Each data object includes input data and output data. The input data refers to all data parameters in the relevant data except the water quality data, and the output data refers to the water quality data. Use all the data objects as learning data to train the learning data to generate a prediction model. Step S3: Use the river water level, the reservoir water level, and the gate opening as independent variables, and the water quality data as the dependent variable to establish a first model between the independent variables and the dependent variable. Preset limiting conditions. Under the condition of meeting the limiting conditions, obtain the specific values of each independent variable when the dependent variable is the smallest based on the first model. Step S4: Replace the corresponding river water level, reservoir water level, and gate opening in the data object with the specific values to generate first data. Input the first data into the prediction model, and the prediction model outputs the predicted water quality data. Determine whether the predicted water quality data is less than a preset water quality threshold. If so, formulate a scheduling plan based on the specific values. Otherwise, return to Step S3 to adjust the first model and recalculate the specific values until the predicted water quality data is less than the water quality threshold.
[0008] As a preferred technical solution of the present invention, establishing the first model between the independent variables and the dependent variable includes the following steps: Step S31: Determine the scheduling period, divide the scheduling period into several time stages, obtain the first object data of the last time stage of the previous scheduling period, and set limiting conditions for the river water level and the reservoir water level of the first time stage of the current scheduling period. Step S32: Calculate the correlation coefficients between each of the independent variables and the dependent variable based on the first object data, identify the correlation patterns between the independent variables and the dependent variable based on the correlation coefficients, select a regression model based on the correlation patterns, and use historical data to fit the regression model to estimate the model parameters; Step S33: Use a validation method to evaluate the goodness of fit of the regression model. When the goodness of fit is greater than or equal to a preset first threshold, use the regression model as the first model, and calculate the first specific values of each of the independent variables under the condition of minimizing the dependent variable based on the constraint conditions and the first model.
[0009] As a preferred technical solution of the present invention, after the step S33, the following steps are further executed: Generate second object data based on the first specific values, set corresponding constraint conditions for the second time period, repeatedly execute the step S32 to the step S33 for the second object data, calculate the first specific values corresponding to the second time period, repeat this step, and calculate the first specific values of all time periods of the next scheduling cycle.
[0010] As a preferred technical solution of the present invention, calculating the first specific values of each of the independent variables under the condition of minimizing the dependent variable based on the constraint conditions and the first model includes the following steps: Obtain multiple eigenvalue of each of the independent variables based on the constraint conditions of each of the independent variables. The eigenvalue refers to the value that the independent variable may take. Select one eigenvalue from the eigenvalues of each of the independent variables for combination to generate multiple eigenvalue combinations. Substitute each eigenvalue combination into the first model to calculate the result value of the dependent variable, obtain the minimum result value among the multiple result values, and use the eigenvalue combination corresponding to the minimum result value as the first specific value of each of the independent variables.
[0011] As a preferred technical solution of the present invention, when training the learning data to generate a prediction model, the following steps are further executed: Step S21: Identify whether the data parameters in each of the data objects are missing. If so, record the missing data parameters, obtain the data objects with missing data as the first data objects, classify the first data objects with the same missing data into one category, and classify the complete data objects into one category; Step S22: Use the data objects belonging to the same category as a set of learning data, divide each set of learning data into a training set and a test set, set an initial model for each set of learning data, use the training set to train the initial model to generate a corresponding second model, and determine the model parameters of the second model; Step S23: Obtain the test set corresponding to each training set, input the input data of the test set into the second model, output the corresponding prediction data by the second model, and calculate the prediction accuracy of each second model based on the prediction data and the corresponding input data; Step S24: Adjust the model parameters of the first model, return to step S23, and determine whether the change in the prediction accuracy is less than a preset change threshold. If so, end this step; otherwise, repeat this step.
[0012] As a preferred technical solution of the present invention, after step S24, the following steps are further executed: Use the prediction accuracy of the finally trained second model as the model confidence of each first model, obtain the second models with the model confidence greater than the preset confidence threshold as the third models, and use the combination of all second models as the final prediction model.
[0013] As a preferred technical solution of the present invention, the prediction of water quality data is output by the prediction model, including the following steps: Input the first data into each third model in the prediction data, output the prediction output data by the third model, and use the result obtained by multiplying each prediction output data by the corresponding model confidence and then adding them together as the final prediction numerical data.
[0014] As a preferred technical solution of the present invention, after step S21, the following steps are further executed: For each category of the first data objects, obtain the data parameters corresponding to the missing data in the data objects without missing data, calculate the average value of all the data parameters, and add it to the first data object to complete the first data object.
[0015] The present invention also provides an optimization system for a water conservancy facility scheduling scheme, including the following modules: A collection module for collecting relevant data of the target river basin in chronological order. The relevant data includes meteorological data, hydrological data, and real-time status data of water conservancy facilities. The meteorological data includes rainfall, temperature, humidity, and wind speed. The hydrological data includes river flow, river water level, and water quality data. The status data includes reservoir water level and gate opening; A training module for integrating the historically collected relevant data to generate data objects. Each data object includes input data and output data. The input data refers to all data parameters in the relevant data except the water quality data, and the output data refers to the water quality data. Use all the data objects as learning data to train the learning data to generate a prediction model; A calculation module, configured to use the river water level, the reservoir water level, and the gate opening as independent variables, and the water quality data as the dependent variable, establish a first model of the independent variables and the dependent variable, preset a constraint condition, and when the constraint condition is satisfied, obtain the specific values of the independent variables when the dependent variable is minimized based on the first model; A scheduling module, configured to generate first data by replacing the corresponding river water level, reservoir water level, and gate opening in the data object with the specific values, input the first data into the prediction model, output predicted water quality data by the prediction model, determine whether the predicted water quality data is less than a preset water quality threshold, and if so, formulate a scheduling plan based on the specific values, otherwise, return to step S3 to adjust the first model and recalculate the specific values until the predicted water quality data is less than the water quality threshold.
[0016] The present invention also provides a storage medium storing program instructions, wherein when the program instructions run, the device where the storage medium is located is controlled to execute the optimization method for the water conservancy facility scheduling plan described in any one of the above.
[0017] Compared with the prior art, the beneficial effects of the present invention are at least as follows: In the present invention, first, relevant data of the target area is collected, the historically collected relevant data is integrated to generate a data object, and all data objects are used as learning data to train the learning data to generate a prediction model. When training the prediction model, the data objects are grouped according to the different missing data in the data object, and an initial model is set for each group of learning data, so that each initial model can specifically process the data related to specific missing data, thereby improving the adaptability and prediction accuracy of the model to missing data; the river water level, reservoir water level, and gate opening are used as independent variables, and the water quality data is used as the dependent variable to establish a first model of the independent variables and the dependent variable, preset a constraint condition, and when the constraint condition is satisfied, obtain the specific values of the independent variables when the dependent variable is minimized based on the first model. By converting the target problem into a mathematical model and finding the optimal solution through the mathematical model, a corresponding optimized water conservancy facility scheduling plan is formulated based on the optimal solution; first data is generated based on the specific values, the first data is input into the prediction model, the prediction model outputs the predicted water quality data, determine whether the predicted water quality data is less than a preset water quality threshold, and if so, formulate a scheduling plan based on the specific values, otherwise, adjust the first model and recalculate the specific values until the predicted water quality data is less than the water quality threshold. By continuously adjusting the first model, the optimal specific values are calculated, and the scheduling plan is optimized based on the specific values to improve the water quality of the target river basin and achieve reasonable protection of the water resources in the target river basin, thereby achieving the purpose of environmental protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a step flowchart of an optimization method for a water conservancy facility scheduling scheme of the present invention; Figure 2 It is a composition structure diagram of an optimization system for a water conservancy facility scheduling scheme of the present invention. Specific implementation manners
[0019] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0020] It can be understood that the terms "first", "second", etc. used in the present application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of the present application, the first xx script may be referred to as the second xx script, and similarly, the second xx script may be referred to as the first xx script.
[0021] The present invention provides an optimization method for a water conservancy facility scheduling scheme as shown in Figure 1 and is implemented by performing the following step process: Step S1: Collect relevant data of the target river basin in chronological order. The relevant data includes meteorological data, hydrological data, and real-time status data of water conservancy facilities. The meteorological data includes rainfall, temperature, humidity, and wind speed. The hydrological data includes river flow, river water level, and water quality data. The status data includes reservoir water level and gate opening.
[0022] Specifically, in order to optimize the scheduling scheme of water conservancy facilities in the target river basin, improve the water quality of the target river basin, realize the reasonable protection of water resources in the target river basin, and achieve the purpose of environmental protection, first collect relevant data of the target river basin in chronological order. The relevant data includes meteorological data, water temperature data, and real-time status data of water conservancy facilities. Based on the above relevant data, accurate and reliable data support can be provided for subsequent optimization of water conservancy facility scheduling, reducing uncertainty and risks in the subsequent optimization process. An accurate prediction model can be obtained by analyzing and training the relevant data, and a reasonable mathematical model can also be established to provide scientific data support for subsequent optimization and formulation of scheduling schemes.
[0023] Step S2: Integrate the historically collected relevant data to generate data objects. Each data object includes input data and output data. The input data refers to all data parameters except water quality data in the relevant data, and the output data refers to water quality data. Use all data objects as learning data and train the learning data to generate a prediction model.
[0024] Specifically, in order to generate a reasonable optimization plan for the operation of water conservancy facilities, it is first necessary to integrate the relevant data collected historically to generate data objects. Since the data is collected and saved in the same type of data set when collecting data, it is necessary to integrate the relevant data collected in different types but in the same period into data objects. For example, a data object contains meteorological data, hydrological data, and real-time status data of water conservancy facilities collected in the same period. All data objects are used as learning data to train and generate a prediction model. The prediction model can predict the corresponding water quality data based on meteorological data, hydrological data, and the status data of water conservancy facilities. After formulating the corresponding operation plan, the data corresponding to the operation plan can be input into the prediction model, and the prediction model predicts the corresponding water quality data. Based on the predicted water quality data, it can be judged whether the formulated operation plan can make the water quality data reach the preset value, and it can also be judged whether the operation plan achieves the environmental protection purpose.
[0025] Step S3: Use the river water level, reservoir water level, and gate opening as independent variables, and the water quality data as the dependent variable to establish a first model of the independent variable and the dependent variable, and preset limiting conditions. Under the condition of meeting the limiting conditions, obtain the specific values of each independent variable when the dependent variable is the smallest based on the first model.
[0026] Specifically, in order to optimize the operation plan and achieve the purpose of environmental protection, the water quality data is used as the dependent variable, and the dependent variable is also the optimization goal. Assuming that the water quality data is the COD concentration, the optimization goal is to minimize the COD concentration under artificially controllable conditions. The artificially controllable conditions are the regulation of the status of each water conservancy facility. For example, the reservoir water level can be adjusted by adjusting the gate opening to further adjust the river water level, so that the COD concentration in the target river area reaches the lowest. Therefore, the independent variables are also the various data that can be controlled by humans, including the river water level, reservoir water level, gate opening, and pump station operation status. To solve this problem, the relationship between the independent variable and the dependent variable can be determined based on historical data, and an effective optimization model, that is, the above-mentioned first model, can be constructed. The first model is a mathematical model. Considering the balance between water resource supply and demand, limiting conditions are set for the reservoir water level and the river water level. Then, based on the limiting conditions and the first model, the specific values of the independent variables can be calculated when the dependent variable, that is, the water quality data, is the smallest. The specific values can reflect the usage status of water conservancy facilities. For example, controlling the river water level at 1.8 meters, the reservoir water level at 2 meters, and the gate opening at 70% can optimize the water quality data. Therefore, after calculating the specific values of the independent variables, the corresponding water quality facility operation plan can be formulated based on the specific values.
[0027] Step S4: Substitute specific values for the corresponding river water level, reservoir water level, and gate opening in the data object to generate the first data. Input the first data into the prediction model, and the prediction model outputs the predicted water quality data. Determine whether the predicted water quality data is less than the preset water quality threshold. If so, formulate a scheduling plan based on the specific values; otherwise, return to step S3 to adjust the first model and recalculate the specific values until the predicted water quality data is less than the water quality threshold.
[0028] Specifically, after calculating the specific values, substitute the specific values for the controllable data corresponding in the data object to generate the first data. Input the first data into the prediction model, and the prediction model outputs the predicted water quality data. If the predicted water quality data is less than the preset water quality threshold, it indicates that the purpose of improving water quality can be achieved by scheduling water conservancy facilities with specific values. The improvement of water quality means that the environment of the target water area has been improved, indicating that the purpose of environmental protection has been achieved. Therefore, a corresponding scheduling plan can be formulated based on the specific values. Otherwise, it means that after scheduling the water conservancy facilities with specific values, the water quality of the target river basin has not reached the preset threshold. If a scheduling plan for water conservancy facilities is formulated based on the specific values, the desired purpose cannot be achieved either. It may be that the first model established cannot perfectly reflect the relationship between the independent variable and the dependent variable. Therefore, return to step S3, adjust the first model, and recalculate the specific values based on the adjusted first model until the predicted water quality data is less than the water quality threshold.
[0029] Through the cooperation among the above steps, the target problem is transformed into a mathematical model, the optimal solution is obtained through the mathematical model, and a corresponding optimized scheduling plan for water conservancy facilities is formulated based on the optimal solution, so as to improve the water quality of the target river basin and achieve the purpose of environmental protection.
[0030] Furthermore, establishing the first model of the independent variable and the dependent variable includes the following steps: Step S31: Determine the scheduling period, divide the scheduling period into several time stages, obtain the first object data of the last time stage of the previous scheduling period, and set limit conditions for the river water level and reservoir water level of the first time stage of the current scheduling period; Step S32: Calculate the correlation coefficients between the respective independent variables and the dependent variable based on the first object data, identify the correlation patterns between the independent variables and the dependent variable based on the correlation coefficients, select a regression model based on the correlation patterns, and use historical data to fit the regression model to estimate the model parameters; Step S33: Use a verification method to evaluate the goodness of fit of the regression model. When the goodness of fit is greater than or equal to the preset first threshold, use the regression model as the first model, and calculate the first specific values of the respective independent variables under the condition of minimizing the dependent variable based on the limit conditions and the first model.
[0031] Specifically, the optimization of water conservancy facility scheduling is a dynamic process aimed at continuously adjusting and improving according to the actual situation to achieve the best results. The scheduling plan is generally formulated according to a scheduling cycle. The scheduling cycle of water conservancy facilities is generally one year. The scheduling cycle is divided into several time stages. For example, if it is divided by month, the scheduling plan of the previous month will affect the formulation of the scheduling plan of the next month. Therefore, obtain the first object data of the last time stage of the previous scheduling cycle, and set limit conditions for the river water level and reservoir water level in the first time stage of the current scheduling cycle, which generally include the maximum and minimum values of the water level. During the scheduling process, this limit condition needs to be met. Then, calculate the correlation coefficient between the independent variable and the dependent variable based on the first object data. The calculation method of the correlation coefficient can use the Pearson algorithm. After calculating the correlation coefficient, the correlation pattern between the independent variable and the dependent variable can be identified based on the correlation coefficient, such as positive correlation or negative correlation. Then, select a suitable regression model based on the correlation pattern, such as linear regression, polynomial regression or non-linear regression, and use historical data to fit the regression model to estimate the corresponding model parameters. Historical data refers to the first object data collected historically. Then, use verification methods such as R-squared to evaluate the goodness of fit of the regression model. If the goodness of fit is greater than the preset first threshold, the corresponding regression model is used as the first model. Then, based on the limit condition and the first model, calculate the first specific value of the independent variable under the condition of minimizing the dependent variable. The specific calculation method will be explained in detail later.
[0032] Furthermore, after step S33, the following steps are also executed: Generate second object data based on the first specific value, set corresponding limit conditions for the second time stage, repeat steps S32 to S33 for the second object data, calculate the first specific value corresponding to the second time stage, and repeat this step to calculate the first specific values of all time stages of the next scheduling cycle.
[0033] Specifically, after calculating the first specific value in the first time period, assuming that the first specific value is that the reservoir water level is controlled at 1.5 meters, the river water level is controlled at 1.8 meters, and the gate opening is set at 75%, other data in the first object data, such as rainfall, temperature, river flow, etc., are obtained through prediction. Then, the first specific value and the predicted other data are combined to generate the second object data, and the second object data is used as the first object data in the first time period of the current scheduling cycle. Corresponding limiting conditions are set for the next time period, that is, the second time period. Steps S32 - S33 are repeatedly executed to obtain the first specific value in the second time period, and then the first object data in the second time period is obtained based on the first specific value in the second time period. This step is repeatedly executed until the first specific values in all time periods of the current scheduling cycle are calculated, and a water conservancy facility scheduling plan for the corresponding time period is formulated based on the first specific value in each time period.
[0034] Further, based on the limiting conditions and the first model, calculate the first specific value of each independent variable when minimizing the dependent variable, including the following steps: Obtain multiple eigenvalue values for each independent variable based on the limiting conditions of each independent variable. The eigenvalue value refers to the value that the independent variable may take. Select one eigenvalue value from the eigenvalue values of each independent variable for combination to generate multiple eigenvalue combinations. Substitute each eigenvalue combination into the first model to calculate the result value of the dependent variable, obtain the minimum result value among the multiple result values, and use the eigenvalue combination corresponding to the minimum result value as the first specific value of each independent variable.
[0035] Specifically, assuming that the limiting condition for the reservoir water level is 1.5 meters - 1.7 meters, then the eigenvalue values corresponding to the reservoir water level can take three values: 1.5, 1.6, and 1.7. Then, obtain the eigenvalue values of the river water level and the gate opening. Arrange and combine the three eigenvalue values belonging to different categories to generate multiple eigenvalue combinations. Substitute the eigenvalue combinations into the first model to calculate the corresponding result value of the dependent variable. Since the dependent variable is water quality data, and the water quality data generally uses the COD concentration, the smaller the COD concentration, the better the water quality. Therefore, obtain the minimum result value among them, and use the eigenvalue combination corresponding to the minimum result value as the first specific value of the independent variable.
[0036] Further, when training the learning data to generate a prediction model, the following steps are also executed: Step S21: Identify whether the data parameters in each data object are missing. If so, record the missing data parameters, obtain the data object with missing data as the first data object, classify the first data objects with the same missing data into one category, and classify the complete data objects into one category; Step S22: Group the data objects belonging to the same category as a set of learning data. Divide each set of learning data into a training set and a test set. Set an initial model for each set of learning data, use the training set to train the initial model to generate the corresponding second model, and determine the model parameters of the second model. Step S23: Obtain the test set corresponding to each training set. Input the input data of the test set into the second model. The second model outputs the corresponding predicted data. Based on the predicted data and the corresponding input data, calculate the prediction accuracy of each second model. Step S24: Adjust the model parameters of the first model, return to Step S23, and determine whether the change in the prediction accuracy is less than a preset change threshold. If so, end this step; otherwise, repeat this step.
[0037] Specifically, during the process of collecting relevant data, due to human errors or errors during transmission, some data parameters may be missing. Therefore, first identify whether the data parameters in the data object are missing. If so, record the missing data parameters. Mark the data object with missing data as the first data object. Group the first object data with the same missing data into a category. For example, group the first object data with missing temperature data into a category, group the first object data with missing rainfall data into a category, and group the first object data without missing data into a category. Then, use the data objects belonging to the same type as a set of learning data. Divide each set of learning data into a training set and a test set, and set an initial model for each set of learning data. Use the corresponding training set to train the initial model to generate the corresponding second model. Determine the model parameters of the second model based on the loss function. After each training is completed, obtain the test set corresponding to the training set. Input the input data in the test set, that is, the data other than the water quality data, into the second model. The second model outputs the corresponding predicted data. Based on the predicted data and the input data, calculate the prediction accuracy of the second model. For example, if there are 10 sets of data in the test set, calculate whether the difference between each set of predicted data and the input data is less than or equal to the preset threshold. If so, it means the prediction is correct; otherwise, it means the prediction is incorrect. Then, use the value obtained by dividing the number of correct predictions by the total number of test times as the prediction accuracy. Then, to improve the prediction accuracy of the second model, continuously adjust the corresponding model parameters. Then, calculate the prediction accuracy of the adjusted second model again. After each adjustment, calculate whether the change in the prediction accuracy and the previous prediction accuracy is less than the preset change threshold. If so, it means that the speed of improving the prediction accuracy by adjusting the model parameters has become very slow and there is no need to continue adjusting. At this time, end the adjustment to obtain the final second model.
[0038] In the above method, according to the differences in the missing data in the data objects, the data objects are grouped, and an initial model is set for each group of learning data, so that each initial model can specifically process the data related to specific missing data, thereby improving the adaptability and prediction accuracy of the model to missing data.
[0039] Further, after step S24, the following steps are also executed: Take the prediction accuracy of the finally trained second model as the model confidence of each first model, obtain the second models with model confidence greater than the preset confidence threshold as the third models, and take the combination of all second models as the final prediction model.
[0040] Specifically, after training multiple second models, take the prediction accuracy of each obtained second model as the model confidence of the second model. The model confidence refers to the degree of trust in the second model. If some second models have more missing data in the corresponding learning data, the corresponding confidence may be lower, which may not be very helpful for the subsequent overall prediction. Obtain the second models with model confidence greater than the preset confidence threshold as the third models, and take the combination of all third models as the final prediction model. The above method takes into account the missing data in the data correspondence and improves the prediction accuracy by adjusting the model parameters, so that even in the case of missing data in the learning data, a high-precision prediction model can be generated.
[0041] Further, the prediction model outputs predicted water quality data, including the following steps: Input the first data into each third model. The third model outputs predicted output data, and take the result obtained by multiplying each predicted output data by the corresponding model confidence and then adding them up as the final predicted numerical data.
[0042] Specifically, the prediction model is composed of multiple third models. When predicting water quality data, input the first data into each third model, and the third model outputs the corresponding predicted output data. Take the result obtained by multiplying each predicted output data by the corresponding model confidence and then adding them up as the final predicted water quality data. Through the above steps, the prediction model can make full use of the advantages of each model, improve the adaptability to different missing data, and improve the overall prediction accuracy.
[0043] Further, after step S21, the following steps are also executed: For each category of first data objects, obtain the data parameters corresponding to the missing data in the data objects without missing data, calculate the average value of all data parameters, and add it to the first data objects to complete the first data objects.
[0044] Specifically, the corresponding missing data is filled in using the average value. By correctly filling in the missing data, the integrity of the learning data is improved. The complete data can help the second model learn more comprehensive data features, thereby improving the prediction performance and accuracy of the model.
[0045] According to another aspect of the embodiments of the present invention, as shown in Figure 2 also provided is an optimization system for a water conservancy facility scheduling scheme, including a collection module, a training module, a calculation module, and a scheduling module, which are used to implement the optimization method for the water conservancy facility scheduling scheme described above. The specific functions of each module are as follows: The collection module is used to collect relevant data of the target river basin in chronological order. The relevant data includes meteorological data, hydrological data, and real-time status data of water conservancy facilities. The meteorological data includes rainfall, temperature, humidity, and wind speed. The hydrological data includes river flow, river water level, and water quality data. The status data includes reservoir water level and gate opening; The training module is used to integrate the historically collected relevant data to generate data objects. Each data object includes input data and output data. The input data refers to all data parameters except water quality data in the relevant data, and the output data refers to water quality data. All data objects are used as learning data to train the learning data to generate a prediction model; The calculation module is used to establish a first model with the river water level, reservoir water level, and gate opening as independent variables and the water quality data as the dependent variable, preset limiting conditions, and based on the first model, obtain the specific values of the independent variables when the dependent variable is the smallest under the condition of meeting the limiting conditions; The scheduling module is used to generate first data by replacing the corresponding river water level, reservoir water level, and gate opening in the data object with the specific values, input the first data into the prediction model, and the prediction model outputs the predicted water quality data. It is judged whether the predicted water quality data is less than a preset water quality threshold. If so, a scheduling scheme is formulated based on the specific values. Otherwise, return to step S3 to adjust the first model and recalculate the specific values until the predicted water quality data is less than the water quality threshold.
[0046] According to another aspect of the embodiments of the present invention, there is also provided a storage medium storing program instructions. When the program instructions run, they control the device where the storage medium is located to execute the optimization method for the water conservancy facility scheduling scheme described in any one of the above.
[0047] In summary, an optimization method, system and storage medium for a water conservancy facility scheduling scheme according to the present invention. The method includes collecting relevant data of a target river basin in chronological order, integrating the relevant data to generate a data object, where the data object includes input data and output data, using the data object as learning data, training the learning data to generate a prediction model, determining independent variables and a dependent variable, establishing a first model of the independent variables and the dependent variable, obtaining the specific values of the independent variables when the dependent variable is the smallest based on the first model, generating first data based on the specific values, inputting the first data into the prediction model, outputting predicted water quality data by the prediction model, determining whether the predicted water quality data is less than a preset water quality threshold, if so, formulating a scheduling scheme based on the specific values, otherwise, adjusting the first model, recalculating the specific values until the predicted water quality data is less than the water quality threshold. The present invention can achieve the scientific and refined reservoir scheduling.
[0048] It should be understood that although the steps in the flowcharts of the embodiments of the present invention are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0049] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The above program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0050] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0051] The above embodiments only represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.
[0052] The above is only the preferred embodiment of the present invention and is not used to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for optimizing a water conservancy facility scheduling scheme, characterized in that: The steps include: Step S1, collecting relevant data of the target river area in chronological order, the relevant data including meteorological data, hydrological data and real-time status data of water conservancy facilities, the meteorological data including rainfall, temperature, humidity and wind speed, the hydrological data including river flow, river water level and water quality data, and the status data including reservoir water level and gate opening; Step S2, integrating the relevant data collected historically to generate data objects, each of the data objects including input data and output data, the input data refers to all data parameters in the relevant data except the water quality data, the output data refers to the water quality data, all the data objects are used as learning data, and the learning data are trained to generate a prediction model; Step S3, taking the river water level, the reservoir water level and the gate opening as independent variables and the water quality data as dependent variables, establishing a first model of the independent variables and the dependent variables, presetting restriction conditions, and obtaining specific values of each of the independent variables when the dependent variable is minimum based on the first model when the restriction conditions are met; Step S4, replacing the corresponding river water level, reservoir water level and gate opening in the data object with the specific numerical value to generate the first data, inputting the first data into the prediction model, and having the prediction model output predicted water quality data, and judging whether the predicted water quality data is less than a preset water quality threshold; if so, formulating a scheduling plan based on the specific numerical value; otherwise, returning to step S3 to adjust the first model, and recalculating the specific numerical value until the predicted water quality data is less than the water quality threshold.
2. The method according to claim 1, characterized in that Establishing a first model of the independent variable and the dependent variable comprises the following steps: Step S31, determining a scheduling cycle, dividing the scheduling cycle into a number of time stages, obtaining the first object data of the last time stage of the previous scheduling cycle, and setting restriction conditions for the river water level and the reservoir water level of the first time stage of the current scheduling cycle; Step S32, calculating the correlation coefficient between each of the independent variables and the dependent variable based on the first object data, identifying the correlation pattern between the independent variables and the dependent variable based on the correlation coefficient, selecting a regression model based on the correlation pattern, and fitting the regression model using historical data to estimate model parameters; Step S33: Use a verification method to evaluate the fitness of the regression model. When the fitness is greater than or equal to a preset first threshold, use the regression model as the first model, and calculate the first specific value of each of the independent variables while minimizing the dependent variable based on the restriction condition and the first model.
3. The method according to claim 2, characterized in that After step S33, the following steps are further performed: Generate second object data based on the first specific value, set corresponding restriction conditions for the second time period, repeat steps S32 to S33 for the second object data, calculate the first specific value corresponding to the second time period, repeat this step, and calculate the first specific values of all time stages of the next scheduling cycle.
4. The method according to claim 2, characterized in that: Calculating, based on the constraint condition and the first model, the first specific value of each of the independent variables while minimizing the dependent variable comprises the following steps: Based on the restriction conditions of each of the independent variables, multiple eigenvalues of each of the independent variables are obtained, where the eigenvalue refers to the numerical value that the independent variable may take. One eigenvalue is selected from the eigenvalues of each of the independent variables for combination to generate multiple eigenvalue combinations. Each eigenvalue combination is brought into the first model to calculate the result value of the dependent variable, and the minimum result value among the multiple result values is obtained. The eigenvalue combination corresponding to the minimum result value is used as the first specific value of each of the independent variables.
5. The method according to claim 1, characterized in that Training the learning data to generate a prediction model also includes performing the following steps: Step S21, identifying whether the data parameter in each data object is missing, if yes, recording the missing data parameter, obtaining the data object with the missing data as the first data object, classifying the first data objects with the same missing data into one category, and classifying the complete data objects into another category; Step S22, taking the data objects belonging to the same category as a group of learning data, dividing each group of learning data into a training set and a test set, setting an initial model for each group of learning data, using the training set to train the initial model to generate a corresponding second model, and determining model parameters of the second model; Step S23, obtaining the test set corresponding to each of the training sets, inputting the input data of the test set into the second model, having the second model output corresponding prediction data, and calculating the prediction accuracy of each of the second models based on the prediction data and the corresponding input data; Step S24, adjust the model parameters of the first model, return to the step S23, and determine whether the change in the prediction accuracy is less than a preset change threshold. If so, end this step; if not, repeat this step.
6. The method according to claim 5, characterized in that After step S24, the following steps are further performed: The prediction accuracy of the second model finally trained is used as the model confidence of each first model, the second model whose model confidence is greater than a preset confidence threshold is obtained as the third model, and the combination of all the second models is used as the final prediction model.
7. The method according to claim 1, characterized in that Outputting predicted water quality data from the prediction model includes the following steps: The first data is input into each third model in the predicted data, and the third model outputs predicted output data. Each predicted output data is multiplied by the corresponding model confidence and then added together to obtain the result as the final predicted numerical data.
8. The method according to claim 5, characterized in that After step S21, the following steps are further performed: For the first data object of each category, data parameters corresponding to the missing data in the data object without missing data are obtained, and average values of all the data parameters are calculated and added to the first data object to complete the first data object.
9. An optimization system for a water conservancy facility scheduling scheme, used to implement the optimization method for a water conservancy facility scheduling scheme as claimed in any one of claims 1 to 8, characterized in that: Includes the following modules: A collection module is used to collect relevant data of the target river area in chronological order, wherein the relevant data include meteorological data, hydrological data and real-time status data of water conservancy facilities, wherein the meteorological data include rainfall, temperature, humidity and wind speed, the hydrological data include river flow, river water level and water quality data, and the status data include reservoir water level and gate opening; A training module, used for integrating the relevant data collected historically to generate data objects, each of which includes input data and output data, the input data refers to all data parameters in the relevant data except the water quality data, the output data refers to the water quality data, all the data objects are used as learning data, and the learning data are trained to generate a prediction model; a calculation module, for taking the river water level, the reservoir water level and the gate opening as independent variables and the water quality data as dependent variables, establishing a first model of the independent variables and the dependent variables, presetting restriction conditions, and obtaining specific values of each of the independent variables when the dependent variable is minimum based on the first model when the restriction conditions are met; A scheduling module is used to replace the corresponding river water level, reservoir water level and gate opening in the data object with the specific numerical value to generate the first data, input the first data into the prediction model, and the prediction model outputs the predicted water quality data, and judges whether the predicted water quality data is less than the preset water quality threshold. If so, formulate a scheduling plan based on the specific numerical value; otherwise, return to the step S3 to adjust the first model and recalculate the specific numerical value until the predicted water quality data is less than the water quality threshold.
10. A storage medium, characterized in that: The storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute the method for optimizing the water conservancy facility scheduling plan according to any one of claims 1 to 8.
Citation Information
Patent Citations
Reservoir flood control scheduling method and system
CN118536766A
Water resource optimization scheduling management method and system based on digital twinning
CN118536773A
Cloud source intelligent management water conservancy project standardization management platform
CN118822469A
Intelligent system for supporting water supply network decision making based on big data
KR102494144B1
Artificial-intelligence-based waterway information system
US20210334650A1