Method and system for predicting environmental parameters of Yungang grotto based on artificial neural network
By using a CNN-LSTM neural network model and a Bayesian optimization algorithm, the time dependence and hyperparameter optimization problems in the prediction of environmental parameters of grotto cultural relics were solved, achieving high-precision and stable prediction and providing a scientific basis for cultural relic protection.
Patent Information
- Application Number
- CN202411021895.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2025-01-07
AI Technical Summary
Existing technologies struggle to accurately predict changes in environmental parameters of grotto artifacts, particularly neglecting long-term dependence over time and low efficiency in hyperparameter optimization, resulting in insufficient model prediction accuracy and stability.
A CNN-LSTM neural network model combined with Bayesian optimization (BO) is used to collect data from sensors, construct a data sample set, optimize hyperparameters, and improve the prediction accuracy and stability of the model. Feature information is extracted using convolutional kernels and LSTM layers, and the hyperparameter combination is optimized by combining Bayesian optimization algorithm to achieve efficient prediction.
It significantly improves the accuracy and stability of environmental parameter prediction for grotto cultural relics, provides more scientific protection measures, and extends the lifespan of cultural relics.
Smart Images

Figure CN119271986A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of neural network prediction algorithm, and in particular to a method and system for predicting environmental parameters of Yungang Grottoes based on artificial neural network. Background Art
[0002] In recent years, a series of achievements have been made in the study of the weathering of grotto cultural relics. Through the accumulation of these research results, we have not only deepened our understanding of the weathering process of grotto cultural relics and their relationship with environmental factors, but also provided important scientific basis and technical support for the protection and restoration of grotto cultural relics. In short, the research and prediction of grotto cultural relics environmental parameters not only has important practical significance for the protection of grotto cultural relics, but also provides reference and reference for the protection of other types of cultural relics.
[0003] Deep learning theory has unique advantages in data analysis with its powerful modeling advantages and data processing capabilities. Deep learning technology is increasingly used in the industrial field to process large amounts of information data, and model parameter prediction is no exception. The most critical feature of CNN is the weight sharing structure of convolution, which reduces the complexity of the neural network model while greatly reducing the number of parameters of the neural network and preventing overfitting. However, CNN can only train and identify static features of the data. This structure ignores the long-term dependencies between sequence data at the time level, making CNN limited in processing long sequences. Long Short-Term Memory (LSTM), proposed by Hochreiter et al., is an improved RNN that is very suitable for processing time series data. It can store longer memories than RNN. LSTM can learn long-term dependencies as an inherent part of its structure. In addition, it solves the key problems of gradient explosion and gradient disappearance in RNN, providing excellent results and performance.
[0004] Generally speaking, more nodes and deeper network layers will lead to better learning and fitting, but will significantly increase the number of hyperparameters. Hyperparameters include the number of nodes per layer, the number of iterations, and the learning rate, which are a set of parameters set before model training begins. Different combinations of hyperparameters affect the smoothness and accuracy of the model, and the combination pattern between them cannot be predicted. Evaluating each hyperparameter combination requires multiple iterative calculations, which takes a lot of time, but the adjustment of hyperparameters is a necessary step.
[0005] The BO algorithm is an efficient global optimization algorithm whose ultimate goal is to find the global optimal solution to the optimization problem. The BO algorithm began to take off in the 1970s. With the rapid development of deep learning and optimization, the BO algorithm has gradually become a research hotspot. The BO algorithm is widely used to solve complex and high-dimensional optimization problems, especially in hyperparameter optimization of machine learning models, neural network structure search, and automated machine learning. The BO algorithm finds the optimal solution to the objective function with minimal evaluation and without a large number of sampling points. It is very suitable for solving complex optimization problems with unknown objective function expressions and expensive evaluations.
[0006] Despite the rich research results, the research on the comprehensive effects of multiple factors on cave weathering is still relatively limited. Based on the measured data of Cave 10 of Yungang Grottoes from July 1 to October 1, 2023, this study takes the wall temperature, air temperature and air humidity in the cave as the research objects, and constructs a combined model based on BO-CNN-LSTM to predict the environmental parameters of the caves, and the final result is better than the traditional neural network model. This model comprehensively considers the effects of multiple environmental factors, provides a new prediction tool for the protection of cave cultural relics, helps to more accurately predict the changing trends of environmental parameters, and provides a scientific basis for selecting reasonable protection measures. Summary of the invention
[0007] In view of the above-mentioned existing problems, the present invention provides a scientific basis for cultural relics protection and ensures the safety of cultural heritage by accurately predicting the environmental parameters inside and outside the caves; adopts the CNN-LSTM neural network model and combines it with the Bayesian optimization (BO) algorithm to solve the problem that traditional methods are difficult to accurately predict environmental changes; collects data through sensors, constructs a data sample set after preprocessing, and uses the CNN-LSTM model to extract features, learn sequence information, and finally output predicted values; the BO algorithm optimizes hyperparameters, improves the prediction accuracy and stability of the model, effectively reduces the impact of environmental factors on cave cultural relics, and provides technical support for formulating reasonable protection measures.
[0008] In order to solve the above technical problems, a prediction method of Yungang Grottoes environmental parameters based on artificial neural network is proposed, including:
[0009] Sensors are used to collect and preprocess the environmental parameters of the outside and inside of the caves, and the preprocessed data are used to construct a data sample set. A CNN-LSTM network prediction model is built based on the sample set, the hyperparameters of the prediction model are established, and the combination range of the hyperparameters to be optimized is set, and the BO algorithm is executed on the hyperparameters. According to the probability model acquisition function, the next set of hyperparameters is selected for a new round of training until the number of iterations is reached and the predicted value is output.
[0010] As a preferred scheme of the Yungang Grottoes environmental parameter prediction method based on artificial neural network described in the present invention, the environmental parameters include atmospheric pressure, external wind speed, external temperature, external humidity, cave temperature, cave humidity, wall temperature, and the collected data is preprocessed to construct a data sample set, and the data in the sample set is divided into a training set and a test set in a ratio of 7:3 for training and testing.
[0011] As a preferred solution of the Yungang Grottoes environmental parameter prediction method based on artificial neural network described in the present invention, wherein: the construction of the CNN-LSTM network prediction model includes, in the CNN-LSTM parameter prediction model, the number of layers of the network model is divided into seven layers, including an input layer, a CNN convolution layer, a CNN pooling layer, two LSTM layers, an FC layer and an output layer.
[0012] The convolution layer of CNN uses wide convolution kernels to obtain a relatively large perceptual field and extract feature information; the pooling layer uses maximum pooling to retain the essential feature information.
[0013] The learning of feature sequence information is introduced into the two-layer LSTM network model, and the fully connected layer is used to convert the previous feature data in the network into the final prediction value, thereby completing the parameter prediction output.
[0014] The sample set is input into the CNN convolution layer, and the convolution kernel is used to adaptively extract data features. The extracted features are subjected to the maximum pooling operation in the pooling layer to reduce the data dimension and retain the main feature information. The main feature data after dimensionality reduction is used as the input of the LSTM layer to automatically learn the data features. The fully connected layer is used to convert the previous feature data in the network into the final prediction value to complete the parameter prediction.
[0015] The combination interval of the hyperparameters to be optimized includes selecting four hyperparameters including the number of convolution kernels, the initial learning rate, the regularization coefficient, and the number of neurons in the LSTM.
[0016] The four optimization ranges are: the number of convolution kernels is [16, 64], the initial learning rate is [10 -4 , 10 -2 ], and the regularization coefficient is [10 -4 , 10 -2 ], and the number of neurons in LSTM is [20, 100].
[0017] As a preferred solution of the method for predicting the environmental parameters of Yungang Grottoes based on artificial neural network described in the present invention, wherein: the hyperparameter execution BO algorithm includes selecting the best performance of the next point evaluation model from the observation data set D 1:t Obtained, the posterior distribution structure is obtained by maximizing the evaluation point x t+1To guide:
[0018]
[0019] Among them, v* is the current optimal function value, is the probability density function of the standard normal distribution, μ(x) is the mean of the predicted results, σ t (x) is the standard deviation of the prediction results.
[0020] As a preferred solution of the Yungang Grottoes environmental parameter prediction method based on artificial neural network described in the present invention, the output prediction value includes, if the optimized hyperparameter combination does not meet the maximum number of iterations of 30 times, resetting the hyperparameter interval and performing BO algorithm optimization again to find the optimal hyperparameter combination to meet the maximum number of iterations of 30 times.
[0021] When the hyperparameter combination meets the maximum number of iterations of 30 times, the CNN-LSTM model is trained using the training set of the current hyperparameter combination, and the accuracy value is determined based on the evaluation index. If the accuracy does not meet the requirements, the model returns to the previous layer, modifies the original network structure, adds a convolution layer and a LSTM layer to the CNN, adds a Dropout layer between the LSTM layers, performs L1 regularization and ElasticNet regularization adjustments, outputs the adjustment results, and re-judges whether the accuracy is met.
[0022] If the accuracy meets the requirements, it means that the current BO-CNN-LSTM model has the ability to predict parameters. The test set is used as the input probability model, and the parameter prediction results of the output layer verify the model performance.
[0023] As a preferred solution of the method for predicting the environmental parameters of the Yungang Grottoes based on artificial neural network described in the present invention, wherein: the probability model acquisition function includes, the mean of the prior distribution is 0:
[0024] p(f|X,θ)=N(0,∑)
[0025] Where f is the set of unknown function f values, X is the training set, θ is the hyperparameter, k(x,x′) is the covariance function, and Σ is the covariance matrix composed of k(x,x′).
[0026] When the noise ε satisfies a Gaussian distribution with the same independent distribution, the likelihood distribution is:
[0027] p(y|f)=N(f,σ 2 I)
[0028] Among them, y = f(x) + ε, ε is the random error, p(ε) = N(0,σ 2 ), y is the set of observations y, and I is the identity matrix.
[0029] The predicted distribution results are as follows:
[0030] p(f * |X,y,X * )=N( <f * .,cov(f * ))
[0031] Among them, X * represents the predicted input, <f * > is the predicted mean, cov <f * > is the prediction covariance.
[0032] As a preferred solution of the method for predicting the environmental parameters of the Yungang Grottoes based on artificial neural network described in the present invention, the method of determining the accuracy value according to the evaluation index includes giving the same weight to all individual errors:
[0033]
[0034]
[0035]
[0036]
[0037] When the prediction errors of all BO-CNN-LSTM models for different parameter categories were kept below 1.5, it indicated that the performance of environmental parameter prediction was enhanced after the optimization of the BO algorithm.
[0038] Among them, MAE is the mean absolute error, RMSE is the root mean square error, MAPE is the mean absolute percentage error, R 2 Coefficient of determination, y p Represents the predicted value of the prediction model, y m Indicates the measured value of the sensor, i.e. the true value, y avg represents the average value of the measured values, and n represents the number of measurements.
[0039] Another object of the present invention is to provide a Yungang Grottoes environmental parameter prediction system based on an artificial neural network. The present invention constructs a CNN-LSTM neural network model by collecting and preprocessing key environmental data such as atmospheric pressure, wind speed, temperature, humidity, etc. of the grottoes, thereby solving the problem that traditional monitoring methods cannot accurately predict environmental changes and improving the accuracy and timeliness of environmental parameter predictions; through intelligent prediction and analysis, reasonable cultural relics protection measures are formulated to reduce the impact of environmental factors on grotto cultural relics and ensure the safety and inheritance of cultural heritage.
[0040] As a preferred solution of the Yungang Grottoes environmental parameter prediction system based on artificial neural network described in the present invention, it is characterized by including a data acquisition and preprocessing module, a model building and training module and a model testing module.
[0041] The data acquisition and preprocessing module uses sensors to collect environmental parameters outside and inside the caves, preprocesses the collected data, eliminates noise and outliers, and ensures data quality; constructs a data sample set, and divides the data sample set into a training set and a test set in a ratio of 7:3 to train and verify the model.
[0042] The model building and training module builds a neural network model based on CNN-LSTM, sets the initial combination interval of the model hyperparameters, and executes the Bayesian optimization BO algorithm to optimize the hyperparameters. In each iteration, the next set of hyperparameters is selected according to the probability model acquisition function, and the model is trained using the training set until the set number of iterations is reached or the stopping condition is met. The accuracy of the model is determined by the evaluation index, and the model structure is adjusted.
[0043] The model testing module uses the optimized hyperparameter combination and the trained CNN-LSTM model to predict the environmental parameters to be predicted, takes the test set as input, obtains the predicted output of the model, and compares it with the actual measured value, calculates the prediction error and performance evaluation index to evaluate the prediction performance of the model.
[0044] A computer device includes a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of the method described in the prediction of Yungang Grottoes environmental parameters based on artificial neural network are implemented.
[0045] A computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of the method described in predicting the environmental parameters of the Yungang Grottoes based on an artificial neural network are implemented.
[0046] Beneficial effects of the present invention: The LSTM, CNN-LSTM and BO-CNN-LSTM models of the present invention exhibit different performances. Due to the inability to effectively model time correlation, the training accuracy and convergence speed of the LSTM model are relatively poor. The CNN-LSTM model integrates CNN and LSTM networks, and improves the LSTM model by extracting features from time series data, which helps to better understand time correlation. However, the performance of the CNN-LSTM model depends on the hyperparameter setting, which needs to be optimized to enhance its efficacy. The BO-CNNLSTM model combines the Bayesian optimization algorithm, significantly improves the hyperparameter optimization, and has superior performance indicators compared with the CNN-LSTM model. The BO-CNN-LSTM model shows higher accuracy, stability and generalization ability in predicting the internal environmental parameters of the cave. This study provides a convincing case for the application of advanced machine learning technology in cultural heritage protection. By cleverly predicting environmental parameters that are critical to the protection of the Yungang Grottoes, the BO-CNN-LSTM model provides a novel and efficient tool for heritage protectors. Its ability to capture and predict microclimate changes within the caves with high accuracy will enable the development of more informed and proactive conservation strategies, potentially extending the life of these valuable historical sites. Further research should explore the integration of additional data sources and environmental factors into the predictive model to improve its comprehensiveness and accuracy. Exploration of other advanced machine learning and deep learning techniques, as well as refinement of hyperparameter optimization methods, could provide new insights and improvements. Furthermore, application of the model to other cultural heritage sites with similar conservation needs could validate its effectiveness and adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work, among which:
[0048] Figure 1 An overall flow chart of a method for predicting Yungang Grottoes environmental parameters based on an artificial neural network provided in one embodiment of the present invention.
[0049] Figure 2 A network structure diagram of a CNN-LSTM model of a Yungang Grottoes environmental parameter prediction method based on an artificial neural network provided in one embodiment of the present invention.
[0050] Figure 3 A structural diagram of the BO-CNN-LSTM prediction model of a Yungang Grottoes environmental parameter prediction method based on an artificial neural network provided in one embodiment of the present invention.
[0051] Figure 4 A system solution flow chart of a Yungang Grottoes environmental parameter prediction system based on an artificial neural network provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0053] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0054] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it an embodiment that is mutually exclusive with other embodiments, either individually or selectively.
[0055] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0056] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0057] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0058] Example 1, reference Figure 1-Figure 3 , which is the first embodiment of the present invention, provides a method for predicting environmental parameters of Yungang Grottoes based on an artificial neural network, comprising:
[0059] S1: Use sensors to collect environmental parameters outside and inside the caves and preprocess them, and construct a data sample set with the preprocessed data.
[0060] Furthermore, the environmental parameters include atmospheric pressure, external wind speed, external temperature, external humidity, cave temperature, cave humidity, and wall temperature. After preprocessing the collected data, a data sample set is constructed, and the data in the sample set is divided into a training set and a test set in a ratio of 7:3 for training and testing.
[0061] Furthermore, preprocessing is performed to eliminate outliers in each time series. Values exceeding three times the standard deviation of the mean are considered outliers, and then these values are replaced by non-outlier values closest to their positions in the time series. Other problems related to the absence of data in certain specific time intervals are solved by applying an interpolation method based on a moving average of a variable-length sliding window. For small data missing, a window size equal to 6 measurements is used, but for large data missing, the window resolution is increased as needed. By trying different window sizes, the interpolation bias is reduced without losing important information. A window size of 6 measurements is used in the present invention.
[0062] In order to obtain better model performance and achieve sufficient convergence, the data is normalized. In the present invention, the data is standardized by subtracting the minimum value from each time series and then dividing it by the difference between the maximum and minimum values. The standardized data is scaled to the interval [0,1].
[0063] S2: Build a CNN-LSTM network prediction model based on the sample set, establish the hyperparameters of the prediction model, set the combination range of the hyperparameters to be optimized, and execute the BO algorithm on the hyperparameters.
[0064] CNN-LSTM parameter prediction model is as follows Figure 2As shown in the figure, applying the CNN-LSTM model to the prediction of the internal environmental parameters of the cave increases the number of hyperparameters in the model. It takes multiple iterative calculations to evaluate each hyperparameter combination, which consumes time and energy. Therefore, the present invention introduces a global optimization algorithm, the BO algorithm, to select the hyperparameter combination of the model. The BO algorithm is based on Bayes' theorem and uses a probabilistic proxy model to fit the objective function. In addition, the most likely points are evaluated and analyzed based on the relevant results. In the evaluation process, historical information is integrated to reduce the number of evaluations and improve search efficiency.
[0065] Furthermore, in the CNN-LSTM parameter prediction model, the network model has seven layers, including an input layer, a CNN convolutional layer, a CNN pooling layer, two LSTM layers, an FC layer, and an output layer.
[0066] The convolution layer of CNN uses wide convolution kernels to obtain a large perceptual field and extract feature information. The pooling layer uses maximum pooling to retain essential feature information.
[0067] The learning of feature sequence information is introduced into the two-layer LSTM network model, and the fully connected layer is used to convert the previous feature data in the network into the final prediction value, thereby completing the parameter prediction output.
[0068] The sample set is input into the CNN convolution layer, and the convolution kernel is used to adaptively extract data features. The extracted features are subjected to the maximum pooling operation in the pooling layer to reduce the data dimension and retain the main feature information. The main feature data after dimensionality reduction is used as the input of the LSTM layer to automatically learn the data features. The fully connected layer is used to convert the previous feature data in the network into the final prediction value to complete the parameter prediction.
[0069] The combination interval of the hyperparameters to be optimized includes selecting four hyperparameters including the number of convolution kernels, the initial learning rate, the regularization coefficient, and the number of neurons in the LSTM.
[0070] The four optimization ranges are: the number of convolution kernels is [16, 64], the initial learning rate is [10 -4 , 10 -2 ], and the regularization coefficient is [10 -4 , 10 -2 ], and the number of neurons in LSTM is [20, 100].
[0071] It should be noted that if Figure 3 As shown, the BO algorithm is executed, the BO-CNN-LSTM prediction model structure is constructed, and the next point is selected to evaluate the best performance of the model. 1:t Obtained, the posterior distribution structure is obtained by maximizing the evaluation point x t+1 To guide:
[0072]
[0073] Among them, v* is the current optimal function value, is the probability density function of the standard normal distribution, μ(x) is the mean of the predicted results, σ t (x) is the standard deviation of the prediction results.
[0074] It should also be noted that if the optimized hyperparameter combination does not meet the maximum number of iterations of 30 times, the hyperparameter interval is reset and the BO algorithm is optimized again to find the optimal hyperparameter combination to meet the maximum number of iterations of 30 times.
[0075] When the hyperparameter combination meets the maximum number of iterations of 30 times, the CNN-LSTM model is trained using the training set of the current hyperparameter combination, and the accuracy value is determined based on the evaluation index. If the accuracy does not meet the requirements, the model returns to the previous layer, modifies the original network structure, adds a convolution layer and a LSTM layer to the CNN, adds a Dropout layer between the LSTM layers, performs L1 regularization and ElasticNet regularization adjustments, outputs the adjustment results, and re-judges whether the accuracy is met.
[0076] If the accuracy meets the requirements, it means that the current BO-CNN-LSTM model has the ability to predict parameters. The test set is used as the input probability model, and the parameter prediction results of the output layer verify the model performance.
[0077] S3: Select the next set of hyperparameters according to the probability model acquisition function for a new round of training until the number of iterations is reached and the predicted value is output.
[0078] Furthermore, the mean of the prior distribution is 0:
[0079] p(f|X,θ)=N(0,∑)
[0080] Where f is the set of all function values in the unknown function f(x), X is the training set, θ is the hyperparameter, k(x,x′) is the covariance function, and Σ is the covariance matrix composed of k(x,x′).
[0081] When the noise ε satisfies a Gaussian distribution with the same independent distribution, the likelihood distribution is:
[0082] p(y|f)=N(f,σ 2 I)
[0083] Among them, y = f(x) + ε, ε is the random error, p(ε) = N(0,σ 2 ), y is the set of observations y, and I is the identity matrix.
[0084] The predicted distribution results are as follows:
[0085] p(f * |X,y,X * )=N( <f * .,cov(f * ))
[0086] Among them, X * represents the predicted input, <f * > is the predicted mean, cov <f * > is the prediction covariance.
[0087] It should be noted that determining the accuracy value according to the evaluation index includes giving the same weight to all individual errors:
[0088]
[0089]
[0090]
[0091]
[0092] When the prediction errors of all BO-CNN-LSTM models for different parameter categories were kept below 1.5, it indicated that the performance of environmental parameter prediction was enhanced after the optimization of the BO algorithm.
[0093] Among them, MAE is the mean absolute error, RMSE is the root mean square error, MAPE is the mean absolute percentage error, R 2 Coefficient of determination, y p Represents the predicted value of the prediction model, y m Indicates the measured value of the sensor, i.e. the true value, y avg represents the average value of the measured values, and n represents the number of measurements.
[0094] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0095] Embodiment 2, the third embodiment of the present invention, is different from the first two embodiments in that:
[0096] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0097] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0098] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0099] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0100] Example 3, reference Figure 4 , which is the fourth embodiment of the present invention, provides a Yungang Grottoes environmental parameter prediction system based on artificial neural network, including a data acquisition and preprocessing module, a model building and training module, and a model testing module.
[0101] The data acquisition and preprocessing module uses sensors to collect environmental parameters outside and inside the caves, preprocesses the collected data, eliminates noise and outliers, and ensures data quality; constructs a data sample set, and divides the data sample set into a training set and a test set in a ratio of 7:3 to train and verify the model.
[0102] The model building and training module builds a neural network model based on CNN-LSTM, sets the initial combination interval of the model hyperparameters, and executes the Bayesian optimization BO algorithm to optimize the hyperparameters. In each iteration, the next set of hyperparameters is selected according to the probability model acquisition function, and the model is trained using the training set until the set number of iterations is reached or the stopping condition is met. The accuracy of the model is determined by the evaluation index, and the model structure is adjusted.
[0103] The model testing module uses the optimized hyperparameter combination and the trained CNN-LSTM model to predict the environmental parameters to be predicted, takes the test set as input, obtains the predicted output of the model, and compares it with the actual measured value, calculates the prediction error and performance evaluation index to evaluate the prediction performance of the model.
[0104] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for predicting environmental parameters of Yungang Grottoes based on artificial neural network, characterized by: include, The environmental parameters of the cave's exterior and interior are collected and preprocessed using sensors, and the preprocessed data are used to construct a data sample set; Construct a CNN-LSTM network prediction model based on the sample set, establish the hyperparameters of the prediction model, set the combination range of the hyperparameters to be optimized, and execute the BO algorithm on the hyperparameters; According to the probability model acquisition function, the next set of hyperparameters is selected for a new round of training until the number of iterations is reached and the predicted value is output.
2. The method for predicting Yungang Grottoes environmental parameters based on artificial neural network as claimed in claim 1, characterized in that: The environmental parameters include atmospheric pressure, external wind speed, external temperature, external humidity, cave temperature, cave humidity, and wall temperature. After preprocessing the collected data, a data sample set is constructed, and the data in the sample set is divided into a training set and a test set in a ratio of 7:3 for training and testing.
3. The method for predicting Yungang Grottoes environmental parameters based on artificial neural network as claimed in claim 2, characterized in that: The construction of the CNN-LSTM network prediction model includes: in the CNN-LSTM parameter prediction model, the number of layers of the network model is divided into seven layers, including an input layer, a CNN convolution layer, a CNN pooling layer, two LSTM layers, an FC layer and an output layer; The convolution layer of CNN uses wide convolution kernels to obtain a large perceptual field and extract feature information; the pooling layer uses maximum pooling to retain essential feature information; The learning of feature sequence information is introduced into the two-layer LSTM network model, and the fully connected layer is used to convert the previous feature data in the network into the final prediction value, thereby completing the parameter prediction output; The sample set is input into the CNN convolution layer, and the convolution kernel is used to adaptively extract data features. The extracted features are subjected to the maximum pooling operation in the pooling layer to reduce the data dimension and retain the main feature information. The main feature data after dimensionality reduction is used as the input of the LSTM layer to automatically learn the data features. The fully connected layer is used to convert the previous feature data in the network into the final prediction value to complete the parameter prediction; The combination interval of the hyperparameters to be optimized includes selecting four hyperparameters including the number of convolution kernels, the initial learning rate, the regularization coefficient, and the number of neurons in the LSTM; The four optimization ranges are: the number of convolution kernels is [16, 64], the initial learning rate is [10 -4 , 10 -2 ], and the regularization coefficient is [10 -4 , 10 -2 ], and the number of neurons in LSTM is [20, 100].
4. The method for predicting the environmental parameters of Yungang Grottoes based on artificial neural network as claimed in claim 3 is characterized in that: The hyperparameters for executing the BO algorithm include selecting the next point to evaluate the best performance of the model from the observation dataset D 1:t The posterior distribution structure is obtained by maximizing the evaluation point x t+1 To guide: Among them, v* is the current optimal function value, is the probability density function of the standard normal distribution, μ(x) is the mean of the predicted results, σ t (x) is the standard deviation of the prediction results.
5. The method for predicting Yungang Grottoes environmental parameters based on artificial neural network as claimed in claim 4, characterized in that: The output prediction value includes, if the optimized hyperparameter combination does not meet the maximum number of iterations of 30 times, resetting the hyperparameter interval and optimizing the BO algorithm again to find the optimal hyperparameter combination to meet the maximum number of iterations of 30 times; When the hyperparameter combination meets the maximum number of iterations of 30 times, the CNN-LSTM model is trained using the training set of the current hyperparameter combination, and the accuracy value is determined based on the evaluation index. If the accuracy does not meet the requirements, the model returns to the previous layer, modifies the original network structure, adds a convolution layer and an LSTM layer to the CNN, adds a Dropout layer between the LSTM layers, performs L1 regularization and ElasticNet regularization adjustments, outputs the adjustment results, and re-judges whether the accuracy is met; If the accuracy meets the requirements, it means that the current BO-CNN-LSTM model has the ability to predict parameters. The test set is used as the input probability model, and the parameter prediction results of the output layer verify the model performance.
6. The method for predicting the environmental parameters of Yungang Grottoes based on artificial neural network as claimed in claim 5, characterized in that: The probability model acquisition function includes, the mean of the prior distribution is 0: p(f|X,θ)=N(0,∑) Where f is the set of unknown function f values, X is the training set, θ is the hyperparameter, k(x,x′) is the covariance function, and Σ is the covariance matrix composed of k(x,x′); When the noise ε satisfies a Gaussian distribution with the same independent distribution, the likelihood distribution is: p(y|f)=N(f,σ 2 I) Among them, y = f(x) + ε, ε is the random error, p(ε) = N(0,σ 2 ), y is the set of observations y, and I is the identity matrix; The predicted distribution results are as follows: p(f * |X,y,X * )=N( <f * .,the(f * )) Among them, X * represents the predicted input, <f * > is the predicted mean, cov <f * > is the prediction covariance.
7. The method for predicting the environmental parameters of Yungang Grottoes based on artificial neural network as claimed in claim 6, characterized in that: Determining the accuracy value according to the evaluation index includes giving the same weight to all individual errors: When the prediction errors of all BO-CNN-LSTM models for different parameter categories were kept below 1.5, it showed that the performance of environmental parameter prediction was enhanced after the optimization of BO algorithm; Among them, MAE is the mean absolute error, RMSE is the root mean square error, MAPE is the mean absolute percentage error, R 2 Coefficient of determination, y p Represents the predicted value of the prediction model, y m Indicates the measured value of the sensor, i.e. the true value, y avg represents the average value of the measured values, and n represents the number of measurements.
8. A system using the Yungang Grottoes environmental parameter prediction method based on artificial neural network as claimed in any one of claims 1 to 7, characterized in that: It includes data collection and preprocessing module, model building and training module and model testing module; The data acquisition and preprocessing module uses sensors to collect environmental parameters outside and inside the caves, preprocesses the collected data, eliminates noise and outliers, and ensures data quality; constructs a data sample set, and divides the data sample set into a training set and a test set at a ratio of 7:3 to train and verify the model; The model building and training module builds a neural network model based on CNN-LSTM, sets the initial combination interval of the model hyperparameters, and executes the Bayesian optimization BO algorithm to optimize the hyperparameters. In each iteration, the next set of hyperparameters is selected according to the probability model acquisition function, and the model is trained using the training set until the set number of iterations is reached or the stopping condition is met. The accuracy of the model is determined by the evaluation index, and the model structure is adjusted; The model testing module uses the optimized hyperparameter combination and the trained CNN-LSTM model to predict the environmental parameters to be predicted, takes the test set as input, obtains the predicted output of the model, and compares it with the actual measured value, calculates the prediction error and performance evaluation index to evaluate the prediction performance of the model.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for predicting the environmental parameters of the Yungang Grottoes based on an artificial neural network as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for predicting the environmental parameters of the Yungang Grottoes based on an artificial neural network as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Hyper-parameter tuning method of nuclear power plant neural network model and related device
CN120851726A
A method and related device for hyperparameter tuning of a neural network model of a nuclear power plant
CN120851726B
Bionic robot cluster dance motion consistency correction method based on state feedback
CN122378754A