A multi-meteorological element prediction method and system based on an information self-attention model
By using an information self-attention model to process and predict meteorological data, the high computational complexity and delay of traditional weather forecasting have been solved, enabling efficient short- and medium-term forecasting of multiple meteorological elements and improving forecast accuracy.
Patent Information
- Application Number
- CN202211350817.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-10-31
AI Technical Summary
Traditional meteorological data forecasting suffers from high computational complexity and forecast delays, and existing numerical weather prediction information has not been fully explored and expanded for application.
An information self-attention model is used to normalize meteorological data, and an encoder and decoder are used to predict multiple meteorological elements in the short and medium term. By using probabilistic sparse self-attention layers and self-attention layers stacked together, time-series features are extracted for efficient prediction.
It achieves efficient near-real-time short-term multi-meteorological element forecasting, overcomes the computational complexity and delay problems of traditional forecasting, and improves the accuracy of forecasts.
Smart Images

Figure CN115826092B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of meteorological forecasting technology, and in particular to a multi-meteorological element forecasting method and system based on an information self-attention model. Background Technology
[0002] Since the beginning of the 21st century, with economic development, the depletion of traditional fossil fuels, and the increase in greenhouse gas emissions, renewable energy sources, represented by photovoltaic and wind power, have become a global trend in energy development. Currently, it is crucial to improve the capabilities of meteorological observation, resource assessment, and forecasting technologies related to renewable energy to support renewable energy resource surveys, project development, and power system operation. Therefore, accurate meteorological forecasts can ensure the accurate and effective prediction of photovoltaic and wind power output, thereby mitigating the uncertainties of photovoltaic and wind power and enhancing the safety and reliability of the power system.
[0003] The technological development of weather forecasting has gone through four stages: folk techniques, single-station forecasting, weather map forecasting, and numerical weather prediction. Its development has mainly involved replacing human experience-based decision-making in the forecasting process with more mathematical and physical methods. Currently, the most commonly used numerical weather prediction still faces many theoretical and technical challenges, such as initial errors, model errors, the predictability of weather system evolution, high model complexity leading to forecast delays, and the high computational complexity required for higher spatiotemporal resolution forecasts. In addition, the massive amount of numerical weather prediction information accumulated has not been fully explored and expanded in traditional numerical weather prediction products. Summary of the Invention
[0004] The purpose of this invention is to provide a multi-meteorological element prediction method and system based on an information self-attention model. By predicting historical meteorological data based on the information self-attention model, it overcomes the high computational complexity and forecast delay problems of traditional meteorological data forecasting, and achieves efficient near-real-time forecasting and short-to-medium-term multi-meteorological element forecasting.
[0005] To address the aforementioned technical problems, a first aspect of this invention provides a multi-meteorological element prediction method based on an information self-attention model, comprising the following steps:
[0006] Acquire meteorological data from a weather station. The meteorological data includes the values of several meteorological elements and their corresponding collection times. The meteorological elements include: temperature, dew point temperature, downward solar radiation, and air pressure.
[0007] The meteorological data collected was normalized.
[0008] Based on the information self-attention model, the meteorological data collected after normalization is used to make short- and medium-term predictions of multiple meteorological elements, and the prediction results of multiple meteorological elements are obtained.
[0009] Furthermore, the information self-attention model includes an encoder and a decoder;
[0010] The encoder is obtained by cross-stacking one-dimensional convolutional layers and probabilistic sparse self-attention layers;
[0011] The decoder is obtained by cross-stacking probabilistic self-attention layers and self-attention layers.
[0012] Furthermore, after normalizing the meteorological data, the process further includes:
[0013] Historical meteorological data collected over a predetermined period of time is divided into training dataset, validation dataset, and test dataset according to a predetermined ratio.
[0014] Determine the hyperparameters and training parameters of the information self-attention model. The hyperparameters include: model convolutional layers, probabilistic sparse self-attention layers, and the channel parameters and number of layers of the self-attention layers. The training parameters include: learning rate, input batch size, number of iterations, and model saving conditions.
[0015] Generate training and validation datasets;
[0016] The information self-attention model is trained based on the training dataset, an accuracy report is output, and the optimal model is determined.
[0017] Furthermore, after generating the training dataset and the validation dataset, the process also includes:
[0018] Based on the meteorological data collected, Q, K, and V are generated through the embedding layer and then extracted into the probabilistic sparse self-attention layer to extract temporal features.
[0019] All the temporal features of the probabilistic sparse self-attention layer are concatenated and used as the input of the self-attention layer in the encoder.
[0020] The decoder input includes the meteorological data of length l before time t+i+1, plus a sequence of length o consisting entirely of zeros and the corresponding time variable. The final prediction output of length l+o is obtained through the probabilistic sparse self-attention layer and the self-attention layer in the decoder, where the output of length o is the prediction result of the corresponding meteorological element.
[0021] Calculate the loss with the true labels, update the parameters by backpropagation of gradients, and stop training when the specified number of iterations is reached, the loss no longer decreases, and the performance on the validation dataset no longer improves. Then save the model.
[0022] Furthermore, the accuracy evaluation index of the accuracy report includes: coefficient of determination R. 2 The root square error (RMSE).
[0023] Accordingly, a second aspect of the present invention provides a multi-meteorological element prediction system based on an information self-attention model, comprising:
[0024] The data acquisition module is used to acquire meteorological data collected from a weather station. The meteorological data includes the values of several meteorological elements and their corresponding collection times. The meteorological elements include temperature, dew point temperature, downward solar radiation, and air pressure.
[0025] The data processing module is used to normalize the meteorological data collected.
[0026] The data prediction module is used to perform short- and medium-term multi-meteorological element prediction based on the information self-attention model and the normalized meteorological data, and obtain the multi-meteorological element prediction results.
[0027] Furthermore, the information self-attention model includes an encoder and a decoder;
[0028] The encoder is obtained by cross-stacking one-dimensional convolutional layers and probabilistic sparse self-attention layers;
[0029] The decoder is obtained by cross-stacking probabilistic self-attention layers and self-attention layers.
[0030] Furthermore, the multi-meteorological element prediction system based on the information self-attention model further includes: a data training module, which includes:
[0031] The data partitioning unit is used to divide historical meteorological data of a preset time period into training dataset, validation dataset and test dataset according to a preset ratio.
[0032] The parameter selection unit is used to determine the hyperparameters and training parameters of the information self-attention model. The hyperparameters include: model convolutional layers, probabilistic sparse self-attention layers, and the channel parameters and number of layers of the self-attention layers. The training parameters include: learning rate, input batch size, number of iterations, and model saving conditions.
[0033] The data generation unit is used to generate training and validation datasets;
[0034] The model selection unit is used to train the information self-attention model based on the training dataset, output an accuracy report, and determine the optimal model.
[0035] Furthermore, the data training module also includes:
[0036] The temporal feature extraction unit is used to extract temporal features based on the meteorological data collected by the meteorological data by generating Q, K, V through the embedding layer and then entering the probabilistic sparse self-attention layer.
[0037] A temporal feature input unit is used to connect all the temporal features of the probabilistic sparse self-attention layer and use them as the input of the self-attention layer in the encoder.
[0038] The meteorological element prediction unit is used to take the meteorological data of length l before time t+i+1 as input to the decoder, add a sequence of length o containing all zeros, and the corresponding time variable, and obtain the final prediction output of length l+o through the probabilistic sparse self-attention layer and self-attention layer in the decoder, wherein the output of length o is the corresponding meteorological element prediction result.
[0039] The training control unit is used to calculate the loss with the real labels, update the parameters by backpropagation according to the gradient, and stop training when the specified number of iterations is reached, the loss no longer decreases, and the performance on the validation dataset no longer improves, and then saves the model.
[0040] Furthermore, the accuracy evaluation index of the accuracy report includes: coefficient of determination R. 2 The root square error (RMSE).
[0041] Accordingly, a third aspect of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the processor, the instructions being executed by the processor to cause the at least one processor to perform the above-described multi-meteorological element prediction method based on an information self-attention model.
[0042] Accordingly, a fourth aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described multi-meteorological element prediction method based on an information self-attention model.
[0043] The above-described technical solutions of the embodiments of the present invention have the following beneficial technical effects:
[0044] By using an information self-attention model to predict historical meteorological data, the high computational complexity and forecast delay of traditional meteorological data forecasting are overcome, achieving efficient near-real-time forecasting and short-to-medium-term forecasting of multiple meteorological elements. Attached Figure Description
[0045] Figure 1This is a flowchart of a multi-meteorological element prediction method based on an information self-attention model provided in an embodiment of the present invention;
[0046] Figure 2 This is a schematic diagram of the multi-meteorological element prediction method based on the information self-attention model provided in the embodiments of the present invention.
[0047] Figure 3 This is a schematic diagram of the information self-attention model provided in an embodiment of the present invention;
[0048] Figure 4 This is a flowchart of the information self-attention model training process provided in an embodiment of the present invention;
[0049] Figure 5a This is a schematic diagram of the multi-meteorological element prediction results provided in the embodiments of the present invention. Figure 1 ;
[0050] Figure 5b This is a schematic diagram of the multi-meteorological element prediction results provided in the embodiments of the present invention. Figure 2 ;
[0051] Figure 5c This is a schematic diagram of the multi-meteorological element prediction results provided in the embodiments of the present invention. Figure 3 ;
[0052] Figure 5d This is a schematic diagram of the multi-meteorological element prediction results provided in the embodiments of the present invention. Figure 4 ;
[0053] Figure 6 This is a block diagram of a multi-meteorological element prediction system based on an information self-attention model provided in an embodiment of the present invention;
[0054] Figure 7 This is a block diagram of the data training module provided in an embodiment of the present invention.
[0055] Figure label:
[0056] 1. Data acquisition module; 2. Data processing module; 3. Data prediction module; 4. Data training module; 41. Data partitioning unit; 42. Parameter selection unit; 43. Data generation unit; 44. Model selection unit; 45. Time series feature extraction unit; 46. Time series feature input unit; 47. Meteorological element prediction unit; 48. Training control unit. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0058] Please refer to Figure 1 , Figure 2 , Figure 3 and Figure 4 The first aspect of this invention provides a multi-meteorological element prediction method based on an information self-attention model, comprising the following steps:
[0059] Step S200: Obtain meteorological data from a weather station. The meteorological data includes the values of several meteorological elements and their corresponding collection times. The meteorological elements include: temperature, dew point temperature, downward solar radiation, and air pressure.
[0060] Step S400: Perform maximum and minimum normalization processing on the meteorological data.
[0061] Step S600: Based on the information self-attention model, perform short-to-medium-term multi-meteorological element prediction based on the normalized meteorological data, and obtain the multi-meteorological element prediction results.
[0062] Specifically, the information self-attention model includes an encoder and a decoder; the encoder is obtained by cross-stacking one-dimensional convolutional layers and probabilistic sparse self-attention layers; the decoder is obtained by cross-stacking probabilistic self-attention layers and self-attention layers.
[0063] The above information self-attention structure includes:
[0064] (1) Probabilistic sparse self-attention:
[0065] The self-attention formula for the self-attention model is as follows: For a queue Q, key K, and value V, the corresponding attention is:
[0066]
[0067] Where A represents the attention of the i-th dimension of the queue, q i Let Q be the i-th dimension of the queue, T denote the matrix transpose, d be the input dimension, and k be the asymmetric exponential kernel. l is the length of the key value K, k j Let v be the j-th dimension of the key value K. j Let V be the j-th dimension of the value, where i is the dimension of the queue and j is the dimension of the key.
[0068] This attention is based on the combined value and requires calculation of probabilities. Obtaining the output requires computational complexity of power-law dot product calculations and storage space complexity of O(L). Q L K ), where L Q It is the length of the queue, L K The length of the key value is crucial. Increasing the length of the prediction sequence increases computational and storage costs, making model prediction more difficult. Probabilistic sparse self-attention addresses this issue by first performing queue sparsity evaluation. In the formula above, the attention of the i-th queue on all keys is calculated using p(k... j ,q i The definition is that the output is the sum of the product of the probability and the corresponding value. In fact, attention encourages the non-uniform distribution of the probability distribution of the queue, so it can distinguish the important queues and simplify the calculation. Here, KL divergence is used to measure the importance of the queue, and its formula is as follows:
[0069]
[0070] The first term is the i-th dimension q of the queue. i The logarithm sum over all key values is represented by the second term, which is their arithmetic mean. ln represents the logarithm, and L... K This represents the length of the key value K.
[0071] Based on the above importance index, the probabilistic sparse attention mechanism is obtained as follows:
[0072]
[0073] in It is a sparse matrix of the same size as q, which contains only the top-k queues based on importance, where k is a user-defined parameter.
[0074] Furthermore, after normalizing the meteorological data in step S400, the process also includes:
[0075] Step S510: Divide the historical meteorological data collected over a preset time period into a training dataset, a validation dataset, and a test dataset according to a preset ratio.
[0076] Step S520: Determine the hyperparameters and training parameters of the information self-attention model. The hyperparameters include: the channel parameters and number of layers of the model convolutional layer, the probabilistic sparse self-attention layer, and the self-attention layer. The training parameters include: the learning rate, the input batch size, the number of iterations, and the model saving conditions.
[0077] Model input and true output label generation: For time t, the input consists of meteorological data and time variables from time t to t+i, and time variables from time t+i+1 to t+i+o+1. The true output labels are the meteorological data from time t+i+1 to t+i+o+1, and are generated using a sliding window according to a length s. Here, i is the time length of the input meteorological data sequence, and o is the time length of the output meteorological data prediction sequence.
[0078] Step S530: Generate the training dataset and the validation dataset.
[0079] Step S540: Train the information self-attention model based on the training dataset, output an accuracy report, and determine the optimal model.
[0080] Furthermore, after generating the training and validation datasets in step S530, the process also includes:
[0081] Step S531: Based on meteorological data, Q, K, and V are generated through the embedding layer and then extracted into the probabilistic sparse self-attention layer to extract temporal features.
[0082] Step S532: Connect all the temporal features of the probabilistic sparse self-attention layer together and use them as the input to the self-attention layer in the encoder.
[0083] Step S533: For the decoder input, the meteorological data of length l before time t+i+1 is combined with the sequence of length o containing all zeros and the corresponding time variable. The final prediction output of length l+o is obtained through the probabilistic sparse self-attention layer and the self-attention layer in the decoder, where the output of length o is the prediction result of the corresponding meteorological element.
[0084] Step S534: Calculate the loss with the true labels, update the parameters by backpropagation of gradients, and stop training when the specified number of iterations is reached, the loss no longer decreases, and the performance on the validation dataset no longer improves. Then save the model.
[0085] Please refer to Figure 5a , Figure 5b , Figure 5c and Figure 5d The results show that the accuracy of the self-attention model over the next 48 hours is statistically analyzed on the test set for temperature, dew point temperature, downward solar radiation, and air pressure. As can be seen from the graph, the accuracy of the self-attention model decreases slightly over time, but the overall accuracy is still good, which verifies that the self-attention model can achieve accurate prediction of multiple meteorological elements.
[0086] Figure 2 The block diagram for the model building section is a schematic diagram of the principle; for detailed building procedures, please refer to [link / reference]. Figure 3 The process in the middle.
[0087] In addition, the accuracy evaluation indicators for the accuracy report include: coefficient of determination R. 2 The root square error (RMSE).
[0088] Accordingly, please refer to Figure 6 A second aspect of the present invention provides a multi-meteorological element prediction system based on an information self-attention model, comprising:
[0089] Data acquisition module 1 is used to acquire meteorological data collected from a weather station. The meteorological data includes the values of several meteorological elements and their corresponding collection times. The meteorological elements include: temperature, dew point temperature, downward solar radiation, and air pressure.
[0090] Data processing module 2 is used to normalize the meteorological data collected;
[0091] Data prediction module 3 is used to perform short- and medium-term multi-meteorological element prediction based on the information self-attention model and the normalized meteorological data, and obtain the multi-meteorological element prediction results.
[0092] Furthermore, the information self-attention model includes an encoder and a decoder; the encoder is obtained by cross-stacking one-dimensional convolutional layers and probabilistic sparse self-attention layers; the decoder is obtained by cross-stacking probabilistic self-attention layers and self-attention layers.
[0093] Further, please refer to Figure 7 The multi-meteorological element prediction system based on the information self-attention model also includes: data training module 4, which includes:
[0094] Data partitioning unit 41 is used to divide historical meteorological data of a preset time length into training dataset, validation dataset and test dataset according to a preset ratio;
[0095] The parameter selection unit 42 is used to determine the hyperparameters and training parameters of the information self-attention model. The hyperparameters include: the channel parameters and number of layers of the model convolutional layer, the probabilistic sparse self-attention layer, and the self-attention layer. The training parameters include: the learning rate, the input batch size, the number of iterations, and the model saving conditions.
[0096] Data generation unit 43 is used to generate training datasets and validation datasets;
[0097] The model selection unit 44 is used to train the information self-attention model based on the training dataset, output an accuracy report, and determine the optimal model.
[0098] Further, please refer to Figure 7 Data training module 4 also includes:
[0099] The temporal feature extraction unit 45 is used to extract temporal features based on meteorological data, by generating Q, K, V through the embedding layer and then entering the probabilistic sparse self-attention layer.
[0100] Temporal feature input unit 46 is used to connect all the temporal features of the probability sparse self-attention layer and use them as the input of the self-attention layer in the encoder.
[0101] Meteorological element prediction unit 47 is used to combine the meteorological data of length l before time t+i+1 with a sequence of length o containing all zeros and the corresponding time variable, and obtain the final prediction output of length l+o through the probabilistic sparse self-attention layer and self-attention layer in the decoder, where the output of length o is the corresponding meteorological element prediction result.
[0102] Training control unit 48 is used to calculate the loss with the real labels, update the parameters by backpropagation according to the gradient, and stop training when the specified number of iterations is reached, the loss no longer decreases and the performance on the validation dataset no longer improves, and the model is saved.
[0103] In addition, the accuracy evaluation indicators for the accuracy report include: coefficient of determination R. 2 The root square error (RMSE).
[0104] Accordingly, a third aspect of the present invention provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by a processor, the instructions being executed by the processor to cause the at least one processor to perform the above-described multi-meteorological element prediction method based on an information self-attention model.
[0105] Accordingly, a fourth aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described multi-meteorological element prediction method based on an information self-attention model.
[0106] This invention aims to protect a multi-meteorological element prediction method and system based on an information self-attention model. The method includes: acquiring meteorological data collected from a meteorological station, the meteorological data including values of several meteorological elements and their corresponding collection times, the meteorological elements including temperature, dew point temperature, downward solar radiation, and air pressure; normalizing the meteorological data; and performing short-to-medium-term multi-meteorological element prediction based on the normalized meteorological data using an information self-attention model, to obtain the multi-meteorological element prediction result. The above technical solution has the following advantages:
[0107] By using an information self-attention model to predict historical meteorological data, the high computational complexity and forecast delay of traditional meteorological data forecasting are overcome, achieving efficient near-real-time forecasting and short-to-medium-term forecasting of multiple meteorological elements.
[0108] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0109] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0110] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0111] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for multi-meteorological element prediction based on an information self-attention model, characterized in that, The method comprises the following steps: acquiring meteorological collection data of a meteorological station, the meteorological collection data comprising numerical values of a plurality of meteorological elements and corresponding collection times, the meteorological elements comprising temperature, dew point temperature, downward solar radiation, and air pressure; normalizing the meteorological collection data; based on an information self-attention model, performing medium and short-term multi-meteorological element prediction according to the normalized meteorological collection data to obtain a multi-meteorological element prediction result; the information self-attention model comprises an encoder and a decoder; the encoder is obtained by cross-stacking a one-dimensional convolution layer and a probabilistic sparse self-attention layer; the decoder is obtained by cross-stacking a probabilistic self-attention layer and a self-attention layer; after the normalization of the meteorological collection data, the method further comprises the following steps: dividing historical meteorological collection data of a preset time length into a training data set, a verification data set, and a test data set according to a preset ratio; determining hyperparameters and training parameters of the information self-attention model, the hyperparameters comprising channel parameters and layer numbers of a model convolution layer, a probabilistic sparse self-attention layer, and the self-attention layer, and the training parameters comprising a learning rate, an input batch size, an iteration number, and a model saving condition; generating the training data set and the verification data set; training the information self-attention model according to the training data set, outputting an accuracy report, and determining an optimal model; after the generation of the training data set and the verification data set, the method further comprises the following steps: based on the meteorological collection data, generating a queue Q, a key value K, and a value V through an embedding layer to extract time sequence features in the probabilistic sparse self-attention layer; connecting all the time sequence features of the probabilistic sparse self-attention layer to serve as input of the self-attention layer in the encoder; for the decoder input comprising the meteorological collection data of a length l before a t+i+1 time point and a sequence of a length o all of which are 0, and corresponding time variables, final prediction output of a length l+o is obtained through the probabilistic sparse self-attention layer and the self-attention layer in the decoder, wherein i is a time length of the input meteorological collection data sequence, and o is a time length of the output meteorological collection prediction sequence; loss is calculated with a real label, parameters are updated according to gradient back propagation, and the training is stopped and the model is saved when the iteration number is reached, the loss no longer decreases, and the performance on the verification data set no longer improves.
2. The multi-meteorological element prediction method based on the information self-attention model according to claim 1, comprising: The precision evaluation index of the precision report includes: determination coefficient R 2 and square root error RMSE. 3.A multi-meteorological element prediction system based on an information self-attention model, characterized in that, a data acquisition module configured to acquire meteorological collection data of a meteorological station, the meteorological collection data comprising numerical values of a plurality of meteorological elements and corresponding collection times, the meteorological elements comprising temperature, dew point temperature, downward solar radiation, and air pressure; a data processing module configured to normalize the meteorological collection data; a data prediction module configured to, based on an information self-attention model, perform medium and short-term multi-meteorological element prediction according to the normalized meteorological collection data to obtain a multi-meteorological element prediction result. The information self-attention model comprises an encoder and a decoder; The encoder is obtained by cross-stacking one-dimensional convolution layers and probabilistic sparse self-attention layers; The decoder is obtained by cross-stacking probabilistic self-attention layers and self-attention layers; Further comprising a data training module, the data training module comprising: a data division unit for dividing historical meteorological collection data of a preset time length into a training data set, a verification data set and a test data set according to a preset proportion; a parameter selection unit for determining hyperparameters and training parameters of the information self-attention model, the hyperparameters comprising channel parameters and layer numbers of model convolution layers, probabilistic sparse self-attention layers and the self-attention layers, and the training parameters comprising a learning rate, an input batch size, an iteration number and a model saving condition; a data generation unit for generating the training data set and the verification data set; a model selection unit for training the information self-attention model according to the training data set, outputting an accuracy report and determining an optimal model; The data training module further comprises: a time series feature extraction unit for generating a queue Q, a key value K and a value V through an embedding layer based on the meteorological collection data, and inputting the time series features into the probabilistic sparse self-attention layers for extraction; a time series feature input unit for connecting all the time series features of the probabilistic sparse self-attention layers to serve as input of the self-attention layers in the encoder; a meteorological element prediction unit for inputting the meteorological collection data of a length of l before t+i+1 time into the decoder, adding a sequence of a length of o all of which are 0 and corresponding time variables, and obtaining a final prediction output of a length of l+o through the probabilistic sparse self-attention layers and the self-attention layers in the decoder, wherein i is a time length of the input meteorological collection data sequence, and o is a time length of the output meteorological collection prediction sequence; a training control unit for calculating a loss with a real label, updating parameters according to gradient backpropagation until the training is stopped when the iteration number is reached, the loss no longer decreases and the performance on the verification data set no longer improves, and the model is saved.
4. The multi-meteorological element prediction system based on the information self-attention model according to claim 3, comprising: The precision evaluation index of the precision report includes: determination coefficient R 2 and square root error RMSE.
5. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the one processor to enable the at least one processor to perform the multi-meteorological element prediction method based on the information self-attention model according to claim 1 or 2. A computer readable storage medium having computer instructions stored thereon, the instructions being executed by a processor to implement the multi-meteorological element prediction method based on the information self-attention model according to claim 1 or 2.
6. A computer-readable storage medium, characterized in that,
Citation Information
Patent Citations
Severe convective weather physical characteristic quantity prediction method and system based on attention mechanism
CN114548595A
Sea surface wind speed prediction method based on Transform
CN114943368A