IoT-based real-time monitoring and early warning methods and systems for building facilities

By using IoT technology and self-attention networks, intelligent monitoring and early warning of building facilities have been achieved, solving the problem of inaccurate monitoring in traditional methods, improving the accuracy and timeliness of damage identification, and ensuring building safety.

CN121479343BActive Publication Date: 2026-04-03YUANXINSHE TECHNOLOGY (JIANGSU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-07
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Traditional building structure monitoring methods are difficult to achieve comprehensive, continuous and accurate monitoring, and cannot detect abnormal changes in a timely manner, making it difficult to prevent safety hazards.

Method used

An IoT-based real-time monitoring and early warning system for building facilities is adopted. Data is acquired through multiple sensors, and technologies such as sliding analysis, wavelet decomposition, self-attention network and variational encoder are combined to calculate structural feature vectors and spatial correlation weights, automatically identify potential damage locations and generate early warning information.

Benefits of technology

It enables intelligent monitoring and early warning of building facilities, improves the accuracy and timeliness of structural damage identification, accurately locates potential damage locations, avoids missed and false alarms, and enhances the level of safety management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121479343B_ABST
    Figure CN121479343B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for real-time monitoring and early warning of building facilities based on the Internet of Things (IoT), belonging to the field of building monitoring and early warning technology. The method includes acquiring real-time monitoring data through multiple sensors, performing sliding analysis and wavelet decomposition on the data to obtain structural feature vectors, calculating spatial correlation weights and clustering using a self-attention network, performing multi-scale decomposition to calculate anomaly scores, calculating structural deviation using a variational encoder, and generating early warning information when the deviation exceeds a threshold for multiple consecutive monitoring cycles. This invention achieves accurate location and early warning of building damage, improving monitoring efficiency and safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of building monitoring and early warning technology, and in particular to a method and system for real-time monitoring and early warning of building facilities based on the Internet of Things. Background Technology

[0002] In recent years, the development of Internet of Things (IoT) technology has provided new technical means for real-time monitoring of building facilities. By deploying various sensors, key parameters such as vibration, deformation, and cracks in building structures can be collected in real time, providing data support for building safety. Traditional building structure monitoring mainly relies on regular manual inspections or simple sensor alarm systems, which are difficult to achieve comprehensive, continuous, and accurate monitoring. With the development of IoT and artificial intelligence technologies, it has become possible to establish intelligent real-time monitoring and early warning systems for building facilities. By intelligently analyzing the large amounts of data collected, abnormal changes in building structures can be detected early, preventing major safety accidents. Summary of the Invention

[0003] This invention provides a method and system for real-time monitoring and early warning of building facilities based on the Internet of Things, which can solve the problems in the prior art.

[0004] A first aspect of the present invention provides a method for real-time monitoring and early warning of building facilities based on the Internet of Things, comprising:

[0005] Multiple sensors are deployed at preset monitoring locations on the building structure to obtain real-time monitoring data of the building structure.

[0006] The real-time monitoring data is subjected to sliding analysis and wavelet decomposition to obtain multifractal spectrum and fractal dimension. The mean and standard deviation are combined to generate structural feature vectors. The structural feature vectors are input into a self-attention network to calculate the spatial correlation weights between different sensors. Based on the spatial correlation weights, the sensor nodes are clustered into multiple monitoring sub-regions.

[0007] Multi-scale decomposition is performed on the structural feature vector of each monitoring sub-region. Anomaly scores of structural response are calculated at different scale levels. Anomaly scores at each level are adaptively weighted and integrated to obtain local structural anomaly scores. Historical monitoring data is encoded using a variational encoder to obtain the latent variable distribution of normal structures. Combined with the local structural anomaly scores, structural deviation is calculated.

[0008] When the structural deviation exceeds the damage warning threshold for multiple consecutive monitoring cycles, a warning message including the location and extent of damage is generated and sent to the mobile terminal of the management personnel.

[0009] The real-time monitoring data is subjected to sliding analysis and wavelet decomposition to obtain the multifractal spectrum and fractal dimension. A structural feature vector is generated by combining the mean and standard deviation, including:

[0010] The real-time monitoring data is subjected to sliding analysis with multiple data points as sub-window lengths. The limit of the logarithmic ratio of adjacent data points within each sub-window and the logarithmic ratio of the time increment is calculated to obtain a local singularity index sequence. The ratio of the number of time points with the same index value in the local singularity index sequence to the total number of time points is calculated to obtain a multifractal spectrum.

[0011] Wavelet decomposition is performed on the real-time monitoring data to obtain decomposition coefficients for different frequency bands; the ratio of decomposition coefficients of adjacent frequency bands is calculated, and when the ratio is less than the energy threshold, the decomposition coefficients of the two frequency bands are merged to obtain optimized decomposition coefficients; the optimized decomposition coefficients are divided into grids, the number of grids required to cover the optimized decomposition coefficients is counted, and the limit of the ratio of the logarithm of the number of grids to the inverse logarithm of the grid size is used as the fractal dimension;

[0012] The mean, standard deviation, multifractal spectrum, and fractal dimension of the real-time monitoring data are combined to form a feature vector; the time standard deviation of the feature vector over multiple consecutive monitoring periods is calculated, and the negative exponential form of the time standard deviation is divided by the sum of the negative exponents of all feature standard deviations to obtain the feature weight; the feature weight is multiplied by the corresponding feature vector components and superimposed to obtain the structural feature vector.

[0013] The structural feature vector is input into a self-attention network to calculate the spatial correlation weights between different sensors. Based on these spatial correlation weights, the sensor nodes are clustered into multiple monitoring sub-regions, including:

[0014] The structural feature vectors of multiple sensors are used to construct a feature matrix, and the feature matrix is ​​then subjected to a linear transformation to obtain a query matrix, a key matrix, and a value matrix.

[0015] In multiple parallel attention heads, the product of the query matrix and the key matrix is ​​calculated respectively. The product is divided by the square root of the scaling factor, processed by the normalization function, and then multiplied by the value matrix to obtain multiple spatial association weight matrices.

[0016] The spatial correlation weight matrix is ​​concatenated along the feature dimension and transformed by the projection matrix to obtain the fused feature matrix; the inner product of any two feature vectors in the fused feature matrix is ​​calculated, and the inner product is divided by the temperature parameter and then processed by the exponential function and normalization to obtain the relative correlation strength between sensor nodes.

[0017] When the relative correlation strength between two sensor nodes is greater than the similarity threshold, the two sensor nodes are assigned to the same monitoring sub-region, resulting in multiple monitoring sub-regions.

[0018] Multi-scale decomposition is performed on the structural feature vector within each monitoring sub-region. Anomaly scores of the structural response are calculated at different scale levels. These anomaly scores are then adaptively weighted and integrated to obtain the local structural anomaly score, including:

[0019] For each monitoring sub-region, the wavelet function is deformed using adaptive scaling and translation parameters to obtain adaptive wavelet basis functions at different decomposition levels; the structural feature vector is convolved with the adaptive wavelet basis functions to obtain wavelet coefficients at different decomposition levels.

[0020] Calculate the mean of wavelet coefficients at each decomposition level. For wavelet coefficients whose absolute value is greater than the mean, retain the value of the excess part and keep the original sign. For wavelet coefficients whose absolute value is less than the mean, set them to zero. The processed wavelet coefficients are obtained, and their mean, standard deviation, skewness and kurtosis are calculated as the feature representation of the current level.

[0021] Based on the feature representation of normal structure, multiple Gaussian distribution mixture models are trained as dynamic baselines. The log-likelihood ratio of the feature representation of the current level to the dynamic baseline is calculated as the anomaly score of the current level. The information gain of the feature representation of each level for anomaly detection is calculated. The information gain is multiplied by the anomaly score of the corresponding level and summed to obtain the local structural anomaly score of the current monitored sub-region.

[0022] Historical monitoring data is encoded using a variational encoder to obtain the latent variable distribution of normal structures. Combined with the local structural anomaly scores, the structural deviation is calculated, including:

[0023] Variational coding is performed on historical monitoring data to obtain an initial feature vector; the structural characteristic matrix is ​​input into a characteristic mapping network to obtain a structural characteristic vector; the initial feature vector and the structural characteristic vector are weighted and combined to obtain a fused feature vector; the mean vector and variance vector are calculated to generate a latent variable distribution.

[0024] Latent variables are sampled from the latent variable distribution, and the latent variables are input into the decoding network to reconstruct historical monitoring data. The weighted combination value of reconstruction error and structural consistency loss is calculated, and the parameters of the variational encoder are optimized based on the weighted combination value. Based on the monitoring data of historical normal structures and the optimized variational encoder, a sample set of latent variables of normal structures is obtained, and the mean vector of the sample set of latent variables of normal structures is calculated.

[0025] After standardizing the current monitoring data, input it into the variational encoder to obtain the current state latent variable; calculate the Mahalanobis distance between the current state latent variable and the mean vector to obtain the overall deviation; and perform a weighted summation of the overall deviation and the local structural anomaly score to obtain the structural deviation.

[0026] Latent variables are sampled from the latent variable distribution, and these latent variables are input into the decoding network to reconstruct historical monitoring data. A weighted combination of reconstruction error and structural consistency loss is calculated, and the parameters of the variational encoder are optimized based on this weighted combination, including:

[0027] Generate a random vector that follows a standard normal distribution. Multiply the random vector element-wise with the square root of the variance vector of the latent variable distribution and add it to the mean vector to obtain latent variable samples. Backpropagation of gradients is achieved through the reparameterized form of the latent variable samples. Subtract the sample mean from the latent variable samples and divide by the sample standard deviation to obtain normalized latent variable samples.

[0028] The normalized latent variable samples are input into the decoding network to generate reconstructed data. The Euclidean distance between the historical monitoring data and the reconstructed data is calculated as the reconstruction error. Structural features are extracted from the historical monitoring data and the reconstructed data, and structural consistency loss is calculated based on the structural features.

[0029] The combined loss value is obtained by weighted summation of the reconstruction error and the structural consistency loss; the gradient of the combined loss value with respect to the variational encoder parameters is calculated, and the product of the gradient and the learning rate is subtracted from the current variational encoder parameters to obtain the updated network parameters.

[0030] A second aspect of the present invention provides an Internet of Things (IoT)-based real-time monitoring and early warning system for building facilities, comprising:

[0031] The first unit is used to deploy multiple sensors at preset monitoring locations on the building structure to obtain real-time monitoring data of the building structure.

[0032] The second unit is used to perform sliding analysis and wavelet decomposition on the real-time monitoring data to obtain the multifractal spectrum and fractal dimension, and generate structural feature vectors by combining the mean and standard deviation; input the structural feature vectors into the self-attention network to calculate the spatial correlation weights between different sensors, and cluster the sensor nodes into multiple monitoring sub-regions according to the spatial correlation weights.

[0033] The third unit is used to perform multi-scale decomposition on the structural feature vector of each monitoring sub-region, calculate the anomaly score of the structural response at different scale levels, and adaptively weight and integrate the anomaly scores at each level to obtain the local structural anomaly score; use a variational encoder to encode the historical monitoring data to obtain the latent variable distribution of the normal structure, and combine the local structural anomaly score to calculate the structural deviation.

[0034] The fourth unit is used to generate early warning information including the location and extent of damage when the structural deviation exceeds the damage early warning threshold for multiple consecutive monitoring cycles, and to send the early warning information to the mobile terminal of the management personnel.

[0035] A third aspect of the embodiments of the present invention,

[0036] An electronic device is provided, comprising:

[0037] processor;

[0038] Memory used to store processor-executable instructions;

[0039] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0040] Fourth aspect of the present invention,

[0041] A computer-readable storage medium is provided, having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0042] The beneficial effects of this application are as follows:

[0043] This invention deploys multiple sensors at preset monitoring locations on the building structure to collect real-time monitoring data. By combining technologies such as multifractal spectrum analysis, self-attention networks, and multi-scale decomposition, it achieves intelligent monitoring and early warning of building facilities, greatly improving the accuracy and timeliness of structural damage identification.

[0044] This invention employs a self-attention network to calculate the spatial correlation weights between sensors and performs monitoring sub-region clustering, enabling the system to automatically identify closely related areas in a building structure, accurately locate potential damage locations, and avoid the problems of missed and false alarms caused by unreasonable region division in traditional methods.

[0045] This invention combines variational encoders and multi-scale anomaly detection technology to comprehensively analyze structural features. It can capture minute changes in structural performance degradation at an early stage, providing managers with accurate early warning information including the location and extent of damage, effectively improving the safety management level and service life of building facilities. Attached Figure Description

[0046] Figure 1 This is a flowchart illustrating the Internet of Things-based real-time monitoring and early warning method for building facilities according to an embodiment of the present invention.

[0047] Figure 2 Flowchart of the method for generating structural feature vectors. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0049] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0050] Figure 1 This is a flowchart illustrating the IoT-based real-time monitoring and early warning method for building facilities according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0051] Multiple sensors are deployed at preset monitoring locations on the building structure to obtain real-time monitoring data of the building structure.

[0052] The real-time monitoring data is subjected to sliding analysis and wavelet decomposition to obtain multifractal spectrum and fractal dimension. The mean and standard deviation are combined to generate structural feature vectors. The structural feature vectors are input into a self-attention network to calculate the spatial correlation weights between different sensors. Based on the spatial correlation weights, the sensor nodes are clustered into multiple monitoring sub-regions.

[0053] Multi-scale decomposition is performed on the structural feature vector of each monitoring sub-region. Anomaly scores of structural response are calculated at different scale levels. Anomaly scores at each level are adaptively weighted and integrated to obtain local structural anomaly scores. Historical monitoring data is encoded using a variational encoder to obtain the latent variable distribution of normal structures. Combined with the local structural anomaly scores, structural deviation is calculated.

[0054] When the structural deviation exceeds the damage warning threshold for multiple consecutive monitoring cycles, a warning message including the location and extent of damage is generated and sent to the mobile terminal of the management personnel.

[0055] Figure 2 A flowchart of the method for generating structural feature vectors is provided. In one optional implementation, sliding analysis and wavelet decomposition are performed on the real-time monitoring data to obtain a multifractal spectrum and fractal dimension. The structural feature vector is then generated by combining the mean and standard deviation, including:

[0056] The real-time monitoring data is subjected to sliding analysis with multiple data points as sub-window lengths. The limit of the logarithmic ratio of adjacent data points within each sub-window and the logarithmic ratio of the time increment is calculated to obtain a local singularity index sequence. The ratio of the number of time points with the same index value in the local singularity index sequence to the total number of time points is calculated to obtain a multifractal spectrum.

[0057] Wavelet decomposition is performed on the real-time monitoring data to obtain decomposition coefficients for different frequency bands; the ratio of decomposition coefficients of adjacent frequency bands is calculated, and when the ratio is less than the energy threshold, the decomposition coefficients of the two frequency bands are merged to obtain optimized decomposition coefficients; the optimized decomposition coefficients are divided into grids, the number of grids required to cover the optimized decomposition coefficients is counted, and the limit of the ratio of the logarithm of the number of grids to the inverse logarithm of the grid size is used as the fractal dimension;

[0058] The mean, standard deviation, multifractal spectrum, and fractal dimension of the real-time monitoring data are combined to form a feature vector; the time standard deviation of the feature vector over five consecutive monitoring periods is calculated, and the negative exponential form of the time standard deviation is divided by the sum of the negative exponents of all feature standard deviations to obtain the feature weight; the feature weight is multiplied by the corresponding feature vector components and superimposed to obtain the structural feature vector.

[0059] This embodiment provides a method for extracting structural features from real-time monitoring data. By performing multifractal analysis and wavelet decomposition on the monitoring data, structural feature vectors are extracted. In practical applications, this method can be used to extract features from real-time data acquired by sensors, facilitating subsequent pattern recognition or anomaly detection.

[0060] Real-time monitoring data is acquired, and sliding window analysis is performed on the data. Specifically, a sub-window with a length of 128 data points and a sliding step size of 16 data points is selected. For the data within each sub-window, the limit of the ratio of the logarithm of adjacent data points to the ratio of the logarithm of the time increment is calculated to obtain the local singularity index. For example, for the time series {1.2, 1.5, 1.8, 2.3, 2.7, 3.1...}, values ​​such as ln(1.5 / 1.2) / ln(t2-t1) and ln(1.8 / 1.5) / ln(t3-t2) are calculated, where t represents the corresponding time point. After all data points within the window have been processed, a set of local singularity index sequences is obtained, such as {0.32, 0.41, 0.37, 0.45...}.

[0061] A multifractal spectrum is constructed by statistically analyzing the ratio of the number of time points with the same singularity index value in the local singularity index sequence to the total number of time points. To improve statistical efficiency, the singularity index value interval [-1.0, 1.0] is divided into 40 sub-intervals, each with a width of 0.05. The number of index values ​​falling into each sub-interval is counted and divided by the total number of data points to obtain the frequency distribution. For example, if there are 120 data points with singularity index values ​​in the range [0.3, 0.35] and a total of 1000 data points, the frequency of this interval is 0.12. The final multifractal spectrum can be represented as {(α1, f(α1)), (α2, f(α2)), ...}, where α represents the singularity index value and f(α) represents its frequency.

[0062] Simultaneously, wavelet decomposition was performed on the real-time monitoring data. A five-level decomposition using the DB4 wavelet was employed to obtain decomposition coefficients for different frequency bands. For a time series of 1024 data points, the number of coefficients for each frequency band after the five-level decomposition were 32, 32, 64, 128, 256, and 512, respectively. The energy ratio of the decomposition coefficients of adjacent frequency bands was calculated, with an energy threshold of 0.05. When the energy ratio of two adjacent frequency bands was less than this threshold, the coefficients of these two frequency bands were merged to form optimized decomposition coefficients. For example, if the energy ratio of frequency band 1 and frequency band 2 was 0.03, which was less than the threshold of 0.05, the coefficients of these two frequency bands were merged into a new frequency band.

[0063] The fractal dimension of the optimized decomposition coefficients was calculated using the box-counting method. The coefficient space was divided into grids of different sizes, starting with an initial grid size of 0.5 and decreasing by half to 0.0078125. For each grid size, the number of grids required to cover all optimized decomposition coefficients was calculated. For example, 85 grids were needed for a grid size of 0.5, 213 grids for 0.25, and 498 grids for 0.125. A linear fit was performed in a double logarithmic coordinate system, with the logarithm of the reciprocal of the grid size as the x-axis and the logarithm of the number of grids as the y-axis. The slope of the fitted line was then used as the fractal dimension. The fractal dimension obtained after fitting the experimental data was 1.42.

[0064] Based on the statistical characteristics of real-time monitoring data, a feature vector is constructed. The mean and standard deviation of the original data are calculated; for example, the mean is 25.3 and the standard deviation is 4.8. The mean, standard deviation, the top 5 principal values ​​from the multifractal spectrum {(0.32, 0.15), (0.41, 0.22), (0.52, 0.18), (0.65, 0.12), (0.73, 0.08)}, and the fractal dimension 1.42 are combined to form the initial feature vector {25.3, 4.8, 0.32, 0.15, 0.41, 0.22, 0.52, 0.18, 0.65, 0.12, 0.73, 0.08, 1.42}.

[0065] To optimize the feature vector, the time standard deviation of each feature component is calculated over multiple consecutive monitoring periods. For example, the mean over five periods is {25.3, 25.7, 25.2, 25.5, 25.6}, with a calculated time standard deviation of 0.21; the fractal dimension over five periods is {1.42, 1.45, 1.43, 1.44, 1.41}, with a calculated time standard deviation of 0.016. The time standard deviations of all feature components are then converted to a negative exponential form, such as e^(-1 / 2). (-0.21) =0.81, e (-0.016) =0.984. Divide each negative exponent value by the sum of all negative exponents of the features to obtain the weight. For example, the weight of the mean feature is 0.81 / 10.32=0.078, and the weight of the fractal dimension feature is 0.984 / 10.32=0.095.

[0066] The feature weights are multiplied by their corresponding feature components and then summed to obtain the weighted structural feature vector. For example, the weighted mean component is 25.3 × 0.078 = 1.973, and the weighted fractal dimension component is 1.42 × 0.095 = 0.135. The complete weighted structural feature vector is {1.973, 0.418, 0.028, 0.013, 0.041, 0.022, 0.056, 0.019, 0.072, 0.013, 0.085, 0.009, 0.135}.

[0067] The structural feature vectors obtained through the above methods effectively capture the statistical and fractal properties of real-time monitoring data, and can be used for subsequent data analysis, pattern recognition, or anomaly detection tasks. Experiments demonstrate that this method exhibits higher feature representation capabilities and robustness compared to traditional methods when processing monitoring data with complex dynamic characteristics.

[0068] In one optional implementation, the structural feature vector is input into a self-attention network to calculate spatial correlation weights between different sensors. Based on these spatial correlation weights, sensor nodes are clustered into multiple monitoring sub-regions, including:

[0069] The structural feature vectors of multiple sensors are used to construct a feature matrix, and the feature matrix is ​​then subjected to a linear transformation to obtain a query matrix, a key matrix, and a value matrix.

[0070] In multiple parallel attention heads, the product of the query matrix and the key matrix is ​​calculated respectively. The product is divided by the square root of the scaling factor, processed by the normalization function, and then multiplied by the value matrix to obtain multiple spatial association weight matrices.

[0071] The spatial correlation weight matrix is ​​concatenated along the feature dimension and transformed by the projection matrix to obtain the fused feature matrix; the inner product of any two feature vectors in the fused feature matrix is ​​calculated, and the inner product is divided by the temperature parameter and then processed by the exponential function and normalization to obtain the relative correlation strength between sensor nodes.

[0072] When the relative correlation strength between two sensor nodes is greater than the similarity threshold, the two sensor nodes are assigned to the same monitoring sub-region, resulting in multiple monitoring sub-regions.

[0073] In a structural feature spatial correlation analysis method based on self-attention networks, structural feature vectors are input into the self-attention network to calculate the spatial correlation weights between different sensors. The technical content of clustering sensor nodes into multiple monitoring sub-regions based on the spatial correlation weights is as follows:

[0074] In this embodiment, after obtaining the structural feature vectors of multiple sensors, these feature vectors are constructed into a feature matrix. Assuming there are n sensors in total, and the dimension of the structural feature vector of each sensor is d, then the dimension of the feature matrix X is n×d. A linear transformation is performed on the feature matrix X to obtain the query matrix Q, the key matrix K, and the value matrix V. Specifically, this is achieved through three weight matrices W... Q W K and W V The feature matrix X is mapped to a query matrix Q, a key matrix K, and a value matrix V. Where W... Q W K and W V The dimensions are all d×d k d k Let be the feature dimension after projection. In practical applications, d k It can be set to 64. For example, when d=128, the dimension of the weight matrix is ​​128×64. Through matrix multiplication, Q=X·W Q K=X·W K V=X·WV The resulting Q, K, and V all have dimensions of n×d. k .

[0075] Spatial correlation weights are calculated in multiple parallel attention heads. Assume h attention heads are used, where h can be set to 8. For the i-th attention head, the query matrix Q is calculated. i With bond matrix K i The product of the transposes of the given values ​​yields an n×n matrix representing the raw correlation score between any two sensors. This matrix is ​​then divided by the square root of a scaling factor, typically set to d. k The value of is chosen to prevent the gradient of the softmax function from vanishing due to an excessively large input. In this example, the scaling factor is 64, and its square root is 8. Next, the result is processed by the softmax normalization function to obtain the spatial correlation weight matrix. The spatial correlation weight matrix is ​​then compared with the value matrix V. i Multiplying them together yields the output matrix Z of the i-th attention head. i The dimension is n×d k For example, for 10 sensors, the feature dimension d k When Z = 64, the obtained Z i The dimensions are 10×64.

[0076] The output matrices Z1, Z2, ..., Z of h attention heads are... h Connecting along the feature dimension yields an n×(h·d) k A matrix of dimension d. For example, when h=8, d k When the matrix length is 64, the dimension of the concatenated matrix is ​​n×512. Then, a projection matrix W is used... O The concatenated matrix is ​​transformed into an n×d dimensional fusion feature matrix Z. O The dimension is (h·d) k )×d, which is 512×128. Through matrix multiplication, Z=(Z1||Z2||...||Z h )·W O The fused feature matrix Z is obtained, where || represents the connection operation on the feature dimension.

[0077] The inner product between any two eigenvectors in the fused feature matrix Z is calculated to obtain an n×n matrix S, representing the original correlation strength between sensor nodes. To adjust the distribution of correlation strength, each element in matrix S is divided by the temperature parameter τ, where τ typically ranges from 0.1 to 1.0; in this embodiment, τ = 0.5. An exponential function is applied to the result, followed by softmax normalization, to obtain the relative correlation strength matrix R between sensor nodes, with dimensions n×n. Each element R in matrix R... ijThis represents the relative correlation strength between the i-th sensor and the j-th sensor, with a value range between 0 and 1.

[0078] Based on the relative correlation strength matrix R, a similarity threshold θ is set for the clustering of sensor nodes. When R ij When the threshold θ is greater than the threshold value, the i-th sensor and the j-th sensor are considered to belong to the same monitoring sub-region. The choice of threshold θ depends on the specific application scenario and data distribution, and can be set between 0.6 and 0.9. In this embodiment, θ = 0.75 is chosen. By traversing all elements in matrix R, n sensor nodes can be clustered into multiple monitoring sub-regions. In specific implementation, a connected component algorithm of the graph can be used: each sensor is regarded as a node in the graph, and when the relative correlation strength between two nodes is greater than the threshold θ, an edge is established between the two nodes. By finding all connected components in the graph, multiple monitoring sub-regions can be obtained.

[0079] To illustrate with a specific example, suppose there are 10 sensors, each with a structural feature vector of dimension 128. Construct a feature matrix X of dimension 10×128. A linear transformation yields a query matrix Q, a key matrix K, and a value matrix V, each of dimension 10×64. Set up 8 attention heads, and in each attention head, calculate the product of Q and the transpose of K to obtain a 10×10 original association score matrix. Divide the original association score matrix by 8 (the square root of the scaling factor) and normalize using softmax to obtain a spatial association weight matrix. Multiply the spatial association weight matrix by V to obtain the output matrix of each attention head, with a dimension of 10×64. Concatenate the output matrices of the 8 attention heads along their feature dimensions to obtain a 10×512 matrix, which is then transformed into a 10×128 fused feature matrix Z using a projection matrix. Calculate the inner product of any two feature vectors in Z to obtain a 10×10 original association strength matrix S. Divide S by the temperature parameter 0.5, and normalize using an exponential function and softmax to obtain the relative association strength matrix R. Let the similarity threshold θ = 0.75, when R ij When the value is greater than 0.75, the i-th and j-th sensor nodes are assigned to the same monitoring sub-region. The 10 sensors are divided into 3 monitoring sub-regions: Region 1 contains sensors 1, 2, 5, and 8; Region 2 contains sensors 3, 4, and 9; Region 3 contains sensors 6, 7, and 10.

[0080] In one optional implementation, a multi-scale decomposition is performed on the structural feature vector within each monitoring sub-region. Anomaly scores of the structural response are calculated at different scale levels, and the anomaly scores at each level are adaptively weighted and integrated to obtain a local structural anomaly score, including:

[0081] For each monitoring sub-region, the wavelet function is deformed using adaptive scaling and translation parameters to obtain adaptive wavelet basis functions at different decomposition levels; the structural feature vector is convolved with the adaptive wavelet basis functions to obtain wavelet coefficients at different decomposition levels.

[0082] Calculate the mean of wavelet coefficients at each decomposition level. For wavelet coefficients whose absolute value is greater than the mean, retain the value of the excess part and keep the original sign. For wavelet coefficients whose absolute value is less than the mean, set them to zero. The processed wavelet coefficients are obtained, and their mean, standard deviation, skewness and kurtosis are calculated as the feature representation of the current level.

[0083] Based on the feature representation of normal structure, multiple Gaussian distribution mixture models are trained as dynamic baselines. The log-likelihood ratio of the feature representation of the current level to the dynamic baseline is calculated as the anomaly score of the current level. The information gain of the feature representation of each level for anomaly detection is calculated. The information gain is multiplied by the anomaly score of the corresponding level and summed to obtain the local structural anomaly score of the current monitored sub-region.

[0084] In this embodiment, multi-scale decomposition is performed on the structural feature vector of each monitoring sub-region, and the anomaly score of the structural response is calculated at different scale levels. The anomaly scores at each level are then adaptively weighted and integrated to obtain the local structural anomaly score.

[0085] For a monitoring object, such as a building structure, it is divided into multiple monitoring sub-regions. Taking a certain building as an example, it can be divided into 10 sub-regions, each containing several sensor acquisition points. Within each monitoring sub-region, the structural response data (such as displacement, velocity, acceleration, etc.) collected by the sensors constitute a structural feature vector. Assuming that for sub-region 1, the structural feature vector collected at a certain moment is [0.15, 0.23, 0.18, 0.31, 0.24, 0.19, 0.27, 0.22], it represents the response values ​​of the 8 acquisition points within this sub-region.

[0086] When performing multi-scale decomposition for each monitoring sub-region, the wavelet function is deformed using adaptive scaling and translation parameters to obtain adaptive wavelet basis functions for different decomposition levels. Specifically, the Mexican cap wavelet is selected as the mother wavelet function, and for decomposition level j, the scaling parameter can be set to 2. j The translation parameter can be set to k×2. j , where k is an integer. For example, for level j=1, the scale parameter is 2, and the translation parameter can be 0, 2, 4, etc.; for level j=2, the scale parameter is 4, and the translation parameter can be 0, 4, 8, etc. Suppose we choose 3 decomposition levels (j=1,2,3) to represent detail, intermediate, and coarse scales, respectively.

[0087] The structural feature vector is convolved with the adaptive wavelet basis function to obtain wavelet coefficients at different decomposition levels. Taking the feature vector of sub-region 1 above as an example, after convolution, the wavelet coefficients are obtained at level j=1 as [0.08, -0.12, 0.05, 0.14, -0.09, 0.11, -0.07, 0.10]; at level j=2 as [0.13, 0.09, -0.15, -0.10, 0.12, 0.08, -0.14, -0.06]; and at level j=3 as [0.17, 0.15, 0.12, 0.09, -0.18, -0.16, -0.13, -0.11].

[0088] For each decomposition level of wavelet coefficients, their mean is calculated. For example, the mean of the wavelet coefficients at level j=1 is 0.0125, the mean of the wavelet coefficients at level j=2 is -0.00375, and the mean of the wavelet coefficients at level j=3 is -0.00625. For wavelet coefficients whose absolute value is greater than the mean, the excess value is retained and the original sign is preserved; for wavelet coefficients whose absolute value is less than the mean, their absolute values ​​are set to zero. For example, for level j=1, the processed wavelet coefficients are [0.0675, -0.1325, 0.0375, 0.1275, -0.1025, 0.0975, -0.0825, 0.0875]; for level j=2, the processed wavelet coefficients are [0.13375, 0.09375, -0.15375, -0.10375, 0.12375, 0.08375, -0.14375, -0.05625]; for level j=3, the processed wavelet coefficients are [0.17625, 0.15625, 0.12625, 0.09625, -0.18625, -0.16625, -0.13625]. -0.11625].

[0089] The mean, standard deviation, skewness, and kurtosis of the processed wavelet coefficients are calculated and used as the feature representation for the current level. For example, the feature representation for level j=1 is [0.0000, 0.0977, 0.0000, 1.8219]; the feature representation for level j=2 is [0.0000, 0.1219, 0.0325, 1.6587]; and the feature representation for level j=3 is [0.0000, 0.1527, 0.0427, 1.5329]. The four values ​​for each feature representation correspond to the mean, standard deviation, skewness, and kurtosis, respectively.

[0090] Based on the feature representation of the normal structure, a mixture model with multiple Gaussian distributions is trained as a dynamic baseline. It is assumed that 1000 sets of data under normal operating conditions are collected, and a mixture model containing three Gaussian components is trained for each decomposition level. For example, for level j=1, the weights of the three Gaussian components are [0.35, 0.40, 0.25], and the mean vectors are [0.0000, 0.0950, 0.0000, 1.8000], [0.0000, 0.1000, 0.0050, 1.8500], and [0.0000, 0.0900, -0.0050, 1.7500], respectively. The covariance matrix is ​​omitted.

[0091] The log-likelihood ratio of the current level's feature representation to the dynamic baseline is calculated and used as the outlier score for the current level. For example, for the three levels of feature representation in sub-region 1 above, the calculated outlier scores are 0.15, 0.28, and 0.42, respectively. This indicates that as the decomposition level increases, the deviation of the feature representation from the normal baseline increases.

[0092] The information gain for anomaly detection at each feature level is calculated. This information gain is then multiplied by the anomaly score at the corresponding level and summed to obtain the local structural anomaly score for the currently monitored sub-region. The information gain can be calculated by comparing the distribution differences of each feature level in normal and anomalous samples. For example, for three levels, the calculated information gains are 0.6, 0.3, and 0.1, respectively. Therefore, the local structural anomaly score for sub-region 1 is 0.15 × 0.6 + 0.28 × 0.3 + 0.42 × 0.1 = 0.216.

[0093] By setting a threshold, it is possible to determine whether a local structural anomaly score indicates an abnormal state. For example, if the threshold is set to 0.25, then the local structural anomaly score of 0.216 in sub-region 1 is below the threshold and is considered normal. If the local structural anomaly score exceeds the threshold, it is considered an abnormal state, and the system will issue an alert and provide the location information of the abnormal sub-region so that maintenance personnel can conduct targeted inspections and repairs.

[0094] This multi-scale decomposition and adaptive weighted integration method can effectively capture the abnormal characteristics of structural responses at different scales, improve the accuracy and reliability of anomaly detection, and is of great significance for structural health monitoring.

[0095] In one optional implementation, a variational encoder is used to encode historical monitoring data to obtain the latent variable distribution of the normal structure. Combined with the local structural anomaly score, the structural deviation is calculated, including:

[0096] Variational coding is performed on historical monitoring data to obtain an initial feature vector; the structural characteristic matrix is ​​input into a characteristic mapping network to obtain a structural characteristic vector; the initial feature vector and the structural characteristic vector are weighted and combined to obtain a fused feature vector; the mean vector and variance vector are calculated to generate a latent variable distribution.

[0097] Latent variables are sampled from the latent variable distribution, and the latent variables are input into the decoding network to reconstruct historical monitoring data. The weighted combination value of reconstruction error and structural consistency loss is calculated, and the parameters of the variational encoder are optimized based on the weighted combination value. Based on the monitoring data of historical normal structures and the optimized variational encoder, a sample set of latent variables of normal structures is obtained, and the mean vector of the sample set of latent variables of normal structures is calculated.

[0098] After standardizing the current monitoring data, input it into the variational encoder to obtain the current state latent variable; calculate the Mahalanobis distance between the current state latent variable and the mean vector to obtain the overall deviation; and perform a weighted summation of the overall deviation and the local structural anomaly score to obtain the structural deviation.

[0099] This embodiment provides a method for calculating structural deviation based on a variational encoder. This method calculates the deviation of the current structural state by performing variational encoding on historical monitoring data and combining it with local structural anomaly scores.

[0100] This implementation performs variational encoding on historical monitoring data to obtain an initial feature vector. Specifically, an encoder structure containing a multi-layer neural network is used to map the historical monitoring data to a feature space. For example, for historical vibration data of a bridge structure, including measurements from 30 sensors at 1000 time points, the encoder network outputs a 512-dimensional initial feature vector. The encoder network adopts a three-layer fully connected layer structure, with 256, 384, and 512 neurons in each layer, respectively, and the ReLU activation function is used between each layer.

[0101] Simultaneously, the structural characteristic matrix is ​​input into the characteristic mapping network to obtain the structural characteristic vector. The structural characteristic matrix contains information such as the topological relationships and material properties of the structure. For example, for a bridge structure, a 30×30 matrix of relative distances between sensor positions can be used as the structural characteristic matrix. The characteristic mapping network adopts a graph convolutional network structure, outputting a 256-dimensional structural characteristic vector through two graph convolutional layers and one fully connected layer. The graph convolutional layers have 64 and 128 feature channels, respectively, and the fully connected layer outputs 256-dimensional features.

[0102] The initial feature vector and the structural characteristic vector are weighted and combined to obtain the fused feature vector. Specifically, the trainable weight parameter alpha is set to 0.7, and the fused feature vector is calculated as the initial feature vector multiplied by alpha plus the structural characteristic vector multiplied by (1-alpha). The mean vector and variance vector are calculated through two parallel fully connected layers to generate the latent variable distribution. Both the mean vector and the variance vector have a dimension of 128, and the weight parameters of the fully connected layers are optimized using the backpropagation algorithm.

[0103] Latent variables are obtained by sampling from the latent variable distribution. The sampling process uses a reparameterization technique, that is, sampling a random vector epsilon from the standard normal distribution, and calculating the latent variable as the mean vector plus the square root of the variance vector multiplied by epsilon. The dimension of the sampled latent variables is 128.

[0104] The latent variables are input into the decoding network to reconstruct historical monitoring data. The decoding network consists of three fully connected layers, with 256 and 384 neurons in each layer, respectively, and the dimensions of the original monitoring data (e.g., 30 sensors × 1000 time points). The ReLU activation function is used between each layer, and no activation function is used in the last layer.

[0105] Calculate the weighted combination value of reconstruction error and structural consistency loss. The reconstruction error is calculated using mean squared error, and the difference between the reconstructed data and the original monitoring data is calculated. Structural consistency loss reflects whether the reconstructed data retains the structural characteristics of the original data, and can be measured by calculating the difference between the structural characteristic matrices of the reconstructed data and the original data. Set the reconstruction error weight beta = 0.8 and the structural consistency loss weight (1-beta) = 0.2, and calculate the weighted combination value.

[0106] The variational encoder parameters are optimized based on a weighted combination. The Adam optimizer is used with a learning rate of 0.001, trained for 100 epochs, with 32 samples per epoch for batch training. The optimization objective is to minimize the weighted combination of reconstruction error and structural consistency loss, while also considering a KL divergence regularization term to approximate the latent variable distribution as a standard normal distribution.

[0107] Based on monitoring data of historical normal structures and an optimized variational encoder, a latent variable sample set for normal structures is obtained. Specifically, 1000 sets of monitoring data of historical normal structures are input into the optimized variational encoder to obtain 1000 latent variable samples of 128 dimensions, constituting the latent variable sample set for normal structures. The mean vector of these 1000 latent variable samples is calculated as a representative of the normal structure state.

[0108] The current monitoring data is standardized and then input into the variational encoder to obtain the current state latent variables. The standardization process uses z-variables with a mean of 0 and a standard deviation of 1.score Standardization method. The standardized data is input into the variational encoder to obtain 128-dimensional latent variables of the current state.

[0109] The overall deviation is obtained by calculating the Mahalanobis distance between the current state latent variables and the mean vector. The Mahalanobis distance calculation considers the covariance matrix of the normal structure latent variable sample set, thus taking into account the distribution differences and correlations of features across various dimensions. For a specific case, the calculated overall deviation value is 2.35.

[0110] The structural deviation is obtained by weighted summation of the overall deviation and the local structural anomaly score. The local structural anomaly score is calculated by analyzing anomalies in local sensor data. For example, the local structural anomaly score for a specific area of ​​a bridge is 0.78. With the overall deviation weight gamma = 0.6 and the local structural anomaly score weight (1-gamma) = 0.4, the final structural deviation is calculated to be 1.71.

[0111] Structural deviation can serve as a quantitative indicator of the degree of structural anomaly. When it exceeds a preset threshold of 2.0, the system will issue a structural anomaly alarm. In practical applications, a reasonable threshold can be set based on historical data analysis to balance detection sensitivity and false alarm rate.

[0112] In one optional implementation, latent variables are sampled from the latent variable distribution, and the latent variables are input into the decoding network to reconstruct historical monitoring data. A weighted combination value of the reconstruction error and structural consistency loss is calculated, and the parameters of the variational encoder are optimized based on the weighted combination value, including:

[0113] Generate a random vector that follows a standard normal distribution. Multiply the random vector element-wise with the square root of the variance vector of the latent variable distribution and add it to the mean vector to obtain latent variable samples. Backpropagation of gradients is achieved through the reparameterized form of the latent variable samples. Subtract the sample mean from the latent variable samples and divide by the sample standard deviation to obtain normalized latent variable samples.

[0114] The normalized latent variable samples are input into the decoding network to generate reconstructed data. The Euclidean distance between the historical monitoring data and the reconstructed data is calculated as the reconstruction error. Structural features are extracted from the historical monitoring data and the reconstructed data, and structural consistency loss is calculated based on the structural features.

[0115] The combined loss value is obtained by weighted summation of the reconstruction error and the structural consistency loss; the gradient of the combined loss value with respect to the variational encoder parameters is calculated, and the product of the gradient and the learning rate is subtracted from the current variational encoder parameters to obtain the updated network parameters.

[0116] In a specific embodiment of the present invention, the optimization process of the variational encoder involves sampling latent variables from the latent variable distribution, reconstructing historical monitoring data through a decoding network, calculating a weighted combination of reconstruction error and structural consistency loss, thereby optimizing the parameters of the variational encoder.

[0117] A variational encoder consists of two main components: an encoding network and a decoding network. The encoding network maps the input historical monitoring data into parameters of the latent variable distribution, including the mean vector and the variance vector. For example, for a set of sensor historical monitoring data containing 96 time points, the encoding network can map it into distribution parameters in a 32-dimensional latent variable space, namely a 32-dimensional mean vector and a 32-dimensional variance vector.

[0118] The process of sampling latent variables from their distribution involves generating a random vector that follows a standard normal distribution, with the same dimension as the latent variables. For example, for a 32-dimensional latent variable space, a 32-dimensional random vector is generated, where each element follows a normal distribution with a mean of 0 and a variance of 1. This random vector is then multiplied element-wise with the square root of the variance vector of the latent variable distribution, and the result is added to the mean vector to obtain the latent variable sample. This reparameterization technique makes the sampling operation differentiable, thus supporting the optimization of network parameters through backpropagation.

[0119] To enhance the representational power of latent variables and stabilize the training process, latent variable samples are normalized. Specifically, the mean and standard deviation of the latent variable samples are calculated, and the sample mean is subtracted from the sample mean, then divided by the sample standard deviation to obtain normalized latent variable samples. Normalization helps control the range of latent variable distribution and prevents gradient explosion or vanishing problems during network training.

[0120] The normalized latent variable samples are input into the decoding network to generate reconstructed data. The decoding network typically consists of multi-layer neural networks, which progressively map the latent variables back to reconstructed data with the same dimensions as the original historical monitoring data. For example, 32-dimensional normalized latent variable samples can be recovered into time series data with 96 time points through the decoding network.

[0121] The reconstruction error is calculated using Euclidean distance. Specifically, it is the square root of the sum of the squares of the differences between corresponding elements in the historical monitoring data and the reconstructed data. For example, for 96-dimensional historical monitoring data and reconstructed data, denoted as X and X' respectively, the reconstruction error can be expressed as the Euclidean distance between X and X'. In practical applications, when the historical monitoring data consists of temperature sensor readings every 15 minutes over 24 hours, the original data is [22.5, 22.7, 23.0, ..., 21.8], while the reconstructed data is [22.3, 22.8, 22.9, ..., 21.6]. The Euclidean distance between the two can quantify the accuracy of the reconstruction.

[0122] The structural consistency loss is calculated based on structural features extracted from historical monitoring data and reconstructed data. Structural features can include trends, periodic patterns, peak locations, etc., in the time series. Methods for extracting structural features include using sliding windows to calculate local statistics such as mean, variance, and slope. Frequency domain features can also be extracted using signal processing techniques such as Discrete Fourier Transform or Wavelet Transform. The structural consistency loss measures the similarity between the original and reconstructed data on these structural features, and can use cosine similarity, correlation coefficient, or other similarity measures. For example, for temperature sensor data, the hourly temperature change rate can be extracted as a structural feature, and the similarity between the temperature change rate sequences of the original and reconstructed data can be calculated.

[0123] The combined loss is calculated by weighting and summing the reconstruction error and structural consistency loss. The weighting coefficients control the relative importance of the two losses during the optimization process. For example, the weight of the reconstruction error can be set to 0.7, and the weight of the structural consistency loss to 0.3, allowing the network to better preserve the structural features of the data while maintaining reconstruction accuracy.

[0124] The network parameters are updated based on the gradient descent optimization algorithm. Specifically, the gradient of the combined loss value with respect to the variational encoder parameters is calculated, and the product of the gradient and the learning rate is subtracted from the current parameters to obtain the updated network parameters. In practice, the learning rate can be set to 0.001, and an adaptive learning rate optimizer such as the Adam optimizer is used for parameter updates. As the number of training epochs increases, the loss value gradually decreases, and the network parameters gradually converge to a state that can effectively encode and reconstruct historical monitoring data.

[0125] Through the variational encoder optimization process described above, a latent representation of historical monitoring data can be learned. This representation can not only accurately reconstruct the original data but also preserve its important structural features. This optimization method has wide applications in anomaly detection, data compression, and generative models, and is particularly suitable for processing monitoring data with rich temporal dynamic characteristics.

[0126] This invention provides an IoT-based real-time monitoring and early warning system for building facilities, comprising:

[0127] The first unit is used to deploy multiple sensors at preset monitoring locations on the building structure to obtain real-time monitoring data of the building structure.

[0128] The second unit is used to perform sliding analysis and wavelet decomposition on the real-time monitoring data to obtain the multifractal spectrum and fractal dimension, and generate structural feature vectors by combining the mean and standard deviation; input the structural feature vectors into the self-attention network to calculate the spatial correlation weights between different sensors, and cluster the sensor nodes into multiple monitoring sub-regions according to the spatial correlation weights.

[0129] The third unit is used to perform multi-scale decomposition on the structural feature vector of each monitoring sub-region, calculate the anomaly score of the structural response at different scale levels, and adaptively weight and integrate the anomaly scores at each level to obtain the local structural anomaly score; use a variational encoder to encode the historical monitoring data to obtain the latent variable distribution of the normal structure, and combine the local structural anomaly score to calculate the structural deviation.

[0130] The fourth unit is used to generate early warning information including the location and extent of damage when the structural deviation exceeds the damage early warning threshold for multiple consecutive monitoring cycles, and to send the early warning information to the mobile terminal of the management personnel.

[0131] A third aspect of the present invention provides an electronic device, comprising:

[0132] processor;

[0133] Memory used to store processor-executable instructions;

[0134] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0135] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0136] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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 or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for real-time monitoring and early warning of building facilities based on the Internet of Things, characterized in that, include: Multiple sensors are deployed at preset monitoring locations on the building structure to obtain real-time monitoring data of the building structure. The real-time monitoring data is subjected to sliding analysis and wavelet decomposition to obtain multifractal spectrum and fractal dimension. The mean and standard deviation are combined to generate structural feature vectors. The structural feature vectors are input into a self-attention network to calculate the spatial correlation weights between different sensors. Based on the spatial correlation weights, the sensor nodes are clustered into multiple monitoring sub-regions. Multi-scale decomposition is performed on the structural feature vector within each monitoring sub-region. Anomaly scores of the structural response are calculated at different scale levels. These anomaly scores are then adaptively weighted and integrated to obtain the local structural anomaly score, including: For each monitoring sub-region, the wavelet function is deformed using adaptive scaling and translation parameters to obtain adaptive wavelet basis functions at different decomposition levels; the structural feature vector is convolved with the adaptive wavelet basis functions to obtain wavelet coefficients at different decomposition levels. Calculate the mean of wavelet coefficients at each decomposition level. For wavelet coefficients whose absolute value is greater than the mean, retain the value of the excess part and keep the original sign. For wavelet coefficients whose absolute value is less than the mean, set them to zero. The processed wavelet coefficients are obtained, and their mean, standard deviation, skewness and kurtosis are calculated as the feature representation of the current level. Based on the feature representation of normal structure, multiple Gaussian distribution mixture models are trained as a dynamic baseline. The log-likelihood ratio of the feature representation of the current level to the dynamic baseline is calculated as the anomaly score of the current level. The information gain of the feature representation of each level for anomaly detection is calculated. The information gain is multiplied by the anomaly score of the corresponding level and summed to obtain the local structural anomaly score of the current monitored sub-region. The historical monitoring data is encoded using a variational encoder to obtain the latent variable distribution of normal structure. Combined with the local structural anomaly score, the structural deviation is calculated. When the structural deviation exceeds the damage warning threshold for multiple consecutive monitoring cycles, a warning message including the location and extent of damage is generated and sent to the mobile terminal of the management personnel.

2. The method according to claim 1, characterized in that, The real-time monitoring data is subjected to sliding analysis and wavelet decomposition to obtain the multifractal spectrum and fractal dimension. A structural feature vector is generated by combining the mean and standard deviation, including: The real-time monitoring data is subjected to sliding analysis with multiple data points as sub-window lengths. The limit of the logarithmic ratio of adjacent data points within each sub-window and the logarithmic ratio of the time increment is calculated to obtain a local singularity index sequence. The ratio of the number of time points with the same index value in the local singularity index sequence to the total number of time points is calculated to obtain a multifractal spectrum. Wavelet decomposition is performed on the real-time monitoring data to obtain decomposition coefficients for different frequency bands; the ratio of decomposition coefficients of adjacent frequency bands is calculated, and when the ratio is less than the energy threshold, the decomposition coefficients of the two frequency bands are merged to obtain optimized decomposition coefficients; the optimized decomposition coefficients are divided into grids, the number of grids required to cover the optimized decomposition coefficients is counted, and the limit of the ratio of the logarithm of the number of grids to the inverse logarithm of the grid size is used as the fractal dimension; The mean, standard deviation, multifractal spectrum, and fractal dimension of the real-time monitoring data are combined to form a feature vector; the time standard deviation of the feature vector over multiple consecutive monitoring periods is calculated, and the negative exponential form of the time standard deviation is divided by the sum of the negative exponents of all feature standard deviations to obtain the feature weight; the feature weight is multiplied by the corresponding feature vector components and superimposed to obtain the structural feature vector.

3. The method according to claim 1, characterized in that, The structural feature vector is input into a self-attention network to calculate the spatial correlation weights between different sensors. Based on these spatial correlation weights, the sensor nodes are clustered into multiple monitoring sub-regions, including: The structural feature vectors of multiple sensors are used to construct a feature matrix, and the feature matrix is ​​then subjected to a linear transformation to obtain a query matrix, a key matrix, and a value matrix. In multiple parallel attention heads, the product of the query matrix and the key matrix is ​​calculated respectively. The product is divided by the square root of the scaling factor, processed by the normalization function, and then multiplied by the value matrix to obtain multiple spatial association weight matrices. The spatial correlation weight matrix is ​​concatenated along the feature dimension and transformed by the projection matrix to obtain the fused feature matrix; the inner product of any two feature vectors in the fused feature matrix is ​​calculated, and the inner product is divided by the temperature parameter and then processed by the exponential function and normalization to obtain the relative correlation strength between sensor nodes. When the relative correlation strength between two sensor nodes is greater than the similarity threshold, the two sensor nodes are assigned to the same monitoring sub-region, resulting in multiple monitoring sub-regions.

4. The method according to claim 1, characterized in that, Historical monitoring data is encoded using a variational encoder to obtain the latent variable distribution of normal structures. Combined with the local structural anomaly scores, the structural deviation is calculated, including: Variational coding is performed on historical monitoring data to obtain an initial feature vector; the structural characteristic matrix is ​​input into a characteristic mapping network to obtain a structural characteristic vector; the initial feature vector and the structural characteristic vector are weighted and combined to obtain a fused feature vector; the mean vector and variance vector are calculated to generate a latent variable distribution. Latent variables are sampled from the latent variable distribution, and the latent variables are input into the decoding network to reconstruct historical monitoring data. The weighted combination value of reconstruction error and structural consistency loss is calculated, and the parameters of the variational encoder are optimized based on the weighted combination value. Based on the monitoring data of historical normal structures and the optimized variational encoder, a sample set of latent variables of normal structures is obtained, and the mean vector of the sample set of latent variables of normal structures is calculated. After standardizing the current monitoring data, input it into the variational encoder to obtain the current state latent variable; calculate the Mahalanobis distance between the current state latent variable and the mean vector to obtain the overall deviation; and perform a weighted summation of the overall deviation and the local structural anomaly score to obtain the structural deviation.

5. The method according to claim 4, characterized in that, Latent variables are sampled from the latent variable distribution, and these latent variables are input into the decoding network to reconstruct historical monitoring data. A weighted combination of reconstruction error and structural consistency loss is calculated, and the parameters of the variational encoder are optimized based on this weighted combination, including: Generate a random vector that follows a standard normal distribution. Multiply the random vector element-wise with the square root of the variance vector of the latent variable distribution and add it to the mean vector to obtain latent variable samples. Backpropagation of gradients is achieved through the reparameterized form of the latent variable samples. Subtract the sample mean from the latent variable samples and divide by the sample standard deviation to obtain normalized latent variable samples. The normalized latent variable samples are input into the decoding network to generate reconstructed data. The Euclidean distance between the historical monitoring data and the reconstructed data is calculated as the reconstruction error. Structural features are extracted from the historical monitoring data and the reconstructed data, and structural consistency loss is calculated based on the structural features. The combined loss value is obtained by weighted summation of the reconstruction error and the structural consistency loss; the gradient of the combined loss value with respect to the variational encoder parameters is calculated, and the product of the gradient and the learning rate is subtracted from the current variational encoder parameters to obtain the updated network parameters.

6. A real-time monitoring and early warning system for building facilities based on the Internet of Things, used to implement the method as described in any one of claims 1-5, characterized in that, include: The first unit is used to deploy multiple sensors at preset monitoring locations on the building structure to obtain real-time monitoring data of the building structure. The second unit is used to perform sliding analysis and wavelet decomposition on the real-time monitoring data to obtain the multifractal spectrum and fractal dimension, and generate structural feature vectors by combining the mean and standard deviation; input the structural feature vectors into the self-attention network to calculate the spatial correlation weights between different sensors, and cluster the sensor nodes into multiple monitoring sub-regions according to the spatial correlation weights. The third unit is used to perform multi-scale decomposition on the structural feature vector of each monitoring sub-region, calculate the anomaly score of the structural response at different scale levels, and adaptively weight and integrate the anomaly scores at each level to obtain the local structural anomaly score; use a variational encoder to encode the historical monitoring data to obtain the latent variable distribution of the normal structure, and combine the local structural anomaly score to calculate the structural deviation. The fourth unit is used to generate early warning information including the location and extent of damage when the structural deviation exceeds the damage early warning threshold for multiple consecutive monitoring cycles, and to send the early warning information to the mobile terminal of the management personnel.

7. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Thermal power equipment real-time monitoring method and system based on edge calculation

    CN120217127A

  • Building construction quality real-time monitoring method and system based on sensor network

    CN121145058A