Air pollution concentration prediction method and system based on space-time intelligent agent
By constructing a spatiotemporal intelligent agent network, the problems of uneven spatiotemporal distribution and insufficient spatial correlation of multi-source data in air pollutant concentration prediction are solved, high-precision and real-time pollutant concentration prediction is achieved, the interpretability and adaptability of the model are enhanced, and it is suitable for complex urban environments.
Patent Information
- Application Number
- CN202510978348.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-16
- Publication Date
- 2025-09-12
AI Technical Summary
Existing air pollutant concentration prediction methods have uneven temporal and spatial distribution of multi-source data and limited ability to express spatial correlation, making it difficult to achieve multi-site collaborative prediction. In addition, the models lack interpretability and cannot adapt to the dynamic changes of complex urban environments.
A spatiotemporal agent-based approach is adopted to abstract air quality monitoring stations into spatiotemporal agents, and an agent network topology is constructed. Through a message passing network, spatiotemporal feature extractor, and prediction fusion module, training is performed in combination with a multi-task loss function to achieve air pollution concentration prediction.
It improves the accuracy, real-time and robustness of pollutant concentration predictions, can efficiently fuse information in a multi-source data heterogeneous environment, enhance the interpretability and transparency of the model, adapt to dynamic environmental changes, and support edge-cloud collaborative architecture and online incremental learning.
Smart Images

Figure CN120633945A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of air quality prediction, and more particularly to a method and system for predicting air pollution concentration based on a spatiotemporal intelligent agent. Background Art
[0002] With the accelerated pace of industrialization and urbanization, air pollution is becoming increasingly severe, becoming a key environmental challenge that threatens human health and hinders sustainable social development. High-precision predictions of air pollutant concentrations are essential for scientific environmental regulation, the precise formulation of environmental protection policies, and the effective protection of public health. Air pollutant concentrations are highly dynamic and complex across time and space, and their propagation and evolution are influenced by a variety of factors, including changing meteorological conditions, geographical and topographical characteristics, fluctuations in traffic volume, and human activities.
[0003] Traditional air quality prediction methods, such as air diffusion simulations based on statistical theory and mathematical models, can describe large-scale pollution transmission processes to a certain extent. However, they struggle to fully and accurately capture the complex interactions in urban environments, characterized by the interweaving of multi-source data, the coexistence of multi-scale features, and significant heterogeneity. For example, the Gaussian diffusion model, based on the assumption of ideal atmospheric conditions, can produce predictions that deviate significantly from actual conditions under complex urban terrain and variable meteorological conditions.
[0004] In recent years, data-driven machine learning and deep learning models have been widely used in the field of air pollution prediction, significantly improving the accuracy and efficiency of predictions. Algorithms such as random forest (RF), convolutional neural network (CNN), long short-term memory network (LSTM), and spatiotemporal graph convolutional network (ST-GCN) model and predict the changing patterns of pollutant concentrations by integrating multi-source information such as historical monitoring data, meteorological observation data, and traffic flow data. However, in actual application scenarios, these models still have obvious limitations: the uneven temporal and spatial distribution of data sources leads to bias in model training data; existing technologies have limited ability to express spatial correlation and cannot fully characterize the transmission links between pollutants in different regions; the analysis of multi-site coordinated pollution processes is not in-depth enough, and the model lacks interpretability. These problems seriously restrict the generalization ability and practical application value of the model.
[0005] Against this backdrop, the agent-based approach offers an innovative approach to addressing the challenges of large-scale, multi-point monitoring and pollution prediction in heterogeneous environments. Agent-based technology abstracts functional units such as spatial monitoring points, traffic nodes, and mobile populations into individual agents with autonomous perception, decision-making, and interaction capabilities, simulating the complex dynamics of urban operations from a more refined perspective. In recent years, agent-based models that integrate traffic flow analysis, urban land use planning, and pollution exposure assessment have been successfully applied to individual pollution exposure analysis, environmental risk assessment, and research on multi-source data collaboration mechanisms. By dynamically tracking the flow of information and the migration trajectories of pollutants across different spatial nodes, these models lay the theoretical and practical foundation for accurately capturing the spatiotemporal distribution characteristics of pollutants.
[0006] However, current research on air quality prediction based on intelligent agents mostly focuses on local spaces (such as traffic corridors, small areas) or specific functional scenarios, and it is difficult to effectively adapt to the complex application requirements of multi-site, large-scale, distributed collaboration. The intelligent agent modeling method based on single-point or local neighborhood coupling has significant deficiencies in realizing knowledge sharing and multi-point collaborative prediction of the global pollution propagation process. At the same time, with the continuous expansion of the air quality monitoring network in urban space, higher requirements are placed on the distributed collaborative perception capabilities of monitoring data, the real-time performance, reliability and security of prediction results. Therefore, there is an urgent need for an innovative method that can efficiently integrate multi-source monitoring data and pollution propagation mechanisms to achieve dynamic reasoning and accurate prediction across the entire domain. Summary of the Invention
[0007] In view of this, the present invention provides an air pollution concentration prediction method and system based on a spatiotemporal intelligent agent, which solves the problems existing in the background technology.
[0008] In order to achieve the above object, the present invention provides the following technical solutions:
[0009] A method for predicting air pollution concentration based on a spatiotemporal agent comprises the following steps:
[0010] S1. Abstract the air quality monitoring stations in the urban space into spatiotemporal agents, and construct an agent network topology map based on geographic spatial proximity and pollution propagation correlation;
[0011] S2. Build an air pollution concentration prediction model based on a message passing network, spatiotemporal feature extractor, and prediction fusion module;
[0012] S3. Train the air pollution concentration prediction model through the agent network topology graph and combine it with the multi-task loss function to obtain a trained air pollution concentration prediction model;
[0013] S4. Use the trained air pollution concentration prediction model to perform spatiotemporal intelligent agent prediction and output the air pollution concentration prediction results.
[0014] Optionally, the specific content of S1 is:
[0015] The state vector comprehensively represents the real-time observation information, environmental conditions and historical knowledge of the spatiotemporal agent. i The state vector at time t is defined as: S i (t) =[C i (t) , M i (t) , G i , H i (t) ];
[0016] Where: C i (t) =[c i,1 (t) , c i,2 (t) ,…,c i,p (t) ] represents agent A i The observed values of the concentrations of p pollutants at time t; M i (t) =[m i,1 (t) , m i,2 (t) ,…,m i,q (t) ] represents agent A i The q-dimensional meteorological feature vector at time t; G i =[x i ,y i , z i ,attr i ] represents agent A i Geographical location coordinates and regional attribute characteristics; H i (t) =[h i,1 (t) , h i,2 (t) ,…,h i,r (t) ] represents agent A i r-dimensional historical state encoding at time t;
[0017] Taking into account the geographical proximity, temporal correlation and pollution propagation mechanism, a network topology G = (V, E) is established for information transmission between agents, where V = {A1, A2, ..., A n} is the set of agent nodes, E is the set of edges;
[0018] Agent Ai and A j The connection weight w between ij The calculation formula is:
[0019]
[0020] Where: d ij Represents agent A i and A j The Euclidean distance between d represents the distance decay hyperparameter, ρ ij Represents agent A i and A j Pearson correlation coefficient of historical pollutant concentrations, S ij represents the similarity of pollutant propagation based on wind direction and terrain factors, and α, β, and γ represent weight balance hyperparameters.
[0021] Optionally, in S2, a message passing network is used to implement information exchange and collaborative reasoning between agents. Specifically:
[0022] The message encoder is used to convert the current state of the agent, the historical state of the neighbors and the connection weight into structured information. Agent A i At time t, the neighbor agent A j Message sent m i→j (t) Generated by message encoder: m i→j (t) =f msg (S i (t) , S j (t-1) , w ij ); Among them, the message encoder adopts a multi-layer perceptron structure: m i→j (t) =W3·σ(W2·σ(W1·[S i (t) ;S j (t-1) ;w ij ]+b1)+b2)+b3;
[0023] Where: W1, W2, W3 represent the weight matrix of the message encoder, b1, b2, b3 represent the bias vector, σ represents the ReLU activation function; S i (t) Represents agent A i The state vector at time t, S j (t-1) Represents agent A j The state vector at time t-1, w ij Represents agent Ai and A j The connection weight between msg Represents the message encoding function;
[0024] Agent A i Receive messages from all neighbors and aggregate them through the attention mechanism:
[0025]
[0026] Attention weight The calculation formula is:
[0027]
[0028] Use gated recurrent units to update the agent state:
[0029]
[0030] Where: Represents agent A i The message aggregation result of all neighbors, N(i) represents the agent A i The neighbor set of Represents agent A j At time t, the neighbor agent A i The message sent, W att and b att represents the weight and bias of the attention mechanism, S i (t+1) Represents agent A i The state vector at time t+1 is, Indicates A j To A i Attention score of importance.
[0031] Optionally, in S2, the spatiotemporal feature extractor is used to mine the spatiotemporal distribution patterns and propagation patterns of pollutants. Specifically:
[0032] For each agent A i , using bidirectional long short-term memory network to extract temporal features: h i,temporal (t) =Bi-LSTM([S i (t-T+1) , S i (t-T+2) ,…,S i (t) ]), using Bi-LSTM to capture the long-term temporal dependencies and periodic variation patterns of pollutant concentrations;
[0033] Use graph convolutional network to extract spatial features: h i,spatial(t) =GCN(S i (t) , A adj ), GCN aggregates the spatial information of neighboring agents to capture the spatial diffusion pattern and regional correlation of pollutants. The specific calculation process is as follows:
[0034]
[0035] Where: T represents the length of the timing window, h i,temporal (t) For agent A i The time series feature representation at time t, S i (t) Represents agent A i The state vector at time t; h i,spatial (t) For agent A i The spatial feature representation at time t is A adj Represents the connection weight w ij The constructed adjacency matrix; σ represents the ReLU activation function, represents the degree matrix, W gcn represents the GCN weight matrix, represents the adjacency matrix with self-loops, I represents the identity matrix, S (t) Represents the state matrix of all agents at time t.
[0036] Optionally, in S2, the prediction fusion module is used to integrate the multi-agent prediction results, specifically:
[0037] The local predictor integrates temporal features and spatial features to generate the initial prediction results based on the agent’s own information. Each agent A i Generate local predictions based on fused spatiotemporal features: Among them, the local predictor adopts a multi-layer fully connected network:
[0038] Integrate the local predictions of all agents to generate the final prediction result: Among them, the fusion weight Compute via a gating network:
[0039] Where: Δt represents the prediction time step, x input =[h i,temporal (t) ;h i,spatial (t) ;S i (t)] represents the input feature vector, W pred,L 、b pred,L Represents the weight and bias of the Lth layer; Represents agent A i The prediction confidence of W is calculated based on the historical prediction error; gate 、b gate represents the parameters of the gating network, which are learned through training; f pred Represents a local predictor function consisting of a multi-layer fully connected network.
[0040] Optionally, in S3, the multi-task loss function includes prediction loss, consistency loss and regularization term: L total =L pred +λ1L consist +λ2L reg ;
[0041] Among them, the prediction loss L pred Expressed as:
[0042]
[0043] Consistency loss L consist Expressed as:
[0044]
[0045] Regularization term L reg Expressed as:
[0046]
[0047] Where: λ1, λ2 represent the loss weight hyperparameters, n represents the number of agents, T train represents the training time step, C i (t) Represents agent A i The observed value of pollutant concentration at time t, w ij Represents agent A i and A j The connection weights between , Θ represents the set of all trainable parameters; Represents agent A i The predicted pollutant concentration value at time t, Represents agent A j The predicted pollutant concentration value at time t, E represents the set of connections between agents, and θ represents the trainable parameters.
[0048] Optionally, in S3, a phased training strategy is adopted when training the air pollution concentration prediction model. Specifically:
[0049] Phase 1, Agent Network Pre-training: Use historical data to train the local predictor in the prediction fusion module for E1 epochs;
[0050] Phase 2, message passing mechanism training: fix the spatiotemporal feature extractor, train the message encoder and attention mechanism in the message passing network for E2 epochs;
[0051] Phase 3, end-to-end joint training: Use a small learning rate for global fine-tuning, lasting E3 epochs.
[0052] A system for executing any of the above-mentioned methods for predicting air pollution concentration based on a spatiotemporal agent, comprising:
[0053] An agent network topology construction module is used to abstract air quality monitoring sites in the urban space into spatiotemporal agents and construct an agent network topology map based on geographic spatial proximity and pollution propagation correlation;
[0054] A model building module, which is used to build an air pollution concentration prediction model based on a message passing network, a spatiotemporal feature extractor, and a prediction fusion module;
[0055] The model training and optimization module is used to train the air pollution concentration prediction model through the agent network topology graph and combine it with the multi-task loss function to obtain a trained air pollution concentration prediction model;
[0056] The prediction module is used to perform spatiotemporal agent prediction using the trained air pollution concentration prediction model and output the air pollution concentration prediction results.
[0057] As can be seen from the above technical solutions, compared with the prior art, the present invention discloses a method and system for predicting air pollution concentration based on a spatiotemporal agent, which has the following beneficial effects:
[0058] Compared with existing air pollution concentration prediction technologies, the present invention can improve the accuracy, real-time performance and robustness of pollutant concentration prediction in large-scale urban environments with highly heterogeneous multi-source data and complex pollutant propagation mechanisms. By innovatively introducing the idea of distributed multi-agent collaborative modeling, efficient fusion and dynamic reasoning of monitoring data on a global scale are achieved, and the spatiotemporal distribution evolution of pollutants is portrayed, overcoming the technical bottlenecks of traditional methods such as insufficient spatial correlation modeling, isolated local predictions, and difficulty in compensating for missing data. It can not only adapt to dynamically changing environmental conditions and data patterns, but also continuously optimize prediction performance through edge-cloud collaborative architecture and online incremental learning mechanisms to ensure long-term stable operation. In addition, through information transmission mechanisms, attention weight visualization and feature contribution analysis, the interpretability and transparency of the model are enhanced, making the prediction results not only more scientific and reliable, but also easier to be adopted for scientific decision-making. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0060] Figure 1 This is a flow chart of the air pollution concentration prediction method based on spatiotemporal intelligent agent provided by the present invention. DETAILED DESCRIPTION
[0061] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0062] The embodiment of the present invention discloses a method for predicting air pollution concentration based on spatiotemporal intelligent agent, such as Figure 1 As shown, the following steps are included:
[0063] S1. Abstract the air quality monitoring stations in the urban space into spatiotemporal agents, and construct an agent network topology map based on geographic spatial proximity and pollution propagation correlation;
[0064] S2. Build an air pollution concentration prediction model based on a message passing network, spatiotemporal feature extractor, and prediction fusion module;
[0065] S3. Train the air pollution concentration prediction model through the agent network topology graph and combine it with the multi-task loss function to obtain a trained air pollution concentration prediction model;
[0066] S4. Use the trained air pollution concentration prediction model to perform spatiotemporal intelligent agent prediction and output the air pollution concentration prediction results.
[0067] based on Figure 1As shown in the process, this embodiment regards air quality monitoring sites as distributed intelligent agents, and realizes multi-point adaptive modeling and prediction of the spatiotemporal distribution of pollutants by building a message passing and collaborative reasoning mechanism on a global scale. Compared with the traditional centralized and static modeling method, the distributed spatiotemporal intelligent agent network has natural scalability and robustness, deeply explores the high-order dynamic correlation between spatial neighborhoods, and significantly improves the prediction accuracy in highly dynamic and complex environments. In addition, different intelligent agents can effectively overcome real-world problems such as data missing and observation blind spots through information sharing, complementary collaboration and joint learning, further enhance the generalization ability and interpretability of the air pollution concentration prediction model, and provide more powerful technical support for air pollution prevention and control.
[0068] Next, Figure 1 The process shown is described in detail to further understand the technical solution of the present invention.
[0069] 1. Overall Architecture Design
[0070] This spatiotemporal agent-based air pollution concentration prediction method uses a distributed multi-agent architecture, abstracting urban air quality monitoring stations into spatiotemporal agents with autonomous perception, decision-making, and interaction capabilities. By constructing an agent network topology, it enables multi-point collaborative perception, information transmission, and pollutant concentration prediction.
[0071] It mainly includes the following core components: one is the spatiotemporal agent node, which corresponds to the actual monitoring site and has data perception, local modeling and message passing functions; the second is the global coordinator, which is responsible for the initialization, topology management and global optimization of the agent network; the third is the message passing network, which realizes information exchange and collaborative reasoning between agents; the fourth is the spatiotemporal feature extractor, which explores the spatiotemporal distribution laws and propagation patterns of pollutants; the fifth is the prediction fusion module, which integrates the prediction results of multiple agents and outputs the final prediction value.
[0072] 2. Spatiotemporal Agent Modeling
[0073] 1. Agent state definition
[0074] The state vector comprehensively represents the real-time observation information, environmental conditions and historical knowledge of the spatiotemporal agent, providing basic data support for subsequent message transmission and predictive reasoning; each spatiotemporal agent A i The state vector at time t is defined as: S i (t) =[C i (t) , M i (t) , G i , H i (t) ];
[0075] Where: C i (t) =[c i,1 (t) , c i,2 (t) ,…,c i,p (t) ] represents agent A i The observed values of the concentrations of p pollutants at time t; M i (t) =[m i,1 (t) , m i,2 (t) ,…,m i,q (t) ] represents agent A i The q-dimensional meteorological feature vector at time t; G i =[x i ,y i , z i ,attr i ] represents agent A i Geographical location coordinates and regional attribute characteristics; H i (t) =[h i,1 (t) , h i,2 (t) ,…,h i,r (t) ] represents agent A i r-dimensional historical state encoding at time t.
[0076] 2. Agent Network Topology Construction
[0077] Based on the geographical proximity and pollution propagation correlation, the agent network topology is constructed. Taking into account the geographical proximity, temporal correlation and pollution propagation mechanism, a reasonable network structure is established for information transmission between agents. The network topology is represented as G = (V, E), where V = {A1, A2, ..., A n} is the set of agent nodes, E is the set of edges;
[0078] Agent A i and A j The connection weight w between ij The calculation formula is:
[0079]
[0080] Where: d ij Represents agent A i and A j The Euclidean distance between drepresents the distance decay hyperparameter, ρ ij Represents agent A i and A j Pearson correlation coefficient of historical pollutant concentrations, S ij represents the similarity of pollutant propagation based on wind direction and terrain factors, and α, β, and γ represent weight balance hyperparameters.
[0081] 3. Message Passing and Collaborative Reasoning Mechanism
[0082] 3.1 Message Generation and Encoding
[0083] The message encoder is used to convert the current state of the agent, the historical state of the neighbors and the connection weight into structured information to achieve effective transmission of key information. i At time t, the neighbor agent A j Message sent m i→j (t) Generated by message encoder: m i→j (t) =f msg (S i (t) , S j (t-1) , w ij ); The message encoder adopts a multi-layer perceptron (MLP) structure: m i→j (t) =W3·σ(W2·σ(W1·[S i (t) ;S j (t-1) ;w ij ]+b1)+b2)+b3;
[0084] Where: W1, W2, W3 represent the weight matrix of the message encoder, b1, b2, b3 represent the bias vector, σ represents the ReLU activation function; S i (t) Represents agent A i The state vector at time t, S j (t- 1) Represents agent A j The state vector at time t-1, w ij Represents agent A i and A j The connection weight between msg Represents a message encoding function.
[0085] 3.2 Message Aggregation and Status Update
[0086] Agent A i Receive messages from all neighbors and aggregate them through the attention mechanism:
[0087]
[0088] Attention weight The calculation formula is:
[0089]
[0090] Use gated recurrent unit (GRU) to update the agent state:
[0091]
[0092] Where: Represents agent A i The message aggregation result of all neighbors, N(i) represents the agent A i The neighbor set of Represents agent A j At time t, the neighbor agent A i The message sent, W att and b att represents the weight and bias of the attention mechanism, S i (t+1) Represents agent A i The state vector at time t+1 is, Indicates A j To A i Attention score of importance.
[0093] 4. Spatiotemporal feature extraction
[0094] 4.1 Temporal Feature Extraction
[0095] Time series feature extraction aims to uncover temporal variations in pollutant concentrations from historical observational data, encompassing characteristics across multiple time scales, including short-term fluctuations, cyclical patterns, seasonal variations, and long-term trends. The temporal characteristics of air pollution exhibit distinct multi-scale characteristics: rapid hourly variations reflect the impact of human activities, such as peak traffic flow and industrial emissions; daily cycles reflect the regularity of human activities; and seasonal variations reflect seasonal differences in meteorological conditions and pollution source intensity.
[0096] For each agent A i , using bidirectional long short-term memory network (Bi-LSTM) to extract temporal features: h i,temporal (t) =Bi-LSTM([S i (t-T+1) , S i (t-T+2 ),…,S i (t)]), Bi-LSTM is used to capture the long-term temporal dependencies and periodic variation patterns of pollutant concentrations, providing temporal context information for prediction;
[0097] Where T represents the time window length, h i,temporal (t) For agent A i The time series feature representation at time t, S i (t) Represents agent A i The state vector at time t.
[0098] 4.2 Spatial Feature Extraction
[0099] Spatial feature extraction aims to model the distribution and propagation patterns of pollutants across geographic space, including characteristics at different spatial scales, such as local diffusion, regional transmission, and cross-domain impact. The spatial characteristics of pollution are influenced by a variety of factors, including topography, meteorological conditions, pollution source distribution, and land use, exhibiting high spatial heterogeneity and complex correlation structures.
[0100] Graph Convolutional Network (GCN) is used to extract spatial features: h i,spatial (t) =GCN(S i (t) , A adj ), GCN aggregates the spatial information of neighboring agents to capture the spatial diffusion pattern and regional correlation of pollutants. The specific calculation process is as follows:
[0101]
[0102] Where: h i,spatial (t) For agent A i The spatial feature representation at time t is A adj Represents the connection weight w ij The constructed adjacency matrix; σ represents the ReLU activation function, represents the degree matrix, W gcn represents the GCN weight matrix, represents the adjacency matrix with self-loops, I represents the identity matrix, S (t) Represents the state matrix of all agents at time t.
[0103] 5. Multi-agent collaborative prediction
[0104] 5.1 Local Prediction Generation
[0105] The local predictor integrates temporal features and spatial features to generate the initial prediction results based on the agent’s own information. Each agent A iGenerate local predictions based on fused spatiotemporal features: Among them, the local predictor adopts a multi-layer fully connected network:
[0106] Where: Δt represents the prediction time step, x inpttt =[h i,temporal (t) ;h i,spatial (t) ;S i (t) ] represents the input feature vector, Wpred,L,bpred, and L represents the weight and bias of the Lth layer.
[0107] 5.2 Global Prediction Fusion
[0108] The prediction fusion module adaptively assigns weights to the prediction results of each agent to improve the overall prediction accuracy and robustness. The prediction fusion module integrates the local predictions of all agents to generate the final prediction result: Among them, the fusion weight Compute via a gating network:
[0109] Where: Represents agent A i The prediction confidence of W is calculated based on the historical prediction error; gate 、b gate represents the parameters of the gating network, which are learned through training; f pred Represents a local predictor function consisting of a multi-layer fully connected network.
[0110] 6. Model training and optimization
[0111] 6.1 Loss Function Design
[0112] The multi-task loss function is used to ensure the prediction accuracy while promoting the collaborative consistency between agents and improving the generalization ability of the model. The multi-task loss function includes prediction loss, consistency loss and regularization term: L total =L pred +λ1L consist +λ2L reg ;
[0113] Among them, the prediction loss L pred Expressed as:
[0114]
[0115] Consistency loss L consist Expressed as:
[0116]
[0117] Regularization term L reg Expressed as:
[0118]
[0119] Where: λ1, λ2 represent the loss weight hyperparameters, n represents the number of agents, T train represents the training time step, C i (t) Represents agent A i The observed value of pollutant concentration at time t, w ij Represents agent A i and A j The connection weights between , Θ represents the set of all trainable parameters; Represents agent A i The predicted pollutant concentration value at time t, Represents agent A j The predicted pollutant concentration value at time t, E represents the set of connections between agents, and θ represents the trainable parameters.
[0120] 6.2 Training Strategy
[0121] The air pollution concentration prediction model is trained using a phased training strategy to avoid gradient confusion in the early stages of training and improve the model's convergence speed and final performance. Specifically:
[0122] Phase 1, Agent Network Pre-training: Use historical data to train the local predictors in the prediction fusion module for E1 epochs. The goal is to establish the basic prediction capabilities of each agent and learn the temporal patterns of local data.
[0123] Phase 2: Message passing mechanism training: With the spatiotemporal feature extractor fixed, the message encoder and attention mechanism in the message passing network are trained for E2 epochs. The goal is to optimize information exchange between agents.
[0124] Phase 3, end-to-end joint training: Global fine-tuning is performed using a small learning rate for E3 epochs, with the goal of optimizing all components as a whole.
[0125] 7. Model deployment and real-time prediction
[0126] 7.1 Distributed Deployment Architecture
[0127] A distributed deployment model with edge-cloud collaboration is adopted to reduce data transmission latency and improve real-time and scalability. At the edge layer, lightweight intelligent agents are deployed at each monitoring site to handle local data processing and preliminary predictions. At the cloud layer, a global coordinator and prediction fusion module are deployed to perform global optimization and final predictions.
[0128] 7.2 Incremental Update Mechanism
[0129] Design an online learning mechanism to support incremental updates of the model, so that the model can adapt to environmental changes and new data patterns and maintain prediction accuracy. It can be expressed as:
[0130] Where: θ (t) represents the model parameter t, η represents the learning rate, D new represents the newly arrived training data, represents the gradient of the loss function with respect to the parameter θ, and L represents the loss function.
[0131] 8. Performance evaluation and optimization
[0132] 8.1 Evaluation Metrics
[0133] Based on the characteristics of spatiotemporal agent prediction, a comprehensive evaluation is conducted from multiple dimensions, including prediction accuracy, computational efficiency, stability, and practicality. Multi-dimensional evaluation indicators are used, including: accuracy indicators (mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE)); consistency indicators (inter-agent prediction correlation coefficient, spatial consistency index); and efficiency indicators (prediction latency, computational complexity, and communication overhead).
[0134] 8.2 Model Interpretability
[0135] Through attention weight visualization and feature importance analysis, the model decision-making is made explainable, which helps environmental management departments understand the prediction mechanism and formulate targeted pollution prevention and control measures. This includes: ranking the importance of information transmission between intelligent agents, analyzing the contribution of different features to the prediction results, and visualizing spatiotemporal patterns.
[0136] Through the above technical solutions, the air pollution concentration prediction method based on spatiotemporal intelligence can effectively integrate multi-source monitoring data, achieve high-precision and high-real-time prediction of pollutant concentrations, and provide strong technical support for environmental protection and public health.
[0137] and Figure 1 Corresponding to the method described above, the embodiment of the present invention also provides an air pollution concentration prediction system based on spatiotemporal intelligent agent, which is used to Figure 1The specific implementation of the method in the embodiment of the present invention is an air pollution concentration prediction system based on a spatiotemporal agent, which can be applied to a computer terminal or various mobile devices, specifically including:
[0138] An agent network topology construction module is used to abstract air quality monitoring sites in the urban space into spatiotemporal agents and construct an agent network topology map based on geographic spatial proximity and pollution propagation correlation;
[0139] A model building module, which is used to build an air pollution concentration prediction model based on a message passing network, a spatiotemporal feature extractor, and a prediction fusion module;
[0140] The model training and optimization module is used to train the air pollution concentration prediction model through the agent network topology graph and combine it with the multi-task loss function to obtain a trained air pollution concentration prediction model;
[0141] The prediction module is used to perform spatiotemporal agent prediction using the trained air pollution concentration prediction model and output the air pollution concentration prediction results.
[0142] In summary, this embodiment proposes a method and system for predicting air pollution concentrations based on spatiotemporal agents. By constructing a distributed multi-agent collaborative architecture, this method abstracts air quality monitoring sites into spatiotemporal agents with autonomous perception, decision-making, and interaction capabilities. This system enables multi-point information sharing, collaborative modeling, and dynamic reasoning on a global scale to achieve accurate predictions of air pollutant concentrations. Furthermore, this system is scalable and robust, efficiently integrating multi-source monitoring data, sensing changes in the spatiotemporal distribution of pollutants in real time, and supporting dynamic optimization and online updating of prediction results, providing technical support for environmental management and pollution prevention and control.
[0143] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0144] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one 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 present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting air pollution concentration based on spatiotemporal agent, characterized in that: The following steps are involved: S1. Abstract the air quality monitoring stations in the urban space into spatiotemporal agents, and construct an agent network topology map based on geographic spatial proximity and pollution propagation correlation; S2. Build an air pollution concentration prediction model based on a message passing network, spatiotemporal feature extractor, and prediction fusion module; S3. Train the air pollution concentration prediction model through the agent network topology graph and combine it with the multi-task loss function to obtain a trained air pollution concentration prediction model; S4. Use the trained air pollution concentration prediction model to perform spatiotemporal intelligent agent prediction and output the air pollution concentration prediction results.
2. The method for predicting air pollution concentration based on spatiotemporal agent according to claim 1, characterized in that: The specific contents of S1 are: The state vector comprehensively represents the real-time observation information, environmental conditions and historical knowledge of the spatiotemporal agent. i The state vector at time t is defined as: S i (t) =[C i (t) ,M i (t) ,G i ,H i (t) ]; Where: C i (t) =[c i,1 (t) ,c i,2 (t) ,…,c i,p (t) ] represents agent A i The observed values of the concentrations of p pollutants at time t; M i (t) =[m i,1 (t) ,m i,2 (t) ,…,m i,q (t) ] represents agent A i The q-dimensional meteorological feature vector at time t; G i =[x i ,y i ,z i ,attr i ] represents agent A i Geographical location coordinates and regional attribute characteristics; H i (t) =[h i,1 (t) ,h i,2 (t) ,…,h i,r (t) ] represents agent A i r-dimensional historical state encoding at time t; Taking into account the geographical proximity, temporal correlation and pollution propagation mechanism, a network topology G = (V, E) is established for information transmission between agents, where V = {A1, A2, ..., A n } is the set of agent nodes, E is the set of edges; Agent A i and A j The connection weight w between ij The calculation formula is: Where: d ij Represents agent A i and A j The Euclidean distance between d represents the distance decay hyperparameter, ρ ij Represents agent A i and A j Pearson correlation coefficient of historical pollutant concentrations, S ij represents the similarity of pollutant propagation based on wind direction and terrain factors, and α, β, and γ represent weight balance hyperparameters.
3. The method for predicting air pollution concentration based on spatiotemporal agent according to claim 1, characterized in that: In S2, the message passing network is used to implement information exchange and collaborative reasoning between agents. Specifically: The message encoder is used to convert the current state of the agent, the historical state of the neighbors and the connection weight into structured information. Agent A i At time t, the neighbor agent A j Message sent m i→j (t) Generated by message encoder: m i→j (t) =f msg (S i (t) ,S j (t-1) ,w ij ); Among them, the message encoder adopts a multi-layer perceptron structure: m i→j (t) =W3·σ(W2·σ(W1·[S i (t) ;S j (t-1) ;w ij ]+b1)+b2)+b3; Where: W1, W2, W3 represent the weight matrix of the message encoder, b1, b2, b3 represent the bias vector, σ represents the ReLU activation function; S i (t) Represents agent A i The state vector at time t, S j (t-1) Represents agent A j The state vector at time t-1, w ij Represents agent A i and A j The connection weight between msg Represents the message encoding function; Agent A i Receive messages from all neighbors and aggregate them through the attention mechanism: Attention weight The calculation formula is: Use gated recurrent units to update the agent state: Where: Represents agent A i The message aggregation result of all neighbors, N(i) represents the agent A i The neighbor set of Represents agent A j At time t, the neighbor agent A i The message sent, W att and b att represents the weight and bias of the attention mechanism, S i (t+1) Represents agent A i The state vector at time t+1 is, Indicates A j To A i Attention score of importance.
4. The method for predicting air pollution concentration based on spatiotemporal agent according to claim 1, characterized in that: In S2, the spatiotemporal feature extractor is used to explore the spatiotemporal distribution patterns and propagation patterns of pollutants. Specifically: For each agent A i , using bidirectional long short-term memory network to extract temporal features: h i,temporal (t) =Bi-LSTM([S i (t-T+1) ,S i (t-T+2) ,…,S i (t) ]), using Bi-LSTM to capture the long-term temporal dependencies and periodic variation patterns of pollutant concentrations; Use graph convolutional networks to extract spatial features: h i,spatial (t) =GCN(S i (t) ,A adj ), GCN aggregates the spatial information of neighboring agents to capture the spatial diffusion pattern and regional correlation of pollutants. The specific calculation process is as follows: Where: T represents the length of the timing window, h i,remporal (t) is the agent A i The time series feature representation at time t, S i (t) Represents agent A i The state vector at time t; h i,spatial (t) For agent A i The spatial feature representation at time t is A adj Represents the connection weight w ij The constructed adjacency matrix; σ represents the ReLU activation function, represents the degree matrix, W gcn represents the GCN weight matrix, represents the adjacency matrix with self-loops, I represents the identity matrix, S (t) Represents the state matrix of all agents at time t.
5. The method for predicting air pollution concentration based on spatiotemporal agent according to claim 4, characterized in that: In S2, the prediction fusion module is used to integrate the prediction results of multiple agents. Specifically: The local predictor integrates temporal features and spatial features to generate the initial prediction results based on the agent’s own information. Each agent A i Generate local predictions based on fused spatiotemporal features: Among them, the local predictor adopts a multi-layer fully connected network: Integrate the local predictions of all agents to generate the final prediction result: Among them, the fusion weight Compute via a gating network: Where: Δt represents the prediction time step, x input =[h i,temoral (t) ;h i,spatial (t) ;S i (t) ] represents the input feature vector, W pred,L 、b pred,L Represents the weight and bias of the Lth layer; Represents agent A i The prediction confidence of W is calculated based on the historical prediction error; gate 、b gate represents the parameters of the gating network, which are learned through training; f pred Represents a local predictor function consisting of a multi-layer fully connected network.
6. The method for predicting air pollution concentration based on spatiotemporal agent according to claim 1, characterized in that: In S3, the multi-task loss function includes prediction loss, consistency loss and regularization term: L total =L pred +λ1L consist +λ2L reg ; Among them, the prediction loss L pred Expressed as: Consistency loss L consist Expressed as: Regularization term L reg Expressed as: Where: λ1, λ2 represent the loss weight hyperparameters, n represents the number of agents, T train represents the training time step, C i (t) Represents agent A i The observed value of pollutant concentration at time t, w ij Represents agent A i and A j The connection weights between , Θ represents the set of all trainable parameters; Represents agent A i The predicted pollutant concentration value at time t, Represents agent A j The predicted pollutant concentration value at time t, E represents the set of connections between agents, and θ represents the trainable parameters.
7. The method for predicting air pollution concentration based on spatiotemporal agent according to claim 1, characterized in that: In S3, the air pollution concentration prediction model is trained using a phased training strategy. Specifically: Phase 1, Agent Network Pre-training: Use historical data to train the local predictor in the prediction fusion module for E1 epochs; Phase 2, message passing mechanism training: fix the spatiotemporal feature extractor, train the message encoder and attention mechanism in the message passing network for E2 epochs; Phase 3, end-to-end joint training: Use a small learning rate for global fine-tuning, lasting E3 epochs.
8. A system for executing the method for predicting air pollution concentration based on a spatiotemporal agent according to any one of claims 1 to 7, characterized in that: include: An agent network topology construction module is used to abstract air quality monitoring sites in the urban space into spatiotemporal agents and construct an agent network topology map based on geographic spatial proximity and pollution propagation correlation; A model building module, which is used to build an air pollution concentration prediction model based on a message passing network, a spatiotemporal feature extractor, and a prediction fusion module; The model training and optimization module is used to train the air pollution concentration prediction model through the agent network topology graph and combine it with the multi-task loss function to obtain a trained air pollution concentration prediction model; The prediction module is used to perform spatiotemporal agent prediction using the trained air pollution concentration prediction model and output the air pollution concentration prediction results.
Citation Information
Cited By
Indoor air quality joint detection system fused with space-time diagram neural network
CN120847348A