A method and device for predicting underground pipeline maintenance based on decision tree feature combination

Through the method based on the combination of decision tree features, an underground pipeline maintenance prediction model is constructed, which solves the problems of low maintenance efficiency and insufficient accuracy in the existing technology, and achieves more efficient and accurate pipeline maintenance prediction and dynamic maintenance management.

CN118798431BActive Publication Date: 2025-04-29SHENHUA BEIDIAN SHENGLI ENERGY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410943007.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2025-04-29
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

The prior art has low efficiency, insufficient accuracy and foresight in underground pipeline maintenance, and machine learning algorithms have overfitting problems when processing high-dimensional data and complex relationships, resulting in inaccurate prediction results.

Method used

The underground pipeline maintenance prediction method based on decision tree feature combination is adopted. By acquiring and preprocessing pipeline data, associated features are extracted and combined features are generated, target feature combination decision tree model is constructed, and cross-validation is used for training and optimization.

Benefits of technology

It significantly improves the accuracy and generalization ability of pipeline maintenance prediction, enhances the flexibility and foresight of the model, reduces omissions and misjudgments in the prediction process, improves maintenance efficiency and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118798431B_ABST
    Figure CN118798431B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of pipeline maintenance prediction, and in particular discloses a method and device for predicting underground pipeline maintenance based on decision tree feature combination, the method comprising obtaining a prediction data set for underground pipeline maintenance, and dividing the prediction data set to generate a training set, a test set, and a validation set; extracting associated features from the prediction data set to generate combination features, and constructing a target feature combination decision tree model based on the combination features; using a cross-validation method to train and optimize the model based on the training set and the test set, and validating the target feature combination decision tree model based on the validation set; applying the target feature combination decision tree model, and outputting pipeline prediction results. The present invention can accurately capture the combined effect of multiple features, strengthen the prediction ability of the model, and realize accurate prediction of underground pipeline maintenance, while also being able to efficiently process complex data patterns and relationships, and ensure that both prediction accuracy and generalization ability are given equal weight without increasing the complexity of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pipeline maintenance prediction, and in particular to an underground pipeline maintenance prediction method and device based on decision tree feature combination. Background Art

[0002] With the rapid advancement of urbanization, the complexity and importance of underground pipeline systems as an important part of urban infrastructure are becoming increasingly prominent. Underground pipelines are of various types, widely distributed and highly concealed. In addition, due to the dual influence of natural environment and human factors, pipeline failures and pipeline accidents occur frequently. Therefore, the need for maintenance prediction of underground pipelines has become particularly urgent.

[0003] Manual inspection and regular maintenance are the main means of traditional pipeline maintenance. Although manual inspection can ensure safety to a certain extent, it is limited by personnel ability and experience. When faced with complex pipeline systems and highly concealed areas, it is difficult to fully and accurately assess the pipeline status, and it is easy to miss or misjudge. Although regular maintenance can find some problems, it lacks pertinence and foresight, and cannot flexibly respond to the actual operation and maintenance needs of the pipeline.

[0004] At present, with the development of technology, machine learning algorithms have been introduced into the field of pipeline maintenance, which predict pipeline conditions by analyzing historical and real-time data and provide early warning of potential problems. However, existing algorithms are still insufficient in processing high-dimensional data and complex relationships, and are prone to overfitting, resulting in inaccurate prediction results, which limits their effectiveness in practical applications.

[0005] Therefore, the complexity and concealment of underground pipeline systems and the dual influence of natural and human factors make traditional maintenance methods inadequate. Although emerging machine learning algorithms have potential, they also face technical bottlenecks. Exploring more efficient, accurate and flexible pipeline maintenance prediction methods has become an urgent problem to be solved. Summary of the invention

[0006] The purpose of the present invention is to overcome the problems of low efficiency, lack of accuracy and predictability in manual inspection and regular maintenance of underground pipelines in the prior art, and to provide an underground pipeline maintenance prediction method and device based on decision tree feature combination, which can accurately capture the complex relationships and potential risks in pipeline operation, and improve the accuracy, practicality and maintenance efficiency of the prediction.

[0007] The purpose of the present invention is achieved through the following technical solutions:

[0008] A method for predicting underground pipeline maintenance based on decision tree feature combination, comprising:

[0009] Obtaining a prediction data set for underground pipeline maintenance, and dividing the prediction data set into a training set, a test set, and a validation set;

[0010] Extracting associated features from the prediction data set, generating combined features based on the associated features, and constructing a target feature combination decision tree model based on the combined features;

[0011] According to the training set and the test set, the cross-validation method is used to train and optimize the target feature combination decision tree model, and the target feature combination decision tree model is verified according to the verification set;

[0012] Apply the target feature combination decision tree model and output the pipeline prediction results.

[0013] An underground pipeline maintenance prediction device based on decision tree feature combination, comprising:

[0014] An acquisition module is used to acquire a prediction data set for underground pipeline maintenance, and divide the prediction data set into a training set, a test set, and a validation set;

[0015] A construction module is used to extract associated features from the prediction data set, generate combined features based on the associated features, and construct a target feature combination decision tree model based on the combined features;

[0016] The training optimization module uses the cross-validation method to train and optimize the target feature combination decision tree model based on the training set and the test set, and verifies the target feature combination decision tree model based on the verification set;

[0017] The application output module is used to apply the target feature combination decision tree model and output the pipeline prediction results.

[0018] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0019] (1) The present invention has achieved a major breakthrough in underground pipeline maintenance prediction by introducing a target feature combination decision tree model. While traditional decision tree models face bottlenecks in processing high-dimensional data and complex relationships, the present invention significantly improves the prediction accuracy and generalization ability of the model through a carefully designed combination feature strategy. This innovation not only solves the problem of complex and changeable pipeline systems and numerous influencing factors, but also makes the prediction results more comprehensive, can accurately capture potential risks, and effectively reduce omissions and misjudgments in the prediction process. In addition, the maintenance prediction method of the present invention is highly flexible and predictive, so that pipeline maintenance is no longer limited to the traditional periodic model, but can be dynamically adjusted according to actual operating conditions and maintenance needs, thereby achieving optimal resource allocation and effective cost control. This transformation not only improves maintenance efficiency, but also significantly reduces maintenance costs, providing a strong guarantee for the safe and stable operation of urban infrastructure.

[0020] (2) The core of the present invention also lies in its innovatively generated combined features, which can capture the joint effect between multiple features, thereby improving the prediction ability of the model, so that the target feature combination decision tree model not only achieves a qualitative leap in prediction accuracy, but also shows significant advantages in practicality and interpretability. First, the tree structure of the decision tree model is intuitive and easy to understand, so that the prediction results can be quickly converted into the decision-making basis of managers, greatly improving the decision-making efficiency. Secondly, through the introduction and display of combined features, the interpretability of the model is enhanced, allowing users to clearly see which factors have an important impact on the prediction results, so as to more accurately grasp the focus and direction of maintenance work. This intuitiveness and easy interpretability not only improves the user experience, but also promotes the dissemination and application of technical knowledge. In summary, the present invention is not only a technological innovation, but also a profound change in the maintenance and management model of underground pipelines. The beneficial effects it brings will have a profound impact on the safety and sustainable development of urban infrastructure. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of a flow chart of an underground pipeline maintenance prediction method based on decision tree feature combination according to an embodiment of the present invention;

[0022] Figure 2 It is a structural schematic diagram of an underground pipeline maintenance prediction device based on decision tree feature combination according to an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of pipeline maintenance prediction feature extraction and feature combination according to an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of a K-fold cross-validation method according to an embodiment of the present invention;

[0025] Figure 5 It is a schematic diagram of the structure of the target feature combination decision tree model CFD-Tree according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The present invention is further described in detail below in conjunction with embodiments:

[0027] In one embodiment, if Figure 1 As shown, a method for predicting underground pipeline maintenance based on decision tree feature combination includes the following steps S10-S40:

[0028] S10, obtain the prediction data set of underground pipeline maintenance, and divide the prediction data set to generate a training set, a test set and a validation set; in this embodiment, the prediction data set comes from various types of historical data closely related to underground pipeline prediction, and the sources of these data mainly include historical records of pipeline management systems, field survey data and environmental monitoring data, so as to ensure the comprehensiveness and diversity of the data and provide sufficient information for subsequent model learning and prediction. Understandably, the prediction data set is a data set after preprocessing of historical data. The prediction data set is divided into a training set, a test set and a validation set. By dividing the prediction data set into three parts, the performance of the subsequent model to be built at different stages can be evaluated respectively, ensuring the objectivity and accuracy of the evaluation results. The validation set is used for model selection and parameter adjustment to help identify and avoid overfitting; the test set is used as a benchmark for the final evaluation of the model to test the model's prediction ability for new data and reflect the generalization ability of the model; by training on the training set and adjusting the parameters on the validation set, the prediction accuracy of the model can be improved without sacrificing the complexity of the model.

[0029] In the present invention, the prediction data set is divided to ensure the effectiveness and reliability of the subsequent machine learning model, which helps to develop a model that is both accurate and has strong generalization capabilities.

[0030] In one embodiment, the step S10, i.e., obtaining a prediction data set for underground pipeline maintenance and dividing the prediction data set into a training set, a test set, and a validation set, comprises the following steps:

[0031] S101. Collect historical data of underground pipelines regularly or periodically; use sensors or inspection equipment to collect historical data of underground pipelines, the historical data including pipeline type, pipeline material, service life, environmental conditions, maintenance records; that is, in this embodiment, historical data is mainly collected through sensors or inspection equipment or other data source recording tools, and the historical data of underground pipelines can be automatically or manually collected within a specific time interval to ensure the continuity and comprehensiveness of the data. Among them, the collection of historical data for underground pipeline maintenance prediction is crucial, involving information in multiple dimensions, which is crucial for comprehensively evaluating the current status of pipelines, predicting potential risks and formulating corresponding maintenance strategies; the historical data of pipelines include pipeline type, pipeline material, service life, environmental conditions, maintenance records, etc., among which pipeline types cover water supply pipelines, drainage pipelines, gas pipelines and power pipelines, including but not limited to the above types.

[0032] Pipeline materials include metal pipelines, plastic pipelines and concrete pipelines, including but not limited to the above types. The three types of pipelines correspond to their own different categories of pipelines. The service life covers several categories, including but not limited to service life less than 3 years, service life 3-5 years, service life 5-10 years and service life greater than 10 years, which can be set according to specific needs. Environmental conditions include groundwater level, soil type, geological structure and climate conditions, among which groundwater level includes but is not limited to secondary data such as high water level and low water level; soil type includes but is not limited to secondary data such as black soil, loess, red soil, sandy soil, clay, saline soil, etc.; geological structure includes but is not limited to fault structure, fold structure, inclined structure, horizontal structure, etc., and climate conditions include but are not limited to humid climate, arid climate, tropical rainforest climate, Mediterranean climate, temperate oceanic climate, etc. Maintenance records include but are not limited to maintenance objects, maintenance date and time, maintenance items, maintenance personnel, maintenance steps and treatment measures, etc.

[0033] S102, preprocessing the historical data to obtain a prediction data set for underground pipeline maintenance. In this embodiment, the prediction data set for underground pipeline maintenance is obtained by preprocessing the historical data, which plays an important role in improving prediction accuracy, optimizing maintenance plans, and improving decision-making efficiency.

[0034] In one embodiment, the step S102, i.e., preprocessing the historical data, includes the following steps:

[0035] S1021. Check the integrity of the historical data, correct erroneous data, and supplement missing data. It is understandable that improper handling of missing data may introduce deviations. By correcting erroneous data and supplementing missing data, the integrity of the historical data is ensured and the overall quality of the data set is improved.

[0036] S1022. Clean the historical data, identify and delete duplicate data and invalid data, identify and process abnormal data, and process abnormal data including deleting the abnormal data, replacing it with normal values, or adjusting it based on statistical methods. Understandably, duplicate data may be caused by data collection errors and need to be deleted or merged. Invalid data refers to data that does not meet logical or analytical requirements, such as null values ​​or values ​​outside a reasonable range, which need to be identified and removed. Abnormal data may be caused by measurement errors or abnormal events and need to be deleted, replaced with normal values, or adjusted based on statistical methods.

[0037] Cleaned historical data can reduce the negative impact of inconsistent data on model performance. Removing duplicate and invalid data is equivalent to reducing the noise in the data, which helps the model learn patterns in the data more accurately. Processing outliers can prevent excessive impact on the model and improve the robustness of the model.

[0038] S1023. Standardize or normalize the cleaned historical data. It can be understood that standardizing or normalizing the cleaned historical data can eliminate the dimensional differences between different data to improve the training effect and prediction accuracy of the subsequent decision tree model.

[0039] In a specific embodiment, the step S1023, i.e., standardizing or normalizing the cleaned historical data, specifically includes the following process:

[0040] The cleaned historical data is Z-Score standardized, and the historical data is scaled according to a first preset ratio so that the historical data falls into a standard normal distribution interval with a mean of 1 and a standard deviation of 1, and the standardized data is obtained by transforming the historical data according to the mean and standard deviation. It can be understood that the first preset ratio can be set according to data characteristics, algorithm requirements and specific application requirements. By calculating the difference between each data point and the mean of the data set and then dividing it by the standard deviation, the data is converted to a standard normal distribution with a mean of 0 and a standard deviation of 1, which facilitates comparison and convergence between different feature data.

[0041] Furthermore, the cleaned historical data can also be normalized to the maximum and minimum values, and the historical data can be scaled according to a second preset ratio so that the historical data falls within the interval [0, 1], and a linear transformation is performed based on the maximum and minimum values ​​of the historical data to obtain normalized data; understandably, the second preset ratio is also set based on data characteristics, algorithm requirements, and specific application requirements. By scaling the data to a specific interval, all data points are ensured to be on the same scale for ease of calculation and comparison.

[0042] In a specific embodiment, before standardizing or normalizing the cleaned historical data, the non-numerical data in the historical data is appropriately converted as needed, and the conversion methods include but are not limited to encoding conversion, label encoding, binary encoding, one-hot encoding, dimensionality reduction methods and digitization methods.

[0043] S1024. Use a random sampling method and according to a third preset ratio to divide the prediction data set obtained after standardization or normalization into a training set, a test set, and a validation set. It can be understood that the random sampling method is used to sample all the data in the prediction data set, which can ensure that the probability of each data point being selected is the same. Random sampling is conducive to data diversity to reduce selection bias and ensure that the samples are independent and identically distributed. The third preset ratio is a specific ratio designated to separate the data set. Usually, the split ratio of the training set, validation set, and test set (the third preset ratio) is 6:2:2, 7:1.5:1.5 or 8:1:1. In the present invention, it is preferred that the training set and validation set account for 8 shares in total, and the test set accounts for 2 shares.

[0044] S20, extracting associated features from the prediction data set, generating combined features based on the associated features, and constructing a target feature combination decision tree model based on the combined features; understandably, the associated features are sub-mark features of each level in each type of features in the prediction data set. Taking the pipeline type as an example, the pipeline type is a large category in the prediction data set, and the pipeline type includes but is not limited to water supply pipelines, drainage pipelines, gas pipelines, and power pipelines as the first-level sub-mark features.

[0045] The second-level sub-mark features are usually subdivided based on the first-level classification according to the physical characteristics, materials, technical parameters, etc. of the pipeline type. Taking the drainage pipeline as an example, the second-level sub-mark features may include pipeline diameter and drainage type (rainwater or sewage), etc.

[0046] The third-level sub-marker features are further refined based on the second-level sub-marker features, and may involve specific engineering parameters, usage conditions or performance indicators. For example, for water supply pipelines, the third-level sub-marker features may include minimum flow, maximum flow and design life.

[0047] The pipeline materials, service life, environmental conditions and maintenance records in the historical data can be generated into their own sub-label features at each level through the same classification method mentioned above, which will not be repeated here. Through the multi-level feature classification method, the characteristics of the pipeline can be described in more detail, providing richer information for the subsequent prediction model, and more accurate prediction and risk assessment can be performed based on the characteristics of different levels, which helps to identify the specific risk factors and maintenance requirements of different types of pipelines.

[0048] In one embodiment, the step S20, i.e., generating a combined feature from the associated feature and constructing a target feature combination decision tree model according to the combined feature, comprises the following steps:

[0049] S201. Extracting associated features related to pipeline maintenance prediction from the prediction data set, the associated features include sub-features of pipeline type, sub-features of pipeline material, sub-features of service life, sub-features of environmental conditions and sub-features of maintenance records; generating combined features based on the associated features by combining domain knowledge; understandably, the associated features are sub-features of all levels of pipeline type, pipeline material, service life, environmental conditions and maintenance records, wherein two or more sub-features generate combined features, and the generation method of combined features is the combination method of domain knowledge, which can more comprehensively reflect the maintenance needs of the pipeline. These combined features not only improve the prediction accuracy of the model, but also make the decision-making process of the model more in line with the logic and experience in actual engineering. Through the integration of domain knowledge, a more intelligent and reliable pipeline maintenance prediction model can be constructed.

[0050] In a specific embodiment, the step S201, that is, the associated features are combined to generate combined features by combining domain knowledge, specifically includes:

[0051] The combination method of the domain knowledge includes a direct combination method and an interactive combination method. The direct combination method is to combine two or more sub-label features of related features with clear mutual relationships into a combined feature; the interactive combination method is to consider the interaction between the related features and multiply the sub-label features of multiple related features or combine them into a combined feature through a nonlinear function. That is, in this embodiment, the combined features generated by the combination method of domain knowledge can reduce the data dimension, while also ensuring that the data used in the subsequent decision tree model training has a high degree of relevance.

[0052] In the above embodiment, if Figure 3 As shown in the figure, based on the extracted associated features, domain knowledge is used to combine features and then generate combined features, including direct combination and interactive combination. Direct combination is to merge multiple associated features with mutual relationship, such as the combination of pipeline type and pipeline material, and the combination of environmental conditions and service life; while interactive combination considers the interaction between associated features and is achieved through multiplication or nonlinear functions, such as the interaction between flow and pressure, which helps to reveal complex patterns and relationships in the data, thereby enhancing the predictive ability and generalization of the model.

[0053] The generated combined features have a significant optimization effect on the model performance. The combined features not only improve the accuracy and recall rate of the model, but also reduce feature redundancy and the risk of overfitting. The automatically generated high-quality combined features reduce the impact of manual intervention.

[0054] In addition, the combined features based on domain knowledge also enhance the interpretability of the model and make the decision-making process more transparent. The use of combined features also accelerates the model training process. When using meaningful combined features, the model can converge to the optimal solution faster because the combined features already imply the complex relationships in the original data. This means that the model does not need to learn these relationships from scratch during training, thereby saving training time.

[0055] Combined features capture the core knowledge and rules in the field, allowing the model to perform well in similar but slightly different environments. Combined feature design based on domain knowledge helps improve the transferability of the model. Through the generation, analysis and application of combined features, hidden patterns and relationships in the data can be discovered, and the interpretability of the model output results can be enhanced, which makes the model's prediction results easier to be understood and accepted by decision makers with non-technical backgrounds, thereby supporting a more intelligent and effective decision-making process.

[0056] S202, using a weighted evaluation method to evaluate the importance of the combined features on the underground pipeline prediction results, and selecting corresponding combined features as a candidate feature set according to the importance. The mathematical expression of the weighted evaluation method is:

[0057]

[0058] Among them, N represents the total number of samples, wi represents the weight of the i-th sample, W represents the total weight of all samples, and p i Indicates the probability that the i-th sample belongs to a certain category, Gini w represents the weighted Gini index;

[0059] The weighted Gini index corresponding to all the combined features is calculated according to the mathematical expression. The smaller the weighted Gini index is, the higher the data purity is. The weighted Gini indexes of different combined features are compared, and the combined features with high data purity are selected according to the preset range to be added to the candidate feature set. Understandably, the preset range (threshold or limit) can be set according to demand, specifically according to the characteristics of the data, the performance requirements of the model, the needs of the business scenario, and the application of domain knowledge. By calculating the weighted Gini index of each combined feature and selecting features with high data purity according to the preset range to be added to the candidate feature set, it is helpful to eliminate redundant features that have little effect on the prediction results, thereby improving the generalization ability of the model.

[0060] S203: recursively construct a target feature combination decision tree model based on the candidate feature set.

[0061] In a specific embodiment, if Figure 5 As shown, the step S203, i.e., recursively constructing a target feature combination decision tree model according to the candidate feature set, is named as a CFD-Tree model in the present invention, and specifically includes the following steps:

[0062] S2031, sorting the weighted Gini indexes of all combined features in the candidate feature set, and selecting the combined feature with the smallest weighted Gini index as the root node of the target feature combination decision tree model; understandably, using the combined feature with the smallest weighted Gini index as the root node ensures that the initial split of the decision tree is based on the feature that is most conducive to classification, and also improves the classification accuracy and efficiency of the model.

[0063] S2031. According to the combined features corresponding to the selected root node, the candidate feature set is divided into multiple subsets, each subset corresponds to a branch of the target feature combination decision tree; understandably, each subset represents a different value or category of the data on the feature, and this division helps the model to further learn the complex patterns and relationships in the data, because each subset will independently carry out the subsequent modeling process.

[0064] S2031, repeat the following steps for each divided subset, recursively constructing a subtree until a stop condition is met, specifically:

[0065] Recalculate the weighted Gini index in each subset;

[0066] Select the combined feature with the smallest weighted Gini index in the subset as the node of the current subtree;

[0067] Further divide the subsets according to the combined features corresponding to the nodes of the current subtree;

[0068] When there are no remaining candidate combination features in the subset for further partitioning, the subtree construction stops, and the target feature combination decision tree model is successfully constructed. Understandably, recalculating the weighted Gini index in each subset can ensure that the optimal partitioning feature can be selected in each subset. By continuously partitioning the subsets, the model can learn the details and complex relationships in the data more deeply, thereby enhancing the generalization ability of the model. The conditions for stopping the construction of the subtree can also include the number of samples in the node being less than the threshold, the data purity of a node has reached a certain threshold, the depth of the tree has reached a limit, etc.

[0069] In one embodiment, the prediction performance of the model is improved by continuously adjusting the parameters and structure of the tree, such as the maximum depth of the tree, the minimum number of samples of the leaf nodes, etc. In the target feature combination decision tree model, the CFD-Tree model in this embodiment has 1000 samples, and the relevant parameters are initially set as follows:

[0070] The feature partitioning standard splitter selects the best. It will find the best partitioning point among all possible partitioning points. If the sample size is very large, you can consider using randomness to reduce the computational cost.

[0071] The maximum depth of the decision tree, max_depth, is set to 5, which can avoid overfitting. For other embodiments, it can be adjusted according to the number of samples, and the specific value can be determined by cross-validation.

[0072] The minimum number of samples min_samples_split required for internal node re-division is set to 2. If you want the tree to be more streamlined to prevent overfitting, you can increase this value appropriately. It can also be adjusted for other embodiments.

[0073] The minimum number of samples of leaf nodes mmin_samples_leaf is set to 5, which can be adjusted in other embodiments.

[0074] You can also set the following parameters:

[0075] Limit the maximum number of feature values ​​used for classification max_features. For datasets with a small number of features, all features are usually used, that is, None or auto, but if the number of features is large, a smaller value can be set to reduce the amount of calculation.

[0076] The maximum number of leaf nodes max_leaf_nodes can be set to limit the size of the tree to prevent overfitting. The specific value depends on the number of features and sample size of the dataset and can be determined by cross-validation.

[0077] Node partition minimum impurity min_impurity_decrease, this parameter limits the growth of the decision tree. When the impurity of a node, such as the Gini coefficient or information gain, is less than this threshold, the node will no longer generate child nodes. This value can be set according to the complexity requirements of the model.

[0078] Specify the weights of each category of samples, class_weight. If there is a category imbalance problem in the data set, this parameter can be used to specify the weights of different categories to help the model better learn minority class samples.

[0079] S30, using a cross-validation method to train and optimize the target feature combination decision tree model based on the training set and the test set, and validating the target feature combination decision tree model based on the validation set;

[0080] In one embodiment, the step S30, that is, comprises the following steps:

[0081] S301, using the training set and the test set, and applying the K-fold cross validation method to train and optimize the parameters of the target feature combination decision tree model;

[0082] S302. Use the verification set to verify the trained and optimized target feature combination decision tree model, and continue to adjust the target feature combination decision tree model according to the verification result to obtain the optimal target feature combination decision tree model.

[0083] In a specific embodiment, if Figure 4 As shown, the step S301 specifically includes the following steps:

[0084] S3011, randomly divide the training set and the test set into K folds j of similar size and non-overlapping, j=1, ...K;

[0085] S3012, iteratively train and verify the K folds j, for each fold j, use the current fold j as the current test set, and combine the remaining K-1 folds j as the current training set;

[0086] Use the current training set to train the target feature combination decision tree model, use the current test set to evaluate the performance of the target feature combination decision tree model, and record the performance indicators;

[0087] S3013, repeat step S3021 and step S3022 until each fold j serves as a current validation set;

[0088] S3014. Take the average value of all performance indicators obtained in K times of verification as the final performance evaluation result of the target feature combination decision tree model.

[0089] In the above embodiment, K-fold cross validation effectively reduces the risk of overfitting the target feature combination decision tree model on a single training set by partitioning the data set multiple times and rotating the training set and validation set, and can provide more comprehensive and stable performance evaluation results. It also reduces the performance fluctuations caused by the randomness of data partitioning, making the evaluation results more reliable. In the target feature combination decision tree model, K-fold cross validation can also be used to guide feature selection. By comparing the performance of models containing different feature combinations in cross validation, the feature combination that contributes most to the model performance can be selected, thereby optimizing the input features of the model.

[0090] S40, applying the target feature combination decision tree model, and outputting the pipeline prediction result.

[0091] In one embodiment, the step S40, i.e., applying the target feature combination decision tree model and outputting the pipeline prediction result, includes the following steps:

[0092] S401, inputting the three-dimensional pipeline data to be predicted into the optimized target feature combination decision tree model.

[0093] S402. After the target feature combination decision tree model receives the three-dimensional pipeline data to be predicted, it traverses each node of the decision tree and the corresponding leaf nodes from top to bottom according to the construction order of the decision tree. Each leaf node has a prediction result for a binary classification, and the prediction result includes whether the three-dimensional pipeline needs maintenance, maintenance items, and maintenance time. Understandably, according to the input three-dimensional pipeline data, it traverses from top to bottom according to the structure of the decision tree. Each node represents a feature judgment condition. According to the feature value of the input data, the model will decide whether to move to the left subtree or the right subtree until it reaches a leaf node. Each leaf node corresponds to a binary classification prediction result. Since the target feature combination decision tree model has learned which features have an important impact on the prediction results during the training process, and these features are gradually considered in the prediction process, it can more accurately predict the status of the pipeline.

[0094] S403. According to the prediction results, formulate corresponding maintenance plans or strategies; if the prediction results show that the three-dimensional pipeline needs maintenance, arrange the corresponding maintenance team to carry out inspection and repair work; if the prediction results show that the pipeline is in good condition, continue to monitor its condition. Understandably, through timely prediction and maintenance, the losses and inconvenience caused by pipeline failures can be reduced, and the reliability and safety of pipelines can be improved; maintenance plans based on prediction results can allocate resources more accurately, avoid unnecessary waste, and improve the cost-effectiveness of maintenance work; this step applies artificial intelligence technology to actual pipeline maintenance work, realizes the intelligence and automation of pipeline maintenance, and improves work efficiency and accuracy.

[0095] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0096] In one embodiment, if Figure 2 As shown, an underground pipeline maintenance prediction device based on a decision tree feature combination is provided, and the underground pipeline maintenance prediction device based on a decision tree feature combination corresponds one-to-one to the underground pipeline maintenance prediction method based on a decision tree feature combination in the above-mentioned embodiment. The underground pipeline maintenance prediction device based on a decision tree feature combination includes:

[0097] An acquisition module 100 acquires a prediction data set for underground pipeline maintenance, and divides the prediction data set into a training set, a test set, and a validation set;

[0098] A construction module 200 is used to extract associated features from the prediction data set, generate combined features based on the associated features, and construct a target feature combination decision tree model based on the combined features;

[0099] The training optimization module 300 trains and optimizes the target feature combination decision tree model using a cross-validation method based on the training set and the test set, and verifies the target feature combination decision tree model based on the verification set;

[0100] The application output module 400 is used to apply the target feature combination decision tree model and output the pipeline prediction result.

[0101] In the underground pipeline maintenance prediction device based on decision tree feature combination in the above-mentioned embodiment of the present invention, the acquisition module 100 is responsible for collecting and organizing the prediction data set of underground pipeline maintenance, laying a solid foundation for subsequent analysis. By scientifically dividing the data set into training set, test set and verification set, it not only ensures the effectiveness of model training, but also guarantees the comprehensive evaluation of model performance. The construction module 200 extracts key related features from the huge prediction data set, and generates more representative combination features through clever combination strategies. These combination features, as the input of the decision tree model, greatly enhance the model's ability to identify pipeline status. The training optimization module 300 is the core power source of the system. The cross-validation method is used to repeatedly train and optimize the target feature combination decision tree model to ensure that the model can perform well in various situations; the application output module 400 applies the trained target feature combination decision tree model to actual scenarios, and outputs pipeline prediction results quickly and accurately.

[0102] For the specific definition of the underground pipeline maintenance prediction device based on the decision tree feature combination, please refer to the definition of the underground pipeline maintenance prediction method based on the decision tree feature combination mentioned above, which will not be repeated here. Each module in the above-mentioned underground pipeline maintenance prediction device based on the decision tree feature combination can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for predicting underground pipeline maintenance based on decision tree feature combination, characterized in that: include: S10, obtaining a prediction data set for underground pipeline maintenance, and dividing the prediction data set into a training set, a test set, and a validation set; S20, extracting associated features from the prediction data set, generating combined features based on the associated features, and constructing a target feature combination decision tree model according to the combined features; The step S20 comprises: S201, extracting associated features related to pipeline maintenance prediction from the prediction data set, wherein the associated features include sub-features of pipeline type, sub-features of pipeline material, sub-features of service life, sub-features of environmental conditions, and sub-features of maintenance records; generating combined features through a combination method of domain knowledge according to the associated features; the combination method of domain knowledge includes a direct combination method and an interactive combination method, wherein the direct combination method is to combine sub-features of two or more associated features with clear mutual relationships into one combined feature; and the interactive combination method is to consider the interaction between the associated features, and multiply the sub-features of multiple associated features or combine them into one combined feature through a nonlinear function; S202, using a weighted evaluation method to evaluate the importance of the combined features on the underground pipeline prediction results, and selecting corresponding combined features as a candidate feature set according to the importance. The mathematical expression of the weighted evaluation method is: (1) in, represents the total number of samples, Indicates The weight of the samples, represents the total weight of all samples, Indicates The probability that a sample belongs to a certain category, represents the weighted Gini index; Calculate the weighted Gini index corresponding to all the combined features according to the mathematical expression, the smaller the weighted Gini index is, the higher the data purity is, compare the weighted Gini indexes of different combined features, and select the combined features with high data purity according to the preset range to add to the candidate feature set; S203, recursively constructing a target feature combination decision tree model based on the candidate feature set; the step S203 includes: Sort the weighted Gini index of all combined features in the candidate feature set, and select the combined feature with the smallest weighted Gini index as the root node of the target feature combination decision tree model; According to the combined features corresponding to the selected root node, the candidate feature set is divided into multiple subsets, each subset corresponds to a branch of the target feature combination decision tree; Repeat the following steps for each partitioned subset, recursively constructing the subtree until the stopping condition is met, specifically: Recalculate the weighted Gini index in each subset; Select the combined feature with the smallest weighted Gini index in the subset as the node of the current subtree; Further divide the subsets according to the combined features corresponding to the nodes of the current subtree; When there are no remaining candidate combination features in the subset for further division, the subtree construction stops and the target feature combination decision tree model is successfully constructed; S30, using a cross-validation method to train and optimize the target feature combination decision tree model based on the training set and the test set, and validating the target feature combination decision tree model based on the validation set; S40, applying the target feature combination decision tree model, and outputting the pipeline prediction result.

2. The underground pipeline maintenance prediction method based on decision tree feature combination according to claim 1 is characterized in that: The step S10 comprises: S101. Regularly or periodically collect historical data of underground pipelines; use sensors or inspection equipment to collect historical data of underground pipelines, wherein the historical data includes pipeline type, pipeline material, service life, environmental conditions, and maintenance records; S102: Preprocess the historical data to obtain a prediction data set for underground pipeline maintenance.

3. The underground pipeline maintenance prediction method based on decision tree feature combination according to claim 2 is characterized in that: The step S102 includes: S1021. Check the integrity of the historical data, correct erroneous data, and supplement missing data; S1022, cleaning the historical data, identifying and deleting duplicate data and invalid data, identifying and processing abnormal data, wherein processing abnormal data includes deleting the abnormal data, replacing it with a normal value, or adjusting it based on a statistical method; S1023. Standardize or normalize the cleaned historical data; Perform Z-Score standardization on the cleaned historical data, scale the historical data according to a first preset ratio so that the historical data falls into a standard normal distribution interval with a mean of 1 and a standard deviation of 1, and transform the historical data according to the mean and standard deviation to obtain standardized data; or The cleaned historical data is normalized to the maximum and minimum, and the historical data is scaled according to the second preset ratio so that the historical data falls into Within the interval, linear transformation is performed according to the maximum and minimum values ​​of historical data to obtain normalized data; S1024. Use a random sampling method and according to a third preset ratio to divide the prediction data set obtained after the standardized or normalized processing into a training set, a test set, and a validation set.

4. The underground pipeline maintenance prediction method based on decision tree feature combination according to claim 1 is characterized in that: The step S30 comprises: S301, using the training set and the test set, and applying the K-fold cross validation method to train and optimize the parameters of the target feature combination decision tree model; S302. Use the validation set to validate the trained and optimized target feature combination decision tree model, and continue to adjust the target feature combination decision tree model according to the validation result to obtain the optimal target feature combination decision tree model.

5. The underground pipeline maintenance prediction method based on decision tree feature combination according to claim 4 is characterized in that: The step S301 includes: S3011, randomly divide the training set and test set into Folds of similar size that do not overlap , ; S3012, yes Discount Perform iterative training and verification. , will fold Currently as the current test set, the remaining Discount Merge as the current training set; Use the current training set to train the target feature combination decision tree model, use the current test set to evaluate the performance of the target feature combination decision tree model, and record the performance indicators; S3013, repeat step S3011 and step S3012 until each fold All serve as the current validation set; S3014, yes The average value of all performance indicators obtained in the validation is taken as the final performance evaluation result of the target feature combination decision tree model.

6. The underground pipeline maintenance prediction method based on decision tree feature combination according to claim 4 is characterized in that: The step S40 comprises: S401, inputting the three-dimensional pipeline data to be predicted into the optimized target feature combination decision tree model; S402, after the target feature combination decision tree model receives the three-dimensional pipeline data to be predicted, traverse each node and the corresponding leaf node of the decision tree from top to bottom according to the construction order of the decision tree, and each leaf node has a prediction result for a binary classification, and the prediction result includes whether the three-dimensional pipeline needs maintenance, maintenance items and maintenance time; S403. According to the prediction results, formulate a corresponding maintenance plan or strategy; if the prediction results show that the three-dimensional pipeline needs maintenance, arrange a corresponding maintenance team to carry out inspection and repair work; if the prediction results show that the pipeline is in good condition, continue to monitor its condition.

7. An underground pipeline maintenance prediction device for implementing the underground pipeline maintenance prediction method according to claim 1, characterized in that: include: An acquisition module is used to acquire a prediction data set for underground pipeline maintenance, and divide the prediction data set into a training set, a test set, and a validation set; A construction module is used to extract associated features from the prediction data set, generate combined features based on the associated features, and construct a target feature combination decision tree model based on the combined features; the method includes: S201, extracting correlation features related to pipeline maintenance prediction from the prediction data set, wherein the correlation features include sub-features of pipeline type, sub-features of pipeline material, sub-features of service life, sub-features of environmental conditions, and sub-features of maintenance records; and generating combined features based on the correlation features by combining domain knowledge; S202, using a weighted evaluation method to evaluate the importance of the combined features on the underground pipeline prediction results, and selecting corresponding combined features as a candidate feature set according to the importance. The mathematical expression of the weighted evaluation method is: (1) in, represents the total number of samples, Indicates The weight of the samples, represents the total weight of all samples, Indicates The probability that a sample belongs to a certain category, represents the weighted Gini index; Calculate the weighted Gini index corresponding to all the combined features according to the mathematical expression, the smaller the weighted Gini index is, the higher the data purity is, compare the weighted Gini indexes of different combined features, and select the combined features with high data purity according to the preset range to add to the candidate feature set; S203, recursively constructing a target feature combination decision tree model based on the candidate feature set; the step S203 includes: Sort the weighted Gini index of all combined features in the candidate feature set, and select the combined feature with the smallest weighted Gini index as the root node of the target feature combination decision tree model; According to the combined features corresponding to the selected root node, the candidate feature set is divided into multiple subsets, each subset corresponds to a branch of the target feature combination decision tree; Repeat the following steps for each partitioned subset, recursively constructing the subtree until the stopping condition is met, specifically: Recalculate the weighted Gini index in each subset; Select the combined feature with the smallest weighted Gini index in the subset as the node of the current subtree; Further divide the subsets according to the combined features corresponding to the nodes of the current subtree; When there are no remaining candidate combination features in the subset for further division, the subtree construction stops and the target feature combination decision tree model is successfully constructed; The training optimization module uses the cross-validation method to train and optimize the target feature combination decision tree model based on the training set and the test set, and verifies the target feature combination decision tree model based on the verification set; The application output module is used to apply the target feature combination decision tree model and output the pipeline prediction results.

Citation Information

Patent Citations

  • Pipeline health state assessment method based on random forest model

    CN105678481A

  • Multi-attribute decision tree power grid stability margin assessment method based on linear discrimination analysis

    CN107274105A

  • Medical product designing method based on pulse waves

    CN107582037A

  • Random forest ship target classification method based on AIS data feature optimization

    CN114882293A