Ozone concentration prediction method and prediction device based on state space modeling
Through state-space modeling, convolutional neural networks and long short-term memory networks combined with the Mamba module, and the introduction of the attention mechanism, the problem of low accuracy in existing ozone concentration prediction methods was solved, and efficient ozone concentration prediction was achieved.
Patent Information
- Application Number
- CN202510947021.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-07-10
AI Technical Summary
Existing ozone concentration prediction methods based on deep learning algorithms fail to dynamically select and fuse features in the early stages of feature modeling, resulting in low prediction accuracy.
The state-space modeling method is adopted to obtain local temporal features through convolutional neural networks and long short-term memory networks, and the global memory features are obtained by combining the Mamba module. An attention mechanism is introduced between the convolutional neural network and the Mamba module to selectively transfer key local features, and the prediction module is used to predict ozone concentration.
The accuracy and efficiency of ozone concentration prediction are improved, the problems of gradient vanishing and weak long-range dependency capture ability of long-short-term memory networks in long sequence scenarios are solved, and efficient ozone concentration prediction is achieved.
Smart Images

Figure CN120448792B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ozone concentration prediction, and in particular, relates to an ozone concentration prediction method and a prediction device based on state space modeling. Background Art
[0002] Ozone is a component of the atmosphere, and its concentration has significant impacts on agriculture, the environment, ecosystems, and human health. For example, when ozone levels are low, it benefits human health and the ecological environment. However, when ozone levels are high, it can harm human health and disrupt the ecological balance. Therefore, accurately predicting ozone concentrations has important scientific significance and engineering applications.
[0003] Ozone concentration is affected by multiple factors, making concentration prediction extremely difficult. Traditional methods for predicting ozone concentration based on numerical models are computationally intensive, resulting in low prediction efficiency and accuracy. With the continuous development of deep learning algorithms, using deep learning algorithms to predict ozone concentration can improve prediction efficiency and accuracy. Patent application publication number CN115545316A discloses a method for atmospheric ozone prediction based on a deep learning hybrid model. This model establishes an attention-CNN-LSTM hybrid model for atmospheric ozone prediction. Principal component analysis is used to determine a dataset. High-dimensional features are then extracted using the CNN's short-sequence feature abstraction capabilities. The LSTM integrates these short-sequence high-dimensional features for time series prediction. The attention mechanism is incorporated to account for the dynamic, spatial, temporal, and nonlinear characteristics of multivariate time series data. This hybrid model achieves high prediction accuracy for atmospheric ozone. Although the attention mechanism is incorporated into this ozone prediction model, it is only used to weight and aggregate the LSTM outputs. This limited attention range prevents dynamic selection and fusion of features in the early stages of feature modeling, limiting ozone prediction performance and reducing ozone concentration prediction accuracy. Summary of the Invention
[0004] One of the purposes of the present invention is to provide an ozone concentration prediction method and prediction device based on state space modeling to improve the accuracy of ozone concentration prediction.
[0005] To achieve the above-mentioned purpose, the prediction method provided by the present invention is implemented by adopting the following technical solutions:
[0006] A method for predicting ozone concentration based on state space modeling, comprising:
[0007] Acquiring observation data from multiple data sources associated with ozone concentration, performing feature extraction and multi-source data fusion on the multiple observation data to obtain fusion features;
[0008] Using a convolutional neural network to extract features from the fused features to obtain CNN local features;
[0009] Inputting the CNN local features into a long short-term memory network for time series modeling to obtain local time series features;
[0010] The CNN local features are also input into a first attention module to obtain an attention weight of the CNN local features, and a Mamba module input feature is obtained according to the CNN local features and the attention weight of the CNN local features; the Mamba module input feature is input into a Mamba module to obtain a global memory feature;
[0011] Based on the local time series features and the global memory features, a prediction module is used to predict ozone concentration.
[0012] In some embodiments of the present application, the CNN local features are also input into a first attention module to obtain the attention weight of the CNN local features, and the Mamba module input features are obtained according to the CNN local features and the attention weight of the CNN local features, including:
[0013] Obtaining, using the first attention module, an attention weight corresponding to each time step feature of the CNN local feature within the time window;
[0014] Calculate the product of each time step feature of the CNN local feature in the time window and the attention weight corresponding to the time step feature, add all the products to obtain the sum of the first products, and determine the sum of the first products as the Mamba module input feature.
[0015] In some embodiments of the present application, feature extraction and multi-source data fusion are performed on the plurality of observation data to obtain fusion features, including:
[0016] Performing feature extraction on each of the observation data using an independent convolution channel to obtain a convolution feature of each of the observation data;
[0017] constructing a query matrix, a key matrix, and a value matrix for each data source according to the convolutional features of each of the observation data, building a multi-head attention mechanism for each data source based on the query matrix, the key matrix, and the value matrix of each data source, and obtaining a multi-head attention output feature for each data source;
[0018] Connect the query matrix, key matrix, and value matrix of all data sources respectively to obtain the total query matrix, total key matrix, and total value matrix of cross-source attention, build a cross-source multi-head attention mechanism based on the total query matrix, the total key matrix, and the total value matrix, and obtain the cross-source multi-head attention output features;
[0019] Obtaining a fusion context vector based on the multi-head attention output features of each data source, constructing an attention weight learning mechanism based on the multi-head attention output features of each data source and the fusion context vector, and obtaining a fusion weight for each data source;
[0020] A multi-source data fusion feature is obtained according to the multi-head attention output feature of each data source, the cross-source multi-head attention output feature and the fusion weight of each data source.
[0021] In some embodiments of the present application, a multi-source data fusion feature is obtained based on the multi-head attention output feature of each data source, the cross-source multi-head attention output feature, and the fusion weight of each data source, including:
[0022] Get the sum of the products of the fusion weight of each data source and the multi-head attention output features corresponding to the data source as the second product sum;
[0023] A weighted sum is performed on the cross-source multi-head attention output feature and the sum of the second product, and the sum is used as the multi-source data fusion feature.
[0024] In some embodiments of the present application, based on the local time series features and the global memory features, a prediction module is used to predict ozone concentration, including:
[0025] Initialize the global memory matrix to obtain the initial global memory matrix;
[0026] Dynamically updating the global memory matrix according to the initial global memory matrix, the global memory features and the time-sensitive weights to obtain an updated global memory matrix; the time-sensitive weights are determined according to a time decay function;
[0027] Inputting the updated global memory matrix into the second attention module to obtain the attention weight of the global memory matrix;
[0028] Obtaining a time-sensitive global feature according to the updated global memory matrix and the attention weight of the global memory matrix;
[0029] The ozone concentration is predicted using the prediction module based on the local temporal features and the time-sensitive global features.
[0030] In some embodiments of the present application, the prediction module is a network including two layers of fully connected network layers, the first layer of fully connected network layer includes multiple network units, and the activation function of the first layer of fully connected network layer is a ReLU function; the second layer of fully connected network layer has one network unit, and the activation function of the second layer of fully connected network layer is a linear function.
[0031] To achieve the above-mentioned purpose, the prediction device provided by the present invention adopts the following technical solutions:
[0032] An ozone concentration prediction device based on state space modeling, comprising:
[0033] A fusion feature acquisition module is used to obtain observation data from multiple data sources associated with ozone concentration, perform feature extraction and multi-source data fusion on the multiple observation data, and obtain fusion features;
[0034] A CNN local feature acquisition module is used to extract the fused features using a convolutional neural network to obtain CNN local features;
[0035] A local temporal feature acquisition module is used to input the CNN local features into a long short-term memory network for temporal modeling to obtain local temporal features;
[0036] A global memory feature acquisition module is configured to input the CNN local features into a first attention module to obtain the attention weights of the CNN local features, obtain Mamba module input features based on the CNN local features and the attention weights of the CNN local features; and input the Mamba module input features into a Mamba module to obtain global memory features.
[0037] A prediction module is used to predict ozone concentration based on the local time series features and the global memory features.
[0038] Another object of the present invention is to provide an electronic device comprising a processor, a memory and a computer program stored in the memory, wherein the processor is configured to execute the computer program to implement the above-mentioned ozone concentration prediction method based on state-space modeling.
[0039] Another object of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned ozone concentration prediction method based on state-space modeling.
[0040] Compared with the prior art, the advantages and positive effects of the present invention are:
[0041] The ozone concentration prediction method and device based on state-space modeling provided by the present invention utilize convolutional neural networks and long-short-term memory networks to obtain local time series features of multi-source data fusion features associated with ozone concentration, utilize the Mamba module to obtain global memory features of the fusion features, and ultimately predict ozone concentration based on the local time series features and the global memory features. By introducing the Mamba module, efficient modeling of long time series data is achieved using a state-space architecture, with the ability to capture long-range dependencies and linear computational efficiency, effectively addressing the limitations of long-short-term memory networks in long sequence scenarios, such as gradient vanishing and weak ability to capture long-range dependencies, thereby improving the accuracy of ozone concentration prediction. At the same time, an attention mechanism is introduced between the convolutional neural network and the Mamba module, selectively transferring key local features extracted by the convolutional neural network to the Mamba module, achieving controllability and selectivity of the feature flow path, reducing redundant computations of the Mamba module, and thereby improving the efficiency of ozone concentration prediction based on state-space modeling.
[0042] Other features and advantages of the present invention will become more apparent after reading the detailed description of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0044] Figure 1 Flowcharts of some embodiments of the ozone concentration prediction method based on state space modeling provided by the present invention;
[0045] Figure 2 Flowcharts of some further embodiments of the ozone concentration prediction method based on state space modeling provided by the present invention;
[0046] Figure 3 Flowcharts of some further embodiments of the ozone concentration prediction method based on state space modeling provided by the present invention;
[0047] Figure 4 A structural block diagram of some embodiments of the ozone concentration prediction device based on state space modeling provided by the present invention;
[0048] Figure 5 A structural block diagram of some embodiments of the electronic device provided by the present invention;
[0049] Figure 6The figure is a scatter plot of the ozone concentration results predicted by the ozone concentration prediction method based on state space modeling provided by the present invention and the observed ozone concentration results. DETAILED DESCRIPTION
[0050] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0051] It should be noted that the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in this field can implement it. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0052] In order to solve the technical problem of low accuracy in existing ozone concentration predictions, the present invention creatively proposes an ozone concentration prediction method based on state-space modeling. It adopts convolutional neural networks and long short-term memory networks to obtain local time series features. At the same time, it introduces the Mamba module to realize efficient modeling of long time series data with a state-space architecture, obtains global memory features, and predicts ozone concentration based on local time series features and global memory features, thereby improving the accuracy of ozone concentration prediction.
[0053] Figure 1 Shown are flow charts of some embodiments of the ozone concentration prediction method based on state space modeling provided by the present invention.
[0054] Specifically, this embodiment uses the following process to predict ozone concentration.
[0055] S11: Obtain observation data from multiple data sources associated with ozone concentration, perform feature extraction and multi-source data fusion on the multiple observation data, and obtain fusion features.
[0056] Data sources associated with ozone concentration include, but are not limited to, gas temperature, humidity, wind speed, and air pressure. The observation data from each data source is recorded as a continuous time series with timestamps. The method for acquiring the observation data from each data source is implemented using existing technology and is not limited in this embodiment.
[0057] The method for extracting features and fusing observation data from multiple data sources to obtain fusion features is implemented using existing multi-source data fusion technology, and this embodiment does not limit the specific method.
[0058] S12: Use convolutional neural network to extract the fused features and obtain CNN (convolutional neural network) local features.
[0059] The fusion feature is expressed as , CNN is used to extract the fusion features and obtain the CNN local features of each time step : , .
[0060] in, is the time step, is the time window length.
[0061] The specific method of feature extraction is implemented using existing technology, which will not be elaborated in detail in this embodiment.
[0062] S13: Input the CNN local features into the long short-term memory network (LSTM network) for time series modeling to obtain local time series features.
[0063] The specific method of using the long short-term memory network to perform time series modeling is implemented using existing technology, which is not elaborated in detail in this embodiment.
[0064] S14: Obtain the attention weight of the CNN local feature according to the CNN local feature, obtain the Mamba module input feature according to the CNN local feature and the attention weight of the CNN local feature, and obtain the global memory feature according to the Mamba module.
[0065] The method of obtaining the attention weight corresponding to the local feature according to the local feature, and obtaining the Mamba module input feature according to the CNN local feature and the attention weight of the CNN local feature, can be implemented using existing technology, and this embodiment does not limit this.
[0066] In some embodiments, The attention weight of the CNN local feature of time steps is expressed as , then:
[0067] .
[0068] in, is the normalization function; It is a learnable weight vector that is automatically learned during the training process. It is initialized with a random value and then trained through backpropagation.
[0069] The Mamba module input features are obtained based on the CNN local features and the attention weights of the CNN local features. Specifically, the features of each time step of the CNN local features in the time window are calculated. And the attention weight corresponding to the feature of this time step The product of , all products are added together to obtain the sum of the first product, and the sum of the first product is determined as the Mamba module input feature. The Mamba module input feature is expressed as , then: .
[0070] The obtained Mamba module input features are fed into the Mamba module. The Mamba module models global memory characteristics and uncertainty. Using memory units and a Bayesian uncertainty mechanism, the final global memory features are obtained. The specific implementation process can be implemented using existing technologies and will not be elaborated on here.
[0071] S15: Based on the local temporal features and the global memory features, the prediction module is used to predict the ozone concentration.
[0072] The prediction module may be implemented using a structure in the prior art, and this embodiment does not limit this.
[0073] In some other embodiments, the prediction module is a network comprising two fully connected network layers, wherein the first fully connected network layer comprises a plurality of network units, and the activation function of the first fully connected network layer is a ReLU function; the second fully connected network layer comprises a single network unit, and the activation function of the second fully connected network layer is a linear function. The prediction module using this structure is not only simple in structure and stable in training, but also uses the ReLU activation function in the first network layer, which can effectively introduce nonlinear feature transformation and improve the nonlinear modeling capability of the model. The prediction module of this structure is expressed by the following formula:
[0074] .
[0075] in, is the predicted ozone concentration; 、 The weights of the first and second fully connected network layers are set values. 、 The bias of the first and second fully connected network layers are set values respectively; is the hidden layer output; The local time series features obtained in step S13; It is the global memory feature obtained in step S14.
[0076] In the method of the above embodiment, a convolutional neural network and a long short-term memory network are used to obtain local time series features of multi-source data fusion features associated with ozone concentration, and a Mamba module is used to obtain global memory features of the fusion features, and finally the ozone concentration is predicted based on the local time series features and the global memory features. By introducing the Mamba module, efficient modeling of long time series data is achieved using a state space architecture, which has the ability to capture long-distance dependencies and linear computational efficiency, effectively solving the limitations of the long short-term memory network in long sequence scenarios, such as gradient vanishing and weak ability to capture long-distance dependencies, thereby improving the accuracy of ozone concentration prediction. At the same time, an attention mechanism is introduced between the convolutional neural network and the Mamba module, and the key local features extracted by the convolutional neural network are selectively transferred to the Mamba module, realizing the controllability and selectivity of the feature flow path, reducing the redundant calculation of the Mamba module, and thus improving the efficiency of ozone concentration prediction based on state space modeling.
[0077] Atmospheric ozone concentration is affected by multiple meteorological parameters. The data sources for these parameters are typically heterogeneous time series data sources. The fused features obtained by fusing these multi-source data are crucial for the final ozone concentration prediction results. Therefore, improving the integrity and generalizability of the fused features is crucial.
[0078] Figure 2 Flowcharts illustrating some embodiments of the ozone concentration prediction method based on state-space modeling provided by the present invention are shown, specifically, flowcharts illustrating some embodiments of obtaining fusion features of multi-source data during the ozone concentration prediction process.
[0079] like Figure 2 As shown, in this embodiment, the fusion features of multi-source data are obtained using the following process.
[0080] S21: Use independent convolution channels to extract features from each observation data to obtain convolution features of each observation data.
[0081] is the sequence number of the data source, The observation data of each data source is recorded as , is the time series data, , is the total number of data sources. Convolutional features of observation data from multiple data sources Expressed as:
[0082] .
[0083] in, is the convolution layer number; is the total number of convolution layers of the convolution channel; For the The observation data of the data source The convolutional output of the layer; is the convolution output of the last layer, that is, the obtained convolution feature; The length of the time window for convolution extraction is the set value; The feature dimension extracted by convolution is the set value.
[0084] S22: Construct the query matrix, key matrix and value matrix of each data source according to the convolutional features of the observed data, build the multi-head attention mechanism of each data source based on the three matrices of each data source, and obtain the multi-head attention output features of each data source.
[0085] No. The query matrix, key matrix and value matrix of each data source are expressed as 、 and , then: , , , .
[0086] No. The multi-head attention output feature of the data source is expressed as , then:
[0087] ,
[0088] ,
[0089] .
[0090] in, 、 、 Both are learnable projection matrices, which are continuously updated through the back-propagation algorithm during model training, and the optimal value is finally learned by minimizing the loss function; is the feature dimension used for fusion, is the set value; The output projection matrix is learned during model training; is the head number, is the total number of heads in the multi-head attention mechanism; For the The attention output of the individual; 、 、 Respectively The data source The query matrix, key matrix and value matrix corresponding to each head.
[0091] S23: Connect the query matrix, key matrix and value matrix of all data sources respectively to obtain the total query matrix, total key matrix and total value matrix of cross-source attention, build a cross-source multi-head attention mechanism based on the three total matrices, and obtain the cross-source multi-head attention output features.
[0092] The total query matrix, total key matrix and total value matrix are expressed as 、 and , then:
[0093] , , .
[0094] The cross-source multi-head attention output feature is represented as , then:
[0095] , , .
[0096] is the first number sequence number; For the The attention output of the head; 、 、 Respectively The total query matrix, total key matrix and total value matrix corresponding to each head.
[0097] S24: Obtain a fusion context vector based on the multi-head attention output features of each data source, construct an attention weight learning mechanism based on the multi-head attention output features and the fusion context vector of each data source, and obtain the fusion weight of each data source.
[0098] The fused context vector is obtained by concatenating the multi-head attention output features of all data sources. The fused context vector is expressed as , then: .
[0099] The fusion weight of each data source is expressed as , then: , .
[0100] in, The serial number of the data source; For the The attention weight of each data source is determined by a feedforward neural network structure, combining the multi-head attention output features of each data source and the fused context vector; is the attention vector, for The transpose of and Both are parameter matrices and can be learned during the model training process.
[0101] By determining the fusion weight of each data source through a learnable parameter matrix and fusion context vector, the complex interaction relationship and overall information impact between data sources can be effectively captured, and the expressive ability of fusion features can be improved.
[0102] S25: Obtain multi-source data fusion features based on the multi-head attention output features of each data source, the cross-source multi-head attention output features, and the fusion weight of each data source.
[0103] The multi-source data fusion features are obtained based on the multi-head attention output features of each data source, the cross-source multi-head attention output features and the fusion weight of each data source. This can be achieved using existing technologies and this embodiment does not limit this.
[0104] In some other embodiments, the multi-source data fusion feature is determined using the following method:
[0105] Get the sum of the products of the fusion weight of each data source and the multi-head attention output features corresponding to the data source as the second product sum;
[0106] The cross-source multi-head attention output features and the sum of the second product are weighted summed, and the sum is used as the multi-source data fusion feature.
[0107] Specifically, the multi-source data fusion feature is expressed as , then:
[0108] .
[0109] in, is the weight, and is the set value.
[0110] The above-mentioned method based on the multi-head attention mechanism is used to fuse multi-source data. It can dynamically model the nonlinear interaction relationship between data sources in the feature extraction stage, significantly improve the expression ability and generalization performance of multi-source heterogeneous input data, adapt to complex environmental changes, and thus improve the accuracy of ozone concentration prediction based on fused features.
[0111] In order to further solve the dependence of state-space modeling on long time series data and improve the accuracy of ozone concentration prediction with hysteresis effect, a time-sensitive dynamic update mechanism is introduced in the process of constructing the Mamba module to obtain global memory features, and a sustainably evolving global memory matrix is constructed to improve the effectiveness of the temporal information captured by the global memory features.
[0112] Figure 3Flowcharts illustrating some embodiments of the ozone concentration prediction method based on state-space modeling provided by the present invention are shown. Specifically, the flowcharts illustrate some embodiments of constructing a Mamba module based on a time-sensitive dynamic update mechanism to obtain global memory features and then perform ozone concentration prediction.
[0113] S31: Initialize the global memory matrix to obtain the initial global memory matrix.
[0114] The global memory matrix is expressed as , , Indicates the first The memory vector of time steps, .in, is the time window length of the global memory matrix, which is the set value; is the characteristic dimension of the global memory matrix, is the set value, is the time step.
[0115] In the initial state, the global memory matrix is first initialized. Specifically, the global memory matrix can be initialized by zero filling or random filling to obtain the initial global memory matrix.
[0116] S32: Dynamically update the global memory matrix according to the initial global memory matrix, the global memory features, and the time-sensitive weights to obtain an updated global memory matrix.
[0117] The global memory feature in this step is the global memory feature obtained by using the Mamba module with the initial global memory matrix, which is expressed as For detailed acquisition methods, see Figure 1 Description of embodiments.
[0118] The time-sensitive weight is expressed as , determined according to a time decay function. In some embodiments, a time decay function is used, and the time step difference is Assignment:
[0119] .
[0120] in, is the attenuation factor, which controls the decay rate of the weight with time and distance, and is the set value; For the current moment.
[0121] For each current moment , according to the memory vector of each time step at the current moment in the initial global memory matrix , global memory features and time-sensitive weights The memory vector for each time step at the current moment Update to obtain the memory vector of each time step at the next moment :
[0122] .
[0123] S33: Obtain the attention weight of the global memory matrix based on the updated global memory matrix.
[0124] The attention weight of the global memory matrix is expressed as , then:
[0125] .
[0126] in, It is a learnable weight vector used to evaluate the importance of each memory unit. It is automatically learned during the training process. It is initialized to a random value and then trained through backpropagation. for The transpose of . To update the global memory matrix The memory vector of time steps.
[0127] S34: Obtain time-sensitive global features based on updating the global memory matrix and the attention weight of the global memory matrix.
[0128] The time-sensitive global feature is represented as , then: .
[0129] S35: Predict ozone concentration using a prediction module based on local temporal features and time-sensitive global features.
[0130] The prediction module is implemented with reference to the structure of the aforementioned embodiment.
[0131] The time-sensitive dynamic update mechanism of the above-mentioned embodiment is used to construct a sustainably evolving global memory matrix, and the historical information weights are dynamically updated based on the time decay function, so that the model based on state space modeling can automatically emphasize important inputs that are close in time while retaining long-term trend information, significantly enhancing the model's long-term dependency modeling capabilities and temporal consistency expression capabilities, and improving the effectiveness of the model in capturing temporal information of global memory features, thereby improving the accuracy of ozone concentration prediction based on global memory features.
[0132] Figure 4 Shown is a structural block diagram of some embodiments of the ozone concentration prediction device based on state space modeling provided by the present invention.
[0133] like Figure 4As shown, the prediction device of this embodiment includes structural units, functions of the structural units, and relationships between them, as follows:
[0134] The prediction device includes:
[0135] The fusion feature acquisition module 41 is used to obtain observation data from multiple data sources associated with ozone concentration, perform feature extraction and multi-source data fusion on the multiple observation data, and obtain fusion features.
[0136] The CNN local feature acquisition module 42 is used to use a convolutional neural network to extract the fusion features obtained by the fusion feature acquisition module 41 to obtain CNN local features.
[0137] The local temporal feature acquisition module 43 is used to input the CNN local features acquired by the CNN local feature acquisition module 42 into the long short-term memory network for temporal modeling to obtain local temporal features.
[0138] The global memory feature acquisition module 44 is used to input the CNN local features obtained by the CNN local feature acquisition module 42 into the first attention module to obtain the attention weight of the CNN local features, obtain the Mamba module input features based on the CNN local features and the attention weight of the CNN local features, and input the Mamba module input features into the Mamba module to obtain global memory features.
[0139] The prediction module 45 is used to predict the ozone concentration based on the local time series features acquired by the local time series feature acquisition module 43 and the global memory features acquired by the global memory feature acquisition module 44 .
[0140] The prediction device of the above structure runs the corresponding software program and performs the corresponding function according to Figure 1 The prediction method embodiment and other embodiments of the process of ozone concentration prediction are carried out to achieve Figure 1 The corresponding technical effects of the embodiment and other embodiments.
[0141] Figure 5 The following is a block diagram illustrating the structure of some embodiments of an electronic device according to the present invention. The electronic device includes a processor 51, a memory 52, and a computer program 521 stored in the memory 52. The processor 51 is configured to execute the computer program 521 to implement the ozone concentration prediction method of each of the above embodiments and achieve the technical effects of the corresponding embodiments.
[0142] In some other embodiments, when predicting ozone concentration, the Figure 2 The method of the embodiment shown obtains multi-source data fusion features, using Figure 1 The method of the embodiment shown in the figure obtains local timing characteristics by using Figure 1 and Figure 3 The method of the embodiment shown obtains time-sensitive global features, and finally predicts ozone concentration based on local temporal features and time-sensitive global features. The scatter plot of the predicted ozone concentration results and the observed ozone concentration results is shown in Figure 2. Figure 6 As shown. Figure (a) is a scatter plot of the forecast results for the next hour and the actual observation results during this time period, and Figure (b) is a scatter plot of the forecast results for the next 24 hours and the actual observation results during this time period. In Figures (a) and (b), each point represents a data sample, the horizontal axis is the actual observed ozone concentration, and the vertical axis is the predicted ozone concentration, both in ug / m 3 .
[0143] As shown in Figure (a), the number of samples is N=438, the mean absolute error MAE of the prediction results is 5.11, the root mean square error RMSE of the prediction results is 8.38, and the determination coefficient R of the prediction results is 2 =0.98. As shown in Figure (a), in the results of the prediction for the next hour, most of the sample points are close to and concentrated near the diagonal line. The prediction results have a small error and a high degree of fit, and the prediction results are relatively accurate.
[0144] As shown in Figure (b), the number of samples is N=438, the mean absolute error MAE of the prediction results is 20.08, the root mean square error RMSE of the prediction results is 25.82, and the determination coefficient R of the prediction results is 2 =0.84. As shown in Figure (b), the predicted results for the next 24 hours have slightly higher errors, slightly lower fitting degrees, and slightly lower accuracy than those in Figure (a).
[0145] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for a person skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to replace some of the technical features therein with equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions claimed to be protected by the present invention.
Claims
1. A method for predicting ozone concentration based on state space modeling, characterized in that: The method comprises: Acquiring observation data from multiple data sources associated with ozone concentration, performing feature extraction and multi-source data fusion on the multiple observation data to obtain fusion features; Using a convolutional neural network to extract features from the fused features to obtain CNN local features; Inputting the CNN local features into a long short-term memory network for time series modeling to obtain local time series features; The CNN local features are also input into a first attention module to obtain an attention weight of the CNN local features, and a Mamba module input feature is obtained according to the CNN local features and the attention weight of the CNN local features; the Mamba module input feature is input into a Mamba module to obtain a global memory feature; Based on the local time series features and the global memory features, a prediction module is used to predict ozone concentration.
2. The ozone concentration prediction method based on state space modeling according to claim 1 is characterized in that: The CNN local features are also input into the first attention module to obtain the attention weight of the CNN local features, and the Mamba module input features are obtained according to the CNN local features and the attention weight of the CNN local features, including: Obtaining, using the first attention module, an attention weight corresponding to each time step feature of the CNN local feature within the time window; Calculate the product of each time step feature of the CNN local feature in the time window and the attention weight corresponding to the time step feature, add all the products to obtain the sum of the first products, and determine the sum of the first products as the Mamba module input feature.
3. The ozone concentration prediction method based on state space modeling according to claim 1 or 2, characterized in that: Performing feature extraction and multi-source data fusion on the plurality of observation data to obtain fusion features includes: Performing feature extraction on each of the observation data using an independent convolution channel to obtain a convolution feature of each of the observation data; constructing a query matrix, a key matrix, and a value matrix for each data source according to the convolutional features of each of the observation data, building a multi-head attention mechanism for each data source based on the query matrix, the key matrix, and the value matrix of each data source, and obtaining a multi-head attention output feature for each data source; Connect the query matrix, key matrix, and value matrix of all data sources respectively to obtain the total query matrix, total key matrix, and total value matrix of cross-source attention, build a cross-source multi-head attention mechanism based on the total query matrix, the total key matrix, and the total value matrix, and obtain the cross-source multi-head attention output features; Obtaining a fusion context vector based on the multi-head attention output features of each data source, constructing an attention weight learning mechanism based on the multi-head attention output features of each data source and the fusion context vector, and obtaining a fusion weight for each data source; A multi-source data fusion feature is obtained according to the multi-head attention output feature of each data source, the cross-source multi-head attention output feature and the fusion weight of each data source.
4. The ozone concentration prediction method based on state space modeling according to claim 3 is characterized in that: Obtaining a multi-source data fusion feature according to the multi-head attention output feature of each data source, the cross-source multi-head attention output feature, and the fusion weight of each data source, including: Get the sum of the products of the fusion weight of each data source and the multi-head attention output features corresponding to the data source as the second product sum; A weighted sum is performed on the cross-source multi-head attention output feature and the sum of the second product, and the sum is used as the multi-source data fusion feature.
5. The ozone concentration prediction method based on state space modeling according to claim 1 or 2, characterized in that: Based on the local time series features and the global memory features, a prediction module is used to predict ozone concentration, including: Initialize the global memory matrix to obtain the initial global memory matrix; Dynamically updating the global memory matrix according to the initial global memory matrix, the global memory features and the time-sensitive weights to obtain an updated global memory matrix; the time-sensitive weights are determined according to a time decay function; Inputting the updated global memory matrix into a second attention module to obtain an attention weight of the global memory matrix; Obtaining a time-sensitive global feature according to the updated global memory matrix and the attention weight of the global memory matrix; The ozone concentration is predicted using the prediction module based on the local temporal features and the time-sensitive global features.
6. The ozone concentration prediction method based on state space modeling according to claim 1 or 2, characterized in that: The prediction module is a network including two layers of fully connected network layers, the first layer of fully connected network layer includes multiple network units, and the activation function of the first layer of fully connected network layer is a ReLU function; the second layer of fully connected network layer has one network unit, and the activation function of the second layer of fully connected network layer is a linear function.
7. An ozone concentration prediction device based on state space modeling, characterized in that: The device comprises: A fusion feature acquisition module is used to obtain observation data from multiple data sources associated with ozone concentration, perform feature extraction and multi-source data fusion on the multiple observation data, and obtain fusion features; A CNN local feature acquisition module is used to extract the fused features using a convolutional neural network to obtain CNN local features; A local temporal feature acquisition module is used to input the CNN local features into a long short-term memory network for temporal modeling to obtain local temporal features; A global memory feature acquisition module is configured to input the CNN local features into a first attention module to obtain the attention weights of the CNN local features, obtain Mamba module input features based on the CNN local features and the attention weights of the CNN local features; and input the Mamba module input features into a Mamba module to obtain global memory features. A prediction module is used to predict ozone concentration based on the local time series features and the global memory features.
8. An electronic device comprising a processor, a memory, and a computer program stored in the memory, wherein: The processor is configured to execute the computer program to implement the ozone concentration prediction method based on state space modeling according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the ozone concentration prediction method based on state space modeling according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Atmospheric ozone prediction method based on deep learning hybrid model
CN115545316A
ResNet-LSTM-based power distribution area short-term load prediction method and device
CN114239905A
Lithium battery thermal early warning method based on multi-mode BiLSTM-Mama
CN118587159A