Digital twinning method and system based on deep learning, storage medium and terminal

Through outlier prediction, adaptive weighted fusion and diffusion model data expansion, the problem of inaccurate sensor data and insufficient data in the digital twin system is solved, the accuracy and efficiency of the system are improved, and the training effect of the neural network model is enhanced.

CN118690652APending Publication Date: 2024-09-24UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410838074.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Digital twin systems face problems such as inaccurate sensor data collection and missing data, resulting in insufficient neural network training data and affecting the accuracy and efficiency of the system.

Method used

Through outlier prediction, adaptive weighted fusion, and diffusion model data augmentation, the accuracy and richness of sensor data are improved for training neural network models.

Benefits of technology

It effectively solves the problems of inaccurate sensor data and insufficient data, improves the accuracy and efficiency of the digital twin system, and enhances the training effect of the neural network model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690652A
    Figure CN118690652A
Patent Text Reader

Abstract

The invention discloses a digital twinning method and system based on deep learning, a storage medium and a terminal, and belongs to the technical field of digital twinning, and the method comprises the following steps: S1, carrying out the abnormal value prediction of collected sensor data; s2, performing adaptive weighted fusion on the sensor data after abnormal value prediction; s3, performing data expansion on the fused sensor data by adopting a diffusion model; and S4, training a neural network model by using the expanded data. According to the invention, through abnormal value detection and adaptive weighted fusion, the problem of inaccurate sensor data acquisition in the existing digital twin system is solved; the problem of insufficient training data is solved through a data expansion mode; meanwhile, the improved neural network model is used for training, so that the digital twinning system is more accurate and efficient, and the method is of great significance to the development of the digital twinning technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital twin technology, and in particular to a digital twin method, system, storage medium and terminal based on deep learning. Background Art

[0002] Digital twin technology is a multi-physical and multi-scale simulation process that makes full use of physical data, virtual data, service data, etc. to achieve the mapping of the entire life cycle process from physical space to virtual space. Digital twin technology is of great significance to digital transformation and is widely used in aerospace, industry and manufacturing, smart medical care, smart cities and other fields. A complete digital twin system consists of physical entities, digital entities, data connections between the two, and models, data and interfaces involved in the data connection process. Digital twins integrate multiple technologies such as simulation modeling, data communication and transmission, data analysis and processing, machine learning and deep learning, security and privacy protection, so that it can accurately and safely simulate physical entities and realize the regulation of physical entities. Digital twins can help decision makers conduct accurate simulation analysis and assist decision-making. They can simulate and optimize production processes and improve production efficiency. They can prevent potential problems and reduce risks and costs through simulation in virtual space.

[0003] However, the digital twin system also faces many problems. On the one hand, since the digital twin system requires a large number of sensors to collect data, it will face the problem of inaccurate data collection and data missing; on the other hand, since the digital twin system is a simulation in a virtual space, when neural network training is required, it will face the problem of insufficient training data. How to solve these problems and make the digital twin system more accurate and efficient is of great significance to the development of digital twin technology. Summary of the invention

[0004] The purpose of the present invention is to overcome at least one technical problem existing in the prior art and provide a digital twin method, system, storage medium and terminal based on deep learning.

[0005] The objective of the present invention is achieved through the following technical solutions:

[0006] In a first aspect, a digital twin method based on deep learning is provided, the method comprising the following steps:

[0007] S1, predicting outliers for the collected sensor data;

[0008] S2, adaptively weighted fusion of sensor data after outlier prediction;

[0009] S3, using diffusion model to perform data expansion on the fused sensor data;

[0010] S4. Use the expanded data to train the neural network model.

[0011] Preferably, the step S1 specifically includes:

[0012] S11, using the spatial correlation of the sensor, predicting the abnormal value of a certain sensor to obtain a spatial prediction value of the abnormal value;

[0013] S12, using the time correlation of the sensor, predicting the abnormal value of a certain sensor to obtain a time prediction value of the abnormal value;

[0014] S13, using the correlation between the heterogeneous sensors, predicting the abnormal value of a certain sensor to obtain the heterogeneous sensor prediction value of the abnormal value;

[0015] S14, taking an average of the obtained spatial prediction value of the outlier value, the temporal prediction value of the outlier value, and the heterogeneous sensor prediction value of the outlier value to obtain a final prediction value.

[0016] Preferably, the step S2 specifically includes:

[0017] The final predicted value is adaptively weighted fused, the variance of the initial value measured by each sensor is calculated, the optimal weight is obtained by calculating the total mean square error of the initial value, and the optimal value after fusion is obtained by multiplying the optimal weight with the initial value.

[0018] Preferably, the diffusion model is a denoised diffusion probability model.

[0019] Preferably, the step S3 specifically includes:

[0020] S31, perform the forward process of the diffusion model;

[0021] S32. Perform the reverse process of the diffusion model, in which three different neural networks, LSTM, GRU and spatial causal convolution, are combined to simultaneously extract features, and the neural network is subjected to Dropout and batch normalization.

[0022] Preferably, the step S4 specifically includes:

[0023] The 1DCNN-NLSTM-XGBoost neural network model is used for training.

[0024] Preferably, the nested modules of NLSTM are as follows:

[0025]

[0026] in, Update the door for the interior, is the internal output gate, For the internal forget gate, To reset the hidden state internally, is the new memory sill, σ is the sigmoid activation function, With c <t-1>< / t-1> Together, as the input of the inner LSTM, It is used as the output of the internal LSTM.

[0027] In the second aspect, a digital twin system based on deep learning is provided, including:

[0028] An outlier prediction module, used to predict outliers for collected sensor data;

[0029] An outlier fusion module is used to perform adaptive weighted fusion on sensor data after outlier prediction;

[0030] A data expansion module is used to expand the fused sensor data using a diffusion model;

[0031] The model training module is used to train the neural network model using the expanded data.

[0032] In a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the digital twin method is implemented.

[0033] In a fourth aspect, a terminal is provided, comprising a memory and a processor, wherein the memory stores computer instructions executable on the processor, and the processor executes the digital twin method when executing the computer instructions.

[0034] It should be further explained that the technical features corresponding to the above options can be combined or replaced with each other to form a new technical solution if there is no conflict.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] The present invention solves the problem of inaccurate sensor data collection faced by existing digital twin systems through outlier detection and adaptive weighted fusion; solves the problem of insufficient training data through data expansion; and uses an improved neural network model for training to make the digital twin system more accurate and efficient, which is of great significance to the development of digital twin technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A flow chart of a digital twin method based on deep learning shown in an embodiment of the present invention;

[0038] Figure 2This is a building environment intelligent control system shown in an embodiment of the present invention. DETAILED DESCRIPTION

[0039] The technical solution of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0040] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0041] Example 1

[0042] In an exemplary embodiment, referring to Figure 1 , a digital twin method based on deep learning is provided, the method comprising the following steps:

[0043] S1, predicting outliers for the collected sensor data;

[0044] S2, adaptively weighted fusion of sensor data after outlier prediction;

[0045] S3, using diffusion model to perform data expansion on the fused sensor data;

[0046] S4. Use the expanded data to train the neural network model.

[0047] Specifically, in actual digital twin systems, there are generally multiple sensors. In the data collection stage, in order to enhance the accuracy of the data, the abnormal values ​​of the sensors are predicted based on the temporal and spatial correlations between the sensors, and the abnormal and missing data are supplemented. At the same time, for multiple sensors, the adaptive weighted fusion method is used to fuse the values ​​of multiple sensors, so as to more accurately reflect the situation of the detection environment. This improves the accuracy of the data generated in the diffusion stage and the accuracy of the prediction in the training stage.

[0048] Furthermore, the step S1 specifically includes:

[0049] S11. Use the spatial correlation of the sensors to predict the outlier value of a certain sensor and obtain the spatial prediction value of the outlier value. Specifically, since there is an approximately linear correlation between adjacent sensors, the linear regression equation can be used to predict the outlier value and obtain the spatial prediction value of the outlier value. Assuming that there are n+1 sensors in total, the sensor with the outlier value is set as the n+1th sensor, then the prediction value of the sensor is The calculation is as follows:

[0050]

[0051] in, x i represents the position of the i-th sensor, y i represents the measurement value of the i-th sensor, i∈(1,n),

[0052] S12. Use the time correlation of the sensor to predict the abnormal value of a certain sensor and obtain the time prediction value of the abnormal value. Specifically, since the measured value of the sensor changes with time, that is, the measured value of the sensor has an approximately linear correlation with time, the first-order autoregressive time correlation prediction algorithm can be used to predict the abnormal value. The time prediction value of the abnormal value The calculation is as follows:

[0053]

[0054] in, represents the autocorrelation coefficient of the sample, ε t+1 is the random interference at time t+1, assuming it is standard normal noise, X ij is the measurement value of the i-th sensor at time j;

[0055] S13. Utilize the correlation between heterogeneous sensors to predict the abnormal value of a certain sensor and obtain the heterogeneous sensor prediction value of the abnormal value. Specifically, since there is a linear correlation between different environmental parameters, for example, indoor humidity is negatively correlated with indoor temperature, the linear regression equation can be used to predict the abnormal value. Assuming that there are the measurement values ​​of the sensor and its heterogeneous sensor at time t+1, the time when the abnormal value appears is set to t+1, and the sensor prediction value of the abnormal value is The calculation is as follows:

[0056]

[0057] in x i represents the measured value of the sensor at time i, y i represents the measurement value of the heterogeneous sensor corresponding to time i, i∈(1,t),

[0058] S14, taking an average of the obtained spatial prediction value of the outlier value, the temporal prediction value of the outlier value, and the heterogeneous sensor prediction value of the outlier value to obtain a final prediction value. Specifically, taking an average of the obtained spatial prediction value of the outlier value, the temporal prediction value of the outlier value, and the heterogeneous sensor prediction value of the outlier value, the final prediction value of the sensor outlier value is calculated as follows:

[0059]

[0060] Furthermore, the step S2 specifically includes:

[0061] The final predicted value is adaptively weighted fused, the variance of the initial value measured by each sensor is calculated, the optimal weight is obtained by calculating the total mean square error of the initial value, and the optimal value after fusion is obtained by multiplying the optimal weight with the initial value. Specifically, the optimal value The calculation is as follows:

[0062]

[0063] Among them, A i is the measurement value of the i-th sensor, is the optimal weight, σ i 2 is the variance of the measurement value of the i-th sensor.

[0064] Furthermore, since the detection data of some sensors changes slowly, it is impossible to obtain a large amount of training data through experiments in a short time, so a diffusion model is used to expand the data. Specifically, the diffusion model is a denoising diffusion probability model, which includes a forward process and a reverse process. The step S3 specifically includes:

[0065] S31, perform the forward process of the diffusion model; this is a noise-adding process based on the Markov hypothesis. In the forward process, Gaussian noise with a specific mean and standard deviation is continuously added to the data;

[0066] S32, the reverse process of the diffusion model is to try to restore the original data and generate similar new data. In the reverse process, it is necessary to build a parameterized neural network to try to restore the original data and generate similar new data to achieve data expansion. Then, a multi-model fusion neural network is used to combine LSTM, GRU and spatial causal convolution, three different neural networks, to extract features at the same time, and perform Dropout and batch normalization on the neural network. Specifically, it includes:

[0067] S321, randomly divide the training set into three parts of equal size, use training set 1 and training set 2 as input of LSTM neural network, use training set 1 and training set 3 as input of GRU, use training set 2 and training set 3 as input of void causal convolutional neural network, perform feature extraction on three different neural network models respectively, and extract implicit features inside the training data;

[0068] S322, performing Dropout and normalized BN on the neural network to prevent overfitting problems;

[0069] S323, combining the extracted different features;

[0070] S324, using a feature screening method based on an improved Kmeans clustering algorithm to perform feature screening, specifically as follows:

[0071] First, k points in the high-density area are randomly selected as the initial centroids, where k is the number of classification categories and the feature set is {x1,x2,x3...x n}, n is the number of features, μ kt is the centroid, t represents the number of iterations;

[0072] Then, the initial classification is performed based on the Euclidean distance from the point to the centroid. After the initial classification is completed, the weighted mean of each point in each class is calculated as the new centroid. The Euclidean distance between two points is calculated as follows:

[0073]

[0074] Among them, the weight is determined according to the importance of the feature, and the importance of the feature is represented by the SHAP value. The SHAP value is an indicator used to measure the influence of the feature on the prediction result. A positive SHAP value indicates that the feature has a positive influence on the prediction result, and a negative SHAP value indicates that the feature has a negative influence on the prediction result. The absolute value of each feature SHAP value {|SHAP1|,|SHAP2|......|SHAP n |}, the weight of feature i is The new centroid is the weighted mean of each feature, calculated as follows:

[0075]

[0076] Continue to iterate and update until the new and old clusters are the same and the clustering is completed;

[0077] Finally, feature screening is performed, retaining the feature with the closest Euclidean distance to the centroid in each category, and determining the Euclidean distance between the remaining features. Among the groups of features with the shortest Euclidean distance between two features, one feature is randomly deleted, thereby achieving feature screening.

[0078] S325. Input the filtered features into the fully connected layer to obtain the final prediction result.

[0079] Furthermore, the step S4 specifically includes:

[0080] The 1DCNN-NLSTM-XGBoost neural network model is used for training. The details are as follows:

[0081] S41, input the training data into one-dimensional convolution, and perform convolution operation through 1D-CNN, so as to extract the characteristics of temperature change from multiple angles;

[0082] S42, using a nested long short-term memory recursive neural network (NLSTM) network for training. This neural network model nests a modified LSTM in the LSTM to calculate a new memory state, which can extract higher-level temperature and humidity change features;

[0083] S43, the nested module of NLSTM is used to calculate the new memory state. This module contains a modified LSTM, which is defined as the internal LSTM. The calculation is as follows:

[0084]

[0085]

[0086] in, Update the door for the interior, is the internal output gate, For the internal forget gate, To reset the hidden state internally, is the new memory sill, σ is the sigmoid activation function, With c <t-1>< / t-1> Together, as the input of the inner LSTM, Then it is used as the output of the internal LSTM;

[0087] S44, the overall NLSTM expression is as follows:

[0088] Γ u =σ(ω u [a <t-1>< / t-1> , x <t>< / t> ]+b u )

[0089] Γ f =σ(ω f [a <t-1>< / t-1> , x <t>< / t> ]+b f )

[0090] Γ o =σ(ω o [a <t-1>< / t-1> , x <t>< / t> ]+b o )

[0091]

[0092] a <t>< / t> =Γ o *tanh(c <t>< / t> )

[0093] S45. Use the output of NLSTM as the input of XGBoost, continue training, and finally obtain and output the training results.

[0094] Preferably, the nested modules of NLSTM are as follows:

[0095]

[0096] in, Update the door for the interior, is the internal output gate, For the internal forget gate, To reset the hidden state internally, is the new memory sill, σ is the sigmoid activation function, With c <t-1>< / t-1> Together, as the input of the inner LSTM, It is used as the output of the internal LSTM.

[0097] This embodiment first predicts the abnormal values ​​of sensors and supplements abnormal and missing data according to the spatiotemporal correlation between sensors in order to enhance the accuracy of data during the data collection phase. At the same time, for multiple sensors, an adaptive weighted fusion method is used to fuse the values ​​of multiple sensors, thereby more accurately reflecting the status of the detected object. Both operations can make the data more accurate and reliable, thereby improving the accuracy of data generated during the diffusion phase and the accuracy of prediction during the training phase.

[0098] Then in the data enhancement stage (diffusion stage), since the training stage requires a large number of data sets as support, but the change of temperature and humidity is a slow process, it is impossible to obtain a large amount of training data in a short time, so the data enhancement method is used to expand the data set. The data expanded by the generative adversarial network has common homogeneity and low data quality. Therefore, a denoising diffusion probability model is adopted. The model includes a forward process and a reverse process. The forward process is to add Gaussian noise to the data, and the reverse process is to try to restore the original data and generate similar new data. This process requires neural network training. The neural network of this process is innovated. LSTM, GRU and spatial causal convolution are used for feature extraction at the same time, and Dropout and BN are used for normalization to prevent overfitting problems. After the extracted features are combined and screened, they are input into the fully connected layer for training. This improves the accuracy of model training and the quality of generated data. Further, the accuracy of the training stage is improved and the overfitting problem in the training stage is reduced.

[0099] Example 2

[0100] Based on the same inventive concept as in Example 1, a digital twin system based on deep learning is provided, comprising:

[0101] An outlier prediction module, used to predict outliers for collected sensor data;

[0102] An outlier fusion module is used to perform adaptive weighted fusion on sensor data after outlier prediction;

[0103] A data expansion module is used to expand the fused sensor data using a diffusion model;

[0104] The model training module is used to train the neural network model using the expanded data.

[0105] Among them, each module implements the function corresponding to each step in Example 1.

[0106] Example 3

[0107] Based on the inventive concept of Example 1, this example illustrates the present invention with the practical application of the digital twin system in intelligent control of building environment. Specifically, refer to Figure 2 , provides a building environment intelligent control system, the system includes a temperature and humidity control module, a lighting control module, an air quality control module and an elevator flow control module; the temperature and humidity control module is used to achieve the optimal environmental temperature and humidity through intelligent control of environmental equipment, and expand the data set and train the neural network according to the environmental parameters of indoor and outdoor temperature and humidity and outdoor wind speed. The input is indoor temperature, indoor humidity, outdoor temperature, and outdoor humidity. The output is air-conditioning temperature, air-conditioning wind speed, whether the air-conditioning dehumidification function is turned on, whether the humidifier is turned on, and whether the window is opened, so as to realize the intelligent control of the air conditioner, humidifier and window;

[0108] The light control module is used to intelligently adjust the switch of lighting fixtures to achieve the effect of saving energy consumption, monitor the light intensity in the building environment, and automatically adjust the switch of lighting fixtures according to the light intensity;

[0109] The air quality control module is used to intelligently adjust the purification intensity of the air purifier, monitor the air pollution index in the building environment, and automatically adjust the intensity of the air purifier according to the size of the air pollution index;

[0110] The elevator flow control module is used to issue personnel diversion reminders to reasonably distribute the flow of people entering the elevator, monitor the congestion level of each elevator in the building, and issue reminders to provide elevator options with lower congestion levels.

[0111] Each module is independent of each other, realizing a comprehensive and complete digital twin system for intelligent control of the building environment. It can realize intelligent adjustment of the building environment, so as to accurately find the optimal environmental parameters, achieve the most suitable environmental state for the human body, and achieve the effect of precise energy saving and emission reduction.

[0112] Furthermore, taking the implementation of the temperature and humidity control module as an example, the application process of the method of Example 1 in temperature and humidity data processing is explained.

[0113] First, the temperature and humidity control module specifically uses the following method to collect data:

[0114] A1. Use various sensors in buildings to collect data;

[0115] A2. For corridors and halls with multiple sensors, the collected data sets need to be processed, including predicting outliers in the data sets and performing adaptive weighted fusion of data from multiple sensors.

[0116] The temperature and humidity control module specifically expands the data set in the following manner:

[0117] B1. Perform the forward process of the diffusion model, which is a noise-adding process based on the Markov hypothesis. In the forward process, Gaussian noise with a specific mean and standard deviation is continuously added to the data;

[0118] B2. Perform the reverse process of the diffusion model. This is a process of trying to restore the original data and generate similar new data. In the reverse process, it is necessary to build a parameterized neural network to try to restore the original data and generate similar new data to achieve data expansion. Then use a multi-model fusion neural network combined with LSTM, GRU and spatial causal convolution to train the neural network.

[0119] The temperature and humidity control module specifically uses the following method to train the neural network model:

[0120] C1. Input the temperature and humidity data, including indoor temperature, outdoor temperature, indoor humidity, outdoor temperature, air-conditioning temperature, air-conditioning wind speed, air-conditioning dehumidification function, humidifier switch, and window switch, into the 1DCNN-NLSTM-XGBoost neural network model for training.

[0121] In this technical solution, the accuracy of digital twin simulation is improved by processing the data collected by the sensors. First, the spatial correlation and temporal correlation between sensors, as well as the linear relationship between heterogeneous sensors, are used to predict the abnormal value or missing value of a certain sensor, thereby improving the accuracy of data collection; for multiple sensors in the corridor and hall, an adaptive weighted fusion algorithm is used to fuse the measurement values ​​of each sensor, and the most accurate multi-sensor fusion value is obtained by finding the optimal weight. In the temperature control module, the processed data will be input into the neural network model for deep learning to obtain the control strategy for achieving the optimal environmental temperature and humidity. However, the directly obtained training data has the problem of insufficient quantity. To address this problem, the training set needs to be expanded. Since the data generated by the generative network adversarial model has problems such as data homogeneity and low data quality, a denoising diffusion probability model with stronger generalization ability is adopted. The diffusion model includes a forward process and a reverse process. The forward process is the process of continuously adding noise to the original data, and the reverse process is the process of trying to restore the original data through neural network training. Since the temperature and humidity data have both temporal correlation and spatial correlation, Therefore, for this neural network, a multi-model fusion approach is adopted. The temporal features in the data are extracted through the GRU model and the LSTM model, and the spatial features in the data are extracted through the void causal convolution model. The void causal convolution can expand the receptive field of the convolution kernel without increasing the amount of calculation, while maintaining the temporal causal relationship of the sequence data. In the process of training these neural networks, the Dropout method and normalization method are used at the same time to reduce overfitting; these features extracted by the neural network are combined for feature screening, and a feature screening method based on the improved Kmeans clustering algorithm is adopted. The importance of the features and the correlation between the features are considered at the same time to improve the effectiveness and accuracy of feature screening.After the data set is expanded, it is input into the 1DCNN-NLSTM-XGBoost neural network model for training. First, the training data is convolved through 1D-CNN, which can extract the characteristics of temperature and humidity changes from multiple angles. At the same time, the temperature and humidity changes belong to sequence data, so the nested long short-term memory recursive neural network NLSTM is used for training. The characteristic of this neural network is that a modified LSTM is nested in the LSTM to calculate the new memory state, which increases the depth of the model and can extract higher-level temperature and humidity change characteristics, thereby improving the accuracy of the prediction. Then the output of NLSTM is used as the input of XGBoost to continue training. Compared with other neural network models, the advantage of XGBoost is that it can automatically process missing values ​​in the data, making the prediction more accurate and avoiding tree overfitting. In XGBoost, the importance of features can be calculated to automatically assign weights, and the weighted average can be calculated according to the weights, so that the training results are more accurate. Finally, XGBoost is good at processing multidimensional data, more suitable for this scenario, and has better performance. Therefore, XGBoost is used for the final training.

[0122] Furthermore, the data collection method in A1 is:

[0123] The building contains multiple rooms. For ordinary rooms, each room needs to be equipped with a temperature sensor, a humidity sensor to measure the indoor temperature and humidity, and a door and window sensor to detect the opening and closing of windows; for corridors and halls, multiple temperature sensors and humidity sensors are required, and each sensor needs to be separated by a certain distance; each floor needs to be installed with an outdoor temperature sensor and an outdoor humidity sensor to measure the outdoor temperature and humidity. After collecting these data, a data set containing the environmental parameters of each room is formed;

[0124] Furthermore, the data processing method in A2 is:

[0125] A201. Use the spatial correlation of sensors to predict the abnormal value of a certain sensor. Since there is an approximately linear correlation between adjacent sensors, the linear regression equation can be used to predict the abnormal value and obtain the spatial prediction value of the abnormal value. Assuming that there are n+1 sensors in total, the sensor with an abnormal value is set as the n+1th sensor, then the prediction value of the sensor is The calculation is as follows:

[0126]

[0127] in, x i represents the position of the i-th sensor, y i represents the measurement value of the i-th sensor, i∈(1,n),

[0128] A202. Use the time correlation of the sensor to predict the abnormal value of a certain sensor. Since the measured value of the sensor changes with time, that is, the measured value of the sensor has an approximately linear correlation with time, the first-order autoregressive time correlation prediction algorithm can be used to predict the abnormal value. The time prediction value of the abnormal value The calculation is as follows:

[0129]

[0130] in, represents the autocorrelation coefficient of the sample, ε t+1 is the random interference at time t+1, assuming it is standard normal noise, X ij is the measurement value of the i-th sensor at time j;

[0131] A203. Use the correlation between heterogeneous sensors to predict the abnormal value of a sensor. Since there is a linear correlation between different environmental parameters, such as the negative correlation between indoor humidity and indoor temperature, the linear regression equation can be used to predict the abnormal value. Assuming that there are the measurement values ​​of the sensor and its heterogeneous sensor at time t+1, the time when the abnormal value appears is set to t+1, and the sensor prediction value of the abnormal value The calculation is as follows:

[0132]

[0133] in x i represents the measured value of the sensor at time i, y i represents the measurement value of the heterogeneous sensor corresponding to time i, i∈(1,t),

[0134] A204. The obtained spatial prediction value of the outlier value, the temporal prediction value of the outlier value, and the heterogeneous sensor prediction value of the outlier value are averaged, and the final prediction value of the sensor outlier value is calculated as follows:

[0135]

[0136] A205: Adaptively weight the sensor data after outlier prediction, calculate the variance of the initial value measured by each sensor, and obtain the optimal weight by calculating the total mean square error of the initial value. Multiply the optimal weight by the initial value to obtain the optimal value after fusion. The calculation is as follows:

[0137]

[0138] Among them, A i is the measurement value of the i-th sensor, is the optimal weight, σ i 2 is the variance of the measurement value of the i-th sensor.

[0139] In this technical solution, it should be noted that in practical applications, the data required by the digital twin system needs to be acquired by a large number of sensors. In the process of sensor data collection, due to various environmental factors and sensor failure factors, the sensor's measured values ​​will often be abnormal or missing. For these abnormal and missing situations, this solution uses the spatial correlation and temporal correlation between sensors, as well as the linear relationship between heterogeneous sensors, to predict the abnormal value or missing value of a certain sensor, thereby improving the accuracy of data collection. For situations such as corridors and halls that require multi-sensor fusion, an adaptive weighted fusion algorithm is used. This algorithm does not require any prior knowledge of the sensor measurement data, and can fuse the data fusion value with the minimum variance, making the fusion value more accurate.

[0140] Furthermore, the reverse process of the diffusion model in B2 is specifically as follows:

[0141] B201. Randomly divide the training set into three parts of equal size. Use training set 1 and training set 2 as the input of LSTM neural network, use training set 1 and training set 3 as the input of GRU, and use training set 2 and training set 3 as the input of void causal convolutional neural network. Perform feature extraction on three different neural network models to extract implicit features in the training data.

[0142] B202, perform Dropout and normalization BN on the neural network to prevent overfitting problems;

[0143] B203, combining the extracted different features;

[0144] B204. Feature screening is performed using a feature screening method based on an improved Kmeans clustering algorithm, as follows:

[0145] First, k points in the high-density area are randomly selected as the initial centroids, where k is the number of classification categories and the feature set is {x1,x2,x3...x n}, n is the number of features, μ kt is the centroid, t represents the number of iterations;

[0146] Then, the initial classification is performed based on the Euclidean distance from the point to the centroid. After the initial classification is completed, the weighted mean of each point in each class is calculated as the new centroid. The Euclidean distance between two points is calculated as follows:

[0147]

[0148] Among them, the weight is determined according to the importance of the feature, and the importance of the feature is represented by the SHAP value. The SHAP value is an indicator used to measure the influence of the feature on the prediction result. A positive SHAP value indicates that the feature has a positive influence on the prediction result, and a negative SHAP value indicates that the feature has a negative influence on the prediction result. The absolute value of each feature SHAP value {|SHAP1|,|SHAP2|......|SHAP n |}, the weight of feature i is The new centroid is the weighted mean of each feature, calculated as follows:

[0149]

[0150] Continue to iterate and update until the new and old clusters are the same and the clustering is completed;

[0151] Finally, feature screening is performed, retaining the feature with the closest Euclidean distance to the centroid in each category, and determining the Euclidean distance between the remaining features. Among the groups of features with the shortest Euclidean distance between two features, one feature is randomly deleted, thereby achieving feature screening.

[0152] B205. Input the filtered features into the fully connected layer to obtain the final prediction result.

[0153] In this technical solution, it should be noted that since the temperature and humidity data have both temporal correlation and spatial correlation, for this neural network, a multi-model fusion method is adopted. The temporal features in the data are extracted through the GRU model and the LSTM model, and the spatial features in the data are extracted through the void causal convolution model. The void causal convolution can expand the receptive field of the convolution kernel without increasing the amount of calculation, while maintaining the temporal causal relationship of the sequence data. In the process of training these neural networks, the Dropout method and the normalization method are used at the same time to reduce overfitting; these features extracted by the neural network are combined and then feature screening is performed. The feature screening method based on the improved Kmeans clustering algorithm is adopted, and the importance of the features and the correlation between the features are considered at the same time to improve the effectiveness and accuracy of feature screening.

[0154] Furthermore, the training process of the 1DCNN-NLSTM-XGBoost neural network model in C1 is specifically as follows:

[0155] C101, input the training data into one-dimensional convolution, and perform convolution operation through 1D-CNN, which can extract the characteristics of temperature change from multiple angles;

[0156] C102, using a nested long short-term memory recursive neural network (NLSTM) network for training. This neural network model nests a modified LSTM in the LSTM to calculate a new memory state, which can extract higher-level temperature and humidity change features;

[0157] C103, the nested module of NLSTM is used to calculate the new memory state. This module contains a modified LSTM, which is defined as the internal LSTM. The calculation is as follows:

[0158]

[0159] in, Update the door for the interior, is the internal output gate, For the internal forget gate, To reset the hidden state internally, is the new memory sill, σ is the sigmoid activation function, With c <t-1>Together, as the input of the inner LSTM, Then it is used as the output of the internal LSTM;

[0160] C104, the overall NLSTM expression is as follows:

[0161] Γ u =σ(ω u [a <t-1>< / t-1> , x <t>< / t> ]+b u )

[0162] Γ f =σ(ω f [a <t-1>< / t-1> , x <t>< / t> ]+b f )

[0163] Γ o =σ(ω o [a <t-1>< / t-1> , x <t>< / t> ]+b o )

[0164]

[0165] a <t>< / t> =Γ o *tanh(c <t>< / t> )

[0166] C105. Use the output of NLSTM as the input of XGBoost, continue training, and finally obtain and output the training results.

[0167] In this technical solution, it should be noted that the training data can be convolved through 1D-CNN to extract the characteristics of temperature and humidity changes from multiple angles; the nested long short-term memory recursive neural network NLSTM is used for training. The characteristic of this neural network is that a modified LSTM is nested in the LSTM to calculate the new memory state, which increases the depth of the model and can extract higher-level temperature and humidity change characteristics, thereby improving the accuracy of the prediction; the output of NLSTM is used as the input of XGBoost to continue training. Compared with other neural network models, the advantage of XGBoost is that it can automatically handle missing values ​​in the data. , which makes up for the problem of data loss during data collection and transmission in the digital twin system; at the same time, XGBoost is optimized on the basis of GBDT, such as using the second-order derivative to make the loss function more accurate in prediction, and using regularization terms to avoid tree overfitting; in XGBoost, trees with high gains are given greater weights, so the importance of features can be calculated to automatically assign weights, and the weighted average is calculated according to the weights, so that the training results are more accurate; finally, for the scenario where temperature and humidity can only be controlled, the input to the neural network model is multi-dimensional data, and XGBoost is better at processing multi-dimensional data and has better performance; therefore, XGBoost is used for the final training.

[0168] Furthermore, the sensor data processing methods involved in the remaining modules are similar to those of the temperature and humidity control module, which will not be elaborated here. The specific implementation methods of the remaining modules are described below.

[0169] Among them, the light control module is used to intelligently adjust the switch of lighting fixtures. Multiple light intensity sensors are installed in the rooms of the building, and the detected light intensity is fed back to the control center to determine whether the light intensity is greater than the predefined threshold. If it is greater than the threshold, the corresponding lighting fixture is turned off, and if it is less than the threshold, the corresponding lighting fixture is turned on. If there is only one lighting fixture in the room, the average value of the light intensity detected by multiple light sensors is taken. If there are multiple lighting fixtures in the room, the corresponding light sensor should be installed near each lighting fixture.

[0170] The air quality control module is used to intelligently adjust the purification intensity of the air purifier. An air quality sensor is installed in each room of the building. Once an hour, the detected air quality index is fed back to the control center. If the air quality index is greater than the predefined threshold, it means that the air quality has deteriorated, and the air purifier in the corresponding room is adjusted up one gear; if the air quality index is less than the threshold, it means that the air quality is normal, and the air purifier in the corresponding room is adjusted down one gear;

[0171] The elevator flow control module is used to monitor the congestion level of each elevator in the building, issue reminders, and provide options for less crowded elevators. Since the elevator itself has a camera, the elevator camera image can be directly fed back to the control center. Computer vision technology is used to detect the degree of congestion in the elevator. First, the elevator image is preprocessed, and the degree of congestion in the elevator car is determined based on the preprocessed image in the elevator car. The target detection algorithm is used to identify the passengers in the elevator, estimate the density of the passengers in the elevator, and calculate the number of passengers in the elevator to determine the degree of congestion in the elevator. If the congestion level is higher than the threshold, a congestion reminder will be returned to the elevator and displayed on the screen at the elevator entrance on each floor to guide passengers to take another relatively less crowded elevator instead.

[0172] Example 4

[0173] Based on the same inventive concept as Example 1, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the digital twin method provided by the embodiment of the present invention is implemented. Based on such an understanding, the technical solution of this embodiment is essentially or partly contributed to the prior art or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0174] Example 5

[0175] Based on the same inventive concept as Example 1, a terminal is provided, including a memory and a processor, wherein the memory stores computer instructions that can be executed on the processor, and the processor executes the digital twin method provided in the embodiment of the present invention when running the computer instructions.

[0176] The processor may be a single-core or multi-core central processing unit or a specific integrated circuit, or one or more integrated circuits configured to implement the present invention.

[0177] Embodiments of the subject matter and functional operations described in this specification may be implemented in: tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or a combination of one or more of them. Embodiments of the subject matter described in this specification may be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier to be executed by a data processing device or to control the operation of the data processing device. Alternatively or additionally, the program instructions may be encoded on an artificially generated propagated signal, such as a machine-generated electrical, optical, or electromagnetic signal, which is generated to encode and transmit information to a suitable receiver device for execution by the data processing device.

[0178] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuits, such as FPGAs (field programmable gate arrays) or ASICs (application-specific integrated circuits), and the apparatus can also be implemented as special purpose logic circuits.

[0179] Processors suitable for executing computer programs include, for example, general and / or special microprocessors, or any other type of central processing unit. Typically, the central processing unit will receive instructions and data from a read-only memory and / or a random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, the computer will also include one or more large-capacity storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or the computer will be operably coupled to this large-capacity storage device to receive data from it or to transmit data to it, or both. However, the computer does not necessarily have such a device. In addition, the computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, just to name a few.

[0180] It should be understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0181] The above specific implementation methods are detailed descriptions of the present invention. It cannot be determined that the specific implementation methods of the present invention are limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions and substitutions can be made without departing from the concept of the present invention, which should be regarded as belonging to the protection scope of the present invention.

Claims

1. A digital twin method based on deep learning, characterized in that: The method comprises the following steps: S1, predicting outliers for the collected sensor data; S2, adaptively weighted fusion of sensor data after outlier prediction; S3, using diffusion model to perform data expansion on the fused sensor data; S4. Use the expanded data to train the neural network model.

2. The deep learning-based digital twin method according to claim 1, characterized in that: The step S1 specifically includes: S11, using the spatial correlation of the sensor, predicting the abnormal value of a certain sensor to obtain a spatial prediction value of the abnormal value; S12, using the time correlation of the sensor, predicting the abnormal value of a certain sensor to obtain a time prediction value of the abnormal value; S13, using the correlation between the heterogeneous sensors, predicting the abnormal value of a certain sensor, and obtaining the heterogeneous sensor prediction value of the abnormal value; S14, taking an average of the obtained spatial prediction value of the outlier value, the temporal prediction value of the outlier value, and the heterogeneous sensor prediction value of the outlier value to obtain a final prediction value.

3. The deep learning-based digital twin method according to claim 2, characterized in that: The step S2 specifically includes: The final predicted value is adaptively weighted fused, the variance of the initial value measured by each sensor is calculated, the optimal weight is obtained by calculating the total mean square error of the initial value, and the optimal value after fusion is obtained by multiplying the optimal weight with the initial value.

4. The deep learning-based digital twin method according to claim 1, characterized in that: The diffusion model is a denoised diffusion probability model.

5. The deep learning-based digital twin method according to claim 4, characterized in that: The step S3 specifically includes: S31, perform the forward process of the diffusion model; S32. Perform the reverse process of the diffusion model, in which three different neural networks, LSTM, GRU and spatial causal convolution, are combined to simultaneously extract features, and the neural network is subjected to Dropout and batch normalization.

6. The deep learning-based digital twin method according to claim 1, characterized in that: The step S4 specifically includes: The 1DCNN-NLSTM-XGBoost neural network model is used for training.

7. The deep learning-based digital twin method according to claim 6, characterized in that: The nested modules of NLSTM are as follows: in, Update the door for the interior, is the internal output gate, For the internal forget gate, To reset the hidden state internally, is the new memory sill, σ is the sigmoid activation function, With c <t-1>< / t-1> Together, as the input of the inner LSTM, It is used as the output of the internal LSTM.

8. A digital twin system based on deep learning, characterized in that: include: An outlier prediction module, used to predict outliers for collected sensor data; An outlier fusion module is used to perform adaptive weighted fusion on sensor data after outlier prediction; A data expansion module is used to expand the fused sensor data using a diffusion model; The model training module is used to train the neural network model using the expanded data.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the digital twin method described in any one of claims 1 to 7 is implemented.

10. A terminal comprising a memory and a processor, wherein the memory stores computer instructions that can be executed on the processor, characterized in that: When the processor runs computer instructions, it executes the digital twin method described in any one of claims 1 to 7.

Citation Information

Cited By

  • Data acquisition processing method and system based on digital twin platform

    CN118898206A

  • Risk prediction and emergency navigation system based on digital twin and AI video linkage

    CN121638903A