A machine learning based method for monitoring health of a building structure
By generating synthetic sensor data through the SMOTE algorithm of distributed federated learning and dynamic self-learning, and combining it with an autoencoder neural network to accelerate convergence for feature dimensionality reduction, the problems of low classification accuracy and data leakage in existing technologies are solved, and efficient and safe building structure health monitoring is achieved.
Patent Information
- Application Number
- CN202510361308.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-03-26
AI Technical Summary
Existing methods for monitoring the health of building structures suffer from low classification accuracy and are prone to large-scale data leakage. In particular, when dealing with high-dimensional, complex and unevenly distributed building sensor data, existing feature dimensionality reduction methods are inefficient, and centralized training makes it difficult to consider the unique features of each node, resulting in poor classification performance and data that is easily stolen or tampered with.
A distributed federated learning architecture is adopted to process data at the node level. Synthetic sensor data is generated using the dynamically self-learning SMOTE algorithm, and feature dimensionality reduction is performed through an autoencoder neural network that accelerates convergence. The softmax function is then used for classification. At the same time, the distributed architecture avoids data centralization and ensures data security.
It improves the classification accuracy of building structural health monitoring, enhances the quality of training datasets and model stability, prevents large-scale data leakage, and ensures data security.
Smart Images

Figure CN120354222B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of building structure data processing, and more specifically to a method for monitoring the health of building structures based on machine learning. Background Technology
[0002] Sudden building collapses and other civil engineering accidents can cause significant casualties and property losses. Therefore, adopting a structural health monitoring system to monitor and diagnose the structural performance of building structures in real time, promptly detect structural damage and assess its safety, predict structural performance changes and remaining lifespan, and make maintenance decisions is of great significance for improving the operational efficiency of engineering structures and protecting people's lives and property.
[0003] Existing methods for monitoring the structural health of buildings typically involve establishing a structural health monitoring model. This model utilizes a sensor array to collect data on acceleration, strain, displacement, temperature, humidity, and cracks at multiple key components (hereinafter referred to as nodes) of the building. The structural health monitoring model is then trained using this data and subsequently used to classify newly acquired building sensor data. The structural health monitoring model primarily includes functions such as feature reduction and classification.
[0004] Due to the limited amount of building sensor data, the SMOTE algorithm is typically used to augment the collected data before training a structural health monitoring model. However, building sensor data is characterized by high dimensionality, complexity, and uneven distribution. Therefore, the SMOTE algorithm struggles to generate high-quality augmented samples based on the actual distribution characteristics of the building sensor data, thus affecting the training of the structural health monitoring model and resulting in poor classification accuracy. Structural health monitoring models usually require feature reduction of the building sensor data. Existing feature reduction methods are inefficient and not robust enough when processing building sensor data, further contributing to poor classification accuracy. Furthermore, building sensor data originates from different nodes within a building, reflecting the health status of nodes under various loads and environmental conditions. It is characterized by dispersion and sparsity. However, existing structural health monitoring model training methods typically employ centralized training, collecting building sensor data from various nodes and aggregating it to a central server for training. Because all the data is concentrated in a central server, a large amount of sensitive data could be stolen, tampered with, or lost in the event of a network attack, leading to privacy breaches. Furthermore, training a unified model on the aggregated data makes it difficult to fully consider the unique characteristics of each node, thus affecting the classification effectiveness of the building structure health monitoring method.
[0005] Therefore, existing methods for monitoring the health of building structures suffer from low classification accuracy and are prone to large-scale data leakage. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a machine learning-based method for monitoring the health of building structures that has high classification accuracy and is less prone to large-scale data leakage.
[0007] To address the aforementioned technical problems, this invention provides a machine learning-based method for monitoring the health of building structures, comprising:
[0008] S1. Install sensor groups at multiple nodes of the building to collect multiple building sensor data at each node, obtain a building sensor dataset for each node, store and label the building safety level corresponding to each piece of building sensor data;
[0009] S2. A distributed federated learning architecture is adopted. A global model is initialized in the central server and sent to each of the nodes to form a local model. The local model of each node generates synthetic sensing data based on the building sensing dataset of that node using the SMOTE algorithm based on dynamic self-learning to obtain a synthetic sensing dataset. The building sensing dataset and the synthetic sensing dataset are used together as the training dataset.
[0010] S3. The local model of each node uses the training dataset of the node to train the autoencoder neural network based on accelerated convergence in each local model to obtain the trained autoencoder neural network based on accelerated convergence.
[0011] S4. Each local model sends the parameters of the trained local model to the central server. The central server aggregates the parameters and updates the global model. Then, the updated global model is sent to each of the nodes to form a new local model.
[0012] S5. The new local model repeats S2 to S4 to start a new iteration until training converges, resulting in the trained global model and the trained local model.
[0013] S6. Collect new building sensing data from each of the aforementioned nodes using the sensor group, and input the new building sensing data from each of the aforementioned nodes into the corresponding trained local models. The trained local models first use the trained autoencoder neural network based on accelerated convergence to perform feature dimensionality reduction on the new building sensing data to obtain new building sensing data after feature dimensionality reduction. The trained local models then use the Softmax function to classify the new building sensing data after feature dimensionality reduction to obtain the building safety level corresponding to the new building sensing data of each of the aforementioned nodes.
[0014] As a further improvement of the present invention, the sensor group includes an acceleration sensor, a strain sensor, a displacement sensor, a temperature and humidity sensor, and a crack monitoring sensor.
[0015] As a further improvement of the present invention: the generation of synthetic sensing data using the SMOTE algorithm based on dynamic self-learning in step S2 includes:
[0016] S201. Set the number of samples for synthesized sensor data;
[0017] S202. Perform dynamic topology construction. Utilize the k-nearest neighbor algorithm to dynamically construct the topology of the building sensor data. Through neighborhood search, find the k nearest neighbors for each building sensor data sample. Calculate the distances between building sensor data samples to determine neighbor relationships. The method is represented as follows:
[0018]
[0019] In the formula, Dist() is the distance function between building sensor data samples. Let i be the feature vector of the i-th building sensor data sample in the building sensor dataset. Let be the feature vector of the j-th building sensor data sample in the building sensor dataset, ∥∥ p It is a p-norm;
[0020] S203. Perform distribution similarity measurement calculation. For each pair of building sensor data sample points, calculate its similarity measurement value. The calculation formula is as follows:
[0021]
[0022] In the formula, Let be the similarity between the i-th and j-th building sensor data samples; Let be the feature vector of the i-th building sensor data sample in the building sensor dataset; σ is the feature vector of the j-th building sensor data sample in the building sensor dataset; c Bandwidth parameter for similarity measurement; N c (i) is the set of neighbors of the i-th building sensor data sample; is the feature vector of the kth building sensor data sample in the building sensor dataset;
[0023] S204. During the generation of building sensor data samples, construct a similarity manifold for the building sensor data samples, adjust the path for generating the building sensor data samples, and construct a manifold mapping matrix through an optimization problem to capture the low-dimensional manifold structure of the building sensor data. The optimization problem is expressed as:
[0024]
[0025] In the formula, M is the manifold mapping matrix obtained when minimizing the constraints of the optimization problem. c The mapping matrix of the manifold, Let i be the feature vector of the i-th building sensor data sample in the building sensor dataset. Let be the feature vector of the j-th building sensor data sample in the building sensor dataset, and let ∥∥ be the L2 norm. Let λ be the similarity between the i-th and j-th building sensor data samples. ac It is the regularization parameter of the manifold mapping; ∥∥ F The Frobenius norm of the matrix;
[0026] S205. Perform synthetic sensor data sample integration and balancing. The generated synthetic sensor data is merged with the building sensor data to form a training dataset. The data is balanced according to the distribution characteristics of the building sensor data and the distribution of the health level labels. A dynamic adjustment mechanism is used to maintain the balance between categories to ensure that the amount of building sensor data in each category is close to the predetermined target ratio.
[0027] S206. In the process of generating synthetic sensor data samples, topology adjustment and self-learning are performed, the changes in the distribution of building sensor data are continuously monitored, and the topology is continuously adjusted through the self-learning mechanism. The synthesis strategy is adjusted by providing real-time feedback on the quality of the synthetic sensor data samples and their adaptability to the distribution of building sensor data.
[0028] S207. Determine the stopping condition and output result. When the difference between the number of target building sensor data samples and the number of actual synthetic sensor data samples is less than the expansion judgment threshold, the building sensor data sample expansion process is stopped, and the final training dataset is output. The calculation formula for the expansion judgment threshold is:
[0029]
[0030] In the formula, ∈ c To expand the judgment threshold, if ∈ c If the value is less than the preset threshold, the expansion process stops and the final training dataset is output. It is the number of target categories, which is preset manually based on the relative importance of the categories; The number of synthetic sensor data samples required.
[0031] Preferably, the bandwidth parameter σ of the similarity metric in S203 c The calculation formula is:
[0032]
[0033] In the formula, γ c It is a global adjustment parameter, N c (i) represents the set of neighbors for the i-th building sensor data sample. Let i be the feature vector of the i-th building sensor data sample in the building sensor dataset. Let be the feature vector of the j-th building sensor data sample in the building sensor dataset.
[0034] As a further improvement of the present invention: the training in S3 based on an autoencoder neural network with accelerated convergence includes:
[0035] S301. Initialize the encoder and decoder of the autoencoder network;
[0036] S302. Predict future parameter update directions by using a weighted average of historical gradients, and combine this with the current gradient optimization strategy to improve training speed, as expressed as:
[0037]
[0038]
[0039] In the formula, γ represents the update amount of the weights in the l-th layer of the autoencoder. rs η is the momentum coefficient. rs Let L be the learning rate of the autoencoder, L be the reconstruction error loss function of the autoencoder, and α be the learning rate. rs β is the historical gradient influence coefficient, Nr is the historical gradient window length, and β is the historical gradient influence coefficient. k The gradient decay coefficients before the k-th iteration of the autoencoder. The weights of the l-th layer of the autoencoder are... The weights before the k-th iteration of the autoencoder. represents the weights of the lk-th layer of the autoencoder, and ← represents the parameter update operation;
[0040] S303. A dynamic learning rate adjustment method is adopted, where the step size is gradually reduced according to the rate of decrease of the loss function, expressed as:
[0041]
[0042] In the formula, η rst Let η be the learning rate of the autoencoder in the t-th iteration. rs0 δ represents the initial learning rate of the autoencoder. ra λ is the learning rate decay rate of the autoencoder, int(t) is the current iteration number, and λ is the learning rate decay rate. ra κ is the curvature influence coefficient. t Let L be the adjustment parameter based on the curvature of the loss curve for the t-th iteration, and L be the training parameter; t-2Let L be the loss value of the autoencoder in the (t-2)th iteration. t-1 Let L be the loss value of the autoencoder in the (t-1)th iteration. t Let be the loss value of the autoencoder in the t-th iteration; ∈ is a small constant;
[0043] S304. Repeat S302 to S303 until the preset stopping iteration condition is met.
[0044] As a further improvement of the present invention: the central server in S4 uses a federated average algorithm to aggregate parameters.
[0045] The beneficial effects of the present invention are as follows: The building structure health monitoring method based on machine learning provided by the present invention has high classification accuracy and is less prone to large-scale data leakage.
[0046] This method employs the SMOTE algorithm based on dynamic self-learning for data augmentation. Through dynamic topology construction and local distribution characteristic analysis, it generates synthetic sensor data that better matches the characteristics of building sensor data. This solves the problem of insufficient model generalization ability caused by data sparsity and uneven distribution, improves the quality of the training dataset, and thus increases the training completion rate of the model, thereby improving the classification accuracy of the model.
[0047] Meanwhile, this method uses an autoencoder neural network based on accelerated convergence for feature dimensionality reduction. By weighted averaging of historical gradients and dynamic learning rate adjustment, it improves training efficiency and stability, solves the problems of low feature extraction efficiency and unstable parameter adjustment during the training of building structure health monitoring models, and improves the classification accuracy of the model.
[0048] In addition, this method adopts a distributed federated learning architecture, in which the local model is trained using the building sensor data of each node. Since the data of each node is not aggregated in the central server, there will be no large-scale data leakage even if a network attack occurs. Attached Figure Description
[0049] Figure 1 This is a schematic diagram of the principle of the present invention. Detailed Implementation
[0050] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0051] The steps or actions described in this invention can be rearranged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various orders in this invention and the accompanying drawings, such as "S1," are only for the purpose of clearly describing a particular embodiment and do not imply that they are mandatory orders, unless otherwise stated that a particular order must be followed.
[0052] (1) SMOTE algorithm: The full name is "Synthetic Minority Oversampling Technique". It is an improved scheme based on the random oversampling algorithm. The basic idea of the SMOTE algorithm is to analyze the minority class samples and artificially synthesize new samples based on the minority class samples and add them to the dataset.
[0053] like Figure 1 As shown, the present invention provides a machine learning-based method for monitoring the health of building structures, comprising:
[0054] S1. Install sensor groups at multiple nodes of the building to collect multiple building sensor data for each node, obtain the building sensor dataset for each node, store and label the building safety level corresponding to each building sensor data.
[0055] The building's various nodes include beams, columns, walls, and foundations.
[0056] The sensor array includes accelerometers, strain sensors, displacement sensors, temperature and humidity sensors, and crack monitoring sensors. Accelerometers are used to acquire the acceleration response of the building structure under external loads or vibrations; strain sensors are used to monitor strain changes in building materials or components, especially the strain of load-bearing structures; displacement sensors are used to measure the displacement changes of the building structure under load in real time; temperature and humidity sensors are used to monitor the effects of temperature and humidity changes on building materials, especially on materials such as concrete and steel; and crack monitoring sensors are used to detect potential cracks in the building structure and measure the width and propagation of the cracks. The sensor array transmits data wirelessly or via wired connection to a memory and stores it in JSON or CSV format.
[0057] The data attributes of each building sensor data point include the building structure's acceleration response Ra (unit: m / s²). 2 The following data are included: strain value of building structure Da (unit με), displacement of building structure La (unit mm), temperature of building structure Ta (unit °C), humidity of building structure Ha (unit %), crack width of building surface Fa (unit mm), crack propagation rate Ca (unit mm / s), construction quality score Sa (0~100 points, reflecting construction status), external environmental vibration intensity Va (unit g), and pressure data of pressure sensors inside the building Pa (unit kPa).
[0058] The annotation method is manual annotation.
[0059] Building safety levels include healthy (the structure is in normal condition with no obvious damage, represented by 1), minor damage (the structure has slight deformation or cracks, which do not affect the overall safety at present, represented by 2), moderate damage (the structure has obvious deformation or cracks, which may affect the safety of use, represented by 3), severe damage (the structure has suffered significant damage, which may pose a threat to the overall safety, represented by 4), and dangerous condition (the structure is severely damaged and urgently needs repair or demolition, represented by 5).
[0060] S2. A distributed federated learning architecture is adopted. A global model (global building structure health monitoring model) is initialized in the central server. The global model is sent to each node to form a local model (local building structure health monitoring model). The local model of each node uses the building sensor dataset of that node as a basis to generate synthetic sensor data using the SMOTE algorithm based on dynamic self-learning, and obtains a synthetic sensor dataset. The building sensor dataset and the synthetic sensor dataset are used together as the training dataset.
[0061] The SMOTE algorithm based on dynamic self-learning refers to the process of generating synthetic sensing data by dynamically selecting the generation strategy according to the density and distribution characteristics of the data, thereby avoiding overfitting and data bias. It also adopts a self-learning mechanism based on topological relationships to determine how the new synthetic sensing data is distributed according to the local distribution characteristics of the data, further optimizing the representativeness and diversity of the data, and ensuring that the generated synthetic sensing data can better reflect the data characteristics of key areas even when the data is sparse or unevenly distributed.
[0062] The S2 uses the SMOTE algorithm, based on dynamic self-learning, to generate synthetic sensing data, including:
[0063] S201. Pre-set the number of samples for synthesized sensor data;
[0064] S202. Perform dynamic topology construction. Utilize the k-nearest neighbor algorithm to dynamically construct the topology of the building sensor data to reflect its local distribution characteristics. This ensures that the generated synthetic sensor data samples better reflect the local and global features of the building sensor data. Neighborhood search is performed on the building sensor dataset to find the k nearest neighbors for each building sensor data sample. Considering the distribution of the building sensor data, the algorithm's topology is dynamically constructed; that is, the topology may change for areas with different densities. The method for calculating the distance between building sensor data samples to determine neighbor relationships is as follows:
[0065]
[0066] In the formula, Dist() is the distance function between building sensor data samples, which calculates the neighboring points of each building sensor data sample, thereby constructing the topology of the building sensor data space. Let be the feature vector of the i-th building sensor data sample in the building sensor dataset; Let be the feature vector of the j-th building sensor data sample in the building sensor dataset; ∥∥ p The p-norm is used, and the p-norm is represented by Euclidean distance, where p = 2;
[0067] S203. Perform distribution similarity measurement calculation. For each pair of building sensor data sample points, calculate its similarity measurement value. The similarity measurement value not only considers the traditional Euclidean distance, but also adopts the statistical characteristics of the local point distribution of the building sensor data, such as local density and distribution pattern, so that the generated synthetic sensor data has better representativeness. The formula for calculating the similarity measurement is:
[0068]
[0069] In the formula, The similarity between the i-th and j-th building sensor data samples is weighted by an exponential function; the smaller the distance between the building sensor data samples, the greater the similarity. Let be the feature vector of the i-th building sensor data sample in the building sensor dataset; σ is the feature vector of the j-th building sensor data sample in the building sensor dataset; c The bandwidth parameter, used for similarity measurement, controls the influence range of building sensor data samples within a local area; N c (i) is the set of neighbors of the i-th building sensor data sample, which is obtained through dynamic topology construction; is the feature vector of the kth building sensor data sample in the building sensor dataset;
[0070] The bandwidth parameter depends not only on the Euclidean distance between building sensor data samples but also adaptively adjusts based on the density of the building sensor dataset. This dynamic adjustment adapts to changes in the building sensor data density, ensuring that similarity calculations differ between dense and sparse areas of the data. This avoids generating low-quality building sensor data samples. The bandwidth parameter σ for the similarity measure... c The calculation formula is:
[0071]
[0072] In the formula, γ c It is a global adjustment parameter used to balance local and global effects; N c(i) represents the set of neighbors for the i-th building sensor data sample. Let i be the feature vector of the i-th building sensor data sample in the building sensor dataset. Let be the feature vector of the j-th building sensor data sample in the building sensor dataset.
[0073] S204. During the generation of building sensor data samples, construct a similarity manifold for the building sensor data samples, adjust the generation path of the building sensor data samples to make the generated building sensor data samples more consistent with the characteristic distribution structure of building sensor data, and avoid the occurrence of redundant and abnormal building sensor data in the generation process. An optimization problem is used to construct a manifold mapping matrix to capture the low-dimensional manifold structure of the building sensor data. The optimization problem is expressed as:
[0074]
[0075] In the formula, M is the manifold mapping matrix obtained when minimizing the constraints of the optimization problem. c The mapping matrix of the manifold, Let i be the feature vector of the i-th building sensor data sample in the building sensor dataset. Let be the feature vector of the j-th building sensor data sample in the building sensor dataset, and let ∥∥ be the L2 norm. Let λ be the similarity between the i-th and j-th building sensor data samples. ac It is the regularization parameter of the manifold mapping, which prevents overfitting, λ ac Set to 0.2; ∥∥ F The Frobenius norm of the matrix;
[0076] An adaptive importance weighting method is used to calculate the importance of each building sensor data sample in the building sensor dataset within the current building sensor data distribution, determining its weight when synthesizing sensor data samples. The importance of a building sensor data sample is determined by the density difference between that building sensor data sample and other building sensor data samples in the dataset. Different weights are assigned to building sensor data samples by calculating the density difference between each building sensor data sample and its neighboring building sensor data samples. For building sensor data samples located in dense areas or that are more representative, the generated building sensor data samples will have higher weights, thereby increasing the influence of these building sensor data samples in training. The calculation formula is as follows:
[0077]
[0078] In the formula, Let be the weighting coefficient for the i-th building sensor data sample. Let i be the feature vector of the i-th building sensor data sample in the building sensor dataset. Let σ be the feature vector of the j-th building sensor data sample in the building sensor dataset. ces The standard deviation in the Gaussian function controls the influence range of neighboring building sensor data samples. σ ces Set to 0.1; β ces It is a weighted regularization constant, used to prevent excessively large weighting coefficients in certain building sensor data samples. β ces Set it to 0.5.
[0079] By combining manifold mapping and importance weighting, a random perturbation is added to increase diversity, as follows:
[0080]
[0081] In the formula, δ c For random disturbance factors, Indicates a normal distribution. The standard deviation is the disturbance.
[0082] The standard deviation of the disturbance is determined by the local density, ensuring that the disturbance term is proportional to the local density of the building sensor data. This results in smaller disturbances in areas with dense building sensor data and larger disturbances in areas with sparse data, thus ensuring the diversity and variability of the synthesized sensor data. The calculation method is expressed as follows:
[0083]
[0084] In the formula, α c It is a global adjustment parameter used to control the intensity of the disturbance; μ c This represents the local density of building sensor data samples.
[0085] The local density of building sensor data samples reflects the density characteristics of each sample in the data space. This avoids generating excessive synthetic sensor data in low-density areas, thereby increasing the diversity of the building sensor dataset and preventing overfitting. The calculation method is expressed as follows:
[0086]
[0087] In the formula, μ c σ represents the local density of building sensor data samples; c The bandwidth parameter is used for similarity measurement, controlling the influence range of building sensor data samples within a local area.
[0088] The weighting coefficients between building sensor data samples are calculated based on the local density of the samples to more accurately control the generation process, making the samples more representative and better preserving the structural characteristics of the building sensor dataset. The calculation method is expressed as follows:
[0089]
[0090] In the formula, This represents the weighting coefficient between the i-th and j-th building sensor data samples; This represents the similarity between the i-th and j-th building sensor data samples. It is weighted by an exponential function, and the smaller the distance between the building sensor data samples, the greater the similarity. This represents the similarity between the i-th and k-th building sensor data samples.
[0091] The synthesis of building sensor data samples is performed, and the synthesis method is represented as follows:
[0092]
[0093] In the formula, This is a sample of new building sensor data synthesized using the SMOTE algorithm based on dynamic self-learning.
[0094] As can be seen from the above steps, the generation of synthetic sensor data differs from the traditional SMOTE algorithm. The SMOTE algorithm based on dynamic self-learning does not simply generate new building sensor data samples through interpolation. Instead, it dynamically selects a synthesis strategy based on the local density, similarity metric, and manifold mapping matrix of each building sensor data sample, using an adaptive importance weighting approach. The generated synthetic sensor data not only follows the global structure of the original building sensor data distribution but also effectively reflects the differences in local structures, ensuring the diversity and representativeness of the new building sensor data samples. During data augmentation, manifold mapping and importance weighting strategies are applied to augment the building sensor data. By calculating local density and perturbations to generate synthetic data samples, the synthetic sensor data can better reflect the distribution characteristics of the building sensor data while avoiding the generation of redundant and low-quality building sensor data samples.
[0095] S205. Integrate and balance the synthetic sensor data samples. Merge the generated synthetic sensor data with the building sensor data to form a training dataset. Balance the dataset based on the distribution characteristics of the building sensor data and the distribution of health level labels to ensure that the health level distribution of the expanded building sensor dataset is reasonable and to avoid bias in the classification model caused by synthetic sensor data. Maintain the balance between categories through a dynamic adjustment mechanism to ensure that the amount of building sensor data in each category is close to the predetermined target proportion. For each category, the method for calculating the number of building sensor data samples and the required number of synthetic data samples is expressed as follows:
[0096]
[0097] In the formula, The required number of synthetic sensor data samples; α cvf This is a control coefficient used to adjust the ratio of synthetic sensor data samples for each category; It refers to the number of target categories, which is preset manually based on the relative importance of the categories. This represents the number of building sensor data samples for the current category.
[0098] S206. During the generation of synthetic sensor data samples, topology adjustment and self-learning are performed. Changes in the distribution of building sensor data are continuously monitored, and the topology is constantly adjusted through a self-learning mechanism. Real-time feedback is provided on the quality of the synthetic sensor data samples and their adaptability to the distribution of building sensor data to adjust the synthesis strategy. This ensures that the generated building sensor data samples can always effectively fill the gaps in the building sensor data space without causing oversampling or distortion. For each newly generated building sensor data sample, its adjacent building sensor data sample set is recalculated and the topology is updated. The updated topology is represented by the adaptive learning method as follows:
[0099]
[0100] In the formula, Let i be the set of neighboring building sensor data samples of the i-th building sensor data sample; This represents the index value of the building sensor data sample that represents the minimum value of the function in its domain. This is a sample of new building sensor data synthesized using the SMOTE algorithm based on dynamic self-learning. is the feature vector of the kth building sensor data sample in the building sensor dataset;
[0101] S207. Determine the stopping condition and output result. When the difference between the number of target building sensor data samples and the number of actual synthetic sensor data samples is less than the expansion judgment threshold, the building sensor data sample expansion process is stopped, and the final training dataset is output. The calculation formula for the expansion judgment threshold is:
[0102]
[0103] In the formula, ∈ c To expand the judgment threshold, if ∈ c If the value is less than the preset threshold, the expansion process stops and the final training dataset is output. It is the number of target categories, which is preset manually based on the relative importance of the categories; The number of synthetic sensor data samples required.
[0104] If there are 800 building sensor data points and 200 synthetic sensor data points are generated, then the training dataset contains 1000 data points.
[0105] S3. Each node's local model uses the node's training dataset to train the autoencoder neural network based on accelerated convergence in each local model, resulting in a trained autoencoder neural network based on accelerated convergence.
[0106] Autoencoder neural networks based on accelerated convergence refer to strategies that predict and adjust future parameter updates based on historical optimization states during feature dimensionality reduction. This makes the training process more stable and reduces oscillations, thereby achieving accelerated convergence and improving the model's performance and robustness.
[0107] Training autoencoder neural networks in S3 based on accelerated convergence includes:
[0108] S301. Initialize the encoder and decoder of the autoencoder network. The encoder and decoder are used to map high-dimensional input data to a low-dimensional space and reconstruct the original data from the low-dimensional representation, respectively. During initialization, the weights are generated using a Gaussian distribution to ensure that the parameters have appropriate perturbations in the early stages of training, avoiding gradient vanishing or exploding. This is represented as:
[0109]
[0110]
[0111] In the formula, Let be the weights of the l-th layer of the autoencoder, and be the weights following a specific distribution. This represents the number of input neurons in the autoencoder. It follows a normal distribution with a mean of 0 and a variance of 1. Its function is to generate small random perturbations to adapt to the high noise characteristics in building sensor data and reduce the interference of bias in the early stages of learning. The bias of the l-th layer of the autoencoder;
[0112] S302. To accelerate convergence and improve training efficiency, the future parameter update direction is predicted by weighted averaging of historical gradients, and combined with the current gradient optimization strategy to improve training speed, as expressed below:
[0113]
[0114]
[0115] In the formula, γ represents the update amount of the weights in the l-th layer of the autoencoder; rs η is the momentum coefficient, ranging from 0.9 to 0.99, which allows the training of building sensor data to adapt to large gradient fluctuations; rs Let α be the learning rate of the autoencoder, and L be the reconstruction error loss function of the autoencoder. Constraints are applied to the autoencoder during training to ensure that the reduced low-dimensional features can effectively reconstruct the high-dimensional data, extracting key features for building health status classification; rs β is the historical gradient influence coefficient, Nr is the historical gradient window length; k is the gradient decay coefficient before the kth iteration of the autoencoder, and the decay coefficients before the kth iteration are all set to 0.98; The weights of the l-th layer of the autoencoder are... The weights before the k-th iteration of the autoencoder. represents the weights of the lk-th layer of the autoencoder, and ← represents the parameter update operation;
[0116] S303. To avoid oscillations when training approaches the optimal solution, a dynamic learning rate adjustment method is adopted. The step size is gradually reduced according to the rate of decrease of the loss function, thereby ensuring the stability of the update, expressed as:
[0117]
[0118] In the formula, η rst Let η be the learning rate of the autoencoder in the t-th iteration. rs0 Let η be the initial learning rate of the autoencoder. rs0 Set to 0.05; δ ra λ is the learning rate decay rate of the autoencoder, int(t) is the current iteration number, and λ is the learning rate decay rate. ra λ is the curvature influence coefficient. ra Set to 0.1; κ t Let L be the adjustment parameter based on the curvature of the loss curve for the t-th iteration, and L be the training parameter; t-2 Let L be the loss value of the autoencoder in the (t-2)th iteration. t-1 Let L be the loss value of the autoencoder in the (t-1)th iteration.t is the loss value of the autoencoder in the t-th iteration; ∈ is a small constant to avoid division by zero error, ∈ is set to 0.001;
[0119] S304. Repeat S302 to S303 until the preset stopping iteration condition is met, which indicates that the training of the autoencoder neural network based on accelerated convergence is complete. The preset stopping iteration condition is reaching the preset maximum number of iterations, which is set to 1000.
[0120] S4. Using a distributed federated learning framework, each local model sends the parameters of the trained local model to the central server. The central server aggregates the parameters and updates the global model. Then, the updated global model is sent to each node to form a new local model.
[0121] The S4 central server uses a federated averaging algorithm for parameter aggregation. The federated averaging algorithm achieves collaborative training of local building structure health monitoring models through multiple global iterations.
[0122] For each global iteration, let the number of nodes be N. leb The total number of samples is D. leb The number of samples at the k-th node is D. lebk The objective function of federated learning is defined as follows:
[0123]
[0124] In the formula, f leb () is the objective function of federated learning, ω leb For building structural health monitoring model parameters, For the building structural health monitoring model parameters ω leb For the loss prediction of the j-th building sensor data sample, L tra () represents the training loss, where L is the training loss. tra () is calculated using the cross-entropy loss function; Let j be the sample features of the j-th building sensor data sample. The label of the j-th building sensor data sample.
[0125] For the k-th node, the objective function for this node is defined as:
[0126]
[0127] In the formula, Let the objective function be the target function for the k-th node. Let be the number of samples at the k-th node. The distribution of building sensor data for the k-th node.
[0128] Taking the parameter update method of the k-th node in the t-th iteration as an example, let the gradient of the parameters of the k-th node be... The method for updating the parameters of the building structure health monitoring model in the t-th iteration is expressed as follows:
[0129]
[0130] In the formula, For the parameters of the building structure health monitoring model in the (t+1)th iteration, Let R be the parameters of the building structure health monitoring model in the t-th iteration. nod The learning rate is updated for the current parameters. The number of samples at the k-th node.
[0131] The parameter update method for the global building structure health monitoring model of the central server is represented as follows:
[0132]
[0133] In the formula, These are the parameters of the global building structure health monitoring model of the central server in the (t+1)th iteration. These are the parameters of the building structure health monitoring model for the k-th node in the (t+1)-th iteration.
[0134] S5. The new local model repeats S2 to S4 to start a new iteration until training converges (the preset stopping condition is reaching the preset maximum number of iterations, which is set to 5000 times), which means that the global model of the central server and the local models of each node have completed training.
[0135] S6. Collect new building sensor data from each node through the sensor group, and input the new building sensor data from each node into the corresponding trained local model. The trained local model first uses the trained autoencoder neural network based on accelerated convergence to perform feature dimensionality reduction on the new building sensor data to obtain the new building sensor data after feature dimensionality reduction. The trained local model then uses the Softmax function to classify the new building sensor data after feature dimensionality reduction to obtain the building safety level corresponding to the new building sensor data of each node.
Claims
1. A method for monitoring the health of building structures based on machine learning, characterized in that, include: S1. Install sensor groups at multiple nodes of the building to collect multiple building sensor data of the nodes, obtain building sensor dataset for each node, store and label the building safety level corresponding to each building sensor data; S2. A distributed federated learning architecture is adopted. A global model is initialized in the central server and sent to each of the nodes to form a local model. The local model of each node generates synthetic sensing data based on the building sensing dataset of that node using the SMOTE algorithm based on dynamic self-learning to obtain a synthetic sensing dataset. The building sensing dataset and the synthetic sensing dataset are used together as the training dataset. S3. The local model of each node uses the training dataset of the node to train the autoencoder neural network based on accelerated convergence in each local model to obtain the trained autoencoder neural network based on accelerated convergence. The training based on an autoencoder neural network to accelerate convergence includes: S301. Initialize the encoder and decoder of the autoencoder network; S302. Predict future parameter update directions by using a weighted average of historical gradients, and combine this with the current gradient optimization strategy to improve training speed, as expressed as: , , In the formula, For the self-encoder The amount of layer weight update, The momentum coefficient, The learning rate of the autoencoder. Let the reconstruction error loss function be the autoencoder. This represents the historical gradient influence coefficient. The historical gradient window length, For the self-encoder The gradient decay coefficient before the previous one, For the self-encoder Layer weights For the self-encoder The previous weights, For the self-encoder Layer weights For parameter update operations; S303. A dynamic learning rate adjustment method is adopted, where the step size is gradually reduced according to the rate of decrease of the loss function, expressed as: , , In the formula, For the self-encoder The learning rate for the next iteration. is the initial learning rate of the autoencoder; This represents the learning rate decay rate of the autoencoder. This represents the current iteration number. The curvature influence coefficient; For the first The adjustment parameters based on the curvature of the loss curve in the next iteration are the training parameters; For the self-encoder The loss value of the next iteration. For the self-encoder The loss value of the next iteration. For the self-encoder The loss value of the next iteration; It is a small constant; S304. Repeat S302~S303 until the preset stopping iteration condition is met; S4. Each local model sends the parameters of the trained local model to the central server. The central server aggregates the parameters and updates the global model. Then, the updated global model is sent to each of the nodes to form a new local model. S5. The new local model repeats S2~S4 to start a new iteration until training converges, resulting in the trained global model and the trained local model. S6. Collect new building sensing data from each of the aforementioned nodes using the sensor group, and input the new building sensing data from each of the aforementioned nodes into the corresponding trained local models. The trained local models first use the trained autoencoder neural network based on accelerated convergence to perform feature dimensionality reduction on the new building sensing data to obtain new building sensing data after feature dimensionality reduction. The trained local models then use the Softmax function to classify the new building sensing data after feature dimensionality reduction to obtain the building safety level corresponding to the new building sensing data of each of the aforementioned nodes.
2. The method for monitoring the health of building structures based on machine learning according to claim 1, characterized in that, The sensor group includes an accelerometer, a strain sensor, a displacement sensor, a temperature and humidity sensor, and a crack monitoring sensor.
3. The method for monitoring the health of building structures based on machine learning according to claim 1, characterized in that, The generation of synthetic sensing data using the SMOTE algorithm based on dynamic self-learning in S2 includes: S201. Set the number of samples for synthesized sensor data; S202. Perform dynamic topology construction. Utilize the k-nearest neighbor algorithm to dynamically construct the topology of the building sensor data. Through neighborhood search, find the k nearest neighbors for each building sensor data sample. Calculate the distances between building sensor data samples to determine neighbor relationships. The method is represented as follows: , In the formula, It is a distance function between building sensor data samples. For the building sensing data center The feature vector of a building sensor data sample For the building sensing data center The feature vector of a building sensor data sample for -norm; S203. Perform distribution similarity measurement calculation. For each pair of building sensor data sample points, calculate its similarity measurement value. The calculation formula is as follows: , In the formula, For the first The and the first Similarity between individual building sensor data samples; For the building sensing data center Feature vector of a building sensor data sample; For the building sensing data center Feature vector of a building sensor data sample; The bandwidth parameter used for similarity measurement; For the first The set of neighbors of a building sensor data sample; For the building sensing data center Feature vector of a building sensor data sample; S204. During the generation of building sensor data samples, construct a similarity manifold for the building sensor data samples, adjust the path for generating the building sensor data samples, and construct a manifold mapping matrix through an optimization problem to capture the low-dimensional manifold structure of the building sensor data. The optimization problem is expressed as: , In the formula, The manifold mapping matrix is obtained when minimizing the constraints of the optimization problem. The mapping matrix of the manifold, For the building sensing data center The feature vector of a building sensor data sample For the building sensing data center The feature vector of a building sensor data sample It is the L2 norm. For the first The and the first Similarity between individual building sensor data samples It is the regularization parameter of the manifold mapping; The Frobenius norm of the matrix; S205. Perform synthetic sensor data sample integration and balancing. The generated synthetic sensor data is merged with the building sensor data to form a training dataset. The data is balanced according to the distribution characteristics of the building sensor data and the distribution of the health level labels. A dynamic adjustment mechanism is used to maintain the balance between categories to ensure that the amount of building sensor data in each category is close to the predetermined target ratio. S206. In the process of generating synthetic sensor data samples, topology adjustment and self-learning are performed, the changes in the distribution of building sensor data are continuously monitored, and the topology is continuously adjusted through the self-learning mechanism. The synthesis strategy is adjusted by providing real-time feedback on the quality of the synthetic sensor data samples and their adaptability to the distribution of building sensor data. S207. Determine the stopping condition and output result. When the difference between the number of target building sensor data samples and the number of actual synthetic sensor data samples is less than the expansion judgment threshold, the building sensor data sample expansion process is stopped, and the final training dataset is output. The calculation formula for the expansion judgment threshold is: , In the formula, To expand the judgment threshold, if If the value is less than the preset threshold, the expansion process stops and the final training dataset is output. It is the number of target categories, which is preset manually based on the relative importance of the categories; The number of synthetic sensor data samples required.
4. The method for monitoring the health of building structures based on machine learning according to claim 3, characterized in that, The bandwidth parameter of the similarity metric in S203 The calculation formula is: , In the formula, It's a global adjustment parameter. For the first The neighbor set of a building sensor data sample For the building sensing data center The feature vector of a building sensor data sample For the building sensing data center The feature vector of a building sensor data sample.
5. A method for monitoring the health of building structures based on machine learning according to any one of claims 1 to 4, characterized in that, The central server in S4 uses a federated average algorithm to aggregate parameters.
Citation Information
Patent Citations
Intelligent monitoring system for health of building structure
CN108846244A