A building safety prediction method based on digital twins and big data

Through innovative algorithms such as quantum state information and airflow dynamics, data diversity and gradient problems in digital twin building safety monitoring technology are solved, the generalization ability and adaptability of the model are improved, and accurate real-time monitoring and early warning of building safety conditions are achieved. .

CN118468413BActive Publication Date: 2024-11-22CHINA COMM INFORMATION TECH GRP CO LTD HANGZHOU BRANCH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410942224.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-11-22
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

The existing digital twin building safety monitoring technology has shortcomings in data quantification and diversity, problems with gradient disappearance or gradient explosion, limited generalization capabilities, and insufficient dynamic adaptability of real-time data processing and environmental changes.

Method used

Using data expansion model based on quantum state information, airflow dynamics neural network algorithm, self-coding algorithm and support vector machine algorithm based on regular mapping, building safety prediction model is constructed through sample expansion, feature extraction and dimensionality reduction to overcome gradient disappearance or gradient explosion problem to improve the generalization ability and adaptability of the model.

Benefits of technology

Improve the diversity and information capacity of data generation, enhance the search ability of neural networks in complex parameter spaces, avoid overfitting, improve the generalization ability and adaptability of the model, and realize accurate real-time construction safety conditions Monitoring and early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118468413B_ABST
    Figure CN118468413B_ABST
Patent Text Reader

Abstract

The present invention discloses a building safety prediction method based on digital twin and big data, comprising collecting digital twin data and labeling the data into categories to obtain original training data; training an original data expansion model based on the original training data set to obtain an expanded training data set and a data expansion model; training an original feature extraction model based on the expanded training data set to obtain a feature extraction training data set and a feature extraction model; training an original feature dimension reduction model based on the feature extraction training data set to obtain a feature dimension reduction training data set and a feature dimension reduction model; training an original classifier model based on the feature dimension reduction training data set to obtain a classifier model; constructing a building safety prediction model based on the feature extraction model, the feature dimension reduction model and the classifier model, inputting the data to be classified into the building safety prediction model to obtain a building safety prediction classification category, thereby improving the stability and efficiency of model training, and also improving the generalization ability and accuracy of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of engineering technology, and in particular to a building safety prediction method based on digital twins and big data. Background Art

[0002] Digital twin refers to the construction of a virtual model of a physical entity through digital information, which makes it possible to simulate, analyze and predict the state and behavior of the physical entity in the digital world. Digital twin technology is applied in building safety monitoring to greatly improve the intelligence and accuracy of the system.

[0003] In building safety monitoring, digital twin technology can achieve real-time and dynamic simulation of building structures, and accurately predict and evaluate the safety status of buildings through advanced data analysis and machine learning methods. Combined with the Internet of Things and big data technologies, digital twins can collect sensor data from various parts of the building in real time and synchronize these data with the digital model of the building. In this way, the physical state and possible changes of the actual building can be accurately reflected in the digital model at any time, allowing the early warning system to issue an alarm in time before problems occur. In addition, by using machine learning and deep learning algorithms, the digital twin system can learn and identify the difference between normal and abnormal states, thereby improving the adaptability and generalization ability of the monitoring system.

[0004] However, there are some problems with existing advanced data analysis and machine learning methods:

[0005] 1. In traditional methods, the quantification and diversity of data are often limited, resulting in limited application scenarios and effects of the model;

[0006] 2. In a complex data environment, traditional neural network training often encounters gradient vanishing or gradient exploding problems, which affects the stability and efficiency of training;

[0007] 3. Existing monitoring systems often perform poorly under new or changing environmental conditions and have limited generalization capabilities;

[0008] 4. Existing technologies often have deficiencies in processing real-time data and in dynamically adapting to environmental changes. Summary of the invention

[0009] In order to overcome the shortcomings of the above technologies, the present invention provides a building safety prediction method based on digital twins and big data, and uses a sample expansion model to expand samples and supplement the data collected due to scene restrictions. The model training is not limited to the gradient vanishing, gradient exploding or falling into the local optimal solution of the gradient descent optimization method, which improves the stability and efficiency of the training, and improves the generalization ability and accuracy of the building safety prediction model through feature extraction models and dimensionality reduction models.

[0010] The technical solution adopted by the present invention to overcome its technical problems is: a building safety prediction method based on digital twins and big data proposed by the present invention collects building digital twin system data and performs category labeling on it to obtain an original training data set; based on the original training data set, the original data expansion model is trained to obtain an expanded training data set and a data expansion model; based on the expanded training data set, the original feature extraction model is trained to obtain a feature extraction training data set and a feature extraction model; based on the feature extraction training data set, the original feature dimensionality reduction model is trained to obtain a feature dimensionality reduction training data set and a feature dimensionality reduction model; based on the feature dimensionality reduction training data set, the original classifier model is trained to obtain a classifier model;

[0011] A building safety prediction model is constructed based on feature extraction model, feature dimensionality reduction model and classifier model, and the data to be classified is input into the building safety prediction model to obtain the building safety prediction classification category.

[0012] Furthermore, the original data expansion model is trained based on the original training data set to obtain an expanded training data set and a data expansion model, specifically including: initializing the generator parameters and the discriminator parameters of the original data expansion model; using quantum state encoding to convert the original training data set into a quantum state vector; the generator generates a new data set based on the quantum state vector; the discriminator evaluates the degree of distinction between the new data set and the original training data set, thereby adjusting the generator parameters and the discriminator parameters using the gradient descent method; and iteratively training the original data expansion model until a preset iteration condition is met, thereby obtaining an expanded training data set and a data expansion model.

[0013] Furthermore, the discriminator evaluates the discrimination between the new data set and the original training data set, thereby adjusting the generator parameters and the discriminator parameters using the gradient descent method, and also includes using a generator feedback control mechanism strategy based on the mutation rate to monitor the mutation rate of the generated data and adjust the generator parameters.

[0014] Furthermore, the generator feedback control mechanism strategy based on mutation rate is adopted to monitor the mutation rate of generated data and adjust the generator parameters, specifically including: calculating the mutation rate based on the original training data set and the new data set; calculating the feedback control function based on the mutation rate; adjusting the generator parameters and the discriminator parameters respectively based on the feedback control function, the generator loss function, the discriminator loss function, the generator parameter gradient and the discriminator parameter gradient.

[0015] Using quantum state information for data generation increases the diversity and information capacity of data generation through the superposition and entanglement states of quantum bits.

[0016] Furthermore, the original feature extraction model is trained based on an expanded training data set using a neural network algorithm of airflow mechanics.

[0017] Furthermore, the neural network algorithm using air flow mechanics trains the original feature extraction model based on an expanded training data set, specifically including: taking the parameters of the neural network applied by the original feature extraction model as particles, and initializing the particle position and particle velocity of each parameter in the parameter space; calculating the error function based on the particle position, thereby calculating the fitness function of each parameter; calculating the air pressure difference and the environmental perception factor based on the fitness function; updating the particle position and particle velocity based on the air pressure difference; and dynamically adjusting the inertia weight and the learning factor based on the environmental perception factor to update the particle position and particle velocity.

[0018] Furthermore, it also includes calculating the parameter value of each parameter after the parameter is mutated based on the wind direction variable.

[0019] The training of the feature extraction model performs parameter optimization by simulating wind flow and air pressure differences. It does not rely on gradient information, helps to overcome the problem of gradient vanishing or gradient exploding, and enhances the search ability of the neural network in complex parameter space.

[0020] Furthermore, the original feature dimensionality reduction model is trained using an autoencoding algorithm, specifically including: respectively initializing the weights of the encoder and decoder of the autoencoding algorithm; converting the feature extraction training data set as the encoder input into a low-dimensional feature representation, and inputting the low-dimensional feature representation into the decoder to obtain the decoder reconstruction output; calculating the reconstruction error based on the encoder input and the decoder reconstruction output; calculating the loss function based on the reconstruction error; and updating the encoder weights and decoder weights using the gradient descent method based on the loss function and the learning rate.

[0021] Furthermore, the learning rate is adaptively adjusted using exponential decay based on the number of iterations.

[0022] The feature dimensionality reduction model uses an autoencoder to reduce the complexity of the data and uses L2 regularization to help avoid overfitting, ensuring that the model can effectively learn the intrinsic structure of the data.

[0023] Furthermore, a support vector machine algorithm based on regularized mapping is used to train the original classifier model to obtain a classifier model, specifically including: initializing the weights, biases and regularization parameters of the support vector machine; mapping the input feature dimensionality reduction training data to a high-dimensional space based on a decoupling kernel function; determining the support vector and the corresponding Lagrange multiplier based on a sequential minimum optimization algorithm; dynamically adjusting the regularization parameters according to the classification results of the feature dimensionality reduction training data and the gradient of the regularization parameters based on a loss function; adjusting the kernel function parameters, and updating the weights and biases based on the gradients of the weights and biases respectively based on the loss function; iteratively training the original data classifier model until the preset training conditions are met, thereby using a classification decision function based on weights and biases for the classifier model.

[0024] The training of the classifier model uses dynamically adjusted regularization parameters and decoupled kernel functions to improve the adaptability and generalization ability of the classifier under different data distributions.

[0025] The beneficial effects of the present invention are:

[0026] 1. Use quantum state information for data generation, and increase the diversity and information capacity of data generation through the superposition and entanglement of quantum bits;

[0027] 2. The training of the feature extraction model optimizes parameters by simulating wind flow and air pressure differences. It does not rely on gradient information, helps to overcome the problem of gradient vanishing or gradient exploding, and enhances the search ability of the neural network in complex parameter space.

[0028] 3. The feature dimensionality reduction model uses an autoencoder to reduce the complexity of the data and uses L2 regularization to help avoid overfitting, ensuring that the model can effectively learn the intrinsic structure of the data;

[0029] 4. The training of the classifier model uses dynamically adjusted regularization parameters and decoupled kernel functions to improve the adaptability and generalization ability of the classifier under different data distributions;

[0030] 5. The accuracy of data processing is improved through innovative algorithms, and the generalization ability of the model is enhanced through data expansion and parameter optimization;

[0031] 6. Combined with the real-time data collection and processing capabilities of IoT devices, it can monitor the safety status of buildings in real time and provide effective early warning;

[0032] 7. In actual application scenarios where data and environmental conditions vary greatly, the optimization algorithm provides better adaptability and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1A flowchart of an embodiment of a building safety prediction method based on digital twins and big data;

[0034] Figure 2 A schematic diagram of an embodiment of using an autoencoder algorithm to perform feature dimensionality reduction;

[0035] Figure 3 A schematic diagram of a flow chart of an implementation example of applying a building safety prediction model to perform safety prediction. DETAILED DESCRIPTION

[0036] In order to facilitate those skilled in the art to better understand the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The following is only exemplary and does not limit the protection scope of the present invention.

[0037] The embodiment of the present invention provides a building safety prediction method based on digital twins and big data, such as Figure 1 As shown, the specific steps are as follows:

[0038] S1: Collect building digital twin system data and label its categories to obtain the original training data set.

[0039] In this embodiment, by collecting data from the digital twin, the digital twin can collect sensor data from various parts of the building in real time and synchronize these data with the digital model of the building. The building digital twin system provides a variety of data types. In one embodiment, the collected data attributes are not limited to temperature (degrees Celsius), humidity (%), stress (Newton / square meter), deformation degree (mm), displacement (mm), noise level (decibel), light intensity (lumens), air quality index, structural material fatigue (%), and power consumption (kWh).

[0040] It should be emphasized that this embodiment is only used to illustrate a data format and type of the present invention. In actual applications, the attributes of data are usually more than 10 attributes, and the number of data attributes may reach dozens or even hundreds.

[0041] The collected data is labeled. The labeling method of the embodiment of the present invention is manual labeling. In one embodiment, the labeled categories include "safe", "minor risk", "medium risk" and "high risk", a total of 4 categories.

[0042] S2: The original data augmentation model is trained based on the original training data set to obtain an augmented training data set and a data augmentation model.

[0043] Insufficient training samples can easily lead to poor generalization ability of the model and affect the accuracy of the model. At the same time, the diversity of training samples will first lead to limited application scenarios and effects of the model. Therefore, in the embodiment of the present invention, a generative adversarial network algorithm based on quantum state information resampling is used to generate samples, thereby realizing data expansion. Among them, the generative adversarial network algorithm based on quantum state information resampling includes a generator ( ) and the discriminator ( ) The generator is responsible for sampling from the latent space and generating new data samples, while the discriminator evaluates the difference between these samples and real samples. In the traditional generative adversarial network, the generator generates data starting from a random noise vector. The present invention adopts quantum state information as the encoding method of data, and uses the superposition and entanglement states of quantum bits to increase the diversity and information capacity of data generation.

[0044] Therefore, the training process of the generative adversarial network algorithm based on quantum state information resampling is as follows:

[0045] S21, initialize the generator parameters of the original data augmentation model and the discriminator parameters ;

[0046] In one embodiment, the generator parameters are initialized using the Xavier initialization method, and the discriminator parameters are initialized using the He method, which can be expressed by formula (1) and formula (2) respectively as follows:

[0047] (1)

[0048] (2)

[0049] in, represents the variance of the generator parameters; is a normal distribution; represents the number of nodes in the discriminator input layer, which is equal to the number of input features. Preferably, Set to 0.01.

[0050] S22, quantum state encoding is used to convert the original training data set into a quantum state vector.

[0051] Each data sample in the original training data set is quantum-encoded using formula (3) and converted into a quantum state vector q. Each data sample is encoded into a group of quantum bits, and the state of each quantum bit corresponds to a feature of the data.

[0052] In one embodiment, the quantum state encoding function The calculation method can be expressed by formula (4).

[0053] (3)

[0054] (4)

[0055] in, represents the input data vector, represents the quantum state vector after quantum encoding; is the dot product symbol; represents the quantum state encoding function, The quantum gate operation that depends on the input data converts the input data vector into a quantum state; represents the initial state of n quantum bits, and each quantum bit is in the ground state.

[0056] S23, Generator Based on quantum state vector Generate a new dataset , as shown in formula (5).

[0057] (5)

[0058] in, represents the generated data sample; represents a generator function; represents the input quantum state vector; Represents the parameters of the generator.

[0059] S24, the discriminator evaluates the distinction between the new data set and the original training data set, and then uses the gradient descent method to adjust the generator parameters and the discriminator parameters At the same time, in order to improve the performance of the generative adversarial network during data expansion and increase the adaptability of the algorithm in a dynamic data environment, a generator feedback control mechanism strategy based on mutation rate is adopted to monitor the mutation rate of the generated data and adjust the internal parameters of the generator, which specifically includes the following steps.

[0060] S241, calculating the mutation rate based on the original training data set and the new data set.

[0061] Formula (6) is used to calculate the mutation rate calculate

[0062] (6)

[0063] In the formula, is the number of samples to generate data, preferably set to 1000, It is The generated data samples, is the mean value of the generated data, is the standard deviation of the generated data.

[0064] S242, calculating a feedback control function based on the mutation rate.

[0065] The feedback control function is calculated using formula (7).

[0066] (7)

[0067] In the formula, is a feedback control function based on the mutation rate, is the coefficient for adjusting sensitivity, is the target mutation rate, is a hyperbolic tangent function. Preferably, Set to 0.3.

[0068] S243, based on the feedback control function, the generator loss function, the discriminator loss function, the generator parameter gradient and the discriminator parameter gradient, the generator parameters and the discriminator parameters are adjusted respectively.

[0069] Adjusting Generator Parameters and the discriminator parameters The formulas are as shown in formula (8) and formula (9). Among them, the generator loss function And the discriminator loss function Expressed in formula (10) and formula (11), the gradient calculation method of the generator parameters is shown in formula (12) and formula (13), and the gradient of the discriminator parameters is shown in formula (14) and formula (15).

[0070] (8)

[0071] (9)

[0072] (10)

[0073] (11)

[0074] (12)

[0075] (13)

[0076] (14)

[0077] (15)

[0078] in, and are the learning rates of the generator and the discriminator respectively; and Respectively represent the gradients of the generator and discriminator loss functions with respect to their respective parameters; and Represent the loss functions of the generator and the discriminator respectively; and Respectively represent The iteration and Iterations, Indicates expected value.

[0079] S25, iteratively training the original data expansion model until a preset iteration condition is met, thereby obtaining an expanded training data set and a data expansion model.

[0080] Repeat the process S22-S24 until the preset stop iteration condition is met, which means that the model training is completed, thereby obtaining an expanded training data set and a data expansion model.

[0081] In one embodiment, the preset condition for stopping iteration is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.

[0082] S3: The original feature extraction model is trained based on the expanded training data set to obtain a feature extraction training data set and a feature extraction model.

[0083] The expanded data is input into the feature extraction model to train the feature extraction model. In one embodiment of the present invention, the feature extraction model adopts a 3-layer fully connected neural network. In the prior art, the process of using certain neural networks for feature extraction may encounter problems such as gradient vanishing, gradient explosion or falling into a local optimal solution due to the use of a gradient descent optimization method, which affects the stability of the training and the performance of the model. Therefore, a neural network algorithm based on airflow dynamics is used for training the feature extraction model. The neural network algorithm based on airflow dynamics is inspired by the formation mechanism of wind in nature and its impact on the environment. Wind is generated by air flow, and its direction and intensity are determined by air pressure differences, terrain and other natural factors. Wind can carry energy, transmit information, and cause the circulation and renewal of matter in the ecosystem. Traditional optimization methods based on gradient descent may encounter difficulties in complex parameter spaces, such as gradient vanishing, local minimum values, etc. The airflow dynamics optimization algorithm proposed in the present invention updates parameters by simulating wind flow and air pressure differences, and does not rely on gradient information. Therefore, it can search in a wider parameter space, improving the ability to avoid local optimality and accelerate convergence.

[0084] The original feature extraction model is trained based on an expanded training data set using a neural network algorithm of airflow mechanics, specifically including the following steps.

[0085] S31, taking the parameters of the neural network applied by the original feature extraction model as particles, and initializing the particle position and particle velocity of each parameter in the parameter space.

[0086] Use the parameters of the neural network as particles and initialize their positions and velocities in the parameter space. Specifically, each parameter in the neural network (corresponding to the particle's position) and its velocity In the initial stage, the particle parameters are randomly generated. and particle velocity initialization processes can be expressed by formulas (16) and (17), respectively.

[0087] (16)

[0088] (17)

[0089] In the formula, and Indicates the possible minimum and maximum values ​​of the parameter. and Indicates the minimum and maximum values ​​of the speed, Generate a random number in the interval [0, 1].

[0090] S32, calculating the error function based on the particle position, thereby calculating the fitness function of each parameter.

[0091] A fitness value is calculated for each parameter (particle). The fitness is determined by the performance of the neural network on a specific task. In one embodiment, the fitness function is the inverse of the error, and the error is obtained based on a preset logistic regression classifier. The fitness function can be expressed as formula (18).

[0092] (18)

[0093] In the formula, is the error function, in this embodiment, it is the cross entropy loss.

[0094] In one embodiment of the present invention, the error function It can be further expressed as formula (19).

[0095] (19)

[0096] In the formula, is the sample size, It is The actual labels of samples, The neural network is The prediction of samples depends on the parameters .

[0097] S33, calculating the air pressure difference and the environmental perception factor based on the fitness function.

[0098] Simulate the air pressure difference according to the fitness value, the air pressure difference Determined by fitness, high fitness corresponds to low pressure, and vice versa. Specifically, set a baseline fitness , the air pressure difference can be expressed as formula (20).

[0099] (20)

[0100] In the formula, is the adjustment factor. Preferably, is set to the highest fitness value in the population. Adjustment factor Set to 1.5.

[0101] Environmental perception factor It is calculated based on the rate of change of the objective function in successive iterations to indicate the adjustment range required for the parameter update strategy. Specifically, set For in time Parameters The fitness of the neural network, the environmental perception factor is defined as the relative rate of fitness change between two consecutive iterations, and the environmental perception factor can be expressed as formula (21).

[0102] (twenty one)

[0103] S34, updating the particle position and particle velocity based on the air pressure difference.

[0104] Update the position and speed of each parameter according to the pressure difference and wind speed (i.e. the step size of parameter update), simulating the influence of wind flow on the position of particles (parameters). The update of parameters is affected by the pressure difference and wind speed, and the new position of the parameters and new speed The calculation method can be expressed as formula (22) and formula (23).

[0105] (twenty two)

[0106] (twenty three)

[0107] In the formula, is the inertia weight, which controls the influence of the previous speed on the current speed; is a learning factor that controls the effect of air pressure differences on speed. Preferably, is set to 0.9, is set to 2.

[0108] S35, dynamically adjusting the inertia weight and the learning factor based on the environmental perception factor to update the particle position and particle velocity.

[0109] The wind speed is dynamically adjusted according to the feedback during the search process to adapt to different regions and characteristics of the parameter space. Specifically, the wind speed is adjusted by dynamically adjusting the inertia weight and learning factor To adapt to different stages of the search process, it can be expressed as formula (24) and formula (25).

[0110] (twenty four)

[0111] (25)

[0112] In the formula, is the natural base in mathematics, is the current iteration number, is the maximum number of iterations, and is the adaptive environmental perception adjustment factor, is the environmental perception factor, and are the maximum and minimum values ​​of the inertia weight, and are the maximum and minimum values ​​of the learning factor, respectively. Preferably, Set to 0.9, Set to 0.4, Set to 2.5, Set to 0.5.

[0113] It should be noted that the use of and The wind speed is adjusted using nonlinear adjustment through an exponential decay function, which can ensure that the adjustment amplitude is more significant when the environmental changes are large.

[0114] S36, calculating the parameter value of each parameter after the variation based on the wind direction variable.

[0115] By adopting mutation in a random or strategic way, the turbulence effect in natural wind is simulated to maintain the diversity of parameter population and avoid premature convergence. In order to maintain the diversity of population, the present invention can simulate the turbulence in wind by random mutation. Specifically, each parameter There is a certain probability Mutation occurs, and the parameter value after mutation can be expressed as formula (26).

[0116] (26)

[0117] In the formula, is a random number generated from the interval [-1, 1]. is the mutation probability, For the The wind direction variable of the iteration. Preferably, Set to 0.1.

[0118] Wind direction variable It is used to simulate the changes in wind direction in the real world, thereby increasing the diversity of the search process, which can be expressed as formula (27).

[0119] (27)

[0120] In the formula, is the maximum angle of wind direction change. Preferably, Set to 30 degrees.

[0121] S37, repeat S32-S36 until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.

[0122] S4: Based on the feature extraction training data set, the original feature dimensionality reduction model is trained to obtain a feature dimensionality reduction training data set and a feature dimensionality reduction model.

[0123] The data after feature extraction is input into the feature dimension reduction model to train the feature dimension reduction model. The schematic diagram of the feature dimension reduction using the autoencoder algorithm in the present invention is as follows: Figure 2 As shown in Figure 1, the autoencoder algorithm consists of two parts: encoder and decoder. The encoder is responsible for converting high-dimensional feature data into low-dimensional feature representations, while the decoder attempts to reconstruct the original data from these low-dimensional representations. The total loss is calculated using mean squared error based on L2 regularization to avoid overfitting while ensuring that the model can learn effective data compression.

[0124] The method of training the original feature dimension reduction model using the autoencoder algorithm includes the following steps.

[0125] S41, respectively initialize the weights of the encoder and decoder of the autoencoding algorithm.

[0126] The weights of the encoder and decoder are randomly initialized according to a preset distribution. In one embodiment of the present invention, the weight pW and bias pb of the autoencoder are randomly initialized using a Gaussian distribution, which are expressed by formula (28) and formula (29) respectively.

[0127] (28)

[0128] (29)

[0129] In the formula, For the The weight of the layer; For the Layer bias: The mean is 0 and the variance is Normal distribution of is the standard deviation. Preferably, Set to 0.1.

[0130] S42, converting the feature extraction training data set as encoder input into a low-dimensional feature representation, and inputting the low-dimensional feature representation into a decoder to obtain a decoder reconstruction output.

[0131] Through forward propagation, input data The encoder converts it into a low-dimensional feature representation, which is then passed to the decoder to try to reconstruct the original data. Specifically, the output of the encoder part and the decoder output The calculation method of can be expressed as formula (30) and formula (31).

[0132] (30)

[0133] (31)

[0134] In the formula, is the input data; is the output of the encoder, i.e., the feature representation; is the decoder reconstructed output; and are the weights and biases of the encoder respectively; and are the weight and bias of the decoder respectively; is the Sigmoid activation function.

[0135] S43, calculating a reconstruction error based on the encoder input and the decoder reconstruction output.

[0136] In one embodiment of the present invention, the reconstruction error term The calculation of is based on the Euclidean distance, which can be expressed as formula (32).

[0137] (32)

[0138] In the formula, is the input data vector No. elements; is the reconstructed data vector No. elements; is the number of elements in the data vector.

[0139] S44, calculating a loss function based on the reconstruction error.

[0140] The total loss is calculated using mean squared error based on L2 regularization to avoid overfitting while ensuring that the model can learn effective data compression. The loss function The calculation method can be expressed as formula (33).

[0141] (33)

[0142] In the formula, is the regularization parameter; and is the L2 regularization term of the weight, the regularization term and are respectively expressed as the sum of the squares of all encoder and decoder weights, which can be expressed as formula (34) and formula (35).

[0143] (34)

[0144] (35)

[0145] In the formula, is the encoder weight matrix Middle Line Elements of a column; is the decoder weight matrix Middle Line Elements of a column.

[0146] S45, updating the encoder weights and decoder weights using the gradient descent method based on the loss function and the learning rate.

[0147] During the back-propagation process, the network weights are updated using the gradient descent algorithm according to the loss function, which can be expressed as formula (36) and formula (37).

[0148] (36)

[0149] (37)

[0150] In the formula, is the updated encoder weight parameter; is the updated decoder weight parameter; is the learning rate; and are the gradients of the loss function with respect to the encoder and decoder weights, respectively. Preferably, The adaptive adjustment method is used and the initial learning rate is set to 0.01.

[0151] S46, adaptively adjusts the learning rate according to the training progress, and uses an exponential decay strategy to optimize the learning process.

[0152] The calculation of the learning rate is expressed as formula (38).

[0153] (38)

[0154] In the formula, is the base of natural logarithms; is the decay rate; is the number of iterations; The formula for the decay rate is expressed as formula (39).

[0155] (39)

[0156] In the formula, is the initial learning rate, preferably, Set to 0.01. Is to reach the specified learning rate The number of iterations required.

[0157] S47, repeat S42-S46 until the preset stop iteration condition is met, indicating that the feature extraction model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.

[0158] S5, training the original classifier model based on the feature dimension reduction training data set to obtain a classifier model.

[0159] In one embodiment of the present invention, a support vector machine algorithm based on regularized mapping is used as a classifier model, which receives feature vectors from a data dimensionality reduction model, and a mapping layer uses a kernel function to map the data to a higher dimensional space to find the optimal separation hyperplane, and an output layer determines the category of the data based on this hyperplane. On the basis of the traditional support vector machine algorithm, the present invention uses adaptive regularization parameters to dynamically adjust according to the distribution of data to optimize the stability and generalization ability of the classification boundary.

[0160] The original classifier model is trained by using a support vector machine algorithm based on regularized mapping to obtain a classifier model, which specifically includes the following steps.

[0161] S51, initialize the weights, biases and regularization parameters of the support vector machine.

[0162] The initialization is expressed as formulas (40)-(42).

[0163] (40)

[0164] (41)

[0165] (42)

[0166] In the formula, represents the support vector machine weight vector, represents the bias, represents the dimension of the feature vector, represents the initial regularization parameter, Indicates initializing weights from a normal distribution.

[0167] S52, mapping the input feature dimension reduction training data to a high-dimensional space based on a decoupling kernel function.

[0168] The input feature vector is mapped to a high-dimensional space through a decoupled kernel function, expressed as formula (43), where the kernel function The calculation method of is based on the Gaussian kernel, which is expressed as formula (44).

[0169] (43)

[0170] (44)

[0171] In the formula, represents the feature vector after mapping, represents the kernel function, and represent new samples and support vectors respectively, represents the decoupling parameter, is the bandwidth parameter of the kernel function, preferably, Set to 0.04.

[0172] S53, determining the support vector and the corresponding Lagrange multiplier based on a sequential minimum optimization algorithm.

[0173] The sequential minimum optimization algorithm is used to solve the optimization problem with regularization terms, determine the support vector and the corresponding Lagrange multiplier, and the solution to the optimization problem can be expressed as formula (45).

[0174] (45)

[0175] In the formula, is the penalty parameter of the support vector machine, It is The label of the sample, Represents the Euclidean norm of a vector.

[0176] S54, dynamically adjusting the regularization parameters according to the classification results of the feature dimension reduction training data and the gradient of the regularization parameters based on the loss function.

[0177] The regularization parameters are dynamically adjusted according to the classification results of the current training data to improve the performance of the model on the training set, which can be expressed as formula (46):

[0178] (46)

[0179] In the formula, represents the updated regularization parameter, is the learning rate, is the loss function right Preferably, Set to 0.5.

[0180] Number of loss functions right Gradient The calculation method of can be expressed as (47),

[0181] (47)

[0182] In the formula, is the L2 norm of the weight parameter.

[0183] S55, adjust the kernel function parameters, and update the weights and biases based on the gradients of the loss function.

[0184] The parameters of the kernel function are adjusted, and the updating method of weights and biases can be expressed as formulas (48) and (49).

[0185] (48)

[0186] (49)

[0187] In the formula, is the learning rate, and are the gradients of the loss function with respect to weights and biases, respectively. Preferably, Set to 0.03.

[0188] The gradient of the loss function with respect to weights and biases and The calculation method of can be expressed as formula (50) and formula (51).

[0189] (50)

[0190] (51)

[0191] In the formula, is an indicator function that is 1 if the inner condition is true and 0 otherwise.

[0192] S56, iteratively training the original data classifier model until the preset training conditions are met, so that the classification decision function based on the weight and bias is used for the classifier model.

[0193] Repeating the iteration steps S52-S55 until the preset stop iteration condition is met indicates that the classification model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 300 times.

[0194] After the classification model training is completed, the constructed classification decision function can be expressed as formula (52).

[0195] (52)

[0196] In the formula, is the final classification function; is a symbolic function, according to The sign of determines the category.

[0197] S6, constructing a building safety prediction model based on the feature extraction model, the feature dimension reduction model and the classifier model, and inputting the data to be classified into the building safety prediction model to obtain the building safety prediction classification category.

[0198] The trained model is used to process new samples, thereby achieving real-time assessment of building safety conditions. The application process is as follows: Figure 3 As shown. The new sample to be classified is input into the feature extraction model for feature extraction to obtain the new sample after feature extraction. The key features are extracted using the trained neural network model based on exploratory whale optimization.

[0199] The new samples after feature extraction are input into the feature dimension reduction model for feature dimension reduction, thereby obtaining new samples after feature dimension reduction. The extracted features are further processed to reduce the data dimension and enhance the generalization ability of the model.

[0200] The new samples after feature dimension reduction are input into the classifier model for classification, so as to obtain the building safety prediction classification category. The trained support vector machine classifier is used to classify the safety status according to the feature vector after dimension reduction. In this embodiment, the classification categories include "safe", "slight risk", "medium risk", "high risk".

[0201] The present invention proposes a building safety prediction method based on digital twins and big data. It uses quantum state information as a data encoding method and utilizes the superposition and entanglement states of quantum bits to increase the diversity of data generation and information capacity. The airflow dynamics optimization algorithm is used to update parameters by simulating wind flow and air pressure differences. It does not rely on gradient information, so it can search in a wider parameter space, improves the ability to avoid local optimality and accelerate convergence, and improves the stability of the training feature extraction model and the performance of the model. The feature dimension reduction model is trained by the autoencoder algorithm, and the total loss is calculated by the mean square error based on L2 regularization to avoid overfitting, while ensuring that the model can learn effective data compression. The support vector machine algorithm based on regularized mapping is used as the classifier model, and the stability and generalization ability of the classification boundary are optimized by dynamically adjusting the adaptive regularization parameters according to the distribution of the data.

[0202] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

Claims

1. A building safety prediction method based on digital twins and big data, It is characterized in that include: Collect building digital twin system data and label it by category to obtain the original training data set; The original data expansion model is trained based on the original training data set to obtain an expanded training data set and a data expansion model, which specifically includes: Initialize the generator parameters and discriminator parameters of the original data augmentation model; The original training data set is converted into a quantum state vector by using quantum state encoding; The generator generates a new data set based on the quantum state vector; The discriminator evaluates the discrimination between the new data set and the original training data set, thereby adjusting the generator parameters and the discriminator parameters by using the gradient descent method, and using a generator feedback control mechanism strategy based on the mutation rate to monitor the mutation rate of the generated data and adjust the generator parameters, wherein the generator feedback control mechanism strategy based on the mutation rate to monitor the mutation rate of the generated data and adjust the generator parameters includes: Calculate the mutation rate based on the original training data set and the new data set. Calculate the feedback control function based on the mutation rate, Based on the feedback control function, the generator loss function, the discriminator loss function, the generator parameter gradient and the discriminator parameter gradient, the generator parameters and the discriminator parameters are adjusted respectively. Iteratively train the original data expansion model until the preset iteration conditions are met, thereby obtaining an expanded training data set and a data expansion model; The original feature extraction model is trained based on the expanded training data set to obtain a feature extraction training data set and a feature extraction model; The original feature dimension reduction model is trained based on the feature extraction training data set to obtain a feature dimension reduction training data set and a feature dimension reduction model; The original classifier model is trained based on the feature dimension reduction training data set to obtain a classifier model; A building safety prediction model is constructed based on feature extraction model, feature dimensionality reduction model and classifier model, and the data to be classified is input into the building safety prediction model to obtain the building safety prediction classification category.

2. According to the method for predicting building safety based on digital twins and big data as described in claim 1, It is characterized in that The original feature extraction model is trained based on an expanded training data set using a neural network algorithm based on airflow mechanics.

3. According to the method for predicting building safety based on digital twins and big data as described in claim 2, It is characterized in that The neural network algorithm using airflow mechanics trains the original feature extraction model based on an expanded training data set, specifically including: The parameters of the neural network applied by the original feature extraction model are used as particles, and the particle position and particle velocity of each parameter in the parameter space are initialized; Calculate the error function based on the particle position to calculate the fitness function of each parameter; Calculate the air pressure difference and environmental perception factor based on the fitness function; Update particle positions and particle velocities based on pressure differences; The inertia weight and learning factor are dynamically adjusted based on the environmental perception factor to update the particle position and particle velocity.

4. According to the method for predicting building safety based on digital twins and big data as described in claim 3, It is characterized in that It also includes calculating the parameter value of each parameter after variation based on the wind direction variable.

5. According to the method for predicting building safety based on digital twins and big data as described in claim 1, It is characterized in that The original feature dimensionality reduction model is trained using an autoencoder algorithm, specifically including: Initialize the weights of the encoder and decoder of the autoencoder algorithm respectively; The feature extraction training data set is converted into a low-dimensional feature representation as the encoder input, and the low-dimensional feature representation is input into the decoder to obtain the decoder reconstruction output; Calculating a reconstruction error based on the encoder input and the decoder reconstructed output; Calculate the loss function based on the reconstruction error; The encoder weights and decoder weights are updated using gradient descent based on the loss function and learning rate.

6. According to the method for predicting building safety based on digital twins and big data as claimed in claim 5, It is characterized in that The learning rate is adaptively adjusted using exponential decay based on the number of iterations.

7. According to claim 1, a building safety prediction method based on digital twins and big data, It is characterized in that The original classifier model is trained using a support vector machine algorithm based on regularized mapping to obtain a classifier model, which specifically includes: Initialize the weights, biases, and regularization parameters of the support vector machine; Map the input feature dimension reduction training data to a high-dimensional space based on the decoupled kernel function; Determine the support vectors and corresponding Lagrange multipliers based on the sequential minimum optimization algorithm; Dynamically adjust the regularization parameters based on the classification results of the feature dimension reduction training data and the gradient of the regularization parameters based on the loss function; Adjust the kernel function parameters and update the weights and biases based on the gradients of the loss function; The original data classifier model is iteratively trained until the preset training conditions are met, so that a classification decision function based on weights and biases is used for the classifier model.