A Diagnostic Method and System for Bridge Monitoring Feature Data Based on Random Forest
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2026-08-14
AI Technical Summary
然而,面对海量的复杂监测数据,且由于时间序列数据往往具有复杂的时间依赖性和动态特性,常规方法在捕捉这些复杂特性方面存在局限性,从而影响异常检测和数据分类的准确性和时效性
[0091] This application uses Tsfresh technology to extract features from time series data and employs a random forest machine learning model to train the diagnostic model. This application features high accuracy, fast training, and high efficiency, effectively improving upon the shortcomings of traditional methods such as low recognition rate and low efficiency.
Smart Images

Figure BDA0005271169420000021 
Figure BDA0005271169420000034 
Figure BDA0005271169420000041
Abstract
Description
Technical Field
[0001] This application belongs to the fields of structural health monitoring and computer machine learning technology, and in particular relates to a bridge monitoring feature data diagnosis method based on random forest. Background Technology
[0002] The completeness and availability of bridge health monitoring data have a significant impact on structural damage identification and early warning. Data integrity means that all monitoring data is accurately recorded and stored, avoiding data loss or corruption; data availability means that abnormal data in the monitoring data should be identified to prevent the system or relevant personnel from using abnormal data for analysis and judgment, leading to incorrect conclusions.
[0003] Improper sensor installation, aging, severe weather, and other uncontrollable factors often lead to abnormal sensor data. Therefore, accurately identifying and classifying abnormal sensor data within massive datasets is crucial.
[0004] Currently, identifying and classifying abnormal sensor data within massive datasets primarily relies on scientifically sound data management strategies and advanced bridge structural health monitoring systems. A scientifically sound data management strategy is fundamental to ensuring the integrity and availability of monitoring data. Furthermore, advanced bridge structural health monitoring systems also possess the capability to identify and classify abnormal data. These systems integrate advanced sensor technology, IoT technology, and intelligent recognition technology to construct a comprehensive and efficient information acquisition system capable of acquiring real-time parameters such as vibration, displacement, and strain of the bridge's surrounding environment and targets, providing data support for assessing the bridge's safety status. In this process, the system relies on algorithms to automatically identify and classify data anomalies.
[0005] Currently, conventional methods for classifying and identifying data anomalies primarily employ algorithms such as k-nearest neighbors and support vector machines, typically using time series data as input. However, when faced with massive amounts of complex monitoring data, and given the often complex time dependencies and dynamic characteristics of time series data, conventional methods have limitations in capturing these complex features, thus affecting the accuracy and timeliness of anomaly detection and data classification. Summary of the Invention
[0006] To address the above issues, this application proposes a bridge monitoring feature data diagnosis method and system based on random forest. By utilizing the random forest model, bridge monitoring data diagnosis and classification can be achieved efficiently and accurately.
[0007] Firstly, this application provides a bridge monitoring feature data diagnostic method based on random forest, comprising the following steps:
[0008] S1: Collect raw structural monitoring data, perform data preprocessing, and construct a bridge monitoring dataset;
[0009] S2: Visualize the bridge monitoring dataset and label abnormal data to generate labeled data for the training set;
[0010] S3: Calculate the statistical features of the bridge monitoring dataset based on the Tsfresh algorithm, construct a feature dataset F, perform a feature significance hypothesis test, and use the BenjaminiYekutieli procedure to select and retain features from the feature dataset. The selected feature dataset is denoted as F. selected ;
[0011] S4: From the feature dataset F selected Feature data from the training set were selected, and the random forest diagnostic model was trained using the training set.
[0012] S5: Input the prediction data into the trained random forest diagnostic model, and the model output is the prediction result.
[0013] In one possible implementation of the first aspect, the specific process of constructing the bridge monitoring dataset and performing data preprocessing in step S1 is as follows:
[0014] Consider constructing a bridge monitoring dataset based on n sensors, defining an m×n dimensional random variable:
[0015]
[0016] Where m represents the length of the dataset, i.e., the total number of sampling points; X ji Let i represent the j-th sampling point of the i-th sensor, i∈[1,n],j∈[1,m]; Let:
[0017] X i =(X 1i ,X 2i , ...X mi ) T
[0018] X i Let X represent a one-dimensional random variable of the i-th sensor, then X is an n-dimensional random variable composed of n sensors;
[0019] In the data preprocessing step, X is transformed into a one-dimensional random variable with m×n data points, according to the order of sensor 1 to n:
[0020] D = (X1, X2, ... X n ) T
[0021] Where D represents the complete bridge monitoring dataset.
[0022] In one possible implementation of the first aspect, step S2 is performed as follows:
[0023] Let the frequency of data acquisition be f. s The data collection time interval is The total data acquisition time for each sensor is T = n × Δt, and the data visualization time is t.
[0024] Each sensor corresponds to The bridge monitoring dataset D, consisting of n sensors, can be divided into several subsets. Subdatasets;
[0025] Each partitioned dataset is visualized and manually labeled with anomalies. There are k anomaly types, denoted as categories 0, 1, ..., k-1. This results in an N×1 dimensional anomaly label dataset.
[0026]
[0027] D labels =(Y1,Y2,...Y n ) T
[0028] Among them, Y i D represents a one-dimensional anomaly label for the i-th sensor with N1 data points; labels This represents one-dimensional anomaly label data for a corresponding bridge monitoring dataset D with N data points.
[0029] In one possible implementation of the first aspect, step S3 is performed as follows:
[0030] S301: Statistical Characteristic Calculation
[0031] The Tsfresh algorithm is used to calculate the statistical features of N datasets, resulting in φ statistical features for each dataset. Let the feature dataset be denoted as:
[0032] F = (F1, F2, ..., F φ )
[0033] Where F represents the N×φ dimension feature data of the bridge monitoring dataset D;
[0034] S302: Hypothesis Testing of Characteristic Significance
[0035] From the above steps, we know that the feature dataset contains k anomalies. We calculate the p-value using the KS test to determine whether a feature is relevant. Let... This represents the feature data column of the κ-th anomaly classification in the s-th feature column of the bridge monitoring dataset D, where κ∈{0, 1, ..., k-1} and s∈{1, 2, ..., φ}; taking κ1<κ2 and κ1, κ2∈{0, 1, ..., k-1}, the p-values of the κ1-th and κ2-th categories in the s-th feature column are denoted as . calculate The process is as follows:
[0036] Null hypothesis H0: The s-th feature is an unrelated feature between the κ1-th and κ2-th categories;
[0037] Alternative hypothesis H1: The s-th feature is a related feature of the κ1-th and κ2-th categories;
[0038] The above steps yield the one-dimensional column vectors of the κ1 category of the s-th feature and the κ2 category of the s-th feature in F, which are then sorted to obtain:
[0039]
[0040] Among them, the elements in the one-dimensional column vector of the s-th feature of the κ1-th category and the κ2-th category satisfy the following... n1 and n2 represent the number of elements in the one-dimensional column vector of the s-th feature of the κ1-th and κ2-th categories, respectively;
[0041] The cumulative distribution function is defined as:
[0042]
[0043] Where f represents The number of values in the array that are less than element f, f n express and The sum of the number of all elements in the array;
[0044] Calculate according to the definition of the cumulative function. and KS test statistic:
[0045]
[0046] Therefore, the p-values of the κ1 and κ2 categories of the s-th feature column are calculated;
[0047] S303: Feature Selection
[0048] The p-value in the Benjamini Yekutiel process is used to determine the selected features. The Benjamini Yekutiel process is as follows:
[0049] Define the error detection rate:
[0050]
[0051] in, φ is the number of irrelevant features, and φ is the total number of extracted features.
[0052] Define a linear function:
[0053]
[0054] Where Θ represents the number of features extracted, Q represents the number of all null hypotheses H0, and q represents the level of FDR; the image of discrete p value and linear function r(Θ) is obtained, and p values obtained from all hypotheses that are smaller than p0 at the intersection of discrete p value and linear function r(Θ) are rejected, and the feature vector corresponding to the rejected p value is retained as part of the result;
[0055] From the process of calculating the p-value, we can see that:
[0056]
[0057] in, This represents the φ-th p-value for the κ1 and κ2 categories;
[0058] According to the BenjaminiYekutieli process Given a feature set, take the union of all retained features to obtain... Statistical characteristics Therefore, the selected feature dataset is denoted as:
[0059]
[0060] Where F selected F represents the feature dataset extracted by the BenjaminiYekutieli process. selected The dimension is Represents the feature dataset F selected No. 1 feature column.
[0061] In one possible implementation of the first aspect, in step S302, the p-values of the κ1-th category and the κ2-th category of the s-th feature column are calculated using the following formula:
[0062]
[0063]
[0064] In one possible implementation of the first aspect, step S4 is performed as follows:
[0065] S401: Random Sampling
[0066] From feature dataset F selected T subsets F1, F2, ..., F3 are generated by sampling with replacement. T :
[0067] F t =Bootstrap(F selected ), t=1,2,…,T
[0068] Each subset F t The number of samples and the original feature dataset F selected The same applies to each subset F. t Used to train a decision tree; unsampled data is called OOB data and is used for evaluating the random forest diagnostic model;
[0069] S402: Decision Tree Construction
[0070] When splitting at each node of each decision tree, from Statistical characteristics Randomly select a subset Then only use subsets Split based on the characteristics;
[0071] Calculate the splitting criterion using selected features;
[0072] Assuming according to the first Statistical characteristics will F t Divided into For each subset, information gain is a measure of the purity improvement resulting from feature splitting, and the formula is:
[0073]
[0074] Among them, F t,x F represents t Divided into The x-th subset after the first subset; R is F t The total number of categories contained therein F represents t The proportion of samples in class r;
[0075] Split the nodes again, recursively generating the tree until the stopping condition is met;
[0076] S403: Integrated Classification
[0077] Each tree makes a prediction based on the input data. The prediction result of the t-th tree for a single sample is:
[0078]
[0079] in This represents the total number of decision trees that classify a single sample as class c by T decision trees; c∈{0,1,2,…,M-1}, where M is the total number of sample classes;
[0080] S404: Save the random forest diagnostic model after training.
[0081] In one possible implementation of the first aspect, in step S402, or
[0082] Secondly, this application provides a diagnostic system for performing the bridge monitoring feature data diagnostic method, comprising:
[0083] The data acquisition unit is used to collect raw data for structural monitoring.
[0084] The preprocessing unit preprocesses the raw data from structural monitoring to construct a bridge monitoring dataset;
[0085] The visualization unit is used to visualize the bridge monitoring dataset.
[0086] The anomaly labeling unit marks anomalies in the visualized data to generate labeled data for the training set;
[0087] The feature extraction unit calculates the statistical features of the bridge monitoring dataset based on the Tsfresh algorithm, constructs a feature dataset F, performs a feature significance hypothesis test, and uses the Benjamini Yekutieli procedure to select and retain features from the feature dataset. The selected feature dataset is denoted as F. selected ;
[0088] Model training units, from feature dataset F selected Feature data from the training set were selected, and the random forest diagnostic model was trained using the training set.
[0089] The prediction unit inputs prediction data into the trained random forest diagnostic model, and the model outputs the prediction result.
[0090] Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:
[0091] This application uses Tsfresh technology to extract features from time series data and employs a random forest machine learning model to train the diagnostic model. This application features high accuracy, fast training, and high efficiency, effectively improving upon the shortcomings of traditional methods such as low recognition rate and low efficiency. Attached Figure Description
[0092] Figure 1 This is a diagram of a bridge monitoring feature data diagnostic framework based on random forest, according to one embodiment of this application. Detailed Implementation
[0093] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0094] Firstly, this application provides a bridge monitoring feature data diagnosis method based on random forest. This diagnostic method obtains a bridge monitoring dataset, first preprocesses and labels the dataset for anomaly classification, and then uses feature extraction technology combined with random forest machine learning methods for monitoring data diagnosis. At the same time, the bridge monitoring dataset is divided into a training set and a test set, which are used for network training and verification of the accuracy of the method, respectively.
[0095] The process of this application is as follows: Figure 1 As shown, it includes the following steps:
[0096] S1: Collect raw structural monitoring data, perform data preprocessing, and construct a bridge monitoring dataset;
[0097] S2: Visualize the bridge monitoring dataset and label abnormal data to generate labeled data for the training set;
[0098] S3: Calculate the statistical features of the bridge monitoring dataset based on the Tsfresh algorithm, construct a feature dataset F, perform a feature significance hypothesis test, and use the BenjaminiYekutieli procedure to select and retain features from the feature dataset. The selected feature dataset is denoted as F. selected ;
[0099] S4: From the feature dataset F selected Feature data from the training set were selected, and the random forest diagnostic model was trained using the training set.
[0100] S5: Input the prediction data into the trained random forest diagnostic model, and the model output is the prediction result.
[0101] In one implementation, step S1 includes the following:
[0102] Consider constructing a bridge monitoring dataset based on n sensors, defining an m×n dimensional random variable:
[0103]
[0104] Where m represents the length of the dataset, i.e., the total number of sampling points; X jiLet i represent the j-th sampling point of the i-th sensor, i∈[1,n],j∈[1,m]; Let:
[0105] X i =(X 1i ,X 2i , ...X mi ) T
[0106] X i Let X represent a one-dimensional random variable of the i-th sensor, then X is an n-dimensional random variable composed of n sensors;
[0107] In the data preprocessing step, X is transformed into a one-dimensional random variable with m×n data points, according to the order of sensor 1 to n:
[0108] D = (X1, X2, ... X n ) T
[0109] Where D represents the complete bridge monitoring dataset.
[0110] In one implementation, step S2 includes the following:
[0111] Let the frequency of data acquisition be f. s The data collection time interval is The total data acquisition time for each sensor is T = n × Δt, and the data visualization time is t.
[0112] Each sensor corresponds to The bridge monitoring dataset D, consisting of n sensors, can be divided into several subsets. Subdatasets;
[0113] Each partitioned dataset is visualized and manually labeled with anomalies. There are k anomaly types, denoted as categories 0, 1, ..., k-1. This results in an N×1 dimensional anomaly label dataset.
[0114]
[0115] D labels =(Y1,Y2,...Y n ) T
[0116] Among them, Y i D represents a one-dimensional anomaly label for the i-th sensor with N1 data points; labels This represents one-dimensional anomaly label data for a corresponding bridge monitoring dataset D with N data points.
[0117] In one implementation, step S3 includes the following:
[0118] S301: Statistical Characteristic Calculation
[0119] From step S2 above, we can know that X i The dataset can be divided into N1 datasets. The Tsfresh algorithm (time series feature extraction) is used to calculate the statistical features of the N datasets, resulting in φ statistical features for each dataset. Let the feature dataset be denoted as:
[0120] F = (F1, F2, ..., F φ )
[0121] Where F represents the N×φ dimension feature data of the bridge monitoring dataset D;
[0122] S302: Hypothesis Testing of Characteristic Significance
[0123] From the above steps, we know that the feature dataset contains k anomalies. We calculate the p-value using the Kolmogorov-Smirnov test (KS test) to determine whether a feature is relevant. Let... Let s represent the feature data column representing the κ-th anomaly category in the s-th feature column of the bridge monitoring dataset D, where κ ∈ {0, 1, ..., k-1} and s ∈ {1, 2, ..., φ}. Since the bridge monitoring dataset D has a total of k anomaly categories, each feature can be calculated... Let there be p-values, where κ1 < κ2 and κ1, κ2 ∈ {0, 1, ..., k-1}. The p-values for the κ1-th and κ2-th categories of the s-th feature column are denoted as p-values. calculate The process is as follows:
[0124] Null hypothesis H0: The s-th feature is an unrelated feature between the κ1-th and κ2-th categories;
[0125] Alternative hypothesis H1: The s-th feature is a related feature of the κ1-th and κ2-th categories;
[0126] The above steps yield the one-dimensional column vectors of the κ1 category of the s-th feature and the κ2 category of the s-th feature in F, which are then sorted to obtain:
[0127]
[0128] Among them, the elements in the one-dimensional column vector of the s-th feature of the κ1-th category and the κ2-th category satisfy the following... n1 and n2 represent the number of elements in the one-dimensional column vector of the s-th feature of the κ1-th and κ2-th categories, respectively;
[0129] The cumulative distribution function is defined as:
[0130]
[0131] Where f represents The number of values in the array that are less than element f, f n express and The sum of the counts of all elements in the array (excluding duplicate elements).
[0132] Calculate according to the definition of the cumulative function. and KS test statistic:
[0133]
[0134] Therefore, the p-values of the κ1 and κ2 categories of the s-th feature column are calculated:
[0135]
[0136] S303: Feature Selection
[0137] The p-value in the Benjamini Yekutiel process is used to determine the selected features. The Benjamini Yekutiel process is as follows:
[0138] Define the error detection rate:
[0139]
[0140] in, φ is the number of irrelevant features, and φ is the total number of extracted features.
[0141] Define a linear function:
[0142]
[0143] Where Θ represents the number of features extracted, Q represents the number of all null hypotheses, and q represents the level of FDR; the image of discrete p-values and linear function r(Θ) is obtained, and p-values obtained from all hypotheses that are less than p0 at the intersection of discrete p-values and linear function r(Θ) are rejected, and the feature vectors corresponding to the rejected p-values are retained as part of the result;
[0144] From the process of calculating the p-value, we can see that:
[0145]
[0146] in, This represents the φ-th p-value for the κ1 and κ2 categories;
[0147] According to the BenjaminiYekutieli process Given a feature set, take the union of all retained features to obtain... Statistical characteristics Therefore, the selected feature dataset is denoted as:
[0148]
[0149] Where F selected F represents the feature dataset extracted by the BenjaminiYekutieli process. selected The dimension is Represents the feature dataset F selected No. 1 feature column.
[0150] In one implementation, step S4 includes the following:
[0151] S401: Random Sampling
[0152] The specific feature data of the training set comes from the feature dataset F. selected From the feature dataset F selected T subsets are generated by sampling with replacement:
[0153] F t =Bootstrap(F selected ), t=1,2,...,T
[0154] Each F t The number of samples and the original feature dataset F selected Similarly, each subset is used to train a decision tree; the unsampled data is called OOB (Out-of-Bag) data and is used for model evaluation;
[0155] S402: Decision Tree Construction
[0156] When splitting at each node of each decision tree, from Statistical characteristics Randomly select a subset Usually taken or Then, splitting is performed using only these features;
[0157] Calculate the splitting criterion using selected features: information gain is employed;
[0158] Assuming according to the first Statistical characteristics will F t Divided into For each subset, information gain is a measure of the purity improvement resulting from feature splitting, and the formula is:
[0159]
[0160] Among them, F t,x F represents t Divided into The x-th subset after the first subset; R is F t The total number of categories contained therein F represents t The proportion of samples in class r;
[0161] Split the nodes again, recursively generating the tree until the stopping condition is met;
[0162] S403: Integrated Classification
[0163] Each tree makes a prediction based on the input data, and the prediction result of a single tree is determined by voting:
[0164]
[0165] Then the prediction result of the t-th lesson tree for a single sample is:
[0166]
[0167] in This represents the total number of decision trees that classify a single sample as class c by T decision trees; c∈{0,1,2,...,M-1}, where M is the total number of sample classes;
[0168] S404: Save the model after training is complete.
[0169] Secondly, this application provides a diagnostic system for performing the above-described bridge monitoring feature data diagnostic method, comprising:
[0170] The data acquisition unit is used to collect raw data for structural monitoring.
[0171] The preprocessing unit preprocesses the raw data from structural monitoring to construct a bridge monitoring dataset;
[0172] The visualization unit is used to visualize the bridge monitoring dataset.
[0173] The anomaly labeling unit marks anomalies in the visualized data to generate labeled data for the training set;
[0174] The feature extraction unit calculates the statistical features of the bridge monitoring dataset based on the Tsfresh algorithm, constructs a feature dataset F, performs a feature significance hypothesis test, and uses the BenjaminiYekutieli procedure to select and retain features from the feature dataset. The selected feature dataset is denoted as F. selected ;
[0175] Model training units, from feature dataset F selected Feature data from the training set were selected, and the random forest diagnostic model was trained using the training set.
[0176] The prediction unit inputs prediction data into the trained random forest diagnostic model, and the model outputs the prediction result.
[0177] This application is based on supervised machine learning, which can compare the prediction output of manually labeled anomaly classification with the test set data of random forest model to determine its quality. Finally, the model with the best training accuracy can be saved and used to predict data and complete classification.
[0178] It should be understood that the division of processing units in the above system is only a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, the processing units in the system can be implemented by a processor calling software; for example, the system includes a processor connected to memory, which stores instructions. The processor calls the instructions stored in memory to implement any of the above methods or to realize the functions of each processing unit in the system. Here, the processor is a general-purpose processor, such as a central processing unit or a microprocessor, and the memory is either internal or external to the system.
[0179] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A bridge monitoring feature data diagnostic method based on random forest, characterized in that, Includes the following steps: S1: Collect raw structural monitoring data, perform data preprocessing, and construct a bridge monitoring dataset; S2: Visualize the bridge monitoring dataset and label abnormal data to generate labeled data for the training set; S3: Calculate the statistical features of the bridge monitoring dataset based on the Tsfresh algorithm, construct a feature dataset F, perform a feature significance hypothesis test, and use the BenjaminiYekutieli procedure to select and retain features from the feature dataset. The selected feature dataset is denoted as F. selected ; S4: From the feature dataset F selected Feature data from the training set were selected, and the random forest diagnostic model was trained using the training set. S5: Input the prediction data into the trained random forest diagnostic model, and the model output is the prediction result.
2. The bridge monitoring feature data diagnosis method based on random forest according to claim 1, characterized in that, In step S1, the specific process of constructing the bridge monitoring dataset and performing data preprocessing is as follows: Consider constructing a bridge monitoring dataset based on n sensors, defining an m×n dimensional random variable: Where m represents the length of the dataset, i.e., the total number of sampling points; X ji Let i represent the j-th sampling point of the i-th sensor, i∈[1,n],j∈[1,m]; Let: X i =(X 1i ,X 2i ,...X mi ) T X i Let X represent a one-dimensional random variable of the i-th sensor, then X is an n-dimensional random variable composed of n sensors; In the data preprocessing step, X is transformed into a one-dimensional random variable with m×n data points, according to the order of sensor 1 to n: D=(X1,X2,...X n ) T Where D represents the complete bridge monitoring dataset.
3. The bridge monitoring feature data diagnosis method based on random forest according to claim 2, characterized in that, The specific process of step S2 is as follows: Let the frequency of data acquisition be f. s The data collection time interval is The total data acquisition time for each sensor is T = n × Δt, and the data visualization time is t. Each sensor corresponds to The bridge monitoring dataset D, consisting of n sensors, can be divided into several subsets. Subdatasets; Each partitioned dataset is visualized and manually labeled with anomalies. There are k anomaly types, denoted as categories 0, 1, ..., k-1. This results in an N×1 dimensional anomaly label dataset. D labels =(Y1,Y2,...Y n ) T Among them, Y i D represents a one-dimensional anomaly label for the i-th sensor with N1 data points; labels This represents one-dimensional anomaly label data for a corresponding bridge monitoring dataset D with N data points.
4. The bridge monitoring feature data diagnosis method based on random forest according to claim 3, characterized in that, The specific process of step S3 is as follows: S301: Statistical Characteristic Calculation The Tsfresh algorithm is used to calculate the statistical features of N datasets, resulting in φ statistical features for each dataset. Let the feature dataset be denoted as: F=(F1,F2,...,F φ ) Where F represents the N×φ dimension feature data of the bridge monitoring dataset D; S302: Hypothesis Testing of Characteristic Significance From the above steps, we know that the feature dataset contains k anomalies. We calculate the p-value using the KS test to determine whether a feature is relevant; let f be the anomaly. s (κ) This represents the feature data column of the κ-th anomaly classification in the s-th feature column of the bridge monitoring dataset D, where κ∈{0, 1, ..., k-1} and s∈{1, 2, ..., φ}; taking κ1<κ2 and κ1, κ2∈{0, 1, ..., k-1}, the p-values of the κ1-th and κ2-th categories in the s-th feature column are denoted as . calculate The process is as follows: Null hypothesis H0: The s-th feature is an unrelated feature between the κ1-th and κ2-th categories; Alternative hypothesis H1: The s-th feature is a related feature of the κ1-th and κ2-th categories; The above steps yield the one-dimensional column vectors of the κ1 category of the s-th feature and the κ2 category of the s-th feature in F, which are then sorted to obtain: Among them, the elements in the one-dimensional column vector of the s-th feature of the κ1-th category and the κ2-th category satisfy the following... n1 and n2 represent the number of elements in the one-dimensional column vector of the s-th feature of the κ1-th and κ2-th categories, respectively; The cumulative distribution function is defined as: Where f represents The number of values in the array that are less than element f, f n express and The sum of the number of all elements in the array; Calculate according to the definition of the cumulative function. and KS test statistic: Therefore, the p-values of the κ1 and κ2 categories of the s-th feature column are calculated; S303: Feature Selection The p-value in the Benjamini Yekutiel process is used to determine the selected features. The Benjamini Yekutiel process is as follows: Define the error detection rate: in, φ is the number of irrelevant features, and φ is the total number of extracted features. Define a linear function: Where Θ represents the number of features extracted, Q represents the number of all null hypotheses H0, and q represents the level of FDR; the image of discrete p value and linear function r(Θ) is obtained, and p values obtained from all hypotheses that are smaller than p0 at the intersection of discrete p value and linear function r(Θ) are rejected, and the feature vector corresponding to the rejected p value is retained as part of the result; From the process of calculating the p-value, we can see that: in, This represents the φ-th p-value for the κ1 and κ2 categories; According to the BenjaminiYekutieli process Given a feature set, take the union of all retained features to obtain... Statistical characteristics Therefore, the selected feature dataset is denoted as: Where F selected F represents the feature dataset extracted by the BenjaminiYekutieli process. selected The dimension is Represents the feature dataset F selected No. 1 feature column.
5. The bridge monitoring feature data diagnosis method based on random forest according to claim 4, characterized in that, In step S302, the p-values of the κ1-th and κ2-th categories of the s-th feature column are calculated using the following formula:
6. The bridge monitoring feature data diagnosis method based on random forest according to claim 4, characterized in that, The specific process of step S4 is as follows: S401: Random Sampling From feature dataset F selected T subsets F1, F2, ..., F3 are generated by sampling with replacement. T : F t =Bootstrap(F selected ),t=1,2,…,T Each subset F t The number of samples and the original feature dataset F selected The same applies to each subset F. t Used to train a decision tree; unsampled data is called OOB data and is used for evaluating the random forest diagnostic model; S402: Decision Tree Construction When splitting at each node of each decision tree, from Statistical characteristics Randomly select a subset Then only use subsets Split based on the characteristics; Calculate the splitting criterion using selected features; Assuming according to the first Statistical characteristics will F t Divided into For each subset, information gain is a measure of the purity improvement resulting from feature splitting, and the formula is: Among them, F t,x F represents t Divided into The x-th subset after the first subset; R is F t The total number of categories contained therein F represents t The proportion of samples in class r; Split the nodes again, recursively generating the tree until the stopping condition is met; S403: Integrated Classification Each tree makes a prediction based on the input data. The prediction result of the t-th tree for a single sample is: in This represents the total number of decision trees that classify a single sample as class c by T decision trees; c∈{0,1,2,…,M-1}, where M is the total number of sample classes; S404: Save the random forest diagnostic model after training.
7. The bridge monitoring feature data diagnosis method based on random forest according to claim 6, characterized in that, In step S402, or 8. A diagnostic system for performing the bridge monitoring feature data diagnostic method as described in any one of claims 1-7, characterized in that, include: The data acquisition unit is used to collect raw data for structural monitoring. The preprocessing unit preprocesses the raw data from structural monitoring to construct a bridge monitoring dataset; The visualization unit is used to visualize the bridge monitoring dataset. The anomaly labeling unit marks anomalies in the visualized data to generate labeled data for the training set; The feature extraction unit calculates the statistical features of the bridge monitoring dataset based on the Tsfresh algorithm, constructs a feature dataset F, performs a feature significance hypothesis test, and uses the Benjamini Yekutieli procedure to select and retain features from the feature dataset. The selected feature dataset is denoted as F. selected ; Model training units, from feature dataset F selected Feature data from the training set were selected, and the random forest diagnostic model was trained using the training set. The prediction unit inputs prediction data into the trained random forest diagnostic model, and the model outputs the prediction result.