Ancient building damage prediction method, model, equipment, medium and program
By collecting structural spectral data and environmental data of ancient buildings using a non-contact spectrometer and combining it with a deep learning model to fuse multi-source data, the problem of secondary damage in the process of predicting damage to ancient buildings was solved, and highly accurate damage identification was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies are prone to causing secondary damage during the prediction of damage to ancient buildings, especially by deploying contact sensors that can damage critical parts of the buildings.
Non-contact Raman and infrared spectrometers were used to collect structural spectral data. Combined with historical archives of ancient buildings and environmental sensor data, multi-source data fusion and preprocessing were performed using a deep learning model to identify the damage level of ancient buildings.
It enables accurate identification of damage levels without contact with the surface of ancient building components, avoiding secondary damage, improving the accuracy and applicability of damage identification, and adapting to various types of ancient buildings.
Smart Images

Figure CN121808562A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of building damage prediction, and more specifically, it relates to a method, model, equipment, medium and program for predicting damage to ancient buildings. Background Technology
[0002] Ancient buildings are important cultural heritage, and their protection and restoration are of great significance. Due to the structural complexity of ancient buildings and the diversity of their long-term exposure to the natural environment, existing technologies have significant limitations in damage prediction.
[0003] Chinese patent CN119624136A discloses a risk prediction and control system for ancient buildings based on a large model, including: a multi-source data acquisition module, a multi-modal data fusion module, a large-model risk prediction module, a risk assessment and early warning module, a digital twin dynamic control module, and a repair decision module. This system achieves comprehensive perception of the state of ancient buildings by fusing structural state data, visual image data, and environmental data. By combining a self-supervised learning pre-trained ViT-GPT model with an LSTM time series model, it significantly improves the time-series analysis capability and multi-modal data processing capability for risk prediction, enabling accurate prediction of future damage probability and risk trends of ancient buildings.
[0004] Structural status data refers to the real-time acquisition of vibration, stress, temperature and humidity, and crack displacement data by deploying MEMS accelerometers, strain gauges, temperature and humidity sensors, and laser rangefinders at key locations of ancient buildings. Key locations include beams, columns, walls, foundations, and marked areas. However, deploying MEMS accelerometers and strain gauges requires drilling, pasting, or embedding into components, which can damage the original structural integrity (especially affecting fragile components such as timber and adobe structures), and easily cause secondary damage to key parts of ancient buildings. Therefore, a non-contact method for predicting damage to ancient buildings is needed. Summary of the Invention
[0005] The purpose of this application is to provide a method, model, device, medium and program for predicting damage to ancient buildings, so as to solve the technical problem that the process of predicting damage to ancient buildings may cause secondary damage in the related technology.
[0006] To achieve the above objectives, the technical solution adopted in the embodiments of this application is as follows: Firstly, this application provides a method for predicting damage to ancient buildings, the method comprising the following steps: S100: Acquire multi-source time-series data of key components of ancient buildings; the multi-source time-series data includes at least structural spectral data, structural attribute data, and environmental data; the structural spectral data includes Raman spectral data and infrared spectral data. S200: Preprocess the multi-source time-series data; S300: Features are extracted from the Raman spectral data using a 3×3 convolution layer, and features are extracted from the infrared spectral data using a multi-scale convolution layer, and the spectral features are obtained by adaptive pooling to unify the length. The structural attribute data and the environmental data are transformed into low-dimensional features that match the spectral feature dimensions through a two-layer fully connected network; The spectral features are concatenated with the low-dimensional features, the number of channels is unified by a 1×1 convolution, key features are filtered by a gating module, and a global feature vector Y1 is output. S400: Input the global feature vector Y1 into a three-layer fully connected network and output the original output vector Y2 of the current damage level; S500: Calculate the confidence level of each level of building damage using the Softmax function below; , in, Let be the probability of damage level i, where i is a natural number from 0 to 9, and j is the traversal index of the damage level, taking the maximum value. The corresponding damage level is used as the current damage level.
[0007] Secondly, this application provides a virtual natural environment construction device, comprising: The data acquisition module is used to acquire multi-source time-series data of key components of ancient buildings; the multi-source time-series data includes at least structural spectral data, structural attribute data, and environmental data; the structural spectral data includes Raman spectral data and infrared spectral data. The data preprocessing module is used to preprocess the multi-source time-series data; The data fusion module is used to extract features from the Raman spectral data using a 3×3 convolution layer, and to extract features from the infrared spectral data using a multi-scale convolution layer, and to obtain spectral features by uniform length through adaptive pooling; it is used to transform the structural attribute data and the environmental data into low-dimensional features that match the dimensions of the spectral features through a 2-layer fully connected network; and it is used to concatenate the spectral features with the low-dimensional features, unify the number of channels through a 1×1 convolution, filter key features through a gating module, and output a global feature vector Y1. The damage identification module inputs the global feature vector Y1 into a three-layer fully connected network and outputs the original output vector Y2 of the current damage level. The results output module is used to calculate the confidence levels of each level of building damage using the Softmax function below; , in, Let be the probability of damage level i, where i is a natural number from 0 to 9, and j is the traversal index of the damage level, taking the maximum value. The corresponding damage level is used as the current damage level.
[0008] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described methods for predicting damage to ancient buildings.
[0009] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the above-described methods for predicting damage to ancient buildings.
[0010] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps in any of the above-described methods for predicting damage to ancient buildings.
[0011] The ancient building damage prediction method, model, equipment, medium, and program provided in this application have at least the following beneficial effects: Structural spectral data are collected using Raman and infrared spectrometers without contact with the surface of ancient building components; the Raman spectrometer captures chemical changes in the internal materials of components through long-distance laser scanning to obtain Raman spectral data; the infrared spectrometer obtains physical structural changes such as thermal radiation characteristics (e.g., temperature differences in hollow areas, abnormal heat conduction caused by cracks) of the component structure through infrared scanning, acquiring infrared spectral data; structural attribute data is obtained by calling existing data such as historical archives of ancient buildings (e.g., material type, construction date, dimensional parameters) and repair records; and through… Environmental sensors (temperature, humidity, light, precipitation) are deployed around ancient buildings, or local meteorological data is collected to obtain environmental data. Multi-source time-series data is preprocessed to reduce noise. Features are extracted from Raman and infrared spectral data and their lengths are standardized to obtain spectral features. Structural attribute data and environmental data are transformed into low-dimensional features through a two-layer fully connected network. These low-dimensional features and spectral features are then fused into a unified global feature vector Y1. The global feature vector Y1 is input into a three-layer fully connected network, mapping it to the original output vector Y2 representing the damage level. The Softmax function transforms the original output vector Y2 into probabilities between 0 and 1, and the most reliable level is selected as the current damage level. This scheme comprehensively characterizes the component state using multi-source data, extracts damage features using a deep learning model, and determines the damage level using a probabilistic method. The acquisition of structural spectral data does not require the deployment of contact sensors, perfectly aligning with the "minimal intervention" principle for ancient buildings. Structural spectral data captures microscopic damage, structural attribute data captures damage sensitivity, and environmental data captures external drivers, avoiding the limitations of single-data sources. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or exemplary technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating the ancient building damage prediction method provided in this application embodiment; Figure 2 A framework diagram of a deep learning network for processing Raman spectroscopy data; Figure 3 A framework diagram of a multi-scale convolutional network for infrared spectral data processing; Figure 4 This is the network framework diagram for the gating module; Figure 5 This is a schematic diagram of a three-layer fully connected network. Figure 6 This is a schematic diagram of the structure of the ancient building damage prediction model provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0014] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.
[0015] It should be noted that when a component is referred to as being "fixed to" or "set on" another component, it can be directly on or indirectly on that other component. When a component is referred to as being "connected to" another component, it can be directly connected to or indirectly connected to that other component.
[0016] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise expressly specified. "Several" means one or more, unless otherwise expressly specified.
[0017] Throughout this specification, reference to "an embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment is included in at least one embodiment of this application. Therefore, the phrase "in one embodiment" or "in some embodiments" appears in various places throughout the specification, and not all references are to the same embodiment. Furthermore, in one or more embodiments, particular features, structures, or characteristics may be combined in any suitable manner.
[0018] Example 1
[0019] Please see Figure 1 The method for predicting damage to ancient buildings provided in this application will now be described. This method includes the following steps: S100: Acquire multi-source time-series data of key components of ancient buildings. This multi-source time-series data includes at least structural spectral data, structural attribute data, and environmental data. Structural spectral data includes Raman spectral data and infrared spectral data. The structural spectral data is acquired non-contactly, avoiding secondary damage. The entire process requires no drilling, sensor attachment, or sampling, perfectly aligning with the principle of "minimal intervention" in the protection of ancient buildings, and is particularly suitable for fragile components such as wooden brackets and adobe walls. Structural spectral data is used to capture "microscopic damage characteristics" (chemical / physical changes), structural attribute data provides "damage sensitivity benchmarks" (material / size differences), and environmental data reflects meteorological driving factors of damage (temperature, humidity / precipitation effects). These three data sources complement each other, avoiding the limitations of a single source.
[0020] Specifically, key components refer to load-bearing beams, load-bearing columns, or load-bearing walls of a building.
[0021] Specifically, structural spectral data are acquired using a non-contact spectrometer, with the detection distance controlled between 5 and 50 cm to avoid contact with the component surface. For example, a Raman spectrometer is used with a wavelength of 785 nm for wooden structures (pine) and a wavelength of 532 nm for brick and stone components, with a spectral wavenumber range of 200–2000 cm⁻¹. -1 The infrared spectrometer acquires wavenumbers ranging from 400 to 4000 cm⁻¹. -1 .
[0022] Specifically, structural attribute data is obtained from historical archives and repair records of ancient buildings, including numerical characteristics (component dimensions, service life, initial damage quantification) and categorical characteristics (material, component type, historical repair records). Environmental data is collected through environmental sensors such as temperature and humidity sensors, precipitation sensors, and light sensors deployed around the ancient buildings, or by retrieving local meteorological data.
[0023] S200: Preprocesses multi-source time-series data to reduce noise and clean up the data.
[0024] S300: It fuses multi-source time-series data into a global feature vector Y1, deeply integrating the "microscopic damage details" of spectral features with the "macroscopic influencing factors" of structural and environmental features, thus solving the problem that a single data source cannot fully characterize damage.
[0025] Step S300 specifically includes the following steps: S310: Combination Figure 2 To extract features from Raman spectral data, a 3×3 convolutional layer with 96 input / output channels per layer, a stride of 1, and the same padding method was used to deeply capture chemical damage information (such as cellulose degradation and mineral structure destruction) corresponding to sharp feature peaks. Figure 3 Multi-scale convolution is used to extract features from infrared spectral data, for example, convolution kernel sizes {1, 3, 5, 7}, with 32 convolution kernels per layer, covering structural damage features of different sizes (such as microcracks and large-area voids). Features extracted from Raman spectral data and infrared spectral data are uniformly lengthed using adaptive pooling to obtain spectral features, such as a feature length uniformized to 256 dimensions.
[0026] S320: The structural attribute data and environmental data are processed through a two-layer fully connected network, for example, 64 neurons in the first layer and 256 neurons in the second layer, with the activation function GELU, to transform them into low-dimensional features that match the spectral feature dimension. This compresses the high-dimensional heterogeneous structural attribute data and environmental data into 256-dimensional low-dimensional features that match the 256-dimensional spectral feature dimension.
[0027] S330: The spectral features are concatenated with the low-dimensional features, the number of channels is unified by 1×1 convolution, key features are selected by the gating module, and the global feature vector Y1 is output.
[0028] Specifically, the 256-dimensional spectral features are concatenated with the 256-dimensional low-dimensional features to form a 512-dimensional original fused feature. The 512-dimensional features are then compressed into a 128-dimensional feature vector X through 1×1 convolution (128 convolution kernels), which strengthens the feature correlation, reduces the computational burden of the model, and avoids overfitting caused by the curse of dimensionality.
[0029] Specifically, in combination Figure 4 The gating module uses formula Y gated =Conv(X,W)⊙σ(Conv(X,W g Key features are selected, where X is the feature vector concatenated with spectral features and low-dimensional features, W is the feature extraction convolution kernel weight matrix, Wg is the gate weight matrix, W / Wg is the 1×1 convolution kernel weight, Conv is the convolution operation; σ is the Sigmoid activation function, which suppresses noise features (such as invalid spectral peaks caused by environmental interference) and retains core features that are strongly correlated with damage; ⊙ is the element-wise multiplication operation.
[0030] The gating module reduces the weight of invalid features and significantly improves the identification of core damage features (such as infrared thermal radiation anomalies corresponding to cracks and Raman feature peak changes corresponding to decay). It compresses high-dimensional heterogeneous data into a 128-dimensional unified feature vector and finally generates a 128-dimensional global feature vector Y1, which contains comprehensive information on microscopic chemical damage, macroscopic structural properties, and external environmental influences.
[0031] S400: Combined Figure 5 The global feature vector Y1 is input into a three-layer fully connected network, which outputs the original output vector Y2 representing the current damage level. Through the nonlinear transformation of the three-layer fully connected network, the 128-dimensional global features are transformed into the original output of a 10-level damage, with a feature-to-damage-level mapping accuracy of over 90%.
[0032] In one embodiment, the first layer of the three-layer fully connected network increases the dimensionality from 128 to 256 and applies the GELU activation function to amplify the differences in core features (such as distinguishing between features of mild and moderate damage); the second layer reduces the dimensionality from 256 to 128 and applies the GELU activation function to compress redundant information and strengthen the expression of key features; the third layer reduces the dimensionality from 128 to 10 and has no activation function, retaining the original output score (which can be positive or negative). The optimizer for the three-layer fully connected network is Adam, with an initial learning rate of 1e-4 and a weight decay coefficient of 1e-5, balancing the model's convergence speed and generalization ability. Multi-source time-series data are divided into training, validation, and test sets in a 7:2:1 ratio, and an early stopping strategy is adopted (stopping if the validation set loss does not decrease for 5 consecutive rounds) to avoid overfitting.
[0033] S500: Calculate the confidence level of each level of building damage using the Softmax function below; ,
[0034] in, Let be the probability of damage level i, where i is a natural number from 0 to 9, and j is the traversal index of the damage level.
[0035] The Softmax function transforms unrestricted raw scores into probabilities between 0 and 1 (the sum of the probabilities of all levels is 1), and takes the maximum of these probabilities. The corresponding damage level is used as the current damage level, and the probability distribution of each level is output. For example, Pi=0.92 corresponds to level 3 damage, indicating that the level has extremely high credibility.
[0036] Specifically, the damage level is determined based on crack width or decay rate, which are obtained by inversion from the original output vector Y2. Damage level quantification standard: Level 0 (No damage): Pi is the maximum and the component has no cracks / decay, and the spectral characteristics are normal; Levels 1-3 (minor damage): Crack width < 0.5 mm or decay rate 3%-10%, corresponding to the highest probability; Levels 4-6 (moderate damage): Crack width 0.5-2mm or decay rate 10%-30%, corresponding to the highest probability; Levels 7-9 (severe damage): Crack width > 2mm or decay rate > 30%, corresponding to the highest probability; Crack width and decay rate are obtained through structural spectral data inversion, without the need for manual measurement.
[0037] This method involves no physical intervention from data acquisition to result output, completely solving the problem of secondary damage caused by traditional contact monitoring, and is applicable to all types of ancient building components. The deep fusion of multi-source data improves the accuracy of damage identification and reduces prediction error compared to a single data source. The standardized implementation process, quantified grading standards, and efficient model calculations support the routine monitoring and preventive protection of large-scale ancient building complexes.
[0038] In one embodiment, as a specific implementation of the ancient building damage prediction method provided in this application, step S200 includes at least one of the following steps: S211: Numerical features of structural attribute data are processed using Min-Max standardization, normalizing the data to the [0,1] interval, thereby eliminating differences in dimensions and ranges and ensuring the fairness of feature fusion. Subsequent crack widths or decay rates are based on a unified benchmark, ensuring the fairness of loss levels. Damage prediction for ancient buildings needs to be geared towards engineering practice. First, the dimensions and service life of key components vary greatly among different ancient buildings. Standardized data eliminates the distribution offset caused by individual building differences, allowing the model to directly adapt to different types and ages of ancient buildings without needing to readjust the data format for a single building. Second, the weight coefficients of each feature after standardization can be directly compared, clearly identifying which structural attributes have a greater impact on damage evolution (e.g., a higher weight for the initial damage quantification value indicates that the initial damage is a more critical predictive factor), providing a "factor priority" reference for the protection of ancient buildings.
[0039] Specifically, for component dimensions, the unit is "meter," and the value range is usually 0.5~5m (e.g., column diameter 0.8m, beam length 4m); for service life, the unit is "year," and the value range is usually 50~500 years (e.g., the service life of Ming and Qing dynasty ancient buildings is 200~300 years); for initial damage quantification value, the unit is "percentage," and the value range is 0~10% (e.g., initial decay rate 3%, initial crack ratio 5%).
[0040] Without standardization, features with large numerical ranges (such as a usage period of 500 years) will dominate the feature space, while key features with small numerical ranges (such as an initial damage quantification value of 3%) will be submerged. After standardization, all numerical features are uniformly mapped to the [0,1] interval (e.g., 500 years is dimensionless to 1, 3% is dimensionless to 0.3). All features are on the same order of magnitude at the numerical level, ensuring that the model can fairly capture the correlation between each feature and the damage, and avoiding feature fusion distortion caused by dimensional bias.
[0041] In one embodiment, as a specific implementation of the ancient building damage prediction method provided in this application, step S200 includes at least one of the following steps: S212: One-hot encoding is performed on categorical features in structural attribute data, with the encoding dimension matching the number of categories. For example, if the component material is pine, brick, or adobe, the key components are load-bearing beams, columns, or walls, and the historical maintenance type is no maintenance, partial repair, or complete renovation, one-hot encoding is performed (encoding dimension = number of categories). Category to numerical value conversion is achieved through "binary vector mapping." For example, the one-hot encoding of component material is: pine → [1,0,0], brick → [0,1,0], adobe → [0,0,1], encoding dimension = 3 (matching the number of categories), converting non-numerical categories into numerical vectors that can be processed by the deep learning model. The modulus of each category vector is consistent (e.g., the modulus of [1,0,0] and [0,1,0] is both 1), ensuring the model learns the damage correlation patterns fairly for each category, avoiding model misjudgments caused by the encoding method.
[0042] Among them, the "one-bit effective" characteristic of one-hot encoding (each vector has only one dimension with 1, and the rest with 0) allows the model to clearly distinguish the unique damage patterns of different categories, especially suitable for the "strong differentiation" characteristics of ancient building categories. For example, the core damage of a load-bearing column ([1,0,0]) is column root decay, the core damage of a load-bearing beam ([0,1,0]) is mid-span crack, and the core damage of a load-bearing wall ([0,0,1]) is hollowing. When the model learns through a fully connected network, the vector dimension corresponding to each category will form a unique "damage feature weight" (e.g., the encoding dimension of a load-bearing column has a high weight, corresponding to the spectral features related to decay), which strengthens the association modeling of "category → damage type", making feature extraction (S320) more accurate, and ultimately improving the accuracy of damage level prediction.
[0043] Environmental data is collected from the surrounding environment of ancient buildings, inevitably subject to high-frequency noise interference, while the effective information is mostly low-frequency signals with long-term trends. High-frequency noise includes sudden interference (such as instantaneous data jumps in sensors caused by heavy rain and strong winds, and abnormal values from bird strikes), electronic noise (interference from the sensor's own circuitry, and random fluctuations in data transmission), and short-term disturbances (such as sudden changes in light intensity caused by temporary shading, and local temperature and humidity fluctuations caused by human activity). Effective low-frequency signals have long-term trends (such as seasonal temperature and humidity changes, and annual precipitation changes) and periodic patterns (such as the alternation of day and night temperature and humidity, and the precipitation cycle of rainy / dry seasons). These are the core environmental factors driving the damage and evolution of ancient buildings. For example, long-term high humidity can lead to the decay of wooden structures, and seasonal temperature fluctuations can lead to cracks in bricks and stones.
[0044] In one embodiment, as a specific implementation of the ancient building damage prediction method provided in this application, step S200 includes at least one of the following steps: S221: Environmental data is denoised using a 3-level wavelet transform based on the db3 wavelet basis, while retaining low-frequency coefficients and reconstructing the data.
[0045] The three-layer wavelet transform decomposes the data into one low-frequency coefficient (approximation coefficient) and three high-frequency coefficients (detail coefficients). The high-frequency coefficients correspond to various types of noise, while the low-frequency coefficients correspond to the effective trend. By retaining the low-frequency coefficients to reconstruct the data, more than 90% of high-frequency noise (such as sudden humidity changes caused by heavy rain and sensor electronic noise) can be directly removed, increasing the signal-to-noise ratio of environmental data from 50%~60% before preprocessing to over 90%, thus ensuring data quality from the source. The wavelet transform only removes high-frequency noise without changing the shape and amplitude of the low-frequency trend, ensuring that the model can learn the true correlation between "environment and damage".
[0046] Sensors used for environmental monitoring of ancient buildings are mostly deployed outdoors and face complex interference (such as extreme weather, human contact, and electromagnetic interference). The db3 wavelet base performs better than other wavelet bases (such as db1 and sym4) in processing non-stationary time-series data (such as sudden changes in temperature and humidity caused by heavy rain or cold waves). It can adapt to the monitoring of ancient buildings under different geographical and climatic conditions (such as high humidity data in rainy areas in the south and drastic temperature and humidity fluctuation data in arid areas in the north). The computational complexity of the 3-level decomposition is moderate (far lower than that of decomposition above 5 levels), and the noise reduction processing time for a single frame of environmental data is ≤10ms. It supports real-time monitoring of large-scale ancient building complexes (such as processing environmental data from 100 monitoring points simultaneously).
[0047] In one embodiment, as a specific implementation of the ancient building damage prediction method provided in this application, step S200 includes at least one of the following steps: S222: Z-score standardization is applied to environmental data to eliminate dimensional differences. Z-score standardization transforms all environmental indicators into a standard normal distribution, with values concentrated in the range of [-2,2]. All environmental indicators are unified into dimensionless standard scores, and the numerical range is reduced to the same order of magnitude. This ensures that the model can fairly learn the correlation between each indicator and damage during feature fusion, avoiding fusion distortion caused by "dimensional bias" (such as the influence of temperature and humidity no longer being masked by large values of light intensity).
[0048] The temporal trends of environmental data (seasonal changes, day-night cycles, rainy season cycles) are the core driving factors of damage evolution. Standardized data can be directly used for subsequent extended temporal prediction modules (such as LSTM) to capture the correlation between "environmental cumulative effects and damage evolution" (e.g., if the humidity Z-score is greater than 1.0 for three consecutive months, the decay level of the wood structure will increase by 1 level).
[0049] In addition, the baseline of environmental data varies greatly in different regions (e.g., the average humidity in the south is 70%RH, while in the north it is 40%RH). Z-score standardizes environmental data from different regions by using the mean and standard deviation of local data, which can map environmental data from different regions to a unified standard distribution, so that the model does not need to readjust parameters for a single region. Z-score=1 indicates that the data point is 1 standard deviation above the mean (belonging to the "high / low" state), and Z-score=2 indicates that it is 2 standard deviations above the mean (belonging to the "significantly high / low" state). If the model shows "humidity Z-score > 1.5", the predicted probability of wood decay increases by 30%, which can be directly interpreted as "when the environmental humidity is significantly higher than the local average, the risk of decay of pine load-bearing columns increases significantly", providing a clear basis for protection decisions (such as prioritizing the deployment of dehumidification equipment in areas where Z-score frequently > 1.5). Compared with Min-Max standardization: the value of Min-Max standardization only reflects the "relative position within the local area", while the standard score of Z-score can be compared across regions (such as Z-score=1.5 in the south and Z-score=1.5 in the north, both indicating "significantly higher than the local mean"), making it more interpretable.
[0050] In one embodiment, as a specific implementation of the ancient building damage prediction method provided in this application, step S200 includes at least one of the following steps: S223: Add slight Gaussian noise to environmental data to simulate natural fluctuations, with the noise amplitude ≤ 5% of the environmental data standard deviation. By simulating the natural fluctuations of the real environment, the model's generalization ability is improved. Outdoor environmental data such as temperature, humidity, and light intensity are not absolutely smooth, but exhibit irregular, small natural fluctuations (e.g., minute changes in day and night temperature and humidity within ±2%RH, and light intensity fluctuations within ±50lux due to cloud cover). These fluctuations are inherent properties of the real environment. While wavelet denoising (S221) removes high-frequency noise from the training data, it may be overly "idealized and smoothed." If the model is trained using only smoothed data, it may misinterpret small fluctuations in the actual environment after deployment as "abnormal signals," leading to increased prediction errors. Adding slight Gaussian noise ≤ 5% of the standard deviation precisely simulates these real natural fluctuations (e.g., when the humidity standard deviation is 10%RH, the noise amplitude is ≤ 0.5%RH, which matches the small fluctuation range of the outdoor environment), essentially performing a "light enhancement" on the data, allowing the model to encounter environmental data "close to the real scene" during the training phase. Gaussian noise is randomly distributed and has a very small amplitude, so it will not form "false trends" (such as false increases / decreases in humidity), ensuring that the core "environment-damage" correlation learned by the model is not disturbed.
[0051] In one embodiment, as a specific implementation of the ancient building damage prediction method provided in this application, step S200 includes at least one of the following steps: S231: For all structural spectral data, an adaptive iterative reweighted penalized least squares (airPLS) algorithm is used to perform baseline correction operations, thereby reducing the interference effect of background fluorescence and solving the baseline drift problem of spectral data.
[0052] In one embodiment, as a specific implementation of the ancient building damage prediction method provided in this application, step S200 includes at least one of the following steps: S232: For all structural spectral data, standardization is performed using the Min-Max Scaling method to eliminate signal intensity inconsistencies caused by factors such as detection distance deviation and laser power fluctuation.
[0053] In one embodiment, as a specific implementation of the ancient building damage prediction method provided in this application, step S200 includes at least one of the following steps: S233: For all structural spectral data, the Savitzky-Golay (SG) filter is used to smooth and optimize the spectral curves, filtering out high-frequency random interference noise in the data while preserving the core information of characteristic peaks.
[0054] In one embodiment, as a specific implementation of the ancient building damage prediction method provided in this application, step S200 includes at least one of the following steps: S234: Implement enhancement operations for structural spectral data: First, perform a small-amplitude random shift (e.g., ±5 data points) in the wavenumber dimension to reproduce the slight drift during the operation of the spectrometer; second, generate a smoothly changing random curve through an SG filter, and use it as additional baseline noise to linearly superimpose with the original spectrum, thereby improving the model's ability to adapt to and recognize complex background noise.
[0055] In one embodiment, as a specific implementation of the ancient building damage prediction method provided in this application, the multi-source time-series data further includes the construction of graphical data. For example, high-definition cameras or drones are used to collect data covering areas with high incidence of component damage, and the images include text annotations such as component numbers and detection times.
[0056] Step S200 includes the following steps: S241: Deblurring and grayscale normalization of constructed graphic data.
[0057] S242: The image is divided into 64 fixed-size image patches using the Visual Transformation Model (Vit), which are then converted into patch embedding features.
[0058] S243: Use an optical character recognition (OCR) model to extract text information such as component numbers and labels from the image and perform standardized encoding.
[0059] Step S300 also includes the following steps: S331: An improved CLIP model (including the original CLIP model and a generalized structure) is used to extract semantic features of patch embedding features; the generalized structure includes pooling layers, dropout layers and fully connected layers to improve the ability to recognize blurry images; S332: The cross-attention module is used to fuse semantic features with text features extracted by OCR to obtain 256-dimensional image fusion features.
[0060] S333: The 256-dimensional spectral features, 256-dimensional low-dimensional features, and 256-dimensional image fusion features are concatenated into a 768-dimensional original fusion feature; it is then compressed into a 128-dimensional feature vector X through a 1×1 convolution (128 convolution kernels); and processed by a gating module.
[0061] The method further includes step S600: performing similarity determination on the component image sequence and removing redundant frames. The specific steps are as follows: S610: Sort the preprocessed image sequence according to the acquisition time. Let the image to be detected be the first image (frame t+1), and the previous frame be the second image (frame t); the first frame is directly retained and not detected.
[0062] S620: Extract the first fusion feature of the first image (i.e., the 256-dimensional image fusion feature in S331) and the second fusion feature of the second image.
[0063] S630: The cosine similarity algorithm is used to calculate the similarity between the first fusion feature and the second fusion feature to obtain the first similarity score S1 (value [0,1]).
[0064] S640: Retrieve the historical similarity score S0 of the second image and calculate the third similarity score S according to the formula S=α×S1+(1-α)×S0; where α∈[0.2,0.8] is the preset weight.
[0065] S650: Set a preset threshold [0.6, 0.8]. If S is greater than the threshold, it is determined to be a similar frame, and the image of that frame and its associated spectral data segment are deleted.
[0066] S660: Repeat S601~S605 to complete the full sequence detection.
[0067] Furthermore, the training process of the improved CLIP model is as follows: Sample set construction: Collect blurry images of ancient building components and images of complex outdoor environments, and annotate semantic information; Fine-tuning training: Freeze the parameters of the text recognition module and optimize only the main and generalization structure parameters of the CLIP model to adapt to ancient architecture scenarios.
[0068] Example 2
[0069] Combination Figure 6 This application provides a virtual natural environment construction device, the device comprising: The data acquisition module 21 is used to acquire multi-source time-series data of key components of ancient buildings; the multi-source time-series data includes at least structural spectral data, structural attribute data and environmental data; the structural spectral data includes Raman spectral data and infrared spectral data.
[0070] The data preprocessing module 22 is used to preprocess multi-source time series data.
[0071] The data fusion module 23 is used to extract features from Raman spectral data using 3-layer 3×3 convolution, and to extract features from infrared spectral data using multi-scale convolution, and to obtain spectral features by uniform length through adaptive pooling; it is used to transform structural attribute data and environmental data into low-dimensional features that match the dimensionality of spectral features through a 2-layer fully connected network; and it is used to concatenate spectral features with low-dimensional features, unify the number of channels through 1×1 convolution, filter key features through a gating module, and output a global feature vector Y1.
[0072] The damage identification module 24 inputs the global feature vector Y1 into a three-layer fully connected network and outputs the original output vector Y2 of the current damage level.
[0073] The results output module 25 is used to calculate the confidence levels of each level of building damage using the Softmax function below; , in, Let be the probability of damage level i, where i is a natural number from 0 to 9, and j is the traversal index of the damage level, taking the maximum value. The corresponding damage level is used as the current damage level.
[0074] Example 3
[0075] Combination Figure 7 This application provides an electronic device 1, including a memory 11, a processor 10, and a computer program 12 stored in the memory 11 and executable on the processor 10. When the processor 10 executes the computer program 12, it implements any of the ancient building damage prediction methods in Embodiment 1.
[0076] For example, the computer program 12 may be divided into one or more units, which are stored in the memory 11 and executed by the processor 10 to complete the present application. The one or more units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program 12 in the electronic device 1.
[0077] The electronic device 1 can be any electronic device with control functions. The electronic device 1 may include, but is not limited to, a processor 10 and a memory 11. Those skilled in the art will understand that... Figure 7 This is merely an example of electronic device 1 and does not constitute a limitation on electronic device 1. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 1 may also include input / output devices, network access devices, buses, etc.
[0078] The processor 10 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0079] The memory 11 can be an internal storage unit of the electronic device 1, such as a hard disk or RAM. The memory 11 can also be an external storage device of the electronic device 1, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 11 can include both internal and external storage units of the electronic device 1. The memory 11 is used to store the computer program and other programs and data required by the terminal device. The memory 11 can also be used to temporarily store data that has been output or will be output.
[0080] Example 4
[0081] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, implements any of the ancient building damage prediction methods described in Embodiment 1.
[0082] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0083] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0084] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the ancient building damage prediction methods provided in the embodiments of this application, the beneficial effects that any of the ancient building damage prediction methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0085] Example 5
[0086] This application also provides a computer program product, including a computer program. When executed by a processor, the computer program implements the steps in the ancient building damage prediction method of any one of Embodiment 1. The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form.
[0087] In the above five embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0088] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0089] In the embodiments provided in this application, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0090] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0091] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0092] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. A computer-readable medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in a computer-readable medium can be appropriately added to or subtracted according to the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0093] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0094] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for predicting damage to ancient buildings, characterized in that, The method includes the following steps: S100: Acquire multi-source time-series data of key components of ancient buildings; the multi-source time-series data includes at least structural spectral data, structural attribute data, and environmental data; the structural spectral data includes Raman spectral data and infrared spectral data. S200: Preprocess the multi-source time-series data; S300: Features are extracted from the Raman spectral data using a 3×3 convolution layer, and features are extracted from the infrared spectral data using a multi-scale convolution layer. The spectral features are then obtained by adaptive pooling to unify the length. The structural attribute data and the environmental data are transformed into low-dimensional features that match the spectral feature dimensions through a two-layer fully connected network; The spectral features are concatenated with the low-dimensional features, the number of channels is unified by a 1×1 convolution, key features are filtered by a gating module, and a global feature vector Y1 is output. S400: Input the global feature vector Y1 into a three-layer fully connected network and output the original output vector Y2 of the current damage level; S500: Calculate the confidence level of each level of building damage using the Softmax function below; , in, Let be the probability of damage level i, where i is a natural number from 0 to 9, and j is the traversal index of the damage level, taking the maximum value. The corresponding damage level is used as the current damage level.
2. The method for predicting damage to ancient buildings as described in claim 1, characterized in that, Step S200 includes at least one of the following steps: S211: The numerical features of the structural attribute data are normalized using Min-Max standardization to normalize the data to the [0,1] interval; S212: Perform one-hot encoding on the categorical features in the structural attribute data, with the encoding dimension consistent with the number of categories.
3. The method for predicting damage to ancient buildings as described in claim 1, characterized in that, Step S200 includes at least one of the following steps: S221: The environmental data is denoised by a 3-level wavelet transform using the db3 wavelet basis, while retaining low-frequency coefficients and reconstructing the data. S222: The environmental data is standardized using Z-score to eliminate dimensional differences; S223: Add slight Gaussian noise to the environmental data to simulate natural fluctuations, with the noise amplitude ≤ 5% of the standard deviation of the environmental data.
4. The method for predicting damage to ancient buildings as described in claim 1, characterized in that, In step S300, the step of filtering key features through the gating module specifically includes: The gating module uses formula Y gated =Conv(X,W)⊙σ(Conv(X,W g )) Filter features; Where X is the feature vector obtained by concatenating the spectral features and the low-dimensional features, W is the feature extraction convolution kernel weight matrix, Wg is the gate weight matrix, Conv is the convolution operation, σ is the Sigmoid activation function, and ⊙ is the element-wise multiplication operation.
5. The method for predicting damage to ancient buildings as described in claim 1, characterized in that, In step S400, the first layer of the three-layer fully connected network increases the dimensionality from 128 to 256 and uses the GELU activation function; the second layer reduces the dimensionality from 256 to 128 and uses the GELU activation function; and the third layer reduces the dimensionality from 128 to 10 and has no activation function. The optimizer of the three-layer fully connected network is Adam, with an initial learning rate of 1e-4 and a weight decay coefficient of 1e-5.
6. The method for predicting damage to ancient buildings as described in any one of claims 1 to 5, characterized in that, In step S500, the damage level is determined based on the crack width or the decay rate, which are obtained by inversion of the original output vector Y2.
7. A virtual natural environment construction device, characterized in that, The device includes: The data acquisition module is used to acquire multi-source time-series data of key components of ancient buildings; the multi-source time-series data includes at least structural spectral data, structural attribute data, and environmental data; the structural spectral data includes Raman spectral data and infrared spectral data. The data preprocessing module is used to preprocess the multi-source time-series data; The data fusion module is used to extract features from the Raman spectral data using a 3×3 convolution layer, and to extract features from the infrared spectral data using a multi-scale convolution layer, and to obtain spectral features by uniform length through adaptive pooling; it is used to transform the structural attribute data and the environmental data into low-dimensional features that match the dimensions of the spectral features through a 2-layer fully connected network; and it is used to concatenate the spectral features with the low-dimensional features, unify the number of channels through a 1×1 convolution, filter key features through a gating module, and output a global feature vector Y1. The damage identification module inputs the global feature vector Y1 into a three-layer fully connected network and outputs the original output vector Y2 of the current damage level. The results output module is used to calculate the confidence levels of each level of building damage using the Softmax function below; , in, Let be the probability of damage level i, where i is a natural number from 0 to 9, and j is the traversal index of the damage level, taking the maximum value. The corresponding damage level is used as the current damage level.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the ancient building damage prediction method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the ancient building damage prediction method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps in the ancient building damage prediction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Ancient building risk prediction management and control method and system based on large model
CN119624136A