Factory building air quality prediction method and system
By combining the EFMD and IPathFormer models with the improved IWSA algorithm, multi-scale decomposition and optimization of factory air quality data are performed, solving the problem of inaccurate air quality prediction in existing technologies and achieving higher prediction accuracy and safety assurance.
Patent Information
- Application Number
- CN202510911612.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-12-16
AI Technical Summary
Existing air quality forecasting methods struggle to meet accuracy requirements when dealing with complex, nonlinear, and multivariate environmental data, such as that from factories. They are particularly ineffective during extreme weather or irregular emission events, and data collection and processing present challenges that affect the accuracy of forecasting models.
The EFMD integrated eigenmode decomposition algorithm is used to decompose the air quality and pollutant data into signals. Combined with the IPathFormer prediction model and the improved IWSA algorithm, the data modal components are processed through a multi-head self-attention mechanism to optimize the solution of air quality and pollutant prediction data.
It improves the reliability and accuracy of air quality analysis results, enables timely early warning, ensures the safety of personnel in the plant, and adapts to changes in complex and nonlinear data.
Smart Images

Figure CN121144918A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of air quality monitoring technology, and in particular to a method and system for predicting air quality in a factory. Background Technology
[0002] Due to the unique production processes of factories, they inevitably release various pollutants during operation. This not only has a significant negative impact on the air quality of the surrounding environment but also becomes an urgent problem to be solved in environmental protection and corporate management. With increasingly stringent environmental regulations and growing public awareness of environmental protection, accurately predicting the air quality of factory areas has become increasingly important.
[0003] Currently, air quality forecasting primarily relies on statistical and machine learning techniques, such as Extreme Learning Machines, Support Vector Machines, and Autoregressive Integral Moving Average models. These methods can provide relatively accurate predictions when dealing with simple or relatively stable environmental data. However, when faced with complex, nonlinear, and multivariate air quality data, these traditional methods often fall short of the expected accuracy, especially in terms of model generalization ability. Particularly in complex environments like factory buildings, traditional models often struggle to handle noise and nonlinear relationships in the data. Their predictive performance is further diminished during extreme weather events or irregular emission events. Furthermore, the collection and processing of environmental data are challenging. Incomplete data, measurement errors, and data loss can all severely impact the construction of predictive models and the accuracy of prediction results. Therefore, there is an urgent need to develop a solution that can accurately predict air quality in factory buildings. Summary of the Invention
[0004] This application provides a method and system for predicting air quality in factories, so as to at least solve the technical problem of inaccurate air quality prediction results in factories.
[0005] The first aspect of this application provides a method for predicting air quality in a factory building, the method comprising:
[0006] The air quality index data and pollutant data of the factory area at each time within a preset time period are obtained, and the air quality index data and pollutant data are preprocessed to obtain preprocessed air quality index data and pollutant data.
[0007] The EFMD integrated eigenmode decomposition algorithm is used to decompose the preprocessed air quality index data and each pollutant data into multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data.
[0008] The multiple modal components corresponding to the air quality index data and the multiple modal components corresponding to each pollutant data are respectively substituted into the pre-trained IPathFormer prediction model, and the IWSA algorithm is used to optimize and solve to obtain the air quality index prediction data and the prediction data of each pollutant.
[0009] The sum of the predicted air quality index data and the predicted data of each pollutant is determined, and the sum of the predicted air quality index data and the predicted data of each pollutant is used as the predicted air quality data of the factory area.
[0010] Preferably, the pollutant data includes:
[0011] Fine particulate matter concentration, inhalable particulate matter concentration, sulfur dioxide concentration, nitrogen dioxide concentration, ozone concentration, carbon monoxide concentration;
[0012] The preprocessing of the air quality index data and the data of each pollutant includes:
[0013] The air quality index data and the data of each pollutant are normalized.
[0014] Furthermore, the IPathFormer prediction model is the model after replacing the dual attention mechanism in the PathFormer prediction model with a multi-head self-attention mechanism.
[0015] Furthermore, the training process of the IPathFormer prediction model includes:
[0016] The system acquires air quality index data, pollutant data, multiple modal components corresponding to air quality index data, and multiple modal components corresponding to pollutant data from multiple historical time periods. The system then divides the multiple modal components corresponding to air quality index data and multiple modal components corresponding to pollutant data into training set, validation set, and test set according to a preset ratio.
[0017] Using multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data in the historical time period of the training set as input, and using the air quality index data and each pollutant data in the training set as output, the initial IPathFormer model is trained to obtain the initial IPathFormer prediction model.
[0018] The initial IPathFormer prediction model is optimized and trained using the validation set and the test set to obtain a trained IPathFormer prediction model.
[0019] Furthermore, the method also includes:
[0020] The air quality pollution level of the factory area is determined based on the air quality index prediction data.
[0021] An air pollution warning will be issued when the air quality pollution level in the factory area is greater than or equal to the preset alarm level.
[0022] Furthermore, the method also includes:
[0023] The predicted air quality data and the air pollution level of the factory area are displayed.
[0024] A second aspect of this application provides a factory air quality prediction system, comprising:
[0025] The acquisition module is used to acquire air quality index data and pollutant data of the factory area at each time within a preset time period, and to preprocess the air quality index data and pollutant data to obtain preprocessed air quality index data and pollutant data.
[0026] The decomposition module is used to decompose the preprocessed air quality index data and each pollutant data using the EFMD integrated eigenmode decomposition algorithm to obtain multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data.
[0027] The prediction module is used to substitute multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data into the pre-trained IPathFormer prediction model, and use the IWSA algorithm to optimize and solve to obtain the air quality index prediction data and the prediction data of each pollutant.
[0028] The determination module is used to determine the sum of the predicted air quality index data and the predicted data of each pollutant, and to use the sum of the predicted air quality index data and the predicted data of each pollutant as the predicted air quality data of the factory area.
[0029] Preferably, the pollutant data includes:
[0030] Fine particulate matter concentration, inhalable particulate matter concentration, sulfur dioxide concentration, nitrogen dioxide concentration, ozone concentration, carbon monoxide concentration;
[0031] The acquisition module is also used for:
[0032] The air quality index data and the data of each pollutant are normalized.
[0033] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method described in the first aspect embodiment.
[0034] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described in the first aspect.
[0035] The technical solutions provided by the embodiments of this application have at least the following beneficial effects:
[0036] This application proposes a method and system for predicting air quality in a factory area. The method includes: acquiring air quality index (AQI) data and pollutant data for a factory area at various times within a preset time period; preprocessing the AQI data and pollutant data to obtain preprocessed AQI data and pollutant data; using the EFMD integrated eigenmode decomposition algorithm to perform signal decomposition on the preprocessed AQI data and pollutant data to obtain multiple modal components corresponding to the AQI data and multiple modal components corresponding to the pollutant data; substituting the multiple modal components corresponding to the AQI data and the multiple modal components corresponding to the pollutant data into a pre-trained IPathFormer prediction model, and using the IWSA algorithm for optimization to obtain predicted AQI data and predicted pollutant data; determining the sum of the predicted AQI data and predicted pollutant data, and using the sum of the predicted AQI data and predicted pollutant data as the predicted air quality data for the factory area. The technical solution proposed in this application improves the reliability of air quality analysis results and provides timely warnings when air quality fails to meet standards, thereby ensuring the safety of personnel in the factory area.
[0037] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0038] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0039] Figure 1 This is a flowchart of a factory air quality prediction method according to an embodiment of this application;
[0040] Figure 2 This is a structural diagram of a factory air quality prediction system according to an embodiment of this application. Detailed Implementation
[0041] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0042] This application proposes a method and system for predicting air quality in a factory area. The method includes: acquiring air quality index (AQI) data and pollutant data for each time period within a preset time frame for the factory area; preprocessing the AQI data and pollutant data to obtain preprocessed AQI data and pollutant data; using the EFMD integrated eigenmode decomposition algorithm to perform signal decomposition on the preprocessed AQI data and pollutant data to obtain multiple modal components corresponding to the AQI data and multiple modal components corresponding to the pollutant data; substituting the multiple modal components corresponding to the AQI data and the multiple modal components corresponding to the pollutant data into a pre-trained IPathFormer prediction model, and using the IWSA algorithm for optimization to obtain predicted AQI data and predicted pollutant data; determining the sum of the predicted AQI data and predicted pollutant data, and using the sum of the predicted AQI data and predicted pollutant data as the predicted air quality data for the factory area. The technical solution proposed in this application improves the reliability of air quality analysis results and provides timely warnings when air quality fails to meet standards, thereby ensuring the safety of personnel in the factory area.
[0043] The following description, with reference to the accompanying drawings, illustrates a method and system for predicting air quality in a factory.
[0044] Example 1
[0045] Figure 1 Here is a flowchart of a factory air quality prediction method according to an embodiment of this application, as shown below. Figure 1 As shown, the method includes:
[0046] Step 1: Obtain the air quality index data and pollutant data of the factory area at each time within a preset time period, and preprocess the air quality index data and pollutant data to obtain preprocessed air quality index data and pollutant data.
[0047] It should be noted that the data for each pollutant include:
[0048] Fine particulate matter concentration, inhalable particulate matter concentration, sulfur dioxide concentration, nitrogen dioxide concentration, ozone concentration, carbon monoxide concentration;
[0049] The preprocessing of the air quality index data and the data of each pollutant includes:
[0050] The air quality index data and the data of each pollutant are normalized.
[0051] Specifically, considering the inconsistent dimensions of the variables, in order to unify the dimensions and improve the model's predictive fit, the data is normalized, and the formula is expressed as follows:
[0052]
[0053] Where B represents the original data, B max and B min B' represents the maximum and minimum values of the data in this column, respectively, and B' represents the normalized data.
[0054] Step 2: Use the EFMD integrated eigenmode decomposition algorithm to perform signal decomposition on the preprocessed air quality index data and each pollutant data to obtain multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data.
[0055] It should be noted that the signal decomposition of each data point using EFMD integrated eigenmode decomposition includes the following steps:
[0056] Step F1: Obtain the original vibration signal x(t) of the i-th data from the preprocessed air quality index data and each pollutant data, and initialize the number of modes to n and the filter length to L;
[0057] Step F2: Initialize the FIR filter bank using the Hanning window and set it to 5-10, then initialize iteration i=1;
[0058] Step F3: Add white noise q from the i-th iteration to x(t). i (t), q i (t) represents the ratio of the amplitude to the amplitude of the original vibration signal, which is 0.1 to 0.4 times, and the summed original vibration signal x in the i-th iteration is... i (t) is:
[0059] x i (t)=x(t)+q i (t)i=1,2,…,n
[0060] Step F4: Superimpose x(t) with q(t) of different magnitudes n times, and perform FMD decomposition after each superposition to obtain one set of IMF components c. ij (t) and residual component r i (t), the result obtained after the i-th decomposition is in the form of:
[0061]
[0062] In the formula: J represents the total number of IMFs;
[0063] Step F5: After this decomposition, the IMF components are obtained. The average of these components is then calculated to obtain the IMF components after removing the white noise, i.e.:
[0064]
[0065] In the formula: c j (t) is the j-th component after EFMD decomposition of x(i);
[0066] Step F6: Use The signals of the decomposed components are obtained, where k = 1, 2, ..., n, and * represents convolution calculation;
[0067] Step F7: Decompose the modes using the original signal x. and estimated fault cycle To update the filter coefficients, where the fault period is estimated. Selected as the decomposition mode The autocorrelation spectrum reaches a local maximum at the zero crossing point. At the moment when i is reached, complete one iteration and set i = i + 1;
[0068] Step F8: Determine if the current iteration count is the maximum iteration count. If it is, continue to step F9; otherwise, return to step F6.
[0069] Step F9: Calculate the correlation coefficient between every two modal components and construct a K×K matrix CC. (K×K) Lock the two modal components with the largest correlation coefficient, and use To calculate their correlation kurtosis CK, we discard the mode component with the smaller kurtosis value in the two modes and set K = K-1;
[0070]
[0071] In the formula, u k CK represents the k-th modal component; M (u k ) indicates its relevant kurtosis; f k T represents the k-th FIR filter of length L; s Indicates the input period; M represents the shift order, and N is the signal length;
[0072] Step F10: Determine whether the current number of modes K has reached the set number of modes n. If it has, continue to step F11; otherwise, return to step F6.
[0073] Step 3.11: Use the obtained n modal components as the final decomposition mode of FMD.
[0074] Step 3: Substitute the multiple modal components corresponding to the air quality index data and the multiple modal components corresponding to each pollutant data into the pre-trained IPathFormer prediction model, and use the IWSA algorithm to optimize and solve to obtain the air quality index prediction data and the prediction data of each pollutant.
[0075] It should be noted that the IPathFormer prediction model is the model after replacing the dual attention mechanism in the PathFormer prediction model with a multi-head self-attention mechanism.
[0076] Furthermore, the training process of the IPathFormer prediction model includes:
[0077] The system acquires air quality index data, pollutant data, multiple modal components corresponding to air quality index data, and multiple modal components corresponding to pollutant data from multiple historical time periods. The system then divides the multiple modal components corresponding to air quality index data and multiple modal components corresponding to pollutant data into training set, validation set, and test set according to a preset ratio.
[0078] Using multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data in the historical time period of the training set as input, and using the air quality index data and each pollutant data in the training set as output, the initial IPathFormer model is trained to obtain the initial IPathFormer prediction model.
[0079] The initial IPathFormer prediction model is optimized and trained using the validation set and the test set to obtain a trained IPathFormer prediction model.
[0080] It should be noted that the decomposed data components are fed into the PathFormer prediction model, and the dual attention mechanism is partially replaced with a multi-head self-attention mechanism to obtain the IPathFormer prediction model. The specific process is as follows:
[0081] 1. In the PathFormer multi-scale Transformer block, the multi-scale partitioning defines a set S = {S1, ..., S2} of M patch size values. M Each patch size S corresponds to a patch splitting operation for the input sequence. Where H represents the length of the time series, d represents the dimension of the feature, and each patch segmentation operation with a patch size of S divides X into P (P = H / S) patches, i.e. (X 1 ,X 2 ,…,X P ), where each patch It contains S time steps, different patch sizes in the set lead to different partitioning patches, and provides views of the input sequence at various time resolutions;
[0082] 2. Replace the dual attention mechanism in the original PathFormer with a multi-head self-attention mechanism. The formula for the multi-head self-attention mechanism is as follows:
[0083] MultiHead(Q,K,V)=Concat(head1,...,head h W O
[0084] head i =Attention(QW i Q ,KW i K VW i V )
[0085] In the formula, the learnable parameters include QW i Q KW i K and VW i V And the Attention function, which represents the convergence of attention. Attention can combine additive attention and scaled dot product attention, then concatenate them using the Concat function. The matrix undergoes a linear transformation, and its learnable parameters are... : Transform it into an output with the same dimension as the input.
[0086] 3. The multi-scale router in the PathFormer forecasting model introduces a time decomposition module, including seasonal and trend decomposition, to extract periodic and trend patterns: the seasonal decomposition design transforms the time series from the time domain to the frequency domain to extract periodic patterns, utilizing the Discrete Fourier Transform (DFT), denoted as... Decompose the input X into Fourier basis functions and select the K with the largest amplitude. f Each basis is used to preserve the sparsity in the frequency domain, and then the periodic pattern X is obtained through inverse DFT. sea , recorded as The formula is as follows:
[0087]
[0088] In the formula, Φ and A represent the phase and amplitude of each frequency in the DFT(X). Indicates having K f The frequency with the highest amplitude; trend decomposition uses different kernels of moving average average pooling in seasonal decomposition X. rem =XX sea The trend pattern is extracted from the remaining data; for the results obtained from different kernels, a weighted calculation is performed to obtain the trend component representation:
[0089]
[0090] In the formula, This is the pooling function for the i-th kernel, where N corresponds to the number of kernels. By controlling the weights of different kernel results, we add the seasonal and trend patterns to the original input X and then perform a linear mapping. Transform and merge along the time dimension to obtain
[0091] Based on the time decomposition result X trans The router uses routing functions to generate path weights, thereby determining the patch size selected for the current data. To avoid selecting only a few patch sizes in the formula, which would lead to repeated updates of the corresponding scales and ignore other potentially useful scales in the multi-scale Transformer, a noise term is introduced to increase randomness during the weight generation process. The entire process of generating path weights is as follows:
[0092]
[0093] In the formula, W represents the entire routing function. r and It is a learnable parameter that generates weights, where d represents X. trans The feature dimension is M, where M represents the number of patch sizes. To introduce sparsity into routing and encourage the selection of key scales, we perform a top-K selection of path weights, keeping the top K path weights and setting the remaining weights to 0. The final result is represented as... Normal distribution (0,1);
[0094] 4. Path weights generated by the multi-scale aggregator in PathFormer Each dimension corresponds to a patch size in a multi-scale Transformer, where This indicates that the second-largest patch segment S is executed.i Bullish self-attention and This indicates that the patch size should be ignored for the current data, let X be the patch size. i This represents the output of a multi-scale Transformer with a patch size of S. i Since different patch sizes result in different time dimensions, the aggregator first executes a transformation function. The time dimensions of the AMS block are then analyzed at different scales. The aggregator then performs a weighted aggregation of the multi-scale outputs based on path weights to obtain the final output of the AMS block.
[0095]
[0096] In the formula, It is an indicator function, when Output 1 if the condition is met, otherwise output 0, indicating that only the size of the first K patches of the Transformer and the corresponding output are considered or needed during aggregation.
[0097] It should be noted that optimizing the hyperparameters of the IPathFormer and EFMD models using the IWSA algorithm involves the following steps:
[0098] 1. Set the population size, dimension, number of iterations, and upper and lower bounds of the search space for the WSA algorithm;
[0099] 2. Set the number of particles to n, the dimension of the problem to be optimized to d, and use a matrix to simulate the position of the electromagnetic wave example W:
[0100]
[0101] and use f([W n1 W n2 ,…W nd [) represents the fitness value of the nth individual. The fitness value of the population can be represented by the following vector:
[0102] F = [f([W] 11 W 12 ,…W 1d ]); f([W 21 W 22 ,…W 2d ])…f([W n1 W n2 ,…W nd ])]
[0103] Finally, the particle positions are initialized using Hammersley sequence initialization instead of the random initialization of the population positions in the Wave Search Algorithm (WSA). The Hammersley sequence initialization formula is as follows:
[0104] W i =l+R i ·(ul)
[0105] Among them, W i Let represent the i-th individual in the initial population, l be the lower bound, u be the upper bound, and the i-th quasi-random number generated by the Hammersley sequence be R∈[0,1].
[0106] 3. Introducing a spiral flight search strategy into the global development phase of the WSA algorithm can enhance the algorithm's global optimization capability. This not only ensures the algorithm's convergence speed but also increases the diversity of individuals. The spiral search formula is as follows:
[0107]
[0108] In the formula, c is a constant, usually set to 1, l is a random number between [-1, 1], D′ represents the distance between the optimal electromagnetic wave particle position and the current electromagnetic wave particle position, and f mean is the average fitness value of all particles, and i is the current iteration number.
[0109] 4. A Gaussian random walk strategy is introduced into the local exploration phase of the WSA algorithm. The Gaussian random walk model has excellent exploitation capabilities, generating new individuals and thus helping the algorithm escape local optima. The formula is as follows:
[0110] Emitting electromagnetic waves:
[0111]
[0112]
[0113] In the formula σ is the waveform magnitude control coefficient, m is a column vector whose elements follow a normal distribution and are arranged in order, and W best f is the current optimal position. max X is the largest fitness value in the group. * To introduce a cosine function for a randomly selected individual from the dominant population. To adjust the step size of the Gaussian random walk;
[0114] Reflected electromagnetic waves:
[0115]
[0116] In the formula, β is the reflection intensity coefficient, and r2 is a random value between 0 and 1. To simulate the number of particles reflecting electromagnetic waves, W fiIt is the position matrix of W rearranged according to fitness values in ascending order;
[0117] Receive electromagnetic waves:
[0118]
[0119] In the formula, δ is the receiving coefficient. η is a random number that follows a normal distribution. To simulate the number of particles receiving electromagnetic waves. It is the historical best position obtained through convolution. λ is the correction factor, λ r3, r4, r5, and r6 are random numbers between 0 and 1.
[0120] Step 4: Determine the sum of the predicted air quality index data and the predicted data of each pollutant, and use the sum of the predicted air quality index data and the predicted data of each pollutant as the predicted air quality data of the factory area.
[0121] In this embodiment of the disclosure, the method further includes:
[0122] The air quality pollution level of the factory area is determined based on the air quality index prediction data.
[0123] An air pollution warning will be issued when the air quality pollution level in the factory area is greater than or equal to the preset alarm level.
[0124] Furthermore, the method also includes:
[0125] The predicted air quality data and the air pollution level of the factory area are displayed.
[0126] The factory air quality prediction method proposed in this application has the following advantages:
[0127] 1. This application introduces EFMD (Economic Eigenmode Decomposition) to achieve effective decomposition and frequency feature classification of air quality monitoring data, fully mining the multi-scale information in the data. The effectiveness of this method lies in combining the advantages of modern signal processing technology. By distinguishing between high and low frequency components of the data, it not only has a more stable and accurate signal decomposition than FMD, but also enhances the understanding of complex data structures, further improving the overall performance of the air quality prediction model. 2. This application replaces the dual attention mechanism in the PathFormer model with a multi-head attention mechanism, further enhancing the model's ability to handle nonlinear multi-scale features. The improved IPathFormer model, through its deep network structure and complex nonlinear processing capabilities, can accurately capture short-term fluctuations and noise in the data, making it suitable for handling rapidly changing information variables in the short term; maximizing the model's advantages in the field, thereby improving the accuracy and efficiency of prediction. 3. This application improves the Wave Search Algorithm (WSA) by introducing Hammersley sequences to improve the initialization process of the original population, enhancing the algorithm's global exploration capability, helping to escape local optima, and improving convergence speed and search efficiency. Secondly, the global development and local exploration phases are improved by employing a spiral flight search strategy and a Gaussian random walk strategy, respectively. This allows the algorithm to more flexibly adjust the weights between individuals, effectively balancing the trade-off between exploration and utilization, and improving the algorithm's convergence and stability. Fourthly, this application utilizes an improved IWSA algorithm to optimize the hyperparameters of the prediction model. This not only enhances the model's generalization ability but also improves the accuracy and reliability of predictions by automatically adjusting parameters to handle the interactions between complex data. This results in a more accurate comprehensive air quality prediction for the factory area, effectively reducing prediction errors. In summary, this invention can better handle complex, nonlinear, and multivariate data, especially extracting nonlinear relationships and multi-scale features from the data, thus improving the accuracy and reliability of air quality predictions within the factory area.
[0128] In summary, the factory air quality prediction method proposed in this embodiment improves the reliability of air quality analysis results and provides timely warnings when air quality fails to meet standards, thereby ensuring the safety of personnel inside the factory.
[0129] Example 2
[0130] Figure 2 This is a structural diagram of a factory air quality prediction system according to an embodiment of this application, as shown below. Figure 2 As shown, the system includes:
[0131] The acquisition module 100 is used to acquire air quality index data and pollutant data of the factory area at each time within a preset time period, and to preprocess the air quality index data and pollutant data to obtain preprocessed air quality index data and pollutant data.
[0132] The pollutant data include: fine particulate matter concentration, inhalable particulate matter concentration, sulfur dioxide concentration, nitrogen dioxide concentration, ozone concentration, and carbon monoxide concentration.
[0133] The acquisition module 100 is further configured to:
[0134] The air quality index data and the data of each pollutant are normalized.
[0135] The decomposition module 200 is used to decompose the preprocessed air quality index data and each pollutant data using the EFMD integrated eigenmode decomposition algorithm to obtain multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data.
[0136] The prediction module 300 is used to substitute multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data into the pre-trained IPathFormer prediction model, and use the IWSA algorithm to optimize and solve to obtain the air quality index prediction data and the prediction data of each pollutant.
[0137] The IPathFormer prediction model is the model after replacing the dual attention mechanism in the PathFormer prediction model with a multi-head self-attention mechanism.
[0138] The determination module 400 is used to determine the sum of the air quality index prediction data and the prediction data of each pollutant, and to use the sum of the air quality index prediction data and the prediction data of each pollutant as the air quality prediction data of the factory area.
[0139] In this embodiment of the disclosure, the prediction module 300 is further configured to:
[0140] The system acquires air quality index data, pollutant data, multiple modal components corresponding to air quality index data, and multiple modal components corresponding to pollutant data from multiple historical time periods. The system then divides the multiple modal components corresponding to air quality index data and multiple modal components corresponding to pollutant data into training set, validation set, and test set according to a preset ratio.
[0141] Using multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data in the historical time period of the training set as input, and using the air quality index data and each pollutant data in the training set as output, the initial IPathFormer model is trained to obtain the initial IPathFormer prediction model.
[0142] The initial IPathFormer prediction model is optimized and trained using the validation set and the test set to obtain a trained IPathFormer prediction model.
[0143] Furthermore, the determining module 400 is also used for:
[0144] The air quality pollution level of the factory area is determined based on the air quality index prediction data.
[0145] An air pollution warning will be issued when the air quality pollution level in the factory area is greater than or equal to the preset alarm level.
[0146] Furthermore, the determining module 400 is also used for:
[0147] The predicted air quality data and the air pollution level of the factory area are displayed.
[0148] In summary, the factory air quality prediction system proposed in this embodiment improves the reliability of air quality analysis results and provides timely warnings when air quality fails to meet standards, thereby ensuring the safety of personnel inside the factory.
[0149] Example 3
[0150] To implement the above embodiments, this disclosure also proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method described in Embodiment 1.
[0151] Example 4
[0152] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in Embodiment 1.
[0153] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0154] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0155] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for predicting air quality in a factory, characterized in that, The method includes: The air quality index data and pollutant data of the factory area at each time within a preset time period are obtained, and the air quality index data and pollutant data are preprocessed to obtain preprocessed air quality index data and pollutant data. The EFMD integrated eigenmode decomposition algorithm is used to decompose the preprocessed air quality index data and each pollutant data into multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data. The multiple modal components corresponding to the air quality index data and the multiple modal components corresponding to each pollutant data are respectively substituted into the pre-trained IPathFormer prediction model, and the IWSA algorithm is used to optimize and solve to obtain the air quality index prediction data and the prediction data of each pollutant. The sum of the predicted air quality index data and the predicted data of each pollutant is determined, and the sum of the predicted air quality index data and the predicted data of each pollutant is used as the predicted air quality data of the factory area.
2. The method as described in claim 1, characterized in that, The data for each pollutant include: Fine particulate matter concentration, inhalable particulate matter concentration, sulfur dioxide concentration, nitrogen dioxide concentration, ozone concentration, carbon monoxide concentration; The preprocessing of the air quality index data and the data of each pollutant includes: The air quality index data and the data of each pollutant are normalized.
3. The method as described in claim 2, characterized in that, The IPathFormer prediction model is the model after replacing the dual attention mechanism in the PathFormer prediction model with a multi-head self-attention mechanism.
4. The method as described in claim 3, characterized in that, The training process of the IPathFormer prediction model includes: The system acquires air quality index data, pollutant data, multiple modal components corresponding to air quality index data, and multiple modal components corresponding to pollutant data from multiple historical time periods. The system then divides the multiple modal components corresponding to air quality index data and multiple modal components corresponding to pollutant data into training set, validation set, and test set according to a preset ratio. Using multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data in the historical time period of the training set as input, and using the air quality index data and each pollutant data in the training set as output, the initial IPathFormer model is trained to obtain the initial IPathFormer prediction model. The initial IPathFormer prediction model is optimized and trained using the validation set and the test set to obtain a trained IPathFormer prediction model.
5. The method as described in claim 3, characterized in that, The method further includes: The air quality pollution level of the factory area is determined based on the air quality index prediction data. An air pollution warning will be issued when the air quality pollution level in the factory area is greater than or equal to the preset alarm level.
6. The method as described in claim 5, characterized in that, The method further includes: The predicted air quality data and the air pollution level of the factory area are displayed.
7. A factory air quality prediction system, characterized in that, The system includes: The acquisition module is used to acquire air quality index data and pollutant data of the factory area at each time within a preset time period, and to preprocess the air quality index data and pollutant data to obtain preprocessed air quality index data and pollutant data. The decomposition module is used to decompose the preprocessed air quality index data and each pollutant data using the EFMD integrated eigenmode decomposition algorithm to obtain multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data. The prediction module is used to substitute multiple modal components corresponding to the air quality index data and multiple modal components corresponding to each pollutant data into the pre-trained IPathFormer prediction model, and use the IWSA algorithm to optimize and solve to obtain the air quality index prediction data and the prediction data of each pollutant. The determination module is used to determine the sum of the predicted air quality index data and the predicted data of each pollutant, and to use the sum of the predicted air quality index data and the predicted data of each pollutant as the predicted air quality data of the factory area.
8. The system as described in claim 7, characterized in that, The data for each pollutant include: Fine particulate matter concentration, inhalable particulate matter concentration, sulfur dioxide concentration, nitrogen dioxide concentration, ozone concentration, carbon monoxide concentration; The acquisition module is also used for: The air quality index data and the data of each pollutant are normalized.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in any one of claims 1-6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.