A dust early warning method
Through the integrated method of multivariate Kalman filtering and LSTM and FFNN networks, the problem of insufficient timeliness and accuracy of existing dust warning methods is solved, the accuracy of dust prediction and environmental factors are improved, and more accurate early warning is achieved. .
Patent Information
- Application Number
- CN202410660121.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-05-27
AI Technical Summary
The existing dust warning methods have poor timeliness and accuracy at the construction site, and their impact on environmental factors is ignored, resulting in insufficient prediction accuracy.
Multivariate Kalman filtering is used to combine LSTM and FFNN networks to integrate dust monitoring data and environmental data. The noise and outliers are removed through iterative least squares filtering, and the long-term trend and nonlinear relationship are captured by LSTM and FFNN respectively, and the weighted average is used to capture the long-term trend and nonlinear relationships. Generate a final predictive model.
It improves the accuracy and robustness of dust prediction, enhances the consideration of environmental factors, and improves the timeliness and accuracy of early warnings.
Smart Images

Figure CN118568412B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of dust prediction, and in particular to a dust early warning method. Background Art
[0002] With the acceleration of urbanization, construction activities are becoming more frequent, and the resulting dust pollution problem is becoming increasingly prominent. Construction dust refers to dust particles generated during the construction process that pollute the atmosphere, mainly including dust from the exposed ground at the construction site, dust from the material yard, and dust from material transportation. Dust pollution not only affects atmospheric visibility and air quality, but also causes harm to human health, especially inhalable particulate matter PM10 and fine particulate matter PM2.5. In order to effectively prevent and control construction dust pollution, it is necessary to monitor and warn the dust concentration in real time, and take dust reduction measures such as sprinkling water and covering in time.
[0003] At present, a lot of research and practice have been carried out on construction dust pollution warning. The traditional method is mainly to install dust monitoring equipment at the construction site and trigger the warning by monitoring the dust concentration exceeding the standard. However, this type of method can only perform lagging processing after the dust concentration exceeds the standard, and the timeliness and accuracy of the warning are poor. In recent years, some studies have attempted to introduce machine learning algorithms to analyze historical dust monitoring data through modeling and predict the dust concentration trend in the future, in order to provide early warning. However, most of the existing dust prediction models only consider the time series characteristics of the dust itself, ignoring the impact of environmental factors (such as temperature and humidity) on dust, and lack control over the quality of monitoring data, resulting in insufficient prediction accuracy. In addition, most existing methods use a single prediction model, and the generalization performance and robustness of the model need to be improved.
[0004] In the related art, for example, Chinese patent document CN109932988B provides a system and method for predicting the spread of dust pollution in cities, including a dust pollution spread prediction center and front-end online monitoring equipment located in different dust emission areas of the city; the dust pollution spread prediction center is connected to each front-end online monitoring equipment respectively; the front-end online monitoring equipment is used to collect dust information and meteorological information from different areas of the city, and transmit it to the dust pollution spread prediction center in real time; the dust pollution spread prediction center is used to predict the spread of dust pollution in various areas of the city based on the dust information and meteorological information uploaded by the front-end online monitoring equipment, and to issue dust pollution warnings based on the prediction results. The front-end online monitoring equipment collects dust information and meteorological information from different areas of the city, and transmits it to the dust pollution spread prediction center in real time. However, dust data may have problems such as noise, outliers and missing values, and directly using the original data for prediction may affect the accuracy of the warning. Therefore, the dust prediction accuracy of this scheme needs to be further improved. Summary of the invention
[0005] In view of the problem of low dust warning accuracy in the prior art, the present application provides a dust warning method, which improves the dust prediction accuracy through multivariate Kalman filtering processing, LSTM and FFNN network integration.
[0006] The purpose of this application is achieved through the following technical solutions.
[0007] The present specification provides a dust early warning method, including: deploying multiple dust monitoring nodes at a construction site, each monitoring node including a dust sensor and a meteorological sensor, the dust sensor collects dust data including fine particulate matter PM2.5 and inhalable particulate matter PM10; the meteorological sensor collects environmental data including ambient temperature and ambient humidity; setting an edge computing node at each monitoring node, and using a multivariate Kalman filtering algorithm based on iterative least squares method to filter the collected dust data and environmental data; and uploading the filtered data to a cloud server; on the cloud server, using the filtered environmental data and dust data as input, sampling a long short-term memory neural network LSTM and a forward feedback neural network FFNN to train two prediction sub-models respectively; wherein the LSTM sub-model is used to obtain the long-term change trend of the dust data, and the FFNN sub-model is used to obtain the nonlinear mapping relationship between the dust data and the environmental data; integrating the LSTM sub-model and the FFNN sub-model by weighted averaging to generate a final dust prediction model; and using the dust prediction model to predict the dust concentration in the future.
[0008] Among them, the multivariate Kalman filter algorithm based on iterative least squares combines iterative least squares with the Kalman filter algorithm to estimate the system state when there is a linear relationship between multiple variables. The algorithm estimates the unknown parameters in the state space model through iterative least squares, and then substitutes the estimated parameter values into the Kalman filter algorithm to filter and estimate the system state. Compared with the traditional Kalman filter algorithm, the multivariate Kalman filter algorithm based on iterative least squares can process multiple variables at the same time and adaptively adjust the model parameters to improve the accuracy of filter estimation. In dust monitoring, the algorithm can be used to filter the collected dust data and environmental data, remove measurement noise and outliers, and obtain more accurate and stable data estimates. Feed-Forward Neural Network (FFNN) is a common artificial neural network structure, also known as Multilayer Perceptron (MLP). In dust prediction, FFNN can be used to establish a nonlinear mapping relationship between dust data and environmental data. By taking filtered environmental data and dust data as input, FFNN can learn the complex relationship between them and predict future dust concentrations based on the input environmental conditions.
[0009] Preferably, the cloud server uses the time series database InfluxDB to store the dust concentration data and environmental data uploaded by each monitoring node, uses the Kafka message queue to cache the real-time prediction results, and uses the MySQL relational database to store the prediction model parameters and metadata.
[0010] Furthermore, a multivariate Kalman filtering algorithm based on iterative least squares method is used to filter the collected dust data and environmental data, including: taking the dust data and environmental data as system state variables and observation variables respectively, and establishing a state space model; according to the state space model, setting the initial state variables, state estimation covariance matrix, process noise covariance matrix and observation noise covariance matrix; at each time k, obtaining the environmental data of the current time k as input, and calculating the state prediction value and state prediction covariance matrix of the current time k according to the state estimation value and state estimation covariance matrix of the previous time k-1; obtaining the dust data of the current time k as the observation value, and calculating the new information vector between the observation value and the state prediction value; using iterative least squares method, recursively updating the optimal estimate of the state variable through the new information vector, and obtaining the state estimation value and state estimation covariance matrix of the current time; outputting the updated state estimation value as the filtered dust data of the current time, and taking the square root of the diagonal elements of the updated state estimation covariance matrix as the standard deviation of the filtering result, which is used to quantify the uncertainty of the estimation; repeating the above steps to filter the dust data and environmental data.
[0011] Among them, the innovation vector, also called the residual vector or measurement residual, refers to the difference between the actual observation value at the current moment and the observation value predicted based on the estimated value at the previous moment in the Kalman filter algorithm. It reflects the deviation or inconsistency between the observation value and the model prediction value. In the Kalman filter algorithm, the innovation vector is used to update the state estimate and the estimated covariance matrix. The formula is as follows: innovation vector = Z(k)-H(k)×X(k|k-1), where Z(k) is the actual observation value at time k, H(k) is the observation matrix, and X(k|k-1) is the state estimate at time k predicted based on the estimated value at time k-1. The information vector is a concept used in the information filter algorithm, which is the dual form of the Kalman filter algorithm. In the information filter algorithm, the update of the state estimate and the estimated covariance matrix is achieved through the information vector and the information matrix. The information vector is a linear function of the state variable, which contains the information about the state variable provided by the observation value. The formula is as follows: innovation vector = H(k)'×R(k) -1×Z(k), where H(k) is the observation matrix, R(k) is the observation noise covariance matrix, and Z(k) is the actual observation value at time k. Although both the innovation vector and the information vector are used to fuse the observation information and the model prediction information and update the state estimate, they differ in algorithm implementation and update methods. The innovation vector is the core concept in the Kalman filter algorithm, which is used to calculate the Kalman gain matrix and update the state estimate; while the information vector is the core concept in the information filter algorithm, which is used to directly update the information matrix and information vector.
[0012] Furthermore, a state space model is established through the following formula: state equation: X(k) = A(k) × X(k-1) + B(k) × U(k) + W(k), observation equation: Z(k) = H(k) × X(k) + V(k); where X(k) is the system state variable at time k, including PM2.5 concentration x1(k) and PM10 concentration x2(k), defined as X(k) = [x1(k), x2(k)]'; U(k) is the system input at time k, including ambient temperature u1(k) and ambient humidity u 2(k), defined as U(k) = [u1(k), u2(k)]'; Z(k) is the observed variable at time k, including the measured values of PM2.5, PM10, temperature and humidity sensors, defined as Z(k) = [z1(k), z2(k), z3(k), z4(k)]'; A(k), B(k) and H(k) are the state transfer matrix, input matrix and observation matrix respectively, which are estimated according to the dynamic characteristics of dust pollution and the correlation between environmental parameters and dust data; W(k) and V(k) are Gaussian white noise.
[0013] Among them, conventional state-space models usually only consider system state variables and observation variables, while ignoring the influence of environmental factors. This scheme takes ambient temperature u1(k) and ambient humidity u2(k) as system input U(k) and incorporates them into the state equation. By introducing environmental factors, the model can capture the impact of environmental conditions on dust pollution and improve the accuracy of state estimation and prediction. Conventional state-space models usually only focus on a single state variable, such as PM2.5 concentration or PM10 concentration. This scheme takes PM2.5 concentration x1(k) and PM10 concentration x2(k) as state variables at the same time to form a state vector X(k). By considering multiple dust indicators, the model can more comprehensively describe the state of dust pollution and capture the correlation and dynamic changes between particles of different particle sizes. Conventional state-space models usually only use the observation value of a single sensor. This scheme incorporates the measurement values of PM2.5, PM10, temperature and humidity sensors into the observation variable Z(k). By fusing multi-sensor observation information, the model can comprehensively utilize the measurement values of different sensors to provide more comprehensive and accurate observation information and improve the reliability of state estimation. Conventional state-space models usually assume that system parameters are fixed, such as the state transfer matrix A, the input matrix B, and the observation matrix H. This scheme sets the system parameters as time-varying matrices A(k), B(k), and H(k), which change with time k. By introducing time-varying system parameters, the model can adapt to the changes in the dynamic characteristics of dust pollution and the correlation between environmental parameters and dust data, and improve the dynamic adaptability of state estimation and prediction. This scheme assumes that the process noise W(k) and the measurement noise V(k) are Gaussian white noise. The Gaussian white noise assumption is one of the basic assumptions of the Kalman filter, which simplifies the statistical characteristics of the noise and makes the derivation and implementation of the Kalman filter more concise.
[0014] Furthermore, the state prediction value and state prediction covariance matrix at the current moment are calculated by the following formula: the ambient temperature u1(k) and ambient humidity u2(k) at moment k are obtained, and the system input vector U(k) is constructed; according to the state estimation value X(k-1) and the state estimation covariance matrix P(k-1) at the previous moment, and the system input U(k) at the current moment, the state prediction value X(k|k-1) and the state prediction covariance matrix P(k|k-1) at the current moment are calculated by the following formula: X(k|k-1)=A(k)×X(k-1)+B(k)×U(k), P(k|k-1)=A(k)×P(k-1)×A(k)'+Q(k-1); wherein Q(k-1) is the process noise covariance matrix at moment k-1, Q(k)=a(k)×Q(k-1), and a(k) is adaptively adjusted according to the size of the new information vector, with a value range of 0 to 1.
[0015] Among them, conventional state prediction usually only considers the state estimation value and state transfer matrix of the previous moment, while ignoring the influence of environmental factors. This scheme introduces the current ambient temperature u1(k) and ambient humidity u2(k) into the state prediction formula to construct the system input vector U(k). By introducing environmental factors, state prediction can consider the impact of environmental conditions on dust pollution and improve the accuracy of prediction. Conventional state prediction usually assumes that the process noise covariance matrix is fixed. This scheme introduces an adaptive factor α(k) to adjust the process noise covariance matrix Q(k). α(k) is adaptively adjusted according to the size of the new information vector (i.e., the difference between the observed value and the predicted value), and the value range is [0, 1]. When the new information vector is large, it indicates that the prediction error is large, α(k) takes a large value, and the process noise covariance matrix is increased to adapt to the uncertainty of the system. When the new information vector is small, it indicates that the prediction error is small, α(k) takes a small value, and the process noise covariance matrix is reduced to improve the accuracy of prediction. By adaptively adjusting the process noise covariance matrix, the model can dynamically adjust the uncertainty of the prediction according to the actual situation, thereby improving the robustness and adaptability of the prediction. Conventional state prediction usually only updates the state prediction value, while ignoring the update of the state prediction covariance matrix. In the update formula of the state prediction covariance matrix, this scheme considers the state estimation covariance matrix P(k-1) at the previous moment and the process noise covariance matrix Q(k-1) at the current moment. By updating the state prediction covariance matrix, the model can transmit the uncertainty information of the state estimation and provide more accurate prior information for subsequent state updates. This scheme uses the time-varying state transfer matrix A(k) and the input matrix B(k) to adapt to the changes in the dynamic characteristics of dust pollution. By introducing time-varying system parameters, the state prediction can be adjusted according to the system characteristics at the current moment, thereby improving the dynamic adaptability of the prediction.
[0016] Furthermore, the iterative least squares method is used to recursively calculate the optimal estimated values of the state variables, update the state estimated values and the state estimated covariance matrix, and use the following formula: obtain the dust concentration observation value and the environmental parameter observation value at time k, and construct the observation vector Z(k); calculate the new information vector (Z(k)-H(k)×X(k|k-1)), that is, the deviation between the observed value and the predicted value; calculate the optimal Kalman gain matrix K(k) based on the state prediction covariance matrix P(k|k-1), the observation matrix H(k) and the observation noise covariance matrix R(k), which is used to weigh the confidence of the model prediction and the observation data. The formula is as follows: K(k)=P(k|k-1)×H(k)'×(H(k)×P(k|k-1)×H(k)'+R(k)) -1, where R(k) is the observation noise covariance matrix at time k, R(k) = (1-α(k)) × R(k-1); using the optimal Kalman gain matrix Kk and the new information vector, update the state estimate X(k) and the state estimate covariance matrix P(k) through the following formula: X(k) = X(k|k-1)+Kk×[Z(k)-H(k)×X(k|k- 1 )],P(k)=[IK(k)×H(k)]×P(k|k-1)×[IK(k)×H(k)]'+K(k)×R(k)×K(k)'; where I is the unit matrix; K(k)' represents the transpose of the Kalman gain matrix; the updated state estimation covariance matrix P(k) quantifies the uncertainty of the estimation result, and the square root of the diagonal elements is the estimated standard deviation; the updated state estimation value X(k) and the state estimation covariance matrix P(k) are used as the prior estimate of the next moment until the data of all moments are processed.
[0017] Among them, the conventional Kalman filter algorithm uses a recursive method to perform state estimation, and only one estimation is performed at each moment. This scheme uses iterative least squares to optimize the state estimate through multiple iterations to obtain a more accurate estimation result. At each moment, the optimal estimate of the state variable is calculated iteratively, and the state estimate and the state estimate covariance matrix are updated. During the iteration process, the model continuously uses the new information vector and the optimal Kalman gain matrix to correct the state estimate until the convergence condition is reached or the maximum number of iterations is reached. Through the iterative least squares method, the model can use the observation information to optimize the state estimate multiple times at each moment to improve the accuracy and reliability of the estimation. When updating the state estimate covariance matrix P(k), this scheme considers the influence of the optimal Kalman gain matrix K(k) and the observation noise covariance matrix R(k). The update formula is: P(k) = [IK(k) × H(k)] × P(k|k-1) × [IK(k) × H(k)]' + K(k) × R(k) × K(k)'. By updating the state estimation covariance matrix, the model can quantify the uncertainty of the estimation results, and the square root of the diagonal elements is the estimated standard deviation. The updated state estimation covariance matrix can be used as a priori estimation for the next moment to convey the uncertainty information of the state estimation. This scheme uses a time-varying observation matrix H(k) to adapt to changes in the dust pollution observation process. By introducing time-varying system parameters, the state estimation can be adjusted according to the observation characteristics of the current moment, improving the dynamic adaptability of the estimation.
[0018] Furthermore, on the cloud server, with environmental data as input and dust data as input, the long short-term memory neural network LSTM and the forward feedback neural network FFNN are sampled to train two prediction sub-models respectively, including: inputting the filtered dust data into the LSTM sub-model, training the LSTM sub-model to learn the long-term time series characteristics and change rules of the dust data; inputting the filtered dust data and the corresponding environmental data into the FFNN sub-model, training the FFNN sub-model to learn the nonlinear mapping relationship between the dust data and the environmental data; cross-validation is used to optimize the hyperparameters of the LSTM and FFNN sub-models through grid search, and the hyperparameters include the number of hidden layers, learning rate and regularization coefficient; using the trained LSTM and FFNN sub-models, respectively predict the dust data trend in the future and the dust data correction value under the environmental data; integrating the prediction results of the LSTM and FFNN sub-models by weighted average to generate the final dust data prediction value.
[0019] Among them, cross-validation is a technique used to evaluate the generalization performance of machine learning models. It divides the dataset into multiple subsets, and then evaluates the performance of the model through multiple iterations of training and testing. Cross-validation methods include k-fold cross-validation, leave-one-out cross-validation, and stratified k-fold cross-validation (applicable to class-imbalanced datasets). Grid search is a technique used to optimize the hyperparameters of machine learning models. Hyperparameters refer to parameters that need to be manually set before training the model, such as the number of hidden layers, learning rate, regularization coefficient, etc. The combined use of cross-validation and grid search can help optimize the hyperparameters of LSTM and FFNN sub-models. Through cross-validation, the performance of the model under different hyperparameter combinations can be more reliably evaluated, reducing the risk of overfitting. Grid search can systematically explore the hyperparameter space, find the optimal hyperparameter combination, and improve the prediction performance of the sub-model. This method helps to improve the accuracy and reliability of dust data prediction.
[0020] Furthermore, an LSTM sub-model is obtained, including: dividing the filtered dust data into multiple time segments according to an adaptive time step, each segment contains dust data at S consecutive moments as an input sample of the LSTM model, and the corresponding dust data at T moments in the future is used as a label of the input sample; constructing an LSTM model, including an input layer, multiple LSTM hidden layers and an output layer; wherein the number of input layer nodes is equal to the time segment length S, the number of LSTM hidden layers and the number of LSTM units in each layer are set according to the scale of the dust data, and the number of output layer nodes is equal to the future prediction time step T; the sampling weighted mean square logarithm error is used as the loss function of the LSTM model, and the LSTM model is trained using the improved Adam algorithm to obtain the trained LSTM sub-model;
[0021] Among them, Weighted Mean Squared Logarithmic Error (WMSLE): Weighted Mean Squared Logarithmic Error is a loss function used to evaluate the performance of prediction models, especially for situations where the target variable has a long-tail distribution or a large range of values. In dust data prediction, since the range of variation of dust concentration may be large, using weighted mean squared logarithmic error as a loss function can effectively balance the prediction errors of different numerical ranges and improve the robustness of the model. Compared with the traditional mean squared error (MSE), the weighted mean squared logarithmic error can map a large range of values to a smaller range by performing a logarithmic transformation on the true value and the predicted value, thereby reducing the difference in prediction errors of different numerical ranges. This is particularly effective when processing data with long-tail distributions.
[0022] Preferably, during the LSTM model training process, the weighted mean square logarithmic error of the adaptive weight is used as the loss function, and its calculation formula is: Among them, L is the value of the loss function, n is the number of training samples, and y i and are the actual dust concentration value of the i-th sample and the LSTM model prediction value, respectively. ε is a small positive constant used to prevent zero values from appearing in logarithmic calculations. i is the adaptive weight coefficient of the i-th sample; the adaptive weight coefficient w i The calculation formula is: Among them, α is a preset positive parameter used to control the size of the weight difference between samples, y j and are the actual dust concentration value of the jth sample and the predicted value of the LSTM model, respectively. ∑(*) represents the sum of all training samples.
[0023] Further, the dust data after filtering is divided into multiple time segments according to the adaptive time step, including: calculating the change rate between the dust data of every two adjacent moments, the change rate is equal to the absolute value of the difference between the dust data value of the next moment and the dust data value of the previous moment divided by the dust data of the previous moment; according to the preset change rate threshold range, all change rates are divided into K intervals, each interval corresponds to a preset time step; traversing each moment of the dust data, according to the change rate of the dust data between the current moment and the next moment, determining the interval in the divided K intervals, and using the time step corresponding to the interval as the adaptive step of the current moment; dividing the dust data into multiple time segments with the adaptive step of each moment as the interval, each time segment contains S continuous dust data; wherein the preset change rate threshold range is [0, r1, r2, ..., r K-1 ,+∞), where r1 to r K-1 is a positive real number, and r1<r2<...... <r K-1 ; Each interval in the change rate threshold range [r i-1 ,r i ) corresponds to a time step of l i , and l1>l2>......>l K .
[0024] Preferably, the filtered dust concentration historical data and the ambient temperature and humidity historical data of the same period are divided according to a fixed time step, and S consecutive dust concentration values and their corresponding ambient temperature and humidity values are selected every W moments as input samples of an LSTM model, and the corresponding dust concentration values at the next T moments are used as labels of the input samples; an LSTM neural network model is built, including an input layer, several LSTM hidden layers and an output layer; wherein the number of nodes in the input layer is equal to S×(D+1), D is the dimension of the ambient temperature and humidity characteristics, the number of layers of the LSTM hidden layer and the number of LSTM units in each layer are set according to the scale and complexity of the input sample, and the number of nodes in the output layer is equal to the future prediction time step T; the output of the last hidden layer of the LSTM model is used as the input of the downstream FFNN model, and the FFNN model is built, including an input layer, several fully connected hidden layers and an output layer; wherein , the number of nodes in the input layer of FFNN is equal to the number of LSTM units in the last hidden layer of LSTM, the number of hidden layers of FFNN and the number of nodes in each layer are set according to the feature dimension of LSTM output, and the number of nodes in the output layer of FFNN is equal to 1, which represents the dust concentration prediction value at the next T moments; the LSTM and FFNN models are cascaded to form a hybrid neural network model, and the smooth L1 loss function is used as the loss function of the hybrid model. The Adam adaptive learning rate optimization algorithm is used for end-to-end training, and the model parameters of LSTM and FFNN are optimized by minimizing the smooth L1 loss between the dust concentration prediction value output by FFNN and the true value; the trained LSTM-FFNN hybrid model is used to predict the new dust concentration data and environmental temperature and humidity data, and the dust concentration prediction value at the next T moments is predicted based on the S dust concentration values at the last W moments and the corresponding environmental temperature and humidity values. The environmental characteristics are introduced into the LSTM sub-model for encoding, which enhances the model's ability to describe the law of dust concentration changes. At the same time, a FFNN sub-model is cascaded after the LSTM sub-model to fuse the time series features extracted by LSTM and generate the final dust concentration prediction value. The entire LSTM-FFNN hybrid model uses a smooth L1 loss function for end-to-end training optimization. The smooth L1 loss takes into account the advantages of both L1 and L2 losses and is relatively robust to abnormal points.
[0025] Furthermore, the improved Adam algorithm is used to train the LSTM model, including: initializing the hyperparameters of the Adam algorithm, the hyperparameters include the initial learning rate η, the exponential decay rate β1 of the first-order moment estimate, the exponential decay rate β2 of the second-order moment estimate, the adaptive learning rate adjustment factor γ and the constant δ; in each round of training iteration, calculating the loss function value L of the current batch and the gradient g of each parameter θ corresponding to the loss function value L t ; For each parameter θ of the LSTM sub-model, update its first-order moment estimate m tand the second moment estimate v t , the formula is as follows: Among them, t is the number of rounds of current training iteration, m t-1 and v t-1 are the first-order moment estimate and the second-order moment estimate of the parameter θ after the last iteration respectively; and are the t-th power of β1 and β2 respectively; for each parameter θ of the LSTM sub-model, calculate its adaptive learning rate η t , the formula is as follows: Using adaptive learning rate η t and the bias-corrected first-order moment estimate m t , second-order moment estimate v t , update each parameter θ of the LSTM sub-model, the formula is as follows: Among them, θ t-1 is the value of parameter θ after the previous iteration; repeat the above steps until the loss function value on the training set converges or reaches the preset number of training rounds.
[0026] The conventional Adam algorithm uses a fixed learning rate that remains unchanged during training. This scheme introduces an adaptive learning rate adjustment factor γ, which is calculated by calculating the adaptive learning rate η t To dynamically adjust the learning rate of each parameter. The calculation formula for the adaptive learning rate is: By adaptively adjusting the learning rate, the learning rate can be dynamically adjusted at different stages of training to accelerate convergence and improve model performance. The introduction of the adaptive learning rate adjustment factor γ enables the algorithm to adaptively adjust the learning rate according to the gradient information and parameter updates during training, thereby improving the stability and efficiency of training. The conventional Adam algorithm does not consider the deviation of the initial estimate when updating the first-order moment estimate and the second-order moment estimate. This scheme updates the first-order moment estimate m t and the second moment estimate v t When the bias correction term is introduced and The update formula of the first-order moment estimate after bias correction is: The update formula of the second-order moment estimate after bias correction is: By introducing the deviation correction term, the impact of the deviation of the initial estimate on the parameter update can be reduced, and the accuracy of the estimate can be improved. In the parameter update formula, a constant δ is introduced as a smoothing term in the denominator. The parameter update formula is: Introducing the constant δ can avoid the situation where the denominator is zero and improve the numerical stability of the algorithm. The constant δ is usually small and will not significantly affect the results of parameter updates, but it can improve the robustness of the algorithm. This solution expands the hyperparameter set of the Adam algorithm by introducing an adaptive learning rate adjustment factor γ. The choice of hyperparameters has an important impact on the performance of the algorithm, and the optimal value needs to be determined through experiments and tuning. Through hyperparameter optimization, the performance and adaptability of the Adam algorithm can be further improved.
[0027] Furthermore, the FFNN sub-model is obtained, including: matching and aligning the filtered dust data and the corresponding environmental data at fixed time intervals, constructing an input sample set, each sample containing the dust data at the current moment and the dust data and environmental data at the past M moments, and the sample label is the dust data sequence of the next N time steps; constructing an FFNN model, including an input layer, multiple residual blocks and an output layer; wherein the number of input layer nodes is (M+1)×(D+2), M is the number of past moments, and D is the number of environmental data features; each residual block contains two fully connected The number of residual blocks and the number of nodes in the fully connected layer in each residual block are set according to the sample set size; the number of output layer nodes is N, which is equal to the number of future prediction time steps; the Huber loss function is sampled as the training target of the FFNN sub-model, and the FFNN sub-model is trained by the mini-batch gradient descent algorithm; the current environmental data and the dust data and environmental data of the past M moments are concatenated as input, and the trained FFNN sub-model is used for prediction to obtain the dust data sequence of the next N time steps.
[0028] Among them, matching and alignment refer to the process of synchronizing and corresponding data from different sources or different sampling frequencies according to timestamps. In dust prediction, dust data and environmental data need to be matched and aligned according to timestamps to ensure that when constructing input samples, the dust data and environmental data contained in each sample are corresponding in time. Through matching and alignment, dust data and environmental data can be combined together at fixed time intervals to form a complete input sample. In this way, during the training and prediction process, the model can simultaneously consider the time correlation of dust data and environmental data to improve the accuracy of prediction. When matching and aligning dust data and environmental data at fixed time intervals, the following technical solutions can be used: timestamp alignment, sliding window, data resampling, or matching) and data aggregation and downsampling. Data aggregation and downsampling include: when the sampling frequency of dust data and environmental data is high, data aggregation and downsampling can be considered to match the required time interval. Aggregate dust and environmental data at fixed time intervals (e.g., every hour) and calculate the average, maximum, minimum, and other statistics for each time interval. The aggregated data represents the overall situation of dust levels and environmental conditions in each time interval. Downsample the aggregated data and select representative data points for each time interval to form matching data pairs.
[0029] The residual block is a structural unit used to build a deep neural network. It solves the gradient vanishing and gradient exploding problems in the deep network training process by introducing residual connections, improving the training efficiency and performance of the network. The Huber loss function is a commonly used loss function for regression problems. It combines the advantages of square loss and absolute loss and is robust to outliers (outliers). The Huber loss function is defined as follows: Among them, y is the true value, f(x) is the predicted value, and δ is a hyperparameter used to control the switching threshold between square loss and absolute loss. When the difference between the predicted value and the true value is less than or equal to δ, the Huber loss function uses square loss, which is similar to the mean square error; when the difference is greater than δ, the Huber loss function uses absolute loss, which is more robust to outliers. By adjusting the value of δ, the sensitivity to outliers and the penalty for small errors can be balanced. In dust prediction, using the Huber loss function as the training target of the FFNN sub-model can improve the robustness of the model to outliers that may exist in dust data while maintaining the ability to fit normal values.
[0030] The mini-batch gradient descent algorithm is a commonly used neural network optimization algorithm that strikes a balance between batch gradient descent and stochastic gradient descent. The mini-batch gradient descent algorithm divides the training data into multiple mini-batches (Mini-Batch), and uses a mini-batch of data to calculate the gradient and update the model parameters in each iteration. Compared with batch gradient descent, the mini-batch gradient descent algorithm reduces the amount of calculation for each iteration and improves training efficiency by using a mini-batch of data to calculate the gradient. At the same time, the gradient calculation of mini-batches is more stable than stochastic gradient descent, reducing the noise of gradient estimation.
[0031] Preferably, the training process of the FFNN sub-model includes: matching and aligning dust data and environmental data, constructing input samples, each sample contains dust data at the current moment and dust and environmental data at the past M moments, and the label is the dust sequence at the next N moments; defining the adaptive Huber loss function as follows: Where y is the true value, f(x) is the predicted value, and δ is the adaptive threshold parameter. The FFNN model is trained using an improved mini-batch gradient descent algorithm: Initialize the FFNN model parameters, set hyperparameters such as batch size B, learning rate α, and momentum factor β. In each training iteration, randomly select B samples to form a mini-batch, and calculate the average adaptive Huber loss and its gradient of the mini-batch. Introduce a momentum term based on Nesterov accelerated gradient (NAG), and use historical gradient information to adjust the current gradient direction and size. Update the FFNN model parameters according to the NAG momentum term and learning rate. Repeat until the preset number of iterations is reached or the early stopping condition is met. Dynamically adjust the value of the adaptive threshold δ to adapt to changes in the error distribution during training: Regularly calculate the median of the current prediction error δ during training. med ; Update δ to δ med With the initial value δ init The weighted average of med +(1-λ)×δ init ; L2 regularization and EarlyStopping strategy are used to prevent model overfitting, and a FFNN sub-model with excellent generalization performance is obtained. The calculation formula of the momentum term m based on NAG is: m t =β×m t-1 +(1-β)×g t , where m t is the momentum term at time t, m t-1 is the momentum term at time t-1, g t is the gradient at time t, and β is the momentum factor. After the gradient is corrected using the NAG momentum term, the parameter update formula is: t =θ t-1 -α×(β×m t +(1-β)×gt ), where θ t is the model parameter at time t, θ t-1 is the model parameter at time t-1, α is the learning rate, and the value range of the weighted average factor λ is (0, 1), with the preferred value being 0.9.
[0032] Compared with the prior art, the advantages of this application are:
[0033] The collected dust and environmental data are preprocessed using edge computing nodes, and filtered using a multivariate Kalman filter algorithm based on iterative least squares method, effectively removing noise and outliers in the data and improving data quality. At the same time, edge computing reduces the pressure of data transmission and improves the real-time and scalability of the system.
[0034] Two complementary prediction sub-models, long short-term memory neural network (LSTM) and feedforward neural network (FFNN), are trained in the cloud. The LSTM sub-model divides the input sequence by adaptive time steps, which can capture the long-term temporal characteristics and change patterns of dust data; the FFNN sub-model introduces a residual connection structure to model the nonlinear relationship between dust data and environmental factors. The two sub-models describe the evolution of dust pollution from the time and space dimensions, and can generate more accurate prediction results.
[0035] When training the LSTM sub-model, an adaptive time step division method and an improved Adam optimization algorithm were used. The adaptive time step is dynamically adjusted according to the rate of change of dust data, which can better adapt to the suddenness and uncertainty of dust pollution; the improved Adam algorithm introduces an adaptive learning rate adjustment strategy, which accelerates the convergence speed and training accuracy of the model.
[0036] The weighted average ensemble learning method is adopted to integrate the prediction results of the two sub-models, LSTM and FFNN, taking advantage of their strengths and making up for their weaknesses. Compared with a single model, it can generate more robust and accurate dust concentration prediction values, thereby improving the overall performance of dust warning.
[0037] By deploying multiple dust monitoring nodes at the construction site and collecting dust data including PM2.5 and PM10 concentrations and environmental temperature and humidity data, we can achieve multi-source heterogeneous data perception and collection of dust pollution and environmental factors, providing comprehensive and reliable data support for subsequent data analysis and prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a schematic diagram of an exemplary application scenario of a dust early warning method according to some embodiments of this specification;
[0039] Figure 2is an exemplary flow chart of a dust early warning method according to some embodiments of this specification;
[0040] Figure 3 is an exemplary flow chart of constructing a Kalman filter algorithm according to some embodiments of this specification;
[0041] Figure 4 This is an exemplary flow chart for constructing a dust prediction model according to some embodiments of this specification. DETAILED DESCRIPTION
[0042] The method and system provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0043] The dust prediction method of this application was used at a foundation pit backfilling site in a central area of a city. Figure 1 is a schematic diagram of an exemplary application scenario of a dust early warning method according to some embodiments of this specification, such as Figure 1As shown in the figure, a particle sensor module is installed in the dust spray shed at the foundation pit backfill site, using a combination of STM32 development board, DHT11 temperature and humidity sensor and GP2Y1014AU dust sensor. The GP2Y1014AU dust sensor detects the PM2.5 concentration in the air passing through the vent by light sensing, and the DHT11 sensor measures the ambient temperature and humidity. The system obtains the air quality data and temperature and humidity data of the current environment in a cycle of 1 second. The STM32 development board reads the data information sent by the GP2Y1014AU and DHT11 sensors and converts this information into digital quantities. The digital data is packaged into a JSON structure, which includes the device ID, current dust concentration and temperature and humidity data. As an edge computing node, the STM32 development board can pre-process the collected data, such as data filtering, outlier removal, etc. The STM32 development board passes the processed JSON data packet to the communication module. The communication module uses the JSON data as a parameter of the POST request and uploads the data to the cloud server through the 5G network. The communication module sends data to the server in a cycle of 1 second. The cloud server receives the dust concentration and environmental data uploaded by the on-site communication module. The server parses, stores, and integrates the received data into the existing historical data. The server runs a pre-trained dust concentration prediction model (such as LSTM and FFNN integrated model) and uses the real-time received data as input to predict the dust concentration trend in the future. Based on the prediction results, it determines whether there is a risk of dust pollution and generates early warning information. The server sends the generated early warning information to the on-site communication module through the 5G network. After receiving the early warning information, the communication module triggers the alarm device, such as sending a reminder to the operator's handheld terminal. At the same time, the communication module feeds back the early warning information to the spray control module. The spray control module automatically turns on the spray facilities according to the early warning level to suppress dust. The operating status data of the spray facilities (such as on / off status, spray intensity, etc.) are sent from the spray control module to the communication module. The communication module uploads the equipment operating status data to the cloud server. After receiving the feedback data from the equipment, the server correlates it with the actual measured value of the dust concentration and evaluates the actual effect of the early warning model. Based on the evaluation results, the server can further optimize and update the prediction model to improve the accuracy of early warning.
[0044] Figure 2This is an exemplary flow chart of a dust early warning method shown in some embodiments of the present specification, a dust early warning method, comprising: deploying multiple dust monitoring nodes at a construction site, each monitoring node comprising a dust sensor and a meteorological sensor, the dust sensor collecting dust data including fine particulate matter PM2.5 and inhalable particulate matter PM10; the meteorological sensor collecting environmental data including ambient temperature and ambient humidity; setting an edge computing node at each monitoring node, and using a multivariate Kalman filtering algorithm based on iterative least squares method to filter the collected dust data and environmental data; and uploading the filtered data to a cloud server; on the cloud server, using the filtered environmental data and dust data as input, sampling a long short-term memory neural network LSTM and a forward feedback neural network FFNN to train two prediction sub-models respectively; wherein the LSTM sub-model is used to obtain the long-term change trend of dust data, and the FFNN sub-model is used to obtain the nonlinear mapping relationship between dust data and environmental data; integrating the LSTM sub-model and the FFNN sub-model by weighted averaging to generate a final dust prediction model; and using the dust prediction model to predict the dust concentration in the future. Use the trained dust prediction model to predict the dust concentration in the future (such as the next hour). Compare the prediction results with the preset dust concentration threshold to determine whether there is a risk of dust pollution. If the predicted concentration exceeds the threshold, generate an early warning message and send it to the relevant responsible person. Send the generated early warning information to the management personnel at the construction site in a timely manner via SMS, email or mobile phone APP. After receiving the early warning information, the management personnel will take corresponding prevention and control measures according to the early warning level, such as strengthening water sprinkling to reduce dust, covering exposed ground, etc. The on-site management personnel will feedback the measures taken and the dust control effect to the cloud system to evaluate the effectiveness of the early warning model.
[0045] Data collection: Multiple dust monitoring nodes are deployed at the construction site. Each node is equipped with dust sensors and meteorological sensors to collect dust data including PM2.5 and PM10 concentrations and environmental temperature and humidity data. Specifically, the number and location of monitoring nodes should be reasonably planned according to the area, terrain and dust source distribution of the construction site. Monitoring nodes should cover key areas of the construction site, such as earthwork areas, material storage areas, vehicle driving routes, etc. The node spacing can be adjusted according to site conditions and monitoring needs, and the general spacing is 50-100 meters. The monitoring nodes should be installed at a height of 1.5-2 meters from the ground to avoid the direct impact of ground dust on the measurement. Dust sensors should select high-precision, low-power, and fast-response laser scattering sensors, such as Sharp GP2Y1010AU0F, Beijing Huayu HY-WSPM models, etc. Laser scattering sensors calculate the concentration values of PM2.5 and PM10 by measuring the scattering intensity of suspended particles in the air on the laser. The sensor’s measurement range should cover the common range of dust concentration, such as 0-1000 μg / m 3 . Meteorological sensors should be digital sensors with integrated temperature and humidity measurement functions, such as Texas Instruments HDC1080, Swiss Sensirion SHT31, etc. The temperature and humidity sensors should have high measurement accuracy and stability, and the temperature measurement range is -40℃ 100% RH. Set a suitable data collection frequency according to the characteristics of dust concentration changes and monitoring needs. In general, collecting dust concentration and temperature and humidity data every 5-10 minutes can meet the needs of continuous monitoring and trend analysis. During periods of high dust pollution or special operations, the collection frequency can be appropriately increased, such as collecting data every 1-2 minutes. The sampling time and response time of the sensor should be less than or equal to the collection frequency to ensure the real-time nature of the data.
[0046] Figure 3This is an exemplary flow chart for constructing a Kalman filter algorithm according to some embodiments of this specification. Based on the multivariate Kalman filter algorithm of iterative least squares method, the state space model is established: PM2.5 concentration and PM10 concentration are selected as system state variables to reflect the state of dust pollution. Define the state variable vector X(k) = [x1(k), x2(k)]', where x1(k) represents the PM2.5 concentration at time k, and x2(k) represents the PM10 concentration at time k. The dimension of the state variable is 2, indicating that the dust pollution state is described by two key indicators. Ambient temperature and ambient humidity are selected as system inputs to reflect the impact of environmental factors on dust pollution. Define the input vector U(k) = [u1(k), u2(k)]', where u1(k) represents the ambient temperature at time k, and u2(k) represents the ambient humidity at time k. The dimension of the system input is 2, indicating that the environmental factors are described by two parameters: temperature and humidity. The measured values of PM2.5 sensor, PM10 sensor, temperature sensor and humidity sensor are selected as observation variables to reflect the actual observed values of dust pollution state and environmental factors. The observation vector Z(k) = [z1(k), z2(k), z3(k), z4(k)]' is defined, where z1(k), z2(k), z3(k), z4(k) represent the measured values of PM2.5, PM10, temperature and humidity sensors at time k respectively. The dimension of the observation variable is 4, indicating that the dust pollution state and environmental factors are provided by the measured values of four sensors. The state transfer matrix A(k) describes the dynamic evolution law of the dust pollution state over time. According to the physical characteristics and historical data of dust pollution, the element values of the state transfer matrix A(k) are estimated. Grey system theory, multivariate regression analysis and other methods can be used to fit the parameters of the state transfer matrix based on historical data. The dimension of the state transfer matrix A(k) is 2×2, which represents the mutual influence relationship between state variables. The input matrix B(k) describes the influence of environmental factors on the dust pollution state. According to the correlation between ambient temperature and humidity and dust concentration, the element values of the input matrix B(k) are estimated. Partial correlation analysis, multivariate regression analysis and other methods can be used to quantify the degree of influence of environmental factors on dust pollution. The dimension of the input matrix B(k) is 2×2, which represents the influence relationship of environmental factors on state variables. The observation matrix H(k) describes the relationship between observed variables and state variables. According to the sensor measurement principle and measurement error characteristics, the element values of the observation matrix H(k) are estimated. For PM2.5 and PM10 sensors, the corresponding elements in the observation matrix are set to 1, indicating direct measurement of state variables. For temperature and humidity sensors, the corresponding elements in the observation matrix are set to 0, indicating indirect measurement of environmental factors. The dimension of the observation matrix H(k) is 4×2, which represents the mapping relationship between observed variables and state variables. The process noise W(k) represents the random disturbance in the evolution of dust pollution state, which obeys Gaussian white noise with a mean of zero.The observation noise V(k) represents the random error in the sensor measurement process and also obeys the Gaussian white noise with a mean of zero. The process noise covariance matrix Q(k) and the observation noise covariance matrix R(k) represent the statistical characteristics of W(k) and V(k), respectively. Based on empirical knowledge or statistical analysis, the initial values of Q(k) and R(k) are estimated and adaptively adjusted during the filtering process. The dimensions of the noise covariance matrix are consistent with the dimensions of the corresponding state variables and observation variables.
[0047] Initial condition setting, based on prior knowledge or historical data, estimates the initial value of the dust pollution state. The average or median of the PM2.5 and PM10 concentrations in the previous period can be used as the element value of the initial state variable X(0). If there is no prior knowledge, the initial state variable X(0) can also be set to a zero vector to indicate that the initial state is unknown. The dimension of the initial state variable X(0) is 2×1, which is consistent with the dimension of the state variable. The initial state estimation covariance matrix P(0) represents the uncertainty of the initial state estimate. According to prior knowledge or empirical estimates, set the element value of P(0). P(0) can be set to a diagonal matrix, and the diagonal elements represent the variance of the initial state variable. If the confidence in the initial state estimate is high, the element value of P(0) can be set to a smaller value; if the uncertainty is large, set a larger element value. The dimension of the initial state estimation covariance matrix P(0) is 2×2, which is consistent with the dimension of the state variable. The process noise covariance matrix Q(0) represents the statistical characteristics of random disturbances in the system state evolution process. According to the dynamic characteristics and historical data of the dust pollution state, the variance of the process noise is estimated. Q(0) can be set as a diagonal matrix, and the diagonal elements represent the variance of the process noise on each state variable. If the dynamic model of the dust pollution state is relatively accurate, the element value of Q(0) can be set smaller; if there is a large modeling error or unknown disturbance, a larger element value is set. The dimension of the process noise covariance matrix Q(0) is 2×2, which is consistent with the dimension of the state variable. The observation noise covariance matrix R(0) represents the statistical characteristics of the random error in the sensor measurement process. According to the measurement accuracy of the sensor and environmental interference factors, the variance of the observation noise is estimated. R(0) can be set as a diagonal matrix, and the diagonal elements represent the variance of the measurement noise of each sensor. If the measurement accuracy of the sensor is high, the element value of R(0) can be set smaller; if there is a large measurement error or environmental interference, a larger element value is set. The dimension of the observation noise covariance matrix R(0) is 4×4, which is consistent with the dimension of the observation variable. During the iteration of the Kalman filter algorithm, the initial conditions can be adjusted online according to the new observation information. By adaptively adjusting the process noise covariance matrix Q(k) and the observation noise covariance matrix R(k), the uncertainty changes of the system and observations can be dynamically reflected. The element values of Q(k) and R(k) can be adaptively adjusted by using the size of the new information vector or the statistical characteristics of the residual. Online adjustment of initial conditions helps to improve the robustness and adaptability of the Kalman filter algorithm. The setting of the initial state variable X(0) is based on prior knowledge or historical data to provide a reasonable starting estimate for the algorithm. The setting of the initial state estimate covariance matrix P(0) reflects the uncertainty of the initial state estimate, which affects the convergence speed and stability of the algorithm.The initialization of the process noise covariance matrix Q(0) and the observation noise covariance matrix R(0) takes into account the random interference in the system and observation process, providing a suitable noise model for the algorithm. The mechanism of online adjustment of initial conditions enables the algorithm to adapt to changes in dust pollution status and sensor measurement characteristics, improving the accuracy and reliability of the estimation results.
[0048] For state prediction, at each time k, the ambient temperature u1(k) and ambient humidity u2(k) are measured by temperature sensors and humidity sensors. The measured ambient temperature and humidity values are constructed as the system input vector U(k) = [u1(k), u2(k)]'. The dimension of the system input vector U(k) is 2×1, which is consistent with the number of columns of the input matrix B(k). According to the state estimation value X(k-1) at the previous moment and the system input U(k) at the current moment, the state prediction value X(k|k-1) at the current moment is calculated. The calculation formula of the state prediction value is: X(k|k-1) = A(k)×X(k-1)+B(k)×U(k). Among them, A(k) is the state transfer matrix, B(k) is the input matrix, X(k-1) is the state estimation value at the previous moment, and U(k) is the system input at the current moment. The state prediction value X(k|k-1) represents the prediction of the current moment state given the state estimation value at the previous moment and the current environmental input. The dimension of the state prediction value X(k|k-1) is 2×1, which is consistent with the dimension of the state variable. According to the state estimation covariance matrix P(k-1) and the process noise covariance matrix Q(k-1) at the previous moment, the state prediction covariance matrix P(k|k-1) at the current moment is calculated. The calculation formula of the state prediction covariance matrix is: P(k|k-1)=A(k)×P(k-1)×A(k)'+Q(k-1). Among them, A(k) is the state transfer matrix, P(k-1) is the state estimation covariance matrix at the previous moment, and Q(k-1) is the process noise covariance matrix at the previous moment. The state prediction covariance matrix P(k|k-1) represents the uncertainty of the state prediction value, taking into account the random disturbance in the state transfer process. The dimension of the state prediction covariance matrix P(k|k-1) is 2×2, which is consistent with the dimension of the state variable. In order to adapt to the dynamic changes of dust pollution, the process noise covariance matrix Q(k) needs to be adaptively adjusted. According to the size of the new information vector, that is, the residual between the observed value and the predicted value, the element value of Q(k) is adjusted. The adaptive adjustment formula is: Q(k) = α(k) × Q(k-1), where α(k) is an adaptive factor with a value range of [0, 1]. When the new information vector is large, it indicates that the prediction error is large, and the element value of Q(k) needs to be increased to increase the impact of process noise; when the new information vector is small, it indicates that the prediction is more accurate, and the element value of Q(k) can be reduced to reduce the impact of process noise. Adaptive adjustment of the process noise covariance matrix Q(k) helps to improve the robustness and adaptability of the Kalman filter algorithm. At each time k, the ambient temperature and humidity at the current time are obtained to construct the system input vector U(k). Using the state estimation value X(k-1) and state estimation covariance matrix P(k-1) at the previous moment, as well as the system input U(k) at the current moment, the state prediction value X(k|k-1) and state prediction covariance matrix P(k|k-1) at the current moment are calculated through the state prediction formula.At the same time, the process noise covariance matrix Q(k) is adaptively adjusted according to the size of the new information vector to dynamically reflect the uncertainty changes of the system state.
[0049] For state update, at the current time k, the dust concentration observation value and environmental parameter observation value are obtained through the PM2.5 sensor, PM10 sensor, temperature sensor and humidity sensor. The obtained observation value is constructed as the observation vector Z(k) = [z1(k), z2(k), z3(k), z4(k)]'. The dimension of the observation vector Z(k) is 4×1, which is consistent with the number of rows of the observation matrix H(k). Calculate the new information vector at the current time, that is, the deviation between the observed value and the predicted value. The calculation formula of the new information vector is: Z(k)-H(k)×X(k|k-1). Among them, Z(k) is the observation vector at the current time, H(k) is the observation matrix, and X(k|k-1) is the state prediction value at the current time. The new information vector reflects the difference between the observed value and the predicted value and is used to update the state estimation. According to the state prediction covariance matrix P(k|k-1), the observation matrix H(k) and the observation noise covariance matrix R(k), the optimal Kalman gain matrix Kk is calculated. The calculation formula of the optimal Kalman gain matrix is: K(k)=P(k|k-1)×H(k)'×(H(k)×P(k|k-1)×H(k)'+R(k)) -1. Among them, P(k|k-1) is the state prediction covariance matrix, H(k) is the observation matrix, and R(k) is the observation noise covariance matrix. The optimal Kalman gain matrix K(k) determines the contribution of observation information to state estimation and balances the weights of prediction value and observation value. Using the optimal Kalman gain matrix K(k) and the new information vector, update the state estimate X(k) and the state estimate covariance matrix P(k). The update formula of the state estimate is: X(k)=X(k|k-1)+K(k)×(Z(k)-H(k)×X(k|k-1)). The update formula of the state estimate covariance matrix is: P(k)=(IK(k)×H(k))×P(k|k-1)×(IK(k))'+K(k)×R(k)×K(k)'. Among them, X(k|k-1) is the state prediction value, K(k) is the optimal Kalman gain matrix, Z(k) is the observation vector, H(k) is the observation matrix, and I is the unit matrix. The updated state estimate X(k) is output as the dust data after filtering at the current moment, reflecting the correction of the state estimate by the observation information. The square root of the diagonal elements of the state estimation covariance matrix P(k) is taken as the standard deviation of the filtering result, which quantifies the uncertainty of the estimate. The updated state estimate X(k) and the state estimation covariance matrix P(k) are used as the prior estimate of the next moment. The dust data and environmental data at each moment are processed in turn to achieve real-time filtering. The iterative process continues until all the data at all moments are processed. The observation noise covariance matrix R(k) is adaptively adjusted according to the size of the new information vector, and the formula is: R(k)=(1-α(k))×R(k-1). Among them, a(k) is an adaptive factor with a value range of [0, 1], which is dynamically adjusted according to the size of the new information vector. When the new information vector is large, it indicates that the difference between the observed value and the predicted value is large, and it is necessary to reduce the element value of R(k) and increase the weight of the observed information; when the new information vector is small, it indicates that the observed value and the predicted value are relatively consistent, and the element value of R(k) can be increased to reduce the weight of the observed information. At the same time, the process noise covariance matrix Q(k) can be adaptively adjusted according to the size of the new information vector to improve the robustness of the filtering algorithm. In the state space model, the ambient temperature and humidity are introduced as the system input U(k) to consider the impact of environmental factors on dust pollution. The environmental parameters are associated with the state variables through the input matrix B(k), and the role of environmental factors is considered in the state prediction step. The introduction of environmental parameters helps to improve the filtering effect and estimate the dust pollution state more accurately. In order to reduce the computational complexity and be suitable for real-time operation on the edge computing node, the iterative least squares method can be used to recursively update the optimal estimate of the state variables. The iterative least squares method avoids the matrix inversion operation through recursive calculation and reduces the amount of calculation. At each moment, the optimal estimate of the state variables is recursively updated using new observation information and prior estimates to achieve real-time filtering.At each time k, obtain the dust concentration observation value and environmental parameter observation value at the current time, and construct the observation vector Z(k). Calculate the new information vector, that is, the deviation between the observed value and the predicted value, and calculate the optimal Kalman gain matrix K(k) based on the state prediction covariance matrix, the observation matrix and the observation noise covariance matrix. Using the optimal Kalman gain matrix and the new information vector, update the state estimate X(k) and the state estimate covariance matrix P(k) to obtain the dust data output and estimated uncertainty after filtering at the current time. Real-time filtering is achieved by iteratively processing the data at each time.
[0050] Figure 4 This is an exemplary flow chart for building a dust prediction model according to some embodiments of this specification, cloud data fusion and modeling: the cloud server receives dust and environmental data from each monitoring node, and fuses and stores the data. Using the fused data, two prediction sub-models, LSTM and FFNN, are constructed and trained respectively. The cloud server receives dust data and environmental data uploaded from each monitoring node. The received data is fused and stored, and the dust data and environmental data at the same time are associated and stored in the cloud database. The format of the fused data is: (timestamp, PM2.5 concentration, PM10 concentration, temperature, humidity).
[0051] Construct LSTM sub-model: Adaptively divide the dust data after filtering into time steps: Assume that the dust data after filtering is a time series {x1, x2, ..., x n}, where n is the total number of moments. For every two adjacent moments t and t+1, the dust data x t and x t+1 , calculate the rate of change r between them t , the formula is as follows: According to the preset change rate threshold range [0,r1,r2,......,r K-1 ,+∞), all the change rates are divided into K intervals. Each interval [r i-1 ,r i ) corresponds to a preset time step l i , and satisfies l1>l2>......>l K Traverse each time t (t = 1, 2, ..., n-1) of the dust data: calculate the change rate r of the dust data between the current time t and the next time t+1 t . Determine the rate of change r t The interval [r i-1 ,r i ), determine the corresponding time step l i . Set the time step l i As the adaptive step size at the current time t, denoted as d t. According to the adaptive step size d obtained at each moment t , divide the dust data into multiple time segments. Construct the input samples and labels of the LSTM model: Let the time segment length be S and the future prediction time step be T. For each time segment {x t ,x t+1 ,......,x t+S-1}, and use it as an input sample of the LSTM model. The corresponding dust data {x t+S ,x t+S+1 ,......,x t+S+T-1} as the label of the input sample. Traverse all time segments and build the input sample set and label set of the LSTM model.
[0052] Specifically, assume that the dust data after filtering is {10, 12, 15, 13, 17, 20, 18, 22, 25, 23}, a total of 10 moments. Assume that the preset change rate threshold range is [0, 0.1, 0.2, +∞), and the corresponding time step is {4, 2, 1}. Assume that the time segment length S = 3 and the future prediction time step T = 2. The steps are as follows: Calculate the rate of change of adjacent moments: r_1 = |12-10| / 10 = 0.2; r_2 = |15-12| / 12 = 0.25; r_3 = |13-15| / 15 = 0.133; r_4 = |17-13| / 13 = 0.308; r_5 = |20-17| / 17 = 0.176; r_6 = |18-20| / 20 = 0.1; r_7 = |22-18| / 18 = 0.222; r_8 = |25-22| / 22 = 0.136; r_9 = |23-25| / 25 = 0.08. Determine the adaptive step size at each moment: d_1=1, because r_1∈[0.2,+∞); d_2=1, because r_2∈[0.2,+∞); d_3=2, because r_3∈[0.1,0.2); d_4=1, because r_4∈[0.2,+∞); d_5=2, because r_5∈[0.1,0.2); d_6=2, because r_6∈[0.1,0.2); d_7=1, because r_7∈[0.2,+∞); d_8=2, because r_8∈[0.1,0.2); d_9=4, because r_9∈[0,0.1). Divide the time segments according to the adaptive step size: the first time segment: {10, 12, 15}; the second time segment: {15, 17}; the third time segment: {17, 20}; the fourth time segment: {20, 18, 22}; the fifth time segment: {22, 25}. Construct the input samples and labels of the LSTM model: input sample 1: {10, 12, 15}, label 1: {17, 20}; input sample 2: {15, 17}, label 2: {20, 18}; input sample 3: {17, 20}, label 3: {18, 22}; input sample 4: {20, 18, 22}, label 4: {25, 23}. Through the above steps, the adaptive time step size division according to the change rate of dust data is realized, and the input samples and labels of the LSTM model are constructed. This adaptive partitioning method can dynamically adjust the time step according to the changing characteristics of dust data, better capture the temporal dependencies of the data, and improve the prediction performance of the LSTM model.
[0053] LSTM model construction, input layer: according to the time segment length S obtained in the data division stage, set the number of nodes in the input layer to S. Each input sample is a time segment, containing dust data at S consecutive moments. The shape of the input sample is (batch_size, S, feature_dim), where batch_size is the sample batch size for each training, and feature_dim is the feature dimension of the dust data at each moment. LSTM hidden layer: construct multiple LSTM hidden layers, and the number of layers and the number of LSTM units in each layer are set according to the scale of the dust data. The number of LSTM hidden layers can be tuned by methods such as cross-validation, and 1 to 3 layers can usually be tried. The number of LSTM units in each LSTM hidden layer can also be tuned by methods such as cross-validation, and the common value range is 32 to 256. The input dimension of the LSTM unit is equal to the output dimension of the previous layer, and the input dimension of the first LSTM hidden layer is equal to the number of nodes S in the input layer. The output dimension of the LSTM unit is equal to the number of LSTM units in this layer. A Dropout layer can be added after each LSTM hidden layer to prevent overfitting. The dropout probability of the Dropout layer can be adjusted according to the data scale and model complexity, and the common value range is 0.2 to 0.5. Output layer: According to the future prediction time step T, set the number of nodes in the output layer to T. The output layer uses a fully connected layer to map the output of the last LSTM hidden layer to T nodes. The activation function of the output layer can choose a linear activation function (such as the identity function) or a nonlinear activation function (such as ReLU). The output shape of the output layer is (batch_size, T), which represents the predicted value of dust data for the next T moments.
[0054] For LSTM model training, the weighted mean squared logarithmic error (WMSLE) is used as the loss function of the LSTM model. WMSLE can measure the error between the predicted value and the true value, and give higher weights to larger errors. The calculation formula of WMSLE is as follows: Where n is the number of samples, y i is the true value of the i-th sample, is the predicted value of the i-th sample, w iis the weight of the i-th sample. By setting the sample weight, the loss function can be adjusted according to the importance of the sample or the data distribution. The LSTM model is trained using the improved Adam algorithm to obtain the trained LSTM sub-model. The Adam algorithm is an adaptive learning rate optimization algorithm that combines the advantages of the momentum method and the RMSprop algorithm. The improved Adam algorithm introduces an adaptive learning rate adjustment factor γ for dynamically adjusting the learning rate. Improved Adam algorithm training process: Initialize the hyperparameters of the Adam algorithm: the initial learning rate η, which controls the step size of the parameter update. The exponential decay rate β1 of the first-order moment estimate is used to calculate the first-order moment estimate of the gradient. The exponential decay rate β2 of the second-order moment estimate is used to calculate the second-order moment estimate of the gradient. The adaptive learning rate adjustment factor γ controls the adaptive adjustment amplitude of the learning rate. The constant δ is used for numerical stability. In each round of training iteration: calculate the loss function value L of the current batch and the gradient g of each parameter θ t For each parameter θ of the LSTM sub-model, update its first-order moment estimate m t and the second moment estimate v t : Among them, t is the number of rounds of current training iteration, m t-1 and v t-1 are the first-order moment estimate and second-order moment estimate of the parameter θ after the previous iteration. Calculate the adaptive learning rate η of each parameter θ of the LSTM sub-model t : Using adaptive learning rate η_t and bias-corrected first-order moment estimate m t , second-order moment estimate v t , update each parameter θ of the LSTM sub-model: Among them, θ t-1 is the value of parameter θ after the previous iteration. Repeat the above steps until the loss function value on the training set converges or reaches the preset number of training rounds. Divide the training data into multiple batches, each batch contains a certain number of samples. Initialize the parameters of the LSTM model, including weights and biases. In each training round, traverse all batches of data: pass the input data of the current batch into the LSTM model and calculate the predicted output of the model. Calculate the loss function value L of the current batch and the gradient g of each parameter θ t. Update the parameters of the LSTM model according to the improved Adam algorithm. After each training round, evaluate the performance of the model on the validation set. If the performance improves, save the current model parameters. Stop the training process when the preset number of training rounds is reached or the performance on the validation set no longer improves. By using the weighted mean square logarithmic error as the loss function and using the improved Adam algorithm to train the LSTM model, an LSTM sub-model with excellent performance can be obtained. The improved Adam algorithm can better adapt to the learning rate of different parameters and accelerate the convergence of the model by introducing an adaptive learning rate adjustment factor. At the same time, using WMSLE as the loss function can give higher penalties to larger errors and improve the prediction accuracy of the model.
[0055] Obtaining the FFNN sub-model includes: matching and aligning the dust data after filtering and the corresponding environmental data, and constructing an input sample set at a fixed time interval. Each sample contains the dust data at the current moment and the dust data and environmental data at the past M moments, and the sample label is the dust data sequence of the next N time steps. Assuming the number of features of the dust data is 1, and the number of features of the environmental data is D, the number of features of each sample is (M+1)×(D+2). Input layer: The number of nodes is (M+1)×(D+2), receiving the dust data at the current moment and the dust data and environmental data at the past M moments. Construction of residual blocks: According to the scale of the sample set, set the number of residual blocks and the number of nodes in the fully connected layer in each residual block. The number of residual blocks can be tuned by methods such as cross-validation, and 3 to 10 residual blocks can usually be tried. The number of nodes in the fully connected layer in each residual block can be set according to the dimension of the input features and the width of the network, and the common value range is 64 to 512. Each residual block contains two fully connected layers and a residual connection: The first fully connected layer: maps the input to the specified number of nodes, which can be implemented using a Dense layer. The number of nodes is configured according to the number of nodes in the fully connected layer. An activation function is applied after the fully connected layer, usually using the ReLU activation function. The second fully connected layer: maps the output of the first fully connected layer back to the original number of nodes, using a Dense layer. The number of nodes is consistent with the number of input nodes of the residual block. The second fully connected layer does not apply an activation function so that it can be added to the residual connection. Residual connection: directly add the input of the residual block to the output of the second fully connected layer to achieve direct information transfer. The residual connection can be implemented using the Add layer. Through the residual connection, the input information is directly passed to the output of the residual block, and added to the information transformed by the fully connected layer to form the final residual block output. Residual connection can alleviate the gradient vanishing problem of deep neural networks and promote the convergence and generalization ability of the network. Output layer setting: The number of nodes in the output layer is N, corresponding to the number of future prediction time steps. The output of the last residual block is mapped to the number of output nodes N through a fully connected layer. The output layer uses a linear activation function, that is, no nonlinear transformation is applied and the predicted value is directly output. The linear activation function is suitable for regression problems and is used to predict the dust data sequence for the next N time steps. A FFNN model containing multiple residual blocks and output layers is constructed. The residual connection is used to alleviate the gradient vanishing problem of the deep neural network and improve the convergence and generalization ability of the network. The output layer uses a linear activation function to predict the dust data sequence for the next N time steps.
[0056] The Huber loss function is used as the training target of the FFNN sub-model to improve the robustness of the model to outliers. The definition of the Huber loss function is: when the absolute value of the difference between the predicted value and the true value is less than or equal to δ, the square loss is used: When the absolute value of the difference between the predicted value and the true value is greater than δ, a linear combination of absolute loss and δ is used: Where y is the true value, f(x) is the predicted value, and δ is a hyperparameter used to control the smooth transition between squared loss and absolute loss. Use the gradient descent algorithm (such as Adam) to adjust the parameters of the FFNN model to minimize the Huber loss function value on the training samples. In each training iteration: input the training samples into the FFNN model in batches and calculate the predicted value of the current batch. Calculate the Huber loss function value of the current batch based on the predicted value and the true value. Calculate the gradient of the loss function to the model parameters through the back propagation algorithm. Use the gradient descent algorithm, such as the Adam algorithm, to update the model parameters and repeat the training iteration until the model converges or reaches the preset number of iterations. Concatenate the current environmental data and the dust data and environmental data at the past M moments in the way of sample construction to form the input of the FFNN model. Use the trained FFNN sub-model to forward propagate the input to obtain the predicted value of the output layer. The predicted value of the output layer is the dust data sequence of the next N time steps. Use the test set to evaluate the prediction performance of the FFNN sub-model. Input the test set samples into the trained FFNN model to obtain the predicted value. Calculate evaluation indicators such as mean absolute error (MAE) and root mean square error (RMSE) between the predicted value and the true value. According to the results of the evaluation indicators, adjust the hyperparameters of the FFNN model, such as the number of residual blocks, the number of nodes in the fully connected layer, the learning rate, the batch size, etc. Retrain the model and evaluate it on the test set to obtain the best prediction performance.
[0057] The trained LSTM and FFNN sub-models are weighted integrated in the cloud to generate the final dust prediction model. Simple weighted average or more complex integration methods such as Stacking and Bagging can be used. Steps for implementing weighted average: For each sub-model, evaluate its prediction performance on the validation set, such as calculating MAE, RMSE and other indicators. Different weights are assigned according to the performance of each sub-model. Sub-models with better performance are assigned higher weights. Weights can be assigned by sorting or weighting based on indicator values. Sorting method: Sort the sub-models by their performance and assign weights according to their ranking. For example, the sub-model with the best performance is assigned a weight of 0.4, the sub-model with the second best performance is assigned a weight of 0.3, and so on. Weighting method based on indicator values: Calculate weights based on the indicator values of the sub-models. For example, weight = 1 / (1+indicator value), the smaller the indicator value, the greater the weight. Multiply the prediction results of each sub-model by the corresponding weight, and then sum them up to get the final integrated prediction result. When new monitoring data is uploaded to the cloud, the integrated prediction model is used to predict the dust concentration in the future. Input the new monitoring data into each sub-model to obtain their respective prediction results. Multiply the prediction results of each sub-model by the corresponding weight, and then sum them to obtain the integrated prediction results. Output the predicted value of dust concentration in the future. According to the predicted value of dust concentration, judge whether there is a risk of dust pollution. The threshold of dust concentration can be set, and when the predicted value exceeds the threshold, an early warning message is generated. The setting of the early warning threshold can refer to the national or local dust pollution control standards, or it can be set according to historical data and expert experience. When the predicted value exceeds the threshold, an early warning message is generated, including the early warning level, early warning time, early warning area and other contents. The early warning information is sent from the cloud to each on-site monitoring node through the network to notify the on-site management personnel to take prevention and control measures in advance. The early warning information can be sent by SMS, email, APP push, etc. to ensure that it is delivered to relevant personnel in a timely manner.
[0058] Based on the early warning information, on-site managers take corresponding prevention and control measures in advance, such as strengthening watering and dust reduction, covering exposed ground, and reducing construction operations. Compare the prediction results with the actual monitoring concentrations and calculate the prediction error. The prediction error can be measured using evaluation indicators such as MAE and RMSE. Continuously correct and update the prediction model based on the prediction error to improve the accuracy of the early warning. Implementation steps for model optimization and update: Regularly collect actual monitoring concentration data over a period of time and compare it with the prediction results of the corresponding time period. Calculate the prediction error index to evaluate the prediction performance of the current model. If the prediction error is large, it means that there is room for optimization of the model. The following measures can be taken: Adjust the model structure, such as increasing or decreasing the number of layers of the neural network, adjusting the number of neurons, etc. Retrain the model and use an updated training data set, including the latest monitoring data and environmental data. Try different model integration methods, such as Stacking, Bagging, etc., to improve the performance of integrated prediction. Continuously iterate and optimize the model until the prediction error is reduced to an acceptable range. Update the prediction model regularly to ensure that the model can adapt to environmental changes and data changes.
Claims
1. A dust early warning method, comprising: Multiple dust monitoring nodes are deployed at the construction site. Each monitoring node contains dust sensors and meteorological sensors. The dust sensors collect dust data including fine particulate matter PM2.5 and inhalable particulate matter PM10; the meteorological sensors collect environmental data including ambient temperature and ambient humidity. An edge computing node is set up at each monitoring node, and a multivariate Kalman filter algorithm based on iterative least squares method is used to filter the collected dust data and environmental data; And upload the filtered data to the cloud server; On the cloud server, the filtered environmental data and dust data are used as input, and the long short-term memory neural network LSTM and the forward feedback neural network FFNN are used to train two prediction sub-models respectively; among them, the LSTM sub-model is used to obtain the long-term change trend of dust data, and the FFNN sub-model is used to obtain the nonlinear mapping relationship between dust data and environmental data; The LSTM sub-model and the FFNN sub-model are integrated by weighted average to generate the final dust prediction model; Use the dust prediction model to predict the dust concentration in the future; The collected dust data and environmental data are filtered using a multivariate Kalman filter algorithm based on iterative least squares method, including: The dust data and environmental data are used as system state variables and observation variables respectively to establish a state space model; According to the state space model, the initial state variables, state estimation covariance matrix, process noise covariance matrix and observation noise covariance matrix are set; At each time point k, the environmental data of the current time point k is obtained as input, and the state prediction value and state prediction covariance matrix of the current time point k are calculated based on the state estimation value and state estimation covariance matrix of the previous time point k-1; Obtain the dust data at the current time k as the observation value, and calculate the new information vector between the observation value and the state prediction value; use the iterative least squares method to recursively update the optimal estimate of the state variable through the new information vector to obtain the state estimate value and state estimate covariance matrix at the current time; The updated state estimation value is used as the dust data output after filtering at the current moment, and the square root of the diagonal elements of the updated state estimation covariance matrix is used as the standard deviation of the filtering result to quantify the uncertainty of the estimation; Repeat the above steps to filter the dust data and environmental data; The state space model is established through the following formula: State equation: X(k) = A(k) × X(k-1) + B(k) × U(k) + W(k) Observation equation: Z(k)=H(k)×X(k)+V(k) Among them, X(k) is the system state variable at time k, including PM2.5 concentration x1(k) and PM10 concentration x2(k), defined as X(k) = [x1(k), x2(k)]'; U(k) is the system input at time k, including ambient temperature u1(k) and ambient humidity u2(k), defined as U(k) = [u1(k), u2(k)]'; Z(k) is the observed variable at time k, including the measured values of PM2.5, PM10, temperature and humidity sensors, and is defined as Z(k) = [z1(k), z2(k), z3(k), z4(k)]'; A(k), B(k) and H(k) are the state transfer matrix, input matrix and observation matrix respectively, which are estimated based on the dynamic characteristics of dust pollution and the correlation between environmental parameters and dust data; W(k) and V(k) are Gaussian white noise; Calculate the current state prediction value and state prediction covariance matrix through the following formula: Get the ambient temperature u1(k) and ambient humidity u2(k) at time k, and construct the system input vector U(k); According to the state estimation value X(k-1) and state estimation covariance matrix P(k-1) at the previous moment, and the system input U(k) at the current moment, calculate the state prediction value X(k|k-1) and state prediction covariance matrix P(k|k-1) at the current moment, through the following formula: X(k|k-1)=A(k)×X(k-1)+B(k)×U(k) P(k|k-1)=A(k)×P(k-1)×A(k)'+Q(k-1) Wherein, Q(k-1) is the process noise covariance matrix at time k-1, Q(k)=a(k)×Q(k-1), a(k) is adaptively adjusted according to the size of the new information vector, and its value range is 0 to 1; Using iterative least squares method, the optimal estimate of the state variable is recursively calculated to update the state estimate and the state estimate covariance matrix, through the following formula: Obtain the dust concentration observation value and environmental parameter observation value at time k and construct the observation vector Z(k); Calculate the innovation vector (Z(k)-H(k)×X(k|k-1)), which is the deviation between the observed value and the predicted value; According to the state prediction covariance matrix P(k|k-1), the observation matrix H(k) and the observation noise covariance matrix R(k), the optimal Kalman gain matrix K(k) is calculated to weigh the confidence of the model prediction and the observation data. The formula is as follows: K(k)=P(k|k-1)×H(k)'×(H(k)×P(k|k-1)×H(k)'+R(k)) -1 Where R(k) is the observation noise covariance matrix at time k, R(k) = (1-a(k)) × R(k-1); Using the optimal Kalman gain matrix K(k) and the new information vector, update the state estimate X(k) and the state estimate covariance matrix P(k) through the following formula: X(k)=X(k|k-1)+K(k)×[Z(k)-H(k)×X(k|k-1)] P(k)=[IK(k)×H(k)]×P(k|k-1)×[IK(k)×H(k)]’+K(k)×R(k)×K(k)’ Where I is the identity matrix; K(k)' represents the transpose of the Kalman gain matrix; The updated state estimation covariance matrix P(k) quantifies the uncertainty of the estimation result, and the square root of the diagonal element is the estimated standard deviation; The updated state estimate X(k) and the state estimate covariance matrix P(k) are used as the prior estimate for the next moment until all the data at all moments are processed.
2. The dust early warning method according to claim 1, characterized in that: In the cloud server, the environmental data and dust data are used as input, and the long short-term memory neural network LSTM and the forward feedback neural network FFNN are used to train two prediction sub-models respectively, including: The filtered dust data is input into the LSTM sub-model, and the LSTM sub-model is trained to learn the long-term time series characteristics and change rules of the dust data; The filtered dust data and the corresponding environmental data are input into the FFNN sub-model, and the FFNN sub-model is trained to learn the nonlinear mapping relationship between the dust data and the environmental data; Cross-validation was used to adjust the hyperparameters of the LSTM and FFNN sub-models through grid search. The hyperparameters included the number of hidden layers, learning rate, and regularization coefficient. The trained LSTM and FFNN sub-models are used to predict the dust data trend in the future and the dust data correction value under environmental data. The prediction results of the LSTM and FFNN sub-models are integrated by weighted averaging to generate the final dust data prediction value.
3. The dust early warning method according to claim 2 is characterized in that: Get the LSTM sub-model, including: The filtered dust data is divided into multiple time segments according to the adaptive time step. Each segment contains the dust data of S consecutive moments as an input sample of the LSTM model, and the corresponding dust data of T moments in the future is used as the label of the input sample. Construct an LSTM model, including an input layer, multiple LSTM hidden layers and an output layer; the number of input layer nodes is equal to the time segment length S, the number of LSTM hidden layers and the number of LSTM units in each layer are set according to the scale of dust data, and the number of output layer nodes is equal to the future prediction time step T; The weighted mean square logarithmic error is used as the loss function of the LSTM model, and the improved Adam algorithm is used to train the LSTM model to obtain the trained LSTM sub-model.
4. The dust early warning method according to claim 3 is characterized in that: The filtered dust data is divided into multiple time segments according to the adaptive time step, including: Calculate the change rate between the dust data at every two adjacent moments. The change rate is equal to the absolute value of the difference between the dust data value at the latter moment and the dust data value at the previous moment divided by the dust data at the previous moment. According to the preset change rate threshold range, all change rates are divided into K intervals, each interval corresponds to a preset time step; Traverse each moment of the dust data, determine the interval in the divided K intervals according to the change rate of the dust data between the current moment and the next moment, and use the time step corresponding to the interval as the adaptive step at the current moment; The dust data is divided into multiple time segments with the adaptive step size obtained at each moment as the interval, and each time segment contains S continuous dust data; The preset change rate threshold range is [0, r1, r2, ..., r K-1 ,+∞), where r1 to r K-1 is a positive real number, and r1<r2<......<r K-1 ; Each interval in the change rate threshold range [r i-1 ,r i ) corresponds to a time step of l i , and l1>l2>.......>l K .
5. The dust early warning method according to claim 4 is characterized in that: The improved Adam algorithm is used to train the LSTM model, including: Initialize the hyperparameters of the Adam algorithm, which include the initial learning rate η, the exponential decay rate β1 of the first-order moment estimate, the exponential decay rate β2 of the second-order moment estimate, the adaptive learning rate adjustment factor γ, and the constant δ; In each round of training iteration, the loss function value L of the current batch and the gradient g of each parameter θ corresponding to the loss function value L are calculated. t ; For each parameter θ of the LSTM sub-model, update its first-order moment estimate m t and the second-order moment estimate v t , the formula is as follows: Among them, t is the number of rounds of current training iteration, m t-1 and v t-1 are the first-order moment estimate and the second-order moment estimate of the parameter θ after the last iteration respectively; and are the t-th power of β1 and β2 respectively; For each parameter θ of the LSTM sub-model, calculate its adaptive learning rate η t , the formula is as follows: Using adaptive learning rate η t and the bias-corrected first-order moment estimate m t , second-order moment estimate v t , update each parameter θ of the LSTM sub-model, the formula is as follows: Among them, θ t-1 is the value of parameter θ after the previous iteration; Repeat the above steps until the loss function value on the training set converges or reaches the preset number of training rounds.
6. The dust early warning method according to claim 5, characterized in that: Get the FFNN sub-model, including: The filtered dust data and the corresponding environmental data are matched and aligned at fixed time intervals to construct an input sample set. Each sample contains the dust data at the current moment and the dust data and environmental data at the past M moments. The sample label is the dust data sequence of the next N time steps. Construct a FFNN model, which includes an input layer, multiple residual blocks and an output layer; the number of nodes in the input layer is (M+1)×(D+2), where M is the number of past moments and D is the number of environmental data features; each residual block contains two fully connected layers and one residual connection, through which the input is directly passed to the output. The number of residual blocks and the number of nodes in the fully connected layer in each residual block are set according to the size of the sample set; the number of nodes in the output layer is N, which is equal to the number of future prediction time steps; The Huber loss function is used as the training target of the FFNN sub-model, and the FFNN sub-model is trained by the mini-batch gradient descent algorithm; The current environmental data and the dust data and environmental data of the past M moments are concatenated as input, and the trained FFNN sub-model is used for prediction to obtain the dust data sequence of the next N time steps.
