Tower strain time sequence prediction method based on random forest algorithm
Based on random forest algorithm -based rod response time sequence prediction methods, the problem that the tower rod is naturally changed is difficult to predict, and the accurate prediction of the tower rod value is achieved, and the safety and stability of the structure is improved.
Patent Information
- Application Number
- CN202411465975.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-28
AI Technical Summary
The natural strain value of the tower rod has certain rules in time, but the prior art is difficult to accurately predict, resulting in the risk of structural instability and damage.
Adopt a tower -based tower strain time sequence prediction method based on random forest algorithms, and through the historical strain data set of the tower, the random forest model is trained to predict the transformer value of the tower rod on the time sequence of the future.
The accurate prediction of the natural value of the tower rod is realized, the structural safety and stability are improved, and the risk of damage is reduced.
Smart Images

Figure CN119377673A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of power transmission line structure safety, and in particular to a tower strain time series prediction method based on a random forest algorithm. Background Art
[0002] Strain is used to quantitatively describe the deformation (expansion and torsion) of an object and is a dimensionless number. Outdoor transmission towers may experience slight deformations over time and due to climate change. This slight deformation is the natural strain of the tower. The natural strain of the tower may cause the tower structure to be unstable. Under various working conditions and disaster environments, towers with large natural strain values are prone to damage. Summary of the invention
[0003] The present disclosure provides a method for predicting the time series of tower strain based on a random forest algorithm, which can accurately predict the natural strain of the tower. The technical solution includes at least the following solutions: In a first aspect, a method for predicting a tower strain time series based on a random forest algorithm is provided, comprising: obtaining a historical strain data set of a first tower, the historical strain data set comprising multiple moments and strain values corresponding to the moments; training a first random forest model based on the historical strain data set; and predicting the strain value of the first tower in a first time series based on the trained first random forest model.
[0004] Optionally, the first random forest model includes n decision trees, and training the first random forest model based on the historical strain data includes: training the n decision trees based on n historical strain data subsets, the n historical strain data subsets corresponding to the n decision trees one-to-one, and each of the historical strain data subsets is determined based on the historical strain data set; taking the average value of the outputs of the n decision trees as the output of the first random forest model; wherein n is a positive integer.
[0005] Optionally, the training of the n decision trees based on n historical strain data subsets includes: dividing a first historical strain data subset into in-bag data and out-of-bag data, using the in-bag data of the first historical strain data subset to train the first decision tree, and in the process of using the in-bag data of the first historical strain data subset to train the first decision tree, using the out-of-bag data of the first historical strain data subset to perform an unbiased estimate of the error in the first decision tree; wherein the first historical strain data is any one of the n historical data subsets, and the first decision tree is a decision tree among the n decision trees corresponding to the first historical strain data subset.
[0006] Optionally, the method also includes: obtaining the mean square error, root mean square error, mean absolute error and determination coefficient of the first random forest model; and evaluating the performance of the first random forest model based on the mean square error, root mean square error, mean absolute error and determination coefficient of the first random forest model.
[0007] In the second aspect, a tower strain time series prediction device based on a random forest algorithm is also provided, including: an acquisition module, used to obtain a historical strain data set of a first tower pole, the historical strain data set including multiple moments and strain values corresponding to the moments; a training module, used to train a first random forest model based on the historical strain data set; a prediction module, used to predict the strain value of the first tower pole in the first time series based on the trained first random forest model.
[0008] Optionally, the training module is also used to train the n decision trees based on n historical strain data subsets, the n historical strain data subsets correspond one-to-one to the n decision trees, and each of the historical strain data subsets is determined based on the historical strain data set; the average value of the outputs of the n decision trees is used as the output of the first random forest model; wherein n is a positive integer.
[0009] Optionally, the training module is also used to divide the first historical strain data subset into in-bag data and out-of-bag data, use the in-bag data of the first historical strain data subset to train the first decision tree, and in the process of using the in-bag data of the first historical strain data subset to train the first decision tree, use the out-of-bag data of the first historical strain data subset to perform an unbiased estimate of the error in the first decision tree; wherein the first historical strain data is any one of the n historical data subsets, and the first decision tree is a decision tree among the n decision trees corresponding to the first historical strain data subset.
[0010] Optionally, the device also includes: an evaluation module, which is used to obtain the mean square error, root mean square error, mean absolute error and determination coefficient of the first random forest model; based on the mean square error, root mean square error, mean absolute error and determination coefficient of the first random forest model, evaluate the performance of the first random forest model.
[0011] In a third aspect, a computer device is also provided, comprising: a memory and a processor, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor, thereby executing the tower strain time series prediction method based on the random forest algorithm described in the above embodiment.
[0012] In a fourth aspect, a computer-readable storage medium is also provided, wherein at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor, thereby executing the tower strain time series prediction method based on the random forest algorithm described in the above embodiment.
[0013] In a fifth aspect, a computer program product is provided, comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the method described in the first aspect is implemented.
[0014] The beneficial effects brought by the technical solution provided by the embodiments of the present disclosure include at least: The natural strain of the tower is affected by weather shadows and foundation settlement. Since weather and foundation settlement have certain regularities in time, the natural strain value of the tower also has certain regularities in time, that is, the natural strain value of the tower generated over time is a predictable value. In the embodiment of the present disclosure, by obtaining the historical strain data set of the first tower, and training the first random forest model based on the historical strain data set of the first tower, the first random forest model can be used to predict the strain value of the first tower in the first time series. Since the random forest model has the characteristics of high accuracy and suppression of overfitting, the random forest model can be used to effectively and accurately predict the strain value of the first tower in the first time series. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] Figure 1 A flowchart of a tower strain time series prediction method based on a random forest algorithm provided by an exemplary embodiment of the present disclosure is shown; Figure 2 is a schematic diagram of a first position of a first tower; Figure 3 A flowchart of a tower strain time series prediction method based on a random forest algorithm provided by another exemplary embodiment of the present disclosure is shown; Figure 4 This is a schematic diagram of the structure of the first random forest; Figure 5 This is a schematic diagram of the prediction results of the first random forest model; Figure 6 A schematic structural diagram of a tower strain time series prediction device based on a random forest algorithm provided by an exemplary embodiment of the present disclosure is shown; Figure 7 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] Unless otherwise defined, the technical or scientific terms used herein shall have the usual meanings understood by persons of ordinary skill in the field to which the present disclosure belongs. The words "first", "second", "third" and similar words used in the patent application specification and claims of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "one" do not indicate a quantitative limitation, but rather indicate the presence of at least one. Words such as "include" or "comprise" and similar words mean that the elements or objects appearing before "include" or "comprises" cover the elements or objects listed after "include" or "comprises" and their equivalents, and do not exclude other elements or objects.
[0018] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.
[0019] Figure 1 A flowchart of a tower strain time series prediction method based on a random forest algorithm provided by an exemplary embodiment of the present disclosure is shown, and the method can be executed by a computer device. Figure 1 , the method comprising: In step 101, a historical strain data set of a first tower is obtained.
[0020] The historical strain data set includes multiple moments and strain values corresponding to the moments.
[0021] In the embodiment of the present disclosure, the historical strain data set refers to the historical strain data of the key structure of the first tower pole, and a fiber Bragg grating sensor can be installed at the key structure of the first tower pole to monitor the strain value of the key structure of the first tower pole. In this way, the historical strain data set of the first tower pole can be obtained by querying the historical operation data of the fiber Bragg grating sensor.
[0022] Among them, the fiber grating sensor has high sensitivity and weather resistance, and can work stably under complex environmental conditions. When the fiber grating sensor is working, it can reflect the tiny deformation of the key structure of the first tower by analyzing the wavelength changes of light waves, thereby realizing real-time collection of strain data of the tower structure.
[0023] Optionally, by performing mechanical simulation on the first tower pole, the strain generated at each position of the first tower pole after being stressed is obtained, and then the position of the first tower pole where the strain is larger (for example, the position where the strain is greater than the first strain threshold) is used as the first position of the first tower pole. These positions are similar to the weak points of the overall steel structure of the first tower pole, and the changes in their strain values need to be monitored and predicted in real time. If more serious natural strain is generated at these positions, the probability of damage to the first tower pole will increase.
[0024] Figure 2 is a schematic diagram of the first position of the first tower. Figure 2 As shown, there are 16 first positions of the first tower poles in total, and the first positions of tower poles with different structures may be different from the first position of the first tower pole. By arranging fiber grating sensors at these positions, the strain value of the first tower pole can be monitored in real time.
[0025] In step 102 , a first random forest model is trained based on the historical strain dataset.
[0026] In step 103, based on the trained first random forest model, the strain value of the first tower in the first time series is predicted.
[0027] The first time series is the time series within the predicted time period. For example, if the first random forest model is used to predict the change in the strain value of the first tower in the next six months, the first time series is the time series in the next six months.
[0028] The natural strain of the tower is affected by weather shadows and foundation settlement. Since weather and foundation settlement have certain regularities in time, the natural strain value of the tower also has certain regularities in time, that is, the natural strain value of the tower generated over time is a predictable value. In the embodiment of the present disclosure, by obtaining the historical strain data set of the first tower, and training the first random forest model based on the historical strain data set of the first tower, the first random forest model can be used to predict the strain value of the first tower in the first time series. Since the random forest model has the characteristics of high accuracy and suppression of overfitting, the random forest model can be used to effectively and accurately predict the strain value of the first tower in the first time series.
[0029] Figure 3 A flowchart of a tower strain time series prediction method based on a random forest algorithm provided by another exemplary embodiment of the present disclosure is shown. The method can be executed by a computer device, see Figure 3 , the method comprising: In step 301, a historical strain data set of a first tower is obtained.
[0030] The relevant contents of step 301 refer to the aforementioned step 101, and the detailed description is omitted here.
[0031] In step 302, the historical strain data set of the first tower is preprocessed.
[0032] The data in the acquired historical strain data set may contain noise information or incomplete data, and the data needs to be preprocessed. The preprocessed historical strain data set can be used to train the first random forest model. During training, the preprocessed historical strain data set can be divided into a training set and a test set according to a certain ratio, for example, the preprocessed historical strain data set can be divided into a training set and a test set according to a ratio of 7:3, and then the data in the training set can be used to train the random forest model, and the data in the test set can be used to verify the performance of the random forest model.
[0033] Optionally, the preprocessing includes screening processing and denoising processing, wherein the screening processing is used to remove incomplete data in the historical strain data set, and the denoising processing is used to remove noise in the data. There are many implementation methods of the denoising processing and the screening processing in the related art, and the detailed description is omitted here.
[0034] In step 303, a first random forest model is trained based on the historical strain dataset.
[0035] Optionally, the first random forest model includes n decision trees, where n is a positive integer. In this case, step 303 includes the following steps ab. Figure 4 This is a schematic diagram of the structure of the first random forest. Figure 4 The results of the first random forest model are explained.
[0036] Step a: training n decision trees based on n historical strain data subsets.
[0037] The n historical strain data subsets correspond to the n decision trees one by one, and each historical strain data subset is determined based on the historical strain data set.
[0038] Here, n historical strain data subsets can be obtained by performing n random samplings with replacement on the data in the training set, for example, by using bootstrap sampling. Random sampling with replacement ensures data diversity, significantly improves the resolution of the feature space, forms a more accurate and smooth decision boundary, and can effectively improve the generalization ability of the model and prevent model overfitting.
[0039] Optionally, step a includes: dividing the first historical strain data subset into in-bag data and out-bag data, and using the in-bag data of the first historical strain data subset to train the first decision tree; in the process of using the in-bag data of the first historical strain data subset to train the first decision tree, using the out-of-bag data of the first historical strain data subset to perform an unbiased estimate of the error in the first decision tree.
[0040] The first historical strain data is any one of the n historical data subsets, and the first decision tree is a decision tree corresponding to the first historical strain data subset among the n decision trees.
[0041] The in-bag data (IB) of the first historical strain data subset is used to generate features required in the first decision tree training process. The features generated based on the in-bag data are called feature subsets.
[0042] When training the first decision tree, there are multiple split nodes. The generation process of any split node includes feature selection and optimal feature selection. Feature selection refers to randomly selecting a certain number of features from a feature subset as candidate features. By randomly selecting a certain number of features from a feature subset, it can be ensured that the features selected each time a node is generated are different, introducing nonlinearity, so that a more effective decision boundary can be formed in the feature space.
[0043] Optionally, the number of candidate features selected in feature selection is equal to the square root or logarithm of the total number of features.
[0044] Optimal feature selection refers to the process of selecting an optimal feature from candidate features. The optimal feature is the generated node. Out-of-bag data (OOB) determines the number of optimal features selected. Random forests can use out-of-bag data to evaluate internally and establish an unbiased estimate of the error in the process of generating decision trees.
[0045] When selecting the best features, it is necessary to calculate the importance of each feature. Usually, the importance of each feature is calculated by reducing the average impurity or decreasing the average precision.
[0046] Average Impurity Reduction: When building each decision tree of a random forest, any split node will result in some degree of impurity reduction (e.g., Gini impurity or information gain reduction). In this case, the importance of a feature can be defined as the average of the impurity reduction it achieves across all trees.
[0047] Average decrease in precision: The feature values of a feature can be randomly permuted, and when the feature is randomly permuted, the accuracy of the random forest model will be affected, such as a decrease in precision. In this case, the importance of a feature can be defined as the average decrease in the accuracy of the random forest model when it is randomly permuted.
[0048] If the importance score of a feature is higher, it means that the feature plays a greater role in model prediction. If the importance score of a feature is lower, it means that the feature plays a smaller role in model prediction.
[0049] In this way, by determining the importance of each feature, the effect of the input features on the output of the prediction model can be effectively quantified, which facilitates the understanding of the data, feature selection, and improving the interpretability of the model prediction results.
[0050] After the splitting node is determined, the splitting node can be split to generate other splitting nodes. By repeatedly splitting into nodes, the first decision tree can be constructed (generated).
[0051] The other decision trees among the n decision trees except the first decision tree may also be generated in the above manner, so that n decision trees may be trained.
[0052] Step b, taking the average of the outputs of the n decision trees as the output of the first random forest model.
[0053] Optionally, the output of the first random forest model is expressed using formula (1).
[0054] (1) In formula (1), is the predicted value output by the first random forest model, is the number of decision trees in the first random forest model, For the The predicted value output by the decision tree, where is an integer, Greater than 0 and less than .
[0055] Through the above steps ab, the first random forest model can be constructed.
[0056] Optionally, after the first random forest model is constructed, the performance of the first random forest model needs to be verified, for example, by using a test set to verify the performance of the first random forest model. The method includes the following steps cd.
[0057] Step c, obtaining the mean square error, root mean square error, mean absolute error and determination coefficient of the first random forest model.
[0058] Optionally, the mean square error (MSE) is calculated using formula (2).
[0059] (2) In formula (2), is the mean square error of the first random forest model, For the test set The measured value of the sample data, is an integer, Greater than 0 and Less than ; For the test set The simulated value of the sample data (that is, the After sample data is input into the first random forest model, the output of the first random forest model), is the total number of samples in the test set, Is a positive integer.
[0060] Optionally, the root mean square error (RMSE) is calculated using formula (3).
[0061] (3) In formula (3), is the root mean square error of the first random forest model. The meanings of other parameters in formula (3) are the same as those in formula (2), and their detailed description is omitted here.
[0062] Optionally, the mean absolute error (MAE) is calculated using formula (4).
[0063] (4) In formula (4), is the mean absolute error of the first random forest model. The meanings of other parameters in formula (4) are the same as those in formula (2), and their detailed description is omitted here.
[0064] Optionally, the coefficient of determination (R-Square, R 2 ) is calculated using formula (5).
[0065] (5) In formula (5), is the coefficient of determination of the first random forest model, For the test set The meanings of other parameters in formula (5) are the same as those in formula (2), and their detailed description is omitted here.
[0066] Step d, evaluating the performance of the first random forest model based on the mean square error, root mean square error, mean absolute error and determination coefficient of the first random forest model.
[0067] Here, MSE is the mean of the sum of squared errors between the predicted data and the real data. The smaller the value, the higher the accuracy of the output of the first random forest model. RMSE is the square root of MSE to eliminate the influence of the dimension. The smaller the value of RMSE, the higher the accuracy of the output of the first random forest model. MAE is used to evaluate the closeness between the predicted results and the real data set. The smaller the value of MAE, the closer the predicted results of the output of the first random forest model are to the real data. 2 The value range of R is [0, 1]. 2 The closer it is to 1, the stronger the ability of the output of the first random forest model to explain the true value, and the better the accuracy of the output of the first random forest model.
[0068] In step 304, based on the trained first random forest model, the strain value of the first tower in the first time series is predicted.
[0069] After the first random forest model training is completed, the first random forest model can be used to predict the natural strain value of the first tower, and the prediction result is the strain value of the first tower in the first time series.
[0070] The prediction results can be used for health monitoring, early warning and maintenance decision-making of towers, and can help relevant managers take necessary repair or reinforcement measures in a timely manner to ensure the long-term safe and stable operation of towers.
[0071] Figure 5 Schematic diagram of the prediction results of the first random forest model. Figure 5 Part (a) is a schematic diagram of the historical strain data set. Figure 5 Part (b) is a schematic diagram of the prediction results of the first random forest model on the test set.
[0072] like Figure 5 As shown in part (a), the historical strain data set selects the strain value data of a certain position of the first tower within 5 days from June 7, 2023 to June 12, 2023. The strain value data is processed at a time interval of 1 minute to obtain 7200 data. These 7200 data are arranged in time series to obtain Figure 5 Part (a) of Figure 5From part (a), we can see that the maximum strain value at this position does not exceed 120με, and there is a certain regularity in the change of strain value over time.
[0073] 30% of the historical strain data set was used as a test set to verify the first random forest model. The prediction results of the first random forest model on the test set are as follows: Figure 5 The red curve is the prediction result of the first random forest model on the test set, and the blue curve is the true strain value of the sample data in the test set. It can be seen that the change trend of the predicted value of the random forest model is consistent with the true value, with only an acceptable small error.
[0074] Calculate the MSE, RMSE, MAE, and R of the first random forest model on this test set 2 , we get MSE of 18.929, RMSE of 4.350, MAE of 2.804, and R 2 It is 0.980. These parameters show that the first random forest model has good accuracy and robustness.
[0075] The following are device embodiments of the present application. For details not described in detail in the device embodiments, reference may be made to the above method embodiments.
[0076] Figure 6 A schematic diagram of the structure of a tower strain time series prediction device based on a random forest algorithm provided by an exemplary embodiment of the present disclosure is shown. Figure 6 The device 600 includes: an acquisition module 601, a training module 602 and a prediction module 603.
[0077] The acquisition module 601 is used to acquire a historical strain data set of the first tower, where the historical strain data set includes multiple moments and strain values corresponding to the moments.
[0078] The training module 602 is used to train a first random forest model based on the historical strain data set.
[0079] The prediction module 603 is used to predict the strain value of the first tower in the first time series based on the trained first random forest model.
[0080] Optionally, the training module 602 is also used to train n decision trees based on n historical strain data subsets, the n historical strain data subsets correspond one-to-one to the n decision trees, and each historical strain data subset is determined based on the historical strain data set; the average value of the outputs of the n decision trees is used as the output of the first random forest model; wherein n is a positive integer.
[0081] Optionally, the training module 602 is further used to divide the first historical strain data subset into in-bag data and out-bag data, use the in-bag data of the first historical strain data subset to train the first decision tree, and in the process of using the in-bag data of the first historical strain data subset to train the first decision tree, use the out-of-bag data of the first historical strain data subset to perform an unbiased estimate of the error in the first decision tree; wherein the first historical strain data is any one of the n historical data subsets, and the first decision tree is a decision tree among the n decision trees corresponding to the first historical strain data subset.
[0082] Optionally, the device further includes: an evaluation module 604 .
[0083] The evaluation module 604 is used to obtain the mean square error, root mean square error, mean absolute error and determination coefficient of the first random forest model; based on the mean square error, root mean square error, mean absolute error and determination coefficient of the first random forest model, the performance of the first random forest model is evaluated.
[0084] It should be noted that: when the pole tower strain time series prediction device based on the random forest algorithm provided in the above embodiment predicts the strain value, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the pole tower strain time series prediction device based on the random forest algorithm provided in the above embodiment and the pole tower strain time series prediction method embodiment based on the random forest algorithm belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0085] The division of modules in the embodiments of the present disclosure is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present disclosure may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0086] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a terminal device (which can be a personal computer, mobile phone, or communication device, etc.) or a processor (processor) to execute all or part of the steps of the method of each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0087] Figure 7 Schematic diagram of the structure of the computer device provided by the embodiment of the present disclosure. Figure 7 As shown, the computer device 700 includes: a processor 701 and a memory 702 .
[0088] The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 701 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0089] The memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 702 is used to store at least one instruction, which is used to be executed by the processor 701 to implement the tower strain time series prediction method based on the random forest algorithm provided in the embodiments of the present disclosure.
[0090] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the computer device 700, and the computer device 700 may include more or less components than shown in the figure, or combine some components, or adopt a different arrangement of components.
[0091] The embodiment of the present disclosure also provides a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a computer device, the computer device is able to execute the tower strain time series prediction method based on the random forest algorithm provided in the embodiment of the present disclosure.
[0092] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the tower strain time series prediction method based on the random forest algorithm provided in the embodiments of the present disclosure.
[0093] The above description is only an optional embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A tower strain time series prediction method based on random forest algorithm, characterized in that: The method comprises: Acquire a historical strain data set of the first tower, wherein the historical strain data set includes multiple moments and strain values corresponding to the moments; Based on the historical strain dataset, training a first random forest model; Based on the trained first random forest model, the strain value of the first tower in the first time series is predicted.
2. The method according to claim 1, characterized in that The first random forest model includes n decision trees, and the training of the first random forest model based on the historical strain data includes: Based on n historical strain data subsets, training the n decision trees, the n historical strain data subsets corresponding to the n decision trees one by one, each of the historical strain data subsets being determined based on the historical strain data set; Taking the average value of the outputs of the n decision trees as the output of the first random forest model; Wherein, n is a positive integer.
3. The method according to claim 2, characterized in that The training of the n decision trees based on the n historical strain data subsets includes: dividing a first historical strain data subset into in-bag data and out-bag data, using the in-bag data of the first historical strain data subset to train a first decision tree, and in the process of using the in-bag data of the first historical strain data subset to train the first decision tree, using the out-bag data of the first historical strain data subset to perform an unbiased estimate of the error in the first decision tree; The first historical strain data is any one of the n historical data subsets, and the first decision tree is a decision tree corresponding to the first historical strain data subset among the n decision trees.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Obtaining the mean square error, root mean square error, mean absolute error and determination coefficient of the first random forest model; The performance of the first random forest model is evaluated based on the mean square error, root mean square error, mean absolute error and determination coefficient of the first random forest model.
5. A tower strain time series prediction device based on random forest algorithm, characterized in that: The device comprises: An acquisition module, used for acquiring a historical strain data set of the first tower, wherein the historical strain data set includes a plurality of moments and strain values corresponding to the moments one by one; A training module, used for training a first random forest model based on the historical strain dataset; A prediction module is used to predict the strain value of the first tower in a first time series based on the trained first random forest model.
6. The device according to claim 5, characterized in that The first random forest model includes n decision trees, and the training module is further used for: Based on n historical strain data subsets, training the n decision trees, the n historical strain data subsets corresponding to the n decision trees one by one, each of the historical strain data subsets being determined based on the historical strain data set; Taking the average value of the outputs of the n decision trees as the output of the first random forest model; Wherein, n is a positive integer.
7. The device according to claim 6, characterized in that The training module is also used to: dividing a first historical strain data subset into in-bag data and out-bag data, using the in-bag data of the first historical strain data subset to train a first decision tree, and in the process of using the in-bag data of the first historical strain data subset to train the first decision tree, using the out-bag data of the first historical strain data subset to perform an unbiased estimate of the error in the first decision tree; The first historical strain data is any one of the n historical data subsets, and the first decision tree is a decision tree corresponding to the first historical strain data subset among the n decision trees.
8. A computer device, characterized in that: The computer device comprises: a memory and a processor, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 4.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the method according to any one of claims 1 to 4.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.