Air temperature refined monitoring method based on dynamic neighbor selection and space-time modeling
By introducing dynamic neighbors and time and space modeling methods in temperature monitoring, combined with the LSTM network, the computing complexity and overfitting of traditional methods when processing space -time data are solved, and the accuracy and long -term dependence of temperature monitoring are improved. Capture ability.
Patent Information
- Application Number
- CN202411410480.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-28
AI Technical Summary
When processing huge spatiotemporal data, existing temperature monitoring methods have problems such as high computational complexity, easy overfitting, and poor interpretability. They use fixed K values when selecting neighbor nodes, resulting in uneven data distribution. performance degraded in the case of the , and long-term time-dependent capture is insufficient.
Put forward a refined monitoring method based on dynamic neighbors selection with time and space modeling. By constructing a dynamic neighbor selection module and space -time modeling module, generating the relationship matrix of heterogeneity of nodes, combined with LSTM for time -sequential modeling, dynamic choice Neighbor nodes with high similarity, enhance space characteristics extraction and capture long -term dependence.
It improves the accuracy and reliability of temperature monitoring, enhances the model's ability to capture the heterogeneity and long -term dependence of the model, and improve the predictive performance in data sparse and dense areas.
Smart Images

Figure CN119375982A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of temperature monitoring, and in particular to a refined temperature monitoring method based on dynamic neighbor selection and spatiotemporal modeling. Background Art
[0002] As global climate change and the impact of human activities on the environment become increasingly serious, refined temperature monitoring is of great significance in many fields such as meteorology, climate change research, agricultural production, urban planning and ecological protection. However, due to the limitations of actual scenarios, high deployment costs and maintenance costs, sensors usually cannot cover all observation ranges, which leads to the problems of uneven distribution of spatiotemporal data and insufficient spatial resolution.
[0003] In recent years, space-time kriging has been widely used to solve the problems of data sparsity and data availability. This method uses observed data at known locations to infer information at unobserved locations, thereby interpolating fine-grained, high-resolution space-time data. With the development of technology, researchers have proposed a variety of improved methods, such as K nearest neighbor (KNN), inverse distance weighting (IDW), and Gaussian process regression. However, these methods often perform poorly when dealing with nonlinear and complex space-time kriging data.
[0004] In order to overcome the limitations of traditional kriging interpolation methods, deep learning techniques, especially graph neural networks (GNNs), have been introduced into the spatial interpolation of complex spatiotemporal kriging data. These methods are committed to learning the dynamic graph structure between sensors and mining spatial dependencies from spatiotemporal data. For example, some inductive kriging methods are used to solve the spatiotemporal kriging problem on dynamic graph structures. These methods can perform kriging interpolation for new given locations without retraining. However, the above methods still have the following technical problems:
[0005] 1. Limited model generalization ability: When faced with massive spatiotemporal data, traditional neural network models may have problems such as high computational complexity, easy overfitting, and poor interpretability, which affect the reliability of prediction results.
[0006] 2. Limitations of neighbor node selection: Most methods use a fixed K value when selecting neighbor nodes. This static method may lead to performance degradation when dealing with highly uneven data distribution. In data sparse areas, nodes that are too far away may be selected, while in data dense areas, some highly correlated neighbor nodes may be ignored.
[0007] 3. Insufficient capture of long-term temporal dependencies: Existing methods focus more on capturing complex spatial dependencies, but are not effective enough in capturing complex long-term temporal dependencies. This may lead to reduced accuracy of the model when dealing with spatiotemporal data with complex temporal patterns, such as seasonal changes or long-term climate trends. Summary of the invention
[0008] In order to solve the above technical problems, the present invention proposes a refined temperature monitoring method based on dynamic neighbor selection and spatiotemporal modeling, comprising the following steps:
[0009] Step 1: Process the collected meteorological data set, construct an adjacency matrix using the processed valid meteorological station data, and encode the time;
[0010] Step 2: Build a dynamic neighbor selection module to generate a relationship matrix that considers node heterogeneity;
[0011] Step 3: Build a spatiotemporal modeling module, use the data processed in steps 1 to 2 to enhance and extract spatial features, and use LSTM to perform time series modeling in combination with temporal features;
[0012] Step 4: Input the training samples processed in steps 1 and 2 into the spatiotemporal model constructed in step 3 for training to obtain a trained model;
[0013] Step 5: Process the real-time meteorological data from step 1 to step 4 and input them into the trained model to obtain the temperature monitoring results.
[0014] According to a preferred embodiment of the present invention, step 1 specifically comprises:
[0015] Meteorological data from meteorological stations across the country were collected, including three location information and 20 meteorological factors of meteorological stations. Missing values, outliers, duplicate values, and data with inconsistent data formats were removed from the collected meteorological data to obtain valid meteorological observation station data. An adjacency matrix was constructed for the valid meteorological observation station data, and a graph was used to store information between meteorological observation stations, with nodes in the graph representing meteorological observation stations. At the same time, time was encoded to capture the periodic characteristics of time.
[0016] According to a preferred embodiment of the present invention, in step 1, missing values, abnormal values, duplicate values and data with inconsistent data formats in the collected meteorological data are cleared to obtain valid meteorological observation site data, an adjacency matrix is constructed for the valid meteorological observation site data, and a graph is used to store information between meteorological observation sites, where nodes in the graph are meteorological observation sites, and time is encoded to capture the periodic characteristics of time. The specific steps are as follows:
[0017] Data cleaning operation: replace the current missing value with the average of several upper and lower values, and delete abnormal values, duplicate values and data with inconsistent data formats;
[0018] Construct an adjacency matrix: Use the cleaned meteorological station data to construct an adjacency matrix; use the observation stations as nodes on the graph, use the Haversine distance formula to calculate the distance between each two nodes, and calculate the weight between each two nodes based on the distance; represent the graph structure using an adjacency matrix.
[0019] According to a preferred embodiment of the present invention, step 2 specifically includes:
[0020] A dynamic neighbor selection module is constructed to select neighbor nodes with the highest similarity using dynamic neighbors and generate a relationship matrix that considers node heterogeneity.
[0021] According to a preferred embodiment of the present invention, the specific steps of using dynamic neighbor selection and generating a relationship matrix of node heterogeneity are as follows:
[0022] For each node, other nodes with similarity above a threshold are selected as its neighbors. The 50% median method is used to determine the threshold. First, the distance between each node in the dataset is calculated. Second, the frequency distribution of these distances in different distance segments is statistically analyzed. Finally, the 50% percentile (i.e., median) of the distance distribution is selected as the threshold. This approach ensures that approximately half of the node pairs are considered adjacent and the other half are considered distant, thus achieving a balance between local and global information.
[0023] A heterogeneous relationship matrix is constructed to distinguish the relationships between training nodes and non-training nodes.
[0024] The relationship matrix is row normalized to make the relationship strengths of different nodes comparable.
[0025] According to a preferred embodiment of the present invention, step 3 specifically includes:
[0026] A spatiotemporal modeling module was built to extract spatial feature relationships and combine them with temporal features using LSTM for time series modeling.
[0027] According to a preferred embodiment of the present invention, the specific steps of constructing the spatiotemporal modeling module are as follows:
[0028] Spatial feature relationship extraction: The dynamically selected neighbor node feature matrix X and the relationship matrix A with geographic information are combined g Multiply them together to get the feature matrix Y that integrates the geographical relationship. Perform nonlinear transformation and full connection layer processing on Y to enhance the features. Then, calculate the difference between the enhanced feature matrix Y and the original feature matrix X, and combine it with the relationship matrix Ag , and obtain the difference feature matrix Z. Finally, the enhanced feature matrix Z is fused with the original feature matrix X to form the final feature representation.
[0029] Spatial similarity and difference: For each unknown node l, dynamically select the known nodes with the highest spatial proximity to form a set N. And map the data of these nodes to D-dimensional space. Use an inductive method to generate the hidden state s of the unknown node l at time step t, which combines the influence of the nodes in N by weighted summation. In order to further capture the subtle differences in spatial features, the bias term δ is introduced to measure the degree of change in spatial features by calculating the difference between the unknown node and its neighboring nodes. Finally, the contribution of spatial similarity and difference is combined to adjust the hidden representation of the unknown node l at time step t. Generate a spatial feature representation that reflects both similarities and differences.
[0030] The obtained spatial and temporal features are combined and LSTM is used for sequence modeling to capture long-term dependencies.
[0031] According to a preferred embodiment of the present invention, in step 4, training the constructed DTSTK model includes:
[0032] The training samples processed in steps 1 and 2 are input into the spatiotemporal model constructed in step 3 for training; the data in the original data period [a,c] is divided into training data and test data, where the meteorological data in the time period [a,b] is input into the model as training data for training, and the meteorological data in the time period [b,c] is the test data. The output result is the meteorological data after interpolation in the time period [b,c]; the DTSTK model selects the neighbor nodes with the highest similarity through the dynamic neighbor selection module and the spatiotemporal modeling module and generates a heterogeneous relationship matrix, enhances and extracts the spatial features of the input data, and uses the LSTM network to combine the extracted spatial features and time encoding for time series modeling to obtain a trained model.
[0033] The present invention proposes a refined temperature monitoring method based on dynamic neighbor selection and spatiotemporal modeling, which combines the dynamic neighbor selection module with the spatiotemporal modeling module to construct a DTSTK model. The method uses a dynamic threshold to select neighbor nodes with the highest similarity, generates a relationship matrix that considers node heterogeneity, and combines the LSTM network for time series modeling, thereby achieving refined temperature monitoring. The advantages of the present invention over the prior art are:
[0034] 1. Use graph neural network models to explore the complex laws and patterns hidden behind temperature data, so as to effectively capture the changing characteristics of temperature in time and space dimensions, and provide a more accurate basis for refined temperature monitoring.
[0035] 2. A dynamic neighbor selection module was constructed. This module selects neighbor nodes through dynamic thresholds, which solves the limitation of using a fixed K value to select neighbor nodes and can better select neighbor nodes with high similarity. At the same time, the heterogeneous relationship of nodes is taken into account, so that the model can better adapt to the characteristics of different observation sites and improve the ability to handle spatial heterogeneity.
[0036] 3. A spatiotemporal modeling module was designed, which enhances and extracts spatial features, combines temporal features, and uses LSTM for time series modeling. This architecture can effectively process the spatiotemporal characteristics of temperature data, improve the model's ability to capture long-term temporal dependencies, and enhance the accuracy of temperature prediction.
[0037] 4. Compared with traditional methods, the DTSTK model proposed in this invention significantly improves the ability to capture the temporal dynamics and spatial heterogeneity of meteorological data. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a flow chart of the refined temperature monitoring method based on dynamic neighbor selection and spatiotemporal modeling of the present invention;
[0039] Figure 2 It is a data preprocessing flow chart of the temperature refinement monitoring method based on dynamic neighbor selection and spatiotemporal modeling of the present invention;
[0040] Figure 3 It is a network structure diagram of the DTSTK model of the temperature refinement monitoring method based on dynamic neighbor selection and spatiotemporal modeling of the present invention. DETAILED DESCRIPTION
[0041] The present invention is described below in conjunction with the accompanying drawings and specific embodiments. Figure 1 Flow chart of the present invention; Figure 2 is the data preprocessing flow chart; Figure 3 This is the network structure diagram of the DTSTK model.
[0042] This paper proposes a refined temperature monitoring method based on dynamic neighbor selection and spatiotemporal modeling. This method constructs a DTSTK model architecture, designs two modules: a dynamic neighbor selection module and a spatiotemporal modeling module, and improves the accuracy of the model interpolation results by selecting neighbor nodes with high similarity through thresholds and capturing long-term time dependencies through LSTM. Figure 1 As shown, the specific implementation of this method is as follows:
[0043] Step 1: Process the collected raw meteorological data set, as shown in the attached Figure 2 shown.
[0044] According to the preset time period, meteorological data within the period is collected. The data set consists of two parts. One part is feature data, which is the meteorological time series data of each meteorological observation station, mainly used to describe the weather conditions of the observation station at each moment. The attributes of this part include 20 meteorological factors such as air pressure, air temperature, maximum / minimum temperature, dew point temperature, relative humidity, water vapor pressure, precipitation, wind direction, wind speed, maximum wind direction, maximum wind speed, and surface temperature. The other part is attribute data (graph structure data), which is mainly used to describe the geographical location of each meteorological observation station. The attributes of this part include the number, longitude and latitude of the meteorological observation station.
[0045] 1. Data preprocessing: including data cleaning and screening, constructing adjacency matrix, and encoding time.
[0046] The tool operation is as follows:
[0047] 1.1 Data cleaning operation: replace the current missing value with the average of several upper and lower values; delete abnormal values, duplicate values and data with inconsistent data formats;
[0048] 1.2 Construct an adjacency matrix: Use the cleaned weather station data to construct an adjacency matrix; use the observation stations as nodes on the graph, use the Haversine distance formula to calculate the distance between each two nodes, and calculate the weight between each two nodes based on the distance; use the adjacency matrix to represent the graph structure; for a weather station with known longitude and latitude, the formula for calculating the distance between two nodes is as follows:
[0049]
[0050] Among them, d xy represents the actual distance from node x to node y; R represents the radius of the earth; Lat x ,Long x Respectively represent the latitude and longitude of node x; b = Long x –Long y ,a=Lat x -Lat y Respectively represent the difference between the longitude and latitude of two nodes; W represents the weighted adjacency matrix, and the calculation formula of W is as follows:
[0051]
[0052] Among them, W xy Indicates the use of distance d xy The calculated edge weight; σ 2 is the standard deviation of the distance between the locations of two meteorological stations.
[0053] 1.3 Time encoding: Encode time information and convert time into features that can be used by the model. Extract the time index from the data frame, convert each time point into seconds in a day, and then map the seconds to the corresponding time period according to the predefined number of time periods T. The time encoding calculation formula is:
[0054]
[0055] Among them, TE represents the time code, T represents the number of time periods divided into a day, h represents hours, min represents minutes, and seconds represents seconds. Indicates a floor operation. Convert the calculated time code to an integer type and reshape it into a one-dimensional array to match the time dimension of the data.
[0056] Step 2: Through the dynamic neighbor selection module, select neighbor nodes with high similarity and generate a relationship matrix that takes into account node heterogeneity.
[0057] 2.1 Dynamic neighbor selection: For each node, select other nodes with similarity higher than the threshold as its neighbors. Align the matrix according to the average number of neighbor nodes to ensure the consistency of the output matrix.
[0058] 2.2 Heterogeneous relationship matrix construction: distinguishing the relationship between training nodes and non-training nodes.
[0059] All relationships of training nodes are retained, and for non-training nodes, only the relationship with training nodes is retained.
[0060] 2.3 Relationship Matrix Normalization: Perform row normalization on the relationship matrix to eliminate the impact of node degree differences and make the relationship strengths of different nodes comparable. This allows the generated final relationship matrix to reflect network heterogeneity and local structural characteristics while retaining relationship strength information.
[0061] Step 3: Build a spatiotemporal modeling module, use the data processed in steps 1 to 2 to enhance and extract spatial features, and use LSTM to perform time series modeling in combination with temporal features. The specific steps are as follows:
[0062] 3.1 Spatial feature relationship extraction: The dynamically selected neighbor node feature matrix X and the relationship matrix A with geographic information g Multiply them together to get the feature matrix Y that integrates the geographical relationship. Perform nonlinear transformation and full connection layer processing on Y to enhance the features. Calculate the difference between the transformed feature matrix Y and the original feature matrix X, and combine it with the relationship matrix A g Get the difference feature Z = |YX|*A g The enhanced feature matrix Z and the original feature matrix X are fused to obtain the final feature representation.
[0063] 3.2 Spatial similarity and difference processing: For each unknown node l, dynamically select the known node with the highest spatial proximity to form a set N l . l The data of the nodes in the middle are projected into the D-dimensional space, denoted as H. Generate an inductive hidden representation for the unknown node l:
[0064]
[0065] Among them, α i,l;t represents the spatial influence weight of node i on l; h i,t The hidden representation of the known node i at time step t; W s and b s is a learnable parameter; σ(·) is a nonlinear activation function. l,t represents the hidden state of the unknown node l at time step t, which integrates the information of neighboring nodes.
[0066] In order to further capture the subtle differences in spatial features, the unknown node l and its neighboring known nodes i∈N are calculated. l The deviation between them can be expressed as:
[0067]
[0068] Where W δ and b δ is a learnable parameter. A larger δ l,t It indicates that the differences in spatial characteristics are large.
[0069] Taking into account spatial similarities and differences, the hidden representation of the unknown node l at time step t is adjusted:
[0070]
[0071] in is a learnable parameter matrix. This adjusted representation It not only includes the similarity information with neighboring nodes, but also takes the differences into consideration, thus generating a more comprehensive and accurate spatial feature representation.
[0072] 3.3 Combine the obtained spatial features and temporal features and use LSTM for sequence modeling to capture long-term dependencies.
[0073] Step 4: Train the constructed DTSTK model. The network structure diagram of the model is shown in the attached figure. Figure 3As shown. The training samples processed in steps 1 and 2 are input into the spatiotemporal model constructed in step 3 for training; the data of the original data [a,c] time period is divided into training data and test data, where the meteorological data of the [a,b] time period is input into the model as training data for training, and the meteorological data of the [b,c] time period is the test data, and the output result is the meteorological data of the [b,c] time period after interpolation; the DTSTK model selects the neighbor nodes with the highest similarity through the dynamic neighbor selection module and the spatiotemporal modeling module and generates a heterogeneous relationship matrix, enhances and extracts the spatial features of the input data, and uses the LSTM network to combine the extracted spatial features and time encoding for time series modeling to obtain a trained model.
[0074] Step 5: After the real-time meteorological data is processed in steps 1 and 2, it is input into the DTSTK model trained in step 4 to obtain the temperature monitoring results.
Claims
1. A refined temperature monitoring method based on dynamic neighbor selection and spatiotemporal modeling, characterized in that: The following steps are involved: Step 1: Process the collected meteorological data set, construct an adjacency matrix using the processed valid meteorological station data, and encode the time; Step 2: Build a dynamic neighbor selection module to generate a relationship matrix that considers node heterogeneity; Step 3: Build a spatiotemporal modeling module, use the data processed in steps 1 to 2 to enhance and extract spatial features, and use LSTM to perform time series modeling in combination with temporal features; Step 4: Input the training samples processed in steps 1 and 2 into the spatiotemporal model constructed in step 3 for training to obtain a trained model; Step 5: After the real-time meteorological data is processed in steps 1 and 2, it is input into the DTSTK model trained in step 4 to obtain the temperature monitoring results.
2. The method for fine-grained temperature monitoring based on dynamic neighbor selection and spatiotemporal modeling according to claim 1 is characterized in that: The step 1 specifically includes: Meteorological data from meteorological stations across the country were collected, including three location information and 20 meteorological factors of meteorological stations. Missing values, outliers, duplicate values, and data with inconsistent data formats were removed from the collected meteorological data to obtain valid meteorological observation station data. An adjacency matrix was constructed for the valid meteorological observation station data, and a graph was used to store information between meteorological observation stations, with nodes in the graph representing meteorological observation stations. At the same time, time was encoded to capture the periodic characteristics of time.
3. The method for fine-grained temperature monitoring based on dynamic neighbor selection and spatiotemporal modeling according to claim 1 is characterized in that: The specific steps of constructing the LSTM model for temperature prediction in step 2 are as follows: Dynamic neighbor selection: For each node, select other nodes with similarity above a threshold as its neighbors. Heterogeneous relationship matrix construction: distinguishing the relationships between training nodes and non-training nodes. Normalization of relationship matrix: Normalize the rows of the relationship matrix to eliminate the impact of node degree differences and make the relationship strengths of different nodes comparable.
4. The method for fine-grained temperature monitoring based on dynamic neighbor selection and spatiotemporal modeling according to claim 1 is characterized in that: The specific steps of constructing the spatiotemporal modeling module in step 3 are as follows: Spatial feature relationship extraction: The dynamically selected neighbor node feature matrix X and the relationship matrix A with geographic information are combined g Multiply them together to get the feature matrix Y that integrates the geographical relationship. Perform nonlinear transformation and full connection layer processing on Y to enhance the features. Then, calculate the difference between the enhanced feature matrix Y and the original feature matrix X, and combine it with the relationship matrix A g , and obtain the difference feature matrix Z. Finally, the enhanced feature matrix Z is fused with the original feature matrix X to form the final feature representation. Spatial similarity and difference: For each unknown node l, dynamically select the known nodes with the highest spatial proximity to form a set N. And map the data of these nodes to D-dimensional space. Use an inductive method to generate the hidden state s of the unknown node l at time step t, which combines the influence of the nodes in N by weighted summation. In order to further capture the subtle differences in spatial features, the bias term δ is introduced to measure the degree of change in spatial features by calculating the difference between the unknown node and its neighboring nodes. Finally, the contribution of spatial similarity and difference is combined to adjust the hidden representation of the unknown node l at time step t. Generate a spatial feature representation that reflects both similarities and differences. The obtained spatial and temporal features are combined and LSTM is used for sequence modeling to capture long-term dependencies. The method for fine-grained temperature monitoring based on dynamic neighbor selection and spatiotemporal modeling according to claim 1 is characterized in that: The specific implementation of step 4 is: The meteorological data preprocessed in step 1 and the relationship matrix considering node heterogeneity generated in step 2 are used as training samples and input into the spatiotemporal modeling module constructed in step 3 for model training. The model parameters are optimized through the back propagation algorithm to finally obtain a trained temperature refined monitoring model.
Citation Information
Cited By
Network security threat intelligent detection method based on big data analysis
CN120498872A