A PM2.5 concentration prediction method and system based on wind speed and direction diagram
By constructing a PM2.5 concentration prediction method based on wind speed and direction graph, using graph attention network and long and short-term memory network model to dynamically update edge weights, the shortcomings of spatial relationships and dynamic changes in the existing technology are solved, and the more Accurate and dynamic PM2.5 concentration prediction.
Patent Information
- Application Number
- CN202411551398.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-01
AI Technical Summary
The existing PM2.5 concentration prediction method lacks discussion on spatial relationships, lacks discussion of dynamic changes, and it is difficult to accurately predict the long-term concentration change trend of PM2.5.
The PM2.5 concentration prediction method based on the wind speed and direction map is adopted, and the meteorological data, pollutant concentration data and geographical location information of each region are obtained, and the attention network of the first graph and the attention network of the second graph are constructed, and the multi-head attention mechanism is used. and the long and short-term memory network model, dynamically update the edge weights, and explore the impact of wind speed and direction on PM2.5 concentration.
Effectively judge the impact of changes in wind speed and direction on PM2.5 diffusion, improve the accuracy and dynamicity of PM2.5 concentration prediction, and has better generalization ability and adaptability.
Smart Images

Figure CN119047351B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of air quality prediction, and in particular to a PM2.5 concentration prediction method and system based on a wind speed and wind direction diagram. Background Art
[0002] Fine particulate matter (PM2.5) is a key factor in inducing the haze phenomenon. As one of the most important environmental problems, it has attracted widespread attention from the society. Deteriorating air quality will cause serious harm to human physical and mental health, increase the risk of lesions in the respiratory tract, heart and lungs, cardiovascular organs, and cause adverse consequences such as reduced individual efficiency, reduced innovation output and happiness. Therefore, accurately predicting the long-term concentration trend of PM2.5 and issuing forecast and warning information in a timely manner are of great significance for effectively reducing the risk of people being exposed to high-concentration PM2.5 environments and reducing the incidence of related diseases.
[0003] The fluctuation of PM2.5 concentration is affected by many factors, including the accumulation and dissipation mechanism of pollutants in the region, as well as the transmission of pollutants in surrounding areas. These factors interact with each other and jointly drive the change of pollutant concentration. The current method of PM2.5 concentration prediction is still insufficient in exploring spatial relationships and lacks discussion on dynamic changes. Summary of the invention
[0004] In order to solve the technical problem that the current PM2.5 concentration prediction method has insufficient exploration of spatial relationships, an embodiment of the present invention provides a PM2.5 concentration prediction method and system based on a wind speed and wind direction diagram.
[0005] The technical solution of the embodiment of the present invention is achieved as follows:
[0006] An embodiment of the present invention provides a PM2.5 concentration prediction method based on a wind speed and wind direction map, the method comprising: obtaining meteorological data, pollutant concentration data and geographical location information of each region; constructing a first graph attention network with each region as a node according to the geographical location information of each region; obtaining PM2.5 time series data according to the pollutant concentration data of each region, performing variational mode decomposition on the PM2.5 time series data, and obtaining multiple intrinsic mode function components after decomposition; splicing the multiple intrinsic mode function components with other pollutant concentration data other than PM2.5 in the pollutant concentration data of each region and the meteorological data to obtain the feature input of the first graph attention network; inputting the meteorological data and geographical location information of each region into the constructed second graph attention network to obtain wind speed and wind direction prediction values; using the wind speed and wind direction prediction values to obtain the edge weights of the first graph attention network; based on the feature input of the first graph attention network and the edge weights of the first graph attention network, using a multi-head attention mechanism to obtain the output of the first graph attention network; using a long short-term memory network model to process the output of the first graph attention network to obtain a PM2.5 concentration prediction value.
[0007] An embodiment of the present invention also provides a PM2.5 concentration prediction system based on a wind speed and wind direction diagram, comprising: a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, it executes the steps of any one of the above methods.
[0008] An embodiment of the present invention further provides a storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0009] This embodiment has the following advantages:
[0010] 1. Aiming at the actual scenario of pollutant diffusion, considering the impact of changing wind speed and direction on PM2.5 fluctuations, a VMD-TGAT-LSTM model based on wind speed and direction map correction is proposed, which effectively determines the impact of changes in wind speed and direction on PM2.5 diffusion to different areas and the resulting changes in PM2.5 concentration.
[0011] 2. Considering that PM2.5 is greatly affected by wind speed and wind direction, when predicting PM2.5 concentration, the regions should be discussed holistically and dynamically. A dual spatiotemporal graph attention network based on wind speed and wind direction graph is introduced to describe the problem from a global perspective. An attention mechanism based on wind speed and wind direction corrected geographic distance weights is used to dynamically update edge weights as wind speed and wind direction change. The impact of changes in wind speed and direction on PM2.5 concentrations in different regions is explored, which is more in line with actual conditions and has better generalization and adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 Schematic diagram of the flow of a PM2.5 concentration prediction method based on a wind speed and wind direction diagram according to an embodiment of the present invention;
[0013] Figure 2 It is a flow chart of the dual graph attention network (VMD-TGAT-LSTM) model of an embodiment of the present invention;
[0014] Figure 3 1 is a diagram showing the internal structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0015] The present invention will be described in further detail below with reference to the accompanying drawings and embodiments.
[0016] The embodiment of the present invention provides a PM2.5 concentration prediction method based on wind speed and wind direction diagram, such as Figure 1 As shown, the method includes:
[0017] Step 101: Obtaining meteorological data, pollutant concentration data and geographic location information of each region;
[0018] Step 102: constructing a first graph attention network based on the geographical location information of each region and taking each region as a node;
[0019] Step 103: acquiring PM2.5 time series data according to the pollutant concentration data of each region, performing variational mode decomposition on the PM2.5 time series data, and obtaining a plurality of intrinsic mode function components after decomposition; splicing the plurality of intrinsic mode function components with other pollutant concentration data except PM2.5 in the pollutant concentration data of each region and the meteorological data, and obtaining the feature input of the first graph attention network;
[0020] Step 104: input the meteorological data and geographical location information of each region into the constructed second graph attention network to obtain wind speed and wind direction prediction values; and use the wind speed and wind direction prediction values to obtain edge weights of the first graph attention network;
[0021] Step 105: Based on the feature input of the first graph attention network and the edge weight of the first graph attention network, using a multi-head attention mechanism, obtaining the output of the first graph attention network;
[0022] Step 106: Use the long short-term memory network model to process the output of the first graph attention network to obtain a predicted value of PM2.5 concentration.
[0023] This embodiment is based on the actual scenario of the diffusion of pollutants PM2.5. Taking into account the spatial correlation of PM2.5 diffusion and the high volatility of data, the PM2.5 particles in a certain area are affected by the spread of various regions, which is a systematic and holistic problem. Therefore, in dealing with the volatility problem, PM2.5 is subjected to variational mode decomposition to effectively suppress data noise. In solving the problem of spatial correlation, each area of the monitoring point is described as a node network, which is linked to each other to form an associated graph, and firstly, a wind speed and wind direction graph attention network (GAT) is constructed based on meteorological data such as wind speed and wind direction to predict the wind speed and wind direction in the next time period. Subsequently, the geographical distance weights between nodes are dynamically updated based on the predicted wind speed and wind direction, forming the GAT edge weights that adjust the geographical distance influence of wind speed and wind direction, and characterizing the correlation between each node based on the influence of wind speed and wind direction on other nodes.
[0024] This embodiment predicts the wind speed and direction of the next time period, combines the geographic distance information to correct the correlation between the PM2.5 diffusion of pollutants between nodes, and dynamically updates the attention weight of GAT. It uses a multi-head attention mechanism and is processed by the spatiotemporal graph neural network to predict the PM2.5 concentration of each node in the next time period, and warns of the changes and diffusion mechanism of pollutants. Because this method fully considers the impact of the constantly changing wind speed and wind direction, and uses variational mode decomposition technology to reduce the noise of PM2.5 data, and dynamically updates the edge weights of the spatiotemporal graph neural network in real time, the prediction has good generalization performance and dynamic update capabilities.
[0025] A specific application example will be used for illustration below.
[0026] Given that the PM2.5 time series is affected by a variety of factors, there is a lot of random interference in the series, and the ever-changing wind speed and direction have a huge impact on it. The prediction ability of a single prediction model that relies solely on complex parameters is limited, and it is difficult to accurately fit its changing trend. In this regard, this embodiment constructs a dual graph attention network (VMD-TGAT-LSTM) model based on wind speed and direction map correction based on the consideration of factors such as the non-stationarity and spatial correlation of PM2.5 time series data. The specific process is as follows: Figure 2 shown.
[0027] Step 1: Obtain the meteorological data (wind speed WS, wind direction WD, temperature t, humidity h, air pressure p), pollutant concentration data (PM2.5, PM10, CO, NO2, O3) and their corresponding longitude lon and latitude lat geographic location information of the area from the meteorological instruments and air quality detectors arranged in each area.
[0028] Step 2: Decompose the PM2.5 time series data into K intrinsic mode function (IMF) components through variational mode decomposition (VMD) technology.
[0029] Sub-step 1: Initialization. Set the number of decomposed modal components K, initialize each modal function IMFk and center frequency , k∈[1,K].
[0030] Sub-step 2: Construct the constrained variational problem:
[0031] Formula (1)
[0032] in, represents partial derivative, represents the Dirac distribution, is the convolution symbol, for The kth component after decomposition, K is the total number of components, j represents the imaginary unit, represents the center frequency of component k, t represents time, Represents the PM2.5 concentration at time t.
[0033] Sub-step 3: Solve the constrained variational problem. Introduce the penalty coefficient and Lagrange multipliers , transformed into an unconstrained problem, the obtained Lagrangian function is as follows:
[0034] Formula (2)
[0035] in, represents the augmented Lagrangian function, is the penalty coefficient, is the Lagrange multiplier.
[0036] Sub-step 4: Update via alternating direction method of multipliers (ADMM) , and , the process is as follows:
[0037] Formula (3)
[0038] in, express At the n+1th iteration of express At the n+1th iteration of express At the n+1th iteration of , , , They are , , , modal component of .
[0039] Sub-step 5: Iterative update. Given the judgment accuracy , if it satisfies:
[0040] Formula (4)
[0041] Then stop the iteration, otherwise return to sub-step 3.
[0042] Sub-step 6: Output the decomposition results. When the algorithm converges, the solved mode Obtain the inverse Fourier transform to obtain the final K IMFk components after VMD decomposition.
[0043] Step 3: Concatenate each IMF component of the monitoring node with the sequences of the remaining features (referring to the remaining pollutant concentration data and meteorological data) to keep the dimension consistent, and normalize all feature data to eliminate the impact of the dimension.
[0044] Step 4: Predict the wind speed WD and wind direction WD of the regional node in the next time period.
[0045] Sub-step 1: Describe each air quality monitoring area as a node of the graph, and the spatial coordinate information corresponding to the longitude and latitude of nodes i and j , , , The relative distance between node i and node j is measured as :
[0046] Formula (5)
[0047] The relative distance from node i Nodes with values less than or equal to M are included in the observations, and the Pearson correlation coefficient between node i and the rest of the nodes based on PM2.5 is calculated. :
[0048] Formula (6)
[0049] in, is the PM2.5 concentration of node i in the past N time periods, is the PM2.5 concentration covariance between nodes i and j, is the PM2.5 concentration variance of node i in the past N time periods.
[0050] Set the minimum correlation coefficient threshold , will| |≥ The nodes are connected into edges to build a graph network.
[0051] Sub-step 2: Update the attention coefficient of the wind speed and direction map.
[0052] Update the wind speed and direction attention coefficient between nodes i and j , specifically:
[0053] Formula (7)
[0054] in, It is a nonlinear activation function used to improve the expressive power of the model. For one The transpose of the dimensional learnable parameter vector. and is the feature vector of nodes i and j in the input layer, with an initial dimension of F 2 . is a learnable weight matrix of a shared linear transformation, F 2 、F 2 ' are the input and output dimensions respectively. Represents the vector concatenation operation, which concatenates the vectors into Dimension, then dot multiplication , mapping high-dimensional features to a real number range.
[0055] Sub-step 3: Update the attention weights of the wind speed and direction map.
[0056] In order to facilitate the comparison of the attention coefficients between node i and different nodes, the attention coefficients are standardized by the softmax function to obtain the attention weights of the wind speed and direction graph.
[0057]
[0058] Formula (8)
[0059] in, is the set of neighbor nodes linked to node i.
[0060] Sub-step 4: Input the wind speed WS, wind direction WD, temperature t, humidity h, and air pressure p data of each node in the previous time period as feature vectors into the wind speed and wind direction graph attention network. The feature vector output after information aggregation can be obtained by the attention weights. , which contains the wind speed WS and wind direction WD information of node i at the next moment, where the wind speed information is the wind speed level, and the wind direction information includes 16 wind directions such as east, east-southeast, southeast, and south-southeast, represented by angle values 0, 25.5, 45, 67.5, etc., between 0 and 360.
[0061] Formula (9)
[0062] Sub-step 5: Obtain stable wind speed and direction output based on the multi-head attention mechanism.
[0063] In order to prevent overfitting, a multi-head attention mechanism is used to introduce multiple groups Vector Sum Matrix to make the model more stable and get the final output .
[0064] Formula (10)
[0065] in, It is the vector of node i after the attention weight of the wind speed and wind direction graph and the multi-head attention mechanism are updated, which contains the wind speed WS and wind direction information WD of node i at the next moment. 2 is the number of attention heads, representing the use of T 2 Group Vector Sum Matrix to get the new vector of node i , represents the kth group W 2 Weight matrix, k∈[1,T].
[0066] Step 5: Construct the GAT network attention weights based on wind speed and direction to correct the impact of geographical distance.
[0067] Sub-step 1: Construct the PM2.5 diffusion influence coefficient between nodes based on the relationship between wind speed and direction.
[0068] Find the difference between the coordinate angle of node i and the wind direction angle on the coordinate axis centered at node j :
[0069] Formula (11)
[0070] Among them, arccos is the inverse cosine function, is the wind direction angle value of node j.
[0071] The coefficient of node i based on the wind speed and direction of node j is obtained as :
[0072] Formula (12)
[0073] in, and are the wind speeds of regional nodes i and j respectively, is a cosine function. This indicates that the greater the wind speed in region j, the easier it is for pollutants to diffuse to other regions, and the diffusion direction is affected by the wind direction. At the same time, the relationship between the wind speed and direction between nodes is restricted by the geographical distance.
[0074] Sub-step 3: Update the attention coefficient based on wind speed and direction to correct for the effect of geographic distance.
[0075] Update the attention coefficient between nodes i and j , specifically:
[0076] Formula (13)
[0077] Among them, c is the adjustment coefficient, 0<c<1. This shows that the relationship between PM2.5 diffusion between different nodes is affected by the spatial geographical distance and is regulated by the dynamic changes of wind speed and direction. For one The transpose of the dimensional learnable parameter vector. and is the feature vector of nodes i and j in the input layer, with an initial dimension of F 1 . is a learnable weight matrix that shares a linear transformation.
[0078] Sub-step 4: Update the attention weight based on wind speed and direction to correct for the effect of geographic distance.
[0079] The attention coefficient is normalized by the softmax function to obtain the attention weight.
[0080] Formula (14)
[0081] Sub-step 5: Update edge weights through the multi-head attention mechanism to generate the output of GAT.
[0082] The wind speed WS, wind direction WD, temperature t, humidity h, air pressure p data of each node in the previous time period, the concentration data of each pollutant (PM10, CO, NO2, O3) and the IMF data after PM2.5 decomposition are input into the spatiotemporal graph attention network, and the feature vector output can be obtained by adjusting the attention weight of the geographical distance based on the wind speed and direction .
[0083] Formula (15)
[0084] Use multi-head attention mechanism to introduce multiple groups Vector Sum Matrix to make the model more stable and get the final output .
[0085] Formula (16)
[0086] in, It is the updated feature vector of the multi-head attention mechanism based on wind speed and direction to adjust the geographical distance. Represents the kth group The weight matrix, k∈[1, ].
[0087] Step 6: The GAT network output with corrected attention weights based on wind speed and direction is processed by the LSTM model to obtain the final output result.
[0088] The specific calculation process of LSTM is as follows:
[0089] The output of the GAT layer is passed into the LSTM as input, and the data is calculated through the forget gate, input gate, and output gate.
[0090] The forget gate determines the amount of information discarded from the memory cell.
[0091] Formula (17)
[0092] in, is the output of the forget gate; It is a sigmoid function, which is used to output a value between 0 and 1, indicating the degree of information retention; is the weight matrix, used to adjust the importance of the input; is the output of the previous time step, is the input of the current time step, they are concatenated into a new vector, so that the forget gate considers both the past state information and the current input; is a bias term used to adjust the output range of the sigmoid function.
[0093] The input gate determines what new information will be added to the memory cell.
[0094] Formula (18)
[0095] Formula (19)
[0096] Formula (20)
[0097] in, and are the input gate and candidate memory cell states respectively; tanh is the activation function used to map the input to the range of -1 to 1; and is the weight matrix; and is the bias term; and are the memory cell states of the current time step and the previous time step respectively.
[0098] The output gate determines the amount of information that is output from the memory cell.
[0099] Formula (21)
[0100] Formula (22)
[0101] Formula (23)
[0102] in, is the output of the output gate; is the hidden state at the current time step; is the weight matrix; is the bias term.
[0103] Step 7: Output the LSTM result Denormalize and obtain the PM2.5 concentration of the node area in the next time period.
[0104] This embodiment has the following effects:
[0105] 1. Aiming at the actual scenario of pollutant diffusion, considering the impact of changing wind speed and direction on PM2.5 fluctuations, a VMD-TGAT-LSTM model based on wind speed and direction map correction is proposed, which effectively determines the impact of changes in wind speed and direction on PM2.5 diffusion to different areas and the resulting changes in PM2.5 concentration.
[0106] 2. Considering that PM2.5 is greatly affected by wind speed and wind direction, when predicting PM2.5 concentration, the regions should be discussed holistically and dynamically. A dual spatiotemporal graph attention network based on wind speed and wind direction graph is introduced to describe the problem from a global perspective. An attention mechanism based on wind speed and wind direction corrected geographic distance weights is used to dynamically update edge weights as wind speed and wind direction change. The impact of changes in wind speed and direction on PM2.5 concentrations in different regions is explored, which is more in line with actual conditions and has better generalization and adaptability.
[0107] In order to implement the method of an embodiment of the present invention, an embodiment of the present invention also provides a PM2.5 concentration prediction system based on a wind speed and wind direction diagram, comprising: a processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, the steps of any one of the above methods are executed.
[0108] The above-mentioned system provided in this embodiment belongs to the same concept as the above-mentioned method embodiment. The specific implementation process thereof is detailed in the method embodiment and will not be repeated here.
[0109] In order to implement the method of the embodiment of the present invention, the embodiment of the present invention also provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of the above method.
[0110] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present invention, the embodiment of the present invention further provides an electronic device (computer device). Specifically, in one embodiment, the computer device may be a terminal, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05 and a memory (not shown in the figure) connected through a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A06. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor A01, the method of any one of the above embodiments is implemented. The display screen A04 of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device A05 of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0111] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0112] The device provided by the embodiment of the present invention includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the method of any one of the above embodiments is implemented.
[0113] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0114] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0115] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0117] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0118] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0119] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0120] It can be understood that the memory of the embodiment of the present invention can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memories described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memories.
[0121] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0122] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A PM2.5 concentration prediction method based on wind speed and wind direction diagram, characterized in that: The method comprises: Obtain meteorological data, pollutant concentration data and geographic location information for each region; According to the geographical location information of each area, a first graph attention network is constructed with each area as a node; Acquire PM2.5 time series data according to the pollutant concentration data of each region, perform variational mode decomposition on the PM2.5 time series data, and obtain multiple intrinsic mode function components after decomposition; splice the multiple intrinsic mode function components with other pollutant concentration data except PM2.5 in the pollutant concentration data of each region and the meteorological data to obtain the feature input of the first graph attention network; Inputting the meteorological data and geographical location information of each region into the constructed second graph attention network to obtain wind speed and wind direction prediction values; using the wind speed and wind direction prediction values to obtain edge weights of the first graph attention network; Based on the feature input of the first graph attention network and the edge weight of the first graph attention network, using a multi-head attention mechanism, obtaining an output of the first graph attention network; The output of the first-graph attention network is processed using a long short-term memory network model to obtain a predicted value of PM2.5 concentration.
2. The PM2.5 concentration prediction method based on wind speed and wind direction diagram according to claim 1 is characterized in that: The meteorological data and geographic location information of each region are input into the constructed second graph attention network to obtain the wind speed and direction forecast values, including: Taking each region as a node, for each node, calculate the relative distance between each node and other nodes, and take other nodes whose relative distance is less than the preset distance as the neighboring nodes of this node, calculate the Pearson correlation coefficient between each neighboring node and this node; connect the neighboring nodes whose Pearson correlation coefficient is greater than the preset coefficient with this node to form edges, and construct the second graph attention network; Calculating the wind speed and direction attention coefficients between two connected nodes in the second graph attention network; and normalizing the wind speed and direction attention coefficients by a softmax function to obtain the attention weights of the second graph attention network; Acquire a feature vector based on the meteorological data of each region, input the feature vector into the second graph attention network, and obtain a feature vector output; According to the feature vector output, a multi-head attention mechanism is used to obtain the wind speed and direction prediction value.
3. The PM2.5 concentration prediction method based on wind speed and wind direction diagram according to claim 2 is characterized in that: Calculate the relative distance between each node and other nodes, and take other nodes whose relative distance is less than the preset distance as the neighboring nodes of this node, and calculate the Pearson correlation coefficient between each neighboring node and this node, including: The relative distance between each node and other nodes is calculated using the following formula: Formula (1) in, Indicates the relative distance between node i and other nodes j. , is the spatial coordinate information corresponding to the longitude and latitude of node i, , is the spatial coordinate information corresponding to the longitude and latitude of other nodes j; The Pearson correlation coefficient between each adjacent node and the current node is calculated using the following formula: Formula (2) in, is the Pearson correlation coefficient, is the PM2.5 concentration covariance between node i and other nodes j, is the PM2.5 concentration of node i in the past N time periods, is the PM2.5 concentration variance of node i in the past N time periods, is the PM2.5 concentration variance of other nodes j in the past N time periods.
4. The PM2.5 concentration prediction method based on wind speed and wind direction diagram according to claim 2 is characterized in that: Calculate the wind speed and direction attention coefficient between two connected nodes in the second graph attention network; The wind speed and direction attention coefficients are normalized by a softmax function to obtain the attention weights of the second graph attention network, including: The wind speed and direction attention coefficient between two connected nodes in the second graph attention network is calculated using the following formula: Formula (3) in, Indicates the wind speed and direction attention coefficient, is a nonlinear activation function, is the transpose of a learnable parameter vector, and is the feature vector of node i and other nodes j in the input layer, is a learnable weight matrix that shares a linear transformation, Represents a vector concatenation operation, Indicates the relative distance between this node i and other nodes j; The wind speed and direction attention coefficient is normalized by the softmax function using the following calculation formula to obtain the attention weight of the second graph attention network: Formula (4) in, is the attention weight, Indicates the wind speed and direction attention coefficient, is a nonlinear activation function, is the transpose of a learnable parameter vector, and is the feature vector of node i and other nodes j in the input layer, is a learnable weight matrix that shares a linear transformation, Represents a vector concatenation operation, Indicates the relative distance between this node i and other nodes j; It is the set of other nodes linked to this node i.
5. The PM2.5 concentration prediction method based on wind speed and wind direction diagram according to claim 2 is characterized in that: According to the feature vector output, the wind speed and direction prediction values are obtained by using the multi-head attention mechanism, including: The calculation formula of the feature vector output is: Formula (5) in, is the feature vector output, is a nonlinear activation function, is the attention weight, is the feature vector of other nodes j in the input layer, is a learnable weight matrix that shares a linear transformation, is the set of other nodes linked to this node i; Using the multi-head attention mechanism, the wind speed and direction forecast value is obtained through the following calculation formula: Formula (6) in, is the wind speed and wind direction prediction value, which is a vector containing the wind speed WS and wind direction information WD of node i at the next moment; is a nonlinear activation function, T 2 is the number of attention heads, is the set of other nodes linked to this node i, is the attention weight of the k-th attention head, is the feature vector of other nodes j in the input layer, is a learnable weight matrix that shares a linear transformation.
6. The PM2.5 concentration prediction method based on wind speed and wind direction diagram according to claim 1, characterized in that: Obtaining the edge weight of the first graph attention network using the wind speed and wind direction prediction value includes: Using the wind speed and wind direction prediction values, constructing a PM2.5 diffusion influence coefficient based on the wind speed and wind direction relationship between nodes in the first graph attention network; Based on the PM2.5 diffusion influence coefficient, the attention coefficient between two nodes connected to the first graph attention network is updated; and the attention coefficient is standardized by a softmax function to obtain the attention weight of the first graph attention network.
7. The PM2.5 concentration prediction method based on wind speed and wind direction diagram according to claim 6 is characterized in that: Using the wind speed and wind direction prediction values, constructing the PM2.5 diffusion influence coefficient based on the wind speed and wind direction relationship between nodes in the first graph attention network, including: Using the wind speed and wind direction prediction values, the PM2.5 diffusion influence coefficient based on the wind speed and wind direction relationship between nodes in the first graph attention network is constructed by the following calculation formula: Formula (7) in, is the PM2.5 diffusion influence coefficient, is the wind speed of other nodes j, Indicates the relative distance between this node i and other nodes j; is the difference between the coordinate angle of node i and the wind direction angle on the coordinate axis centered on node j; in, in, , is the spatial coordinate information corresponding to the longitude and latitude of node i, , is the spatial coordinate information corresponding to the longitude and latitude of other nodes j, is the wind direction angle value of other nodes j; The updating of the attention coefficient between two nodes connected to the first graph attention network based on the PM2.5 diffusion influence coefficient; and the standardization of the attention coefficient by a softmax function to obtain the attention weight of the first graph attention network include: Use the following calculation formula to update the attention coefficient between two nodes connected in the first graph attention network: Formula (8) in, is the attention coefficient, is a nonlinear activation function, c is the adjustment coefficient, 0<c<1, Indicates the relative distance between this node i and other nodes j; is the PM2.5 diffusion influence coefficient, is the transpose of a learnable parameter vector, and is the feature vector of node i and other nodes j in the input layer, is a learnable weight matrix that shares a linear transformation, Represents a vector concatenation operation; The attention coefficient is normalized by the softmax function using the following calculation formula to obtain the attention weight of the first graph attention network: Formula (9) in, is the attention weight, is a nonlinear activation function, c is the adjustment coefficient, 0< c <1, Indicates the relative distance between this node i and other nodes j; , is the PM2.5 diffusion influence coefficient, is the transpose of a learnable parameter vector, and is the feature vector of node i and other nodes j in the input layer, is a learnable weight matrix that shares a linear transformation, Represents a vector concatenation operation; is the set of other nodes linked to this node i, Represents the node i and other nodes k The relative distance Other nodes in the input layer k The feature vector of .
8. The PM2.5 concentration prediction method based on wind speed and wind direction diagram according to claim 1, characterized in that: Based on the feature input of the first graph attention network and the edge weight of the first graph attention network, using a multi-head attention mechanism, obtaining an output of the first graph attention network, including: The feature vector output calculation formula based on the feature input of the first graph attention network and the edge weight of the first graph attention network is: Formula (10) in, is the feature vector output, is a nonlinear activation function, is the set of other nodes linked to this node i, is the attention weight, is a learnable weight matrix that shares a linear transformation, is the feature vector of other nodes j in the input layer; According to the feature vector output, the output of the first graph attention network is: Formula (11) in, is the output of the first attention network, is a nonlinear activation function, is the number of attention heads, is the set of other nodes linked to this node i, For the k The attention weight of the head attention, is a learnable weight matrix that shares a linear transformation, is the feature vector of other nodes j in the input layer.
9. The PM2.5 concentration prediction method based on wind speed and wind direction diagram according to claim 1, characterized in that: The output of the attention network of the first graph is processed using the long short-term memory network model to obtain the PM2.5 concentration prediction value, including: Using the long short-term memory network model, the output of the attention network of the first graph is subjected to forget gate calculation, input gate calculation, and output gate calculation to obtain a predicted value of PM2.5 concentration; The forget gate is used to determine the amount of information discarded from the memory unit, and the calculation formula is as follows: Formula (12) in, is the output of the forget gate; It is a sigmoid function, which is used to output a value between 0 and 1, indicating the degree of information retention; is the weight matrix, used to adjust the importance of the input; is the output of the previous time step, is the input of the current time step; is a bias term used to adjust the output range of the sigmoid function; The input gate is used to determine the new information that will be added to the memory cell, and the calculation formula is as follows: Formula (13) Formula (14) Formula (15) in, and are the input gate and candidate memory cell states respectively; tanh is the activation function used to map the input to the range of -1 to 1; and is the weight matrix; and is the bias term; and are the memory cell states of the current time step and the previous time step respectively; The output gate is used to determine the amount of information output from the memory unit, and the calculation formula is as follows: Formula (16) Formula (17) in, is the output of the output gate; is the sigmoid function, is the output of the previous time step, is the input of the current time step, is the hidden state at the current time step; is the weight matrix; is the bias term, is the memory cell state at the current time step.
10. A PM2.5 concentration prediction system based on wind speed and wind direction diagram, characterized in that: include: A processor and a memory for storing a computer program that can be run on the processor; wherein, when the processor is used to run the computer program, the steps of the method according to any one of claims 1 to 9 are executed.
Citation Information
Patent Citations
Meteorological drought prediction method and device based on VMD-CNN-BiLSTM-ATT hybrid model
CN113705864A
Multi-fan wind speed space-time prediction method and system
CN116894384A
Cited By
Multi-step weather forecasting method and device based on dynamic graph data structure
CN120428356A