A method and system for predicting air quality based on a three-dimensional state and evolution hypergraph
By using a prediction method based on three-dimensional state and evolutionary hypergraphs, we have achieved refined modeling of cross-feature and cross-entity dependencies in air quality data, which solves the problems of insufficient prediction accuracy and stability in existing technologies and improves the effectiveness of air quality prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- EAST CHINA NORMAL UNIV
- Filing Date
- 2025-11-05
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies struggle to effectively capture the complex dependencies across entities and features in air quality data, and lack the ability to model dynamically changing systems, resulting in insufficient prediction accuracy and stability.
A prediction method based on three-dimensional state and evolutionary hypergraph is adopted. Cross-feature interaction and cross-entity interaction are carried out through the dual cubic state space module. Combined with the evolutionary hypergraph attention module, the hypergraph structure is dynamically adjusted to achieve refined modeling and prediction of air quality data.
It improves the accuracy and stability of air quality forecasts and enhances forecasting capabilities in dynamically changing scenarios.
Smart Images

Figure CN121542985B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of time-series data prediction technology, and more specifically to an air quality prediction method and system based on a three-dimensional state and evolution hypergraph. Background Technology
[0002] Currently, time series data prediction plays a crucial role in modern science and engineering, influencing system control, resource allocation, and decision-making. However, its complex dependencies and non-stationary dynamic characteristics pose significant challenges to the prediction of high-dimensional time series data. Existing research on time series prediction mainly focuses on the following three types of methods: (1) Univariate time series: such as the ARIMA method, which only models the time dependency of a single variable and ignores the relationship between cross-features and cross-entities; (2) Multivariate time series: such as LSTM, GRU, etc., which can model the relationship between multiple features or multiple entities in a single dimension, but cannot simultaneously model the joint relationship between cross-entities and cross-features; (3) 3D-MTS (three-dimensional multivariate time series): which attempts to capture the dynamic relationship between multiple entities and multiple features simultaneously, but existing methods often make strong simplification assumptions, such as assuming channel independence or compressing multidimensional features into a single vector, thereby losing a large amount of information.
[0003] Traditional time series methods can only capture single-variable or low-dimensional dependencies, making it difficult to handle the complex dynamics of air quality data; deep learning methods have improved the ability to model time dependencies to some extent, but most of them are concentrated in two-dimensional scenes (time + features), and are insufficient for joint modeling across entities and features; although Transformer-type methods can achieve global modeling, their quadratic computational complexity limits their application in large-scale entity prediction. In addition, some existing models use static graphs or static hypergraphs to represent the relationships between entities, but real-world systems are essentially dynamic nonlinear systems, and the relationships between entities will dynamically evolve with external events and internal changes. Modeling that relies solely on static structures will ignore the dynamics of the system, leading to a decline in prediction performance; other methods that use learnable dynamic graphs often ignore valuable prior information. When learning graph structures purely from data, this omission usually leads to unstable convergence or the emergence of extreme modes; these limitations restrict the ability of models to capture complex dependencies in the real world. In summary, the above-mentioned existing technologies mainly have the following defects: (1) Insufficient modeling of 3D-MTS, failing to effectively capture complex dependencies across entities and features. (2) Ignoring the dynamic nature of the system, only using static structure to express the relationship between entities, lacking the ability to dynamically model over time based on prior knowledge embedding in a three-dimensional scene.
[0004] Therefore, how to improve the expressive power of 3D-MTS, realize the feature capture of air quality, and predict and model the relationship between entities at each station, so as to improve the prediction accuracy and stability of each station entity in a dynamically changing scenario, is a problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, the present invention provides an air quality prediction method and system based on a three-dimensional state and evolution hypergraph, which effectively improves the expressive power of 3D-MTS, realizes the feature capture of air quality, and predicts and models the relationships between entities at each station, thereby improving the prediction accuracy and stability of each station entity in dynamically changing scenarios.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] An air quality prediction method based on a three-dimensional state and evolution hypergraph includes:
[0008] Three-dimensional multivariate time series of air quality data is used as input data;
[0009] Based on the input data, cross-feature interaction and cross-entity interaction are performed in the dual-cubic state space module to obtain fused features;
[0010] The fused features are input to the hypergraph attention module for piecewise processing. The output features of the current stage are obtained by combining the initial prior hypergraph and the initial hyperedge weights. These are then used as the input for the next stage. All piecewise output features are merged to obtain the comprehensive features.
[0011] Based on the comprehensive features input to the detection head, air quality prediction results are obtained.
[0012] In one embodiment, the dual-cubic state space module includes: a cross-feature interaction branch and a cross-entity interaction branch;
[0013] The input data is flipped in dimension and then fed into the cross-feature branch. By modeling the collective behavior of different entities on the common influence of a single feature, the cross-feature dependency relationship is captured, and the behavior-dependent feature is obtained.
[0014] The input data is fed into the cross-entity interaction branch, and by modeling the mutual influence of temporal patterns between different entities, the cross-entity dependency relationship is captured, and entity dependency features are obtained.
[0015] The fused feature is obtained by fusing the behavior dependency feature dimension after it has been flipped with the entity dependency feature.
[0016] In one embodiment, the cross-feature interaction branch includes: a first linear layer and a first selection cube state space module;
[0017] The input data is flipped in dimension and then input into the first linear layer to obtain the first encoded feature;
[0018] The first encoded feature is input to the first selected cubic state space module to generate multiple first parameter matrices and iteratively calculate with the first encoded feature to obtain the first three-dimensional feature;
[0019] The behavior-dependent feature is obtained by fusing the first three-dimensional feature with the first encoded feature.
[0020] In one embodiment, the first selected cube state space module includes: a first entity selection convolution, a first feature selection convolution, and a first CubeSSM unit;
[0021] The first encoded feature is sequentially input into the first entity selection convolution and the first feature selection convolution to obtain multiple first parameter matrices;
[0022] The first parameter matrix is input into the first CubeSSM unit and discretized to obtain the first discrete matrix;
[0023] The first output feature of the current time step is obtained based on the first discrete matrix and the first encoded feature;
[0024] Based on the first output feature of the current time step, iterative calculation of the spatial state is performed to obtain the first output features of all time steps, which are then concatenated according to the time dimension to obtain the first three-dimensional feature.
[0025] In one embodiment, the cross-entity interaction branch includes: a second linear layer and a second selection cube state space module;
[0026] The input data is fed into the second linear layer to obtain the second encoded feature;
[0027] The second encoded feature is input to the second selected cubic state space module to generate multiple second parameter matrices and iteratively calculate with the second encoded feature to obtain the second three-dimensional feature;
[0028] The entity dependency feature is obtained by fusing the second three-dimensional feature with the second encoding feature.
[0029] In one embodiment, the second selected cube state space module includes: a second feature selection convolution, a second entity selection convolution, and a second CubeSSM unit;
[0030] The second encoded features are sequentially input into the second feature selection convolution and the second entity selection convolution to obtain multiple second parameter matrices;
[0031] The second parameter matrix is input into the second CubeSSM cell for discretization to obtain the second discrete matrix;
[0032] The second output feature for the current time step is obtained based on the second discrete matrix and the second encoded feature;
[0033] Based on the second output feature of the current time step, iterative calculation of the spatial state is performed to obtain the second output feature of all time steps, which is then concatenated according to the time dimension to obtain the second three-dimensional feature.
[0034] In one embodiment, the hypergraph attention module includes a feature segmentation unit and multiple parallel hypergraph generation units;
[0035] The fused features are input to the feature segmentation unit and segmented according to the time length to obtain segmented features for multiple stages;
[0036] Based on the first-stage piecewise features, the initial association matrix of the initial prior hypergraph, and the initial hyperedge weights, the first-layer hypergraph generation unit is input to obtain the current-layer output features, the current-layer association matrix, and the current-layer hyperedge weights.
[0037] Based on the second-stage piecewise features, the current layer correlation matrix, and the current layer hyperedge weights, the data is input to the second-layer hypergraph generation unit to obtain the next-layer output features, the next-layer correlation matrix, and the next-layer hyperedge weights.
[0038] By analogy, the output features of all stages are obtained and concatenated along the time dimension to obtain the comprehensive features.
[0039] In one embodiment, the multiple parallel hypergraph generation units have the same structure, each including: a weight and matrix output unit, multiple hypergraph convolutional layers, a Dropout layer, and a BatchNorm layer;
[0040] Based on the current layer correlation matrix input to the weight and matrix output unit, the next layer correlation matrix and the next layer hyperedge weights are obtained;
[0041] Based on the current stage segmentation features and the current layer hyperedge weights, the data are sequentially input into multiple hypergraph convolutional layers and then processed by the Dropout layer and the BatchNorm layer to obtain the output features of the corresponding layers.
[0042] In one embodiment, the weight and matrix output unit includes: a third linear layer, a convolutional layer, an SSM layer, a binarization network, an average pooling layer, and a diagonalization layer;
[0043] The current layer correlation matrix is input to the third linear layer to obtain the first processed feature;
[0044] Based on the first processing feature, it is sequentially input into the convolutional layer and the SSM layer to obtain the second processing feature;
[0045] A third processing feature is obtained by fusing the first processing feature and the second processing feature;
[0046] The third processed feature is input into the binarization network to obtain the next layer correlation matrix;
[0047] Based on the third processing feature, the data are sequentially input into the average pooling layer and the diagonalization layer to obtain the next layer of superedge weights.
[0048] An air quality prediction system based on a three-dimensional state and evolution hypergraph includes: a data acquisition module, a feature fusion module, a piecewise iteration module, and a result output module;
[0049] The data acquisition module is used to acquire a three-dimensional multivariate time series of air quality data as input data.
[0050] The feature fusion module is used to perform cross-feature interaction and cross-entity interaction based on the input data input to the dual cubic state space module, and fuse them to obtain fused features.
[0051] The piecewise iteration module is used to perform piecewise processing based on the fused feature input to the hypergraph attention module, combine the initial prior hypergraph and the initial hyperedge weights to obtain the output features of the current stage, use them as the input of the next stage, and merge all the piecewise output features to obtain the comprehensive features.
[0052] The result output module is used to input the comprehensive features into the detection head to obtain air quality prediction results.
[0053] As can be seen from the above technical solution, compared with the prior art, this invention discloses an air quality prediction method and system based on three-dimensional state and evolutionary hypergraphs. It models three-dimensional temporal data through a designed Selective CubeSSM structure; it models cross-entity and cross-feature dependencies through bi-branch modeling, achieving refined and fine-grained modeling and feature extraction for entity scenes; and it dynamically evolves the hypergraph structure based on the prior hypergraph using Evolving Hypergraph Attention (EHA) to reflect the system's dynamics. Combined with a hypergraph generation module (Hypergraph Attention-Generated Convolution, HAGC) and a binary network composed of Gumbel-Softmax, it achieves learnable evolutionary hypergraph generation and information propagation. Compared with cutting-edge air quality spatiotemporal prediction systems and methods, this invention has higher modeling training, inference efficiency, and accuracy. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0055] Figure 1 The flowchart of an air quality prediction method based on a three-dimensional state and evolution hypergraph provided by the present invention is shown.
[0056] Figure 2 This is a general framework diagram of the present invention based on the dual cubic state space module and the evolutionary hypergraph attention mechanism.
[0057] Figure 3 This is a schematic diagram of the three-dimensional selective parameterization mechanism in the dual cubic state space module provided by the present invention.
[0058] Figure 4 The flowchart illustrates the principle of the hypergraph generation unit provided by this invention. Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] Example 1
[0061] To address the limitations of existing methods in simultaneously modeling cross-entity and cross-feature dependencies and in effectively characterizing system dynamics, this invention proposes the FinD³ method. By combining the Dual Cubic State Space Model (DCSSM) with Evolving Hypergraph Attention (EHA), it effectively enhances the expressive power of 3D-MTS, enabling predictive modeling of entity relationships and thus improving the accuracy and stability of entity prediction.
[0062] like Figures 1-2 As shown, this invention discloses an air quality prediction method based on a three-dimensional state and evolution hypergraph, including the following steps. For ease of description, these steps are numbered S1 to S4, and these numbers are not intended to limit the sequential relationship between the various steps of this invention:
[0063] S1 uses a three-dimensional multivariate time series of air quality data as input data.
[0064] Furthermore, the three-dimensional multivariate time series of air quality data, i.e., the 3D-MTS tensor, is obtained. Where B represents the batch dimension, S represents the entity dimension, F represents the feature dimension, and L represents the time dimension; the time dimension is the sequence of features and entities evolving over time; the entity dimension represents data from a unique site; and the feature dimension includes air quality features such as PM2.5.
[0065] S2 inputs the input data into the dual-cubic state space module to perform cross-feature interaction and cross-entity interaction, and then fuses the data to obtain fused features.
[0066] Furthermore, the dual-cubic state space module includes: a cross-feature interaction branch and a cross-entity interaction branch;
[0067] The input data X is flipped in dimension and then fed into a cross-feature branch. By modeling the collective behavior of different entities on a single feature, the cross-feature dependencies are captured, resulting in the behavior-dependent feature O. feature ;
[0068] Input data X is fed into the cross-entity interaction branch. By modeling the mutual influence of temporal patterns between different entities, cross-entity dependencies are captured, and entity dependency features O are obtained. entity ;
[0069] Based on behavioral dependency features O feature After dimension flipping, the entity-dependent feature O entity Fusion yields the fusion feature H = (O entity+Flip(O feature )), where Flip represents the dimension flipping operation.
[0070] Furthermore, the cross-feature interaction branch includes a first linear layer and a first selection cube state space module; this branch focuses on capturing cross-feature dependencies by modeling how the collective behavior of different entities collectively influences a single feature. By leveraging the interrelationships between entities, it aims to enhance the model's ability to learn globally shared patterns across features.
[0071] The input data X is flipped in dimension and then fed into the first linear layer for MLP linear mapping to obtain the first encoded feature X. feature =MLP(Flip(X)) ;
[0072] The first encoded feature is input into the first selected cubic state space module, generating multiple first parameter matrices B1, C1, and Δ1, which are then iteratively calculated with the first encoded feature to obtain the first three-dimensional feature Z. feature ;
[0073] Based on the first three-dimensional feature Z feature With the first encoded feature X feature Fusion yields behavioral dependency feature O feature =X feature ⊙Z feature .
[0074] Furthermore, the first selected cube state space module includes: a first entity selection convolution, a first feature selection convolution, and a first CubeSSM unit;
[0075] First coding feature X feature The inputs are sequentially fed into the first entity selection convolution to capture the inter-entity dependency and the first feature selection convolution to capture the inter-feature dependency, resulting in multiple first parameter matrices B1, C1 and Δ1;
[0076] The first parameter matrices B1, C1, and Δ1 are input into the first CubeSSM cell for discretization, resulting in the first discrete matrix. and ;
[0077] Based on the first discrete matrix and With the first encoded feature X feature Obtain the first output feature Z1 at the current time step. feature ;
[0078] Iterative calculation of the spatial state is performed based on the first output feature of the current time step, and the first output features of all time steps are obtained and concatenated according to the time dimension to obtain the first three-dimensional feature Z. feature .
[0079] Furthermore, the cross-entity interaction branch includes: a second linear layer and a second selection cube state space module; this branch focuses on capturing cross-entity dependencies by modeling how temporal patterns between different entities influence each other.
[0080] Input data X is fed into the second linear layer for MLP linear mapping to obtain the second encoded feature X. entity =MLP(X) ;
[0081] Second coding feature X entity The input is fed into the second selection cube state space module, generating multiple second parameter matrices B2, C2, and Δ2, which are then combined with the second encoded feature X. entity Iterative calculation yields the second three-dimensional feature Z. entity ;
[0082] Based on the second three-dimensional feature Z entity With the second coding feature X entity The entity dependency feature O is obtained by fusion. entity =X entity ⊙Z entity .
[0083] Furthermore, the second selected cube state space module includes: a second feature selection convolution, a second entity selection convolution, and a second CubeSSM unit;
[0084] The second encoded features are sequentially input into the second feature selection convolution to capture the dependencies between features and the second entity selection convolution to capture the dependencies between entities, resulting in multiple second parameter matrices B2, C2 and Δ2;
[0085] The second parameter matrices B2, C2, and Δ2 are input into the second CubeSSM cell for discretization, resulting in the second discrete matrix. and ;
[0086] Based on the second discrete matrix and With the second coding feature X entity Obtain the second output feature Z1 at the current time step. entity ;
[0087] Iterative calculation of the spatial state is performed based on the second output feature at the current time step, and the second output features at all time steps are obtained and concatenated according to the time dimension to obtain the second three-dimensional feature Z. entity .
[0088] Furthermore, the Selective Cube State-Space Module (SSM) method theory is used, and the formulas in this part form the computational basis of this invention. This method is used to extract complete features from 3D-MTS, and the basic state-space model (SSM) is defined as follows:
[0089] ;
[0090] ;
[0091] Among them, h t h represents the hidden state at time step t. t-1 Let z represent the hidden state at the previous time step, where A, B, and C are all parameter matrices of the state. t This represents the output at time step t;
[0092] This invention innovates upon the basic state-space model using the Selective CubeSSM module to match and compute 3D-MTS data scenarios:
[0093] 1) For a 3D-MTS tensor, the batch generated during training is formed. , where X in Used for theoretical derivation and calculation illustration, not the input data X used in actual training and reasoning process;
[0094] 2) Initialize the learnable parameter matrix This is used for updating the state matrix of the subsequent state-space model;
[0095] To construct a parameterization mechanism suitable for input-dependent 3D-MTS scenarios, this invention proposes a 3D parameterization strategy based on a novel two-step selective convolution design, such as... Figure 3 As shown, taking the cross-entity interaction branch as an example, firstly, feature selective convolution (FConv) is applied to treat entities as channels and convolve the S×L slices to achieve feature-level parameter selection. Then, entity selective convolution (EConv) is applied to the result to treat features as channels and convolve the F×L slices to achieve entity-level parameter selection.
[0096] The parameterized function expression is:
[0097] , ;
[0098] Here, δ represents three different parameters as variables, B and C both represent state parameters, Δ represents time step control parameters, which are used to help state parameters become time-varying parameters, and Linear represents linear transformation;
[0099] Input variables are passed through f B (X in ), f C (X in ), Linear(f △ (X in We obtain parameters B, C, and Δ, which vary depending on the input. The matrix parameterization mapping is expressed as:
[0100] ;
[0101] ;
[0102] ;
[0103] Input parameters B, C, and Δ into the second CubeSSM element, and discretize some of the parameters:
[0104] ;
[0105] ;
[0106] Where exp represents the exponent e, and Let B represent the second parameter matrix after discretization, S represent the entity dimension, F represent the feature dimension, L represent the time dimension, N represent the dimension of the hidden state, and I represent the identity matrix.
[0107] Initialize the potential state ;
[0108] Perform iterative calculations in the state space:
[0109] ;
[0110] ;
[0111] Where, x t This represents the input data at each time step, i.e., the second encoded feature X. entity Each iteration is based on the hidden state h of the previous time step. t-1 and the input data x at that time step t Calculate the hidden state and output value z2 at time step t. t Z1 as the second output feature entity C2 represents the second parameter matrix;
[0112] After iteration, the second output features obtained at all time steps are concatenated along the time dimension to obtain the second three-dimensional feature Z. entity .
[0113] The data processing procedure for the first selected cubic state space module is the same as that for the second selected cubic state space module, and will not be repeated here.
[0114] S3 inputs the fused features into the hypergraph attention module for piecewise processing. It combines the initial prior hypergraph and initial hyperedge weights to obtain the output features of the current stage, which are then used as the input for the next stage. All piecewise output features are merged to obtain the comprehensive features.
[0115] Furthermore, the hypergraph attention module includes a feature segmentation unit and multiple parallel hypergraph generation units;
[0116] The fused features are input into the feature segmentation unit, and segmented according to time length to obtain segmented features H for multiple stages. in =patching(H+W) pos ), Among them, W pos This indicates the location code, P represents the total number of fragments, and L represents the location code. p This indicates the time step of each slice;
[0117] Based on the first-stage fragmentation features Initial Prior Hypergraph The initial correlation matrix M 0 and initial hyperedge weight W 0 The input is fed into the first-layer hypergraph generation unit to obtain the output features of the current layer. Current layer association matrix M 1 and the current layer super-edge weight W 1 ;
[0118] Based on the second-stage fragmentation features Current layer association matrix M 1 and the current layer super-edge weight W 1 The input is fed into the second-layer hypergraph generation unit to obtain the output features of the next layer. The next level correlation matrix M 2 and the next layer superedge weight W 2 ;
[0119] By analogy, the output features of all stages can be obtained. , ... Then, the data is concatenated along the time dimension to obtain the comprehensive feature Pj = , || represents the splicing operation of multiple stages in the time dimension.
[0120] Furthermore, after segmentation, the entire time length is divided into multiple stages. In stage p, the initial input is the segmentation feature of stage P. The input is fed into the p-th layer hypergraph generation unit to obtain the output features. .
[0121] Furthermore, the iterative formula is:
[0122] ;
[0123] Among them, W p-1 Let σ represent the hyperedge weights in stage p-1, and let D represent the nonlinear activation function. v and D e Let these represent the node degree matrix and the hyperedge degree matrix, respectively. This represents the learnable parameter matrix. This represents the attention score matrix, where each element... , This represents the feature vector of node i. W represents the feature embedding of the hyperedge. Q and W K Each represents a learnable parameter matrix. Let i represent the set of superedges containing node i.
[0124] Furthermore, such as Figure 4 As shown, the multiple parallel hypergraph generation units have the same structure, all including: weight and matrix output units, multiple hypergraph convolutional layers, Dropout layers and BatchNorm layers;
[0125] Based on the current layer's correlation matrix input to the weight and matrix output unit, the next layer's correlation matrix and the next layer's hyperedge weights are obtained.
[0126] Based on the current stage segmentation features and the current layer hyperedge weights, they are sequentially input into multiple hypergraph convolutional layers and then processed by Dropout and BatchNorm layers to obtain the output features of the corresponding layers.
[0127] Furthermore, the weight and matrix output unit includes: a third linear layer, a convolutional layer, an SSM layer, a binarization network, an average pooling layer, and a diagonalization layer;
[0128] The current layer's correlation matrix is input into the third linear layer to obtain the first processed feature.
[0129] The first processed features are sequentially input into the convolutional layer and the SSM layer to obtain the second processed features;
[0130] A third processing feature is obtained by fusing the first and second processing features;
[0131] The third-processed feature is input into the binarization network to obtain the next layer correlation matrix;
[0132] Based on the third processing feature, the data are sequentially input into the average pooling layer and the diagonalization layer to obtain the super-edge weights of the next layer.
[0133] Furthermore, using the prior hypergraph from the previous stage as input... The correlation matrix M p-1 The input is fed into the third linear layer, convolutional layer, and SSM layer to obtain the third processed features. :
[0134] ;
[0135] Where MLP represents the linear mapping operation of the third linear layer, Conv1d represents the convolutional layer, and SSM represents the SSM layer. The computation in the SSM layer is as follows: ; where e i M represents p-1 The i-th hyperedge vector, z i The output of the SSM layer is used to obtain the third processing feature. To represent continuous-valued features of a hypergraph structure;
[0136] Input-based third processing features For each hyperedge, average pooling (AVG) is performed on the association values of all nodes to determine the importance of the hyperedge. To form a matrix, diagonalization is performed to obtain the final matrix, which is the weight W of the next layer of hyperedges. p ;
[0137] Based on third processing features The input is fed into a binarization network, where it is binarized using a learnable Gumbel-Softmax function to obtain the binary matrix of the hypergraph for the next stage. The binary matrix is the incidence matrix. , ε p Let |ε represent the set of hyperedges of stage p. p | represents the number of hyperedges in stage p, whose gradient approximation is handled by a pass-through estimator. Specifically, for each element... Forward propagation uses hard binarization via arg max, while backward propagation employs continuous Gumbel-Softmax relaxation.
[0138] ;
[0139] Among them, l j G represents the unnormalized logits class probability of the j-th element. j Let τ represent the Gumbel noise of the j-th element, and l represent the temperature control parameter. k G represents the unnormalized logits class probability of the k-th element. kLet Gumbel noise be the k-th element. The overall backward direction follows the softmax formula, and the denominator needs to be calculated and summed over all elements.
[0140] Furthermore, for a hypergraph structure with m nodes and n hyperedges, from a data structure perspective, it can be analyzed as an incidence matrix: each row of the matrix corresponds to a node, for a total of m nodes; each column represents a hyperedge, for a total of n hyperedges; if element M ij =1, which means that node i belongs to hyperedge j. Hypergraph As a logical structure, it is expressed mathematically and computationally using its correlation matrix M.
[0141] The prior hypergraph is based on the relationships between entities collected from the real world and is stored in the form of a hypergraph association matrix; it is initialized as an identity matrix.
[0142] S4 inputs comprehensive features into the detection head to obtain air quality prediction results.
[0143] Furthermore, by integrating the features Pj, air quality prediction results are obtained through the MLP prediction head. .
[0144] Furthermore, it also includes the prediction model training process:
[0145] The prediction model is composed of a dual-cubic state space module, a hypergraph attention module, and a detection head.
[0146] A total loss function is constructed to optimize and train the prediction model, resulting in a well-trained prediction model used for air quality detection.
[0147] Furthermore, the total loss function: ;
[0148] Where α and λ are adjustable parameters. Indicates regression loss, Represents the sorting loss. This represents the graph regularization loss.
[0149] Furthermore, regression loss Mean squared error between predicted and actual values:
[0150] ;
[0151] in, Indicates the predicted value. Represents the actual value;
[0152] Ranking loss: Preserves the relative order of entities.
[0153] ;
[0154] in, T represents the prediction time step, and S represents the number of entities.
[0155] Graph regularization loss: constraining the sparsity and smoothness of hypergraphs
[0156] ;
[0157] in, I represents the identity matrix, tr represents the trace of the matrix, and T represents the transpose. This represents the transpose of the output of the p-stage hypergraph convolution.
[0158] Example 2
[0159] This method was tested in an air quality application scenario. The KnowAir air quality dataset includes PM2.5 data and 17 meteorological attributes from 184 cities in China, recording observations every three hours from January 1, 2015 to December 31, 2018. The KnowAir dataset is divided into a 2:1:1 ratio in chronological order, with a sample span of 4 years. Table 1 shows the results of testing and experiments on this dataset.
[0160] Table 1. Statistics on the performance of the KnowAir dataset model
[0161]
[0162] The experimental results show that this invention also surpasses the baseline model on this dataset, and can help predict air quality more accurately.
[0163] Example 3
[0164] Based on the same inventive concept, the present invention also provides an air quality prediction system based on a three-dimensional state and evolution hypergraph, including: a data acquisition module, a feature fusion module, a piecewise iteration module, and a result output module;
[0165] The data acquisition module is used to acquire three-dimensional multivariate time series of air quality data as input data;
[0166] The feature fusion module is used to perform cross-feature and cross-entity interactions based on the input data input to the dual-cube state space module, and to fuse the data to obtain fused features.
[0167] The piecewise iteration module is used to process pieces based on the fused feature input to the hypergraph attention module. It combines the initial prior hypergraph and the initial hyperedge weights to obtain the output features of the current stage, which are used as the input for the next stage. All piecewise output features are merged to obtain the comprehensive features.
[0168] The results output module is used to obtain air quality prediction results based on the comprehensive feature input to the detection head.
[0169] Furthermore, in this embodiment, the functional implementation methods of each functional module correspond one-to-one with the methods described above, and will not be repeated here.
[0170] Example 4
[0171] Based on the same inventive concept, the present invention also provides an electronic device, which includes a processor and a memory, wherein the memory stores instructions, characterized in that the instructions are loaded and executed by the processor to implement an air quality prediction method based on a three-dimensional state and evolution hypergraph as in Embodiment 1.
[0172] Based on the same inventive concept, the present invention also provides a computer device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0173] Memory, used to store computer programs;
[0174] When the processor executes a program stored in memory, it is able to implement an air quality prediction method based on a three-dimensional state and evolution hypergraph, as shown in Example 1.
[0175] The electronic device may include a processor, a communications interface, a memory, and a communication bus, wherein the processor, communications interface, and memory communicate with each other via the communication bus. The processor can call logical instructions in the memory to execute an air quality prediction method based on a three-dimensional state and evolution hypergraph, as described in Embodiment 1.
[0176] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0177] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0178] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for air quality prediction based on three-dimensional state and evolution hypergraphs, characterized in that, include: Three-dimensional multivariate time series of air quality data is used as input data; A 3D-MTS tensor of air quality data wherein, B represents a batch dimension, S represents an entity dimension, F represents a feature dimension, L represents a time dimension; time dimension, sequence of the evolution of features and entities over time; entity dimension, data representing a unique one site; feature dimension, PM2.5 air quality feature; Based on the input data, cross-feature interaction and cross-entity interaction are performed in the dual-cubic state space module to obtain fused features; The dual-cubic state space module includes: a cross-feature interaction branch and a cross-entity interaction branch; The input data is flipped in dimension and then fed into the cross-feature branch. By modeling the collective behavior of different entities on the common influence of a single feature, the cross-feature dependency relationship is captured, and the behavior-dependent feature is obtained. The input data is fed into the cross-entity interaction branch, and by modeling the mutual influence of temporal patterns between different entities, the cross-entity dependency relationship is captured, and entity dependency features are obtained. The fused feature is obtained by fusing the behavior dependency feature dimension after it has been flipped with the entity dependency feature. The fused features are input to the hypergraph attention module for piecewise processing. The output features of the current stage are obtained by combining the initial prior hypergraph and the initial hyperedge weights. These are then used as the input for the next stage. All piecewise output features are merged to obtain the comprehensive features. The hypergraph attention module includes a feature segmentation unit and multiple parallel hypergraph generation units; The fused features are input to the feature segmentation unit and segmented according to the time length to obtain segmented features for multiple stages; Based on the first-stage piecewise features, the initial association matrix of the initial prior hypergraph, and the initial hyperedge weights, the first-layer hypergraph generation unit is input to obtain the current-layer output features, the current-layer association matrix, and the current-layer hyperedge weights. Based on the second-stage piecewise features, the current layer correlation matrix, and the current layer hyperedge weights, the second-layer hypergraph generation unit is input to obtain the next-layer output features, the next-layer correlation matrix, and the next-layer hyperedge weights. By analogy, the output features of all stages are obtained and concatenated along the time dimension to obtain the comprehensive features; Based on the comprehensive features input to the detection head, air quality prediction results are obtained.
2. The air quality prediction method based on a three-dimensional state and evolution hypergraph according to claim 1, characterized in that, The cross-feature interaction branch includes: a first linear layer and a first selection cube state space module; The input data is flipped in dimension and then input into the first linear layer to obtain the first encoded feature; The first encoded feature is input to the first selected cubic state space module to generate multiple first parameter matrices and iteratively calculate with the first encoded feature to obtain the first three-dimensional feature; The behavior-dependent feature is obtained by fusing the first three-dimensional feature with the first encoded feature.
3. The air quality prediction method based on a three-dimensional state and evolution hypergraph according to claim 2, characterized in that, The first selected cube state space module includes: a first entity selection convolution, a first feature selection convolution, and a first CubeSSM unit; The first encoded feature is sequentially input into the first entity selection convolution and the first feature selection convolution to obtain multiple first parameter matrices; The first parameter matrix is input into the first CubeSSM unit and discretized to obtain the first discrete matrix; The first output feature of the current time step is obtained based on the first discrete matrix and the first encoded feature; Based on the first output feature of the current time step, iterative calculation of the spatial state is performed to obtain the first output features of all time steps, which are then concatenated according to the time dimension to obtain the first three-dimensional feature.
4. The air quality prediction method based on a three-dimensional state and evolution hypergraph according to claim 1, characterized in that, The cross-entity interaction branch includes: a second linear layer and a second selection cube state space module; The input data is fed into the second linear layer to obtain the second encoded feature; The second encoded feature is input to the second selected cubic state space module to generate multiple second parameter matrices and iteratively calculate with the second encoded feature to obtain the second three-dimensional feature; The entity dependency feature is obtained by fusing the second three-dimensional feature with the second encoding feature.
5. The air quality prediction method based on a three-dimensional state and evolution hypergraph according to claim 4, characterized in that, The second selected cube state space module includes: a second feature selection convolution, a second entity selection convolution, and a second CubeSSM unit; The second encoded features are sequentially input into the second feature selection convolution and the second entity selection convolution to obtain multiple second parameter matrices; The second parameter matrix is input into the second CubeSSM cell for discretization to obtain the second discrete matrix; The second output feature for the current time step is obtained based on the second discrete matrix and the second encoded feature; Based on the second output feature of the current time step, iterative calculation of the spatial state is performed to obtain the second output feature of all time steps, which is then concatenated according to the time dimension to obtain the second three-dimensional feature.
6. The air quality prediction method based on a three-dimensional state and evolution hypergraph according to claim 1, characterized in that, The multiple parallel hypergraph generation units have the same structure, each including: a weight and matrix output unit, multiple hypergraph convolutional layers, a Dropout layer, and a BatchNorm layer; Based on the current layer correlation matrix input to the weight and matrix output unit, the next layer correlation matrix and the next layer hyperedge weights are obtained; Based on the current stage segmentation features and the current layer hyperedge weights, the data are sequentially input into multiple hypergraph convolutional layers and then processed by the Dropout layer and the BatchNorm layer to obtain the output features of the corresponding layers.
7. The air quality prediction method based on a three-dimensional state and evolution hypergraph according to claim 6, characterized in that, The weight and matrix output unit includes: a third linear layer, a convolutional layer, an SSM layer, a binarization network, an average pooling layer, and a diagonalization layer; The current layer correlation matrix is input to the third linear layer to obtain the first processed feature; Based on the first processing feature, it is sequentially input into the convolutional layer and the SSM layer to obtain the second processing feature; A third processing feature is obtained by fusing the first processing feature and the second processing feature; The third processed feature is input into the binarization network to obtain the next layer correlation matrix; Based on the third processing feature, the data are sequentially input into the average pooling layer and the diagonalization layer to obtain the next layer of superedge weights.
8. An air quality prediction system based on a three-dimensional state and evolutionary hypergraph, used to execute an air quality prediction method based on a three-dimensional state and evolutionary hypergraph as described in any one of claims 1-7, characterized in that, include: The module includes a data acquisition module, a feature fusion module, a slice iteration module, and a result output module. The data acquisition module is used to acquire a three-dimensional multivariate time series of air quality data as input data. The feature fusion module is used to perform cross-feature interaction and cross-entity interaction based on the input data input to the dual cubic state space module, and fuse them to obtain fused features. The piecewise iteration module is used to perform piecewise processing based on the fused feature input to the hypergraph attention module, combine the initial prior hypergraph and the initial hyperedge weights to obtain the output features of the current stage, use them as the input of the next stage, and merge all the piecewise output features to obtain the comprehensive features. The result output module is used to input the comprehensive features into the detection head to obtain air quality prediction results.