Calculation method for unit price of water conservancy project maintenance quota material
By introducing a two-dimensional quantification mechanism and a particle swarm-random forest combined model, the instability problem of predicting the unit price of quota materials in the maintenance and upkeep of water conservancy projects was solved, achieving accurate and reliable unit price prediction and reducing budget risk.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YELLOW RIVER INST OF HYDRAULIC RES YELLOW RIVER CONSERVANCY COMMISSION
- Filing Date
- 2026-01-22
- Publication Date
- 2026-05-01
AI Technical Summary
In the maintenance and repair of water conservancy projects, the existing technology for predicting the unit price of standard materials lacks a deep integration of knowledge in the field of water conservancy engineering, resulting in unstable prediction results and a lack of quantitative assessment of uncertainty. This makes it difficult to reflect market dynamics and leads to a disconnect between budget and actual costs.
By introducing a dual-dimensional quantification mechanism based on material functional properties and market maturity, key features are screened. A combined prediction model of particle swarm optimization algorithm and random forest model is constructed. A rolling window mechanism and time decay weighted synthesis rule are adopted to dynamically adjust the uncertainty of the prediction results.
It enables accurate prediction of the unit price of materials in the maintenance and upkeep quotas of water conservancy projects, reduces budget risks, provides a scientific and reliable basis for decision-making, and ensures the robustness and consistency of the prediction results.
Smart Images

Figure CN121961677A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water conservancy maintenance cost estimation technology, specifically a method for calculating the unit price of materials in water conservancy project maintenance quotas. Background Technology
[0002] Maintenance and upkeep of water conservancy projects is a crucial link in ensuring the long-term safe and stable operation of water conservancy infrastructure. The accurate calculation of the unit price of materials in the quota directly affects the refined management of maintenance funds, the scientific nature of project budget preparation, and the effectiveness of cost control. Traditionally, the unit price of materials in the quota mainly relies on the static guidance price issued by the government or the simple arithmetic average price based on limited historical procurement data. However, the market prices of materials required for water conservancy projects, such as cement, steel, sand and gravel, and various special products, are affected by the complex interplay of multiple dynamic factors such as macroeconomics, regional policies, market supply and demand, and transportation costs, exhibiting significant temporal fluctuations and regional differences. Quotas compiled based on static or lagging price information cannot accurately reflect the ever-changing market conditions, which can easily lead to a serious disconnect between budget preparation and actual procurement costs, resulting in budget overruns or fund stagnation, thus restricting the efficiency and effectiveness of water conservancy maintenance and management.
[0003] To address this challenge, existing improvement methods mainly proceed in two directions: first, qualitative analysis and trend extrapolation based on expert experience and historical price trend charts; second, the application of traditional statistical models or basic machine learning algorithms, such as multiple linear regression and autoregressive integral moving average models, to directly model and predict historical material price sequences. Although these methods introduce elements of data analysis, their inherent limitations remain obvious. First, in identifying price drivers, existing methods generally lack a deep integration of knowledge from the field of water conservancy engineering. They typically treat various macroeconomic and policy factors equally or subjectively weight them, failing to transform the functional criticality of materials in specific water conservancy projects, such as whether they are load-bearing structural materials and their market supply maturity, such as standardization and supplier concentration—essential domain attributes that determine the cost structure—into quantifiable criteria for intelligently screening and weighting key influencing factors. This results in insufficient targeting of the input features of the prediction model. At the level of predictive model construction, existing technologies mostly take minimizing the fitting error of historical data as the sole optimization objective, while completely ignoring the stability of the model's performance when making time-series extrapolation predictions for the future. This makes the model prone to overfitting specific noise or short-term fluctuations in historical data. When facing new and unseen market conditions in the future, the prediction results may fluctuate significantly, failing to provide a robust and reliable price benchmark trend for quota cycles spanning several years. More importantly, existing methods generally only output a single future price point prediction value, completely lacking a quantitative assessment of the uncertainty of the prediction results themselves. As a result, when aggregating the prediction values of multiple future time points over a long period into an optimal quota unit price representing the whole, the traditional simple arithmetic average or fixed-weight average methods cannot reflect the basic understanding that recent predictions are generally more reliable than long-term predictions, and that there are differences in the confidence levels of predictions at different time points. This means that the final determined benchmark unit price still contains high market risk, failing to fundamentally solve the pain point of the disconnect between budget and market dynamics.
[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a method for calculating the unit price of materials in the maintenance and upkeep quotas for water conservancy projects, so as to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A method for calculating the unit price of materials in the maintenance and upkeep quota of water conservancy projects, the specific steps of which include: Step 1: For the target material, collect its historical unit price and influencing factors, calculate the statistical contribution of each influencing factor to the historical unit price, extract the functional attributes and market maturity of the target material and quantify them into a comprehensive field adjustment factor, set the contribution threshold based on the type of the target material and the comprehensive field adjustment factor, screen the influencing factors with a statistical contribution higher than the contribution threshold, and output them as key features; Step 2: Input the historical data and historical unit price sequence corresponding to the key features into the random forest prediction model, introduce the particle swarm optimization algorithm, aim to minimize the prediction error and maximize the stability of the model in time series extrapolation, and automatically optimize the model to obtain the optimal model parameters, so as to obtain the combined prediction model of particle swarm and random forest. Step 3: Train and validate the combined prediction model using the forward chain time series cross-validation method until it meets the preset accuracy and stability requirements, and determine the final prediction model; Step 4: Using the current data of key features as input to the final prediction model, a rolling window mechanism is used to predict the future material unit price and its prediction interval sequence. Based on the time decay weighted synthesis rule, each prediction interval sequence is analyzed to calculate the optimal unit price, which is used as the material unit price for the maintenance quota of water conservancy projects.
[0007] Furthermore, the factors influencing the unit price of target materials include macroeconomic factors, regional policy and environmental factors, market supply and demand factors, and transportation and logistics factors. Macroeconomic factors include indicators reflecting the level of regional economic development and the prosperity of the construction industry. Regional policy and environmental factors include indicators reflecting the environmental quality and the intensity of environmental protection policies. Market supply and demand factors include indicators reflecting the activity of building materials market transactions and the balance between supply and demand. Transportation and logistics factors include indicators reflecting the cost of material transportation and logistics efficiency. The specific logic for setting a dynamic contribution threshold based on the functional attributes and market maturity of the target material is as follows: Based on the functional attributes of the target material in water conservancy projects, it is classified into key structural materials, general auxiliary materials, or consumable repair materials, with the functional importance coefficients of the three decreasing in that order; Based on the market maturity of the target material, it is classified into mature commodity materials, semi-customized materials, or special customized materials, with the market maturity coefficients of the three decreasing in that order. The comprehensive domain adjustment factor of the target material is calculated by weighting the functional importance coefficient and market maturity coefficient of the target material.
[0008] Furthermore, differentiated contribution thresholds are set, specifically including: defining the target material as a price-sensitive bulk material or a price-stable special material based on material type, wherein price-sensitive bulk materials include, but are not limited to, sand and gravel and cement, and price-stable special materials include, but are not limited to, special steel and water-stopping materials; if the comprehensive field adjustment factor is greater than the preset critical value and the target material is a price-stable special material, then the contribution threshold is set to the first contribution threshold; otherwise, the contribution threshold is set to the second contribution threshold; wherein, the first contribution threshold is greater than the second contribution threshold. To calculate the statistical contribution of each influencing factor to the historical unit price, specifically: using the historical unit price as the prediction target and the historical data of all influencing factors as features, train a random forest model, and output the importance value of each feature as the statistical contribution of the corresponding influencing factor. When screening key features, the statistical contribution of each influencing factor is compared with the contribution threshold. All influencing factors with a statistical contribution higher than the contribution threshold are retained to form key features.
[0009] Furthermore, the process of automatically optimizing the hyperparameters of the random forest prediction model by introducing the particle swarm optimization algorithm specifically includes: The hyperparameters of the random forest prediction model are encoded as particle position vectors. The hyperparameters include the number of decision trees and the maximum number of features considered when splitting a node. A population consisting of multiple particles is initialized, with each particle representing a set of hyperparameter combinations. Construct a multi-objective composite fitness function This is used to guide the optimization direction of the particle swarm optimization algorithm, where... The mean absolute error of the random forest prediction model using this set of hyperparameters on the validation set for predicting historical unit prices is given. It is the time-series extrapolation stability index, and its value is calculated based on the reciprocal of the coefficient of variation of the prediction error of the model in multiple different historical verification periods; For balanced weighting coefficients; The particle swarm optimization algorithm parameters are set, including the maximum number of iterations, population size, learning factor, and inertia weight. During the iteration process, the particle swarm optimization algorithm optimizes hyperparameters with the goal of maximizing the composite fitness function value and updates the velocity and position of particles according to the standard particle swarm algorithm. When the maximum number of iterations is reached, the optimization process is terminated, and the hyperparameter combination corresponding to the globally optimal particle position is used as the optimal model parameters to construct the particle swarm-random forest combined prediction model.
[0010] Furthermore, the specific process of employing the forward-chain time series cross-validation method includes: Arrange the historical data of key features and their corresponding historical unit price sequences in chronological order, with a total length of T periods. Starting from the time starting point, divide them into S consecutive and non-overlapping validation segments. Each validation segment contains data from L consecutive periods, where the time interval of the k-th validation segment is the period from the t-th period to the t-th period. Period to the period, and , , , ; For the The first to second validation segments were used during the training phase. Period, total The training set is constructed using historical data from the specified period. The construction of the training set includes: for any data that satisfies... The starting point of the conditions Take the first Period to the Historical data of key features from consecutive B-period periods constitute the input of a training sample, and the first... Period to the The output of this training sample consists of the historical unit price of the target material in L consecutive periods. The verification phase begins with the first Period to the The key feature data of the first period are used as input to the trained combined prediction model, which outputs the prediction data for the second period. Period to the The predicted sequence of the target material unit price is compared with the actual historical unit price sequence, and the prediction performance index of the validation segment is calculated. After completing the above operations for all S validation segments, a comprehensive evaluation of the combined prediction model is performed. The combined prediction model meets the preset accuracy and stability requirements, meaning it simultaneously satisfies: First, the mean absolute error calculated across all validation segments during the entire cross-validation process is... First, the mean value is lower than a preset first threshold; second, the time-series extrapolation stability index calculated based on the prediction error sequences of all verification segments. The combined prediction model is determined to be the final prediction model when it meets both of the two conditions, which are higher than the preset second threshold.
[0011] Furthermore, the specific method for predicting the unit price of the target material using the rolling window mechanism is as follows: Taking the current time point for quota calculation as the benchmark, denoted as period t, the first forecast will use the period t. The actual key features of B consecutive periods from period t to period t are input into the final prediction model, and the final prediction model predicts the period t. Period to the Forecast values of target material unit prices and their forecast ranges for the period; When the first After obtaining the actual material unit price for the period, slide the input window forward by L periods to use the [number]th period. Period to the Using the latest key features of period B as input, predict the next period. Period to the The target material unit price forecast and its forecast range for the period are obtained; this rolling forecast process is repeated until a target material unit price forecast sequence covering N consecutive future periods is obtained, where N is an integer multiple of L; The prediction interval is achieved through the final prediction model, which predicts the unit price for the i-th period. Its prediction interval is ,in To predict the lower limit, Let be the upper limit of the prediction; define the width of the prediction interval for period i as . This width is used to quantify the uncertainty of the model's prediction results for that period.
[0012] Furthermore, the optimal unit price is calculated using the time decay weighted synthesis rule, specifically including: Based on the obtained forecast interval sequence for N consecutive future periods, the forecast interval width for each period is extracted. Where i is the period index from period 1 to period N in the future, and the predicted interval width is... Combined with the time decay factor, this yields the predicted unit price for the i-th period. Calculate the overall weight : ,in, For the attenuation rate parameter, Constitutes the time decay factor, Factors constituting predictive uncertainty; Price forecast for the next N periods The optimal unit price is obtained by performing a weighted average, and the formula is as follows: ,in The optimal unit price; Determine the attenuation rate parameter The specific method for calculating the value is as follows: calculate the volatility of the historical unit price series of the target material over the past M periods. , Defined as the ratio of the standard deviation of the historical unit price series for period M to its mean, based on... The preset threshold range is determined. value: when At that time, take ;when At that time, take ;when At that time, take ,in and The preset high and low volatility thresholds, , and These are the preset attenuation rate parameters, high, medium, and low thresholds, respectively. , This mechanism enables the weighted synthesis rule to be based on the volatility of the historical unit price of the target material. Dynamically adjust its attenuation rate parameter .
[0013] Compared with the prior art, the beneficial effects of the present invention are: This invention creatively introduces a dual-dimensional quantification mechanism based on material functional properties and market maturity, transforming professional knowledge in the field of water conservancy engineering into a calculable comprehensive domain adjustment factor. Based on this, differentiated contribution thresholds are dynamically set for different material types. This design achieves a deep integration of domain prior knowledge and data-driven rules, making the final selected key feature subset not only statistically significant but also profoundly reflecting the business logic of engineering cost composition. It fundamentally overcomes the blindness and domain disconnect of traditional feature selection methods, laying a precise data foundation for the subsequent construction of highly interpretable and highly generalizable prediction models. This invention transforms the rigid requirement for price benchmark stability in quota compilation into a quantifiable and optimizable time-series extrapolation stability objective. This objective, together with the traditional prediction accuracy objective, forms a dual-objective optimization framework. By using the particle swarm optimization algorithm to automatically optimize the parameters of the random forest model, the resulting combined particle swarm and random forest prediction model significantly improves its robustness and trend consistency in rolling extrapolation prediction while ensuring prediction accuracy. This effectively solves the performance instability problem caused by overfitting historical fluctuations in general prediction models in long-term time-series prediction, and provides a core model guarantee for generating reliable price benchmark curves that span the entire quota cycle. This invention employs a quantile regression model capable of outputting a prediction interval, and embeds the prediction interval width (representing uncertainty) and time decay factor into a dynamic weighting calculation formula. This set of uncertainty-aware intelligent weighted synthesis rules enables the automatic assignment of higher weights to recent, high-confidence predictions when synthesizing multiple future predictions to form a single optimal unit price. Simultaneously, it significantly reduces interference from long-term and highly uncertain predictions. This fundamentally surpasses the limitations of traditional simple averaging or fixed-weight averaging methods, making the final determined material benchmark unit price closer to highly reliable market expectations. It significantly reduces the budget risk implied by uneven prediction quality, providing a scientific and reliable decision-making basis for refined cost management of water conservancy project maintenance. Attached Figure Description
[0014] Figure 1 This is a schematic diagram of the overall method flow of the present invention; Figure 2 This is a scatter plot of the comprehensive weight-decay rate parameter of this invention; Figure 3 This is a curve showing the predicted interval width versus the overall weight fitting of the present invention. Figure 4 This is a parallel coordinate graph of the comprehensive weight, predicted unit price, and optimal quota unit price of this invention. Figure 5 This is a normal probability diagram of the predicted unit price value of this invention. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0016] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0017] Example: Please see Figures 1-5 The present invention provides a technical solution: A method for calculating the unit price of materials in the maintenance and upkeep quota of water conservancy projects, the specific steps of which include: Step 1: For the target material, collect its historical unit price and influencing factors, calculate the statistical contribution of each influencing factor to the historical unit price, extract the functional attributes and market maturity of the target material and quantify them into a comprehensive field adjustment factor, set the contribution threshold based on the type of the target material and the comprehensive field adjustment factor, screen the influencing factors with a statistical contribution higher than the contribution threshold, and output them as key features; In a specific implementation, the identification and screening of key influencing factors of the target material are involved. The purpose is to extract core features that have significant and stable explanatory power for the unit price of the material from a large number of potential influencing factors, so as to lay the foundation for the subsequent construction of a high-precision prediction model. To achieve this goal, this step needs to complete five specific operation steps in sequence: data collection, contribution measurement, domain factor synthesis, dynamic threshold setting, and key feature screening. Factors influencing the unit price of target materials include macroeconomic factors, regional policies and environmental factors, market supply and demand factors, and transportation and logistics factors. Macroeconomic factors include indicators reflecting the level of regional economic development and the prosperity of the construction industry. Regional policies and environmental factors include indicators reflecting the environmental quality and the intensity of environmental protection policies. Market supply and demand factors include indicators reflecting the activity of building materials market transactions and the balance between supply and demand. Transportation and logistics factors include indicators reflecting the cost of material transportation and logistics efficiency. The first step is data collection. For a specific target material, the system needs to collect two types of historical data: First, it needs to collect the average market purchase price of the material for the past twenty consecutive quarters (a total of sixty months), forming a historical price series of 20 periods. This series constitutes the core target variable for prediction. Second, it needs to collect multi-dimensional influencing factor data corresponding to the above twenty quarters. To ensure that all data are strictly aligned in time, all influencing factor indicators are uniformly processed or converted into quarterly frequency values. These indicators need to cover four categories: macroeconomic factors, regional policy and environmental factors, market supply and demand factors, and transportation and logistics factors. The macroeconomic factors include the quarterly average of the national steel price composite index and the cumulative quarterly value of the total construction output of major material-consuming provinces. Regional policy and environmental factors include the number of environmental administrative penalty cases announced by the ecological and environmental departments in the provinces where the main material-producing areas are located each quarter, and the quarterly average PM2.5 concentration in the region. Market supply and demand factors specifically refer to the quarterly average inventory turnover rate of the material in major national building materials trading markets, such as East China and South China, i.e., the ratio of average inventory to sales volume within a quarter. Transportation and logistics factors specifically refer to the quarterly diesel price index released by the National Bureau of Statistics and the quarterly highway freight rate index reflecting the cost of trunk logistics nationwide. All the collected quarterly frequency data must undergo standardized preprocessing before being input into the model: for each indicator's data sequence, its historical average and standard deviation across the twenty quarters are calculated. Then, the mean of the sequence is subtracted from each raw data point, and the result is divided by its standard deviation to generate standard data with a mean of 0 and a standard deviation of 1, thus eliminating differences in dimensions and orders of magnitude between different indicators. The specific logic for setting a dynamic contribution threshold based on the functional attributes and market maturity of the target material is as follows: Based on the functional attributes of the target material in water conservancy projects, it is classified into key structural materials, general auxiliary materials, or consumable repair materials, with the functional importance coefficients of the three decreasing in that order; Based on the market maturity of the target material, it is classified into mature commodity materials, semi-customized materials, or special customized materials, with the market maturity coefficients of the three decreasing in that order. Based on the functional importance coefficient and market maturity coefficient of the target material, the comprehensive domain adjustment factor of the target material is calculated by weighting. The next step is to measure the statistical contribution. This step uses the random forest algorithm to evaluate the statistical contribution of each influencing factor. Specifically, the standardized historical unit price for sixty months is used as the dependent variable, and all influencing factor indicators after processing are used as independent variables. A random forest regression model containing one hundred decision trees is constructed and trained. After the random forest regression model is trained, its built-in feature importance measurement results are extracted. This measurement is calculated based on the sum of the reduction in impurity (or the reduction in mean squared error) brought about by each feature when splitting at all decision tree nodes. The importance score of each feature is normalized so that its sum is 1. The normalized score is defined as the statistical contribution of the influencing factor to the historical unit price. The statistical contribution is a value between 0 and 1. The larger the value, the stronger the statistical correlation between the factor and the historical unit price fluctuation. The next step is the synthesis of comprehensive domain factors. This step aims to quantify the inherent engineering and market attributes of the target material, providing a basis for subsequent dynamic threshold setting. The synthesis process consists of two parallel quantification steps: first, assigning a functional importance coefficient (0.9, 0.6, 0.3), and second, assigning a market maturity coefficient (0.9, 0.6, 0.3). The functional importance coefficient is determined based on the material's structural criticality in hydraulic engineering structures, its design service life, and the consequences of failure: if the material is used in key load-bearing or seepage-proof structures such as the main body of the dam, core gate chamber, and main water conveyance pipeline, and its failure will directly endanger the safety or main function of the project, it is defined as a key structural material and assigned a functional importance coefficient of 0.9; if the material is used in non-core load-bearing parts such as slope protection, guide walls, and general grouting, its function is auxiliary and it is defined as a general auxiliary material, assigned a coefficient of 0.6; if the material is only used in non-structural occasions such as surface coating and temporary crack repair, its function is consumable and it is defined as a consumable repair material, assigned a coefficient of 0.3. The market maturity coefficient is determined based on the standardization of materials, market supply structure, and price formation transparency: If a material has unified national or industry standards, numerous manufacturers, sufficient market competition, and strong product substitutability, it is defined as a mature commodity material, with a market maturity coefficient of 0.9; if a material requires a certain degree of customization according to engineering design requirements and the number of suppliers is limited, it is defined as a semi-custom material, with a coefficient of 0.6; if a material requires specialized smelting, processing, or formulation entirely according to specific engineering drawings and the supplier is extremely specialized, it is defined as a special customized material, with a coefficient of 0.3. After obtaining the above two coefficients, a comprehensive domain adjustment factor is calculated through a preset weighting formula. This weighting formula sets the weight of functional importance to 0.7 and the weight of market maturity to 0.3, with the sum of the two weights being 1. The purpose of this invention is to calculate the unit price of materials for water conservancy project maintenance quotas. Its core principle is to ensure the safety and functional realization of the project while taking into account economic rationality. Functional importance is directly related to the degree of impact of material failure on the safety, lifespan and functional integrity of the project. It is a decisive factor that needs to be given priority and key consideration in quota calculation. Market maturity mainly affects the stability, predictability and procurement risk of material prices. It is an economic factor that needs to be considered in a comprehensive manner. Price fluctuations in key structural materials, even if small, can lead to a reduction in material selection standards due to budget deviations, thereby introducing unacceptable safety risks or long-term operation and maintenance costs. Therefore, in feature screening, stricter and more prudent standards must be adopted for such materials to focus on the core drivers of their cost structure and assign a higher weight to functional importance (0.7) to highlight the engineering safety orientation. Although material prices in mature markets fluctuate, the mechanism is transparent and highly predictable, while the price risk of materials in immature markets is often partially contained in the higher base price. A relatively lower weight is assigned to market maturity (0.3) to reflect its auxiliary adjustment role in price impact. The sum of the two weights is 1, ensuring the standardization of the comprehensive factor calculation. The specific formula for calculating the comprehensive field adjustment factor is: the comprehensive field adjustment factor equals 0.7 multiplied by the functional importance coefficient, plus 0.3 multiplied by the market maturity coefficient. Therefore, the comprehensive field adjustment factor is a specific value ranging from 0.3 to 0.9. Its value comprehensively reflects the criticality of the material in engineering applications and its degree of standardization in market circulation. Setting differentiated contribution thresholds specifically includes: defining the target material as either a price-sensitive bulk material or a price-stable specialty material based on its material type. Price-sensitive bulk materials include, but are not limited to, sand and gravel and cement, while price-stable specialty materials include, but are not limited to, special steel and water-stopping materials. If the comprehensive domain adjustment factor is greater than a preset critical value and the target material is a price-stable specialty material, then the contribution threshold is set to the first contribution threshold; otherwise, the contribution threshold is set to the second contribution threshold. The first contribution threshold is greater than the second contribution threshold. Based on the results of the above steps, we proceed to the dynamic threshold setting step. This step first needs to determine the macro price type of the target material and classify it into one of two categories: price-sensitive bulk materials or price-stable special materials. Among them, sand and gravel, ordinary silicate cement, and other products are classified as price-sensitive bulk materials because of their large market transaction volume and frequent short-term price fluctuations with supply and demand. Special high-strength steel, copper waterstops, and other products are classified as price-stable special materials because of their high technical threshold, relatively stable supply and demand relationship, and prices mostly locked in by long-term contracts. The specific logic for setting the contribution threshold is as follows: a comprehensive field adjustment factor threshold of 0.7 is preset. A higher first contribution threshold of 0.15 is adopted only when the following two conditions are met simultaneously: First, the calculated comprehensive field adjustment factor is greater than 0.7; Second, the target material is determined to be a price-stable special material. The underlying reason for this setting is that for engineering-critical and market-specific materials, their price drivers are often concentrated in a few core, long-term factors. Therefore, a higher threshold needs to be set to screen out the most significant features and avoid interference from irrelevant factors. For cases where none of the above conditions are met, i.e., the material is a price-sensitive bulk material, or its comprehensive field adjustment factor is no greater than 0.7, a lower second contribution threshold of 0.08 is adopted. This is because the price of such materials is affected by more diverse and broader factors, and the threshold needs to be appropriately relaxed to retain more influential features and ensure the comprehensiveness of the prediction model. The first contribution threshold of 0.15 is always greater than the second contribution threshold of 0.08. To calculate the statistical contribution of each influencing factor to the historical unit price, specifically: using the historical unit price as the prediction target and the historical data of all influencing factors as features, train a random forest model, and output the importance value of each feature as the statistical contribution of the corresponding influencing factor. When screening key features, the statistical contribution of each influencing factor is compared with the contribution threshold, and all influencing factors with a statistical contribution higher than the contribution threshold are retained to form key features; Finally, the key feature selection stage involves comparing the statistical contribution of each influencing factor calculated in the contribution quantification stage with the corresponding contribution threshold determined in the dynamic threshold setting stage. For any influencing factor, if its statistical contribution is greater than or equal to the currently set contribution threshold, the factor is identified as a key influencing factor and retained; if its statistical contribution is less than the currently set contribution threshold, the factor is identified as a non-key influencing factor and removed. All retained key influencing factors constitute the final key features, and their corresponding standardized historical data will be used as input data for subsequent predictive model training. Through this series of steps, the transformation from raw data to refined key features is completed, ensuring that the data input to the model has both significant relevance and domain adaptability.
[0018] Step 2: Input the historical data and historical unit price sequence corresponding to the key features into the random forest prediction model, introduce the particle swarm optimization algorithm, aim to minimize the prediction error and maximize the stability of the model in time series extrapolation, and automatically optimize the model to obtain the optimal model parameters, so as to obtain the combined prediction model of particle swarm and random forest. In a specific embodiment of the present invention, the core task of this step is to construct an optimized prediction model, namely a combined prediction model that combines particle swarm optimization algorithm and random forest prediction model. The purpose of this step is to find a set of hyperparameters that can achieve the best balance between accuracy and stability of random forest prediction model through an automated optimization method. The process of automatically optimizing the hyperparameters of the random forest prediction model by introducing the particle swarm optimization algorithm specifically includes: The hyperparameters of the random forest prediction model are encoded as particle position vectors. The hyperparameters include the number of decision trees and the maximum number of features considered when splitting a node. A population consisting of multiple particles is initialized, with each particle representing a set of hyperparameter combinations. Construct a multi-objective composite fitness function This is used to guide the optimization direction of the particle swarm optimization algorithm, where... The mean absolute error of the random forest prediction model using this set of hyperparameters on the validation set for predicting historical unit prices is given. It is the time-series extrapolation stability index, and its value is calculated based on the reciprocal of the coefficient of variation of the prediction error of the model in multiple different historical verification periods; For balanced weighting coefficients; First, it is necessary to clarify the basic structure and input / output of the random forest prediction model. This model is an ensemble machine learning model, and its basic unit is a decision tree. In this invention, the input of the model is the historical data corresponding to the key features obtained after the filtering in step one, specifically a time series matrix, where the number of rows represents the number of historical months and the number of columns represents the number of key features. The output of the model is the predicted value of the future unit price. There are two key hyperparameters that need to be set before training: the first hyperparameter is the number of decision trees, that is, the total number of decision trees contained in the random forest; the second hyperparameter is the maximum number of features considered when splitting nodes, that is, the size of the feature subset randomly extracted from all key features when the model constructs each node of each decision tree. This parameter is expressed as a percentage of the total number of features or a specific integer. The hyperparameters that need to be optimized in the random forest prediction model, namely the number of decision trees and the maximum number of features considered when splitting a node, are encoded into a particle position vector. For example, a particle position vector can be represented as (number of decision trees, maximum number of features). Then, a population of fifty particles is initialized, and the position vector of each particle is randomly generated within a preset range: the search range for the number of decision trees is set to be between fifty and five hundred; the maximum number of features considered when splitting a node is expressed as a percentage of the total number of features, and its search range is set to be between 20% and 100%. Each randomly generated particle position vector represents a specific combination of hyperparameters for the random forest prediction model. The specific calculation formula for the multi-objective composite fitness function is as follows: the fitness value equals the coefficient alpha multiplied by the reciprocal of the mean absolute error, plus the coefficient beta multiplied by the temporal extrapolation stability index; the calculation and origin of the first mean absolute error: the mean absolute error is a core indicator for measuring the prediction accuracy of the model, and its specific calculation process is as follows: During the optimization process, for each combination of hyperparameters represented by the particle position vector, a corresponding temporary random forest prediction model needs to be constructed. For this purpose, a historical validation set needs to be fixed in advance. This historical validation set consists of historical data for twenty-four consecutive months, and these twenty-four months are within the entire historical data period. A unified definition is used, for example, selecting the last 24 months of historical data as a fixed validation set. A temporary model is then used to predict the material unit price for each of these 24 months, resulting in a sequence of predicted values. The mean absolute error (MAE) is the absolute value of the difference between the predicted value and the actual value for each month in this sequence. The arithmetic mean of these differences is then calculated. The MAE ranges from 0 to positive infinity; a smaller MAE indicates higher prediction accuracy on the validation set. Therefore, the fitness function is in its reciprocal form, so that a smaller MAE corresponds to a larger reciprocal term, thus giving a higher evaluation to the high-precision model. Second, the calculation and origin of the temporal extrapolation stability index. The temporal extrapolation stability index is a key indicator for measuring the consistency of a model's predictive performance across different historical periods. Its specific calculation method is as follows: During the optimization process, for each hyperparameter combination represented by a particle, a forward chain verification method similar to that described in claim 5 but with a fixed partition is needed to evaluate its stability. Specifically, all historical data is divided into K consecutive verification segments in chronological order. In this embodiment, K is set to three, and the length L of each verification segment is set to twelve months, representing an annual prediction cycle. During the partitioning, the first verification segment uses data from the 48th month to the 37th month from the end of the historical data period, the second verification segment uses data from the 36th month to the 25th month from the end of the historical data period, and the third verification segment uses data from the 24th month to the 13th month from the end of the historical data period. For each verification segment, using the temporary model corresponding to the current hyperparameter combination, and taking the key feature data of the consecutive B periods before the start of the verification segment as input, the unit price for the L periods within that verification segment is predicted. The verification segment is then predicted, and the average absolute error between the predicted value and the actual value for the twelve months within that verification segment is calculated, denoted as . After obtaining three verification segments , , Next, calculate the coefficient of variation for these three values. The formula for calculating the coefficient of variation is: First, calculate the three... The standard deviation of the values, then calculate three more. The arithmetic mean of the values is calculated, and finally, the standard deviation is divided by the arithmetic mean to obtain the coefficient of variation. Time-series extrapolation stability index It is then defined as the reciprocal of the coefficient of variation, i.e. coefficient of variation This reflects the degree of fluctuation in the average prediction error of the model over different historical periods; the smaller the value, the more stable the model performance. Taking its reciprocal... The larger the value, the higher the time series extrapolation stability of the model; Third, the setting and range of values for the balancing weighting coefficients. and To balance the relative importance of prediction accuracy and stability in the composite fitness function, both are real numbers greater than 0 and can be normalized for easier understanding. In this embodiment, the following settings are used: It is 0.7. The value is set to 0.3, indicating that in the optimization objectives, minimizing the mean absolute error of prediction accuracy accounts for 70% of the weight, while maximizing the stability index of time-series extrapolation accounts for 30%. This weighting can be adjusted between 0 and 1 depending on the emphasis on accuracy and stability in practical applications, but it must meet the following requirements: The normalization conditions are used to ensure the consistency of the optimization objective; In summary, this composite fitness function unifies the two objectives of minimizing prediction error and maximizing temporal stability into a single maximization problem by weighting and summing the reciprocal of the mean absolute error and the temporal extrapolation stability index. This allows the particle swarm optimization algorithm to find the hyperparameter combination that achieves the best balance between accuracy and stability. The particle swarm optimization algorithm parameters are set, including the maximum number of iterations, population size, learning factor, and inertia weight. During the iteration process, the particle swarm optimization algorithm optimizes hyperparameters with the goal of maximizing the composite fitness function value and updates the velocity and position of particles according to the standard particle swarm algorithm. When the maximum number of iterations is reached, the optimization process is terminated, and the hyperparameter combination corresponding to the globally optimal particle position is used as the optimal model parameters to construct the particle swarm-random forest combined prediction model. The algorithm parameters are set as follows: the maximum number of iterations is 100; the population size is 50 particles; both the individual learning factor and the social learning factor are set to 2; the inertia weight is linearly decreased from 0.9 to 0.4. During the iteration process, the algorithm aims to maximize the above composite fitness function value. In each iteration, each particle updates its flight speed and position vector according to its own historical best position and the global historical best position of the population, following the speed and position update formula of the standard particle swarm optimization algorithm, thereby exploring in the hyperparameter space. When the particle swarm optimization algorithm reaches the preset maximum number of iterations of one hundred, the optimization process terminates. At this point, the particle with the highest fitness function value is selected from all iteration history. The number of decision trees corresponding to its position vector and the number of nodes with the largest splitting feature are determined as the optimal model parameters. Finally, using all historical data and this set of optimal model parameters, a brand-new random forest prediction model is retrained. This model, which integrates the optimization results of the particle swarm optimization algorithm and has been fully trained, constitutes the combined prediction model of the particle swarm optimization algorithm and random forest prediction model described in this invention, or simply the particle swarm random forest combined prediction model, and is used for subsequent prediction tasks.
[0019] Step 3: Train and validate the combined prediction model using the forward chain time series cross-validation method until it meets the preset accuracy and stability requirements, and determine the final prediction model; In a specific embodiment of the present invention, the core task of this step is to use the forward chain time series cross-validation method to systematically train and validate the combined prediction model of the particle swarm optimization algorithm random forest prediction model constructed in step two, and finally determine a reliable final prediction model for future prediction based on the preset quantification standard. The specific process of using the forward-chain time series cross-validation method includes: Arrange the historical data of key features and their corresponding historical unit price sequences in chronological order, with a total length of T periods. Starting from the time starting point, divide them into S consecutive and non-overlapping validation segments. Each validation segment contains data from L consecutive periods, where the time interval of the k-th validation segment is the period from the t-th period to the t-th period. Period to the period, and , , , The total length is T periods or less than 60 periods (i.e., five years of data) to ensure that statistical learning has a sufficient sample size; The reason why the forward chain time series cross-validation method must be adopted is that the prediction of material unit price is essentially a time series prediction problem that develops strictly in chronological order. This method divides the training set and the validation set by rolling forward on the historical time axis, which can strictly simulate the scenario of the model predicting the future based on the history in actual application, effectively preventing the leakage of future information during the training stage, and thus making an unbiased evaluation of the model's true predictive ability and stability at unknown time points. It should be noted that the specific implementation process of the forward chain time series cross-validation method is as follows: Assuming we have a historical data series with a total length of 72 periods, from the first period to the seventy-second period, with each period representing a natural month, we first divide the validation segments: we set the length L of each validation segment to 12 periods, representing a complete annual prediction cycle, and set the total number of validation segments S to five. Starting from the time starting point, we divide the data into five consecutive and non-overlapping validation segments. Specifically, the first validation segment covers the first to the twelfth period, the second validation segment covers the thirteenth to the twenty-fourth period, the third validation segment covers the twenty-fifth to the thirty-sixth period, the fourth validation segment covers the thirty-seventh to the forty-eighth period, and the fifth validation segment covers the forty-ninth to the sixtieth period. Finally, the sixty-first to seventy-second periods are reserved as the final independent test segments after the model is determined and do not participate in this cross-validation process. For the The first to second validation segments were used during the training phase. Period, total The training set is constructed using historical data from the specified period. The construction of the training set includes: for any data that satisfies... The starting point of the conditions Take the first Period to the Historical data of key features from consecutive B-period periods constitute the input of a training sample, and the first... Period to the The output of this training sample consists of the historical unit price of the target material in L consecutive periods. The verification phase begins with the first Period to the The key feature data of the first period are used as input to the trained combined prediction model, which outputs the prediction data for the second period. Period to the The predicted sequence of the target material unit price is compared with the actual historical unit price sequence, and the prediction performance index of the validation segment is calculated. For each validation segment, for example, the third validation segment (phases 25 to 36), the operation includes two phases: training and validation. During the training phase, all historical data prior to the start time of the validation period, i.e., periods 1 to 24, are used to construct the training sample set. The construction of the training samples follows a fixed sliding window rule: the historical window length B is set to 24 periods, and the starting time s is taken. The value of s starts from period 25 and ends at period 36 minus 12, i.e., period 24, but s must be greater than 1 / 24. Therefore, the actual effective value of s is the 25th period. When s is the 25th period, the value of the 25th period is taken as the 25th period. Period to the The historical data of key features from period two to period twenty-four consecutive periods are used as input for a training sample; the data from the second to the twenty-fifth period are then used. Period to the The historical unit price of the 26th to 37th consecutive period is used as the output label of the training sample. By sliding s, multiple such input-output sample pairs can be constructed for training the model. During the verification phase, the first Period to the The key features of the historical data are input into the pre-trained combined prediction model. For the third validation period, Since this is the 25th period, the input data consists of the key features from the 1st to the 24th period. The model will output a predicted sequence of the target material unit price for the 25th to the 36th period, a total of 12 periods. By comparing this predicted sequence with the actual historical unit price sequence for the 12 periods in the third validation segment, the prediction performance index of the validation segment, such as the mean absolute error, can be calculated. Mean absolute error is a key indicator for measuring the accuracy of model prediction. It means the average level of the absolute deviation between the predicted unit price and the actual value of the model in each period within a specific validation period. It directly reflects the magnitude of the average error of the model prediction. The lower the value, the higher the prediction accuracy. The specific calculation process for the mean absolute error is as follows: For a given validation period containing historical data for L consecutive periods, the predicted value of the trained model for each period of the validation period is compared with the actual historical unit price for each period of the validation period. Let's assume the actual unit price for the j-th period in the validation period is... The model gives the corresponding predicted unit price as follows: Then the absolute error for that period is The mean absolute error is the arithmetic mean of the absolute errors of all L periods within the validation period; its calculation formula is: mean absolute error equals... Where L is the total number of periods contained in the verification segment. ; The mean absolute error ranges from 0 to positive infinity. The smaller the value, the closer the model's predicted value is to the true value in the validation period, and the higher the prediction accuracy. When the mean absolute error is equal to 0, it means that the model has achieved a completely accurate prediction, but this is extremely rare in practical applications. In the material unit price prediction scenario described in this invention, the mean absolute error is represented and evaluated by a specific value that is a reasonable proportion of the unit price. For example, if the unit price of a certain material fluctuates around 1,000 yuan per ton for many years, then a mean absolute error of 50 yuan per ton would be considered an acceptable level of accuracy. After evaluating all validation segments, the arithmetic mean of the average absolute error of all validation segments can be calculated to obtain the overall accuracy performance of the model in the entire cross-validation process, which is used to determine whether it meets the preset first threshold requirement. After completing the above operations for all five validation segments, the performance of the combined prediction model is comprehensively evaluated. The model must meet the preset accuracy and stability requirements, and must simultaneously satisfy two explicit quantitative conditions: After completing the above operations for all S validation segments, a comprehensive evaluation of the combined prediction model is performed. The combined prediction model meets the preset accuracy and stability requirements, meaning it simultaneously satisfies: First, the mean absolute error calculated across all validation segments during the entire cross-validation process is... First, the mean value is lower than a preset first threshold; second, the time-series extrapolation stability index calculated based on the prediction error sequences of all verification segments. The combined prediction model is determined to have completed its training and validation when it meets both of the two conditions, and is thus identified as the final prediction model. First, the accuracy condition is to calculate the average absolute error of each of the five verification segments and then calculate their arithmetic mean. This average must be lower than a preset first threshold. In this embodiment, the first threshold is set to 0.15. This means that the average level of the prediction error of the model in all verification periods must be controlled within plus or minus 15 percent of the actual unit price. Second, the stability condition involves collecting the prediction errors for each period in all validation segments to form a complete total error sequence. Based on this total error sequence, the time-series extrapolation stability index is calculated. The calculation method is as follows: first, calculate the coefficient of variation of the total error sequence, and then the time-series extrapolation stability index is equal to the reciprocal of the coefficient of variation. This index must be higher than the preset second threshold. In this embodiment, the second threshold is set to 2. A higher stability index means that the prediction error of the model fluctuates less in different periods and the performance is more reliable. The training and validation of the combined prediction model can be determined to be complete only when the trained model satisfies both of the above conditions. Then, using all available historical data from the seventy-two periods and the optimal model parameters determined in step two, the random forest prediction model is retrained. This retrained model, which has been rigorously validated and meets the performance standards, is officially determined as the final prediction model for calculating the unit price of materials for water conservancy engineering maintenance quotas.
[0020] Step 4: Using the current data of key features as the input of the final prediction model, the rolling window mechanism is used to predict the future material unit price and its prediction interval sequence. Based on the time decay weighted synthesis rule, each prediction interval sequence is analyzed to calculate the optimal unit price, which is used as the material unit price of the water conservancy project maintenance quota. In a specific embodiment of the present invention, the core task of this step is to use the determined final prediction model to perform rolling prediction of future material unit prices, and to calculate a robust optimal unit price for quota compilation by combining the prediction results of each period. The specific method for predicting the unit price of target materials using the rolling window mechanism is as follows: Taking the current time point for quota calculation as the benchmark, denoted as period t, the first forecast will use the period t. The actual key features of B consecutive periods from period t to period t are input into the final prediction model, and the final prediction model predicts the period t. Period to the Forecast values of target material unit prices and their forecast ranges for the period; First, a rolling window mechanism is used for multi-period forward forecasting. The current time node for quota calculation is taken as the benchmark, denoted as period t. The historical observation window length B of the model is set to 24 periods, and the prediction step size L is 12 periods. During the first forecast, the actual key feature data of the most recent 24 consecutive periods from period t minus 24 plus one to period t are input into the final forecast model. The model will output a sequence of predicted unit prices of target materials for the next 12 periods from period t plus one to period t plus 12. At the same time, it will output the prediction interval corresponding to the predicted value of each period. The prediction interval represents the uncertainty range of the model's prediction. The generation principle is that the final forecast model is an integration of multiple decision trees. For a specific period in the future, each decision tree will give a predicted value. The quantiles of the distribution formed by the predicted values of all decision trees are used to determine the upper and lower limits of the interval. When the first After obtaining the actual material unit price for the period, slide the input window forward by L periods to use the [number]th period. Period to the Using the latest key features of period B as input, predict the next period. Period to the The target material unit price forecast and its forecast range for the period are obtained; this rolling forecast process is repeated until a target material unit price forecast sequence covering N consecutive future periods is obtained, where N is an integer multiple of L; Specifically, once the actual time progresses and the real material unit price data for period t+12 is obtained, the next rolling forecast is initiated. At this time, the input window is slid backward 12 periods, and the historical data of the latest 24 periods of actual key features from period t+1 to period t+12 are used as the model input. The final forecast model is called again to predict the target material unit price forecast value and its forecast interval for the next 12 periods, i.e., period t+13 to period t+24. This rolling forecast process is repeated until a target material unit price forecast sequence and its corresponding forecast interval sequence covering the next N consecutive periods are obtained, where N is an integer multiple of the forecast step size L. For example, when the quota unit price for the next 36 months is needed, N is set to 36, which is achieved through three consecutive rolling forecasts. Regarding the input data in the rolling window prediction mechanism, the first... The actual key features for a continuous B periods from period t to period t refer to a matrix with dimension B multiplied by m, where B is twenty-four, representing a historical observation window of twenty-four months, and m is the number of key features obtained through the screening in step one. Each row of this matrix represents a historical month, and each column represents a key feature variable. This matrix is all the known state information on which the model makes forward predictions. The prediction interval is achieved through the final prediction model, which predicts the unit price for the i-th period. Its prediction interval is ,in To predict the lower limit, Let be the upper limit of the prediction; define the width of the prediction interval for period i as . This width is used to quantify the uncertainty of the model's prediction results for this period; Regarding the generation mechanism of the prediction interval, the prediction interval is not directly output, but is derived statistically from the distribution of prediction results of a large number of decision trees integrated within the final prediction model. Specifically, it utilizes an empirical distribution formed by Q discrete prediction values (considered a discrete distribution). The interval is defined by finding the value corresponding to a specific percentile in this discrete distribution. For the i-th period, each decision tree in the model generates an independent prediction value based on its own rules. Assuming there are Q decision trees in the forest, Q prediction values will be generated. These Q prediction values are considered a sample set, which constitutes an empirical prediction distribution of the unit price for the i-th period. This distribution reflects the differences in judgments made by different decision trees regarding the same prediction target. To obtain a prediction interval with a specific confidence level (e.g., 95%), these Q prediction values are sorted from smallest to largest. The lower quantile, such as the value at the 2.5% position, is taken from this sorted sequence as the lower prediction limit. This means that approximately 2.5% of the tree predictions are lower than this value; the value located at the middle quantile (e.g., 50%, or the median) is taken as the point prediction value. Take the highest quantile, such as 97.5%, and use that value as the upper limit for prediction. This means that approximately 97.5% of the trees are predicted to be priced lower than this value. and A prediction interval was defined together, and the prediction interval width was... The size of the interval is directly determined by the dispersion of the Q predicted values. If the predicted values of each decision tree are highly consistent (small dispersion), the interval is narrow, indicating high consensus within the model and high prediction certainty. Conversely, if the predicted values of each tree are large (large dispersion), the interval is wide, indicating large disagreement within the model and high prediction uncertainty. Prediction interval width equal minus This quantile-based method directly quantifies the degree of dispersion of the prediction for that period within the model. The wider the interval, the greater the disagreement among the decision trees within the model, and the higher the overall prediction uncertainty.
[0021] Furthermore, the optimal unit price is calculated using the time decay weighted synthesis rule, specifically including: Based on the obtained forecast interval sequence for N consecutive future periods, the forecast interval width for each period is extracted. Where i is the period index from period 1 to period N in the future, and the predicted interval width is... Combined with the time decay factor, this yields the predicted unit price for the i-th period. Calculate the overall weight : ,in, For the attenuation rate parameter, Constitutes the time decay factor, Factors constituting predictive uncertainty; Price forecast for the next N periods The optimal unit price is obtained by performing a weighted average, and the formula is as follows: ,in The optimal unit price; First, The term represents the time decay factor, and the parameter is... This is called the decay rate parameter, and its value is greater than 0. 'i' is the period index, starting from 1 representing the nearest future and increasing exponentially. This parameter decays exponentially as 'i' increases, reflecting the economic principle that the reference value of long-term forecasts for current decisions decreases with increasing time distance. The larger the value, the faster the decay, and the more the weights concentrate on recent individuals; secondly, The term represents the prediction uncertainty factor. For the prediction interval width, this term means that for periods with wide prediction intervals and low certainty, the weight assigned to their predicted values in the synthesis will be suppressed. The denominator of the formula is the sum of calculations performed on all N future periods, which serves to normalize and ensure that the sum of all weights is one, thus achieving the optimal unit price. It is a meaningful weighted average; Table 1 shows the specific data for some period numbers and the optimal fixed unit price.
[0022] Table 1 Statistical Table of Optimal Quota Unit Price Data Analysis of the first fifteen rows of data revealed a clear correlation between the parameters. Firstly, when analyzing the relationship between the prediction interval width and the overall weight, a larger prediction interval width generally corresponds to a smaller overall weight. For example, data with period number 1 has a prediction interval width of 4.755 and a corresponding overall weight of 0.021; while data with period number 8 has a prediction interval width of 1.273, and its overall weight rises to 0.075. This indicates that when the model's prediction accuracy for a certain period is low and the uncertainty is high, the proportion of that period's predicted value in the final fixed unit price calculation will be systematically reduced. Secondly, when examining the impact of the decay rate parameter on weight allocation, the data reveals a clear pattern: periods with higher decay rate parameters tend to have their overall weight suppressed to a lower level. For example, data with period number 4 has a decay rate parameter of 0.100, and although the prediction interval width is only 1.522, its overall weight is only 0.016. In contrast, data with period number 3 has a decay rate parameter of 0.010, and with a similar prediction interval width, its overall weight is as high as 0.121. This reflects that for materials with drastic historical price fluctuations, the calculation rules will give a stronger effect to time decay, which will rapidly weaken the contribution of long-term predictions, and the entire pricing will focus more on recent information.
[0023] Further analysis of the combined effects of period number, decay rate, and weight reveals that a higher decay rate parameter significantly exacerbates the trend of decreasing weight as the number of periods increases. For example, for data with periods 7 and 10, the decay rate parameter is 0.100. As the period increases from 7 to 10, the combined weight drops sharply from 0.008 to 0.002. In contrast, in sequences with lower decay rate parameters, the decrease in weight is much more gradual. This reflects the core role of the dynamic adjustment mechanism, which adaptively adjusts the utilization strategy of future forecast information based on the historical fluctuation characteristics of the material itself, thereby achieving a balance between stability and timeliness in price trend extrapolation.
[0024] Determine the attenuation rate parameter The specific method for calculating the value is as follows: calculate the volatility of the historical unit price series of the target material over the past M periods. , Defined as the ratio of the standard deviation of the historical unit price series for period M to its mean, based on... The preset threshold range is determined. value: when At that time, take ;when At that time, take ;when At that time, take ,in and The preset high and low volatility thresholds, , and These are the preset attenuation rate parameters, high, medium, and low thresholds, respectively. , This mechanism enables the weighted synthesis rule to be based on the volatility of the historical unit price of the target material. Dynamically adjust its attenuation rate parameter ; Regarding the attenuation rate parameter The dynamic determination method for the volatility threshold and The setting is based on statistical analysis of historical price data for a large amount of commonly used materials in water conservancy projects. Through observation and statistical analysis of the price variation coefficients of materials such as cement, steel, sand, and water-stopping materials over the past sixty months, it was found that the monthly price volatility of most materials is concentrated between 5% and 15%. Therefore, [the following is a more detailed analysis, but the text is incomplete and requires further context]. Set it to 0.05, The value is set to 0.15 to classify materials into three typical types: low volatility, medium volatility, and high volatility; correspondingly, the decay rate parameter... The value is set as follows: low fluctuation scenario The value is 0.01, representing a medium fluctuation scenario. 0.05, high fluctuation scenario The logic behind setting it to 0.1 is that for materials with stable historical prices, their future trends will be more gradual, so long-term forecasts can be referenced more equally (slow decay); for materials with volatile historical prices, their future uncertainty is higher, so more emphasis should be placed on the relatively more reliable recent forecasts (fast decay). This series of thresholds and parameters together constitute a closed-loop control mechanism that adaptively adjusts the weight allocation strategy according to the material's characteristics. Through this dynamic adjustment mechanism, the weighted synthesis rule can adaptively respond to the price behavior characteristics of different materials, thereby calculating a robust optimal unit price that takes into account both the time value of money and the reliability of prediction, which serves as the material unit price for the maintenance and repair quota of water conservancy projects.
[0025] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0026] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.
[0027] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0028] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for calculating the unit price of materials in the maintenance and upkeep quota of water conservancy projects, characterized in that, The specific steps include: Step 1: For the target material, collect its historical unit price and influencing factors, calculate the statistical contribution of each influencing factor to the historical unit price, extract the functional attributes and market maturity of the target material and quantify them into a comprehensive field adjustment factor, set the contribution threshold based on the type of the target material and the comprehensive field adjustment factor, screen the influencing factors with a statistical contribution higher than the contribution threshold, and output them as key features; Step 2: Input the historical data and historical unit price sequence corresponding to the key features into the random forest prediction model, introduce the particle swarm optimization algorithm, aim to minimize the prediction error and maximize the stability of the model in time series extrapolation, and automatically optimize the model to obtain the optimal model parameters, so as to obtain the combined prediction model of particle swarm and random forest. Step 3: Train and validate the combined prediction model using the forward chain time series cross-validation method until it meets the preset accuracy and stability requirements, and determine the final prediction model; Step 4: Using the current data of key features as input to the final prediction model, a rolling window mechanism is used to predict the future material unit price and its prediction interval sequence. Based on the time decay weighted synthesis rule, each prediction interval sequence is analyzed to calculate the optimal unit price, which is used as the material unit price for the maintenance quota of water conservancy projects.
2. The method for calculating the unit price of materials in the maintenance and upkeep quota of water conservancy projects according to claim 1, characterized in that: Factors influencing the unit price of target materials include macroeconomic factors, regional policies and environmental factors, market supply and demand factors, and transportation and logistics factors. Macroeconomic factors include indicators reflecting the level of regional economic development and the prosperity of the construction industry. Regional policies and environmental factors include indicators reflecting the environmental quality and the intensity of environmental protection policies. Market supply and demand factors include indicators reflecting the activity of building materials market transactions and the balance between supply and demand. Transportation and logistics factors include indicators reflecting the cost of material transportation and logistics efficiency. Based on the functional attributes and market maturity of the target material, the specific logic for setting a dynamic contribution threshold is as follows: based on the functional attributes of the target material in water conservancy projects, it is divided into key structural materials, general auxiliary materials or consumable repair materials, and the functional importance coefficients of the three decrease in that order. Based on the market maturity of the target materials, they are classified into mature commodity materials, semi-customized materials, or special customized materials, with the market maturity coefficients of the three decreasing in that order. The comprehensive domain adjustment factor of the target material is calculated by weighting the functional importance coefficient and market maturity coefficient of the target material.
3. The method for calculating the unit price of materials in the maintenance and upkeep quota of water conservancy projects according to claim 2, characterized in that: Setting differentiated contribution thresholds specifically includes: defining the target material as either a price-sensitive bulk material or a price-stable specialty material based on its material type. Price-sensitive bulk materials include, but are not limited to, sand and gravel and cement, while price-stable specialty materials include, but are not limited to, special steel and water-stopping materials. If the comprehensive domain adjustment factor is greater than a preset critical value and the target material is a price-stable specialty material, then the contribution threshold is set to the first contribution threshold; otherwise, the contribution threshold is set to the second contribution threshold. The first contribution threshold is greater than the second contribution threshold. To calculate the statistical contribution of each influencing factor to the historical unit price, specifically: using the historical unit price as the prediction target and the historical data of all influencing factors as features, train a random forest model, and output the importance value of each feature as the statistical contribution of the corresponding influencing factor. When screening key features, the statistical contribution of each influencing factor is compared with the contribution threshold. All influencing factors with a statistical contribution higher than the contribution threshold are retained to form key features.
4. The method for calculating the unit price of materials in the maintenance and upkeep quota of water conservancy projects according to claim 3, characterized in that: The process of automatically optimizing the hyperparameters of the random forest prediction model by introducing the particle swarm optimization algorithm specifically includes: The hyperparameters of the random forest prediction model are encoded as particle position vectors. The hyperparameters include the number of decision trees and the maximum number of features considered when splitting a node. A population consisting of multiple particles is initialized, with each particle representing a set of hyperparameter combinations. Construct a multi-objective composite fitness function This is used to guide the optimization direction of the particle swarm optimization algorithm, where... The mean absolute error of the random forest prediction model using this set of hyperparameters on the validation set for predicting historical unit prices is given. It is the time-series extrapolation stability index, and its value is calculated based on the reciprocal of the coefficient of variation of the prediction error of the model in multiple different historical verification periods; For balanced weighting coefficients; The particle swarm optimization algorithm parameters are set, including the maximum number of iterations, population size, learning factor, and inertia weight. During the iteration process, the particle swarm optimization algorithm optimizes hyperparameters with the goal of maximizing the composite fitness function value and updates the velocity and position of particles according to the standard particle swarm algorithm. When the maximum number of iterations is reached, the optimization process is terminated, and the hyperparameter combination corresponding to the globally optimal particle position is used as the optimal model parameters to construct the particle swarm-random forest combined prediction model.
5. The method for calculating the unit price of materials in the maintenance and upkeep quota of water conservancy projects according to claim 4, characterized in that: The specific process of using the forward-chain time series cross-validation method includes: Arrange the historical data of key features and their corresponding historical unit price sequences in chronological order, with a total length of T periods. Starting from the time starting point, divide them into S consecutive and non-overlapping validation segments. Each validation segment contains data from L consecutive periods, where the time interval of the k-th validation segment is the period from the t-th period to the t-th period. Period to the period, and , , , ; For the The first to second validation segments were used during the training phase. Period, total The training set is constructed using historical data from the specified period. The construction of the training set includes: for any data that satisfies... The starting point of the conditions Take the first Period to the Historical data of key features from consecutive B-period periods constitute the input of a training sample, and the first... Period to the The output of this training sample consists of the historical unit price of the target material in L consecutive periods. The verification phase begins with the first Period to the The key feature data of the first period are used as input to the trained combined prediction model, which outputs the prediction data for the second period. Period to the The predicted sequence of the target material unit price is compared with the actual historical unit price sequence, and the prediction performance index of the validation segment is calculated. After completing the above operations for all S validation segments, a comprehensive evaluation of the combined prediction model is performed. The combined prediction model meets the preset accuracy and stability requirements, meaning it simultaneously satisfies: First, the mean absolute error calculated across all validation segments during the entire cross-validation process is... First, the mean value is lower than a preset first threshold; second, the time-series extrapolation stability index calculated based on the prediction error sequences of all verification segments. The combined prediction model is determined to be the final prediction model when it meets both of the two conditions, which are higher than the preset second threshold.
6. The method for calculating the unit price of materials in the maintenance and upkeep quota of water conservancy projects according to claim 5, characterized in that: The specific method for predicting the unit price of target materials using the rolling window mechanism is as follows: Taking the current time point for quota calculation as the benchmark, denoted as period t, the first forecast will use the period t. The actual key features of B consecutive periods from period t to period t are input into the final prediction model, and the final prediction model predicts the period t. Period to the Forecast values of target material unit prices and their forecast ranges for the period; When the first After obtaining the actual material unit price for the period, slide the input window forward by L periods to use the [number]th period. Period to the Using the latest key features of period B as input, predict the next period. Period to the The target material unit price forecast and its forecast range for the period are obtained; this rolling forecast process is repeated until a target material unit price forecast sequence covering N consecutive future periods is obtained, where N is an integer multiple of L; The prediction interval is achieved through the final prediction model, which predicts the unit price for the i-th period. Its prediction interval is ,in To predict the lower limit, This is the upper limit of the prediction; Define the prediction interval width for period i as This width is used to quantify the uncertainty of the model's prediction results for that period.
7. The method for calculating the unit price of materials in the maintenance and upkeep quota of water conservancy projects according to claim 6, characterized in that: The optimal unit price is calculated using the time decay weighted composite rule, specifically including: Based on the obtained forecast interval sequence for N consecutive future periods, the forecast interval width for each period is extracted. Where i is the period index from period 1 to period N in the future, and the predicted interval width is... Combined with the time decay factor, this yields the predicted unit price for the i-th period. Calculate the overall weight : ,in, For the attenuation rate parameter, Constitutes the time decay factor, Factors constituting predictive uncertainty; Price forecast for the next N periods The optimal unit price is obtained by performing a weighted average, and the formula is as follows: ,in The optimal unit price; Determine the attenuation rate parameter The specific method for calculating the value is as follows: calculate the volatility of the historical unit price series of the target material over the past M periods. , Defined as the ratio of the standard deviation of the historical unit price series for period M to its mean, based on... The preset threshold range is determined. value: when At that time, take ;when At that time, take ;when At that time, take ,in and The preset high and low volatility thresholds, , and These are the preset attenuation rate parameters, high, medium, and low thresholds, respectively. , This mechanism enables the weighted synthesis rule to be based on the volatility of the historical unit price of the target material. Dynamically adjust its attenuation rate parameter .