A weather feature extraction method based on data state
By adopting a dynamic feature selection method based on data status, the problem of wasted computing resources in existing technologies is solved, and efficient and robust processing of meteorological feature extraction is achieved, adapting to the real-time needs of multi-source data scenarios.
Patent Information
- Application Number
- CN202611123826.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-11-24
AI Technical Summary
In existing meteorological feature extraction methods, the fixed feature engineering process leads to a large amount of computational resources being wasted on redundant or irrelevant feature calculations. In particular, the computational efficiency is low under different data scenarios, making it difficult to meet the needs of efficient processing of real-time multi-source data.
The meteorological feature extraction method based on data state dynamically adjusts the importance weights of candidate features by calculating the state vectors of data quality, physical dimension and value dimension in real time, and constructs a resource-constrained optimization problem to select the optimal feature subset for parallel extraction.
It significantly reduces the time and resource consumption of feature engineering, improves the throughput efficiency of the data processing pipeline, ensures the effectiveness and robustness of feature subsets, adapts to different computing power environments, and realizes the precise release and efficient utilization of computing resources.
Smart Images

Figure CN123158178A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, specifically relating to a method for extracting meteorological features based on data status. Background Technology
[0002] Weather forecasting and analysis rely on the comprehensive processing of massive, multi-source, and heterogeneous data, including satellite remote sensing, radar observations, numerical model outputs, and ground station observations. Feature extraction, as a crucial link connecting observational data and forecasting models, directly impacts the overall performance of the forecasting system.
[0003] Existing meteorological feature extraction methods typically employ a fixed feature engineering process. Specifically, the system pre-defines a candidate feature library containing various feature extraction operators (such as radar combined reflectivity, convective effective potential energy, water vapor flux divergence, satellite cloud image texture features, etc.), and calculates all pre-defined features according to this fixed process for each forecast task.
[0004] The aforementioned static feature extraction strategy results in a significant amount of computational resources being wasted on redundant or irrelevant feature calculations. For example, when forecasting clear skies, it still takes time to calculate complex instability index features closely related to severe convection; when processing large-scale, multi-source data, the fixed full-scale calculation process is prone to causing computational bottlenecks. Summary of the Invention
[0005] In view of the above-mentioned shortcomings of the prior art, the present invention provides a meteorological feature extraction method based on data status to solve the above-mentioned technical problems.
[0006] In a first aspect, the present invention provides a meteorological feature extraction method based on data status, comprising: Access a real-time multi-source meteorological data stream, and calculate a state vector for each data block in the data stream. The state vector includes at least data quality dimension indicators, data physical dimension indicators, and data value dimension indicators. Based on the current prediction task, candidate features and the basic importance weight of each candidate feature are determined from the candidate feature library; Based on the state vector of the data block on which each candidate feature depends, the basic importance weights are corrected to obtain the dynamic importance of each candidate feature; the available computing resources of the system are obtained, and a resource constraint optimization problem is constructed and solved with the goal of maximizing the sum of the dynamic importance of the selected features without exceeding the available computing resources, to obtain the feature subset extracted in this case; Based on the feature subset, the feature extraction task of the data stream is executed in parallel, and the extracted features are organized into a feature matrix and output.
[0007] Secondly, the present invention provides a meteorological feature extraction system based on data status, comprising: The state calculation module is used to access real-time multi-source meteorological data streams and calculate a state vector for each data block in the data stream. The state vector includes at least data quality dimension indicators, data physical dimension indicators, and data value dimension indicators. The candidate determination module is used to determine candidate features and the basic importance weight of each candidate feature from the candidate feature library based on the current prediction task. The feature selection module is used to correct the basic importance weights based on the state vector of the data block on which each candidate feature depends, so as to obtain the dynamic importance of each candidate feature; obtain the current available computing resources of the system, and construct and solve a resource constraint optimization problem with the goal of maximizing the sum of the dynamic importance of the selected features without exceeding the available computing resources, so as to obtain the feature subset extracted this time. The matrix output module is used to perform feature extraction tasks on the data stream in parallel based on the feature subset, organize the extracted features into a feature matrix and output it.
[0008] Thirdly, a device is provided, comprising: Memory, used to store meteorological feature extraction programs based on data status; A processor is configured to implement the steps of the meteorological feature extraction method based on data state as provided in the first aspect when executing the meteorological feature extraction program based on data state.
[0009] Fourthly, a computer-readable medium is provided, on which a meteorological feature extraction program based on data state is stored, wherein when the meteorological feature extraction program based on data state is executed by a processor, the meteorological feature extraction method based on data state provided in the first aspect is implemented.
[0010] The beneficial effects of this invention are as follows: The meteorological feature extraction method based on data status provided by this invention transforms static feature extraction into dynamic adaptive selective feature extraction by real-time sensing of data status and task requirements. This fundamentally eliminates redundant computation, significantly reduces the time and resource consumption of feature engineering, and improves the throughput efficiency of the data processing pipeline. Simultaneously, because feature selection is closely linked to data quality, physical anomalies, and task relevance, this invention can automatically suppress the interference of low-quality or irrelevant features on the forecast model, ensuring the effectiveness and robustness of the output feature subset under different data scenarios. Furthermore, by introducing a resource constraint optimization mechanism, this invention can adapt to different computing power environments, achieving precise release and efficient utilization of computing resources, providing key technical support for intensive and intelligent meteorological operational systems. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic flowchart of a method according to an embodiment of the present invention.
[0013] Figure 2 This is a schematic flowchart illustrating the process of obtaining a feature subset according to an embodiment of the present invention.
[0014] Figure 3 This is a schematic flowchart illustrating the process of performing a feature extraction task according to an embodiment of the present invention.
[0015] Figure 4 This is a schematic block diagram of a system according to an embodiment of the present invention. Detailed Implementation
[0016] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0018] The meteorological feature extraction method based on data status provided in this embodiment of the invention is executed by a computer device, and correspondingly, the meteorological feature extraction system based on data status runs in the computer device.
[0019] Figure 1 This is a schematic flowchart illustrating a method according to an embodiment of the present invention. Wherein, Figure 1 The implementing entity can be a meteorological feature extraction system based on data status. Depending on different needs, the order of the steps in this flowchart can be changed, and some can be omitted.
[0020] like Figure 1 As shown, the method includes: S1. Access the real-time multi-source meteorological data stream, and calculate a state vector for each data block in the data stream. The state vector includes at least data quality dimension indicators, data physical dimension indicators, and data value dimension indicators. S2. Based on the current prediction task, determine the candidate features and the basic importance weight of each candidate feature from the candidate feature library; S3. Based on the state vector of the data block on which each candidate feature depends, the basic importance weight is corrected to obtain the dynamic importance of each candidate feature; the available computing resources of the system are obtained, and a resource constraint optimization problem is constructed and solved with the goal of maximizing the sum of the dynamic importance of the selected features without exceeding the available computing resources, to obtain the feature subset extracted this time; S4. Based on the feature subset, perform the feature extraction task of the data stream in parallel, organize the extracted features into a feature matrix and output it.
[0021] The following example illustrates the task of forecasting heavy rainfall in the Yellow River Basin over the next 6 hours. In this embodiment, the forecast task T is "Forecast of Heavy Rainfall in the Yellow River Basin over the Next 6 Hours". The system is deployed in a meteorological service center and is equipped with 8 CPU computing cores, 1 GPU accelerator card, and 512GB of storage bandwidth and memory resources.
[0022] In one embodiment of the present invention, based on step S1, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0023] S101. Access real-time multi-source meteorological data stream.
[0024] The system accesses the meteorological data stream in real time through the multi-source data acquisition interface of the data access and status monitoring module. In this embodiment, the accessed data includes three types of data sources: Infrared channel brightness temperature data of Fengyun-4B satellite: spatial resolution 4km×4km, covering the entire Yellow River basin, data format NetCDF4, acquired through real-time broadcast from satellite ground receiving station.
[0025] Yellow River Basin Network Radar Data: Includes volume scan data (VCP mode) from 8 S-band Doppler radars in Jinan, Zhengzhou, Xi'an, etc., with a volume scan completed every 6 minutes. It includes reflectivity factors and radial velocity fields at 9 elevation angles and is accessed via a dedicated radar network data transmission line.
[0026] China Meteorological Administration's intelligent grid numerical forecast product has a spatial resolution of 3km×3km and a forecast lead time of 0-72 hours. It is obtained through the meteorological intranet data sharing platform.
[0027] The time window for all data sources is uniformly set to the latest data within 15 minutes before and after the current time.
[0028] S102. Calculate a state vector for each data block in the data stream.
[0029] (a) Data block partitioning Based on the data source type and data acquisition time window, the multi-source meteorological data stream accessed in step S101 is divided into three independent data blocks: Data block D1 (radar data block): Volume scan data of Jinan radar at the current time (06:00UTC on June 30, 2026), containing a three-dimensional grid field of reflectivity factor at 9 elevation angles, with a grid size of 800×800×9.
[0030] Data block D2 (satellite data block): Current brightness temperature data of the secondary infrared channel of Fengyun-4B satellite, covering the Yellow River Basin, with a grid size of 600×600.
[0031] Data block D3 (model data block): Grid field data for 72-hour forecast lead time of smart grid forecast, with a grid size of 200×200×30 (including barosphere).
[0032] (ii) Calculation of state vector For each data block, the data state vector calculation unit calculates a five-dimensional state vector:
[0033] The specific calculation methods for each dimension are as follows: (1) Data integrity rate
[0034] Data completeness is defined as the ratio of valid observations to the total number of grid points:
[0035] in, For the number of effective observation points, This represents the total number of grid points in the data block.
[0036] (2) Data credibility
[0037] Data credibility ∈[0,1], is jointly evaluated by equipment status logs, historical deviation statistics, and climate extreme value checks, comprehensively reflecting the reliability of the data source. Its calculation formula is:
[0038] in, Equipment failure rate (based on equipment status log statistics). The percentage of observation points exceeding climate extremes. 、 、 The corresponding weighting coefficients (in this embodiment, all are taken as 1 / 3).
[0039] (3) Spatiotemporal representativeness
[0040] The spatiotemporal representativeness intensity quantification data demonstrates the effective representation of current forecasting tasks in both time and space, employing different computational strategies for observational and model data:
[0041] For observational data, The observation network density index (calculated based on the ratio of the area covered by the observation station to the area of the target region). The time decay factor (the larger the time difference between the current moment and the observation moment, the greater the decay factor). (smaller)
[0042] Where Δt is the time difference between the observation time and the forecast start time, and τ0 is the time decay constant (in this embodiment, τ0 = 30 minutes).
[0043] For model data, the spatiotemporal representativeness is a function of the model's horizontal resolution and forecast lead time:
[0044] Where τ is the forecast lead time. For reference timeframe (24 hours in this embodiment), Δx represents the horizontal resolution of the mode. The reference resolution is 10km in this embodiment, and α is the attenuation coefficient (α=0.5 in this embodiment).
[0045] (4) Physical Anomaly Index
[0046] The physical anomaly index quantifies the degree of deviation of the current data field from the average climate field of the same period, and is defined as the absolute value of the standardized deviation:
[0047] in This represents the regional average value of the current data field. and These are the mean and standard deviation of the data source during the same historical period (climatological state), respectively.
[0048] (5) Task relevance
[0049] The task relevance measure is the potential contribution of data sources to the current prediction task T (heavy precipitation in the Yellow River Basin in the next 6 hours). In this embodiment, the mutual information between each data source and the heavy precipitation event is calculated and normalized using historical samples:
[0050] MI(·) represents mutual information, derived from statistical analysis of historical heavy rainfall cases over the past three years.
[0051] (III) State Vector Normalization After the above five dimensions are calculated, the system independently performs Min-Max normalization on each component of the state vector of each data block to the [0,1] interval (the above values are already within this interval and do not require additional transformation).
[0052] In one embodiment of the present invention, based on step S2, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0053] S201. Candidate Feature Library The feature library and evaluation model management module maintains a complete meteorological candidate feature library F. total This includes hundreds of predefined feature extraction operators, each corresponding to a specific calculation method for a meteorological feature. For heavy precipitation forecasting tasks, the definitions and calculation methods of some features in the feature library in this embodiment are as follows: Feature f1 (maximum value of combined radar reflectivity): Read the three-dimensional reflectivity field of radar data block D1, take the maximum reflectivity of each elevation layer for each grid column to obtain the horizontal distribution field of combined reflectivity, and then take the maximum value of the region as the feature value.
[0054] Feature f2 (Convective Effective Potential Energy CAPE): Based on temperature, humidity, and barosphere data from model data block D3, calculate the positive buoyancy area of the air parcel from the free convection height (LFC) to the equilibrium height (EL), requiring numerical integration along the barosphere.
[0055] Feature f3 (850hPa and 500hPa temperature difference): Extracts the temperature fields of the 850hPa and 500hPa isobaric surfaces from model data block D3, calculates the regional average temperature difference, and uses it to characterize convective instability.
[0056] Feature f4 (water vapor flux divergence): Based on the wind field and specific humidity field of model data block D3, calculate the horizontal water vapor flux divergence field, and take the regional average or extreme value.
[0057] Feature f5 (cold cloud cover area in satellite cloud image): Read the infrared brightness temperature field of satellite data block D2 and count the ratio of the number of grid points with brightness temperatures below -52℃ (characterizing deep convection cloud tops) to the total number of grid points.
[0058] Feature f6 (Satellite cloud image texture uniformity): Calculates the energy feature (AngularSecondMoment) of the gray-level co-occurrence matrix for the infrared brightness temperature field of satellite data block D2, quantifying the texture uniformity of the cloud image.
[0059] Feature f 200 (Upper-level westerly index): The regional average westerly wind speed is calculated based on the 300 hPa zonal wind field of model data block D3.
[0060] The aforementioned feature extraction operators cover various types, including radar features, pattern physical quantity features, and satellite image texture features. They are all registered in the feature library as functions. Each operator contains its input data dependency declaration (specifying which data block it depends on) and execution entry function.
[0061] S202. Offline Training of the Basic Importance Assessment Model For the current prediction task T ("heavy precipitation"), the offline-trained feature importance evaluation model M is invoked. imp , for feature library F total Each candidate feature f in j Calculate the basic importance weight I base (f j ,T).
[0062] The model is built using LightGBM (Lightweight Gradient Boosting Machine) as the base learner, and the training process is as follows: 1. Training Sample Construction Six-hourly sample data were collected from historical reanalysis data for the Yellow River Basin during the flood season from June to August (June 2021 to May 2026). For each sample time t: Extract the feature vector X corresponding to each data source at this moment. t (Includes calculated values of all features in the candidate feature library, totaling 276 dimensions); Determine label Y t (Binary Classification): If the cumulative precipitation observed at any hydrological station in the Yellow River basin within 6 hours after this moment is ≥50mm / 6h, then Y t =1 (positive sample of heavy precipitation), otherwise Y t =0 (negative sample).
[0063] In this embodiment, a total of 1,285 positive samples and 21,440 negative samples were collected and divided into training set and validation set in a 7:3 ratio. The SMOTE oversampling technique was used to balance the ratio of positive to negative samples.
[0064] 2. Model Training The LightGBM model uses the feature vector X t For input, label Yt Train the model to predict the target. Configure the model parameters as follows: Maximum tree depth (max_depth): 8; Number of leaf nodes (num_leaves): 64; Learning rate: 0.05; Increase the number of iteration rounds (n_estimators): 500; Feature sampling ratio (feature_fraction): 0.8; Data sampling ratio (bagging_fraction): 0.9.
[0065] Five-fold cross-validation was employed, with the AUC-ROC (Area Under the Receiver Operating Characteristic Curve) on the validation set used as the early termination criterion. Training was terminated when the AUC stopped improving after 50 consecutive rounds. The final model achieved an AUC of 0.892 on the validation set, indicating that the model has good discriminative ability for heavy precipitation events.
[0066] 3. Calculation of basic importance weights After the model is trained, the contribution of each feature to the model's prediction results is calculated using the SHAP (SHapley Additive ex Planations) method. The SHAP value is based on the Shapley value principle in game theory. It calculates the average marginal contribution of a feature to the model's output when that feature is added to all possible feature subsets, thus obtaining the global importance score of that feature.
[0067] In the specific implementation, LightGBM's tree-structured SHAP fast approximation algorithm (TreeExplainer) is used to calculate each feature f for all training samples. j The average of the absolute values of the SHAP values is used as the basic importance weight for this feature:
[0068] in, For the feature f in the i-th sample j The SHAP value reflects the direction and magnitude of the contribution of this feature to the deviation of the model output from the baseline in this sample.
[0069] I base The values are normalized to form the basic importance weight set {I} for each candidate feature under the current prediction task. base (f j ,T)}.
[0070] In one embodiment of the present invention, based on step S3, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0071] S301. Based on the state vector of the data block on which each candidate feature depends, the basic importance weights are corrected to obtain the dynamic importance of each candidate feature.
[0072] (a) Definition of the state adjustment function For the candidate feature library F total Each candidate feature f in j The adaptive feature selection decision module first obtains the data block source(f) that the feature depends on. j ) and its corresponding state vector S source (f j Then calculate the state adjustment function value g(S).
[0073] The state adjustment function g(S) is defined as a weighted combination of the data quality dimension and the task value dimension, and includes a physical anomaly penalty term:
[0074] The meanings of each symbol are as follows: Data completeness rate reflects the coverage of effective observation data; Data credibility reflects the reliability of the data source; Task relevance reflects the potential contribution of data sources to the current forecasting task; Physical anomaly index, reflecting the degree of deviation of the current data field from the climatological state; α, β: Weighting coefficients for the quality and value dimensions, α+β=1; w1, w2: The weights of data integrity and credibility in the quality dimension, w1+w2=1; γ: Physical anomaly penalty coefficient; θ: Physical anomaly tolerance threshold.
[0075] As can be seen from the above formula, the state adjustment function value increases with the increase of data quality dimension indicators and data value dimension indicators. The more complete, reliable, and relevant the data is to the forecasting task, the higher the importance of its derived features. It decreases with the increase of the physical anomaly index in the data physical dimension indicators. When significant physical anomalies (A0) appear in the data field... phys When the tolerance threshold θ is exceeded, the state adjustment function value is penalized and reduced.
[0076] In addition, the state adjustment function has a safety threshold set: when the data integrity rate... When the completeness rate falls below the preset minimum threshold of 0.5, g(S) is forcibly set to zero.
[0077] This mechanism ensures that when the number of valid observations from a data source is less than 50% of the total number of grid points, all candidate features that rely on that data source are forcibly disabled, preventing unreliable features derived from low-quality data from entering the forecast model.
[0078] The hyperparameters α, β, w1, w2, γ, and θ were determined using an offline calibration method. In this embodiment, based on historical reanalysis data, the optimal parameter combination was searched using a Bayesian optimization method with the ThreatScore of the heavy precipitation forecast model as the objective. The calibration dataset consisted of samples from the past three flood seasons (independent of the training set of the basic importance assessment model in step S103), and the search space was set as follows: α∈[0.6,0.95], β=1-α, w1∈[0.3,0.7], w2=1-w1, γ∈[0.1,0.3], θ∈[2.0,4.0]. After 100 rounds of Bayesian optimization iterations, the optimal parameter combination was: α=0.85, β=0.15, w1=0.5, w2=0.5, γ=0.2, θ=3.0. Under this parameter combination, the ThreatScore of the heavy precipitation forecast model reached the optimal value of 0.42.
[0079] In heavy precipitation forecasting in the Yellow River Basin, the quality (completeness and reliability) of radar data has a far greater impact on the forecast results than the fluctuation of the correlation score. This is because the correlation score C... target The calculation is based on historical statistical mutual information, while the quality dimension reflects the current data availability in real time. The latter has a larger variance in business operations and a more significant impact on forecast results.
[0080] (ii) Calculation of the state adjustment function value for each data block Taking radar data block D1 as an example, the state vector of radar data block D1 is:
[0081] Because A phys =1.025 < θ = 3.0, so the penalty term is 0. Substitute into the state adjustment function:
[0082] The calculation method for other data blocks is the same.
[0083] (III) Calculation of the dynamic importance of each candidate feature Multiplying the base importance weight of each candidate feature by the state adjustment function value of the data block it depends on yields the dynamic importance of that feature:
[0084] This multiplicative correction mechanism achieves the following effect: If the data block on which a feature depends is in good condition (data is complete, reliable, and relevant to the task) and has no physical anomalies, then its state adjustment function value is high (close to 1.0), its dynamic importance is close to its basic importance, and it is retained. If the data block on which it depends is in poor condition (severe data gaps, low reliability, poor representativeness), its state adjustment function value will be low, and its dynamic importance will be significantly reduced. If the data block it depends on experiences a serious physical anomaly (A) phys If the value is greater than θ, then the dynamic importance is further penalized and reduced. If the integrity rate of the data block it depends on is below the minimum threshold, the dynamic importance is directly set to zero, and the feature is disabled.
[0085] S302. Obtain the current available computing resources of the system, and construct and solve a resource-constrained optimization problem with the goal of maximizing the sum of the dynamic importance of the selected features without exceeding the available computing resources, to obtain the feature subset extracted this time.
[0086] (a) Access to available computing resources The system resource monitor obtains the available resource status of the current computing node in real time. In this embodiment, the system is deployed on a computing node of a meteorological service center, configured with 8 physical computing cores (Intel Xeon Gold 6248, 2.5GHz). Available memory is obtained in real time through the operating system.
[0087] The current system resource status is as follows: Number of available computing cores: N core =8 Expected processing latency budget: B latency =80ms (The business system requires that the total latency from data access to feature matrix output should not exceed 80ms) Available free memory: M avail =800MB (obtained from real-time monitoring by the operating system) Available calculation workload budget W budget The calculation method is as follows: the expected latency budget and the number of available computing cores are converted into a total amount of Standardized Work Units (CWU). CWU is a unit of measurement for computational workload defined internally by the system; 1 CWU is equivalent to a standard computational load of 1ms per core (under benchmark conditions). Therefore:
[0088] This budget indicates that, under an 80ms latency constraint, the 8 computing cores can complete a total computational workload of 640 CWU. It should be noted that this budget is a theoretical upper limit; in actual scheduling, each task is executed in parallel. The total CWU constraint reflects that the sum of the computational workload of all tasks does not exceed the system's total processing capacity within the latency budget.
[0089] (II) Construction of Candidate Feature Resource Cost Profile The system feature library and evaluation model management module is the candidate feature library F total Each candidate feature f in j A resource cost profile is pre-built. This profile is obtained through historical performance analysis during feature registration, stored in the feature library management module, and retrieved during each feature extraction decision.
[0090] Each candidate feature f j The resource cost profile includes the following three parts: Calculate the workload w comp (f j ): Measured in CWU, this represents the computational resource consumption required to execute the feature on benchmark hardware (single-core CPU 2.5GHz). This value is determined as follows: for features with existing implementations, based on the statistical average of CPU time recorded in historical execution logs; for newly registered features, through theoretical complexity estimation combined with small-sample benchmark testing for correction.
[0091] Exclusive memory usage m excl (f j ): Measured in MB, this represents the additional memory increment consumed by this feature during execution (excluding the memory consumed by loading and decoding the source data it depends on). This value is obtained by measuring peak memory increments during historical executions using performance profiling tools such as Valgrind's massif tool or IntelVTune.
[0092] Source data block ownership G(f) j Each feature tag specifies the source data block it depends on. Multiple features from the same source data block share the same source data loading and decoding result. The following source data blocks are defined in this embodiment: Source data block G1: Radar volume scan data (including three-dimensional reflectivity field, radial velocity field, etc.), basic loading overhead m base (G1) = 10MB (including NetCDF file parsing and grid remapping to a unified grid); Source data block G2: Satellite infrared brightness temperature data, basic loading overhead m base(G2) = 8MB (including radiometric calibration and geographic projection); Source data block G3: Model grid data (containing multiple pressure layers and multiple physical fields), basic loading overhead m base (G3) = 5MB (including NetCDF file reading and barosphere interpolation to a unified grid).
[0093] (III) Minimum Guarantee Feature Set and Resource Reservation To prevent the knapsack optimization result from being empty under extreme data conditions, the system predefines a minimum guaranteed feature set F that is strongly correlated with the heavy precipitation task. fallback This feature set is statically configured and stored in the minimum guaranteed feature set storage unit of the adaptive feature selection decision module.
[0094] In this embodiment, for the forecast task of "heavy rainfall in the Yellow River Basin in the next 6 hours", the minimum guarantee feature set is defined as:
[0095] The selection of these two features is based on the following: the temperature difference between 850 hPa and 500 hPa directly reflects atmospheric convective instability, which is one of the necessary conditions for severe convective weather; the 850 hPa geopotential height reflects the background of lower atmospheric circulation and warm and humid advection transport conditions. The combination of these two features can still provide basic physical constraints for forecast models even when other data are missing. Both features are calculated based on model data and can be obtained under any data conditions, exhibiting strong robustness.
[0096] The resource cost of the minimum guaranteed feature set is deducted from the total budget in advance and does not participate in subsequent knapsack game. After deduction, the remaining resource budget available for knapsack optimization is:
[0097]
[0098] (iv) Construction of the knapsack optimization problem In the remaining candidate feature set (excluding F) fallback Then, among the 273 features, the optimization objective is to maximize the sum of the total dynamic importance of the selected features, and the constraints are computational workload and memory usage. A 0-1 knapsack optimization problem with grouped fixed cost is constructed.
[0099] (1) Decision variables For each candidate feature f j (j=1,2,…,273), define a binary decision variable x. j :
[0100] (2) Objective function Maximize the sum of the total dynamic importance of the selected features:
[0101] (3) Calculation of workload constraints The total computational workload of the selected features shall not exceed the available computational workload budget:
[0102] :feature The number of CPU cores used during execution. Most features are single-core computations (core_need=1), while some features that can be parallelized and accelerated may use more cores (e.g., core_need=2).
[0103] : 0-1 decision variables =1 indicates that the feature is selected. =0 indicates that it is not selected.
[0104] ∑ (summation symbol): sums all selected features ( The core_need values of (=1) are summed up.
[0105] The total number of CPU cores currently available in the system.
[0106] The computation tasks for each feature are executed in parallel. The total number of cores used by features running simultaneously at any given time must not exceed the total number of cores in the system. For example, if the system has 8 cores, and 3 single-core features (each occupying 1 core) and 1 dual-core feature (occupying 2 cores) are selected, the total core usage is 3×1+1×2=5 cores, which does not exceed 8 cores, and all can be executed in parallel. If the total core usage exceeds 8 cores, some tasks will need to queue and wait, which will cause the actual wall clock time to exceed expectations.
[0107] (4) Memory usage constraints The total memory usage of the selected features does not exceed the available memory, and the basic load overhead of the same source data block is only counted once. For the three source data blocks G1, G2, and G3, define the group selection flag variable y. k (k=1,2,3):
[0108] That is, y k =1 if and only if at least one feature in the k-th group is selected. Memory constraint:
[0109] Source data block The basic loading overhead (i.e., the memory consumed by file I / O and the decoding process itself, such as the temporary buffer during NetCDF parsing).
[0110] Source data block The cache memory usage of the actual data object after decoding (i.e., the memory occupied by the decoded three-dimensional array residing in the shared cache).
[0111] : Selected data block flag variable, =1 indicates that at least one feature of the data block is selected. =0 indicates that no features of the data block are selected.
[0112] :feature The exclusive memory increment (excluding the shared cache portion).
[0113] Feature selection flag variable, =1 indicates that the feature is selected.
[0114] The system currently has available free memory.
[0115] The available memory of the system must simultaneously meet two requirements: first, the cache occupation of data objects after decoding each source data block (shared part); and second, the exclusive memory increment during the calculation of each feature (private part).
[0116] The first item is the basic loading cost of each group of source data (calculated based on the number of selected groups), and the second item is the sum of the exclusive memory usage of each selected feature.
[0117] This constraint precisely expresses the shared deduplication logic that the basic cost of the same group is paid only once. For example, if features f1, f7, and f8 are all selected (all three belong to G1), then the memory computation is m. base (G1) = 10MB (once only) plus the sum of the memory increments of the three components.
[0118] (5) Problem Types The optimization problem described above belongs to the 0-1 knapsack problem with fixed charges, which is an extension of the classic knapsack problem. Its core characteristic is that the basic cost m within each group... base (G k Whether this occurs depends on whether any feature in the group is selected. The cost does not increase linearly with the number of selected features, but rather exhibits a fixed cost characteristic of "0 or 1".
[0119] (V) Solving the Knapsack Optimization Problem (1) Algorithm selection In this embodiment, the number of candidate features n=273, which is less than the preset threshold of 500. Therefore, the dynamic programming (DP) algorithm is used to solve the problem accurately in the extended state space.
[0120] The state definition in dynamic programming is dp[i][w][m], representing the maximum dynamic importance achievable by considering the first i candidate features, consuming computational effort w, and memory m. During state transition, for each feature f... i It is necessary to consider whether the basic overhead of its source data block has been factored in. When a feature is selected for the first time in this group, an additional m cost is required. base (G(f i The memory of the group is used to record whether each group has been selected in the state space by introducing group status flags.
[0121] (2) Solution process and results Through dynamic programming, under the budget constraints of 605 CWU and 782 MB, the characteristics of the optimal solution are: Source data block G1 (radar data) is selected: Feature f1 (maximum radar composite reflectivity), Feature f7 (radar echo top height), and Feature f8 (strong echo area). These three share the radar group's basic loading overhead m. base (G1) = 10MB.
[0122] Source data block G2 (satellite data) selected: Feature f5 (cold cloud cover area in satellite cloud imagery). Satellite group basic loading overhead m base (G2) = 8MB.
[0123] Source data block G3 (model data) selected: Feature f4 (water vapor flux divergence). Model group basic loading cost m base (G3) = 5MB.
[0124] Minimum guaranteed features: f3 (temperature difference between 850hPa and 500hPa) and f9 (potential height at 850hPa) have been pre-included and are not included in the knapsack solution.
[0125] Calculation and verification of total workload:
[0126] The total computational workload of 280 CWU is far less than the budget of 640 CWU. This is mainly because high-quality features are concentrated in radar data sets, and the number of highly dynamic and important features in these sets is limited. The system does not need to use all of the computing power budget while ensuring the core features are utilized. The remaining computing resources can be reserved for subsequent computing tasks or used to reduce CPU power consumption.
[0127] Memory usage verification:
[0128] The memory usage of 148MB is much less than the available memory of 800MB, indicating sufficient resources.
[0129] (vi) Analysis of discarded features In the process of optimizing the knapsack problem, typical features that are discarded include: Feature f2 (Convective Effective Potential Energy CAPE): Dynamic importance is 0.0609, computational workload is 120 CWU, cost-effectiveness η=0.000507. It was not selected due to its excessive computational workload. Although the feature has a decent basic importance, the long forecast lead time of the model data block it relies on results in a low state adjustment function value, significantly suppressing its dynamic importance. Under the constraint of high computational cost, it was discarded by the optimization algorithm.
[0130] Feature f6 (satellite cloud texture uniformity): The dynamic importance is 0.0370, and the computational workload is 95 CWU. The dynamic importance is low and the computational workload is high, resulting in insufficient cost-effectiveness and failing to reach the optimal solution.
[0131] Feature f 200 (Upper-level westerly index): Its dynamic importance is only 0.0043. Although the calculation workload is low (10 CWU), its contribution to the heavy precipitation forecast is extremely limited. It was discarded due to its low dynamic importance.
[0132] The remaining 264 features, all with a dynamic importance not exceeding 0.035, cover various physical quantity features derived from model data (such as various stability indices, vertical velocity, vorticity, etc.) and some satellite-derived features. Due to their generally low dynamic importance or insufficient cost-effectiveness, these features were not selected by the knapsack optimization. The unselected features will be skipped in this feature extraction cycle, and their computational resources will be released to ensure the execution of the selected features.
[0133] (vii) Output of the final feature subset Finally, the feature subset F extracted in this study... selected for:
[0134] There are a total of 7 features, of which f3 and f9 are the minimum guaranteed features, and the remaining 5 features were selected through knapsack optimization. This feature subset is much smaller than the 276 features in the full feature library, but it retains the feature combinations that have the highest dynamic importance and are most valuable for heavy precipitation forecasting under the current data conditions.
[0135] F selectedThe features in the dataset are organized into a feature extraction task list according to their dependencies. Each task entry includes: feature identifier, computation operator entry, input data source reference, estimated computation workload, and memory usage.
[0136] In one embodiment of the present invention, based on step S4, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0137] S401. Generation of Dependency Graph Receive the feature subset F output from step S302 selected = {f1, f3, f4, f5, f7, f8, f9} and their corresponding feature extraction task list. This step is performed by the dependency graph resolver of the parallel feature extraction and scheduling execution module, which processes F... selected The computational operators corresponding to each feature and their data dependencies are analyzed to generate a dependency graph DG=(V,E).
[0138] (a) Analysis of computation operators Dependency graph resolver traverses F selected Each feature f in j The calculation operator definition corresponding to the feature is read from the feature library. In this embodiment, the calculation operators for each feature are as follows: Feature f1 (maximum radar combined reflectivity): Operator Op1 includes five sub-operations: data loading, data quality control, three-dimensional grid traversal, vertical maximum value extraction, and regional maximum value statistics.
[0139] Feature f3 (850hPa and 500hPa temperature difference): Operator Op3 includes four sub-operations: data loading, isobaric surface extraction (850hPa and 500hPa), regional average temperature calculation, and temperature difference calculation.
[0140] Feature f4 (water vapor flux divergence): Operator Op4 includes data loading, extraction of multiple isobaric surfaces (including temperature, humidity, and wind field), and calculation of horizontal partial derivatives. / x、 / The four sub-operations are y), divergence synthesis, and y.
[0141] Feature f5 (cold cloud cover area in satellite cloud image): Operator Op5 includes five sub-operations: data loading, radiometric calibration, threshold judgment (brightness temperature below -52℃), grid counting, and area percentage calculation.
[0142] Feature f7 (radar echo top height): Operator Op7 includes five sub-operations: data loading, data quality control, vertical profile analysis, reflectivity threshold interpolation, and echo top height calculation.
[0143] Feature f8 (strong echo area): Operator Op8 includes five sub-operations: data loading, data quality control, threshold judgment (reflectivity ≥ 40dBZ), grid counting, and area ratio calculation.
[0144] Feature f9 (850hPa geopotential height): Operator Op9 includes three sub-operations: data loading, isobaric surface extraction (850hPa), and calculation of the regional average geopotential height.
[0145] (II) Identification of data dependencies and construction of graphs The parser identifies the source data object that each computation operator depends on: Op1, Op7, and Op8 all depend on source data block D1 (radar volume scan data). Op5 depends on source data block D2 (satellite infrared brightness temperature data); Op3, Op4, and Op9 all depend on source data block D3 (pattern grid data).
[0146] Based on the above analysis results, the parser constructs a directed graph DG=(V,E). The graph contains three types of nodes: source nodes (D1, D2, D3), shared cache nodes (C1, C2, C3), and compute nodes (Op1, Op3, Op4, Op5, Op7, Op8, Op9). Directed edges E represent data flow relationships. In this embodiment, the dependency graph consists of three independent tree subgraphs, with no data dependencies between them, thus enabling fully parallel execution.
[0147] S402. Insertion of Shared Cache Mechanism Based on the dependency graph (DG), the scheduler identifies computational tasks with multiple features that have the same source data block dependency and assigns these tasks to the same execution node. The source data block is loaded and decoded only once, and the results are stored in a shared cache for the computational tasks with multiple features to read.
[0148] (a) Insertion of shared cache nodes The scheduler counts the number of times each source data block is referenced: D1 is referenced by three operators, Op1, Op7, and Op8; D2 is referenced by one operator, Op5; and D3 is referenced by three operators, Op3, Op4, and Op9. For source data blocks D1 and D3 with a reference count greater than 1, the scheduler inserts shared cache nodes C1 and C3 into the dependency graph.
[0149] Taking radar source data block D1 as an example, the execution flow is as follows: The scheduler assigns the three computation tasks Op1, Op7, and Op8 to the same computation node. The execution engine first schedules the task on the shared cache node C1, reads the NetCDF file of the radar volume scan data (approximately 150MB in size) from the storage system, performs data decoding, converts the binary data into a floating-point three-dimensional array (800×800×9 grid points, approximately 23MB of memory usage), and performs grid remapping. After the above process is completed, the decoded three-dimensional array is stored in the memory pool with the key "D1_20260630_0600".
[0150] Subsequently, the scheduler schedules the computation tasks Op1, Op7, and Op8 in parallel. Each of the three tasks reads the same 3D array data from the memory pool via a key and performs its own subsequent feature extraction computation. When reading data from the memory pool, the three tasks only increment the reference count, without incurring additional data copying overhead. Similarly, the three operators Op3, Op4, and Op9 of the pattern data block D3 share the loading and decoding results of C3.
[0151] For source data block D2, which has a reference count of only 1, there is no need to insert a shared cache node; its loading and decoding results are directly passed to Op5.
[0152] (II) The effect of shared caching Without a shared cache mechanism, Op1, Op7, and Op8 each independently load and decode radar data, requiring three I / O operations, resulting in a total read volume of 450MB and a decoding computation of 45 CWU. With a shared cache, I / O and decoding are performed only once, reducing the total read volume to 150MB and the decoding computation to 15 CWU, saving approximately 67% of I / O bandwidth and decoding computation. Mode branches achieve similar savings.
[0153] S403. Parallel execution of dependency-free tasks (a) Parallel execution strategy The scheduler allocates feature computation tasks with no data dependencies to different execution nodes for parallel execution based on the dependency graph (DG). In this embodiment, the system is configured with 8 general-purpose CPU cores and 1 GPU accelerator card.
[0154] The scheduling strategy is as follows: First, the loading tasks of the three source data blocks are executed in parallel. After each source data block is loaded, the computation tasks within each branch are further parallelized: Radar Branch: After C1 is loaded, the three computational tasks Op1, Op7, and Op8 execute in parallel, each occupying one of the three CPU cores. All three tasks access the data in the shared cache in read-only mode, and there are no write conflicts.
[0155] Mode Branch: After C3 is loaded, Op4 is identified as a computationally intensive task (horizontal partial derivative calculation) and is assigned to the GPU accelerator card for execution; Op3 and Op9 are lightweight computational tasks and are assigned to the remaining CPU cores for parallel execution.
[0156] Satellite branch: Op5 is a lightweight post-processing task, assigned to a general-purpose CPU core for execution.
[0157] (II) Execution sequence and effects The execution timeline for the entire feature subset is as follows: 0-8ms phase: The loading and decoding of the three source data blocks are executed in parallel on three CPU cores (D1 approximately 15 CWU, D2 approximately 12 CWU, D3 approximately 8 CWU, the time measured in CWU is approximately 5-8ms in wall clock terms). After loading is complete, the decoding results of D1 and D3 are stored in the shared caches C1 and C3, respectively.
[0158] 8-28ms phase: The computational tasks of each branch are executed in parallel. Op1 (45 CWU, about 18ms), Op7 (70 CWU, about 28ms), and Op8 (20 CWU, about 8ms) are executed in parallel on three CPU cores; Op4 (80 CWU, about 6ms after parallelization on the GPU) is executed on the GPU; Op5 (30 CWU, about 12ms), Op3 (15 CWU, about 6ms), and Op9 (20 CWU, about 8ms) are executed in parallel on the remaining CPU cores.
[0159] Ultimately, the computation tasks for all seven features were completed within approximately 30ms (including loading and computation time), far below the 80ms latency budget. If all tasks had been executed serially without a parallel scheduling strategy (total computation workload 280 CWU / single core ≈ 112ms), the latency budget would have been exceeded by approximately 40%. Through the combined efforts of shared cache and parallel scheduling, the number of system I / O operations was reduced from 12 to 3, the data decoding computation workload was reduced from 45 CWU to 15 CWU, 6 out of 8 computation cores were fully utilized, and the overall resource utilization rate reached over 75%.
[0160] After the above scheduling and execution are completed, the output results of each feature calculation task are aggregated into the feature matrix assembler, organized into a structured feature matrix X_feature in a predetermined column order, and then subjected to Z-score standardization processing before being finally output to the downstream machine learning prediction model.
[0161] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the present invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should also be covered within the protection scope of the present invention.
Claims
1. A method for extracting meteorological features based on data status, characterized in that, include: Access a real-time multi-source meteorological data stream, and calculate a state vector for each data block in the data stream. The state vector includes at least data quality dimension indicators, data physical dimension indicators, and data value dimension indicators. Based on the current prediction task, candidate features and the basic importance weight of each candidate feature are determined from the candidate feature library; The basic importance weights are adjusted based on the state vector of the data block on which each candidate feature depends, to obtain the dynamic importance of each candidate feature. Obtain the system's current available computing resources, and with the goal of maximizing the sum of the dynamic importance of the selected features without exceeding the available computing resources, construct and solve a resource-constrained optimization problem to obtain the feature subset extracted in this instance. Based on the feature subset, the feature extraction task of the data stream is executed in parallel, and the extracted features are organized into a feature matrix and output.
2. The method according to claim 1, characterized in that, Access to real-time multi-source meteorological data streams, including: Access at least two of the following: satellite brightness temperature data, radar reflectivity and radial wind data, gridded field data from numerical weather prediction models, and data from ground and upper-air observation stations.
3. The method according to claim 1, characterized in that, Calculate a state vector for each data block in the data stream, including: The multi-source meteorological data stream is segmented according to the data source type and data acquisition time window, and the data from the same data source within a preset time window is divided into a data block. Calculate the state vector for each data block, wherein the state vector contains at least the following dimensions: Data quality dimensions include data completeness rate and data reliability. The data completeness rate is the ratio of valid observation points to total grid points, and the data reliability is jointly assessed by equipment status logs, historical deviation statistics, and climate extreme value checks. The physical dimension indicators of the data include the spatiotemporal representativeness intensity and the physical anomaly index. The spatiotemporal representativeness intensity is determined for observational data based on the observation network density and time decay factor, and for model data based on the horizontal resolution and forecast lead time. The physical anomaly index is the standardized absolute value of the deviation between the current field and the mean climate field of the same period. Data value dimension indicators include task relevance, which is obtained by looking up the task-data source relevance mapping table or by calculating mutual information based on historical samples and normalizing it.
4. The method according to claim 1, characterized in that, Based on the current prediction task, candidate features and their basic importance weights are determined from the candidate feature library, including: For the current prediction task, a basic importance weight is calculated for each candidate feature in the candidate feature library using an offline-trained feature importance evaluation model; the feature importance evaluation model is pre-trained using historical meteorological data as training samples and the success or failure of the prediction task as the training objective; The candidate feature library contains multiple predefined feature extraction operators, each of which corresponds to a method for calculating a meteorological feature. The feature importance evaluation model is a gradient boosting tree-based model, and the basic importance weights are the Shapley values of each feature output by the model.
5. The method according to claim 1, characterized in that, Based on the state vector of the data block to which each candidate feature depends, the basic importance weights are adjusted to obtain the dynamic importance of each candidate feature, including: Obtain the state vector of the data block on which each candidate feature depends, and calculate the state adjustment function value based on the state vector. The state adjustment function value increases with the increase of the data quality dimension index and the data value dimension index, and decreases with the increase of the physical anomaly index in the data physical dimension index. The dynamic importance of the candidate feature is obtained by multiplying the basic importance weight by the state adjustment function value.
6. The method according to claim 5, characterized in that, When the data integrity rate of the data block on which the candidate feature depends is lower than a preset threshold, the state adjustment function value is set to zero, and all candidate features that depend on the data block are forcibly disabled.
7. The method according to claim 1, characterized in that, The system's currently available computing resources are obtained. With the objective of maximizing the sum of the dynamic importance of the selected features without exceeding these available resources, a resource-constrained optimization problem is constructed and solved to obtain the extracted feature subset, including: A resource cost profile is pre-built for each candidate feature, and the resource cost profile includes at least the computational workload consumed and the exclusive memory usage when the candidate feature is executed. The knapsack optimization problem is constructed with the optimization objective of maximizing the sum of the total dynamic importance of the selected features, and the constraints that the total computational workload of the selected features does not exceed the available computational workload budget of the current system and the total memory usage of the selected features does not exceed the available memory of the current system. Solve the knapsack optimization problem, and use the selected candidate features from the solution results as the feature subset extracted this time.
8. The method according to claim 7, characterized in that, The resource cost profile also includes the source data block to which each candidate feature depends; when multiple candidate features of the same source data block are selected at the same time, the loading and decoding overhead of the source data block is only counted once, and the total memory usage is the sum of the basic loading overhead of each selected source data block and the exclusive memory usage of each selected candidate feature.
9. The method according to claim 7, characterized in that, When solving the knapsack optimization problem, if the number of candidate features does not exceed a preset threshold, a dynamic programming algorithm is used to solve the problem; if the number of candidate features exceeds the preset threshold, a greedy algorithm is used to select each candidate feature in descending order of its dynamic importance and computational workload, and the selection results are fine-tuned by local swapping.
10. The method according to claim 1, characterized in that, Based on the feature subset, a feature extraction task for the data stream is performed in parallel, including: Analyze the computational operators and data dependencies corresponding to each feature in the feature subset to generate a dependency graph; According to the dependency graph, computation tasks of multiple features with the same source data block dependency are assigned to the same execution node. The source data block is loaded and decoded only once, and the loading and decoding results are stored in a shared cache for the computation tasks of the multiple features to read. Computational tasks with features that do not have data dependencies are distributed to different execution nodes for parallel execution.
