Spatial-temporal data prediction method and system based on neighborhood statistics and AutoML
By combining neighborhood statistics features with the AutoML framework, the noise and discontinuity problems caused by the reliance on absolute latitude and longitude in the AutoML model for spatiotemporal data prediction are solved, generating smoother prediction results that conform to physical laws. This method is applicable to spatiotemporal data prediction in meteorology, environment, agriculture, and geology.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-04-07
AI Technical Summary
Existing AutoML models suffer from strip noise and spatial discontinuities in spatiotemporal point data prediction due to over-reliance on absolute latitude and longitude features.
By introducing neighborhood statistics to describe the local spatial environment of the target grid points, combining the AutoML framework for preprocessing and feature fusion of the training dataset, and employing penalty adjustment and hyperparameter optimization, a suitable base prediction model is selected to generate a spatially continuous prediction model.
It significantly suppresses strip noise and spatial discontinuities, improves the spatial smoothness and physical rationality of prediction results, and is suitable for spatiotemporal data prediction tasks in meteorology, environment, agriculture, geology and other fields.
Smart Images

Figure CN121808378A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of spatiotemporal data prediction technology, and in particular to a spatiotemporal data prediction method and system based on neighborhood statistics and AutoML. Background Technology
[0002] Automated machine learning (AutoML) frameworks, such as Autogluon, demonstrate superior performance and ease of use in structured data prediction tasks due to their ability to automatically perform feature engineering, model selection, and hyperparameter optimization. In recent years, these frameworks have been increasingly applied to prediction tasks using spatiotemporal point data, such as gridded meteorological field prediction in weather forecasting, pollutant concentration distribution in environmental monitoring, yield estimation in agriculture, and physical property parameter inversion in geological exploration.
[0003] In these prediction tasks, the conventional approach is to treat each spatial grid point as an independent sample and use its latitude and longitude coordinates as one of the key input features, along with other attribute features of that point (such as temperature, humidity, vegetation index, historical observation values, etc.), and input them into the AutoML framework for model training and prediction.
[0004] However, this approach of directly using absolute latitude and longitude as features has significant technical drawbacks. Because models tend to learn and memorize latitude and longitude as strong features, and training data often exhibits uneven sampling or distribution bias in space, this can lead to overfitting near specific latitude and longitude lines. The direct manifestation of this is that the final gridded prediction product may contain unrealistic striped noise or data jumps that highly overlap with the latitude and longitude lines. This noise does not reflect the actual physical process but rather stems from the model ignoring spatial context and crudely memorizing the mapping between position and value. This not only severely disrupts the spatial continuity of the prediction results and reduces the visualization quality and usability of the product but may also mislead subsequent analysis and decision-making based on such products.
[0005] Therefore, how to effectively avoid the spatial discontinuity problem introduced by the AutoML framework while enjoying its convenience has become an urgent technical problem to be solved in the field of spatiotemporal data prediction. Summary of the Invention
[0006] (a) Technical problems to be solved
[0007] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a spatiotemporal data prediction method and system based on neighborhood statistics and AutoML, aiming to solve the technical problem that the prediction results of existing AutoML models in spatiotemporal point data prediction are striped noise and spatial discontinuity due to over-reliance on absolute latitude and longitude features.
[0008] (II) Technical Solution
[0009] To achieve the above objectives, the main technical solutions adopted by the present invention include:
[0010] In a first aspect, embodiments of the present invention provide a spatiotemporal data prediction method based on neighborhood statistics and AutoML. This method is deployed on a prediction platform performing weather forecasting, environmental monitoring, agricultural yield estimation, or geological exploration. The method includes:
[0011] The acquired multi-source heterogeneous spatiotemporal data is preprocessed to obtain the original training dataset;
[0012] The neighborhood spatiotemporal information of each grid point sample in the original training dataset is extracted using neighborhood statistics. The extracted neighborhood statistics features are then fused with the latitude and longitude features of the current grid point sample to obtain the training dataset.
[0013] Based on the task type and spatial distribution characteristics of the spatiotemporal data to be predicted, the weights of latitude and longitude features in the training dataset are penalized and adjusted to obtain the optimal training dataset.
[0014] Based on the optimal training dataset, and combined with the hyperparameters of the association space continuity automatically searched by the AutoML framework, the selected base prediction model is trained to obtain the prediction model for the spatiotemporal data prediction of the response target.
[0015] Optionally, the acquired multi-source heterogeneous spatiotemporal data is preprocessed to obtain the original training dataset, including:
[0016] Obtain multi-source heterogeneous spatiotemporal data within historical time periods associated with the prediction target from a pre-set database;
[0017] Spatial grid segmentation is performed on multi-source heterogeneous spatiotemporal data to obtain a multidimensional spatiotemporal dataset composed of several spatial grid point samples. Each spatial grid point sample contains attribute information reflecting its own state as well as latitude and longitude information.
[0018] The multidimensional spatiotemporal dataset is sequentially cleaned, formatted, imputed for missing values, and normalized for features to obtain the original training dataset for model training.
[0019] Optionally, neighborhood statistics are extracted from the spatiotemporal information of each grid point sample in the original training dataset, and the extracted neighborhood statistics features are fused with the latitude and longitude features of the current grid point sample to obtain a training dataset including:
[0020] For each grid point sample in the original training dataset, the neighborhood range of the grid point sample is determined in the spatial dimension according to the preset neighborhood definition rules.
[0021] From the original training dataset, the attribute information of all grid samples within the neighborhood of the target grid sample is extracted to form the spatiotemporal information of the neighborhood of the target grid sample.
[0022] The neighborhood spatiotemporal information is processed using a preset statistical function to extract multiple sets of neighborhood statistics that characterize the spatial distribution and change features of the neighborhood.
[0023] Multiple sets of neighborhood statistics are fused with the latitude and longitude information of the target grid point sample to generate an enhanced feature vector corresponding to the target grid point sample.
[0024] Traverse all grid point samples in the original training dataset as target grid point samples, and generate a training dataset consisting of the enhanced feature vectors corresponding to each grid point sample.
[0025] Optionally, a preset statistical function is used to process the spatiotemporal information of the neighborhood, and multiple sets of neighborhood statistics representing the spatial distribution and change characteristics of the neighborhood are extracted, including:
[0026] The arithmetic mean of the feature values corresponding to all grid samples within the neighborhood of the target grid sample is calculated to obtain the neighborhood mean, which represents the overall level of the target grid sample in the neighborhood.
[0027] The standard deviation of the corresponding feature values of all grid point samples within the neighborhood of the target grid point sample is measured to obtain the neighborhood standard deviation that characterizes the spatial variability of the target grid point sample within the neighborhood.
[0028] Sort the feature values of all grid points within the neighborhood of the target grid point sample, and determine the neighborhood median, neighborhood maximum and neighborhood minimum of the target grid point sample based on the sorting results.
[0029] The difference between the maximum and minimum values in the neighborhood is calculated to obtain the neighborhood range, which represents the local variation of the target grid point sample within the neighborhood.
[0030] Optionally, based on the task type and spatial distribution characteristics of the spatiotemporal data to be predicted, the weights of latitude and longitude features in the training dataset are penalized and adjusted to obtain the optimal training dataset, including:
[0031] Obtain the initial weights of neighborhood statistics features and latitude and longitude features in the training dataset;
[0032] Based on the task type of the spatiotemporal data to be predicted, determine the initial penalty coefficients used to apply penalty adjustment to the initial weights of latitude and longitude features;
[0033] Spatial autocorrelation analysis is performed on the historical spatiotemporal sequence of the spatiotemporal data to be predicted, and the initial penalty coefficient is corrected according to the obtained global Moran index to obtain the final penalty coefficient.
[0034] By using the final penalty coefficient, the weights of latitude and longitude features in the training dataset are adjusted by weight decay to obtain the optimal training dataset for model training.
[0035] Optionally, depending on the task type of the spatiotemporal data to be predicted, the initial penalty coefficients used to apply penalty adjustment to the initial weights of latitude and longitude features include:
[0036] When the task type of the spatiotemporal data to be predicted is weather forecast data, the initial penalty coefficient is the first penalty coefficient;
[0037] When the task type of the spatiotemporal data to be predicted is environmental monitoring data, the initial penalty coefficient is the second penalty coefficient;
[0038] When the task type of the spatiotemporal data to be predicted is agricultural yield estimation data, the initial penalty coefficient is the third penalty coefficient;
[0039] When the task type of the spatiotemporal data to be predicted is geological exploration data, the initial penalty coefficient is the fourth penalty coefficient;
[0040] The numerical relationship between the first penalty coefficient, the second penalty coefficient, the third penalty coefficient, and the fourth penalty coefficient is: first penalty coefficient < second penalty coefficient < third penalty coefficient < fourth penalty coefficient.
[0041] Optionally, based on the optimal training dataset and combined with the hyperparameters of the continuity of the association space automatically searched by the AutoML framework, the selected base prediction model is trained to obtain the prediction model for the spatiotemporal data prediction of the target response, including:
[0042] Based on the AutoML framework, and considering the task type and data scale of the spatiotemporal data to be predicted, at least two candidate models are selected from the preset set of basic prediction models.
[0043] Set optimization hyperparameters for the continuity of the association space based on the type of candidate model;
[0044] The candidate model is trained using the optimal training dataset and optimized hyperparameters, and the training effect of the candidate model is evaluated based on cross-validation performance.
[0045] A model stacking strategy is adopted to fuse multiple candidate models with the best training performance to generate a prediction model for the final response target spatiotemporal data prediction.
[0046] The optimized hyperparameters include: learning rate, number of iterations, extreme random tree mode, and preset parameters for model stacking.
[0047] Optionally, based on the AutoML framework, and considering the task type and data scale of the spatiotemporal data to be predicted, at least two candidate models are selected from a pre-defined set of basic prediction models, including:
[0048] Based on the AutoML framework, at least two candidate models are selected from the preset set of basic prediction models according to the task type and data scale of the spatiotemporal data to be predicted. The set of basic prediction models includes gradient boosting machine, CATBoost algorithm model, random forest model, support vector machine, deep neural network and K nearest neighbor algorithm model.
[0049] Using the built-in hyperparameter optimization module of the AutoML framework, we perform automatic hyperparameter search on the candidate models, obtain hyperparameter combinations for each candidate model, and perform preliminary training on each candidate model based on the hyperparameter combinations.
[0050] Based on the model type exclusion strategy, model types that have a negative impact on spatial continuity are excluded, resulting in at least two final candidate models.
[0051] Among them, the model type exclusion strategy includes removing K-nearest neighbor algorithm models from the candidate models to avoid the spatial prediction results being discontinuous due to the sensitivity of the K-nearest neighbor algorithm models to absolute distance.
[0052] Optionally, after training the selected base prediction model based on the optimal training dataset and combining the hyperparameters of the association space continuity automatically searched by the AutoML framework to obtain the prediction model for the target spatiotemporal data, the method further includes:
[0053] The prediction model is packaged into an executable file, and the packaged prediction model is deployed to the corresponding prediction platform;
[0054] During the operation of the prediction platform, the spatiotemporal data stream collected in real time is input into the prediction model, and the prediction model obtains continuous prediction results of the target spatiotemporal data.
[0055] The system provides dynamic visualization and real-time performance monitoring of continuous prediction results. When the value corresponding to spatial continuity drops to a preset minimum threshold, it triggers a retraining instruction for the prediction model.
[0056] Secondly, embodiments of the present invention provide a spatiotemporal data prediction system based on neighborhood statistics and AutoML, comprising:
[0057] The preprocessing module is used to preprocess the acquired multi-source heterogeneous spatiotemporal data to obtain the original training dataset;
[0058] The neighborhood feature enhancement module is used to extract neighborhood statistics from the spatiotemporal information of each grid sample in the original training dataset, and then fuse the extracted neighborhood statistics features with the latitude and longitude features of the current grid sample to obtain the training dataset.
[0059] The feature weight adjustment module is used to penalize and adjust the weights of latitude and longitude features in the training dataset based on the task type and spatial distribution characteristics of the spatiotemporal data to be predicted, so as to obtain the optimal training dataset.
[0060] The prediction model building and training module is used to train the selected basic prediction model based on the optimal training dataset and the hyperparameters of the continuity of the association space automatically searched by the AutoML framework, so as to obtain the prediction model for the spatiotemporal data prediction of the response target.
[0061] The prediction deployment and monitoring module is used to deploy the trained prediction model to the prediction platform, so as to predict the target spatiotemporal data through the corresponding encapsulation file of the prediction model, and to dynamically monitor and visualize the prediction results and model performance.
[0062] (III) Beneficial Effects
[0063] The beneficial effects of this invention are as follows: The spatiotemporal data prediction method based on neighborhood statistics and AutoML of this invention introduces neighborhood statistics features to describe the local spatial environment of the target grid points, effectively replacing or weakening the absolute latitude and longitude features that easily cause overfitting. Combined with model selection strategies and hyperparameter optimization methods targeting spatial continuity, it guides the AutoML model to learn spatial dependencies rather than absolute position mappings. Compared with existing technologies, this invention significantly suppresses striped noise and spatial discontinuities caused by overfitting of the prediction model to latitude and longitude features, making the prediction results smoother, more continuous in space, and more consistent with physical laws. At the same time, while fully retaining the advantages of automated modeling by AutoML, this invention fundamentally improves the spatial quality and practicality of gridded spatiotemporal prediction products, making it suitable for prediction tasks requiring spatial continuity in fields such as meteorology, environment, agriculture, and geology. Attached Figure Description
[0064] Figure 1 This is a flowchart illustrating a spatiotemporal data prediction method based on neighborhood statistics and AutoML, provided as an embodiment of the present invention.
[0065] Figure 2 A schematic diagram illustrating the prediction results using a prior art solution provided in an embodiment of the present invention;
[0066] Figure 3 This is a schematic diagram of the prediction result using the prediction method of the present invention, provided as an embodiment of the present invention. Detailed Implementation
[0067] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0068] refer to Figures 1 to 3 As shown in the figure, this invention proposes a spatiotemporal data prediction method based on neighborhood statistics and AutoML. This method is deployed on a prediction platform for performing weather forecasting, environmental monitoring, agricultural yield estimation, or geological exploration. The method includes: preprocessing the acquired multi-source heterogeneous spatiotemporal data to obtain an original training dataset; extracting neighborhood statistics from the spatiotemporal information of each grid sample in the original training dataset, and fusing the extracted neighborhood statistics features with the latitude and longitude features of the current grid sample to obtain a training dataset; adjusting the weights of the latitude and longitude features in the training dataset according to the task type and spatial distribution characteristics of the spatiotemporal data to be predicted, to obtain an optimal training dataset; and training the selected basic prediction model based on the optimal training dataset and the hyperparameters of associated spatial continuity automatically searched by the AutoML framework to obtain a prediction model for the target spatiotemporal data prediction.
[0069] This embodiment introduces neighborhood statistical features to describe the local spatial environment of the target grid points, effectively replacing or weakening the absolute latitude and longitude features that easily cause overfitting. Combined with model selection strategies and hyperparameter optimization methods targeting spatial continuity, it guides the AutoML model to learn spatial dependencies rather than absolute position mappings. Compared to existing technologies, this embodiment significantly suppresses striped noise and spatial discontinuities caused by overfitting of the prediction model to latitude and longitude features, making the prediction results smoother, more continuous in space, and more consistent with physical laws. At the same time, while fully retaining the advantages of AutoML automated modeling, this embodiment fundamentally improves the spatial quality and practicality of gridded spatiotemporal prediction products, making it suitable for prediction tasks requiring spatial continuity in fields such as meteorology, environment, agriculture, and geology.
[0070] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present invention can be understood more clearly and thoroughly, and that the scope of the present invention can be fully conveyed to those skilled in the art.
[0071] refer to Figure 1As shown, this embodiment provides a spatiotemporal data prediction method based on neighborhood statistics and AutoML. This method can be deployed and applied to automated prediction platforms for weather forecasting, environmental monitoring, agricultural yield estimation, or geological exploration. In practical applications, the prediction platform calls the corresponding software modules or system services to achieve automated acquisition, processing, modeling, and prediction of multi-source spatiotemporal data, and outputs the final gridded prediction product to the corresponding business system or visualization interface for user decision support and analysis. Specifically, this method includes the following steps S100 to S400:
[0072] S100. Preprocess the acquired multi-source heterogeneous spatiotemporal data to obtain the original training dataset.
[0073] In this embodiment, since spatiotemporal data typically originates from different sensors, observation systems, or simulation platforms, and is characterized by multiple sources, heterogeneity, and inconsistent spatiotemporal resolution, directly using it for model training can easily introduce noise and bias. Therefore, it needs to be systematically preprocessed to construct a high-quality, well-organized training sample set. Specifically, step S100 may include the following sub-steps S110 to S130:
[0074] S110. Obtain multi-source heterogeneous spatiotemporal data within a historical time period associated with the prediction target from a preset database.
[0075] Furthermore, the database may include meteorological observation databases, remote sensing image databases, environmental monitoring station databases, agricultural statistical databases, geological exploration databases, etc. Spatiotemporal data includes at least spatial location information, time labels, and a series of attribute variables related to the prediction target, such as temperature, humidity, wind speed, vegetation index, pollutant concentration, soil properties, yield indicators, etc.
[0076] S120. Spatial grid segmentation is performed on multi-source heterogeneous spatiotemporal data to obtain a multidimensional spatiotemporal dataset composed of several spatial grid point samples. Each spatial grid point sample contains attribute information reflecting its own state as well as latitude and longitude information.
[0077] Furthermore, in order to unify the spatial reference and facilitate the calculation of subsequent neighborhood statistics, this embodiment resamples or interpolates the continuous or irregularly distributed spatial data onto a regular spatial grid. Each grid cell is a grid point sample, which contains the latitude and longitude coordinates corresponding to the grid point and various attribute information observed or calculated at that location.
[0078] S130. Perform data cleaning, format standardization, missing value imputation, and feature normalization on the multidimensional spatiotemporal dataset in sequence to obtain the original training dataset for model training.
[0079] Furthermore, data cleaning includes removing obvious outliers and handling duplicate records; format standardization ensures that all data fields have uniform encoding and units; missing value imputation can be reasonably filled using spatiotemporal interpolation methods (such as Kriging interpolation, spatiotemporal nearest neighbor imputation, etc.); feature normalization transforms features of different dimensions to similar numerical ranges through methods such as max-min scaling or Z-score standardization, in order to improve the stability and convergence efficiency of model training.
[0080] S200. Extract neighborhood statistics from the spatiotemporal information of each grid point sample in the original training dataset, and fuse the extracted neighborhood statistics features with the latitude and longitude features of the current grid point sample to obtain the training dataset.
[0081] In this embodiment, by incorporating neighborhood statistical features to characterize the local spatial environment around each grid point, the model can more comprehensively reflect spatial dependencies, thereby reducing its over-reliance on absolute latitude and longitude features and improving the predictive model's ability to model spatial continuity. Specifically, step S200 may include the following sub-steps S210 to S250:
[0082] S210. For each grid point sample in the original training dataset, determine the neighborhood range of the grid point sample in the spatial dimension according to the preset neighborhood definition rules.
[0083] Furthermore, the neighborhood definition rules are as follows: a rectangular window of fixed size is used, such as a 3×3 or 5×5 grid area centered on the target grid point; a circular neighborhood can also be used, with a radius equal to the spacing between several grid points; and the neighborhood size can also be adaptively determined based on the degree of spatial autocorrelation.
[0084] S220. Extract the attribute information of all grid samples within the neighborhood of the target grid sample from the original training dataset to form the neighborhood spatiotemporal information of the target grid sample.
[0085] S230. Use a preset statistical function to perform calculations on the spatiotemporal information of the neighborhood and extract multiple sets of neighborhood statistics that characterize the spatial distribution and change features of the neighborhood.
[0086] Further, step S230 may include the following sub-steps S231 to S234:
[0087] S231. Calculate the arithmetic mean of the feature values corresponding to all grid samples within the neighborhood of the target grid sample to obtain the neighborhood mean that represents the overall level of the target grid sample in the neighborhood.
[0088] S232. Measure the standard deviation of the corresponding feature values of all grid point samples within the neighborhood of the target grid point sample to obtain the neighborhood standard deviation that characterizes the spatial variability of the target grid point sample within the neighborhood.
[0089] S233. Sort the feature values of all grid samples within the neighborhood of the target grid sample, and determine the neighborhood median, neighborhood maximum and neighborhood minimum of the target grid sample based on the sorting results.
[0090] S234. Calculate the difference between the maximum and minimum values in the neighborhood to obtain the neighborhood range, which represents the local variation of the target grid point sample within the neighborhood.
[0091] Furthermore, the neighborhood mean can reflect the average state of the region, the neighborhood standard deviation can describe the degree of spatial heterogeneity within the region, the neighborhood median can provide robust local central tendency against outliers, and the neighborhood range can reflect the upper and lower bounds of local variation.
[0092] S240. Perform feature fusion between multiple sets of neighborhood statistics and the latitude and longitude information of the target grid point sample to generate an enhanced feature vector corresponding to the target grid point sample.
[0093] S250. Traverse all grid point samples in the original training dataset as target grid point samples, and generate a training dataset composed of the enhanced feature vectors corresponding to each grid point sample.
[0094] S300. Based on the task type and spatial distribution characteristics of the spatiotemporal data to be predicted, the weights of latitude and longitude features in the training dataset are penalized and adjusted to obtain the optimal training dataset.
[0095] In this embodiment, by weakening absolute latitude and longitude using neighborhood statistics, the learning paradigm of the model is changed, shifting it from memorizing absolute positions to understanding spatial context relationships. This effectively eliminates strip noise, generates visually smooth and physically reasonable prediction surfaces, and enhances the model's generalization ability in different spatial regions. Specifically, step S300 may include the following sub-steps S310 to S340:
[0096] S310. Obtain the initial weights of neighborhood statistics features and latitude and longitude features in the training dataset.
[0097] S320. Based on the task type of the spatiotemporal data to be predicted, determine the initial penalty coefficients used to apply penalty adjustment to the initial weights of latitude and longitude features.
[0098] Furthermore, when the task type of the spatiotemporal data to be predicted is meteorological forecast data, meteorological elements (such as temperature and precipitation) have strong spatial continuity and are related to latitude and longitude and topography to a certain extent; therefore, the initial penalty coefficient can be set as the first penalty coefficient. When the task type of the spatiotemporal data to be predicted is environmental monitoring data, processes such as pollutant diffusion are significantly affected by the local environment and spatial gradient; therefore, the initial penalty coefficient can be set as the second penalty coefficient. When the task type of the spatiotemporal data to be predicted is agricultural yield estimation data, crop growth is greatly affected by local soil and microclimate, but there are certain regional distribution patterns; therefore, the initial penalty coefficient can be set as the third penalty coefficient. When the task type of the spatiotemporal data to be predicted is geological exploration data, geological attributes vary drastically in space and have weak continuity; the model should pay more attention to local structures; therefore, the initial penalty coefficient can be set as the fourth penalty coefficient. The numerical relationship between the first penalty coefficient, the second penalty coefficient, the third penalty coefficient, and the fourth penalty coefficient is: first penalty coefficient < second penalty coefficient < third penalty coefficient < fourth penalty coefficient. For example, the first penalty coefficient can be set to 0.1, the second penalty coefficient to 0.3, the third penalty coefficient to 0.5, and the fourth penalty coefficient to 0.8. The specific values can be determined through experimental optimization.
[0099] S330. Based on the historical spatiotemporal sequence of the spatiotemporal data to be predicted, perform spatial autocorrelation analysis, and correct the initial penalty coefficient according to the obtained global Moran index to obtain the final penalty coefficient.
[0100] Furthermore, spatial autocorrelation analysis is used to quantify the spatial clustering of data. By calculating the global Moran's index, it is determined whether the data exhibits a clustered, discrete, or random distribution pattern in space. If the Moran's index is high, it indicates strong spatial continuity of the data, and the weight of latitude and longitude features should be further reduced, thus the initial penalty coefficient can be adjusted; conversely, the initial penalty coefficient should be appropriately retained.
[0101] S340. Using the final penalty coefficient, the weights of latitude and longitude features in the training dataset are adjusted by weight decay to obtain the optimal training dataset for model training.
[0102] For example, when dealing with weather forecast data, the initial weights of neighborhood statistics and latitude / longitude features are both 0.5, and the initial penalty coefficient is 0.1. If spatial autocorrelation analysis shows that the Moran index is high, the corrected penalty coefficient can be increased to 0.15. After weight decay adjustment, the final weights of neighborhood statistics and latitude / longitude features can be adjusted to 0.65 and 0.35, respectively, so that during subsequent model training, the model pays more attention to neighborhood statistics, reduces dependence on absolute latitude and longitude, and retains a certain spatial location reference.
[0103] When dealing with geological exploration data, the initial weights for both neighborhood statistics and latitude / longitude features are 0.5, with an initial penalty coefficient of 0.8. If the Moran's index is low, indicating weak spatial continuity, the corrected penalty coefficient can be maintained at or slightly higher than 0.8. After adjusting the weights of latitude / longitude features in the training dataset through weight decay, the final weights for neighborhood statistics and latitude / longitude features can be adjusted to 1.0 and 0, respectively. This completely removes latitude / longitude features from the training dataset, ensuring that the model relies entirely on neighborhood statistics for prediction during subsequent training, thus avoiding noise introduced by location overfitting.
[0104] S400. Based on the optimal training dataset, and combined with the hyperparameters of the continuity of the association space automatically searched by the AutoML framework, the selected basic prediction model is trained to obtain the prediction model for the spatiotemporal data prediction of the response target.
[0105] In this embodiment, by combining the automatic hyperparameter optimization capability of an automated machine learning framework and customizing model selection and training strategies for spatial continuity problems, efficient modeling of the optimal training dataset is achieved, thereby significantly improving the spatial continuity of the prediction results while ensuring prediction accuracy. Specifically, step S400 may include the following sub-steps S410 to S440:
[0106] S410. Based on the AutoML framework, and considering the task type and data scale of the spatiotemporal data to be predicted, select at least two candidate models from the preset set of basic prediction models.
[0107] Further, step S410 may include the following sub-steps S411 to S413:
[0108] S411. Based on the AutoML framework, select at least two candidate models from the preset set of basic prediction models according to the task type and data scale of the spatiotemporal data to be predicted.
[0109] It's worth noting that the AutoML framework includes automated machine learning platforms such as Autogluon, H2O AutoML, and Google Cloud AutoML. The basic predictive model set includes Gradient Boosting Machine (GBM), CATBoost algorithm models, Random Forest models, Support Vector Machine (SVM), Deep Neural Network (DNN), and K-Nearest Neighbors (KNN) algorithm models.
[0110] S412. Using the hyperparameter optimization module built into the AutoML framework, perform automatic hyperparameter search on the candidate models to obtain hyperparameter combinations for each candidate model, and perform preliminary training on each candidate model based on the hyperparameter combinations.
[0111] Among them, the automatic hyperparameter search method can adopt Bayesian optimization, grid search or random search, etc., with the goal of minimizing the prediction error on the validation set or a custom spatial continuity loss function. The initial training aims to screen out candidate models with potential in terms of structure and parameters.
[0112] S413. Based on the model type elimination strategy, exclude model types that have a negative impact on spatial continuity, and obtain at least two candidate models that are finally determined.
[0113] Among them, the model type exclusion strategy includes removing K-nearest neighbor algorithm models from the candidate models to avoid the spatial prediction results being discontinuous due to the sensitivity of the K-nearest neighbor algorithm models to absolute distance.
[0114] S420. Set the optimization hyperparameters for the continuity of the association space according to the type of candidate model.
[0115] S430. Train the candidate model using the optimal training dataset and optimized hyperparameters, and evaluate the training effect of the candidate model based on cross-validation performance.
[0116] The optimization of hyperparameters includes: learning rate, number of iterations, extreme random tree mode, and preset parameters for model stacking. For complex spatial dependencies, deeper models and more iterations are needed for sufficient learning. For example, increasing the number of iterations to 2000 and setting a lower learning rate (e.g., 0.03) allows the model to converge more cautiously and stably, helping to capture broader spatial context information rather than noise. Enabling extreme random tree mode, which uses random feature split points, increases model diversity, prevents overfitting to certain features (such as potential latitude and longitude remnants), makes the model more robust, and generates a smoother spatial prediction surface.
[0117] S440. A model stacking strategy is adopted to fuse multiple candidate models with the best training performance to generate a prediction model for the final response target spatiotemporal data prediction.
[0118] Furthermore, model stacking is an ensemble learning method that combines the prediction results of multiple base models by training a meta-model. In this embodiment, multiple models that perform stably in cross-validation and have the best spatial continuity index are selected for stacking to further improve the robustness and spatial smoothness of the final prediction model.
[0119] In this embodiment, after step S400, the following sub-steps S510 to S530 may also be included:
[0120] S510. Package the prediction model into an executable file and deploy the packaged prediction model to the corresponding prediction platform.
[0121] S520. During the operation of the prediction platform, the spatiotemporal data stream collected in real time is input into the prediction model, and the continuous prediction results of the target spatiotemporal data are obtained through the prediction model.
[0122] S530: Dynamically visualize and monitor the performance of continuous prediction results in real time. When the value corresponding to spatial continuity drops to the preset minimum threshold, trigger the prediction model retraining instruction.
[0123] Furthermore, the prediction platform incorporates a visualization engine and monitoring module to display the spatial distribution map and continuity index curve of the prediction results in real time. When strip noise reappears or the continuity index falls below a preset threshold, the system automatically triggers the model retraining process, recollects recent data, and executes steps S100 to S400 in this method to achieve continuous iteration and optimization of the model.
[0124] Furthermore, this embodiment also provides a spatiotemporal data prediction system based on neighborhood statistics and AutoML, including:
[0125] The preprocessing module is used to preprocess the acquired multi-source heterogeneous spatiotemporal data to obtain the original training dataset.
[0126] The neighborhood feature enhancement module is used to extract neighborhood statistics from the spatiotemporal information of each grid sample in the original training dataset, and then fuse the extracted neighborhood statistics features with the latitude and longitude features of the current grid sample to obtain the training dataset.
[0127] The feature weight adjustment module is used to penalize and adjust the weights of latitude and longitude features in the training dataset based on the task type and spatial distribution characteristics of the spatiotemporal data to be predicted, so as to obtain the optimal training dataset.
[0128] The prediction model building and training module is used to train the selected base prediction model based on the optimal training dataset and the hyperparameters of the association space continuity automatically searched by the AutoML framework, so as to obtain the prediction model for the spatiotemporal data prediction of the response target.
[0129] The prediction deployment and monitoring module is used to deploy the trained prediction model to the prediction platform, so as to predict the target spatiotemporal data through the corresponding encapsulation file of the prediction model, and to dynamically monitor and visualize the prediction results and model performance.
[0130] In a specific embodiment, the effectiveness of the method of the present invention is verified and illustrated by taking the spatial gridded prediction of global surface temperature as an example. Two schemes are compared and predicted in the experiment: the first is the existing technical solution, which directly uses the Autogluon framework, taking the latitude and longitude coordinates of the grid points as one of the key input features, and training the model together with other attribute features such as temperature and humidity for prediction. The spatial distribution map of the prediction results is shown below. Figure 2 As shown in the figure; the second method uses the spatiotemporal data prediction method based on neighborhood statistics and AutoML proposed in this embodiment, and the spatial distribution map of its prediction results is shown in the figure. Figure 3 As shown.
[0131] Figure 2 This demonstrates the typical shortcomings of using existing technical solutions (i.e., directly inputting latitude and longitude as features into the AutoML framework). It is clearly observable that multiple sharp, vertical bands highly overlapping with the latitude and longitude lines exist in the image (manifesting as data jumps). This noise in the bands severely disrupts the spatial continuity of the prediction results, contradicting the actual spatial distribution of surface temperature, and is an artifact caused by the model's over-reliance on absolute location information.
[0132] Figure 3 The prediction results using the method described in this embodiment are presented. By introducing neighborhood statistics and penalizing latitude and longitude features, combined with model selection and hyperparameter optimization for spatial continuity, the original pervasive strip noise has been completely eliminated. The prediction results exhibit excellent spatial continuity and smoothness; the temperature field shows natural transitions and reasonable variations in land areas, clearly reflecting the true spatial pattern of surface temperature. Although in open ocean areas where the data is extremely sparse and spatial variability is small, some large-scale, low-amplitude variation zones still exist due to the inherent prediction uncertainty of the model. However, this is a reasonable performance of the data-driven model in areas with limited information, and is consistent with... Figure 2 The structural strip noise caused by defects in the model is fundamentally different.
[0133] Therefore, through comparison Figure 2 and Figure 3 This can be intuitively and powerfully demonstrated that the scheme described in this embodiment effectively suppresses and eliminates strip noise caused by the model overfitting to absolute latitude and longitude features, and significantly improves the spatial continuity and physical rationality of the prediction results.
[0134] In summary, this invention provides a spatiotemporal data prediction method and system based on neighborhood statistics and AutoML. By introducing neighborhood statistics to effectively characterize spatial context relationships, employing a feature weight adjustment mechanism based on task type and spatial autocorrelation, and combining it with automated model selection and hyperparameter optimization strategies oriented towards spatial continuity, a systematic technical solution is constructed to address the striping noise and spatial discontinuity problems caused by AutoML models' reliance on absolute position in spatiotemporal point prediction. This method retains the advantages of AutoML's efficient automated modeling while significantly improving the spatial continuity and physical rationality of the prediction results. It can be widely applied to gridded prediction tasks in fields such as weather forecasting, environmental monitoring, agricultural yield estimation, and geological exploration, exhibiting good versatility, practicality, and scalability, and providing reliable technical support for the automated generation of high-quality spatiotemporal prediction products.
[0135] Since the systems / devices described in the above embodiments of the present invention are systems / devices used to implement the methods of the above embodiments of the present invention, those skilled in the art can understand the specific structure and modifications of the systems / devices based on the methods described in the above embodiments of the present invention, and therefore will not be repeated here. All systems / devices used in the methods of the above embodiments of the present invention fall within the scope of protection of the present invention.
[0136] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0137] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions.
[0138] It should be noted that in the description of this invention, the word "a" or "an" preceding a component does not exclude the existence of multiple such components. This invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. The use of terms such as first, second, third, etc., is merely for convenience and does not indicate any order. These terms can be understood as part of the component names.
[0139] Furthermore, it should be noted that in the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0140] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning of the basic inventive concept, can make other changes and modifications to these embodiments.
[0141] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from the spirit and scope of the invention.
Claims
1. A spatiotemporal data prediction method based on neighborhood statistics and AutoML, characterized in that, This method is deployed on a forecasting platform used for weather forecasting, environmental monitoring, agricultural yield estimation, or geological exploration. The method includes: The acquired multi-source heterogeneous spatiotemporal data is preprocessed to obtain the original training dataset; The neighborhood spatiotemporal information of each grid point sample in the original training dataset is extracted using neighborhood statistics. The extracted neighborhood statistics features are then fused with the latitude and longitude features of the current grid point sample to obtain the training dataset. Based on the task type and spatial distribution characteristics of the spatiotemporal data to be predicted, the weights of latitude and longitude features in the training dataset are penalized and adjusted to obtain the optimal training dataset. Based on the optimal training dataset, and combined with the hyperparameters of the association space continuity automatically searched by the AutoML framework, the selected base prediction model is trained to obtain the prediction model for the spatiotemporal data prediction of the response target.
2. The method as described in claim 1, characterized in that, The acquired multi-source heterogeneous spatiotemporal data were preprocessed to obtain the original training dataset, which includes: Obtain multi-source heterogeneous spatiotemporal data within historical time periods associated with the prediction target from a pre-set database; Spatial grid segmentation is performed on multi-source heterogeneous spatiotemporal data to obtain a multidimensional spatiotemporal dataset composed of several spatial grid point samples. Each spatial grid point sample contains attribute information reflecting its own state as well as latitude and longitude information. The multidimensional spatiotemporal dataset is sequentially cleaned, formatted, imputed for missing values, and normalized for features to obtain the original training dataset for model training.
3. The method as described in claim 1, characterized in that, The neighborhood spatiotemporal information of each grid point sample in the original training dataset is used to extract neighborhood statistics. The extracted neighborhood statistics features are then fused with the latitude and longitude features of the current grid point sample to obtain the training dataset, which includes: For each grid point sample in the original training dataset, the neighborhood range of the grid point sample is determined in the spatial dimension according to the preset neighborhood definition rules. From the original training dataset, the attribute information of all grid samples within the neighborhood of the target grid sample is extracted to form the spatiotemporal information of the neighborhood of the target grid sample. The neighborhood spatiotemporal information is processed using a preset statistical function to extract multiple sets of neighborhood statistics that characterize the spatial distribution and change features of the neighborhood. Multiple sets of neighborhood statistics are fused with the latitude and longitude information of the target grid point sample to generate an enhanced feature vector corresponding to the target grid point sample. Traverse all grid point samples in the original training dataset as target grid point samples, and generate a training dataset consisting of the enhanced feature vectors corresponding to each grid point sample.
4. The method as described in claim 3, characterized in that, The neighborhood spatiotemporal information is processed using a preset statistical function to extract multiple sets of neighborhood statistics that characterize the spatial distribution and change features of the neighborhood, including: The arithmetic mean of the feature values corresponding to all grid samples within the neighborhood of the target grid sample is calculated to obtain the neighborhood mean, which represents the overall level of the target grid sample in the neighborhood. The standard deviation of the corresponding feature values of all grid point samples within the neighborhood of the target grid point sample is measured to obtain the neighborhood standard deviation that characterizes the spatial variability of the target grid point sample within the neighborhood. Sort the feature values of all grid points within the neighborhood of the target grid point sample, and determine the neighborhood median, neighborhood maximum and neighborhood minimum of the target grid point sample based on the sorting results. The difference between the maximum and minimum values in the neighborhood is calculated to obtain the neighborhood range, which represents the local variation of the target grid point sample within the neighborhood.
5. The method as described in claim 1, characterized in that, Based on the task type and spatial distribution characteristics of the spatiotemporal data to be predicted, the weights of latitude and longitude features in the training dataset are penalized and adjusted to obtain the optimal training dataset, which includes: Obtain the initial weights of neighborhood statistics features and latitude and longitude features in the training dataset; Based on the task type of the spatiotemporal data to be predicted, determine the initial penalty coefficients used to apply penalty adjustment to the initial weights of latitude and longitude features; Spatial autocorrelation analysis is performed on the historical spatiotemporal sequence of the spatiotemporal data to be predicted, and the initial penalty coefficient is corrected according to the obtained global Moran index to obtain the final penalty coefficient. By using the final penalty coefficient, the weights of latitude and longitude features in the training dataset are adjusted by weight decay to obtain the optimal training dataset for model training.
6. The method as described in claim 5, characterized in that, Based on the task type of the spatiotemporal data to be predicted, the initial penalty coefficients used to apply penalty adjustment to the initial weights of latitude and longitude features include: When the task type of the spatiotemporal data to be predicted is weather forecast data, the initial penalty coefficient is the first penalty coefficient; When the task type of the spatiotemporal data to be predicted is environmental monitoring data, the initial penalty coefficient is the second penalty coefficient; When the task type of the spatiotemporal data to be predicted is agricultural yield estimation data, the initial penalty coefficient is the third penalty coefficient; When the task type of the spatiotemporal data to be predicted is geological exploration data, the initial penalty coefficient is the fourth penalty coefficient; The numerical relationship between the first penalty coefficient, the second penalty coefficient, the third penalty coefficient, and the fourth penalty coefficient is: first penalty coefficient < second penalty coefficient < third penalty coefficient < fourth penalty coefficient.
7. The method as described in claim 1, characterized in that, Based on the optimal training dataset and combined with the hyperparameters of association space continuity automatically searched by the AutoML framework, the selected base prediction model is trained to obtain prediction models for responding to spatiotemporal data predictions, including: Based on the AutoML framework, and considering the task type and data scale of the spatiotemporal data to be predicted, at least two candidate models are selected from the preset set of basic prediction models. Set optimization hyperparameters for the continuity of the association space based on the type of candidate model; The candidate model is trained using the optimal training dataset and optimized hyperparameters, and the training effect of the candidate model is evaluated based on cross-validation performance. A model stacking strategy is adopted to fuse multiple candidate models with the best training performance to generate a prediction model for the final response target spatiotemporal data prediction. The optimized hyperparameters include: learning rate, number of iterations, extreme random tree mode, and preset parameters for model stacking.
8. The method as described in claim 7, characterized in that, Based on the AutoML framework, and considering the task type and data scale of the spatiotemporal data to be predicted, at least two candidate models are selected from a pre-defined set of basic prediction models, including: Based on the AutoML framework, at least two candidate models are selected from the preset set of basic prediction models according to the task type and data scale of the spatiotemporal data to be predicted. The set of basic prediction models includes gradient boosting machine, CATBoost algorithm model, random forest model, support vector machine, deep neural network and K nearest neighbor algorithm model. Using the built-in hyperparameter optimization module of the AutoML framework, we perform automatic hyperparameter search on the candidate models, obtain hyperparameter combinations for each candidate model, and perform preliminary training on each candidate model based on the hyperparameter combinations. Based on the model type exclusion strategy, model types that have a negative impact on spatial continuity are excluded, resulting in at least two final candidate models. Among them, the model type exclusion strategy includes removing K-nearest neighbor algorithm models from the candidate models to avoid the spatial prediction results being discontinuous due to the sensitivity of the K-nearest neighbor algorithm models to absolute distance.
9. The method as described in claim 1, characterized in that, After training the selected base prediction model based on the optimal training dataset and combining the hyperparameters of the association space continuity automatically searched by the AutoML framework to obtain the prediction model for the target spatiotemporal data, the following steps are also included: The prediction model is packaged into an executable file, and the packaged prediction model is deployed to the corresponding prediction platform; During the operation of the prediction platform, the spatiotemporal data stream collected in real time is input into the prediction model, and the prediction model obtains continuous prediction results of the target spatiotemporal data. The system provides dynamic visualization and real-time performance monitoring of continuous prediction results. When the value corresponding to spatial continuity drops to a preset minimum threshold, it triggers a retraining instruction for the prediction model.
10. A spatiotemporal data prediction system based on neighborhood statistics and AutoML, characterized in that, include: The preprocessing module is used to preprocess the acquired multi-source heterogeneous spatiotemporal data to obtain the original training dataset; The neighborhood feature enhancement module is used to extract neighborhood statistics from the spatiotemporal information of each grid sample in the original training dataset, and then fuse the extracted neighborhood statistics features with the latitude and longitude features of the current grid sample to obtain the training dataset. The feature weight adjustment module is used to penalize and adjust the weights of latitude and longitude features in the training dataset based on the task type and spatial distribution characteristics of the spatiotemporal data to be predicted, so as to obtain the optimal training dataset. The prediction model building and training module is used to train the selected basic prediction model based on the optimal training dataset and the hyperparameters of the continuity of the association space automatically searched by the AutoML framework, so as to obtain the prediction model for the spatiotemporal data prediction of the response target. The prediction deployment and monitoring module is used to deploy the trained prediction model to the prediction platform, so as to predict the target spatiotemporal data through the corresponding encapsulation file of the prediction model, and to dynamically monitor and visualize the prediction results and model performance.