Water demand prediction method based on data attribute adaptive model adaptation
By using a data attribute adaptive model adaptation method, the problems of small sample data, missing data, and insufficient model adaptability in water demand forecasting are solved, achieving high-precision water demand forecasting and supporting water resource planning decisions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHAANXI WATER CONSERVANCY & ELECTRIC POWER SURVEY & DESIGN INSTITUTE (GROUP) CO LTD
- Filing Date
- 2026-01-08
- Publication Date
- 2026-04-14
AI Technical Summary
Existing water demand forecasting technologies face problems such as small sample data, missing data, interference from redundant variables, and insufficient model adaptability, resulting in insufficient forecast accuracy and stability, making it difficult to meet the needs of high-precision decision-making.
By employing data attribute adaptive model adaptation methods, including multi-source data fusion, missing data completion, core driving factor screening, and multi-model collaboration, an adaptive prediction model is constructed to ensure data integrity and model accuracy.
It significantly improves the accuracy and stability of water demand forecasting, simplifies model structure, reduces the cost of manual intervention, and supports water resource planning decisions.
Smart Images

Figure CN121860141A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of water resources planning and data processing technology, specifically relating to a water demand prediction method based on data attribute adaptive model adaptation. Background Technology
[0002] Water demand forecasting is a core technological support for water resource planning and scheduling, urban and rural water supply security, and ecological protection. Its forecasting accuracy directly determines the scientific nature of water resource allocation and utilization efficiency, and has crucial guiding significance for scenarios such as agricultural irrigation optimization, industrial water-saving regulation, and urban water supply facility planning. However, current water demand forecasting technology still faces three prominent problems in practical applications, severely restricting forecasting accuracy and decision-making practicality, as follows: First, the quality of basic data is insufficient to meet modeling requirements. Water demand forecasting relies on multi-dimensional influencing factors such as meteorology, hydrology, economy, society, and the ecological environment. However, in practical applications, it often faces the dilemma of "small sample size." In most regions, only 10-15 years of continuous observation data are available, resulting in a limited amount of data. At the same time, data gaps are frequent, ranging from sporadic gaps of less than 5% for a single data point to consecutive gaps of two or more data points. This leads to weak data support for modeling and directly affects the stability and reliability of subsequent prediction models.
[0003] Secondly, the selection of core driving factors lacks scientific basis. Water demand is affected by the coupling of multiple dimensions of factors, but existing technologies do not classify and select factors according to the "water demand mechanism". Instead, they often adopt a general global factor selection method, which easily introduces redundant variables that are weakly correlated with the water demand process. This not only increases the complexity of the model and the computational cost, but also interferes with the identification of the role of core factors, resulting in a decrease in the explanatory power of the prediction model and difficulty in accurately capturing the intrinsic driving logic of water demand.
[0004] Third, the predictive models are not well-suited to the data features. Existing predictive technologies often rely solely on models such as multiple linear regression and support vector machines, without considering the specific characteristics of the data when selecting a suitable model. For small sample data scenarios, traditional models have weak generalization ability and are prone to overfitting or underfitting. For complex data relationships involving a mixture of linear and nonlinear relationships, a single model struggles to balance fitting accuracy and predictive stability, ultimately leading to large prediction errors that fail to meet the demands of high-precision decision-making. Summary of the Invention
[0005] The purpose of this invention is to provide a water demand prediction method based on data attribute adaptive model adaptation, so as to overcome the defects of the existing technology.
[0006] The technical solution adopted in this invention is a water demand prediction method based on an adaptive model of data attributes, comprising the following steps: S1, Define the data range for water demand forecasting, obtain multi-source water demand influencing factor data and analyze the data attributes of the data; S2, based on data attributes, matches the corresponding multi-source water demand influencing factor data completion method, completes the missing data, and verifies and optimizes the completion effect through cross-validation to obtain the dataset; S3. Classify the water demand influencing factors in the dataset, and screen out the core driving factors through correlation analysis and collinearity processing. S4. Based on the core driving factor features obtained in step S3, select at least two candidate prediction models, train and evaluate the performance of the candidate prediction models, and determine the optimal matching prediction model based on the evaluation results. S5. Use the optimal adaptive prediction model determined in step S4 to predict water demand and output the water demand prediction results.
[0007] The invention is further characterized in that, Step S1 defines the data range for water demand forecasting by setting the data time period to 10-15 years, and defines the indicator dimensions of water demand influencing factors. These indicator dimensions include meteorological and hydrological factors, socio-economic factors, and ecological factors. Meteorological and hydrological factors include annual average temperature, sunshine hours, rainfall, and evaporation. Socio-economic factors include industrial output, output of water-intensive industries, urban population, rural population, grain planting area, fertilizer application, and livestock numbers. Ecological factors include ecological land area and river base flow. Data on multiple water demand influencing factors were obtained through government statistical yearbooks, meteorological databases, water resources bulletins, industry research reports, and field survey data.
[0008] In step S1, the data attributes include data fluctuation characteristics and data missing information. Data fluctuation characteristics are identified by trend chart plotting and standard deviation calculation. Data fluctuation characteristics include stable type, regular fluctuation type, strong fluctuation with irregularity, and gentle trend type. Data missing status is determined by the percentage and form of missing data. Data missing status includes sporadic missing data and continuous missing data. Sporadic missing data is defined as a single missing data point with a missing percentage of less than 5%, while continuous missing data is defined as two or more consecutive missing data points.
[0009] Step S2, which involves completing the missing data, specifically involves: If the data fluctuation characteristics are stationary and the standard deviation is <1, the moving average method is used to complete the data, and the window size of the moving average method is set to 3-5. If the data fluctuations are regular and the missing data are sporadic, linear interpolation is used to complete the data; if the missing data are continuous, cubic spline interpolation is used to complete the data. If the data fluctuation characteristics are strong and irregular, the ARIMA model should be used first for completion, and the ADF stationarity test should be passed; if the ARIMA model completion error exceeds the standard, the "linear interpolation + ARIMA coupled model" should be used for completion. If the data fluctuation characteristics are of a gentle trend and the trend slope is <0.1, linear interpolation is used to complete the data.
[0010] In step S2, cross-validation is used to verify and optimize the completion effect. Specifically, when the sample size is ≤20, leave-one-out cross-validation is used, and when the sample size is >20, 10-fold cross-validation is selected. The root mean square error and mean absolute percentage error are calculated, and the mean absolute percentage error is set to <10% as the completion qualification standard. If the mean absolute percentage error is ≥10%, the completion method is switched and re-validated until the completion effect meets the standard.
[0011] In step S3, the water demand influencing factors are specifically classified into agricultural water demand subsystem, industrial water demand subsystem, urban and rural life subsystem, and natural ecological subsystem. The agricultural water demand subsystem includes grain sown area, fertilizer application amount, and rainfall; the industrial water demand subsystem includes industrial enterprise output value and output of water-intensive industries; the urban and rural life subsystem includes urban population, rural population, and livestock number; and the natural ecological subsystem includes annual average temperature, sunshine hours, and evaporation.
[0012] In step S3, the core driving factors are obtained by first performing correlation analysis using Pearson correlation analysis. If the data shows a non-linear distribution, it is automatically switched to Spearman rank correlation analysis. Strongly correlated factors are selected based on the correlation strength threshold |r|≥0.7 and the significance threshold p<0.05. Then, the correlation coefficient matrix between the strongly correlated factors is calculated. If the correlation coefficient |r|≥0.9 between any two factors, it is determined that there is strong collinearity. Principal component analysis is used to extract principal components to replace the original strongly collinear factors, and finally, the core driving factors are obtained by integration.
[0013] In step S4, candidate prediction models include multiple linear regression, random forest, and support vector machine models. The specific category selected is determined based on the linear / nonlinear relationship of the core driving factors and the sample size. If the core driving factor has a clear linear relationship with water demand, the multiple linear regression model is one of the candidate models. If the sample size is <20 and the core driving factors contain complex interaction relationships, the random forest model is one of the candidate models. If the sample size is less than 20 and the core driving factor has a non-linear relationship with water demand, the support vector machine model is one of the candidate models.
[0014] In step S4, the candidate model is automatically divided into a training set and a test set in a 7:3 ratio. The training set is used for model parameter fitting, and the test set is used to verify the model's generalization ability. The performance evaluation metrics include the training set fit R², the test set generalization ability R², and the mean absolute percentage error, generating the model performance evaluation results. At the same time, the optimal prediction model is selected according to the principle of "highest R² and lowest MAPE on the test set"; if it is necessary to explain the influence mechanism of the core driving factors, the multiple linear regression model is set as the auxiliary model; if it is necessary to deal with the nonlinear fluctuations of the data, the support vector machine model is set as the alternative model, and it is automatically activated when the prediction error of the optimal model exceeds the standard.
[0015] The beneficial effects of this invention are: This invention integrates official and supplementary data through multi-source data fusion, combines data features and missing types to accurately match and complete the data, and then optimizes the completion effect through cross-validation. This effectively solves the problem of weak modeling support caused by small sample size and missing data, significantly improves data integrity and reliability, and provides a high-quality data foundation for subsequent water demand forecasting.
[0016] This invention constructs a classification subsystem based on the water demand mechanism, avoiding cross-system interference. It screens strongly correlated factors through correlation analysis and eliminates redundant information by combining collinearity processing. This solves the problems of blind factor selection and interference from weakly correlated variables, allowing the model to focus on key driving logic, simplifying the model structure while improving explanatory power.
[0017] This invention, based on core factor features and data attributes, automatically selects suitable prediction models and configures auxiliary models, forming a multi-model collaborative adaptation system. This solves the problems of mismatch between single models and data features, and weak generalization ability in small sample scenarios, significantly improving the accuracy and stability of prediction results. Simultaneously, it is adaptable to various regional scenarios such as agriculture, industry, and resource-based cities, achieving fully automated data processing, factor selection, and model construction throughout the entire process. This reduces the cost of manual intervention, and the output factor impact analysis and control recommendations can directly support water resource planning decisions, significantly improving the scientific rigor and efficiency of water resource allocation. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the water demand prediction method based on data attribute adaptive model adaptation according to the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] Example 1 This invention relates to a water demand prediction method based on an adaptive model of data attributes, such as... Figure 1 As shown, it includes the following steps: S1. Define the data scope for water demand forecasting, obtain multi-source water demand influencing factor data and analyze the data attributes of the data; the purpose is to clarify the data boundaries and sources, grasp the basic characteristics of the data, provide a prerequisite for subsequent data completion and model adaptation, and ensure that the data is targeted and usable.
[0021] S2, based on data attributes, matches the corresponding multi-source water demand influencing factor data completion method to complete the missing data, and verifies and optimizes the completion effect through cross-validation to obtain the dataset; the purpose is to solve the problem of weak modeling support caused by missing data, and improve the data integrity and reliability by accurately matching the completion method and verifying the effect, so as to provide a high-quality data foundation for subsequent factor screening.
[0022] S3 classifies the water demand influencing factors in the dataset, and selects the core driving factors through correlation analysis and collinearity processing; it avoids interference from weakly correlated variables and redundant factors, focuses on the key driving logic of water demand, simplifies the model complexity, and improves the explanatory power and computational efficiency of subsequent prediction models.
[0023] S4. Based on the core driving factor features obtained in step S3, select at least two candidate prediction models, train and evaluate the performance of the candidate prediction models, and determine the optimal matching prediction model based on the evaluation results. This solves the problem of poor adaptability between a single model and data features. By comparing and screening multiple models, it ensures that the model is accurately matched with the core factor features and data attributes, thereby improving prediction accuracy and generalization ability.
[0024] S5. Use the optimal adaptive prediction model determined in step S4 to predict water demand and output the water demand prediction results.
[0025] Example 2 Based on Embodiment 1 above, in step S1 of this invention, the data range definition for water demand forecasting specifically includes two aspects: First, the data time period is set to 10-15 years to fully cover short-term fluctuations and long-term trends, providing comprehensive data support for subsequent forecasts; second, the indicator dimensions of water demand influencing factors are clarified. These indicator dimensions are divided into three categories: meteorological and hydrological factors, economic and social factors, and ecological factors. Meteorological and hydrological factors include annual average temperature, sunshine hours, rainfall, and evaporation. Economic and social factors include industrial enterprise output value, output of high water-consuming industries, urban population, rural population, grain sown area, fertilizer application, and livestock numbers. Ecological factors include ecological land area and river base flow.
[0026] In addition, multi-source water demand influencing factor data are obtained through multi-channel collaboration: official channels connect with government statistical department yearbooks, meteorological department databases, and water resources department bulletins to achieve batch data import; supplementary channels include industry survey reports and field survey data to accurately fill the gaps in official data and ensure the comprehensiveness and completeness of data sources.
[0027] Furthermore, the data attributes in step S1 specifically include data fluctuation characteristics and data missing information, both of which are determined through targeted analysis: Data fluctuation characteristics: Identified by combining trend chart plotting and standard deviation calculation, specifically divided into four categories: stable, regular fluctuation, strong fluctuation with no regularity, and gentle trend, which can accurately capture the fluctuation patterns and trend attributes of data; Data missing status: determined by the percentage and form of missing data, specifically divided into two categories: sporadic missing and continuous missing. Among them, a single missing data point percentage of less than 5% is defined as sporadic missing, and two or more consecutive missing data points are defined as continuous missing, clearly distinguishing the different forms of data missing.
[0028] Example 3 Based on Example 2 above, this embodiment employs a differentiated strategy for accurately matching missing data in step S2, using "data fluctuation characteristics + missing data situation," as detailed below: If the data fluctuation characteristics are stationary and the standard deviation is <1, the moving average method is used to complete the data. The window size of this method is set to 3-5. If the data fluctuation characteristics are regular fluctuations, the completion method should be adapted according to the missing data: when the data is missing sporadically, linear interpolation should be used for completion; when the data is missing continuously, cubic spline interpolation should be used for completion. If the data fluctuation characteristics are strong and irregular, the ARIMA model should be used first for completion, and the model's rationality should be ensured by using the ADF stationarity test during the completion process; if the ARIMA model completion error exceeds the standard, then switch to "linear interpolation + ARIMA coupled model" for completion. If the data fluctuation characteristics are of a gentle trend and the trend slope is <0.1, linear interpolation is used to complete the data.
[0029] Furthermore, in step S2, the completion effect is verified and optimized through cross-validation, adopting the logic of "sample size-adapted verification method + quantitative indicator evaluation + iterative adjustment", specifically as follows: First, the corresponding cross-validation method is selected according to the sample size. When the sample size is ≤20, leave-one-out cross-validation is used, and when the sample size is >20, 10-fold cross-validation is selected. On this basis, the root mean square error and mean absolute percentage error are calculated, and the mean absolute percentage error <10% is defined as the completion qualification standard. If the mean absolute percentage error is ≥10%, the appropriate completion method is automatically switched, and the verification process is restarted until the completion effect meets the qualification standard.
[0030] Example 4 Based on Example 3 above, this embodiment classifies water demand influencing factors in step S3 of the present invention with "differences in water demand mechanisms" as the core basis, and specifically divides them into four major subsystems. The subsystems and their constituent factors are defined as follows: Agricultural water demand subsystem: covers grain planting area, fertilizer application rate, and rainfall; Industrial water demand subsystem: covering the output value of industrial enterprises and the output of water-intensive industries; Urban and rural life subsystem: covering urban population, rural population, and livestock numbers; Natural ecological subsystem: encompasses annual average temperature, sunshine hours, and evaporation.
[0031] In step S3, the core driving factors are obtained through a two-step method of "association screening - collinearity processing". The specific process is as follows: 1. Correlation analysis: Pearson correlation analysis is used first to determine linear correlation. If the data is non-linearly distributed, Spearman rank correlation analysis is automatically switched. Strong correlation factors in each subsystem are screened according to the dual criteria of correlation strength threshold |r|≥0.7 and significance threshold p<0.05. 2. Collinearity handling: Calculate the correlation coefficient matrix between strongly correlated factors. If the correlation coefficient |r| ≥ 0.9 between any two factors, strong collinearity is determined. For factor groups with strong collinearity, principal component analysis is used to extract principal components, which are then used to replace the original strongly collinear factors. 3. Final integration: Summarize the factors after correlation screening and collinearity processing to obtain the core driving factors.
[0032] Example 5 Based on Example 4 above, in step S4 of this invention, the candidate prediction models include multiple linear regression (MLR), random forest (RF), and support vector machine (SVM). The specific category of the candidate model is determined based on the linear / nonlinear relationship between the core driving factor and water demand, and the sample size. If the core driving factor has a clear linear relationship with water demand, then the multiple linear regression (MLR) model will be considered as one of the candidate models. If the sample size is less than 20 and the core driving factors contain complex interaction relationships, then the random forest model (RF) will be considered as one of the candidate models. If the sample size is less than 20 and the core driving factor has a non-linear relationship with water demand, then the support vector machine (SVM) model will be considered as one of the candidate models.
[0033] For the selected candidate model, the training set and test set are automatically divided in a 7:3 ratio. The training set is used for model parameter fitting, and the test set is used to verify the model's generalization ability. The performance evaluation metrics include the training set fit R², the test set generalization ability R², and the mean absolute percentage error (MAPE), forming the model performance evaluation results.
[0034] Then, the optimal prediction model is selected according to the principle of "highest R² in the test set and lowest MAPE". If it is necessary to explain the influence mechanism of the core driving factors, the multiple linear regression model is set as the auxiliary model. If it is necessary to deal with the nonlinear fluctuations of the data, the support vector machine model is set as the alternative model. When the prediction error of the optimal model exceeds the standard, the alternative model is automatically activated.
[0035] Furthermore, this invention possesses a comprehensive data update and iterative optimization mechanism, specifically implemented as follows: It supports automatic annual connection to official databases and supplementary data channels, batch import of newly added water demand influencing factor data, and synchronous updates to the basic database to ensure data timeliness and completeness. Based on this, every 3-5 years of newly added data, the system will automatically initiate a full-process revalidation of "data completion method effectiveness - factor selection standard rationality - model fit matching degree"; if a system performance degradation is detected (e.g., the mean absolute percentage error (MAPE) increases by more than 2%), the parameter optimization process will be immediately triggered, or a more suitable data completion method, factor selection standard, and prediction model will be replaced to ensure the system's continuous and stable operation. When the sample size of the basic database increases to more than 30, the system will automatically recommend upgrading the existing prediction model to an XGBoost model to further improve high-dimensional data processing capabilities and prediction accuracy in complex scenarios; during the upgrade process, the core parameters and prediction results of the historical model are retained, and the system has a horizontal performance comparison function between the historical model and the upgraded model, facilitating the retrospective analysis of model optimization effects.
[0036] Example 6 This embodiment takes the water demand analysis of a resource-based city from 2010 to 2022 as an example. The steps are as follows: Step 1: Basic data preparation Data scope defined: time period 2010-2022 (13 years, small sample), potential factors include 11 items such as annual average temperature, sunshine hours, rainfall, industrial output value, raw coal production, urban population, and rural population; Data Acquisition: Import official data from local statistical yearbooks and meteorological databases to supplement missing industrial output data for 2020 (obtained through on-site research). Preliminary analysis: The annual average temperature is classified as "stable" (standard deviation 0.56), rainfall as "strongly fluctuating" (standard deviation 25%), and urban population as "regularly fluctuating" (upward trend with local fluctuations). The data missing rate is 3.2% (mainly sporadic missing data).
[0037] Step 2: Data completion and optimization. Matching methods: annual average temperature was calculated using the moving average method, sunshine duration was calculated using the linear interpolation method, rainfall was calculated using the ARIMA model (parameters (1,0,1)), and urban population was calculated using the cubic spline interpolation method. Verification results: The MAPE of air temperature treated by the moving average method was 3.68%, and the MAPE of rainfall treated by ARIMA was 10.6%, both meeting the standards; Output the completed dataset.
[0038] Step 3: Screening of core driving factors Subsystem construction: The 11 factors are divided into 4 subsystems: agriculture, industry, urban and rural life, and natural ecology; Correlation analysis: Pearson correlation analysis showed that industrial output (r=0.92), urban population (r=0.91), and fertilizer application (r=0.76) were strong correlation factors; Collinearity analysis: There is collinearity between industrial output and raw coal production (r=0.93). The principal component of the industrial output is extracted (cumulative variance contribution rate 90.9%). Output core factors: industrial principal components, urban population, rural population, fertilizer application, and average annual temperature.
[0039] Step 4: Model building and adaptation. Candidate models to be selected: MLR, RF, SVM (RBF kernel); Training and Evaluation: The training set (2010-2018, 9 samples) and the test set (2019-2022, 4 samples) showed that the RF model had the best performance on the test set with R²=0.985 and MAPE=2.1%. The core model is identified as RF, and the auxiliary model is identified as MLR.
[0040] Step 5: Decision Application Output forecast: The water demand forecast for 2023-2025 shows an upward trend year by year (average annual growth rate of 5%). Mechanism analysis: MLR shows that "for every 1 unit increase in the main industrial component, the water demand increases by 17,800 m³". Recommendation: Control the growth rate of water-intensive industries, and increase the scale of urban water supply facilities by 5 million m³ / year before 2025.
[0041] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0042] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A water demand prediction method based on data attribute adaptive model adaptation, characterized in that, Includes the following steps: S1, Define the data range for water demand forecasting, obtain multi-source water demand influencing factor data and analyze the data attributes of the data; S2, a data completion method for multi-source water demand influencing factors based on data attribute matching is used to complete the missing data. The completion effect is verified and optimized through cross-validation to obtain the dataset. S3. Classify the water demand influencing factors in the dataset, and screen out the core driving factors through correlation analysis and collinearity processing. S4. Based on the core driving factor features obtained in step S3, select at least two candidate prediction models, train and evaluate the performance of the candidate prediction models, and determine the optimal matching prediction model based on the evaluation results. S5. Use the optimal adaptive prediction model determined in step S4 to predict water demand and output the water demand prediction results.
2. The water demand prediction method based on data attribute adaptive model adaptation according to claim 1, characterized in that, In step S1, defining the data range for water demand forecasting includes setting the data time period to 10-15 years, and defining the indicator dimensions of water demand influencing factors. These indicator dimensions include meteorological and hydrological factors, socio-economic factors, and ecological factors. Meteorological and hydrological factors include annual average temperature, sunshine hours, rainfall, and evaporation. Socio-economic factors include industrial output, output of water-intensive industries, urban population, rural population, grain planting area, fertilizer application, and livestock numbers. Ecological factors include ecological land area and river base flow. The data on the multi-source water demand influencing factors were obtained through government statistical yearbooks, meteorological databases, water resources bulletins, industry research reports, and field survey data.
3. The water demand prediction method based on data attribute adaptive model adaptation according to claim 1, characterized in that, The data attributes in step S1 include data fluctuation characteristics and data missing information. Data fluctuation characteristics are identified by trend chart plotting and standard deviation calculation. Data fluctuation characteristics include stable type, regular fluctuation type, strong fluctuation with irregularity type, and gentle trend type. Data missing status is determined by the percentage and form of missing data. Data missing status includes sporadic missing data and continuous missing data. Sporadic missing data is defined as a single missing data point with a missing percentage of less than 5%, while continuous missing data is defined as two or more consecutive missing data points.
4. The water demand prediction method based on data attribute adaptive model adaptation according to claim 3, characterized in that, The specific steps for completing the missing data in step S2 are as follows: If the data fluctuation characteristics are stationary and the standard deviation is <1, the moving average method is used to complete the data, and the window size of the moving average method is set to 3-5. If the data fluctuations are regular and the missing data are sporadic, linear interpolation is used to complete the data; if the missing data are continuous, cubic spline interpolation is used to complete the data. If the data fluctuation characteristics are strong and irregular, the ARIMA model should be used first for completion, and the ADF stationarity test should be passed; if the ARIMA model completion error exceeds the standard, the "linear interpolation + ARIMA coupled model" should be used for completion. If the data fluctuation characteristics are of a gentle trend and the trend slope is <0.1, linear interpolation is used to complete the data.
5. The water demand prediction method based on data attribute adaptive model adaptation according to claim 1, characterized in that, In step S2, the completion effect is verified and optimized through cross-validation as follows: when the sample size is ≤20, leave-one-out cross-validation is used; when the sample size is >20, 10-fold cross-validation is selected. The root mean square error and mean absolute percentage error are calculated, and the mean absolute percentage error <10% is set as the completion qualification standard. If the mean absolute percentage error is ≥10%, the completion method is switched and re-verified until the completion effect meets the standard.
6. The water demand prediction method based on data attribute adaptive model adaptation according to claim 1, characterized in that, In step S3, the water demand influencing factors are specifically classified into an agricultural water demand subsystem, an industrial water demand subsystem, an urban and rural living subsystem, and a natural ecological subsystem. The agricultural water demand subsystem includes grain sowing area, fertilizer application amount, and rainfall; the industrial water demand subsystem includes industrial enterprise output value and output of water-intensive industries; the urban and rural living subsystem includes urban population, rural population, and livestock number; and the natural ecological subsystem includes annual average temperature, sunshine hours, and evaporation.
7. The water demand prediction method based on data attribute adaptive model adaptation according to claim 6, characterized in that, In step S3, the core driving factors are obtained by first performing correlation analysis using Pearson correlation analysis. If the data shows a non-linear distribution, it is automatically switched to Spearman rank correlation analysis. Strongly correlated factors are selected based on the correlation strength threshold |r|≥0.7 and the significance threshold p<0.
05. Then, the correlation coefficient matrix between the strongly correlated factors is calculated. If the correlation coefficient |r|≥0.9 between any two factors, it is determined that there is strong collinearity. Principal component analysis is used to extract principal components to replace the original strongly collinear factors, and finally, the core driving factors are obtained by integration.
8. The water demand prediction method based on data attribute adaptive model adaptation according to claim 1, characterized in that, In step S4, the candidate prediction models include multiple linear regression models, random forest models, and support vector machine models. The specific category selected is determined based on the linear / nonlinear relationship of the core driving factors and the sample size. If the core driving factor has a clear linear relationship with water demand, the multiple linear regression model is one of the candidate models. If the sample size is <20 and the core driving factors contain complex interaction relationships, the random forest model is one of the candidate models. If the sample size is less than 20 and the core driving factor has a non-linear relationship with water demand, the support vector machine model is one of the candidate models.
9. The water demand prediction method based on data attribute adaptive model adaptation according to claim 8, characterized in that, In step S4, the candidate model is automatically divided into a training set and a test set in a 7:3 ratio. The training set is used for model parameter fitting, and the test set is used to verify the model's generalization ability. The performance evaluation metrics include the training set fit R², the test set generalization ability R², and the mean absolute percentage error, generating model performance evaluation results. At the same time, the optimal fitting prediction model is selected according to the principle of "highest R² in the test set and lowest MAPE". If it is necessary to explain the influence mechanism of the core driving factors, set the multiple linear regression model as the auxiliary model; if it is necessary to deal with the nonlinear fluctuations of the data, set the support vector machine model as the alternative model, and automatically activate it when the prediction error of the optimal model exceeds the standard.