Air quality assessment method and device based on graph neural network, equipment and storage medium
By using a graph neural network-based approach and air concentration data collected by IoT devices for data preprocessing and feature extraction, the problem of the inability to intuitively assess air quality levels in existing technologies is solved, enabling rapid and accurate air quality assessment.
Patent Information
- Application Number
- CN202311404130.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2043-10-25
AI Technical Summary
Existing AI-based models can only provide indicators of the concentration of harmful substances in the air when assessing air quality, but cannot intuitively provide the air quality level.
By employing a graph neural network-based approach, air quality levels are output by acquiring air concentration data collected by IoT devices, performing data preprocessing, and then using a graph neural network model for data aggregation, feature expansion, and extraction, combined with artificial neural network layers.
It enables rapid and accurate assessment of air quality levels, improving the accuracy of the assessment.
Smart Images

Figure CN119889502B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of environmental monitoring technology, and in particular to an air quality assessment method, apparatus, equipment, and storage medium based on graph neural networks. Background Technology
[0002] In recent years, environmental issues have become an increasingly important concern. Many places have established air quality monitoring platforms to measure and assess the air quality in their areas.
[0003] In related technologies, artificial intelligence-based models are used to assess air quality. For example, air quality assessment models are built based on recurrent neural networks (RNNs), long short-term memory (LSTMs), or gated recurrent units (GRUs). However, these methods typically only provide indicators of the concentration of harmful substances in the air and do not intuitively provide the air quality level. Summary of the Invention
[0004] This application provides an air quality assessment method, apparatus, electronic device, and storage medium based on graph neural networks, capable of accurately and quickly assessing the air quality level of a specified area. The technical solution of this application is as follows:
[0005] In a first aspect, this application provides an air quality assessment method based on graph neural networks, the method comprising:
[0006] Acquire air concentration data collected by IoT devices in a target area within a target time period. The air concentration data includes time-series concentration data of carbon monoxide (CO), nitrogen dioxide (NO2), ozone (O3), and PM2.5.
[0007] The air concentration data is preprocessed to obtain a first graph data and a second graph data. The first graph data is used to characterize the concentration value of each element in the air at each time point within the target time period, and the second graph data is used to characterize multiple time points within the target time period.
[0008] The first graph data and the second graph data are input into the air quality assessment model, which is a graph neural network model trained by deep learning.
[0009] Through the graph data transmission layer in the air quality assessment model, the first graph data and the second graph data are aggregated to obtain a first aggregation feature corresponding to the first graph data and a second aggregation feature corresponding to the second graph data. The first aggregation feature is used to characterize the aggregated air concentration corresponding to each time point within the target time period, and the second aggregation feature is used to characterize the correlation between multiple time points within the target time period.
[0010] The first aggregated feature is extended by the graph convolutional layer in the air quality assessment model to obtain the extended features of the first aggregated feature. Based on the extended features, the second aggregated feature is extracted to obtain the feature vector of the second aggregated feature.
[0011] The feature vector is processed by the artificial neural network layer in the air quality assessment model to output the air quality level of the target area within the target time period.
[0012] In some embodiments, a node in the first graph data is used to represent the concentration value of an element, and an edge is used to represent the probability that the concentration values of the two nodes connected by the edge meet the condition of obtaining the same air quality level.
[0013] In the second graph data, a node is used to represent a point in time, and the edges are used to represent the temporal relationship between two points in time.
[0014] In some embodiments, the step of aggregating the first graph data and the second graph data through the graph data transmission layer in the air quality assessment model to obtain a first aggregated feature corresponding to the first graph data and a second aggregated feature corresponding to the second graph data includes:
[0015] The first graph data is aggregated using the first transmission unit in the graph data transmission layer, based on the following formulas (1) to (3), to obtain the first aggregated feature:
[0016]
[0017]
[0018]
[0019] Among them, A 影响因素 I represents the adjacency matrix corresponding to the data in the first graph. 影响因素 D represents the identity matrix corresponding to the data in the first graph. 影响因素 L represents the degree matrix corresponding to the data in the first graph. 影响因素This is a normalized matrix used to represent the first aggregated feature;
[0020] The second graph data is aggregated using the second transmission unit in the graph data transmission layer, based on the following formulas (4) to (6), to obtain the second aggregated feature:
[0021]
[0022]
[0023]
[0024] Among them, A 时间序列 I represents the adjacency matrix corresponding to the data in the second graph. 时间序列 D represents the identity matrix corresponding to the data in the second graph. 时间序列 L represents the degree matrix corresponding to the data in the second graph. 时间序列 This is a normalized matrix used to represent the second aggregated feature.
[0025] In some embodiments, the step of extending the first aggregated feature through a graph convolutional layer in the air quality assessment model to obtain extended features of the first aggregated feature, and then extracting features from the second aggregated feature based on the extended features to obtain a feature vector of the second aggregated feature, includes:
[0026] The first aggregated feature is extended using the first convolutional unit of the graph convolutional layer based on the following formulas (7) and (8) to obtain the extended feature:
[0027]
[0028] H i+2 =tanh(H i+1 W 影响因素聚合 +b 影响因素聚合 (8)
[0029] Among them, W 影响因素聚合 RS represents the sum of M random matrices. N×F This function returns an N×F random matrix, where N represents the number of nodes in the first graph data, F represents the number of features in the first graph data after feature expansion, and H represents the input matrix corresponding to the first graph data. i+2 Indicating the extended feature, b 影响因素聚合 Used to fit the deviations that occur during the training process;
[0030] The second convolutional unit of the graph convolutional layer extracts features from the second aggregated features based on the extended features and the following formulas (9) and (10) to obtain the feature vector:
[0031]
[0032] K i+1 =tanh(K) i W 时间序列聚合 +b 时间序列聚合 (10)
[0033] Among them, W 时间序列聚合 RS represents the sum of M random matrices. F×z This function returns an F×Z random matrix, where Z represents the number of features at each node after feature extraction, and K represents the matrix containing the features of the second graph data. i The matrix K is obtained based on the extended features and the ReLU activation function. i+1 Let b represent the feature vector. 时间序列聚合 Used to fit the deviations that occur during the training process.
[0034] In some embodiments, the feature vector is processed by an artificial neural network layer in the air quality assessment model to output the air quality level of the target area within the target time period, including:
[0035] The air quality level is obtained by processing the feature vector through the artificial neural network layer based on the ReLU activation function and the Softmax classifier. The artificial neural network layer includes an input layer, a hidden layer and an output layer, and the Dropout value is 0.2.
[0036] In some embodiments, the method further includes:
[0037] The air quality assessment model is trained based on any of the following loss functions: cross-entropy loss function, mean squared error loss function, and Hinge loss function.
[0038] Secondly, this application provides an air quality assessment device based on a graph neural network, the device comprising:
[0039] The acquisition module is used to acquire air concentration data collected by IoT devices in a target area within a target time period. The air concentration data includes time series concentration data of carbon monoxide (CO), nitrogen dioxide (NO2), ozone (O3), and PM2.5.
[0040] The preprocessing module is used to preprocess the air concentration data to obtain a first graph data and a second graph data. The first graph data is used to characterize the concentration value of each element in the air at each time point within the target time period, and the second graph data is used to characterize multiple time points within the target time period.
[0041] The input module is used to input the first graph data and the second graph data into the air quality assessment model, which is a graph neural network model trained by deep learning.
[0042] The transmission module is used to aggregate the first graph data and the second graph data respectively through the graph data transmission layer in the air quality assessment model to obtain a first aggregation feature corresponding to the first graph data and a second aggregation feature corresponding to the second graph data. The first aggregation feature is used to characterize the aggregated air concentration corresponding to each time point within the target time period, and the second aggregation feature is used to characterize the correlation between multiple time points within the target time period.
[0043] The convolution module is used to extend the first aggregated feature through the graph convolutional layer in the air quality assessment model to obtain the extended feature of the first aggregated feature, and to extract the feature of the second aggregated feature based on the extended feature to obtain the feature vector of the second aggregated feature.
[0044] The output module is used to process the feature vector through the artificial neural network layer in the air quality assessment model and output the air quality level of the target area within the target time period.
[0045] In some embodiments, a node in the first graph data is used to represent the concentration value of an element, and an edge is used to represent the probability that the concentration values of the two nodes connected by the edge meet the condition of obtaining the same air quality level.
[0046] In the second graph data, a node is used to represent a point in time, and the edges are used to represent the temporal relationship between two points in time.
[0047] Thirdly, this application provides an electronic device including a processor and a memory, wherein the memory stores program code and the processor executes the program code to implement the above-described air quality assessment method based on graph neural networks.
[0048] Fourthly, this application provides a computer-readable storage medium, which includes: when the program code in the computer-readable storage medium is executed by a processor of an electronic device, enabling the electronic device to perform the above-described air quality assessment method based on a graph neural network.
[0049] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0050] Figure 1 This is a schematic diagram illustrating the implementation environment of an air quality assessment method based on graph neural networks.
[0051] Figure 2 This is a flowchart of an air quality assessment method based on graph neural networks;
[0052] Figure 3 This is a schematic diagram of the structure of first-figure data;
[0053] Figure 4 This is a schematic diagram of the structure of second-figure data;
[0054] Figure 5 This is a schematic diagram of an air quality assessment device based on a graph neural network;
[0055] Figure 6 This is a schematic diagram of the structure of an electronic device. Detailed Implementation
[0056] To enable those skilled in the art to better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0057] The data involved in this application may be data authorized by the user or fully authorized by all parties.
[0058] Figure 1 This is a schematic diagram illustrating the implementation environment of an air quality assessment method based on graph neural networks. (See attached diagram) Figure 1 The implementation environment includes: IoT device 101 and server 102, which can be directly or indirectly connected via wired or wireless communication.
[0059] The IoT device 101 is equipped with sensors capable of collecting concentration data of various elements in the air within a designated area. After collecting the air concentration data, the IoT device 101 sends the data to the server 102. The server 102 is equipped with a pre-trained air quality assessment model. The server 102 can preprocess the received air concentration data and, based on the pre-processed data, output the air quality level for the designated area using the pre-trained air quality assessment model. For example, the server 102 can be a standalone physical server, a server cluster consisting of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, and big data and artificial intelligence platforms. This application is not limited to these. Furthermore, the server 102 can also train an initial neural network based on a training dataset to obtain a pre-trained air quality assessment model.
[0060] Figure 2 This is a flowchart of an air quality assessment method based on graph neural networks, such as... Figure 2 As shown, the method is executed by the server and includes the following steps 201 to 206.
[0061] 201. Obtain air concentration data collected by IoT devices in the target area within the target time period.
[0062] The air concentration data includes time-series concentrations of various elements in the air. Schematic examples include time-series concentrations of carbon monoxide (CO), nitrogen dioxide (NO2), ozone (O3), and PM2.5. The target time period is a preset time period, for example, 8 hours, but this is not limited. The target area refers to a designated area, such as a factory, an apartment building, a commercial area, etc. This application does not limit the criteria for defining the target area. At least one IoT device is deployed in the target area, equipped with sensors capable of collecting various air concentration data in the target area and sending the collected air concentration data to a server.
[0063] 202. Perform data preprocessing on the air concentration data to obtain the first graph data and the second graph data. The first graph data is used to represent the concentration value of each element in the air at each time point within the target time period, and the second graph data is used to represent multiple time points within the target time period.
[0064] In this process, the air concentration data is preprocessed to present the data in the form of graphs, which facilitates subsequent air quality assessment using air quality assessment models.
[0065] In some embodiments, a node in the first graph data represents the concentration value of an element, and an edge represents the probability that the concentration values of two nodes connected by the edge correspond to the same air quality level. For example... Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of the first-figure data. For any point in time within the target time period, four nodes represent the concentration values of four elements: CO, NO2, O3, and PM2.5. If two concentration values represented by two nodes may lead to the same prediction result, then there will be an edge connecting them. That is, the edge between two nodes represents the probability that the concentration values corresponding to these two nodes may result in the same air quality level, i.e., the aforementioned probability meets the condition. For example, the condition is set to a probability of 90%, without limitation. It should be understood that since the concentration values of multiple elements will comprehensively affect the final air quality level, the first-figure data can also be understood as a set of influencing factors for air quality levels.
[0066] In some implementations, a node in the second graph data represents a point in time, and the edges represent the temporal relationship between two points in time. For example... Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of a second graph data. For example, this application uses 10 consecutive time points within the target time period for prediction. The interval between each time point can be set according to requirements, and this application does not limit this. Here, a node corresponds to a time point, and the edge between two nodes represents the time relationship. That is, the second graph data can also be understood as a kind of feature relationship data based on time series.
[0067] 203. Input the data from the first and second graphs into the air quality assessment model. The air quality assessment model is a graph neural network model trained using deep learning.
[0068] The air quality assessment model is a graph neural network (GNN) model, comprising a graph transport layer, a graph convolutional layer, and an artificial neural network (ANN). The input to this model is the aforementioned first and second graph data, and the output is the air quality level. Illustratively, the air quality assessment model is trained using a supervised training method, where the air quality levels are pre-defined, for example, divided into 10 levels from 1 to 10, with lower levels indicating worse air quality. By inputting the first and second graph data into the air quality assessment model, the corresponding air quality level can be directly obtained, resulting in high efficiency.
[0069] It should be noted that this application does not limit the loss function used in the training of the air quality assessment model. For example, the air quality assessment model can be trained based on any of the following loss functions: cross-entropy loss function, mean squared error loss function, Hinge loss function, etc.
[0070] The detailed processing procedure of the air quality assessment model is described below through steps 204 to 206.
[0071] 204. Through the graph data transmission layer in the air quality assessment model, the first graph data and the second graph data are aggregated respectively to obtain the first aggregated feature corresponding to the first graph data and the second aggregated feature corresponding to the second graph data. The first aggregated feature is used to characterize the aggregated air concentration corresponding to each time point within the target time period, and the second aggregated feature is used to characterize the correlation between multiple time points within the target time period.
[0072] The graph data transmission layer includes a first transmission unit and a second transmission unit. Through these two transmission units, data aggregation, or matrix normalization, is performed on the first graph data and the second graph data, respectively. Schematally, this includes the following steps:
[0073] Step 1: Through the first transmission unit in the graph data transmission layer, perform data aggregation on the first graph data based on the following formulas (1) to (3) to obtain the first aggregation feature:
[0074]
[0075]
[0076]
[0077] Among them, A 影响因素 I represents the adjacency matrix corresponding to the data in the first graph. 影响因素 D represents the identity matrix corresponding to the data in the first figure. 影响因素 L represents the degree matrix corresponding to the data in the first graph. 影响因素 This is a normalized matrix used to represent the first aggregated feature.
[0078] Step 1 above is the stage of aggregating the air concentration data corresponding to each time point.
[0079] Step 2: Through the second transmission unit in the graph data transmission layer, based on the following formulas (4) to (6), perform data aggregation on the second graph data to obtain the second aggregation feature:
[0080]
[0081]
[0082]
[0083] Among them, A 时间序列 I represents the adjacency matrix corresponding to the data in the second graph. 时间序列 D represents the identity matrix corresponding to the data in the second graph. 时间序列 L represents the degree matrix corresponding to the data in the second graph. 时间序列 This is a normalized matrix used to represent the second aggregation feature.
[0084] Step 2 above is the stage of aggregating information from multiple time points within the target time period.
[0085] 205. Using the graph convolutional layer in the air quality assessment model, feature expansion is performed on the first aggregated feature to obtain the extended feature of the first aggregated feature. Feature extraction is performed on the second aggregated feature to obtain the feature vector of the second aggregated feature.
[0086] The graph convolutional layer includes a first convolutional unit and a second convolutional unit. These two units respectively expand the first aggregated feature and extract features from the second aggregated feature based on the expanded feature. Schematably, it includes the following steps:
[0087] Step 1: Using the first convolutional unit of the graph convolutional layer, based on the following formulas (7) and (8), perform feature expansion on the first aggregated feature to obtain the expanded feature:
[0088]
[0089] H i+2 =tanh(H i+1 W 影响因素聚合 +b 影响因素聚合 (8)
[0090] Among them, W 影响因素聚合 RS represents the sum of M random matrices (M refers to the number of nodes in the second graph data). N×F This function returns an N×F random matrix, where N represents the number of nodes in the first graph data, F represents the number of features in the first graph data after feature expansion, and H represents the input matrix corresponding to the first graph data. i+2 Indicates extended features, b 影响因素聚合 Used to fit the deviations that occur during the training process.
[0091] Step 2: Using the second convolutional unit of the graph convolutional layer, based on the extended features and the following formulas (9) and (10), feature extraction is performed on the second aggregated features to obtain the feature vector:
[0092]
[0093] K i+1 =tanh(K) i W 时间序列聚合 +b 时间序列聚合 (10)
[0094] Among them, W 时间序列聚合 RS represents the sum of M random matrices. F×Z This function returns an F×Z random matrix, where Z represents the number of features at each node after feature extraction, and K represents the matrix containing the features of the second graph data. i It is based on the extended features (i.e., H calculated using the previous formula (8)). i+2 The matrix obtained by the ReLU activation function, K i+1 b represents the eigenvector. 时间序列聚合 Used to fit the deviations that occur during the training process.
[0095] 206. By processing the feature vector through the artificial neural network layer in the air quality assessment model, the air quality level of the target area within the target time period is output.
[0096] The artificial neural network layer consists of an input layer, hidden layers, and an output layer, with Dropout set to 0.2. The feature vector is input into the artificial neural network layer, which processes the feature vector using the ReLU activation function and a Softmax classifier to obtain the air quality level.
[0097] In the method provided in this application embodiment, after obtaining the concentration data of various air types in the target area within a target time period, this concentration data is processed into graph data. The graph data is then input into a trained air quality assessment model to obtain the air quality level of the target area within the target time period. In the above method, by using a graph neural network model to process the data relationships in the model, the accuracy of air quality levels can be improved while rapidly assessing the air quality level of a specified area.
[0098] Figure 5 This is a schematic diagram of an air quality assessment device based on a graph neural network. (Refer to...) Figure 5 The device includes an acquisition module 501, a preprocessing module 502, an input module 503, a transmission module 504, a convolution module 505, and an output module 506.
[0099] The acquisition module 501 is used to acquire air concentration data collected by IoT devices in the target area within a target time period. The air concentration data includes time series concentration data of carbon monoxide (CO), time series concentration data of nitrogen dioxide (NO2), time series concentration data of ozone (O3), and time series concentration data of PM2.5.
[0100] The preprocessing module 502 is used to preprocess the air concentration data to obtain a first graph data and a second graph data. The first graph data is used to characterize the concentration value of each element in the air at each time point within the target time period, and the second graph data is used to characterize multiple time points within the target time period.
[0101] Input module 503 is used to input the first graph data and the second graph data into an air quality assessment model, wherein the air quality assessment model is a graph neural network model trained by deep learning.
[0102] The transmission module 504 is used to perform data aggregation on the first graph data and the second graph data respectively through the graph data transmission layer in the air quality assessment model to obtain a first aggregation feature corresponding to the first graph data and a second aggregation feature corresponding to the second graph data. The first aggregation feature is used to characterize the aggregated air concentration corresponding to each time point within the target time period, and the second aggregation feature is used to characterize the correlation between multiple time points within the target time period.
[0103] The convolution module 505 is used to extend the first aggregated feature through the graph convolution layer in the air quality assessment model to obtain the extended feature of the first aggregated feature, and extract the feature of the second aggregated feature based on the extended feature to obtain the feature vector of the second aggregated feature.
[0104] The output module 506 is used to process the feature vector through the artificial neural network layer in the air quality assessment model and output the air quality level of the target area within the target time period.
[0105] In some embodiments, the above-described means are further configured to implement as described above. Figure 2 Other optional implementation methods shown in the method embodiments will not be described in detail here.
[0106] Figure 6This is a schematic diagram of an electronic device. This electronic device can be configured as the aforementioned server. The electronic device 600 can vary significantly due to different configurations or performance characteristics. It may include one or more Central Processing Units (CPUs) 601 and one or more memories 602. The one or more memories 602 store at least one line of program code, which is loaded and executed by the one or more processors 601 to implement the server-executed process in the graph neural network-based air quality assessment method provided in the various method embodiments described above. Of course, the electronic device 600 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The electronic device 600 may also include other components for implementing device functions, which will not be elaborated here.
[0107] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0108] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. An air quality assessment method based on graph neural networks, characterized in that, The method includes: Acquire air concentration data collected by IoT devices in a target area within a target time period. The air concentration data includes time-series concentration data of carbon monoxide (CO), nitrogen dioxide (NO2), ozone (O3), and PM2.
5. The air concentration data is preprocessed to obtain a first graph data and a second graph data. The first graph data is used to characterize the concentration value of each element in the air at each time point within the target time period, and the second graph data is used to characterize multiple time points within the target time period. The first graph data and the second graph data are input into the air quality assessment model, which is a graph neural network model trained by deep learning. Through the graph data transmission layer in the air quality assessment model, the first graph data and the second graph data are aggregated to obtain a first aggregation feature corresponding to the first graph data and a second aggregation feature corresponding to the second graph data. The first aggregation feature is used to characterize the aggregated air concentration corresponding to each time point within the target time period, and the second aggregation feature is used to characterize the correlation between multiple time points within the target time period. The first aggregated feature is extended by the graph convolutional layer in the air quality assessment model to obtain the extended features of the first aggregated feature. Based on the extended features, the second aggregated feature is extracted to obtain the feature vector of the second aggregated feature. The feature vector is processed by the artificial neural network layer in the air quality assessment model to output the air quality level of the target area within the target time period.
2. The method according to claim 1, characterized in that, In the first graph data, a node is used to represent the concentration value of an element, and the edge is used to represent the probability that the concentration values of the two nodes connected by the edge meet the condition of obtaining the same air quality level. In the second graph data, a node is used to represent a point in time, and the edges are used to represent the temporal relationship between two points in time.
3. The method according to claim 1, characterized in that, The step of aggregating the first graph data and the second graph data through the graph data transmission layer in the air quality assessment model to obtain a first aggregated feature corresponding to the first graph data and a second aggregated feature corresponding to the second graph data includes: The first graph data is aggregated using the first transmission unit in the graph data transmission layer, based on the following formulas (1) to (3), to obtain the first aggregated feature: Among them, A 影响因素 I represents the adjacency matrix corresponding to the data in the first graph. 影响因素 D represents the identity matrix corresponding to the data in the first graph. 影响因素 L represents the degree matrix corresponding to the data in the first graph. 影响因素 This is a normalized matrix used to represent the first aggregated feature; The second graph data is aggregated using the second transmission unit in the graph data transmission layer, based on the following formulas (4) to (6), to obtain the second aggregated feature: Among them, A 时间序列 I represents the adjacency matrix corresponding to the data in the second graph. 时间序列 D represents the identity matrix corresponding to the data in the second graph. 时间序列 L represents the degree matrix corresponding to the data in the second graph. 时间序列 This is a normalized matrix used to represent the second aggregated feature.
4. The method according to claim 1, characterized in that, The first aggregated feature is extended using a graph convolutional layer in the air quality assessment model to obtain extended features of the first aggregated feature. Based on the extended features, the second aggregated feature is extracted to obtain a feature vector of the second aggregated feature, including: The first aggregated feature is extended using the first convolutional unit of the graph convolutional layer based on the following formulas (7) and (8) to obtain the extended feature: H i+2 =tanh(H i+1 W 影响因素聚合 +b 影响因素聚合 ) (8), Among them, W 影响因素聚合 RS represents the sum of M random matrices. N×F This function returns an N×F random matrix, where N represents the number of nodes in the first graph data, F represents the number of features in the first graph data after feature expansion, and H represents the input matrix corresponding to the first graph data. i+2 Indicating the extended feature, b 影响因素聚合 Used to fit the deviations that occur during the training process; The second convolutional unit of the graph convolutional layer extracts features from the second aggregated features based on the extended features and the following formulas (9) and (10) to obtain the feature vector: K i+1 =tanh(K i W 时间序列聚合 +b 时间序列聚合 ) (10) Among them, W 时间序列聚合 RS represents the sum of M random matrices. F×z This function returns an F×Z random matrix, where Z represents the number of features at each node after feature extraction, and K represents the matrix containing the features of the second graph data. i The matrix K is obtained based on the extended features and the ReLU activation function. i+1 Let b represent the feature vector. 时间序列聚合 Used to fit the deviations that occur during the training process.
5. The method according to claim 1, characterized in that, The feature vector is processed through the artificial neural network layer in the air quality assessment model to output the air quality level of the target area within the target time period, including: The air quality level is obtained by processing the feature vector through the artificial neural network layer based on the ReLU activation function and the Softmax classifier. The artificial neural network layer includes an input layer, a hidden layer and an output layer, and the Dropout value is 0.
2.
6. The method according to claim 1, characterized in that, The method further includes: The air quality assessment model is trained based on any of the following loss functions: cross-entropy loss function, mean squared error loss function, and Hinge loss function.
7. An air quality assessment device based on graph neural networks, characterized in that, The device includes: The acquisition module is used to acquire air concentration data collected by IoT devices in a target area within a target time period. The air concentration data includes time series concentration data of carbon monoxide (CO), nitrogen dioxide (NO2), ozone (O3), and PM2.
5. The preprocessing module is used to preprocess the air concentration data to obtain a first graph data and a second graph data. The first graph data is used to characterize the concentration value of each element in the air at each time point within the target time period, and the second graph data is used to characterize multiple time points within the target time period. The input module is used to input the first graph data and the second graph data into the air quality assessment model, which is a graph neural network model trained by deep learning. The transmission module is used to aggregate the first graph data and the second graph data respectively through the graph data transmission layer in the air quality assessment model to obtain a first aggregation feature corresponding to the first graph data and a second aggregation feature corresponding to the second graph data. The first aggregation feature is used to characterize the aggregated air concentration corresponding to each time point within the target time period, and the second aggregation feature is used to characterize the correlation between multiple time points within the target time period. The convolution module is used to extend the first aggregated feature through the graph convolutional layer in the air quality assessment model to obtain the extended feature of the first aggregated feature, and to extract the feature of the second aggregated feature based on the extended feature to obtain the feature vector of the second aggregated feature. The output module is used to process the feature vector through the artificial neural network layer in the air quality assessment model and output the air quality level of the target area within the target time period.
8. The apparatus according to claim 7, characterized in that, In the first graph data, a node is used to represent the concentration value of an element, and the edge is used to represent the probability that the concentration values of the two nodes connected by the edge meet the condition of obtaining the same air quality level. In the second graph data, a node is used to represent a point in time, and the edges are used to represent the temporal relationship between two points in time.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing program code, and the processor executing the program code to implement the air quality assessment method based on a graph neural network as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, When the program code in the computer-readable storage medium is executed by the processor of the electronic device, the electronic device is able to perform the air quality assessment method based on a graph neural network as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Graph neural network training method and system, computer equipment and storage medium
CN113222143A
Monitoring station importance evaluation method and system based on graph neural network
CN115564255A