A method and device for forecasting high wind events at a single site
By using the differential characteristics of convolutional neural network model and high-resolution numerical forecast data, the process of forecasting of strong wind events is simplified, the problems of inaccurate forecasting of strong wind events and model complexity in the existing technology are solved, and prediction accuracy and application efficiency are improved. .
Patent Information
- Application Number
- CN202410453658.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-04-16
AI Technical Summary
In the forecast of strong wind events, the prior art pursues the accuracy of wind speed forecasting and ignores the accuracy of low-probability high wind events, resulting in inaccurate forecasting of strong wind events, and the model structure is complex and the training cost is high, making it difficult to widely use in business applications.
The single-site ground wind event forecast method is used to obtain the high-resolution numerical forecast data of the region, extract variable information and preprocess it, and use the trained convolutional neural network model to predict the wind event. The specific steps include obtaining the forecast time and the nearest Data difference in non-wind moments is used to predict binary classification using the 750hPa isobaric surface potential height image features to simplify the model structure to reduce the amount of training data and calculation requirements.
It improves the prediction accuracy of strong wind events, avoids the error problems caused by wind speed forecasting, simplifies the model structure, reduces training costs and data requirements, and realizes efficient forecasting of strong wind events under small sample data.
Smart Images

Figure CN118364283B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of weather forecasting, and in particular to a single-site ground gale event forecasting method and a single-site ground gale event forecasting device. Background Art
[0002] In the field of weather forecasting, wind speed is an important forecast variable. Among them, winds of level 6 and above (>10m / s) on the ground are defined as strong winds. Accurately forecasting strong wind events is of great value, which is reflected in the following aspects: (1) ensuring transportation safety, (2) protecting farmland and agricultural equipment, (3) protecting buildings and infrastructure, (4) facilitating the layout of wind power generation equipment and improving equipment efficiency, (5) ensuring human safety and health, (6) ensuring the safety of major ground engineering activities (such as high-altitude operations), and (7) promoting theoretical research in meteorology.
[0003] Therefore, in actual production and life, it is very important to be able to directly and accurately forecast strong wind events. At present, the forecast of strong wind events generally adopts the technical solution of "first forecasting wind speed, and then selecting winds of level 6 and above according to the wind speed threshold of level 6 wind". The main development trend is to continuously optimize the wind speed forecast method and improve the wind speed forecast accuracy. This solution has its inherent defects, that is: the goal of optimizing the wind speed forecast model is to improve the forecast accuracy of the average wind speed, and strong winds specifically refer to winds of level 6 and above, which are low-probability events (no more than 10%); from the perspective of statistical modeling, the change law of the average value of the whole sample is usually different from the change law of the low-probability events (samples) therein, so improving the average wind speed forecast accuracy does not necessarily improve the low-probability strong wind forecast accuracy. Therefore, blindly pursuing the improvement of the average wind speed forecast accuracy is not equivalent to improving the forecast accuracy of strong wind events, which is also the inherent defect of the current mainstream technical solution.
[0004] The existing technical solutions can be summarized as: "First forecast the wind speed, and then select the wind speed of level 6 and above according to the wind speed threshold of level 6 wind (>10m / s). According to the differences in wind speed forecasting technology paths, the existing technical solutions can be summarized into three categories:
[0005] Solution 1: A time series wind speed forecast model with time as the only variable. This solution builds a time series model of wind speed changes based on the characteristics of wind speed changes over time. Wind speed is essentially the speed of atmospheric movement. The atmosphere is a fluid with good compressibility and has all the characteristics of a fluid, including the highly autocorrelated characteristics of the movement speed determined by the continuity of movement. Therefore, by building a time series model of wind speed changes, using the short-term memory of the wind field in the time dimension, and using time t as a bridge, a mathematical mapping relationship between the wind speed at the next moment and the previous moments is established, and the wind speed at the next moment can be predicted using the previous wind speed, thereby achieving the purpose of short-term forecasting of wind speed. Among them, the more widely used time series models include autoregression models (AR models) and long short-term memory networks (LSTMs). The advantages of this type of model are that the structure is relatively simple, easy to train, requires less data, and has high forecast accuracy in the short term.
[0006] Solution 2: A wind speed correction forecast model based on numerical weather forecast results. This solution uses the results of numerical weather forecasts. On the basis of analyzing the error results of wind speed numerical forecasts, it uses statistical modeling techniques to establish a mapping relationship between numerical forecast results and true wind speeds, and corrects the numerical forecast wind speed. Some input variables of the correction model also take into account numerical forecast temperature, humidity, disturbance potential and other meteorological variables. The advantage of this method is that it uses real-time numerical forecast results to make up for the lag defect of the forecast results of the time series model. At the same time, it does not rely on the short-term memory of the wind speed time series, so the requirements for the continuity of the training data time series are not high, and the forecast will not be suspended due to the loss of observation data.
[0007] Solution 3: A hybrid wind speed prediction model that combines time series and numerical forecasts. This solution mainly combines the forecast results of the time series model with the numerical forecast results, and corrects them to obtain the wind speed forecast results. The MA-CNN-BiLSTM model is a representative of this method. This model uses a multi-head attention mechanism and a convolutional neural network to extract the atmospheric temperature, humidity, etc. from the WRF or ECMWF numerical forecast, and then uses a bidirectional long short-term memory network to extract the laws of the wind speed time series. Since this method takes into account both the characteristics of atmospheric physical quantities and the laws of wind speed time series, the lag defects of the time series model are corrected to a certain extent, and the effective duration of the time series extrapolation is extended, and the forecast accuracy is improved.
[0008] The above three mainstream technical solutions can be summarized as: "First forecast the wind speed, and then select the wind speed of level 6 and above according to the wind speed threshold of level 6 wind (>10m / s). The goal is to improve the accuracy of wind speed forecast, but each solution has certain defects. As follows:
[0009] The time series model of Scheme 1 has certain advantages in short-term wind speed forecasting. It can use the atmospheric dynamic delay characteristics "hidden" in historical data to carry out short-term (1-2 hours) wind speed forecasting. However, there is a certain lag in the forecast of the time series model, because it only makes forecasts based on the single variable of time, and the wind speed predicted for the next time is highly correlated with the current wind speed. Therefore, this model is generally suitable for short-term forecasts and it is difficult to accurately forecast wind speed for a long period of time in the future. In addition, this scheme has high requirements for data quality. Once problems such as missing data or time confusion occur, the forecast will be terminated, resulting in a situation where users have no forecast results available. In the business operation system, due to irresistible factors such as instrument failure, unstable power supply, and bad weather, the wind speed time series is inevitably interrupted, so this scheme is difficult to support the business forecasting system alone.
[0010] Scheme 2 uses statistical correction to forecast wind speed based on numerically predicted wind speed and other related variables (temperature, geopotential height). However, the near-surface wind speed forecast, which is closely related to human production and life, is controlled by the upper free atmospheric wind field on the one hand, and is also deeply affected by ground friction on the other hand. In particular, the spatial heterogeneity of ground friction characteristics is extremely large, and the numerical weather forecast model has a low ability to simulate the spatial heterogeneity of the land surface, which leads to large errors in the numerical forecast results of ground wind speed, and the temporal and spatial variation law is relatively chaotic. It is difficult to obtain a more ideal correction effect by making corrections on this basis. In practice, in order to obtain a more ideal correction effect, it is usually necessary to fully consider the changes in the errors of numerical forecast results with factors such as day and night, season, and weather background, and establish various models. Therefore, this scheme requires a lot of manpower, computing power, and time to establish the correction model, and it also requires continuous updating of the correction model, which causes great consumption of manpower and computing power resources for users.
[0011] Solution 3 combines the time series model and numerical forecast results for correction, thereby obtaining the wind speed forecast result. However, this model structure is relatively complex, which will also lead to high training costs, and the generalization of customer business scenarios in actual product applications is poor. At the same time, although this solution makes up for the "lag" defect of time series forecasting to a certain extent, it does not fundamentally solve the "lag" problem of time series extrapolation. Once the fitting on the long time series is inaccurate, it will drag down the forecast accuracy of the entire model.
[0012] In addition, the models of the above schemes have not changed the fundamental forecasting logic, that is, the wind speed is first forecasted and then the strong wind events are forecasted based on the wind speed threshold (>10m / s). This will lead to an excessive pursuit of a smaller error in the overall wind speed forecast during model training, while ignoring the forecast accuracy of strong wind events with a relatively low proportion. Because even if the error of the overall wind speed forecast is small, since strong wind events are low-probability events (no more than 10%), it may also lead to inaccurate forecasts of strong wind events. Therefore, the existing technical solutions all have certain limitations.
[0013] Therefore, it is desired to have a technical solution to overcome or at least alleviate at least one of the above-mentioned defects of the prior art. Summary of the invention
[0014] The object of the present invention is to provide a single-site ground gale event forecasting method to overcome or at least alleviate at least one of the above-mentioned defects of the prior art.
[0015] One aspect of the present invention provides a single-site ground gale event forecasting method, the single-site ground gale event forecasting method comprising:
[0016] Obtain regional high-resolution numerical forecast data;
[0017] Extracting variable information from regional high-resolution numerical forecast data and preprocessing the variable information to obtain model input data; wherein the variable information does not include wind speed information;
[0018] Get the trained convolutional neural network model;
[0019] The model input data is input into a trained convolutional neural network model to perform single-site gale event forecasting.
[0020] Optionally, extracting variable information from regional high-resolution numerical forecast data and preprocessing the variable information to obtain model input data includes:
[0021] Get forecast time;
[0022] Obtain the non-strong wind time closest to the forecast time based on the measured data at the site;
[0023] Obtain the moment before the non-strong wind moment and the moment after the non-strong wind moment according to the regional high-resolution numerical forecast data;
[0024] Obtaining the moment before the forecast moment and the moment after the forecast moment according to the regional high-resolution numerical forecast data;
[0025] According to the regional high-resolution numerical forecast data, the geopotential height and air pressure at the forecast time, the geopotential height and air pressure at the non-strong wind time, the geopotential height and air pressure at the moment before the non-strong wind time, the geopotential height and air pressure at the moment after the non-strong wind time, the geopotential height and air pressure at the moment before the forecast time, and the geopotential height and air pressure at the moment after the forecast time are obtained respectively;
[0026] According to the geopotential height and air pressure at the previous moment of the non-strong wind moment, a geopotential height image of the 750hPa isobaric surface at the previous moment of the non-strong wind moment is obtained;
[0027] According to the geopotential height and air pressure at the moment after the non-strong wind moment, a geopotential height image of the 750hPa isobaric surface at the moment after the non-strong wind moment is obtained;
[0028] According to the geopotential height and air pressure at the moment before the forecast time, a geopotential height image of the 750hPa isobaric surface at the moment before the forecast time is obtained;
[0029] Obtaining a 750hPa isobaric surface geopotential height image at a moment after the forecast time according to the geopotential height and air pressure at a moment after the forecast time;
[0030] Obtaining a first potential height average value image according to the potential height of the 750 hPa isobaric surface at a moment before the forecast time and the potential height at a moment after the forecast time;
[0031] Acquire a second potential height average value image according to the potential height of the 750 hPa isobaric surface at a moment before the non-strong wind moment and the potential height at a moment after the non-strong wind moment;
[0032] Obtaining the difference between the second potential height average value image and the first potential height average value image as the third potential height average value image;
[0033] The image features are obtained based on the third potential height average value image.
[0034] Optionally, inputting the model input data into a trained convolutional neural network model to perform single-site gale event forecasting includes:
[0035] Inputting the image features into a trained convolutional neural network model to obtain output probabilities;
[0036] Determine whether the output probability exceeds a preset threshold, and if so, determine that a strong wind event will occur.
[0037] Optionally, the convolutional neural network model is a CNN model in eval mode, and the CNN model includes 3 convolutional layers, 1 fully connected layer and a Tanu startup function.
[0038] Optionally, the convolution kernel size of each CNN layer is 5*5, the translation step of the convolution kernel on the image is set to 3, the image edge is filled with 0, and the filling value is set to 2.
[0039] Optionally, the convolutional neural network model is trained using the following method:
[0040] Obtain a total data set, where the total data set is a continuous time series with a sampling interval of 30 minutes;
[0041] Resample the training data to obtain balanced training data;
[0042] Divide the total dataset into training data and test set;
[0043] Training the convolutional neural network model using the training data;
[0044] The trained convolutional neural network model is tested using the test set.
[0045] Optionally, the number of the test sets is 4.
[0046] Optionally, the convolutional neural network model is trained using the following method further comprising:
[0047] Each test set data is input into the model, and the model is trained and tested for accuracy five times. Finally, the average value of the five cross-validation results is taken as the model accuracy evaluation result.
[0048] The present application also provides a single-site ground gale event forecasting device, the single-site ground gale event forecasting device comprising:
[0049] A regional high-resolution numerical forecast data acquisition module, wherein the regional high-resolution numerical forecast data acquisition module is used to acquire regional high-resolution numerical forecast data;
[0050] A variable information extraction module, wherein the variable information extraction module is used to extract variable information from regional high-resolution numerical forecast data;
[0051] A model input data acquisition module, wherein the model input data acquisition module is used to preprocess the variable information to obtain model input data;
[0052] A convolutional neural network model acquisition module, wherein the convolutional neural network model acquisition module is used to acquire a trained convolutional neural network model;
[0053] A single-site gale event forecasting module, wherein the single-site gale event forecasting module is used to input the model input data into a trained convolutional neural network model, thereby forecasting a single-site gale event.
[0054] Beneficial effects:
[0055] The single-site ground gale event forecasting method of the present application uses the probability of gale events as the model output object, and then determines whether there is a gale event based on the gale event probability. Because the present invention does not predict the specific wind speed, it no longer involves comparing the average error of the overall time series, avoiding the problems caused by direct wind speed forecasting, thereby improving the prediction accuracy of gale events. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 A schematic flow chart of a single-site ground gale event forecasting method according to an embodiment of the present application.
[0057] Figure 2 An electronic device used to implement Figure 1 The single-site surface gale event forecasting method is shown.
[0058] Figure 3 It is a schematic diagram of the regional high-resolution numerical forecast data acquisition process of a single-site ground gale event forecasting method according to an embodiment of the present application.
[0059] Figure 4 is the single-site ground gale event forecasting method of an embodiment of the present application. 0 ,t 1 Schematic diagram of time relationship.
[0060] Figure 5 It is a schematic diagram of the internal estimation process of the convolutional neural network of the single-site ground gale event forecasting method according to an embodiment of the present application.
[0061] Figure 6 It is a schematic diagram of the convolutional neural network training process of a single-site ground gale event forecasting method according to an embodiment of the present application.
[0062] Figure 7 It is a schematic diagram of the internal parameter training process of the gale event binary classification model of the single-site ground gale event forecasting method of an embodiment of the present application.
[0063] Figure 8 It is a schematic diagram of the neural network model structure of a single-site ground gale event forecasting method according to an embodiment of the present application. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical scheme and advantages of the implementation of this application clearer, the technical scheme in the embodiment of this application will be described in more detail below in conjunction with the drawings in the embodiment of this application. In the drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of this application, not all of them. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain this application, and should not be construed as limitations on this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. The embodiments of this application are described in detail below in conjunction with the drawings.
[0065] It should be noted that, in the description of the present invention, the terms “first” and “second” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0066] Figure 1 A schematic flow chart of a single-site ground gale event forecasting method according to an embodiment of the present application.
[0067] like Figure 1 The single-site surface gale event forecasting method shown includes:
[0068] Step 1: Obtain regional high-resolution numerical forecast data;
[0069] Step 2: extracting variable information from regional high-resolution numerical forecast data, wherein the variable information does not include wind speed information;
[0070] Step 3: extracting variable information from regional high-resolution numerical forecast data and preprocessing the variable information to obtain model input data;
[0071] Step 4: Input the model input data into the trained convolutional neural network model to perform single-site gale event forecasting.
[0072] The single-site ground gale event forecasting method of the present application uses the probability of gale events as the model output object, and then determines whether there is a gale event based on the gale event probability. Because the present invention no longer predicts the specific wind speed, and no longer involves comparing the average error of the overall time series, it avoids the problems caused by direct wind speed forecasting, thereby improving the prediction accuracy of gale events.
[0073] In this embodiment, extracting variable information from regional high-resolution numerical forecast data and preprocessing the variable information to obtain model input data includes:
[0074] Get the forecast time (t1);
[0075] Obtain the non-strong wind time (t0) closest to the forecast time based on the measured data at the site;
[0076] Obtain the moment before (t00) and the moment after (t01) of the non-strong wind moment (t0) based on the regional high-resolution numerical forecast data;
[0077] Obtaining a time before (t10) and a time after (t11) the forecast time (t1) according to regional high-resolution numerical forecast data;
[0078] According to the regional high-resolution numerical forecast data, the geopotential height and air pressure at the forecast time (t1), the geopotential height and air pressure at the non-strong wind time (t0), the geopotential height and air pressure at the moment before the non-strong wind time (t00), the geopotential height and air pressure at the moment after the non-strong wind time (t01), the geopotential height and air pressure at the moment before the forecast time (t10), and the geopotential height and air pressure at the moment after the forecast time (t11);
[0079] According to the potential height and air pressure at the forecast time (t1), the potential height image of the 750hPa isobaric surface at the forecast time is obtained;
[0080] According to the geopotential height and air pressure at the non-strong wind time (t0), the geopotential height image of the 750hPa isobaric surface at the non-strong wind time is obtained;
[0081] According to the geopotential height and air pressure at the moment before the non-strong wind moment (t00), the geopotential height image of the 750hPa isobaric surface at the moment before the non-strong wind moment is obtained;
[0082] According to the geopotential height and air pressure at the moment after the non-strong wind moment (t01), a geopotential height image of the 750hPa isobaric surface at the moment after the non-strong wind moment is obtained;
[0083] Obtaining a geopotential height image of the 750 hPa isobaric surface at the moment before the forecast time (t10) based on the geopotential height and air pressure at the moment before the forecast time (t10);
[0084] Obtaining a 750 hPa isobaric surface geopotential height image at a moment (t11) after the forecast time according to the geopotential height at a moment (t10) after the forecast time and the 750 hPa isobaric surface of air pressure;
[0085] Obtaining a first potential height average value image based on the potential height of the 750 hPa isobaric surface at a moment (t10) before the forecast moment (t1) and the potential height at a moment (t11) after the forecast moment (t1);
[0086] Acquire a second potential height average value image according to the potential height of the 750 hPa isobaric surface at a moment before the non-strong wind moment (t00) and the potential height at a moment after the non-strong wind moment (t01);
[0087] Obtaining the difference between the second potential height average value image and the first potential height average value image as the third potential height average value image;
[0088] The image features are obtained based on the third potential height average value image.
[0089] In this embodiment, the step of inputting the model input data into a trained convolutional neural network model to perform a single-site gale event forecast includes:
[0090] Inputting the model input value into a trained convolutional neural network model to obtain an output probability;
[0091] Determine whether the output probability exceeds the preset threshold. If so,
[0092] It is judged that there will be a strong wind event.
[0093] In this embodiment, the convolutional neural network model is a CNN model in eval mode, and the CNN model includes 3 convolutional layers, 1 fully connected layer and a Tanu startup function.
[0094] In this embodiment, the convolution kernel size of each CNN layer is 5*5, the translation step of the convolution kernel on the image is set to 3, the image edge is filled with 0, and the filling value is set to 2.
[0095] In this embodiment, the convolutional neural network model is trained using the following method:
[0096] Obtain a total data set, where the total data set is a continuous time series with a sampling interval of 30 minutes;
[0097] Resample the training data to obtain balanced training data;
[0098] Divide the total dataset into training data and test set;
[0099] Training the convolutional neural network model using the training data;
[0100] The trained convolutional neural network model is tested using the test set.
[0101] In this embodiment, the number of the test sets is 4.
[0102] In this embodiment, the convolutional neural network model is trained using the following method further comprising:
[0103] Each test set data is input into the model, and the model is trained and tested for accuracy five times. Finally, the average value of the five cross-validation results is taken as the model accuracy evaluation result.
[0104] The present application is further described in detail below by way of examples. It should be understood that the examples do not constitute any limitation to the present application.
[0105] Step 1: Obtain regional high-resolution numerical forecast data;
[0106] In this embodiment, the regional high-resolution numerical forecast mainly consists of GFS forecast products and WRF models. The data flow is as follows: Figure 3 As shown. Among them, the GFS forecast product comes from the National Oceanic and Atmospheric Administration (NOAA) of the United States. It makes four forecasts a day, at 0:00, 6:00, 12:00 and 18:00 UTC time, each forecast time is 96 hours long, with a time interval of 1 hour. The spatial resolution of the forecast data product includes three spatial scales: 1°, 0.5° and 0.25°, including atmospheric temperature, humidity, wind (U, V and W), potential height of isobaric surface, as well as surface temperature and soil stratification humidity.
[0107] The regional basic geographic data required by WRF include altitude, slope, soil type, land use / cover type, etc. This solution uses the basic geographic data of the WRF model standard. In terms of regional settings, this solution adopts a three-level nested forecasting technology. The spatial resolution of the outermost area (domain02) is 9km, and its lateral boundary driving data uses the 0.25° GFS product; the spatial resolution of the middle layer area (domain02) is 3km, and the lateral boundary driving data uses the forecast results of domain01; the spatial resolution of the innermost layer (domain03) is 1km, and the lateral boundary driving data uses the forecast results of domain02.
[0108] WRF numerical forecast creates a folder named after the time at 0:00, 6:00, 12:00, and 18:00 every day, and stores the WRF numerical forecast results for the next 12 hours in the folder. The data format is NetCDF. In the scheme of the present invention, the convolutional neural network uses the forecast results of domain03, with a spatial resolution of 1km, a grid number of 161*170, and a data storage time interval of 10min.
[0109] Step 2: extract variable information from regional high-resolution numerical forecast data and preprocess the variable information to obtain model input data; wherein the variable information does not include wind speed information.
[0110] Specifically, the forecast time is recorded as t1. This scheme first searches for the non-strong wind time closest to time t1 in the historical observation wind speed time series, recorded as t0. Then, in the WRF forecast data time series, find the two time points before (the moment before the non-strong wind moment) and after (the moment after the non-strong wind moment), recorded as t11 and t10, and the two time points before and after t0 are recorded as t01 and t00. The relative relationship between the above moments is detailed in Figure 4 .
[0111] Extract the potential height and pressure (Sigma coordinates in the vertical direction) at t11 and t10, t01 and t00 from the WRF forecast data, and then calculate the potential height of the 750hPa isobaric surface at each time by linear interpolation in the vertical direction in combination with the ground altitude. On this basis, calculate the average value at t11 and t10, recorded as z1, and then calculate the average value at t01 and t00, recorded as z0. Finally, calculate the difference between z1 and z0, i.e. z1-z0, recorded as Δz, and finally cut off the edge of the Δz image (five grid points on all four sides) as the model input value.
[0112] Step 4: Input the model input data into the trained convolutional neural network model to perform single-site gale event forecasting.
[0113] In this embodiment, the single-site gale event forecast of this scheme adopts a convolutional neural network model (CNN model), which reads the difference (image) (Δz) between the 750hPa isobaric surface potential height output by WRF at the forecast time (t1) and the previous closest non-strong wind time (t0), outputs the probability (P) of strong wind occurring at the forecast time (t1), and finally uses P>0.5 as the judgment criterion for the occurrence of a strong wind event, and outputs whether a strong wind event occurs at time t1 (logical value).
[0114] This solution uses the python environment in the Linux server, and the function libraries called mainly include netCDF4, pandas, PyTorch, Numpy, etc. The model is set to run on the CPU (it can also be changed to the GPU as needed, because the actual environment may lack a GPU or the GPU model is outdated).
[0115] The CNN used in this solution is a supervised learning model. This solution relies on the PyTorch modeling environment and establishes models for two aspects: training and practical application. One is the train mode for training, and the other is the eval mode for practical application. The difference between the two is that the train model includes the Dropout module and the BatchNormalization module, while the eval mode does not include these two modules. Among them, the Dropout module is mainly used to improve the model recall rate and prevent overfitting. The BatchNormalization layer aims to solve the problems of internal covariate shift and gradient disappearance and accelerate the training of the model.
[0116] like Figure 5 As shown in the figure, the CNN model in the eval mode of this solution consists of: 3 convolutional layers, 1 fully connected layer, and Tanu startup function. Between the startup function and the convolutional layer, and before the input data enters the model, the normalization function is used to normalize the input data. The functions and main parameter settings of each component are briefly described as follows:
[0117] CNN layer: Extract spatial features from the incoming two-dimensional spatial matrix data of the potential height of the isobaric surface (i.e., Δz). In this solution, a total of three CNN layers are used for feature extraction. The setting parameters of each CNN layer are the same, and the number of input and output channels is 1. The kernel_size of the CNN layer convolution kernel is 5*5, the stride of the translation of the convolution kernel on the image is set to 3, and the image edge padding is selected to use 0 padding, and the padding value is set to 2 to prevent edge effects.
[0118] Tanu startup function: ensures that the function is differentiable everywhere to prevent the model from not converging.
[0119] Standardization: Standardize the input data, remove the dimension, and speed up the calculation accuracy and speed. The standardization formula is as follows: The coefficients all come from the results of Batch Normalization in the training phase (train mode).
[0120] Fully connected layer: The spatial distribution characteristic parameters of the 750hPa potential height extracted by CNN are used to predict the possibility of strong wind events.
[0121] Sigmoid function: Normalize the output value of the fully connected layer, calculate the probability of strong wind at time t1, and use P>0.5 as the criterion for determining whether a strong wind event occurs.
[0122] In this embodiment, the training mode in this solution, i.e., the train mode, adopts the Pytorch deep learning framework for modeling, uses python3 as the modeling language, and uses the NVIDIA Tesla A100 graphics card for training.
[0123] like Figure 7 As shown in the figure, the data preparation process includes the following steps:
[0124] (1) Preprocessing of wind speed data measured by ground meteorological stations
[0125] There are many problems in the original observation data of the meteorological station used in training, such as disordered time sequence, multiple wind speed values corresponding to one time, abnormal wind speed values, missing values, etc. Therefore, before model training, the time series is first sorted from front to back; then, for the case of multiple wind speed values corresponding to the same time, the average of all values is taken as the observation value at that time; then, the abnormal values in the observed time series are eliminated and set as missing values; finally, all missing values are linearly interpolated on the time series.
[0126] Because the wind speed measured by the weather station is instantaneous wind speed, it contains a certain degree of random noise. Therefore, this solution calculates the average wind speed every half hour through two-point sliding average and constructs a half-hour average wind speed time series. Based on the half-hour average wind speed data series, >10m / s is used as the judgment standard to identify strong wind events with a label value of 1, and the rest are non-strong wind events with a label value of 0.
[0127] After the above data processing, the wind speed observation data of the meteorological station constitutes a continuous time series with a sampling interval of 30 minutes. The series has a total of 5848 moments, of which 576 are strong wind event moments (wind speed>10m / s), accounting for 10% of the total.
[0128] In this embodiment, the WRF data extraction and preprocessing method is the same as the method in step 2, and will not be repeated here.
[0129] In this embodiment, the model training data set and the test data set are prepared using the following method:
[0130] The data volume ratio of strong wind moments and non-strong wind moments in this scheme is 1:9 (576:5272), and the training samples are not balanced. In order to improve the accuracy in training and solve the imbalance of classification samples, this scheme resamples the model training data in order to balance the samples, so resampling is required. First, in order to ensure that non-strong wind events are evenly distributed in the time series, one non-strong wind event (if any) is extracted from the window with every 4 hours as a window. Because the time interval is 30 minutes, a total of about 600 non-strong wind moments are extracted. After that, in order to balance the number of samples of non-strong wind events and strong wind events, 576 samples are randomly selected from the non-strong wind event set, so that the ratio of strong wind events and non-strong wind events in the training data set is 1:1 (576:576); then, the strong wind event set is evenly divided into 5 parts to facilitate the subsequent cross-validation.
[0131] In this embodiment, in order to better evaluate the performance of the model, the model is evaluated under different data sets. This solution uses the k-fold cross-validation method with K-Fold=5. This step extracts 1 data set from the 5 data sets divided in the previous step as the test set (230), and the remaining 4 data sets as the training set (about 922 in total), so that the number of test sets and training sets is 4:1, and there are 5 such combinations of test sets and training sets. Therefore, the model training process of this solution uses 5 different training sets for model training and accuracy testing.
[0132] This scheme uses the training set to train the CNN high wind event and non-high wind event binary classification model; after the model training is completed, the test set data is input into the model, and the model accuracy is evaluated based on the test set, using the recall rate and precision rate as the model accuracy indicators. After 5 model training and accuracy tests, the average of the 5 cross-validation results is finally used as the model accuracy evaluation result.
[0133] In this embodiment, the CNN model input parameters are obtained using the following method:
[0134] The parameter calibration of the CNN model includes two aspects: one is the external parameter setting, and the other is the internal parameter calibration. Among them, in terms of external parameter setting, this scheme presets 15 external parameters of the CNN model respectively, as shown in Table 1. According to the preset schemes of each parameter, 75 models were established through permutations and combinations, and then they were trained one by one to calibrate the internal parameters of each model, and the accuracy of each model was verified through the test set data. According to the performance of each model, the external parameter configuration scheme with the highest accuracy was selected, and the parameters are shown in Table 1 below.
[0135] Table 1 Model external parameter setting scheme and optimal configuration scheme
[0136]
[0137] In this embodiment, the train mode is enabled when training the convolutional neural network model. Compared with the eval mode, the train mode adds a Dropout layer and a BatchNormalization layer ( Figure 5-6 ). In theory, in order to speed up the convergence of the model, the input data needs to be input in batches. However, because the amount of training data itself is relatively small, the result is best if the data is not divided into batches. Therefore, all training data are finally put into the model for training in the same batch.
[0138] Dropout layer: This layer is between the fully connected layer and the Sigmoid function. Its purpose is to improve the recall rate of the model and prevent overfitting. The Dropout layer will force some of the strong wind events output by the fully connected layer to be modified to non-strong winds, artificially causing prediction errors. Therefore, in order to improve the prediction accuracy, the model will try to automatically improve the sensitivity to the 750hPa potential height field characteristics corresponding to strong wind events, and identify as many strong wind events as possible. The entire model trained in this way will maintain the forecast sensitivity to strong wind events, have a high forecast accuracy, and improve the recall rate of strong wind events. As mentioned above, the main function of the Dropout layer is to improve the model prediction accuracy by artificially introducing errors during the training process. This function of the Dropout layer will no longer be needed in the model application stage (eval mode), so the Dropout layer is no longer activated in the eval mode.
[0139] BatchNormalization layer: Batch Normalization is a commonly used technique in machine learning and deep learning training, which aims to solve the covariate shift and gradient vanishing problems within each batch and accelerate model training. When the data is not standardized, the calculated results may show a dispersed distribution, which may lead to problems such as activation function saturation. Since the data is trained in batches, we need to standardize the input data of each batch to ensure that the data entering the activation function is concentrated near the mean value to avoid the large difference between the data affecting the training results. During the training process, the standardization parameters within the batch will also be updated. Our goal is to ensure that the data in each batch is as close to the normal distribution as possible after processing, so that the data entering the activation function will be concentrated near the mean value, reducing the impact of data differences on the results. However, it is uncertain whether the standardized data conforms to the normal distribution, so we need to perform a linear scaling transformation, and the specific parameters are determined by the back propagation algorithm. In this scenario, "num_feature" is set to 1 because we only use one layer of 750hPa data, whose dimension is 1.
[0140] The internal parameters of the neural network model are determined by forward propagation of the model results and back propagation of updating the model parameters. These two steps are briefly introduced here.
[0141] The data is forward propagated. Figure 7 The order shown is the arrows from top to bottom in the figure. First, the training data enters the calculation and extracts features through the convolutional layer CNN as a filter. Then the extracted features are fitted into a real number through the fully connected layer (FC layer). The final result is converted into the probability of a strong wind event through the Sigmoid function, and this probability is output as the result and enters the loss function.
[0142] Backward Propagation: Figure 5-6 The order is from bottom to top in the figure. The arrows represent the back propagation process. First, the forward propagation probability of strong wind events and the actual probability of strong wind events are used to calculate the error between the forward propagation predicted value and the observed value through the cross entropy loss function. Then, according to the calculated error, the model finds the parameter gradient through back propagation, and updates the model parameters in the gradient direction and at the set learning rate. On this basis, in order to further accelerate the convergence speed of the model parameters, the Adam optimization algorithm is applied in the back propagation process. By introducing the concepts of first-order momentum and second-order momentum in the direction of gradient descent, the algorithm can find the fastest parameter convergence direction more quickly, so that the model continues to approach the true value.
[0143] After the model updates the model parameters through back propagation, the model calculates the results through forward propagation, calculates the loss function based on the results, and then uses back propagation to update the parameters, and the cycle continues. Among them, the learning rate of the back propagation model is set to 0.0001. After many cycles, the loss value remains stable in the region, which means that the model parameter optimization has also reached convergence, and the model has completed the training stage. This model requires at least 8,000 cycles to build, but the model performance will not improve after 10,000 cycles.
[0144] In this embodiment, the convolutional neural network model of the present application uses the following method to evaluate accuracy:
[0145] In order to evaluate the accuracy of the forecast results of this scheme, we compare the numerical forecast results of the mesoscale weather forecast model WRF and the time series autoregression (AR) wind speed forecast results with the accuracy of the forecast results of this scheme. Among them, the WRF forecast results are the input data of this scheme, so comparing with them will help to understand the ability of this scheme in improving the accuracy of numerical forecast results. The AR wind speed forecast model is a typical statistical model, and for short-term forecasts, the forecast accuracy of this model is relatively high. Comparison with the AR forecast accuracy will help to understand the prediction ability of this scheme.
[0146] 5.5.2 Selection of comparison indicators
[0147] Because the proportion of strong wind events in the sample is less than 10%, the overall wind speed accuracy cannot reflect the quality of strong wind event prediction. Therefore, two indicators are selected here to indicate the forecast accuracy, one is the precision rate of strong wind event prediction, and the other is the recall rate of strong wind events. Among them, the precision is the ratio of the actual number of predicted strong wind events to the total number of predicted strong wind events, and the recall rate of strong wind events is the ratio of the actual number of predicted strong wind events to the total number of strong wind events that actually occurred.
[0148] As can be seen from Table 2, the AR model has the highest accuracy, this solution is slightly lower, and the WRF forecast is the lowest. However, the recall rate of the forecast results of this model is significantly higher than the wind speed prediction of the AR model and WRF itself. It should be noted that although the AR model has a higher accuracy than this solution, its forecast time is only half an hour, while the forecast time of this solution is 12 hours, which is much longer than the AR model. Therefore, relative to the direct wind speed forecast of WRF, the forecast accuracy of the present invention is greatly improved; compared with the AR model, the forecast accuracy of the present invention is also improved to a certain extent, and the effective forecast time is significantly increased.
[0149] Table 2 Model accuracy evaluation
[0150]
[0151] In this embodiment, in actual application scenarios, the model can be coupled into the system backend, and the forecast weather station data and WRF data can be interconnected. First, the WRF numerical forecast of the area with the forecast point as the center point in the recent period and the future forecast time is obtained. The ground weather station at this location provides the non-strong wind event time closest to the forecast time as the initial value, and the WRF potential height forecast difference corresponding to the non-strong wind forecast time and the forecast time is extracted. The model accepts the difference to provide a forecast. The forecast can serve agriculture, construction, aerospace, transportation and other fields.
[0152] This application has the following advantages:
[0153] (1) Taking strong wind events as the forecast object, a classification forecast model was developed to avoid the error problem caused by wind speed forecast and achieve high-precision forecast of strong wind events.
[0154] The current mainstream technical idea for forecasting high wind events is: first predict the wind speed through the model, and then select the wind speed of level 6 and above (>10m / s) as a high wind event based on the wind speed threshold of level 6 wind. This type of technical solution first pursues high-precision wind speed forecasting to ensure that the forecast results are as close to the actual measured wind speed as possible. However, high wind events are low-probability events in the overall (accounting for no more than 10%). In the existing predictions, low-probability events account for a low proportion in the training of neural networks, so it is very likely that a certain high wind event will occur, but it cannot be predicted by the average wind speed prediction method.
[0155] Since the changing patterns of small probability events and the overall are different, a lower overall wind speed forecast error does not necessarily lead to a lower forecast error for strong wind events.
[0156] The present invention establishes a two-classification model of strong wind events and non-strong wind events, takes the probability of strong wind events as the model output object, and then determines whether there is a strong wind event based on the probability of strong wind events. Because the present invention does not predict the specific wind speed, it no longer involves comparing the average error of the overall time series, avoids the problems caused by direct wind speed forecasting, and thus improves the prediction accuracy of strong wind events.
[0157] (2) Developed a technique that uses the difference in 750 hPa geopotential height between the forecast time and the nearest non-strong wind time to eliminate the influence of the diurnal and seasonal changes inherent in meteorological elements.
[0158] The time series of wind speed has a trend of periodic changes, such as daily changes, monthly changes, seasonal changes, etc. Because these trends are unrelated to environmental variables, the periodic effects on these time series will interfere with the accuracy of the model's wind speed forecast. In the face of these periodic trends, previous models mainly applied two solutions:
[0159] Solution 1: Use wavelet analysis, regression and other methods to remove the corresponding periodic trends.
[0160] Option 2 is to retrain the new model every once in a while, such as once a month or once a quarter.
[0161] The premise of wavelet analysis regression used in Solution 1 is that there are more consecutive time period data, which has high requirements on the quality of training samples. In addition, wavelet analysis requires the selection of appropriate wavelet basis and frequency, which is a complicated process. In practical applications, the frequency of real-time updated data may be different from that encountered in training, such as different wavelet probabilities in different seasons, which reduces the accuracy of extraction and the general applicability of the model.
[0162] Solution 2 is to retrain the model at regular intervals without extracting time trends. For complex neural network models, retraining requires more training time, which is not convenient for customers to operate and apply.
[0163] In the present invention, the difference of the variables between the forecast time and the nearest wind-free time is used to remove the periodic trend in the wind speed, which can overcome the above problems. The principle of removing the trend of the time series by difference is briefly described below.
[0164] It is known that the components of wind speed in time conform to the additive principle:
[0165] Time-Series=trend+seasonality+noise;
[0166] In the wind speed time series measured by the weather station, Time-series is the wind speed data of the weather station, trend is the actual wind speed change trend, seasonality is the periodic factor, and noise is the noise.
[0167] Using the difference between the forecast time and the nearest non-strong wind time WRF numerical forecast results, we can get:
[0168] Time-Series t+h -Time-Series t =(trend t+h -trend t )+(periodic_trend t+h -periodic_trend t )+(noise t+h -noise t );
[0169] Because under normal circumstances, the time difference between the two sides is within 2-3 hours, so the daily, weekly and seasonal changes are not significant, so we can know:
[0170]
[0171] Because the periodic trends such as daily changes, weekly changes, and seasonal changes are eliminated, we can get:
[0172] Time-Series t+h -Time-Series t =(trend t+h -trend t )+(noise t+h -noise t );
[0173] From the difference results, it can be seen that the periodic changes are eliminated, and what remains is the superposition of the real changes in the data in the time series and the random errors. Because the probability distribution of random errors satisfies the Gaussian distribution, the difference of the independent variables calculated when the forecast time is a strong wind event and the difference of the independent variables calculated when the forecast time is a non-strong wind event will be significantly different. Using the difference in independent variables, a binary classification model for strong wind events can be established.
[0174] In the present invention, the method of removing time trend by difference has the following advantages:
[0175] (1) Model training has little reliance on the temporal continuity of data and only requires that the forecast time have data on the time without strong winds closest to the forecast time.
[0176] (2) Since periodic interference is automatically removed by differentiation, the present invention does not need to update the model according to different months and seasons, which is convenient for customers to use.
[0177] At present, the input of the ground-based gale event forecasting model based on convolutional neural network requires a large amount of data and a large number of atmospheric variables. However, in actual applications, users hope to use fewer variables, a small amount of sample data, and a simpler model structure to achieve the modeling and training of the gale event neural network classification model. This is because it can reduce the difficulty of data acquisition, reduce the cost of model training, and reduce the hardware requirements for computing.
[0178] In fact, the prediction of wind does not require too many atmospheric element variables. On the isobaric surface, there is often multicollinearity between variables such as temperature and potential height. Using such collinear variables to model will inevitably lead to errors. Therefore, at the beginning of the design of this model, only the WRF numerical forecast of the potential height forecast on the 750hPa isobaric surface in the forecast area centered on the forecast point was used as the input variable. On the one hand, as an upper atmospheric variable, it is less disturbed by the terrain. On the other hand, this data is directly related to the formation of wind. In order to effectively extract the potential height forecast on the 750hPa isobaric surface, this paper modifies the commonly used CNN neural network framework to meet the requirements of input data. Because the input variable is only the 750hPa isobaric surface potential height field, there is little feature redundancy, so the pooling layer is cancelled in this model. The data is extracted by three convolutional layers in the model. The model has extracted the main features, so there is only one input layer for the fully connected layer used for classification, and no hidden layer is used. The output results of the neurons in the fully connected layer are then passed through the Dropout layer, the purpose of which is to increase the sensitivity to the strong wind data and improve the recall rate by assigning some results to 0. The final result is then output to the Sigmoid function for normalization to obtain the probability of a strong wind event. A probability > 0.5 is considered a strong wind event. This solution makes full use of the data, prevents redundant training features, and simplifies the model structure, so that the model can only use the 750hPa isobaric surface potential height in the surrounding area of the forecast point from the WRF numerical forecast as input, 1,000 training samples, and the modeling process can be completed within 30 minutes, making a relatively accurate forecast of a single-point ground strong wind event. Because the model has this structural feature, the modeling process requires fewer physical variables, less training data, and less modeling time than the usual CNN model modeling, which meets the customer's requirements for simplifying the modeling process and has commercial potential, so an application is made to protect this structural feature.
[0179] See also Figure 8 However, this scheme attempts to model only the potential height field on the 750hPa isobaric surface. The image contains very few variables, so there is no need to process redundant data in the original scheme. Therefore, the model structure of the common scheme is improved. The model structure of this scheme is as follows Figure 8 The structure of this solution is described below:
[0180] (1) Use three convolutional layers with the same parameters (parameters are Conv2d (1,1,5, stride = 3, padding = 2), one input channel, one output channel, 5*5 convolution kernel, length is 3, edge padding width is 2) to extract features of the 750hPa isobaric surface potential height. The parameters of each convolutional layer in this structure are the same, which maintains the consistency of the model's feature extraction each time, and is also convenient for the selection of model hyperparameters, which is beneficial to model training. The superposition of three convolutional layers can effectively extract features from the image without generating too much redundant data. At the same time, the BatchNorm function is added between the outputs of each convolutional layer to normalize the intermediate results to accelerate training convergence and increase model robustness.
[0181] (2) The pooling layer commonly used in the CNN model is cancelled in this scheme. The essence of the pooling layer in CNN is to downsample the image after the convolution operation extracts features, reduce the image dimension and extract key features. Usually, there are many variables in the input of the CNN model, so it is necessary to rely on the pooling layer to delete some redundant data. However, this model only uses a layer of potential height data on the 750hPa isobaric surface, which has less redundant data and does not require a pooling layer to delete the redundancy. At the same time, the pooling layer will randomly discard some useful information during the compression sampling process. Canceling the pooling layer can also prevent the discarding of useful information and improve the accuracy of model prediction.
[0182] (3) The Dropout layer is set after the fully connected layer and before the Sigmoid function, instead of being set before the fully connected layer and after the convolutional layer like in the conventional neural network structure. The Dropout layer is essentially a regularization technique that can randomly set the output results of neurons in the neural network to 0. Usually, during the training of a convolutional neural network, the Dropout layer is placed after the convolutional layer and before the fully connected layer. It essentially randomly discards some of the extracted features to prevent overfitting and data redundancy. However, because the independent variable of the model is only the 750hPa isobaric surface potential height, the features extracted by the convolutional layer are not many, and the features do not produce obvious redundancy, so the features extracted by the convolutional layer do not need to be discarded. This design cannot significantly improve the performance of the model. Therefore, the structure adopted in this model places the Dropout layer after the output layer of the fully connected layer, and randomly discards the output of neurons in the fully connected layer, so that some of the strong wind events output by the fully connected layer are forcibly modified to non-strong winds, which artificially causes prediction errors. Therefore, in order to improve the prediction accuracy, the model will fit the results as much as possible through the gradient descent method, and find as many strong wind events as possible to make up for the errors caused by the strong wind events discarded by the Dropout layer. In this case, the sensitivity of the 750hPa geopotential height field features corresponding to strong wind events is increased to identify as many strong wind events as possible. When the model training is completed and the eval mode is used, the Dropout layer will not be started. At this time, since the sensitivity of the model to strong wind events has been improved, the recall rate of strong wind events of the entire model has also been improved.
[0183] (4) Number of fully connected layers As a feature classifier for high wind events, there is only one output layer with only one neuron and no hidden layer (Linear(in_features=9,out_features=1,bias=True), input feature is 9, output feature is 1). The commonly used CNN framework has many input variables, and even after filtering through the convolution layer, there are still many features. Therefore, a more powerful classifier is needed to classify according to these extracted features. Therefore, the fully connected layer as a classifier often contains multiple hidden layers. However, this scheme only uses one layer of potential height data on the 750hPa isobaric surface. After effective extraction by CNN, the number of extracted features is small, so the requirements for the classifier are not high. Therefore, the fully connected layer only uses one output layer, and no hidden layer is required to perform binary classification of high wind events. Not requiring a hidden layer also means that the number of neurons is reduced, the required training parameters are reduced, and the amount of data required for model training is less. Therefore, this model can complete model training on a smaller sample.
[0184] Because of the above-mentioned model structure characteristics, the model can extract sufficient features from the potential height data from WRF, and the number of parameters that need to be trained in the model is greatly reduced compared to the common CNN model. Only about 1,000 data are needed for the model to be successfully trained. In summary, the model has the structural characteristics of using only three convolutional layers with exactly the same parameters, no pooling layer, only one fully connected layer, and setting the Dropout layer after the fully connected layer. It can be successfully trained in a short time with a small sample, and the accuracy can also meet the actual needs. It has great commercial value in practical applications, so this neural network structure is applied for protection as the protection point of this patent.
[0185] This technical solution is based on the numerical forecast results of the WRF model to forecast strong wind events in the next 12 hours, which makes up for the defects of the current mainstream technical solutions and improves the accuracy of strong wind event forecasts. The innovative design of the solution of the present invention mainly includes the following three points:
[0186] The first point is that the object of the present invention is the strong wind event, and the wind speed at a specific moment is not predicted. In the past, the model predicted the wind speed, and was committed to reducing the overall wind speed forecast error. However, as a low-probability event, the strong wind event is inconsistent with the overall wind speed change law, which leads to the reduction of the wind speed forecast error and cannot effectively improve the accuracy of the strong wind event forecast. Therefore, the present invention constructs a two-classification model to forecast strong wind events and non-strong wind events to remedy the above problems.
[0187] The second point is that the independent variable used in this scheme is the difference between the forecast time and the nearest non-windy time, because the difference can remove the daily and seasonal changes implied in the time series. Compared with the traditional method of using complex methods such as wavelet analysis to remove periodic changes, the difference only needs to use the data of the two moments before and after, so this scheme does not require high sample size and time continuity, which is convenient for serving practical application scenarios.
[0188] Third, this solution saves training time and reduces the amount of data required by optimizing the model structure of the convolutional neural network. The CNN model in this solution only uses three convolutional layers with exactly the same parameters, does not use a pooling layer, has only one output layer in the fully connected layer and does not apply to hidden layers, and the Dropout layer is located after the fully connected layer. The parameters required for training are reduced, and only about 1,000 samples and images of the potential height field on the 750hPa isobaric surface in the area surrounding the weather station are needed to successfully build a model. This greatly saves the amount of data and increases the efficiency of model training, improving the accuracy of gale event forecasts.
[0189] Glossary:
[0190] WRF: WRF stands for Weather Research and Forecasting Model. It is a widely used numerical weather prediction and atmospheric research tool developed by the National Center for Atmospheric Research, the National Oceanic and Atmospheric Administration and their partners. It is used to simulate short-term weather forecasts, atmospheric processes and long-term climate simulations. WRF is more accurate than traditional numerical weather prediction models and has higher temporal and spatial resolution, making it an important tool for the meteorological and atmospheric research community.
[0191] Cross-validation: Cross-validation is mainly used in modeling applications. In a given modeling sample, most of the samples are taken out for model building, and a small number of samples are reserved for prediction using the newly established model. The prediction error of this small number of samples is calculated, and their square sum is recorded.
[0192] Convolutional Neural Networks: Convolutional Neural Networks (CNN) is a type of feedforward neural network that includes convolution calculations and has a deep structure. It is one of the representative algorithms of deep learning.
[0193] Pooling layer: Pooling, also called Pooling, is essentially sampling. Pooling compresses the input image in a certain way.
[0194] Convolutional layer: Each convolutional layer in a convolutional neural network consists of several convolutional units, and the parameters of each convolutional unit are optimized through the back-propagation algorithm. The purpose of the convolution operation is to extract different features of the input. The first convolutional layer may only extract some low-level features such as edges, lines, and corners. More layers of the network can iteratively extract more complex features from low-level features.
[0195] Dropout layer: Dropout is a commonly used regularization method to reduce the overfitting phenomenon of neural networks. Its basic idea is to randomly set the output values of some neurons to 0 during the training of the neural network, so that the structure of the neural network becomes unstable, thereby forcing the network to learn a more robust feature representation.
[0196] Fully connected layer: A fully connected layer is a common layer type in a neural network, also known as a densely connected layer or a fully connected layer. A fully connected layer can perform matrix multiplication and bias addition operations on the input features and the connection weights between each neuron to obtain the output result.
[0197] Sigmoid function: The Sigmoid function is a common S-shaped function in biology, also known as the S-shaped growth curve. In information science, due to its monotonic and inverse monotonic properties, the Sigmoid function is often used as an activation function of a neural network to map variables between 0 and 1.
[0198] Detailed description of the model structure:
[0199] The model structure of the prior art generally includes multiple convolutional layers, and each convolutional layer needs to be connected in series with a pooling layer. The Dropout layer is set between the convolutional layer and the fully connected layer, and finally a multi-layer fully connected layer is used to output the prediction result. The role of the pooling layer in this structure is to compress the data through sampling and discard repeated and redundant information. The Dropout layer is located before the fully connected layer. During the training process, the features extracted by the convolution are randomly discarded to alleviate the occurrence of overfitting, to a certain extent achieve the effect of regularization, and to accelerate the convergence of the model. The multi-layer fully connected layer structure mainly deals with the features that are still huge in number after convolution extraction. The multi-layer structure is used to improve the classification ability of the fully connected layer to increase the effective classification of the information extracted by the convolution layer. From the above analysis, it can be seen that all the corresponding structures are mainly aimed at the problem that there are too many sample variables and there are many redundant features in the features extracted by the convolution layer.
[0200] However, this scheme attempts to model only the potential height field on the 750hPa isobaric surface. The image contains very few variables, so there is no need to process redundant data in the original scheme. Therefore, the model structure of the common scheme is improved. The model structure of this scheme is as follows Figure 8 The structure of this solution is described below:
[0201] (1) Use three convolutional layers with the same parameters (parameters are Conv2d (1,1,5, stride = 3, padding = 2), one input channel, one output channel, 5*5 convolution kernel, length is 3, edge padding width is 2) to extract features of the 750hPa isobaric surface potential height. The parameters of each convolutional layer in this structure are the same, which maintains the consistency of the model's feature extraction each time, and is also convenient for the selection of model hyperparameters, which is beneficial to model training. The superposition of three convolutional layers can effectively extract features from the image without generating too much redundant data. At the same time, the BatchNorm function is added between the outputs of each convolutional layer to normalize the intermediate results to accelerate training convergence and increase model robustness.
[0202] (2) The pooling layer commonly used in the CNN model is cancelled in this scheme. The essence of the pooling layer in CNN is to downsample the image after the convolution operation extracts features, reduce the image dimension and extract key features. Usually, there are many variables in the input of the CNN model, so it is necessary to rely on the pooling layer to delete some redundant data. However, this model only uses a layer of potential height data on the 750hPa isobaric surface, which has less redundant data and does not require a pooling layer to delete the redundancy. At the same time, the pooling layer will randomly discard some useful information during the compression sampling process. Canceling the pooling layer can also prevent the discarding of useful information and improve the accuracy of model prediction.
[0203] (3) The Dropout layer is set after the fully connected layer and before the Sigmoid function, instead of being set before the fully connected layer and after the convolutional layer like in the conventional neural network structure. The Dropout layer is essentially a regularization technique that can randomly set the output results of neurons in the neural network to 0. Usually, during the training of a convolutional neural network, the Dropout layer is placed after the convolutional layer and before the fully connected layer. It essentially randomly discards some of the extracted features to prevent overfitting and data redundancy. However, because the independent variable of the model is only the 750hPa isobaric surface potential height, the features extracted by the convolutional layer are not many, and the features do not produce obvious redundancy, so the features extracted by the convolutional layer do not need to be discarded. This design cannot significantly improve the performance of the model. Therefore, the structure adopted in this model places the Dropout layer after the output layer of the fully connected layer, and randomly discards the output of neurons in the fully connected layer, so that some of the strong wind events output by the fully connected layer are forcibly modified to non-strong winds, which artificially causes prediction errors. Therefore, in order to improve the prediction accuracy, the model will fit the results as much as possible through the gradient descent method, and find as many strong wind events as possible to make up for the errors caused by the strong wind events discarded by the Dropout layer. In this case, the sensitivity of the 750hPa geopotential height field features corresponding to strong wind events is increased to identify as many strong wind events as possible. When the model training is completed and the eval mode is used, the Dropout layer will not be started. At this time, since the sensitivity of the model to strong wind events has been increased, the recall rate of strong wind events of the entire model has also been increased.
[0204] (4) Number of fully connected layers As a feature classifier for high wind events, there is only one output layer with only one neuron in the layer and no hidden layer (Linear(in_features=9,out_features=1,bias=True),
[0205] The input feature is 9, and the output feature is 1). The commonly used CNN framework has many input variables, and even after filtering through the convolution layer, there are still many features. Therefore, a more powerful classifier is needed to classify according to these extracted features. Therefore, the fully connected layer is used as a classifier, which often contains multiple hidden layers. However, this scheme only uses one layer of potential height data on the 750hPa isobaric surface. After effective extraction by CNN, the number of extracted features is small, so the requirements for the classifier are not high. Therefore, the fully connected layer only uses one output layer, and no hidden layer is required to perform binary classification of high wind events. Not needing a hidden layer also means that there are fewer neurons, fewer training parameters, and less data required for model training. Therefore, this model can complete model training on a smaller sample.
[0206] Because of the above-mentioned model structure characteristics, the model can extract sufficient features from the potential height data from WRF, and the number of parameters that need to be trained in the model is greatly reduced compared to the common CNN model. Only about 1,000 data are needed for the model to be successfully trained. In summary, the model has the structural characteristics of using only three convolutional layers with exactly the same parameters, no pooling layer, only one fully connected layer, and setting the Dropout layer after the fully connected layer. It can be successfully trained in a short time with a small sample, and the accuracy can also meet the actual needs. It has great commercial value in practical applications, so this neural network structure is applied for protection as the protection point of this patent.
[0207] The model training code for this application is as follows (under the Pytorch framework):
[0208]
[0209]
[0210] This technical solution is based on the numerical forecast results of the WRF model to forecast strong wind events in the next 12 hours, which makes up for the defects of the current mainstream technical solutions and improves the accuracy of strong wind event forecasts. The innovative design of the solution of the present invention mainly includes the following three points:
[0211] The first point is that the object of the present invention is the strong wind event, and the wind speed at a specific moment is not predicted. In the past, the model predicted the wind speed, and was committed to reducing the overall wind speed forecast error. However, as a low-probability event, the strong wind event is inconsistent with the overall wind speed change law, which leads to the reduction of the wind speed forecast error and cannot effectively improve the accuracy of the strong wind event forecast. Therefore, the present invention constructs a two-classification model to forecast strong wind events and non-strong wind events to remedy the above problems.
[0212] The second point is that the independent variable used in this scheme is the difference between the forecast time and the nearest non-windy time, because the difference can remove the daily and seasonal changes implied in the time series. Compared with the traditional method of using complex methods such as wavelet analysis to remove periodic changes, the difference only needs to use the data of the two moments before and after, so this scheme does not require high sample size and time continuity, which is convenient for serving practical application scenarios.
[0213] Third, this solution saves training time and reduces the amount of data required by optimizing the model structure of the convolutional neural network. The CNN model in this solution only uses three convolutional layers with exactly the same parameters, does not use a pooling layer, has only one output layer in the fully connected layer and does not apply to hidden layers, and the Dropout layer is located after the fully connected layer. The parameters required for training are reduced, and only about 1,000 samples and images of the potential height field on the 750hPa isobaric surface in the area surrounding the weather station are needed to successfully build a model. This greatly saves the amount of data and increases the efficiency of model training, improving the accuracy of gale event forecasts.
[0214] Glossary:
[0215] WRF: WRF stands for Weather Research and Forecasting Model. It is a widely used numerical weather prediction and atmospheric research tool developed by the National Center for Atmospheric Research, the National Oceanic and Atmospheric Administration and their partners. It is used to simulate short-term weather forecasts, atmospheric processes and long-term climate simulations. WRF is more accurate than traditional numerical weather prediction models and has higher temporal and spatial resolution, making it an important tool for the meteorological and atmospheric research community.
[0216] Cross-validation: Cross-validation is mainly used in modeling applications. In a given modeling sample, most of the samples are taken out for model building, and a small number of samples are reserved for prediction using the newly established model. The prediction error of this small number of samples is calculated, and their square sum is recorded.
[0217] Convolutional Neural Networks: Convolutional Neural Networks (CNN) is a type of feedforward neural network that includes convolution calculations and has a deep structure. It is one of the representative algorithms of deep learning.
[0218] Pooling layer: Pooling, also called Pooling, is essentially sampling. Pooling compresses the input image in a certain way.
[0219] Convolutional layer: Each convolutional layer in a convolutional neural network consists of several convolutional units, and the parameters of each convolutional unit are optimized through the back-propagation algorithm. The purpose of the convolution operation is to extract different features of the input. The first convolutional layer may only extract some low-level features such as edges, lines, and corners. More layers of the network can iteratively extract more complex features from low-level features.
[0220] Dropout layer: Dropout is a commonly used regularization method to reduce the overfitting phenomenon of neural networks. Its basic idea is to randomly set the output values of some neurons to 0 during the training of the neural network, so that the structure of the neural network becomes unstable, thereby forcing the network to learn a more robust feature representation.
[0221] Fully connected layer: A fully connected layer is a common layer type in a neural network, also known as a densely connected layer or a fully connected layer. A fully connected layer can perform matrix multiplication and bias addition operations on the input features and the connection weights between each neuron to obtain the output result.
[0222] Sigmoid function: The Sigmoid function is a common S-shaped function in biology, also known as the S-shaped growth curve. In information science, due to its monotonic and inverse monotonic properties, the Sigmoid function is often used as an activation function of a neural network to map variables between 0 and 1.
[0223] The present application also provides a single-site ground gale event forecasting device, which includes a regional high-resolution numerical forecasting data acquisition module, a variable information extraction module, a model input data acquisition module, a convolutional neural network model acquisition module, and a single-site gale event forecasting module, wherein:
[0224] The regional high-resolution numerical forecast data acquisition module is used to acquire regional high-resolution numerical forecast data;
[0225] The variable information extraction module is used to extract variable information from regional high-resolution numerical forecast data;
[0226] The model input data acquisition module is used to preprocess the variable information to obtain model input data;
[0227] The convolutional neural network model acquisition module is used to obtain the trained convolutional neural network model;
[0228] The single-site gale event forecasting module is used to input the model input data into the trained convolutional neural network model, so as to forecast the gale events at a single site.
[0229] Figure 2 It is an exemplary structural diagram of an electronic device capable of implementing a single-site ground gale event forecasting method provided according to an embodiment of the present application.
[0230] like Figure 2As shown, the electronic device includes an input device 501, an input interface 502, a central processor 503, a memory 504, an output interface 505, and an output device 506. The input interface 502, the central processor 503, the memory 504, and the output interface 505 are interconnected through a bus 507, and the input device 501 and the output device 506 are connected to the bus 507 through the input interface 502 and the output interface 505, respectively, and then connected to other components of the electronic device. Specifically, the input device 501 receives input information from the outside, and transmits the input information to the central processor 503 through the input interface 502; the central processor 503 processes the input information based on the computer executable instructions stored in the memory 504 to generate output information, temporarily or permanently stores the output information in the memory 504, and then transmits the output information to the output device 506 through the output interface 505; the output device 506 outputs the output information to the outside of the electronic device for use by the user.
[0231] That is to say, Figure 2 The electronic device shown can also be implemented as comprising: a memory storing computer executable instructions; and one or more processors, which can implement the combination when executing the computer executable instructions. Figure 1 A single-site surface gale event forecasting method is described.
[0232] In one embodiment, Figure 2 The electronic device shown can be implemented to include: a memory 504 configured to store executable program code; one or more processors 503 configured to run the executable program code stored in the memory 504 to execute the single-site ground gale event forecasting method in the above-mentioned embodiment.
[0233] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0234] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0235] Computer readable media include permanent and non-permanent, removable and non-removable, and the media can be implemented by any method or technology to store information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), data versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0236] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0237] In addition, it is clear that the word "comprising" does not exclude other units or steps. Multiple units, modules or devices stated in the device claim can also be implemented by one unit or the overall device through software or hardware. The words first, second, etc. are used to identify the name, not any specific order.
[0238] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code includes one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes identified in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or the total flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0239] The processor referred to in this embodiment may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0240] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the device / terminal equipment by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0241] In this embodiment, if the module / unit integrated in the device / terminal equipment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0242] It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. Although the present application is disclosed as above with preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0243] Although the present invention has been described in detail above with general descriptions and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements may be made thereto based on the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all fall within the scope of protection claimed by the present invention.
Claims
1. A single-site ground gale event forecasting method, characterized in that: The single-site ground gale event forecasting method comprises: Obtain regional high-resolution numerical forecast data; Extracting variable information from regional high-resolution numerical forecast data and preprocessing the variable information to obtain model input data; wherein the variable information does not include wind speed information; Get the trained convolutional neural network model; Inputting the model input data into a trained convolutional neural network model to perform single-site gale event forecasting; The step of extracting variable information from regional high-resolution numerical forecast data and preprocessing the variable information to obtain model input data includes: Get forecast time; Obtain the non-strong wind time closest to the forecast time based on the measured data at the site; Obtain the moment before the non-strong wind moment and the moment after the non-strong wind moment according to the regional high-resolution numerical forecast data; Obtaining the moment before the forecast moment and the moment after the forecast moment according to the regional high-resolution numerical forecast data; According to the regional high-resolution numerical forecast data, the geopotential height and air pressure at the forecast time, the geopotential height and air pressure at the non-strong wind time, the geopotential height and air pressure at the moment before the non-strong wind time, the geopotential height and air pressure at the moment after the non-strong wind time, the geopotential height and air pressure at the moment before the forecast time, and the geopotential height and air pressure at the moment after the forecast time are obtained respectively; According to the geopotential height and air pressure at the previous moment of the non-strong wind moment, a geopotential height image of the 750hPa isobaric surface at the previous moment of the non-strong wind moment is obtained; According to the geopotential height and air pressure at the moment after the non-strong wind moment, a geopotential height image of the 750hPa isobaric surface at the moment after the non-strong wind moment is obtained; According to the geopotential height and air pressure at the moment before the forecast time, a geopotential height image of the 750hPa isobaric surface at the moment before the forecast time is obtained; Obtaining a 750hPa isobaric surface geopotential height image at a moment after the forecast time according to the geopotential height and air pressure at a moment after the forecast time; Obtaining a first potential height average value image according to the potential height of the 750 hPa isobaric surface at a moment before the forecast time and the potential height at a moment after the forecast time; Acquire a second potential height average value image according to the potential height of the 750 hPa isobaric surface at a moment before the non-strong wind moment and the potential height at a moment after the non-strong wind moment; Obtaining the difference between the second potential height average value image and the first potential height average value image as the third potential height average value image; The image features are obtained based on the third potential height average value image.
2. The single-site ground gale event forecasting method according to claim 1, characterized in that: The step of inputting the model input data into a trained convolutional neural network model to perform single-site gale event forecasting includes: Inputting the image features into a trained convolutional neural network model to obtain output probabilities; Determine whether the output probability exceeds a preset threshold, and if so, determine that a strong wind event will occur.
3. The single-site ground gale event forecasting method according to claim 2, characterized in that: The convolutional neural network model is a CNN model in eval mode, and the CNN model includes 3 convolutional layers, 1 fully connected layer and a Tanu startup function.
4. The single-site ground gale event forecasting method according to claim 3, characterized in that: The convolution kernel size of each CNN layer is 5*5, the translation step of the convolution kernel on the image is set to 3, the image edge is filled with 0, and the filling value is set to 2.
5. The single-site ground gale event forecasting method according to claim 4, characterized in that: The convolutional neural network model is trained using the following method: Obtain a total data set, where the total data set is a continuous time series with a sampling interval of 30 minutes; Resample the training data to obtain balanced training data; Divide the total dataset into training data and test set; Training the convolutional neural network model using the training data; The trained convolutional neural network model is tested using the test set.
6. The single-site ground gale event forecasting method according to claim 5, characterized in that: The number of the test sets is 4.
7. The single-site ground gale event forecasting method according to claim 6, characterized in that: The convolutional neural network model is trained using the following method further comprising: Each test set data is input into the model, and the model is trained and tested for accuracy five times. Finally, the average value of the five cross-validation results is taken as the model accuracy evaluation result.
8. A single-site ground gale event forecasting device, characterized in that: The single-site ground gale event forecasting device comprises: A regional high-resolution numerical forecast data acquisition module, wherein the regional high-resolution numerical forecast data acquisition module is used to acquire regional high-resolution numerical forecast data; A variable information extraction module, wherein the variable information extraction module is used to extract variable information from regional high-resolution numerical forecast data, wherein the variable information does not include wind speed information; A model input data acquisition module, wherein the model input data acquisition module is used to preprocess the variable information to obtain model input data; A convolutional neural network model acquisition module, wherein the convolutional neural network model acquisition module is used to acquire a trained convolutional neural network model; A single-site gale event forecasting module, the single-site gale event forecasting module is used to input the model input data into a trained convolutional neural network model, so as to forecast a single-site gale event; The step of extracting variable information from regional high-resolution numerical forecast data and preprocessing the variable information to obtain model input data includes: Get forecast time; Obtain the non-strong wind time closest to the forecast time based on the measured data at the site; Obtain the moment before the non-strong wind moment and the moment after the non-strong wind moment according to the regional high-resolution numerical forecast data; Obtaining the moment before the forecast moment and the moment after the forecast moment according to the regional high-resolution numerical forecast data; According to the regional high-resolution numerical forecast data, the geopotential height and air pressure at the forecast time, the geopotential height and air pressure at the non-strong wind time, the geopotential height and air pressure at the moment before the non-strong wind time, the geopotential height and air pressure at the moment after the non-strong wind time, the geopotential height and air pressure at the moment before the forecast time, and the geopotential height and air pressure at the moment after the forecast time are obtained respectively; According to the geopotential height and air pressure at the previous moment of the non-strong wind moment, a geopotential height image of the 750hPa isobaric surface at the previous moment of the non-strong wind moment is obtained; According to the geopotential height and air pressure at the moment after the non-strong wind moment, a geopotential height image of the 750hPa isobaric surface at the moment after the non-strong wind moment is obtained; According to the geopotential height and air pressure at the moment before the forecast time, a geopotential height image of the 750hPa isobaric surface at the moment before the forecast time is obtained; Obtaining a 750hPa isobaric surface geopotential height image at a moment after the forecast time according to the geopotential height and air pressure at a moment after the forecast time; Obtaining a first potential height average value image according to the potential height of the 750 hPa isobaric surface at a moment before the forecast time and the potential height at a moment after the forecast time; Acquire a second potential height average value image according to the potential height of the 750 hPa isobaric surface at a moment before the non-strong wind moment and the potential height at a moment after the non-strong wind moment; Obtaining the difference between the second potential height average value image and the first potential height average value image as the third potential height average value image; The image features are obtained based on the third potential height average value image.
Citation Information
Patent Citations
Thunderstorm strong wind grade prediction classification method based on multi-source convolutional neural network
CN110197218A
Inspection and analysis method and device for large-range thunderstorm and gale events
CN117113680A
Prediction method of wind power output, electronic device, storage medium, and system
US20240094693A1
