Permafrost upper limit prediction method, device, equipment and storage medium
By combining the random forest algorithm, extreme gradient enhancement algorithm and long-term memory network, a permafrost upper limit prediction model is established, which solves the inaccuracy problem of the prediction of permafrost upper limit in traditional methods, and achieves more efficient and accurate prediction effects .
Patent Information
- Application Number
- CN202410910534.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-09
AI Technical Summary
The traditional permafrost upper limit prediction method cannot achieve accurate prediction due to data complexity, timing changes and nonlinear relationships, resulting in roadbed deformation threats and road stability problems.
The permafrost upper limit prediction model combined with a random forest algorithm, extreme gradient enhancement algorithm and long-term and short-term memory network is adopted to establish predictions that are more suitable for the target roadbed by obtaining historical data and environmental data, training the model and cross-validation and grid optimization. Model.
It significantly improves the prediction accuracy of the upper limit of permafrost, can more accurately consider the complexity and timing changes of the data, reduce overfitting, and is suitable for accurate prediction under different environmental conditions.
Smart Images

Figure CN118469045B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular relates to a method, device, equipment and storage medium for predicting the upper limit of permafrost. Background Art
[0002] The Qinghai-Tibet Channel is the most convenient land transportation corridor connecting the inland and is regarded as the "lifeline" of Tibet. Most sections of the road are built on this permafrost.
[0003] The construction and operation of highways in permafrost areas face huge challenges, mainly focusing on solving the adverse effects of permafrost on roadbeds. Permafrost is a special type of soil that often exhibits characteristics such as frost heave and thaw settlement under climate and seasonal changes. In particular, the decline in the upper limit of permafrost poses a serious deformation threat to the roadbed and directly affects the stability of the road. Therefore, accurate prediction of the upper limit of permafrost is crucial for roadbed disease management.
[0004] Traditional prediction methods may be limited by data complexity, time series changes and nonlinear relationships, which may lead to large deviations in the prediction results and make it impossible to accurately predict the upper limit of permafrost. Summary of the invention
[0005] The embodiments of the present application provide a method, device, equipment and storage medium for predicting the upper limit of permafrost to accurately predict the upper limit of permafrost.
[0006] This application is implemented through the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a method for predicting an upper limit of permafrost, comprising:
[0008] The historical permafrost upper limit data of the target roadbed and the historical environmental data that affect the historical permafrost upper limit data are obtained to obtain the training set and the test set.
[0009] The permafrost upper limit prediction model is trained based on the training set and the test set; the permafrost upper limit prediction model is a prediction model formed by combining the random forest algorithm, the extreme gradient boosting algorithm and the long short-term memory network.
[0010] Based on the environmental data that affects the upper limit of permafrost in the target period and the trained upper limit prediction model of permafrost, the upper limit of permafrost in the target roadbed in the target period is predicted; wherein the target period is any time period in the future.
[0011] In combination with the first aspect, in some possible implementations, training a permafrost upper limit prediction model based on a training set and a test set includes:
[0012] The training set is randomly divided through cross-validation to obtain multiple groups of training data and multiple groups of corresponding verification data.
[0013] The random forest algorithm, extreme gradient boosting algorithm and long short-term memory network are all taken as target algorithms. Parameter initialization, parameter optimization and parameter correction are performed on each target algorithm to obtain the final parameter set of each target algorithm.
[0014] Based on multiple sets of validation data, the weights of the random forest algorithm, the extreme gradient boosting algorithm, and the long short-term memory network are calculated.
[0015] Based on the final parameter set of the random forest algorithm, the parameter set of the extreme gradient boosting algorithm, the final parameter set of the long short-term memory network, the weights of the random forest algorithm, the weights of the extreme gradient boosting algorithm and the weights of the long short-term memory network, the trained permafrost upper limit prediction model was obtained.
[0016] Perform parameter initialization, parameter optimization and parameter correction for each target algorithm to obtain the final parameter set of each target algorithm, including:
[0017] Initialize the parameters of each target algorithm.
[0018] Based on multiple sets of training data and multiple sets of corresponding verification data, the grid method is used to optimize the parameters of each target algorithm to obtain the optimal parameter set for each target algorithm.
[0019] Select mean square error as the loss function of each target algorithm, calculate the error value of each target algorithm based on the test set, the optimal parameter set of each target algorithm and each target algorithm, and correct the optimal parameter set of each target algorithm based on the error value of each target algorithm until the optimal parameter set of each target algorithm no longer changes or the number of training times reaches a first preset value, so as to obtain the final parameter set of each target algorithm.
[0020] In combination with the first aspect, in some possible implementations, based on multiple sets of verification data, the weights of the random forest algorithm, the weights of the extreme gradient boosting algorithm, and the weights of the long short-term memory network are calculated, including:
[0021] Based on the historical environmental data in multiple groups of verification data and the random forest algorithm, multiple first prediction values are predicted.
[0022] Based on the historical environmental data in multiple groups of verification data and the extreme gradient boosting algorithm, multiple second prediction values are predicted.
[0023] Based on the historical environmental data and long short-term memory network in multiple groups of verification data, multiple third prediction values are predicted.
[0024] Based on the minimum absolute error linear weighted method, multiple first prediction values, multiple second prediction values and multiple third prediction values, the weights of the random forest algorithm, the weights of the extreme gradient boosting algorithm and the weights of the long short-term memory network are calculated.
[0025] In combination with the first aspect, in some possible implementations, based on the minimum absolute error linear weighted method, multiple first prediction values, multiple second prediction values, and multiple third prediction values, the weights of the random forest algorithm, the weights of the extreme gradient boosting algorithm, and the weights of the long short-term memory network are calculated, including:
[0026] Based on the minimum absolute error linear weighted method, multiple first prediction values, multiple second prediction values and multiple third prediction values, combined with the first formula, the weights of the random forest algorithm, the weights of the extreme gradient boosting algorithm and the weights of the long short-term memory network are calculated.
[0027] The first formula is:
[0028]
[0029] in, Indicates The first predicted value, Indicates The second predicted value, Indicates The third predicted value, represents the weight of the random forest algorithm, represents the weight of the extreme gradient boosting algorithm, represents the weight of the long short-term memory network, Indicates The true value of the upper limit of historical permafrost in the validation data.
[0030] In combination with the first aspect, in some possible implementations, historical permafrost upper limit data of the target roadbed and historical environmental data affecting the historical permafrost upper limit data are obtained to obtain a training set and a test set, including:
[0031] Obtain historical permafrost upper limit data for the target roadbed, as well as various types of historical environmental data for the location of the target roadbed.
[0032] The correlation coefficients between the historical permafrost upper limit and each type of historical environmental data were calculated, and multiple correlation coefficients were obtained.
[0033] The type of environmental data corresponding to the correlation coefficient exceeding the first threshold among the multiple correlation coefficients is determined as the historical environmental data affecting the historical permafrost upper limit data.
[0034] The historical permafrost upper limit data of the target roadbed and the historical environmental data affecting the historical permafrost upper limit data are matched one by one according to time to obtain a first data set.
[0035] The first data set is divided into a training set and a test set according to a preset ratio.
[0036] In combination with the first aspect, in some possible implementations, the correlation coefficient between the historical permafrost upper limit and each type of historical environmental data is calculated to obtain multiple correlation coefficients, including:
[0037] Combined with the second formula, the correlation coefficient between the upper limit of historical permafrost and each type of historical environmental data is calculated to obtain multiple correlation coefficients.
[0038] The second formula is:
[0039]
[0040] in, Indicates the upper limit of historical permafrost and Correlation coefficient of historical environmental data of type, Indicates the number of time series numbers. Indicates Time series number The value of the historical environment data of the type, Indicates The upper limit of historical permafrost The value of Show All The average value of the historical environmental data of the type, The upper limit of all historical permafrost The mean of the values.
[0041] In conjunction with the first aspect, in some possible implementations, historical permafrost upper limit data of the target roadbed and various types of historical environmental data of the location of the target roadbed are obtained, including:
[0042] Obtain raw data on historical permafrost upper limits and raw data on historical environmental data.
[0043] The original data of the historical permafrost upper limit and the original data of the historical environmental data are cleaned, filled, resampled and normalized to obtain the historical permafrost upper limit of the target roadbed and various types of historical environmental data at the location of the target roadbed.
[0044] In a second aspect, an embodiment of the present application provides a permafrost upper limit prediction device, comprising:
[0045] The data acquisition module is used to obtain the historical permafrost upper limit data of the target roadbed and the historical environmental data that affects the historical permafrost upper limit data, and obtain the training set and the test set.
[0046] The model training module is used to train the permafrost upper limit prediction model based on the training set and the test set; the permafrost upper limit prediction model is a prediction model formed by combining the random forest algorithm, the extreme gradient boosting algorithm and the long short-term memory network.
[0047] The result output module is used to predict the permafrost upper limit of the target roadbed in the target period based on the environmental data that affects the permafrost upper limit data of the target period and the trained permafrost upper limit prediction model; wherein the target period is any time period in the future.
[0048] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a processor and a memory, the memory being used to store a computer program, and when the processor executes the computer program, the permafrost upper limit prediction method as described in any one of the first aspects is implemented.
[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for predicting an upper limit of permafrost as described in any one of the first aspects is implemented.
[0050] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0051] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0052] The permafrost upper limit prediction model of this application uses the Random Forest algorithm (RF), the extreme gradient boosting algorithm (XGBoost) and the Long Short-Term Memory network (LSTM). The Random Forest algorithm constructs multiple decision trees and uses random subsets in the training set and the test set for training, so as to effectively deal with the uncertainty and complexity in the permafrost upper limit data. The long short-term memory neural network can capture the time correlation in the training set and the test set data, and consider the relationship between the permafrost upper limit and time changes. The extreme gradient boosting algorithm further improves the performance of the prediction model by gradient boosting, making it more suitable for accurate prediction under different environmental conditions. The factors affecting the permafrost upper limit are considered more comprehensively, and the permafrost upper limit prediction model is obtained by training based on these factors. The permafrost upper limit prediction model can fully consider the complexity of the data, the uncertainty of the data, the time series changes and the limitations of nonlinear relationships, and the prediction efficiency is higher and the prediction results are more accurate.
[0053] In addition, compared with the traditional prediction model, different roadbeds are located in different positions, and the traditional fixed model for predicting the upper limit of permafrost will have certain errors, but the permafrost upper limit prediction model in this application can establish a prediction model that is more consistent with the target roadbed based on the historical data of the target roadbed, thereby making the prediction result more accurate. The model of this application can also be used when the data set is small, and the model is trained by cross-validation and grid method, thereby alleviating the overfitting phenomenon that exists when the data set is small, and finally significantly improving the prediction accuracy of the upper limit of permafrost.
[0054] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0056] Figure 1 It is a flow chart of a method for predicting the upper limit of permafrost provided in an embodiment of the present application;
[0057] Figure 2 This is a schematic diagram of the process of predicting a predicted value using a random forest algorithm provided in an embodiment of the present application;
[0058] Figure 3 This is a schematic diagram of comparative analysis of evaluation results of various prediction methods provided in one embodiment of the present application;
[0059] Figure 4 It is a structural schematic diagram of a permafrost upper limit prediction device provided by an embodiment of the present application;
[0060] Figure 5 It is a structural diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0061] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0062] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0063] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0064] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0065] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0066] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0067] The present application embodiment provides a method for predicting the upper limit of permafrost. Figure 1 is a schematic diagram of the process of the permafrost upper limit prediction method provided in an embodiment of the present application, referring to Figure 1 The upper limit prediction method of permafrost is described as follows:
[0068] Step 101, obtaining historical permafrost upper limit data of the target roadbed and historical environmental data affecting the historical permafrost upper limit data, and obtaining a training set and a test set.
[0069] Exemplarily, obtaining historical permafrost upper limit data of a target roadbed and historical environmental data that affects the historical permafrost upper limit data to obtain a training set and a test set may include:
[0070] Obtain historical permafrost upper limit data for the target roadbed, as well as various types of historical environmental data for the location of the target roadbed.
[0071] The correlation coefficients between the historical permafrost upper limit and each type of historical environmental data were calculated, and multiple correlation coefficients were obtained.
[0072] The type of environmental data corresponding to the correlation coefficient exceeding the first threshold among the multiple correlation coefficients is determined as the historical environmental data affecting the historical permafrost upper limit data.
[0073] The historical permafrost upper limit data of the target roadbed and the historical environmental data affecting the historical permafrost upper limit data are matched one by one according to time to obtain a first data set.
[0074] The first data set is divided according to a preset ratio to obtain a training set and a test set.
[0075] In some specific embodiments, the preset ratio is generally 4:1. For higher adaptability, the preset ratio can be adaptively modified according to different actual situations.
[0076] In some specific embodiments, based on the calculated correlation coefficient between the historical permafrost upper limit and each type of historical environmental data, the environmental factors related to the permafrost upper limit at the target roadbed location can be screened out, irrelevant data can be eliminated, the amount of data calculation can be reduced, and the speed of predicting the permafrost upper limit can be accelerated.
[0077] Exemplarily, calculating the correlation coefficient between the historical permafrost upper limit and each type of historical environmental data to obtain multiple correlation coefficients may include:
[0078] Combined with the second formula, the correlation coefficient between the upper limit of historical permafrost and each type of historical environmental data is calculated to obtain multiple correlation coefficients.
[0079] The second formula is:
[0080]
[0081] in, Indicates the upper limit of historical permafrost and Correlation coefficient of historical environmental data of type, Indicates the number of time series numbers. Indicates Time series number The value of the historical environment data of the type, Indicates The upper limit of historical permafrost The value of Show all The average value of the historical environmental data of the type, The upper limit of all historical permafrost The mean of the values.
[0082] In some specific embodiments, the correlation coefficient is a Spearman correlation coefficient, which is a nonparametric statistical method based on rank, used to measure the degree of correlation between two variables, and is suitable for analyzing nonlinear correlations, and is more suitable for quantifying the nonlinear correlation between the upper limit of permafrost and environmental data.
[0083] Exemplarily, obtaining historical permafrost upper limit data of the target roadbed and various types of historical environmental data of the location of the target roadbed may include:
[0084] Obtain raw data on historical permafrost upper limits and raw data on historical environmental data.
[0085] The original data of the historical permafrost upper limit and the original data of the historical environmental data are cleaned, filled, resampled and normalized to obtain the historical permafrost upper limit of the target roadbed and various types of historical environmental data at the location of the target roadbed.
[0086] In some specific embodiments, the specific steps of data cleaning are as follows: the data collected by the monitoring sensor may be affected by environmental interference and equipment problems, resulting in abnormal isolated data points and noise data. These abnormal data will affect the accuracy and real-time performance of the upper limit prediction and stability assessment of frozen soil, so data cleaning is required. In order to clean the data collected by the monitoring sensors along the railway, the 3σ standard denoising method is selected to exclude abnormal data and noise, and ensure the data quality and reliability of the analysis results.
[0087] In some specific embodiments, the specific steps of data filling are as follows: during the data processing process, the original data may have missing or abnormal values, and data filling is required to ensure the continuity of the data. In particular, for data with strong continuity such as ground temperature and meteorological data, a forward filling method can be used to fill the missing values during processing. Since these data do not change much in a short period of time, the forward filling method can conveniently complete the data filling operation while maintaining the accuracy of the filling result and avoiding the introduction of large errors.
[0088] In some specific embodiments, the specific steps of data resampling are as follows: Since the sampling frequency of ground temperature data is twice a month, which is different from the frequency of air temperature data collection, the data needs to be resampled and frequency converted. One method is to convert the air temperature data to a frequency of twice a month by calculating the average value of the air temperature data in each time period. In this way, the frequency of ground temperature data and air temperature data can be kept consistent for subsequent analysis and comparison.
[0089] In some specific embodiments, the specific steps of data normalization are as follows: Since the value ranges of various continuous data features (such as daily average temperature, surface temperature, surface heat flux, and upper limit of frozen ground) vary greatly, in order to accelerate the convergence speed of the model, these continuous feature data need to be normalized. Through normalization, the value ranges of different feature data can be mapped to similar scales, which is conducive to faster learning and convergence of the model and improves training efficiency and accuracy.
[0090] In some specific embodiments, performing data cleaning, data filling, data resampling and data normalization operations can make the subsequently calculated data more accurate, thereby accurately predicting the upper limit of permafrost in the future.
[0091] Step 102, training a permafrost upper limit prediction model based on the training set and the test set; wherein the permafrost upper limit prediction model is a prediction model formed by combining a random forest algorithm, an extreme gradient boosting algorithm, and a long short-term memory network.
[0092] Exemplarily, step 102 may include:
[0093] The training set is randomly divided through cross-validation to obtain multiple sets of training data and multiple sets of corresponding validation data. Among them, the cross-validation is a five-fold cross-validation, that is, the training set is divided into five equal parts, four of which are training data and one is validation data. Because any four parts can be divided into training data, five sets of divided training data and corresponding validation data will be obtained.
[0094] The random forest algorithm, extreme gradient boosting algorithm and long short-term memory network are all used as target algorithms. Parameters of each target algorithm are initialized, optimized and modified to obtain the final parameter set of each target algorithm. Among them, there is no obvious order between the parameter initialization step and the above cross-validation process. Therefore, in actual production life, the parameter initialization process can be before or after the cross-validation process.
[0095] Based on multiple sets of validation data, the weights of the random forest algorithm, the extreme gradient boosting algorithm, and the long short-term memory network are calculated.
[0096] Based on the final parameter set of the random forest algorithm, the parameter set of the extreme gradient boosting algorithm, the final parameter set of the long short-term memory network, the weights of the random forest algorithm, the weights of the extreme gradient boosting algorithm and the weights of the long short-term memory network, the trained permafrost upper limit prediction model was obtained.
[0097] Perform parameter initialization, parameter optimization and parameter correction for each target algorithm to obtain the final parameter set of each target algorithm, which may include:
[0098] Initialize the parameters of each target algorithm.
[0099] Based on multiple sets of training data and multiple sets of corresponding verification data, the grid method is used to optimize the parameters of each target algorithm to obtain the optimal parameter set for each target algorithm.
[0100] Select mean square error as the loss function of each target algorithm, calculate the error value of each target algorithm based on the test set, the optimal parameter set of each target algorithm and each target algorithm, and correct the optimal parameter set of each target algorithm based on the error value of each target algorithm until the optimal parameter set of each target algorithm no longer changes or the number of training times reaches a first preset value, so as to obtain the final parameter set of each target algorithm.
[0101] The permafrost upper limit prediction model is trained through cross-validation and grid method. Cross-validation can generate enough training data and verification data to ensure the sufficiency of training data, while the grid method can enable the model to fully optimize and ensure the accuracy of the model. Therefore, it alleviates the possibility of overfitting of the permafrost upper limit prediction model when the data set is small, and ultimately significantly improves the prediction accuracy of the permafrost upper limit.
[0102] In some specific embodiments, the sample sequences input into the three algorithms are: , in this sequence m Indicates the time series number (representing different moments), n represents the number of environmental factors that affect the upper limit of permafrost, and Indicated as m The true value of the upper limit of permafrost corresponding to the time series number is used. That is, the error value of the target algorithm is calculated using this true value and the predicted value calculated based on environmental data.
[0103] In some specific embodiments, step 102 may specifically include the following steps:
[0104] Step 1: Construct training and test sets. The data sources of the training and test sets are the historical permafrost upper limit data of the target roadbed and various types of historical environmental data of the target roadbed. The ratio of data in the training and test sets is 4:1. Input the training samples in the training set. j The training samples are the input sequence .
[0105] Step 2: Initialize the parameters of all algorithms in each algorithm.
[0106] Step 3: Through cross-validation, the training set data is randomly divided into five equal parts, 80% of the data is training data, and the other 20% of the data is validation data. The grid method is used to optimize the parameters. Taking LSTM as an example, five sets of optimal parameters are first trained based on five sets of training data, and then the optimal parameter set is found based on the validation data.
[0107] Step 4: Select mean square error (MSE) as the loss function of LSTM, and use the test set data to backpropagate and calculate the error value of LSTM, so that the parameters of LSTM can be adjusted according to the error value.
[0108] Step 5: Continue to iterate (adjust LSTM parameters to minimize MSE) until LSTM parameters no longer change or the number of training times reaches the preset value. In order to fully achieve the training efficiency, the range of the hyperparameter grid is continuously reduced, so that LSTM is quickly trained to reach the optimal state, and finally the LSTM parameters are output. The process of RF obtaining the final parameters and the process of XGBoost obtaining the final parameters are the same as the process of LSTM obtaining the final parameters. The parameters of the last three algorithms are shown in Table 1, and the optimal permafrost upper limit prediction model is obtained, thereby calculating the prediction results.
[0109] Table 1 Model parameter configuration
[0110]
[0111] Step 6: Take the method of linear weighted combination based on the minimum absolute error, calculate the predicted values of the RF algorithm, the LSTM algorithm, the XGBoost algorithm, and the corresponding true value (permafrost upper limit), and get the proportion of the predicted values of the three algorithms in the overall model predicted value. Compared with the traditional method of directly giving the proportion, it is more suitable for the situation of the target roadbed, and thus makes the result more accurate.
[0112] In some specific embodiments, the random forest algorithm is an integrated machine learning algorithm for classification and regression tasks, and is also a model based on bootstrap repeated sampling technology. The steps of the random forest algorithm include the following main steps:
[0113] Data preparation: First, you need to prepare a dataset for training and testing the model. The dataset should contain features and corresponding target variables. Features are attributes or characteristics used to predict the target variable, while the target variable is the value that needs to be predicted by regression. Usually, the dataset needs to be divided into a training set and a test set, where the training set is used to train the model and the test set is used to evaluate the performance of the model.
[0114] Build a random forest: In the Scikit-learn library, use the RandomForestRegressor class to build a random forest regression model. Set hyperparameters to control the behavior of the random forest, such as the number of decision trees, feature selection method, and decision tree growth method. Adjust the parameters according to actual problems and needs.
[0115] Training model: Use the training set to train the random forest regression model. The model will build multiple decision trees based on the samples in the training set and the value of the target variable, and perform feature selection and partitioning on each tree.
[0116] Prediction results: Use the trained random forest regression model to predict the samples in the test set. The model will average or weighted average the prediction results of each decision tree to obtain the final regression prediction results.
[0117] Model evaluation: Evaluate the performance of the model by comparing it with the true target variable. Various regression performance indicators such as mean squared error (MSE), mean absolute error (MAE), coefficient of determination (R-squared) can be used to evaluate the accuracy and generalization ability of the model.
[0118] Model tuning: Based on the results of model evaluation, the random forest regression model can be tuned. You can try to adjust the parameters of the random forest, such as increasing or decreasing the number of decision trees, adjusting the feature selection method, adjusting the growth method of decision trees, etc., to improve the performance of the model.
[0119] Model application: After model evaluation and tuning, the trained random forest regression model can be used for actual prediction. Figure 2 First, randomly sample from the training samples to obtain multiple sample sets such as D1, D2, and D3, and predict the results respectively. Finally, the multiple predicted values are averaged to obtain the corresponding prediction results of the samples input this time.
[0120] In some embodiments, the first step of the LSTM process is to pass the forget gate , the Forget Gate Determines which information the memory cell discards from the previous state. The formula (1) is as follows:
[0121]
[0122] in, represents the forget gate and takes a value in [0, 1], is the logistic sigmoid function, and is an adjustable weight matrix, is the bias vector. is the input amount for this time (i.e., the historical environmental data in multiple sets of verification data).
[0123] The next step determines what information to add to the memory cell for update. The sigmoid function in the input gate determines which values to update. The layer generates a potential update vector ; and The calculation formulas are (2) and (3):
[0124]
[0125] in, represents the input gate, taking the value in (0, 1), , and is a set of learnable parameters defined for the input gate. , and is another set of learnable parameters.
[0126] After deciding which information to discard and which to keep, the cell status The updated and calculated formula is (4):
[0127]
[0128] Where ⊙ represents element-wise multiplication, Definitions are stored in what information in the Defines what new information will be added to the cell state .
[0129] The last step is to calculate the output gate , which determines the hidden state Output Calculated by sigmoid function; output (i.e., the third predicted value) is obtained by and Output The multiplication is as follows, as shown in equation (6):
[0130]
[0131] in, is a vector with values in the range (0, 1), , and are three learnable parameters defined for the input gate.
[0132] In some specific embodiments, XGBoost (Extreme Gradient Boosting) is a popular and powerful machine learning algorithm for classification and regression tasks. It is an extension of the gradient boosting algorithm, designed to improve performance and speed for large-scale data sets. Regression trees are used as base learners, and an optimal solution is sought for each regression tree, gradually approaching the optimized loss function.
[0133]
[0134] in, Representative i The predicted value of samples (i.e., the second predicted value); It is j A regression tree, k is the number of machine learning machines; Representative i The characteristic values of samples (i.e., historical environmental data in multiple groups of validation data); i Refers to i samples; For the front k -1 The cumulative result of the regression tree; Currently in need of optimization k A regression tree.
[0135] In the XGBoost algorithm, the objective function mainly consists of two parts. One part is an arbitrarily differentiable loss function, which is used to control the empirical risk of the model. The other part is to control the complexity of the model. , use it to control the structural risk of the current tree.
[0136]
[0137]
[0138] for The predicted value of samples (i.e., the second predicted value); is the true value (i.e. i actual upper permafrost limit in historical environmental data from the group validation data); N is the number of samples; is the loss function; is the regularization term, ; In the regular term is the penalty for hyperparameter control, T is the number of leaf nodes of the current regression tree, W The value of each leaf node.
[0139] The objective function is split into leaf nodes as the target with samples as the target, and the second-order Taylor expansion formula is substituted into the objective function to obtain:
[0140]
[0141]
[0142] in, , , , .
[0143] Minimize the objective function and solve Leaf node prediction value; Minimize the objective function:
[0144]
[0145]
[0146] How to split nodes is a key issue in the decision tree growth process. The XGBoost algorithm adopts a greedy strategy. For each leaf node division, the structural score gain is calculated and the point with the maximum gain is selected for branching.
[0147]
[0148] In the formula is the left node structure score, For the right node structure number, is the structural score of the parent node.
[0149] Exemplarily, based on multiple sets of validation data, calculating the weights of a random forest algorithm, the weights of an extreme gradient boosting algorithm, and the weights of a long short-term memory network may include:
[0150] Based on the historical environmental data in multiple groups of verification data and the random forest algorithm, multiple first prediction values are predicted.
[0151] Based on the historical environmental data in multiple groups of verification data and the extreme gradient boosting algorithm, multiple second prediction values are predicted.
[0152] Based on the historical environmental data and long short-term memory network in multiple groups of verification data, multiple third prediction values are predicted.
[0153] Based on the minimum absolute error linear weighted method, multiple first prediction values, multiple second prediction values and multiple third prediction values, the weights of the random forest algorithm, the weights of the extreme gradient boosting algorithm and the weights of the long short-term memory network are calculated.
[0154] Exemplarily, based on the minimum absolute error linear weighted method, multiple first prediction values, multiple second prediction values, and multiple third prediction values, calculating the weight of the random forest algorithm, the weight of the extreme gradient boosting algorithm, and the weight of the long short-term memory network may include:
[0155] Based on the minimum absolute error linear weighted method, multiple first prediction values, multiple second prediction values and multiple third prediction values, combined with the first formula, the weights of the random forest algorithm, the weights of the extreme gradient boosting algorithm and the weights of the long short-term memory network are calculated.
[0156] The first formula can be:
[0157]
[0158] in, Indicates The first predicted value, Indicates The second predicted value, Indicates The third predicted value, represents the weight of the random forest algorithm, represents the weight of the extreme gradient boosting algorithm, represents the weight of the long short-term memory network, Indicates The true value of the upper limit of historical permafrost in the validation data.
[0159] In some specific embodiments, weights are calculated based on the minimum absolute error linear weighted method, multiple first prediction values, multiple second prediction values, and multiple third prediction values. This can better reflect the relationship between the data, rather than simply assigning weights. The weights are more reasonable, thereby ensuring the accuracy of predicting the upper limit of permafrost.
[0160] Step 103, based on the environmental data that affects the permafrost upper limit data of the target period and the trained permafrost upper limit prediction model, predict the permafrost upper limit of the target roadbed in the target period; wherein the target period is any time period in the future.
[0161] In order to better demonstrate the accuracy of the prediction results of this solution, Figure 3 As shown in the figure, the prediction result of the prediction model constructed in this solution is the closest to the actual value. You can also get the mean square error (MSE), mean absolute percentage error (MAPE), root mean square error (RMSE), mean absolute error (MAE) and coefficient of determination (R 2) is used to evaluate the four methods of predicting the upper limit of permafrost, namely, using RF alone, using XGBoost alone, using LSTM alone, and the prediction model of this scheme. The evaluation results are shown in Table 2. It is not difficult to see that from multiple evaluation perspectives, the accuracy of this scheme is better and more accurate than other schemes.
[0162] Table 2 Model evaluation indicators
[0163]
[0164] In the field of machine learning, combination models are popular for their excellent performance. However, such models are often criticized as "black boxes" because it is difficult to explain the intrinsic connection between input variables and prediction targets. To overcome this challenge, researchers proposed using the SHAP (SHapley Additive exPlanations, Explain Machine Learning) interpreter to clarify the specific contribution of each feature to the prediction. SHAP provides a method to calculate the additional importance scores of each feature, which reflects the importance of each factor in the prediction of the final combination model. SHAP is a model post-interpretation method, the core of which is to evaluate the marginal contribution of features to the model output. If a feature has a positive contribution value, it means that it has a positive effect on the prediction result; if the contribution value is negative, it means that the feature causes the prediction value to decrease and has a counter-effect. The biggest advantage of the SHAP value is that it not only reveals the feature influence of each sample, but also clearly shows whether this influence is positive or negative. This method greatly enhances the interpretability of the model and helps researchers and practitioners better understand and trust their machine learning models.
[0165] In the study of the permafrost upper limit prediction model, in order to ensure the comparability and interpretability of different feature importance values, the permafrost upper limit is set as the target parameter. By processing and analyzing the feature importance, the importance ranking of each variable affecting the prediction result in the permafrost upper limit prediction model is determined. In a specific embodiment, the overall importance analysis shows that the daily average temperature has the greatest impact on the prediction of the permafrost upper limit, followed by the surface heat flux, while the contribution of the surface temperature is relatively small. In addition, the individual impact analysis performed by applying the SHAP technology further shows that the monitoring values of the daily average temperature and the surface heat flux have made a greater positive contribution to the prediction of the permafrost upper limit, while the sample points of the surface temperature have a relatively weak contribution to the prediction results. This method can also verify from the side whether the results of the correlation coefficient calculation are accurate, thereby more stably ensuring the accuracy of the prediction results.
[0166] The above-mentioned permafrost upper limit prediction method uses the random forest algorithm, extreme gradient boosting algorithm and long short-term memory network in the permafrost upper limit prediction model. The random forest algorithm constructs multiple decision trees and uses random subsets in the training set and test set for training, thereby effectively handling the uncertainty and complexity in the permafrost upper limit data. The long short-term memory network can capture the temporal correlation in the training set and test set data, and consider the relationship between the permafrost upper limit and time changes. The extreme gradient boosting algorithm further improves the performance of the prediction model by gradient boosting, making it more suitable for accurate prediction under different environmental conditions. The factors affecting the permafrost upper limit are considered more comprehensively, and the permafrost upper limit prediction model is obtained by training based on these factors. The permafrost upper limit prediction model can fully consider the complexity of the data, the uncertainty of the data, the temporal changes and the limitations of nonlinear relationships, and the prediction efficiency is higher and the prediction results are more accurate.
[0167] In addition, compared with the traditional prediction model, different roadbeds are located in different positions, and the traditional fixed model for predicting the upper limit of permafrost will have certain errors, but the permafrost upper limit prediction model in this application can establish a prediction model that is more consistent with the target roadbed based on the historical data of the target roadbed, thereby making the prediction result more accurate. The model of this application can also be used when the data set is small, and the model is trained by cross-validation and grid method, thereby alleviating the overfitting phenomenon that exists when the data set is small, and finally significantly improving the prediction accuracy of the upper limit of permafrost.
[0168] It should be understood that the size of the serial numbers of the steps in the above embodiments does not 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 embodiments of the present application.
[0169] Corresponding to the permafrost upper limit prediction method described in the above embodiment, Figure 4 A structural block diagram of a permafrost upper limit prediction device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0170] See also Figure 4 The permafrost upper limit prediction device in the embodiment of the present application may include:
[0171] The data acquisition module 201 is used to acquire the historical permafrost upper limit data of the target roadbed and the historical environmental data that affects the historical permafrost upper limit data, and obtain a training set and a test set.
[0172] The model training module 202 is used to train the permafrost upper limit prediction model based on the training set and the test set; wherein the permafrost upper limit prediction model is a prediction model formed by combining the random forest algorithm, the extreme gradient boosting algorithm and the long short-term memory network.
[0173] The result output module 203 is used to predict the permafrost upper limit of the target roadbed in the target period based on the environmental data that affects the permafrost upper limit data of the target period and the trained permafrost upper limit prediction model; wherein the target period is any time period in the future.
[0174] Exemplarily, the model training module 202 may be used to:
[0175] The training set is randomly divided through cross-validation to obtain multiple groups of training data and multiple groups of corresponding verification data.
[0176] The random forest algorithm, extreme gradient boosting algorithm and long short-term memory network are all taken as target algorithms. Parameter initialization, parameter optimization and parameter correction are performed on each target algorithm to obtain the final parameter set of each target algorithm.
[0177] Based on multiple sets of validation data, the weights of the random forest algorithm, the extreme gradient boosting algorithm, and the long short-term memory network are calculated.
[0178] Based on the final parameter set of the random forest algorithm, the parameter set of the extreme gradient boosting algorithm, the final parameter set of the long short-term memory network, the weights of the random forest algorithm, the weights of the extreme gradient boosting algorithm and the weights of the long short-term memory network, the trained permafrost upper limit prediction model was obtained.
[0179] Exemplarily, the model training module 202 may also be used for:
[0180] Initialize the parameters of each target algorithm.
[0181] Based on multiple sets of training data and multiple sets of corresponding verification data, the grid method is used to optimize the parameters of each target algorithm to obtain the optimal parameter set for each target algorithm.
[0182] Select mean square error as the loss function of each target algorithm, calculate the error value of each target algorithm based on the test set, the optimal parameter set of each target algorithm and each target algorithm, and correct the optimal parameter set of each target algorithm based on the error value of each target algorithm until the optimal parameter set of each target algorithm no longer changes or the number of training times reaches a first preset value, so as to obtain the final parameter set of each target algorithm.
[0183] Exemplarily, the model training module 202 may also be used for:
[0184] Based on the historical environmental data in multiple groups of verification data and the random forest algorithm, multiple first prediction values are predicted.
[0185] Based on the historical environmental data in multiple groups of verification data and the extreme gradient boosting algorithm, multiple second prediction values are predicted.
[0186] Based on the historical environmental data and long short-term memory network in multiple groups of verification data, multiple third prediction values are predicted.
[0187] Based on the minimum absolute error linear weighted method, multiple first prediction values, multiple second prediction values and multiple third prediction values, the weights of the random forest algorithm, the weights of the extreme gradient boosting algorithm and the weights of the long short-term memory network are calculated.
[0188] Exemplarily, the model training module 202 may also be used for:
[0189] Based on the minimum absolute error linear weighted method, multiple first prediction values, multiple second prediction values and multiple third prediction values, combined with the first formula, the weights of the random forest algorithm, the weights of the extreme gradient boosting algorithm and the weights of the long short-term memory network are calculated.
[0190] The first formula can be:
[0191]
[0192] in, Indicates The first predicted value, Indicates The second predicted value, Indicates The third predicted value, represents the weight of the random forest algorithm, represents the weight of the extreme gradient boosting algorithm, represents the weight of the long short-term memory network, Indicates The true value of the upper limit of historical permafrost in the validation data.
[0193] Exemplarily, the data acquisition module 201 may be used for:
[0194] Obtain historical permafrost upper limit data for the target roadbed, as well as various types of historical environmental data for the location of the target roadbed.
[0195] The correlation coefficients between the historical permafrost upper limit and each type of historical environmental data were calculated, and multiple correlation coefficients were obtained.
[0196] The type of environmental data corresponding to the correlation coefficient exceeding the first threshold among the multiple correlation coefficients is determined as the historical environmental data affecting the historical permafrost upper limit data.
[0197] The historical permafrost upper limit data of the target roadbed and the historical environmental data affecting the historical permafrost upper limit data are matched one by one according to time to obtain a first data set.
[0198] The first data set is divided according to a preset ratio to obtain a training set and a test set.
[0199] Exemplarily, the data acquisition module 201 may also be used for:
[0200] Combined with the second formula, the correlation coefficient between the upper limit of historical permafrost and each type of historical environmental data is calculated to obtain multiple correlation coefficients.
[0201] The second formula can be:
[0202]
[0203] in, Indicates the upper limit of historical permafrost and Correlation coefficient of historical environmental data of type, Indicates the number of time series numbers. Indicates Time series number The value of the historical environment data of the type, Indicates The upper limit of historical permafrost The value of Show all The average value of the historical environmental data of the type, The upper limit of all historical permafrost The mean of the values.
[0204] Exemplarily, the data acquisition module 201 may also be used for:
[0205] Obtain raw data on historical permafrost upper limits and raw data on historical environmental data.
[0206] The original data of the historical permafrost upper limit and the original data of the historical environmental data are cleaned, filled, resampled and normalized to obtain the historical permafrost upper limit of the target roadbed and various types of historical environmental data at the location of the target roadbed.
[0207] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0208] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0209] The present application also provides a terminal device, see Figure 5 The terminal device 300 may include: at least one processor 310 and a memory 320, wherein the memory 320 is used to store a computer program 321, and the processor 310 is used to call and run the computer program 321 stored in the memory 320 to implement the steps in any of the above-mentioned method embodiments, for example Figure 1 Steps 101 to 103 in the illustrated embodiment. Alternatively, when the processor 310 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 4 The functions of each module are shown.
[0210] Exemplarily, the computer program 321 may be divided into one or more modules / units, one or more modules / units are stored in the memory 320, and are executed by the processor 310 to complete the present application. The one or more modules / units may be a series of computer program segments that can complete specific functions, and the program segments are used to describe the execution process of the computer program in the terminal device 300.
[0211] Those skilled in the art will understand that Figure 5 It is only an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, buses, etc.
[0212] The processor 310 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0213] The memory 320 may be an internal storage unit of the terminal device, or an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. The memory 320 is used to store the computer program and other programs and data required by the terminal device. The memory 320 may also be used to temporarily store data that has been output or is to be output.
[0214] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0215] The permafrost upper limit prediction method provided in the embodiment of the present application can be applied to terminal devices such as computers, wearable devices, vehicle-mounted devices, tablet computers, laptops, netbooks, etc. The embodiment of the present application does not impose any restrictions on the specific type of terminal devices.
[0216] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in each embodiment of the above-mentioned permafrost upper limit prediction method can be implemented.
[0217] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in each embodiment of the above-mentioned permafrost upper limit prediction method when executing the computer program product.
[0218] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electrical carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0219] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0220] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0221] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0222] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0223] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for predicting the upper limit of permafrost, characterized in that: include: Obtaining historical permafrost upper limit data of a target roadbed and historical environmental data that affects the historical permafrost upper limit data, to obtain a training set and a test set; Training a permafrost upper limit prediction model according to the training set and the test set; wherein the permafrost upper limit prediction model is a prediction model formed by combining a random forest algorithm, an extreme gradient boosting algorithm and a long short-term memory network; Based on the environmental data that affects the permafrost upper limit data of the target period and the trained permafrost upper limit prediction model, predict the permafrost upper limit of the target roadbed in the target period; wherein the target period is any time period in the future; The step of training the permafrost upper limit prediction model according to the training set and the test set comprises: The training set is randomly divided by cross-validation to obtain multiple groups of training data and multiple groups of corresponding validation data; The random forest algorithm, the extreme gradient boosting algorithm and the long short-term memory network are all used as target algorithms, and parameters of each target algorithm are initialized, optimized and corrected to obtain a final parameter set of each target algorithm; Based on multiple groups of validation data, calculating the weight of the random forest algorithm, the weight of the extreme gradient boosting algorithm, and the weight of the long short-term memory network; Based on the final parameter set of the random forest algorithm, the parameter set of the extreme gradient boosting algorithm, the final parameter set of the long short-term memory network, the weight of the random forest algorithm, the weight of the extreme gradient boosting algorithm and the weight of the long short-term memory network, a trained permafrost upper limit prediction model is obtained; The parameter initialization, parameter optimization and parameter correction of each target algorithm are performed to obtain the final parameter set of each target algorithm, including: Initialize the parameters of each target algorithm; Based on the multiple sets of training data and the multiple sets of corresponding verification data, the parameters of each target algorithm are optimized by a grid method to obtain an optimal parameter set for each target algorithm; Selecting mean square error as the loss function of each target algorithm, calculating the error value of each target algorithm based on the test set, the optimal parameter set of each target algorithm and each target algorithm, and correcting the optimal parameter set of each target algorithm based on the error value of each target algorithm until the optimal parameter set of each target algorithm no longer changes or the number of training times reaches a first preset value, thereby obtaining a final parameter set of each target algorithm; The step of calculating the weight of the random forest algorithm, the weight of the extreme gradient boosting algorithm, and the weight of the long short-term memory network based on multiple groups of verification data includes: Based on the historical environmental data in the multiple groups of verification data and the random forest algorithm, predict and obtain multiple first prediction values; Based on the historical environmental data in the multiple groups of verification data and the extreme gradient boosting algorithm, predict a plurality of second prediction values; Based on the historical environment data in the multiple groups of verification data and the long short-term memory network, predict and obtain multiple third prediction values; Based on the minimum absolute error linear weighted method, the multiple first prediction values, the multiple second prediction values, and the multiple third prediction values, the weight of the random forest algorithm, the weight of the extreme gradient boosting algorithm, and the weight of the long short-term memory network are calculated; The method of calculating the weight of the random forest algorithm, the weight of the extreme gradient boosting algorithm and the weight of the long short-term memory network based on the minimum absolute error linear weighted method, the multiple first prediction values, the multiple second prediction values and the multiple third prediction values includes: Based on the minimum absolute error linear weighted method, the multiple first prediction values, the multiple second prediction values, and the multiple third prediction values, combined with the first formula, the weight of the random forest algorithm, the weight of the extreme gradient boosting algorithm, and the weight of the long short-term memory network are calculated; The first formula is: in, Indicates The first predicted value, Indicates The second predicted value, Indicates The third predicted value, represents the weight of the random forest algorithm, represents the weight of the extreme gradient boosting algorithm, represents the weight of the LSTM network, Indicates The true value of the upper limit of historical permafrost in the validation data.
2. The method for predicting the upper limit of permafrost according to claim 1, characterized in that: The method of obtaining the historical permafrost upper limit data of the target roadbed and the historical environmental data affecting the historical permafrost upper limit data to obtain a training set and a test set includes: Obtaining historical permafrost upper limit data of the target roadbed and various types of historical environmental data of the location of the target roadbed; calculating the correlation coefficient between the historical permafrost upper limit and each type of historical environmental data to obtain a plurality of correlation coefficients; Determine the type of environmental data corresponding to the correlation coefficient exceeding the first threshold value among the plurality of correlation coefficients as historical environmental data affecting the historical permafrost upper limit data; The historical permafrost upper limit data of the target roadbed and the historical environmental data affecting the historical permafrost upper limit data are matched one by one according to time to obtain a first data set; The first data set is divided according to a preset ratio to obtain the training set and the test set.
3. The method for predicting the upper limit of permafrost according to claim 2, characterized in that: The calculation of the correlation coefficient between the historical permafrost upper limit and each type of historical environmental data obtains a plurality of correlation coefficients, including: In combination with the second formula, a correlation coefficient between the upper limit of the historical permafrost and each type of historical environmental data is calculated to obtain a plurality of correlation coefficients; The second formula is: in, Indicates the upper limit of historical permafrost and Correlation coefficient of historical environmental data of type, Indicates the number of time series numbers. Indicates Time series number The value of the historical environment data of the type, Indicates The upper limit of historical permafrost The value of Show all The average value of the historical environmental data of the type, The upper limit of all historical permafrost The mean of the values.
4. The method for predicting the upper limit of permafrost according to claim 2, characterized in that: The obtaining of the historical permafrost upper limit data of the target roadbed and various types of historical environmental data of the location of the target roadbed includes: Obtaining original data of the upper limit of historical permafrost and original data of the historical environmental data; The original data of the historical permafrost upper limit and the original data of the historical environmental data are subjected to data cleaning, data filling, data resampling and data normalization operations to obtain the historical permafrost upper limit of the target roadbed and various types of historical environmental data at the location of the target roadbed.
5. A permafrost upper limit prediction device, characterized in that: include: A data acquisition module is used to acquire the historical permafrost upper limit data of the target roadbed and the historical environmental data that affects the historical permafrost upper limit data, and obtain a training set and a test set; A model training module, used for training a permafrost upper limit prediction model according to the training set and the test set; wherein the permafrost upper limit prediction model is a prediction model formed by combining a random forest algorithm, an extreme gradient boosting algorithm and a long short-term memory network; A result output module is used to predict the upper limit of permafrost of the target roadbed in the target period based on the environmental data that affects the upper limit of permafrost in the target period and the trained upper limit prediction model of permafrost; wherein the target period is any time period in the future; The model training module is also used for: The training set is randomly divided by cross-validation to obtain multiple groups of training data and multiple groups of corresponding validation data; The random forest algorithm, the extreme gradient boosting algorithm and the long short-term memory network are all used as target algorithms, and parameters of each target algorithm are initialized, optimized and corrected to obtain a final parameter set of each target algorithm; Based on multiple groups of validation data, calculating the weight of the random forest algorithm, the weight of the extreme gradient boosting algorithm, and the weight of the long short-term memory network; Based on the final parameter set of the random forest algorithm, the parameter set of the extreme gradient boosting algorithm, the final parameter set of the long short-term memory network, the weight of the random forest algorithm, the weight of the extreme gradient boosting algorithm and the weight of the long short-term memory network, a trained permafrost upper limit prediction model is obtained; The model training module is also used for: Initialize the parameters of each target algorithm; Based on the multiple sets of training data and the multiple sets of corresponding verification data, the parameters of each target algorithm are optimized by a grid method to obtain an optimal parameter set for each target algorithm; Selecting mean square error as the loss function of each target algorithm, calculating the error value of each target algorithm based on the test set, the optimal parameter set of each target algorithm and each target algorithm, and correcting the optimal parameter set of each target algorithm based on the error value of each target algorithm until the optimal parameter set of each target algorithm no longer changes or the number of training times reaches a first preset value, thereby obtaining a final parameter set of each target algorithm; The model training module is also used for: Based on the historical environmental data in the multiple groups of verification data and the random forest algorithm, predict and obtain multiple first prediction values; Based on the historical environmental data in the multiple groups of verification data and the extreme gradient boosting algorithm, predict a plurality of second prediction values; Based on the historical environment data in the multiple groups of verification data and the long short-term memory network, predict and obtain multiple third prediction values; Based on the minimum absolute error linear weighted method, the multiple first prediction values, the multiple second prediction values, and the multiple third prediction values, the weight of the random forest algorithm, the weight of the extreme gradient boosting algorithm, and the weight of the long short-term memory network are calculated; The model training module is also used for: Based on the minimum absolute error linear weighted method, the multiple first prediction values, the multiple second prediction values, and the multiple third prediction values, combined with the first formula, the weight of the random forest algorithm, the weight of the extreme gradient boosting algorithm, and the weight of the long short-term memory network are calculated; The first formula is: in, Indicates The first predicted value, Indicates The second predicted value, Indicates The third predicted value, represents the weight of the random forest algorithm, represents the weight of the extreme gradient boosting algorithm, represents the weight of the LSTM network, Indicates The true value of the upper limit of historical permafrost in the validation data.
6. A terminal device, comprising: A processor and a memory, wherein the memory stores a computer program that can be run on the processor, wherein when the processor executes the computer program, the method for predicting the upper limit of permafrost as described in any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for predicting the upper limit of permafrost as claimed in any one of claims 1 to 4 is implemented.
