A Fog Approaching Forecasting Method and System Based on GraphSAGE-LSTM
By using GraphSAGE-LSTM inductive graph neural network model in the forecast of heavy fog, the graph structure of meteorological observation sites is constructed and spatial and temporal features are extracted, which solves the problem of difficulty in extracting spatial information between site data in the existing technology, and achieves higher forecast accuracy and real-timeness.
Patent Information
- Application Number
- CN202510051834.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-01-14
AI Technical Summary
The prior art is difficult to effectively extract spatial information between meteorological observation station data, resulting in limited accuracy of forecasting of heavy fog approaching.
Using the inductive graph neural network model based on GraphSAGE-LSTM, the graph structure of the meteorological observation site is constructed, and the spatial and temporal characteristics of each graph node in each batch are extracted, thereby obtaining the spatial distribution characteristics of surrounding meteorological elements, and achieving prediction of the approaching fog.
In terms of ensuring the accuracy and real-time performance of the prediction results, the accuracy of heavy fog forecasts is significantly improved, local information can be effectively extracted, and the impact of overall graph structure changes on the accuracy of the model is reduced.
Smart Images

Figure CN119471862B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of meteorological forecast data processing, and particularly relates to a fog approaching forecast method and system based on GraphSAGE-LSTM (Graph Sample and Aggregate-Long Short-Term Memory). Background Art
[0002] The approaching forecast of fog can provide sufficient disaster response time for traffic management departments and also remind drivers to take precautions in advance. Many scholars have used time series network methods to study fog forecast methods, but time series networks cannot well reflect the spatial variation characteristics of meteorological elements. The changes in meteorological elements at upstream and surrounding stations have an indicative effect on the approaching fog forecast. The station data belongs to a non-Euclidean structure in spatial distribution, and traditional convolutional neural networks cannot effectively extract the spatial information between station data.
[0003] The traditional technology has the following technical difficulties:
[0004] (1) Construction of the network model. Different from graph structures such as traffic flow prediction and recommendation systems, due to the uncertainty of automatic weather station data, such as data anomalies, station failures, addition or cancellation of stations, the structure of the graph is neither static nor real-time dynamic, and appropriate graph neural network structures and parameters need to be selected.
[0005] (2) Real-time requirement: The approaching forecast has relatively high requirements for the running speed of the model. It is necessary to consider how to generate prediction results within a limited time while ensuring the accuracy of the prediction.
[0006] The existing patent application document with publication number CN111784022A, "A Short-Term Proximity Fog Prediction Method Combining Wrapper Method and SVM (Support Vector Machine)", includes the following steps: First step: Obtain the actual meteorological element attribute data at the current moment in the real-time system related to fog prediction; Second step: Preprocess the actual meteorological element attribute data; Third step: Combine the Wrapper method and the SVM method to perform main feature attribute analysis on the preprocessed data in the second step to obtain the main feature attribute data that can affect fog prediction within different warning times; Fourth step: Input the main feature attribute data in the third step into the SVM models at different warning times to obtain whether fog appears at different short-term proximity moments for this data. However, the model mentioned in the foregoing existing technology does not consider the change characteristics of meteorological elements at surrounding stations and only uses the time characteristics of meteorological elements to predict future visibility changes. The spatial changes of meteorological elements are not fully considered.
[0007] The existing invention patent application document with publication number CN118483770A, "A wind speed prediction method for multiple wind farms with multiple features based on graph embedding and GIN-GRU (Graph Isomorphism Network-Gated Recurrent Unit)," adopts a deep learning method based on GraphSAGE for graph embedding. However, the existing technology combines the two models of GraphSAGE (Graph Sample and Aggregate) and GIN (Graph Isomorphism Network), which significantly increases the complexity of the model. At the same time, changes in the number of meteorological stations will cause changes in the graph structure. At the same time, the GIN model focuses on the overall spatial characteristics of the entire graph and cannot be applied to dynamic graph training.
[0008] In summary, the existing technology has the technical problem of being difficult to effectively extract spatial information between site data. Summary of the invention
[0009] The technical problem to be solved by the present invention is: how to solve the technical problem that it is difficult to effectively extract spatial information between site data in the prior art.
[0010] The present invention adopts the following technical solution to solve the above technical problem: A fog nowcasting method based on GraphSAGE-LSTM includes:
[0011] S1. Collecting original meteorological data, detecting and removing abnormal data in the original meteorological data according to preset time intervals and threshold data, and obtaining applicable meteorological data;
[0012] S2, selecting no less than 2 pieces of applicable fog occurrence process information, collecting spatiotemporal information, and processing the spatiotemporal information, applicable meteorological data, and applicable fog occurrence process information to obtain time series data, and constructing a data set accordingly;
[0013] S3, taking the meteorological observation sites as graph nodes, using preset logic and distance thresholds between nodes, constructing an adjacency matrix to obtain the graph structure of the observation sites;
[0014] S4. Construct and use an inductive graph neural network model to extract the spatial features of each graph node in each batch from the observation site graph structure, and use the time series neural network to extract the time features of the graph nodes in each batch. According to the spatial and time features, new node labels are obtained from the local neighbor information. The spatial distribution characteristics of the surrounding meteorological elements are processed using the time series data and the new node labels, and the fog nowcast results are obtained based on them.
[0015] The present invention constructs a graph structure of meteorological observation stations based on the k-nearest neighbor method to describe the spatial characteristics and dependence relationships between meteorological observation stations. On this basis, an inductive graph neural network model that combines a graph neural network model and a long short-term memory neural network is used for visibility nowcasting. Since the structure of the graph and the number of stations are neither static nor change every moment, the present invention selects an inductive graph neural network model to eliminate abnormal data in the original meteorological data, which can generate prediction results within a limited time and ensure the accuracy of the prediction operation at the same time.
[0016] In a more specific technical solution, in S2, according to the preset data set selection rule, applicable fog occurrence process information is selected from the single-station fog data.
[0017] According to the applicable fog occurrence process information and spatio-temporal information, a basic data set is formed.
[0018] The basic data set is divided according to the preset ratio to obtain a training set, a test set, and a validation set.
[0019] In a more specific technical solution, in S3, the k-nearest neighbor algorithm KNN (K-Nearest Neighbor) is used to select no less than 2 meteorological observation stations according to the node distance threshold, and an adjacency matrix is constructed based on this.
[0020] In a more specific technical solution, in S4, the input data of the inductive graph neural network model is set, where the input data includes: node features, adjacency matrix;
[0021] Obtain the visibility in the input data, and perform V logarithmic processing on the visibility to obtain the visibility parameter :
[0022]
[0023] Perform Max-Min normalization processing on all elements in the input data;
[0024] In the adjacency matrix, an undirected unweighted matrix is used to define the neighbor relationship of graph nodes;
[0025] Set the encoder of the inductive graph neural network model and the GraphSAGE module. In the GraphSAGE module, according to the neighbor relationship, sample the neighbor node features to perform node representation update operations to obtain the spatial distribution characteristics of surrounding meteorological elements. Among them, the GraphSAGE module uses second-order neighbor sampling to capture the spatial relationship of the applicable range to obtain the spatial distribution characteristics of surrounding meteorological elements;
[0026] Aggregate the features of neighboring nodes through the mean aggregation operation. Among them, using an inductive graph neural network model, at each time step, use the LSTM gating mechanism to combine the given input features at the current time step t with the aggregated information of neighboring nodes to update the hidden state and cell state of the graph nodes; x t
[0027] Set the decoder of the inductive graph neural network model. Use the decoder to convert the hidden state h t into an output;
[0028] Set the loss function of the inductive graph neural network model using the following logic:
[0029]
[0030] where, F(y) is the predicted cumulative distribution function; is the true observed value, and obs represents the observation operation; y is the predicted value; 1 is the indicator function. When the predicted value y and the true observed value satisfy y≥y obs , the predicted value y is 1, otherwise the predicted value y is 0.
[0031] In the process of constructing the inductive graph neural network model of the present invention, a graph neural network model that can handle new nodes and sites is selected. The inductive graph neural network model adopted by the present invention can infer the labels of new nodes from local neighbor information without retraining the entire model.
[0032] In a more specific technical solution, set the input data X using the following logic:
[0033]
[0034] where, B is the batch size, N is the number of graph nodes, T is the number of time steps, F is the feature dimension of each time step, represents the batch size B , the set of graph nodes N , the number of time steps T , the feature dimension of each time step F corresponding number field.
[0035] In a more specific technical solution, for the given input featuresx Using the following logic, the input data is normalized by Max - Min to obtain the normalized features :
[0036]
[0037] Wherein, represents the largest given input feature, represents the smallest given input feature.
[0038] In a more specific technical solution, the neighbor relationship is defined using the following logic :
[0039] .
[0040] In a more specific technical solution, using the following logic, a node representation update operation is performed, and the update formula for each layer is:
[0041]
[0042] Wherein, is Relu the activation function; W k is the learnable weight matrix of the k th layer W ; N (i) represents the set of neighbor nodes of the i th node, represents the hidden state corresponding to the k th layer and the i th node h , represents the hidden state corresponding to the k-1 th layer and the i th node h , represents the hidden state corresponding to the k-1 th layer and the j th node h , MEAN represents the update operation.
[0043] The inductive graph neural network model adopted by the present invention combines the advantages of the GraphSAGE and LSTM models, and can not only capture the time - evolution features of nodes, but also aggregate neighbor information through GraphSAGE to capture the spatial features of the graph structure.
[0044] The present invention directly uses GraphSAGE for sampling and obtaining the local spatial features of the graph as the input to the LSTM model, pays more attention to the changes in local spatial features, and can reduce the impact of the overall graph structure change on the model accuracy. At the same time, for the approaching fog forecast, during the forecast process of local patchy fog, the present invention pays attention to the changes in meteorological elements of adjacent stations, can effectively extract local information, and improve the fog forecast accuracy.
[0045] The GraphSAGE model adopted by the present invention updates the representation of nodes by sampling the features of neighbor nodes. This module uses second-order neighbor sampling, that is, captures a larger range of spatial relationships through neighbors and neighbors of neighbors.
[0046] In a more specific technical solution, the forget gate is set using the following logic :
[0047]
[0048] The input gate is set using the following logic :
[0049]
[0050] The candidate cell state is set using the following logic :
[0051]
[0052] The cell state is updated using the following logic :
[0053]
[0054] The output gate is set using the following logic :
[0055]
[0056] The hidden state is updated using the following logic :
[0057]
[0058] Wherein; is the hidden state at the previous moment; W f is the weight matrix of the forget gate; W input is the weight matrix of the input gate; W C is the weight matrix of the cell state; W o is the weight matrix of the output gate;b f is the bias vector of the forget gate; b input is the bias vector of the input gate; b C is the bias vector of the cell state; b o is the bias vector of the output gate; σ is Relu the activation function.
[0059] In a more specific technical solution, a fog approaching prediction system based on GraphSAGE-LSTM includes:
[0060] A data acquisition and quality control module, which is used to acquire original meteorological data, detect and eliminate abnormal data in the original meteorological data according to preset time intervals and threshold data, and obtain applicable meteorological data;
[0061] A dataset construction module, which is used to select no less than 2 applicable fog occurrence process information, collect spatio-temporal information, process the spatio-temporal information, applicable meteorological data and applicable fog occurrence process information to obtain time series data, and construct a dataset based on this. The dataset construction module is connected to the data acquisition and quality control module;
[0062] An observation station graph structure construction module, which is used to use meteorological observation stations as graph nodes, construct an adjacency matrix by using preset logic and the distance threshold between nodes, and obtain the observation station graph structure. The observation station graph structure construction module is connected to the dataset construction module;
[0063] A surrounding meteorological element distribution feature acquisition module, which is used to construct and use an inductive graph neural network model to extract the spatial features of each graph node in each batch from the observation station graph structure, use a time series neural network to extract the time features of the graph nodes in each batch, process new node labels from local neighbor information according to the spatial features and time features, and use the time series data and new node labels to process the spatial distribution features of the surrounding meteorological elements, and obtain the fog approaching prediction result based on this. The surrounding meteorological element distribution feature acquisition module is connected to the observation station graph structure construction module.
[0064] The present invention has the following advantages compared with the prior art:
[0065] The present invention constructs a graph structure of meteorological observation stations based on the k-nearest neighbor method to describe the spatial characteristics and dependence relationships between meteorological observation stations. On this basis, an inductive graph neural network model that combines a graph neural network model and a long short-term memory neural network is used for visibility nowcasting. Since the structure of the graph and the number of stations are neither static nor change every moment, the present invention selects an inductive graph neural network model to eliminate abnormal data in the original meteorological data, and can generate prediction results within a limited time while ensuring the accuracy of the prediction operation.
[0066] In the process of constructing the inductive graph neural network model of the present invention, a graph neural network model that can handle new nodes and stations is selected. The inductive graph neural network model adopted by the present invention can infer the labels of new nodes from local neighbor information without retraining the entire model.
[0067] The inductive graph neural network model adopted by the present invention combines the advantages of the GraphSAGE and LSTM models, and can not only capture the time evolution characteristics of nodes, but also aggregate neighbor information through GraphSAGE to capture the spatial characteristics of the graph structure.
[0068] The present invention directly uses GraphSAGE for sampling and obtains the local spatial characteristics of the graph as the input of the LSTM model, which pays more attention to the changes in local spatial characteristics and can reduce the impact of the changes in the overall graph structure on the model accuracy. At the same time, for nowcasting of heavy fog, in the process of forecasting local patchy fog, the present invention pays attention to the changes in meteorological elements of adjacent stations, can effectively extract local information, and improve the accuracy of heavy fog forecasting.
[0069] The GraphSAGE model adopted by the present invention updates the representation of nodes by sampling the features of neighbor nodes. This module uses second-order neighbor sampling, that is, captures the spatial relationship in a larger range through neighbors and neighbors of neighbors.
[0070] The present invention solves the technical problem in the prior art that it is difficult to effectively extract the spatial information between station data. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a schematic diagram of the basic steps of a heavy fog nowcasting method based on GraphSAGE-LSTM according to Embodiment 1 of the present invention;
[0072] Figure 2 It is a schematic diagram of the change of training loss according to Embodiment 1 of the present invention;
[0073] Figure 3a It is a schematic diagram of the heavy fog case forecast of Station I9837 according to Embodiment 2 of the present invention;
[0074] Figure 3b This is a schematic diagram of a heavy fog forecast for the I9699 site according to Embodiment 2 of the present invention;
[0075] Figure 3c This is a schematic diagram of a heavy fog forecast for the I9893 site according to Embodiment 2 of the present invention;
[0076] Figure 3d This is a schematic diagram of the forecast of heavy fog for four stations I0026 in Example 2 of the present invention. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.
[0078] Example 1
[0079] like Figure 1 As shown, the present invention provides a GraphSAGE-LSTM-based fog nowcasting method, which includes the following basic steps:
[0080] S1. Collecting original meteorological data, detecting and removing abnormal data in the original meteorological data according to preset time intervals and threshold data, and obtaining applicable meteorological data;
[0081] In this embodiment, the original data is processed into, for example, 10-minute data, and the original data is resampled at 10-minute intervals. At the same time, the visibility, temperature, relative humidity, wind speed, rainfall and meteorological elements of surrounding stations are statistically analyzed to detect and eliminate abnormal data. Specific data quality control rules include but are not limited to:
[0082] The number of data is 10, and the wind direction, wind speed, precipitation, temperature, relative humidity, and visibility data cannot be missing;
[0083] When the median visibility is less than 500 meters, the relative humidity is not less than 80%, and the wind speed cannot be greater than, for example: 5.4m / s;
[0084] The median visibility cannot be 0, and the standard deviation cannot be 0.
[0085] S2, selecting no less than 2 pieces of applicable fog occurrence process information, collecting spatiotemporal information, and processing the spatiotemporal information, applicable meteorological data, and applicable fog occurrence process information to obtain time series data, and constructing a data set accordingly;
[0086] In this embodiment, according to the preset data set selection rules, applicable fog occurrence process information is selected from the single-station fog data.
[0087] Based on the applicable fog occurrence process information and spatio-temporal information, a basic data set is formed.
[0088] The basic data set is divided according to the preset ratio to obtain a training set, a test set, and a validation set.
[0089] In this embodiment, visibility level prediction is performed every 10 minutes within 0 - 2 hours, and time series data is extracted for model training. Using the data every 10 minutes in the past 2 hours to predict the visibility change in the next 2 hours, 24 consecutive time instances of data need to be extracted as a case. The data set selection rules include but are not limited to:
[0090] For 24 consecutive time instances, a total of 4 hours of time series data, all pass the quality control in the aforementioned step S1.
[0091] The visibility of any meteorological observation station is less than 500 meters for no less than 3 time instances.
[0092] The visibility of more than 10 meteorological observation stations is less than 500 meters for no less than 1 time instance.
[0093] The time interval between two adjacent cases is not less than 1 hour.
[0094] In this embodiment, 4626 fog processes are selected, a total of 186 single-station fog data, and the original observation data and spatio-temporal information of the meteorological observation stations are selected to form a basic data set. The training set, test set, and validation set are obtained according to the principle of, for example, 8:1:1. In this embodiment, the original observation data includes but is not limited to: air temperature, relative humidity, wind direction and speed, air pressure, precipitation, and visibility; the spatio-temporal information includes but is not limited to: altitude, longitude and latitude, and solar altitude angle.
[0095] S3. Using the meteorological observation stations as graph nodes, an adjacency matrix is constructed using the preset logic and the distance threshold between nodes to obtain the graph structure of the observation stations; specifically, using the k-nearest neighbor algorithm KNN, according to the distance threshold between nodes, no less than 2 meteorological observation stations are selected to construct the adjacency matrix.
[0096] In this embodiment, the node is each meteorological observation station, and the k-nearest neighbor algorithm is used to select the nearest 5 meteorological stations as neighbor nodes to construct the adjacency matrix, and at the same time, it is required that the distance between the neighbor nodes does not exceed 20 kilometers.
[0097] S4. Construct and utilize an inductive graph neural network model to extract the spatial features of each graph node in each batch from the observed site graph structure, use a temporal neural network to extract the temporal features of the graph nodes in each batch, process new node labels from the local neighbor information according to the spatial and temporal features, use the temporal data and the new node labels to process the spatial distribution features of the surrounding meteorological elements, and accordingly process to obtain the fog approaching forecast result;
[0098] In this embodiment, due to data quality, instrument failures, and network transmission, the number of meteorological observation sites in actual operations may be inconsistent with the number of samples in model construction. Therefore, in the process of model construction, a graph neural network model that can handle new nodes is selected. The inductive graph neural network model can infer the labels of new nodes from local neighbor information without retraining the entire model. Using the temporal data of meteorological elements and further considering the spatial distribution features of the surrounding meteorological elements, use the inductive graph neural network model to extract the spatial features of the data of each meteorological site in each batch, and then use the temporal neural network to extract the temporal features of the meteorological sites in each batch. Achieve visibility forecasting every 10 minutes within 0 - 2 hours.
[0099] In this embodiment, the input data of the graph neural network model is set, including but not limited to: node features, adjacency matrix;
[0100] In this embodiment, the node features correspond to each node i at t 12 time steps F have
[0101]
[0102] where, B is the batch size; N is the number of nodes; T is the number of time steps, which can be taken as, for example: 12; F is the feature dimension of each time step, which can be taken as, for example: 10. The surrounding meteorological elements include air temperature, relative humidity, wind direction and speed, air pressure, precipitation, visibility, altitude, longitude, latitude, and solar altitude angle. Before inputting into the inductive graph neural network model, perform Max - Min normalization processing on all surrounding meteorological elements. For a given input feature x , the formula for Max - Min normalization is:
[0103]
[0104] In this embodiment, due to visibility VThe maximum can be set to, for example, 30 km, and the minimum can be set to, for example, 0 km. The data span is relatively large. For data with low visibility below 1 km, the visibility V is logarithmically processed to narrow the range of visibility V . On this basis, the aforementioned normalization process is carried out:
[0105]
[0106] In this embodiment, the adjacency matrix uses an undirected unweighted matrix to define the neighbor relationship of nodes:
[0107]
[0108] In this embodiment, an encoder of the inductive graph neural network model is set up. The GraphSAGE model is used to update the node representation by sampling the neighbor node features. The aforementioned GraphSAGE model uses second-order neighbor sampling, that is, captures the spatial relationship in a larger range through neighbors and the neighbors of neighbors. For each node, first sample the first-order neighbors, and then sample the neighbors of these neighbors to obtain the second-order neighbors N(N (i) ) . The mean aggregation operation is used to aggregate the features of neighbor nodes. For node i and its neighbor set N (i) , a node representation update operation is performed, and the update formula for each layer is:
[0109]
[0110] In this embodiment, the inductive graph neural network model combines the capabilities of the GraphSAGE model and the LSTM model, which can not only capture the time evolution characteristics of nodes, but also aggregate the features of neighbor nodes through GraphSAGE to capture the spatial characteristics of the graph structure. In each time step, the gating mechanism of the LSTM model combines the input features of the current time step and the aggregated information of neighbor nodes to update the hidden state and cell state of the node. Specifically:
[0111] Forget gate is set as follows:
[0112]
[0113] Input gate is set as follows:
[0114]
[0115] Candidate cell state is set as follows:
[0116]
[0117] Cell state The update method is as follows:
[0118]
[0119] Output gate The setting is as follows:
[0120]
[0121] Hidden state The update method is as follows:
[0122]
[0123] In this embodiment, the number of layers of the inductive graph neural network model using GraphSAGE-LSTM can be set to, for example: 2 layers, and the number of Cells can be set to, for example: 50.
[0124] In this embodiment, the decoder of the inductive graph neural network model is set. In this embodiment, the decoder includes:
[0125] Fully connected layer, used to convert the hidden state h t into output. The number of fully connected layers can be set to, for example: 1 layer, and the number of convolution kernels can be set to, for example: 100.
[0126] In this embodiment, the loss function of the inductive graph neural network model is set. For example, CRPS (Continuous Ranked Probability Score) can be used as the loss function of the aforementioned inductive graph neural network model, and the loss function is used to measure the distance between the probability distribution prediction and the true value. The smaller the CRPS, the closer the predicted distribution is to the true value. For details, see the following formula:
[0127]
[0128] In this embodiment, the output data of the inductive graph neural network model is set; in this embodiment, the output is, for example: 12 time steps, the visibility forecast of meteorological stations for the next 2 hours every 10 minutes.
[0129] As Figure 2 shown, in this embodiment, the inductive graph neural network model is trained and tested; using the above inductive graph neural network model, the dataset is trained, and the loss curve is shown in Figure 2 , and it is trained for 100 rounds, and the loss on the validation set tends to be stable.
[0130] Example 2
[0131] In this embodiment, after the model training is completed, the fog forecasting results are compared and analyzed on the test set using a random forest model, an SVM model, a CNN model, and an LSTM model respectively. The visibility is divided into 5 categories according to [0m, 50m], [50m, 100m], [100m, 200m], [200m, 500m], and greater than 500m. Using three indicators, namely F1-Score, precision, and TS score, the random forest model, the SVM (Support Vector Machine) model, the CNN (Convolutional Neural Networks) model, and the LSTM (Long Short-Term Memory) model are evaluated. It is found that the GraphSAGE-LSTM inductive graph neural network model adopted in the present invention is higher than the random forest model, the SVM model, the CNN model, and the LSTM model in all 3 indicators.
[0132]
[0133] Table 1 Scores of Random Forest, SVM, CNN, LSTM and the Present Method on the Test Set
[0134] As Figure 3a 、 Figure 3b 、 Figure 3c 、 Figure 3d shown, in this embodiment, a case study is carried out. The GraphSAGE-LSTM inductive graph neural network model has strong prediction capabilities for the visibility oscillation during the fog process, the rapid decrease in visibility at the initial stage of fog formation, the stable maintenance of visibility during the fog process, and the rapid increase in visibility when the fog dissipates. There are certain differences between the visibility forecasts at individual times and the actual data, but the overall change trend is basically the same as the actual situation, and the difference value is small, and it can well predict the change of visibility in the next 2 hours.
[0135] In summary, the present invention constructs a graph structure of meteorological observation stations based on the k-nearest neighbor method to describe the spatial characteristics and dependence relationships between meteorological observation stations. On this basis, an inductive graph neural network model combining a graph neural network model and a long short-term memory neural network is used for visibility nowcasting. Since the structure of the graph and the number of stations are neither static nor changing every moment, the present invention selects an inductive graph neural network model to eliminate abnormal data in the original meteorological data, and can generate prediction results within a limited time while ensuring the accuracy of the prediction operation.
[0136] In the process of constructing the inductive graph neural network model of the present invention, a graph neural network model capable of processing new nodes and sites is selected. The inductive graph neural network model adopted by the present invention can infer the labels of new nodes from local neighbor information without retraining the entire model.
[0137] The inductive graph neural network model adopted by the present invention combines the advantages of the GraphSAGE and LSTM models. It can not only capture the temporal evolution characteristics of nodes but also aggregate neighbor information through GraphSAGE to capture the spatial characteristics of the graph structure.
[0138] The present invention directly uses GraphSAGE for sampling and obtains the local spatial features of the graph as the input to the LSTM model. It pays more attention to the changes in local spatial features, which can reduce the impact of the overall graph structure change on the model accuracy. At the same time, in the process of fog approaching forecast, the present invention pays attention to the changes in meteorological elements of adjacent sites during the forecast of local patchy fog, can effectively extract local information, and improve the fog forecast accuracy.
[0139] The GraphSAGE model adopted by the present invention updates the node representation by sampling the features of neighbor nodes. This module uses second-order neighbor sampling, that is, it captures a larger range of spatial relationships through neighbors and neighbors' neighbors.
[0140] The present invention solves the technical problem in the prior art that it is difficult to effectively extract the spatial information between site data.
[0141] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments or perform equivalent replacements for some of the technical features. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A fog nowcasting method based on GraphSAGE-LSTM, characterized in that: include: S1. Collect original meteorological data, detect and remove abnormal data in the original meteorological data according to preset time intervals and threshold data, and obtain applicable meteorological data; S2, selecting no less than 2 pieces of applicable fog occurrence process information, collecting spatiotemporal information, and processing the spatiotemporal information, applicable meteorological data, and applicable fog occurrence process information to obtain time series data and construct a data set; S3, taking the meteorological observation sites as graph nodes, using preset logic and distance thresholds between nodes, constructing an adjacency matrix to obtain the graph structure of the observation sites; S4. Construct and use an inductive graph neural network model to extract the spatial features of each graph node in each batch from the observation site graph structure, and use a time series neural network to extract the time features of the graph nodes in each batch. According to the spatial features and time features, new node labels are processed from local neighbor information. The spatial distribution features of the surrounding meteorological elements are processed using time series data and new node labels to obtain the fog nowcast results. Among them, the inductive graph neural network model is used to combine the current time step with the LSTM gating mechanism in each time step. t Given input features x t , and the aggregation information of neighbor nodes, update the hidden state and cell state of the graph node; Setting the forget gate : Setting the Input Gate : Set candidate cell status : Update cell status : Setting the output gate : Update hidden state : In the formula, is the hidden state at the previous moment; W f is the weight matrix of the forget gate; W input is the weight matrix of the input gate; W C is the weight matrix of the cell state; W o is the weight matrix of the output gate; b f is the bias vector of the forget gate; b input is the bias vector of the input gate; b C is the bias vector of the cell state; b o is the bias vector of the output gate; σ is Relu Activation function.
2. The method for heavy fog nowcasting based on GraphSAGE-LSTM according to claim 1 is characterized in that: In S2, according to the preset data set selection rule, the applicable heavy fog occurrence process information is selected from the heavy fog single station data; forming a basic data set according to the applicable fog occurrence process information and the spatiotemporal information; The basic data set is divided according to a preset ratio to obtain a training set, a test set, and a validation set.
3. The method for heavy fog nowcasting based on GraphSAGE-LSTM according to claim 1, characterized in that: In S3, the k-nearest neighbor algorithm KNN is used to select no less than two meteorological observation sites according to the node distance threshold, and the adjacency matrix is constructed accordingly.
4. The method for heavy fog nowcasting based on GraphSAGE-LSTM according to claim 1, characterized in that: In S4, input data of the inductive graph neural network model is set, wherein the input data includes: node features and the adjacency matrix; Obtain the visibility in the input data, and V Logarithmic processing is performed to obtain visibility parameters : Performing Max-Min normalization processing on all elements in the input data; In the adjacency matrix, using an undirected unweighted matrix, the neighbor relationship of the graph nodes is defined; An encoder and a GraphSAGE module of the inductive graph neural network model are set, and in the GraphSAGE module, neighbor node features are sampled according to the neighbor relationship to perform a node representation update operation to obtain the spatial distribution characteristics of the surrounding meteorological elements, wherein the GraphSAGE module uses two-order neighbor sampling to capture the applicable range spatial relationship to obtain the spatial distribution characteristics of the surrounding meteorological elements; Aggregating the neighbor node features through a mean aggregation operation; Set a decoder of the inductive graph neural network model, and use the decoder to convert the hidden state h t Convert to output; The loss function of the inductive graph neural network model is set using the following logic: in, F(y) is the predicted cumulative distribution function; is the real observation value, obs represents the observation operation; y is the predicted value; 1 is the indicator function, when the predicted value y The true observed value Satisfy y ≥ y obs When y is 1, otherwise the predicted value y is 0.
5. The method for heavy fog nowcasting based on GraphSAGE-LSTM according to claim 4 is characterized in that: The input data X is set using the following logic: In the formula, B is the batch size, N is the number of nodes in the graph, T is the number of time steps, F is the feature dimension at each said time step, Represents the batch size B , the graph node set N , the number of time steps T , the feature dimension of each time step F The corresponding number field.
6. The method for heavy fog nowcasting based on GraphSAGE-LSTM according to claim 4 is characterized in that: For the given input features x , using the following logic, the input data is normalized to Max-Min to obtain the normalized feature : In the formula, represents the maximum of the given input features, represents the minimum of the given input features.
7. The method for heavy fog nowcasting based on GraphSAGE-LSTM according to claim 4 is characterized in that: The neighbor relationship is defined using the following logic: : 。 8. The method for heavy fog nowcasting based on GraphSAGE-LSTM according to claim 4 is characterized in that: The node representation update operation is performed using the following logic, and the update formula for each layer is: in, yes Relu Activation function; W k It is k The learnable weight matrix of the layer W ; N (i) Indicates i The set of neighbor nodes of a node, Indicates the k Layer i The hidden state corresponding to the node h , Indicates k-1 Layer i The hidden state corresponding to the node h , Indicates k-1 Layer j The hidden state corresponding to the node h , MEAN Represents an update operation.
9. A heavy fog nowcasting system based on GraphSAGE-LSTM, used to execute the heavy fog nowcasting method based on GraphSAGE-LSTM as described in any one of claims 1 to 8, characterized in that: The system comprises: The data collection and quality control module is used to collect raw meteorological data, detect and remove abnormal data in the raw meteorological data according to preset time intervals and threshold data, and obtain applicable meteorological data; A data set construction module is used to select no less than 2 pieces of applicable fog occurrence process information, collect spatiotemporal information, and process the spatiotemporal information, the applicable meteorological data, and the applicable fog occurrence process information to obtain time series data, thereby constructing a data set. The data set construction module is connected to the data acquisition and quality control module. An observation station graph structure construction module is used to use meteorological observation stations as graph nodes, use preset logic and distance thresholds between nodes to construct an adjacency matrix, and obtain an observation station graph structure. The observation station graph structure construction module is connected to the data set construction module; The module for acquiring the distribution characteristics of surrounding meteorological elements is used to construct and use an inductive graph neural network model to extract the spatial characteristics of each graph node in each batch from the observation site graph structure, and use a time series neural network to extract the time characteristics of the graph nodes in each batch. According to the spatial characteristics and the time characteristics, new node labels are obtained from local neighbor information, and the spatial distribution characteristics of surrounding meteorological elements are obtained by using the time series data and the new node labels. The heavy fog nowcasting result is obtained based on the processing. The module for acquiring the distribution characteristics of surrounding meteorological elements is connected to the observation station graph structure construction module.
Citation Information
Patent Citations
Short-time adjacent fog prediction method based on combination of Wrapper method and SVM method
CN111784022A
Multi-wind-power-plant multi-feature wind speed prediction method based on graph embedding and GIN-GRU
CN118483770A
Airport fog forecasting and early warning method based on long-term and short-term memory algorithm
CN111175852A
Station group runoff prediction method based on depth time sequence diagram network
CN119203730A