Squall line wind speed prediction method
Technical Field
The invention relates to a natural disaster prediction method, in particular to a squall line wind speed prediction method.
Background
The squall wind is a long and narrow thunderstorm rain belt formed by arranging a plurality of thunderstorm cloud monomers, and belongs to the category of strong convection weather. Generally, the squall line passes through a place with a sharp wind direction and a sharp increase of wind speed accompanied by disastrous weather such as thunderstorm, strong wind, hail, tornado and the like, has the characteristics of strong burst property and large destructive power, and is often impossible to defend by people. Sometimes, the sky is white cloud, turns between eyes, rolls and turns into dark cloud, then presses the head top, then lightning is added, heavy rain falls into a basin, and fierce wind wraps hail and attacks.
Some existing squall line wind speed prediction methods may not be capable of quickly and efficiently predicting squall line real-time wind speeds.
Disclosure of Invention
In view of this, the present invention provides a squall wind speed prediction method that employs a convolutional neural network to identify a rapidly changing radar real-time image to derive a squall wind speed in real time.
Therefore, the invention adopts the following technical scheme: a squall line wind speed prediction method, comprising:
s1: collecting historical squall line wind samples, and performing data preprocessing and data augmentation;
s2: learning and training a CNN-based squall wind discrimination model through a convolutional neural network, specifically comprising: transmitting a radar reflectivity picture, firstly reading the image in a gray scale picture mode, extracting reflectivity factors in the image, and then carrying out the following pretreatment: 1) The image is randomly flipped with a probability of 0.2; 2) Carrying out proper expansion corrosion operation and distortion operation on the image to realize the augmentation operation on the training data; 3) Thresholding is carried out on the image, the value of the pixel with the reflectivity less than 40dbz is assigned to be 0, and the pixel with the reflectivity more than 40dbz is reserved; 4) Obtaining an image after thresholding, and carrying out elimination operation on a connected region of which the pixel area is less than 0.06 percent of the total area of the input image so as to keep the following main information; through the above operations, extracting important features in advance for the squall line discrimination model formed through final training, improving the precision of the squall line discrimination model, and finally training to obtain a squall line discrimination model; wherein, the image which is randomly overturned with the probability of 0.2 is used for the training stage to expand the data set, and the test stage does not need to carry out the operation;
s3: after training of the squall wind discrimination model is completed, inputting a radar reflectivity picture to be predicted, firstly carrying out thresholding on the picture, assigning a value of a pixel less than 40dbz to be 0, and reserving a pixel more than 40 dbz; secondly, removing connected regions with pixel areas smaller than 0.06% of the total area of the input image to retain the main information; then, respectively carrying out horizontal, vertical, horizontal and vertical overturning operations on the images, and inputting all the images into the squall line discrimination model, wherein the images are obtained after the eliminating operation and the 4 images are counted; and judging whether the squall line exists or not by using the squall line wind judging model to obtain four results, carrying out weighted average to obtain a final result, if so, outputting a result file, otherwise, returning to the step S3 to wait for executing a next radar reflectivity picture.
The convolutional neural network is one of the most representative neural networks in the technical field of deep learning at present, and has made a lot of breakthrough progresses in the field of image analysis and processing, and on the standard image labeling set ImageNet commonly used in the academic world, many achievements are made based on the convolutional neural network, including image feature extraction and classification, scene recognition and the like. One of the advantages of the convolutional neural network over the conventional image processing algorithm is that a complex pre-processing process of the image is avoided, especially, the convolutional neural network participates in the image pre-processing process manually, and the convolutional neural network can be directly input into the original image to perform a series of works, so far, the convolutional neural network is widely applied to various image-related applications.
Further, the specific content of step S1 is as follows: the selected training data are radar data of a time period near all squall line cases of the radar monitoring station for many years, and after the data are extracted, squall line samples and non-squall line samples are obtained from the data; after the marking is finished, the mark is stored in a prescription 8 format, so that the mark is convenient to read; during training, 90% of the data is used as a training set, and the remaining 10% of the data is used as a validation set.
Further, in step S2, a driven quantity batch gradient descent method is adopted through convolutional neural network training, the size of batch is set to 64, momentum is set to 0.9, the learning rate is set to 0.0001, and the number of iterations is set to 50.
Further, a convolutional neural network based on a LeNet structure is used in step S2.
Further, in step S2, the radar images of the training data undergo convolutional neural network learning to output two values, which are then mapped into a probability of the squall line/non-squall line following a softmax function, with the final determination result being the larger probability; calculating the network output result and the label error, wherein the loss function adopts a cross entropy loss function, and the formula (1) is as follows:
where y is a label, i.e., 0 or 1,
and in order to predict a result, after each round of training, back-propagating the error to each parameter, updating the parameters, finally training to obtain a squall line discrimination model, and then calculating and determining the wind speed of the squall line according to the squall line discrimination model.
The invention has the following beneficial effects: the squall wind discrimination model is obtained through learning and training by a convolutional neural network according to radar image data, and then the wind speed grade is discriminated according to a radar echo map of the squall wind discrimination model.
Drawings
FIG. 1 is a flow chart in an embodiment of the present invention;
FIG. 2 is a graph of raw radar reflectivity data in accordance with an embodiment of the present invention;
FIG. 3 is a graphical visualization of radar reflectivity data after preprocessing in accordance with an embodiment of the present invention;
FIG. 4 is an output diagram of a squall line wind discrimination model in an embodiment of the present invention.
Detailed Description
The present invention will be described in detail with reference to the drawings and specific embodiments, and it is to be understood that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments, and all other embodiments obtained by those skilled in the art based on the embodiments of the present invention without any inventive work are within the scope of the present invention.
In this embodiment, as shown in fig. 1, the squall line wind speed prediction method according to the present invention includes the following steps:
s1: firstly, selecting training data as radar data of a time period near all squall line cases of a radar monitoring station for 20 years, and after extracting the data, obtaining 1073 squall line samples and 3127 non-squall line samples from the data as shown in FIG. 2; after the marking is finished, the mark is stored in a prescription 8 format, so that the mark is convenient to read; in the training process, 90% of data is used as a training set, and the remaining 10% of data is used as a verification set. A typical squall line process may be collected 8 times based on recent two years of squall line related literature, obtaining samples for a squall line process of approximately 1000 and nearby moments.
S2: learning and training a CNN-based squall line wind discrimination model through a convolutional neural network, specifically comprising:
transmitting a radar reflectivity picture, firstly reading the image in a gray scale picture mode, extracting reflectivity factors in the image, and then carrying out the following pretreatment: 1) The image is randomly flipped with a probability of 0.2; 2) Carrying out proper expansion corrosion operation and distortion operation on the image; 3) Thresholding is carried out on the image, the value of the pixel with the reflectivity less than 40dbz is assigned to be 0, and the pixel with the reflectivity more than 40dbz is reserved; 4) Obtaining an image after thresholding, and carrying out elimination operation on a connected region of which the pixel area is less than 0.06% of the total area of the input image to leave main information; through the above operations, extracting important features in advance for the squall wind discrimination model formed by final training, improving the squall wind discrimination model accuracy, and finally training to obtain a squall wind discrimination model; where images flipped randomly with a probability of 0.2 are used in the training phase to augment the data set, the testing phase does not need to do this.
S3: after training of the squall wind discrimination model is completed, inputting a radar reflectivity picture to be predicted, firstly carrying out thresholding on the picture, assigning a value of a pixel less than 40dbz to be 0, and reserving a pixel more than 40 dbz; secondly, removing connected regions with pixel areas smaller than 0.06% of the total area of the input image to leave main information; then, respectively performing horizontal, vertical, horizontal + vertical overturning operations on the images, and inputting all the images together with the total 4 images obtained in the previous step into the squall line wind discrimination model; and judging whether the squall line exists or not by using the squall line wind judging model to obtain four results, carrying out weighted average to obtain a final result, if so, outputting a result file, otherwise, returning to the step S3 to execute the next radar reflectivity picture.
In this embodiment, in step S2, a carry-over-run batch gradient descent method is adopted through convolutional neural network training, the size of batch is set to 64, momentum is set to 0.9, the learning rate is set to 0.0001, the number of iterations is set to 50, in addition, an early-maturing strategy is adopted, that is, the updated network is tested on a verification set every iteration, if the training error is continuously increased for 6 times, the training is exited, and the model with the minimum verification error in the iteration process is stored; a convolutional neural network model based on the LeNet structure is used in step S2.
In this embodiment, the radar images of the training data undergo convolutional neural network learning to output two values, which are then mapped to a probability of the squall line/non-squall line using a softmax function, with the largest probability being the final determination result; calculating the network output result and the label error, wherein the loss function is a cross entropy loss function:
where y is a label, i.e., 0 or 1,
and in order to predict a result, after each round of training, back-propagating the error to each parameter, updating the parameters, finally training to obtain a squall line discrimination model, and then calculating and determining the wind speed of the squall line according to the squall line discrimination model. As shown in fig. 4.
In this embodiment, the squall line wind speed look-up table is as in table one;
squall line wind speed in table
Although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the spirit and scope of the invention as defined in the appended claims. The techniques, shapes, and configurations not described in detail in the present invention are all known techniques.