Meteorological prediction method and device, storage medium and electronic device
Through iterative prediction method, the neural network model is used to perform meteorological prediction based on the categories of meteorological factors, which solves the limitations of traditional meteorological forecasting in complex weather systems, improves the accuracy and efficiency of meteorological prediction, and is suitable for natural disasters in remote areas. Early warning.
Patent Information
- Application Number
- CN202411244021.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-27
AI Technical Summary
Traditional meteorological forecasting methods have limitations in dealing with complex and changeable weather systems, resulting in low accuracy of high-resolution meteorological forecasts, especially in the problem of untimely warnings in natural disaster warnings in remote areas.
By obtaining the full meteorological elements of the current moment, we can develop meteorological prediction according to the categories of multiple meteorological factors, and using neural network models to perform iterative prediction until the preset iteration conditions are met, we can obtain the meteorological prediction results at the target moment, which improves the accuracy of meteorological prediction and efficiency.
This method improves the accuracy and efficiency of meteorological prediction, reduces the computing power demand, can effectively realize iterative forecast of high-resolution meteorological elements in remote areas, and improves the timeliness of natural disaster warnings.
Smart Images

Figure CN119200038A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of meteorological technology, and more specifically, to a meteorological forecasting method and device, a storage medium, and an electronic device. Background Art
[0002] With the development of new energy and the construction of large bases, some remote areas have become the first choice for many large bases. However, with the increasingly significant impact of global climate change and frequent natural disasters, large bases are built in remote areas with few observation sites and large land areas, which makes it easy for early warnings to be delayed and more susceptible to the impact and shock of natural disasters. Therefore, the timeliness of weather forecasts plays a vital role in reducing the losses caused by natural disasters.
[0003] Traditional weather forecasting methods mainly rely on numerical weather forecast models and the experience of meteorologists, which often have limitations when dealing with complex and changeable weather systems. Among related technologies, the rapid development of artificial intelligence (AI) technology has brought new opportunities to the field of weather forecasting. AI technology, especially machine learning and deep learning, has demonstrated its powerful data processing and pattern recognition capabilities in many fields. Applying AI technology to weather forecasting can achieve in-depth mining and analysis of large amounts of meteorological data, thereby revealing the deep laws of weather changes and improving the accuracy and efficiency of high-resolution weather forecasts. However, high-resolution forecasts face problems such as large amounts of data and high computational complexity, resulting in low accuracy in weather forecasts.
[0004] Therefore, how to improve the accuracy of high-resolution weather forecasts has become a pressing issue to be addressed in meteorological research. Summary of the invention
[0005] The embodiment of the present application provides a weather forecasting method to at least solve the problem in the related art that photovoltaic fault diagnosis efficiency is low, resulting in low photovoltaic fault diagnosis accuracy.
[0006] According to an embodiment of the present application, a weather forecasting method is provided, including: obtaining all weather elements at a current moment; the all weather elements include multiple weather factors; according to the categories of the multiple weather factors, conducting weather forecasts on the all weather elements to obtain weather forecast results of the multiple weather factors at the next moment; aggregating the weather forecast results to obtain the predicted all weather elements at the next moment after the current moment; taking the predicted all weather elements at the next moment as new all weather elements, returning to the step of conducting weather forecasts on the all weather elements according to the categories of the multiple weather factors to obtain weather forecast results of the multiple weather factors at the next moment, and continuing to execute until a preset iteration condition is met and stopping, and obtaining the weather forecast results of the multiple weather factors at the target moment.
[0007] In an exemplary embodiment, meteorological forecasts are conducted on all meteorological elements according to the categories of the multiple meteorological factors to obtain meteorological forecast results of the multiple meteorological factors at the next moment, including: determining meteorological detection models corresponding to each category according to the categories of the multiple meteorological factors; inputting all meteorological elements into each meteorological detection model, and each meteorological detection model conducts meteorological forecasts of the category to which it belongs based on all meteorological elements to obtain meteorological forecast results of the multiple meteorological factors at the next moment.
[0008] In an exemplary embodiment, the sample full meteorological elements are input into a plurality of neural network models to be trained, and the plurality of neural network models to be trained respectively train the sample full meteorological elements until a preset condition is met, thereby obtaining each meteorological detection model that has been trained, including: for any neural network model to be trained, the following steps are adopted to carry out training: based on the neural network model to be trained, meteorological forecasting is performed on the sample full meteorological elements to obtain a sample meteorological forecast result; the loss between the sample meteorological forecast result and the sample meteorological actual result of the target sample meteorological factor in the sample full meteorological element is determined; the parameters of the neural network model to be trained are adjusted according to the loss, until a preset condition is met, thereby obtaining a meteorological detection model that has been trained.
[0009] In an exemplary embodiment, obtaining the sample full meteorological elements based on the sample meteorological factors includes: performing dimensional integration based on the sample meteorological factors to obtain multiple sample meteorological factors of the same dimension; and splicing the multiple sample meteorological factors of the same dimension to obtain the sample full meteorological elements.
[0010] In an exemplary embodiment, the meteorological detection model includes an embedding layer, an association learning layer and a forecast layer; the full meteorological elements are input into each of the meteorological detection models, and each of the meteorological detection models respectively develops meteorological forecasts of the corresponding categories based on the full meteorological elements to obtain meteorological forecast results of the multiple meteorological factors at the next moment, including: the determination of the meteorological forecast results of any meteorological factor at the next moment is carried out using the following steps: the full meteorological elements are input into the meteorological detection model, and the embedding layer of the meteorological detection model embeds and represents the full meteorological elements to obtain a meteorological feature map; the association learning layer of the meteorological detection model performs a preset number of association learning on the meteorological feature map to obtain meteorological association features; the meteorological association features are processed by the forecast layer of the meteorological detection model to obtain the meteorological forecast result of the meteorological factor at the next moment.
[0011] In an exemplary embodiment, the aggregating the meteorological forecast results to obtain the predicted full meteorological elements for the next moment after the current moment includes: performing dimensional integration based on the meteorological forecast results to obtain multiple meteorological forecast results of the same dimension; and splicing the multiple meteorological forecast results of the same dimension to obtain the predicted full meteorological elements for the next moment after the current moment.
[0012] According to another embodiment of the embodiment of the present application, a weather forecasting device is also provided, including: an acquisition module, used to acquire all weather elements at the current moment; the all weather elements include multiple weather factors; a prediction module, used to carry out weather forecast for the all weather elements according to the categories of the multiple weather factors, and obtain weather forecast results of the multiple weather factors at the next moment; an aggregation module, used to aggregate the weather forecast results to obtain the predicted all weather elements at the next moment after the current moment; the prediction module is also used to take the predicted all weather elements at the next moment as new all weather elements, return to carry out weather forecast for the all weather elements according to the categories of the multiple weather factors, and obtain the weather forecast results of the multiple weather factors at the next moment, and continue to execute the step until the preset iteration condition is met and stop, and obtain the weather forecast results of the multiple weather factors at the target moment.
[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above method when running.
[0014] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method through the computer program.
[0015] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0016] In the embodiment of the present application, by obtaining the full meteorological elements at the current moment; the full meteorological elements include multiple meteorological factors; and according to the categories of the multiple meteorological factors, the full meteorological elements are forecasted, so that the meteorological forecast results of the multiple meteorological factors at the next moment can be obtained; the meteorological forecast results are aggregated to obtain the predicted full meteorological elements at the next moment of the current moment; further expand the iteration process, take the predicted full meteorological elements at the next moment as the new full meteorological elements, return to the steps of forecasting the full meteorological elements according to the categories of multiple meteorological factors, and obtain the meteorological forecast results of multiple meteorological factors at the next moment respectively, and continue to execute until the preset iteration conditions are met, and the meteorological forecast results of multiple meteorological factors at the target moment are obtained. In the meteorological forecast process, by conducting targeted meteorological forecasts based on the full meteorological elements according to the categories of multiple meteorological factors, the accuracy of the meteorological forecast is improved. Since the targeted meteorological forecast is carried out according to the category, and the meteorological forecast results of multiple meteorological factors at the target moment can be obtained after iteration, the computing power demand is reduced, and the efficiency of the meteorological forecast is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 It is a hardware structure block diagram of a computer terminal of a weather forecasting method according to an embodiment of the present application;
[0019] Figure 2 is a flow chart of a method for generating a weather forecast method according to an embodiment of the present application;
[0020] Figure 3 is another flowchart of a weather forecasting method according to an embodiment of the present application;
[0021] Figure 4 is another flowchart of the weather forecasting method according to an embodiment of the present application;
[0022] Figure 5 is a structural block diagram of a neural network model in an embodiment of the present application;
[0023] Figure 6 It is a structural block diagram of a weather forecasting device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices; "plurality" means two or more.
[0026] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or similar computing device or cloud platform or independent physical server or software platform, wherein the above software platform is run through one or more servers. Taking running on a computer terminal as an example, Figure 1 is a hardware structure block diagram of a weather forecasting method according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data. In an exemplary embodiment, the computer terminal may also include a transmission device 106 for communication functions and an input and output device 108, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. A person skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Equivalent functions or comparisons shown Figure 1 A different configuration with more features is shown.
[0027] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the methods in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, the above-mentioned methods are implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0028] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0029] In this embodiment, a weather forecasting method is provided, which is applied to the above-mentioned computer device. Figure 2 : is a flow chart of a weather forecasting method according to an embodiment of the present application, the flow chart includes the following steps:
[0030] Step S202, obtaining all meteorological elements at the current moment; the all meteorological elements include multiple meteorological factors;
[0031] Among them, the full meteorological elements at the current moment refer to various meteorological factors obtained in real time, which may include temperature, humidity, light intensity, etc. Each meteorological factor has its own specific value, and these meteorological factors with specific values constitute the full meteorological elements. For example, for temperature, it can be 37° (degrees); for light intensity, it can be 1000 lux (lux).
[0032] Step S204, performing a meteorological forecast on all meteorological elements according to the categories of the multiple meteorological factors, and obtaining meteorological forecast results of the multiple meteorological factors at the next moment;
[0033] Specifically, for any category of meteorological factors, the computer terminal can predict the meteorological factors of that category based on all meteorological elements, and obtain the meteorological forecast results of the meteorological factors of that category at the next moment of the current moment. For example, when the meteorological factor is temperature, the computer terminal only needs to predict the meteorological forecast results of temperature at one moment when it predicts the weather based on all meteorological elements; when the meteorological factor is humidity, the computer terminal only needs to predict the meteorological forecast results of humidity at one moment when it predicts the weather based on all meteorological elements. In this way, targeted prediction not only improves the prediction accuracy, but also does not require large-scale calculation examples, effectively achieving a balance between forecasting capabilities and computing power requirements.
[0034] Step S206, aggregating the weather forecast results to obtain the predicted full weather elements at the next moment of the current moment;
[0035] In some embodiments, the aggregating of the meteorological forecast results to obtain the predicted full meteorological elements for the next moment after the current moment includes: performing dimensional integration based on the meteorological forecast results to obtain multiple meteorological forecast results of the same dimension; and splicing the multiple meteorological forecast results of the same dimension to obtain the predicted full meteorological elements for the next moment after the current moment.
[0036] Among them, since different weather forecast results have different dimensions, before splicing multiple weather forecast results, the dimensions of the weather forecast results can be uniformly converted into 3D, and then the splicing operation can be performed. Through a simple splicing operation, multiple weather forecast results can be integrated, effectively reducing the consumption of computing resources.
[0037] Step S208, taking the predicted full meteorological elements at the next moment as new full meteorological elements, returning to the categories of the multiple meteorological factors, respectively carrying out meteorological forecasts for the full meteorological elements, and continuing to execute the step of obtaining the meteorological forecast results of the multiple meteorological factors at the next moment, and stopping when the preset iteration conditions are met, and obtaining the meteorological forecast results of the multiple meteorological factors at the target moment.
[0038] It should be noted that the target time is the specific time point of the meteorological conditions of the meteorological factors to be predicted. The target time can be adaptively adjusted based on the actual scene, meteorological forecast accuracy requirements, etc. For example, the current time can be 3:10 pm, and the target time can be 9:00 pm. Through iterative operations, the meteorological forecast result of the target time can be determined. Among them, the time step between the current time and the next time of the current time can be 10 minutes or 1 hour. The embodiment of the present application is not limited here. For example, the time step is 10 minutes, the current time can be 3:10 pm, and the next time of the current time can be 3:20 pm.
[0039] It is understandable that the preset iteration condition is a condition for determining whether to end, such as setting an iteration number threshold to determine whether the preset iteration condition is reached. When setting the iteration number threshold, it can be determined based on the target time or according to previous prediction scenarios.
[0040] In the embodiment of the present application, by obtaining the full meteorological elements at the current moment; the full meteorological elements include multiple meteorological factors; and according to the categories of the multiple meteorological factors, the full meteorological elements are forecasted, so that the meteorological forecast results of the multiple meteorological factors at the next moment can be obtained; the meteorological forecast results are aggregated to obtain the predicted full meteorological elements at the next moment of the current moment; further expand the iteration process, take the predicted full meteorological elements at the next moment as the new full meteorological elements, return to the steps of forecasting the full meteorological elements according to the categories of multiple meteorological factors, and obtain the meteorological forecast results of multiple meteorological factors at the next moment respectively, and continue to execute until the preset iteration conditions are met, and the meteorological forecast results of multiple meteorological factors at the target moment are obtained. In the meteorological forecast process, by conducting targeted meteorological forecasts based on the full meteorological elements according to the categories of multiple meteorological factors, the accuracy of the meteorological forecast is improved. Since the targeted meteorological forecast is carried out according to the category, and the meteorological forecast results of multiple meteorological factors at the target moment can be obtained after iteration, the computing power demand is reduced, and the efficiency of the meteorological forecast is effectively improved.
[0041] In an exemplary embodiment, meteorological forecasts are conducted on all meteorological elements according to the categories of the multiple meteorological factors to obtain meteorological forecast results of the multiple meteorological factors at the next moment, including: determining meteorological detection models corresponding to each category according to the categories of the multiple meteorological factors; inputting all meteorological elements into each meteorological detection model, and each meteorological detection model conducts meteorological forecasts of the category to which it belongs based on all meteorological elements to obtain meteorological forecast results of the multiple meteorological factors at the next moment.
[0042] It is understandable that for each category of meteorological factors, there is a corresponding pre-trained meteorological detection model. For example, for each category of meteorological factors, a meteorological detection model 1 associated with temperature, a meteorological detection model 2 associated with humidity... a meteorological detection model N is trained, where N is not equal to 0. When the meteorological factor includes temperature, the meteorological detection model 1 associated with temperature can be used to process all meteorological elements to obtain the temperature value at the next moment after the current moment. When the meteorological factor includes humidity, the meteorological detection model 2 associated with humidity can be used to process all meteorological elements to obtain the humidity value at the next moment after the current moment.
[0043] In the above embodiment, corresponding meteorological detection models are trained for different categories of meteorological factors, so that meteorological forecasts can be carried out based on the meteorological detection models to obtain meteorological forecast results for multiple meteorological factors at the next moment. This targeted forecast not only improves the forecast accuracy, but also reduces the computing power requirements and improves the forecast efficiency.
[0044] In an exemplary embodiment, the training steps of each of the meteorological detection models include: obtaining multiple sample meteorological factors; obtaining sample full meteorological elements based on the sample meteorological factors; inputting the sample full meteorological elements into multiple neural network models to be trained, and the multiple neural network models to be trained are respectively trained for the sample full meteorological elements until preset conditions are met, thereby obtaining each of the meteorological detection models that have been trained.
[0045] It should be noted that the neural network model can be M2SNet (multi-scale subtraction network), and the number of M2SNets is also related to the categories of sample meteorological factors, that is, the number of M2SNets corresponds to the number of categories of sample meteorological factors.
[0046] Specifically, when training the meteorological detection model, all meteorological elements can be taken as input and input into each M2SNet respectively. Through the pre-trained M2SNet corresponding to each full meteorological element, the forecast value of each sample meteorological factor is obtained, and then all forecast results are integrated to make a forecast for the next time period. This is repeated multiple times to obtain the trained meteorological detection models, thereby realizing long-term iterative forecasting of high-resolution meteorological elements.
[0047] In some embodiments, obtaining the sample full meteorological elements based on the sample meteorological factors includes: performing dimensional integration based on the sample meteorological factors to obtain multiple sample meteorological factors of the same dimension; and splicing the multiple sample meteorological factors of the same dimension to obtain the sample full meteorological elements.
[0048] It is understandable that, since different sample meteorological factors have different dimensions, before splicing multiple sample meteorological factors, the dimensions of the sample meteorological factors can be uniformly converted into 3D, and then the splicing operation can be performed. Through a simple splicing operation, multiple sample meteorological factors can be integrated, effectively reducing the consumption of computing resources.
[0049] In the above embodiment, a meteorological detection model is trained separately for each sample meteorological factor through multiple deep neural network architectures M2SNet, so that in the actual meteorological forecasting process, targeted forecasts can be carried out based on the class of meteorological factors to improve the accuracy and efficiency of meteorological forecasting.
[0050] In an exemplary embodiment, the sample full meteorological elements are input into a plurality of neural network models to be trained, and the plurality of neural network models to be trained respectively train the sample full meteorological elements until a preset condition is met, thereby obtaining each meteorological detection model that has been trained, including: for any neural network model to be trained, the following steps are adopted to carry out training: based on the neural network model to be trained, meteorological forecasting is performed on the sample full meteorological elements to obtain a sample meteorological forecast result; the loss between the sample meteorological forecast result and the sample meteorological actual result of the target sample meteorological factor in the sample full meteorological element is determined; the parameters of the neural network model to be trained are adjusted according to the loss, until a preset condition is met, thereby obtaining a meteorological detection model that has been trained.
[0051] The sample meteorological forecast result refers to the meteorological result of the predicted sample meteorological factor. For different sample meteorological factors, the sample meteorological forecast result is different. For example, if the sample meteorological factor is temperature, the sample meteorological forecast result is the sample meteorological forecast result for temperature; if the sample meteorological factor is light intensity, the sample meteorological forecast result is the sample meteorological forecast result for light intensity.
[0052] The target sample meteorological factor is determined from the sample meteorological factors. For example, when training a meteorological detection model corresponding to temperature, temperature is the target sample meteorological factor; when training a meteorological detection model corresponding to humidity, humidity is the target sample meteorological factor.
[0053] The actual sample meteorological results can be considered as labels, which are real values. Different sample meteorological factors correspond to actual sample meteorological results.
[0054] It can be understood that in the process of determining the meteorological detection model of any type of sample meteorological factors, the steps used are the same. For the neural network model to be trained, its input is all the meteorological elements of the sample, and the output is different. For example, if the sample meteorological factor is temperature, the output is the sample meteorological prediction result of temperature; if the sample meteorological factor is humidity, the output is the sample meteorological prediction result of humidity. During the training process, the parameters of the neural network model to be trained are adjusted by adjusting the loss between the sample meteorological prediction result and the sample meteorological actual result until the preset conditions are met, and the trained meteorological detection model is obtained.
[0055] In the above embodiment, during the training process, the parameters are adjusted by the loss between the sample meteorological prediction results and the sample meteorological actual results, and then the meteorological detection model is trained through iterations.
[0056] In an exemplary embodiment, the meteorological detection model includes an embedding layer, an association learning layer and a forecast layer; the full meteorological elements are input into each of the meteorological detection models, and each of the meteorological detection models respectively develops meteorological forecasts of the corresponding categories based on the full meteorological elements to obtain meteorological forecast results of the multiple meteorological factors at the next moment, including: the determination of the meteorological forecast results of any meteorological factor at the next moment is carried out using the following steps: the full meteorological elements are input into the meteorological detection model, and the embedding layer of the meteorological detection model embeds and represents the full meteorological elements to obtain a meteorological feature map; the association learning layer of the meteorological detection model performs a preset number of association learning on the meteorological feature map to obtain meteorological association features; the meteorological association features are processed by the forecast layer of the meteorological detection model to obtain the meteorological forecast result of the meteorological factor at the next moment.
[0057] It should be noted that the deep neural network model in this application is M2SNet, which takes all meteorological elements as input and single meteorological elements, that is, single meteorological factors, as output. M2SNet is an overall architecture of embedding layer-association learning layer-forecasting layer. In the embedding layer, in order to reduce the parameter scale of calculating all meteorological elements, CNN (Convolutional Neural Network) with no overlapping steps is used to embed and encode all meteorological elements to obtain meteorological feature maps; the association learning layer uses Swin Transformer (a deep learning architecture based on the transformer model) architecture to implement association learning and obtain meteorological association features, while also making full use of the advantage of Swin Transformer's lower computational complexity compared to the basic Transformer; in order to adapt to the total number of features of different meteorological factors, the forecast layer uses MLP (Multilayer Perceptron) to implement forecast output and obtain the meteorological forecast results of the meteorological factors at the next moment.
[0058] In order to better understand the process of the above-mentioned weather forecasting method, the above-mentioned weather forecasting method is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.
[0059] With the development of new energy and the construction of large bases, remote areas have become the first choice for the construction of many large bases. However, with the increasing impact of global climate change and frequent natural disasters, large bases are located with few observation stations and occupy a large area, which makes it easy for early warnings to be delayed and more vulnerable to the impact and shock of natural disasters. Therefore, the accuracy and timeliness of weather forecasts play a vital role in reducing the losses caused by natural disasters. Traditional weather forecasting methods mainly rely on numerical weather forecast models and the experience of meteorologists, which often have limitations when dealing with complex and changeable weather systems.
[0060] In recent years, the rapid development of artificial intelligence (AI) technology has brought new opportunities to the field of weather forecasting. AI technology, especially machine learning and deep learning, has demonstrated its powerful data processing and pattern recognition capabilities in many fields. Applying AI technology to weather forecasting can achieve in-depth mining and analysis of a large amount of meteorological data, thereby revealing the deep laws of weather changes and improving the accuracy and efficiency of forecasts. Artificial intelligence has been applied to various fields such as short-term forecasting, El Niño forecasting, numerical forecast model interpretation, remote sensing, and extreme weather event identification and prediction. For example, in the problem of short-term precipitation forecasting, researchers have developed many short-term precipitation forecasting methods based on Doppler radar echo data and machine learning. Other researchers have used satellite cloud images (GOES) and radar data (MRMS) to design an instant precipitation forecast model based on convolutional neural networks, recurrent neural networks, and attention mechanisms to achieve precipitation forecasting.
[0061] High-resolution weather forecasting refers to forecasting meteorological variables with high temporal and spatial resolution. High-resolution forecasting can provide more detailed meteorological information, which is of great significance for understanding and predicting extreme weather events. However, high-resolution forecasting faces problems such as high computational complexity and large data requirements. Therefore, how to use AI technology to improve the accuracy and efficiency of high-resolution weather forecasting has become an important research direction in the field of meteorology.
[0062] The optional embodiment of the present application obtains the full meteorological elements at the current moment; the full meteorological elements include multiple meteorological factors; and according to the categories of the multiple meteorological factors, the full meteorological elements are forecasted, so that the meteorological forecast results of the multiple meteorological factors at the next moment can be obtained; the meteorological forecast results are aggregated to obtain the predicted full meteorological elements at the next moment of the current moment; the iterative process is further carried out, the predicted full meteorological elements at the next moment are used as new full meteorological elements, and the steps of forecasting the full meteorological elements according to the categories of multiple meteorological factors are returned to continue to execute until the preset iteration conditions are met, and the meteorological forecast results of multiple meteorological factors at the target moment are obtained. In the meteorological forecast process, by carrying out targeted meteorological forecasts based on the full meteorological elements according to the categories of multiple meteorological factors, the accuracy of the meteorological forecast is improved. Since the targeted meteorological forecast is carried out according to the category, and the meteorological forecast results of multiple meteorological factors at the target moment can be obtained after iteration, the computing power demand is reduced, and the efficiency of the meteorological forecast is effectively improved. Therefore, this application proposes a weather forecasting method that fully utilizes limited computing resources to achieve iterative forecasting of high-resolution meteorological elements.
[0063] Specifically, the multi-meteorological forecast method proposed in this application is as follows: Figure 3 shown. Figure 3 The training phase is shown. With all meteorological elements as input, the deep neural network architecture M2SNet proposed in this application outputs each meteorological element, that is, the forecast value of the sample meteorological factor, and a meteorological detection model is trained separately for each sample meteorological factor. Specifically, the sample meteorological factor 1, the sample meteorological factor 2, and the sample meteorological factor N are integrated to obtain the sample full meteorological elements, and then the meteorological detection model 1 corresponding to the sample meteorological factor 1, the meteorological detection model 2 corresponding to the sample meteorological factor 2, and the meteorological detection model N corresponding to the sample meteorological factor N are trained respectively through the neural network model 1, the neural network model 2, and the neural network model N.
[0064] Figure 4 The iterative forecasting stage is demonstrated. The full meteorological elements obtained by integrating various meteorological factors are used as input. The meteorological detection model corresponding to each meteorological factor at time T0 is used to obtain the forecast result of each meteorological factor at time T1. Then all the forecast results are integrated to make a forecast for the next time period. This is repeated many times to obtain the forecast result at time TN, thereby realizing long-term iterative forecasting of high-resolution meteorological elements.
[0065] Compared with the forecasting network with full-factor input and full-factor output, this method can significantly reduce the computing power resources required for single model training. During integrated iterations, since only the pre-trained model is needed for inference, it does not require a large amount of computing power support, effectively achieving a balance between forecasting capabilities and computing power requirements.
[0066] Among them, the deep neural network architecture proposed in this application is M2SNet, which takes all meteorological elements as input and single meteorological elements as output. The structure of M2SNet is as follows Figure 5 As shown in the figure, it is the overall architecture of embedding layer-association learning layer-forecasting layer. In the embedding layer, in order to reduce the parameter scale of calculating all factors, CNN with no overlapping steps is used to embed and encode meteorological factors; the association learning layer uses the Swin Transformer architecture to realize association learning, and at the same time, it can fully utilize the advantage of Swin Transformer's lower computational complexity compared to the basic Transformer; in order to adapt to the dimensions of different factors, the forecasting layer uses MLP to realize forecast output. The basic network architecture of M2SNet is shown in the figure. Figure 5 As shown in the figure, the embedding layer and the associated learning layer M2SNet1-M2SNetn share the same network architecture, and the forecasting layer changes the number of neurons in the forecasting layer accordingly according to the different dimensions of the meteorological elements.
[0067] The following is a detailed introduction to the technical details of the integrated forecasting method for multiple meteorological elements and the deep neural network architecture M2SNet.
[0068] Meteorological element integration: In order to reduce computing resource consumption, a simple splicing operation is used to integrate multiple meteorological elements. Due to the different dimensions of different meteorological elements, all meteorological elements are first converted into 3D before splicing, and then the splicing operation is performed.
[0069] Embedding layer: Use a single-layer convolutional neural network for embedding representation to obtain meteorological feature maps from meteorological elements.
[0070] Association learning layer: It is implemented based on the Swin Transformer architecture. The structure in a separate module is: layer normalization -> multi-head self-attention mechanism -> residual connection -> layer normalization -> single-layer MLP -> residual connection. Layer normalization and residual connection are to avoid gradient disappearance. The multi-head self-attention mechanism adopts the Multi-headSelf Attention proposed in Transformer to achieve association learning between different blocks. This module can be repeated N times, where N is not equal to 0, to build networks of different depths and parameter quantities according to different computing power and application requirements.
[0071] Forecast layer: A two-layer MLP is used. The number of neurons in the second layer is the total feature number of the output forecast meteorological elements. The number of neurons in the first layer is k times that of the second layer. k is generally set to 4. Layer normalization is used between the two layers of neurons to avoid gradient disappearance, and ReLU is used as the nonlinear activation function.
[0072] This application focuses on proposing a weather forecasting method, which effectively alleviates the high computing power requirements of artificial intelligence high-resolution multi-meteorological element forecasting. In addition, based on the scenario characteristics of the multi-meteorological element integrated forecasting method, this application adaptively proposes a deep neural network architecture M2SNet for forecasting single meteorological elements with full meteorological element input.
[0073] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0074] The present application also provides a structural block diagram of a weather forecasting device. Figure 6 is a structural block diagram of a weather forecasting device according to an embodiment of the present application; Figure 6 As shown, including:
[0075] The acquisition module 62 is used to acquire all meteorological elements at the current moment; the all meteorological elements include multiple meteorological factors;
[0076] A prediction module 64 is used to carry out a meteorological prediction for all meteorological elements according to the categories of the multiple meteorological factors, and obtain meteorological prediction results of the multiple meteorological factors at the next moment;
[0077] Aggregation module 66, used for aggregating the meteorological forecast results to obtain the predicted full meteorological elements at the next moment of the current moment;
[0078] The prediction module 64 is also used to take the predicted full meteorological elements at the next moment as new full meteorological elements, return to the categories of the multiple meteorological factors, respectively carry out meteorological forecasts for the full meteorological elements, and continue to execute the steps of obtaining the meteorological forecast results of the multiple meteorological factors at the next moment until the preset iteration conditions are met, and obtain the meteorological forecast results of the multiple meteorological factors at the target moment.
[0079] In an exemplary embodiment, the prediction module 64 is also used to determine the meteorological detection models corresponding to each category according to the categories of the multiple meteorological factors; input the full meteorological elements into each meteorological detection model, and each meteorological detection model respectively develops the meteorological forecast of the category to which it belongs based on the full meteorological elements, to obtain the meteorological forecast results of the multiple meteorological factors at the next moment.
[0080] In an exemplary embodiment, the device also includes a training module; the training module is used to obtain multiple sample meteorological factors; based on the sample meteorological factors, a sample full meteorological element is obtained; the sample full meteorological elements are input into multiple neural network models to be trained, and the multiple neural network models to be trained are respectively trained for the sample full meteorological elements until a preset condition is met, thereby obtaining each of the trained meteorological detection models.
[0081] In an exemplary embodiment, the training module is also used to carry out training for any neural network model to be trained by adopting the following steps: based on the neural network model to be trained, meteorological forecasting is performed on the sample full meteorological elements to obtain sample meteorological forecast results; the loss between the sample meteorological forecast results and the sample meteorological actual results of the target sample meteorological factors in the sample full meteorological elements is determined; the parameters of the neural network model to be trained are adjusted according to the loss until the preset conditions are met, and a trained meteorological detection model is obtained.
[0082] In an exemplary embodiment, the training module is also used to perform dimensional integration based on the sample meteorological factors to obtain multiple sample meteorological factors of the same dimension; and to splice the multiple sample meteorological factors of the same dimension to obtain the sample full meteorological elements.
[0083] In an exemplary embodiment, the meteorological detection model includes an embedding layer, an association learning layer and a forecast layer; the prediction module 64 is also used to determine the meteorological forecast result for any meteorological factor at the next moment, and the following steps are used to carry out the determination: all meteorological elements are input into the meteorological detection model, and the embedding layer of the meteorological detection model embeds and represents the all meteorological elements to obtain a meteorological feature map; the association learning layer of the meteorological detection model carries out a preset number of association learning on the meteorological feature map to obtain meteorological association features; the meteorological association features are processed by the forecast layer of the meteorological detection model to obtain the meteorological forecast result of the meteorological factor at the next moment.
[0084] In an exemplary embodiment, the prediction module 64 is also used to perform dimensional integration based on each of the meteorological forecast results to obtain multiple meteorological forecast results of the same dimension; and to splice the multiple meteorological forecast results of the same dimension to obtain the predicted full meteorological elements for the next moment of the current moment.
[0085] Through the above device, by obtaining the full meteorological elements at the current moment; the full meteorological elements include multiple meteorological factors; and according to the categories of the multiple meteorological factors, the full meteorological elements are forecasted, so that the meteorological forecast results of the multiple meteorological factors at the next moment can be obtained; the meteorological forecast results are aggregated to obtain the predicted full meteorological elements at the next moment of the current moment; further expand the iteration process, take the predicted full meteorological elements at the next moment as new full meteorological elements, return to the steps of forecasting the full meteorological elements according to the categories of multiple meteorological factors, and obtain the meteorological forecast results of multiple meteorological factors at the next moment respectively, and continue to execute until the preset iteration conditions are met, and the meteorological forecast results of multiple meteorological factors at the target moment are obtained. In the meteorological forecast process, by carrying out targeted meteorological forecasts based on the full meteorological elements according to the categories of multiple meteorological factors, the accuracy of the meteorological forecast is improved. Since the targeted meteorological forecast is carried out according to the category, and the meteorological forecast results of multiple meteorological factors at the target moment can be obtained after iteration, the computing power demand is reduced, and the efficiency of the meteorological forecast is effectively improved.
[0086] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0087] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0088] S1, obtaining all meteorological elements at the current moment; the all meteorological elements include multiple meteorological factors;
[0089] S2, conducting meteorological forecasting for all meteorological elements according to the categories of the multiple meteorological factors, and obtaining meteorological forecast results of the multiple meteorological factors at the next moment respectively;
[0090] S3, aggregating the weather forecast results to obtain the predicted full weather elements at the next moment of the current moment;
[0091] S4, the predicted full meteorological elements at the next moment are taken as new full meteorological elements, and the meteorological forecast is carried out for the full meteorological elements according to the categories of the multiple meteorological factors respectively, and the step of obtaining the meteorological forecast results of the multiple meteorological factors at the next moment respectively is continued until the preset iteration conditions are met, and the meteorological forecast results of the multiple meteorological factors at the target moment are obtained.
[0092] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0093] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0094] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0095] S1, obtaining all meteorological elements at the current moment; the all meteorological elements include multiple meteorological factors;
[0096] S2, conducting meteorological forecasting for all meteorological elements according to the categories of the multiple meteorological factors, and obtaining meteorological forecast results of the multiple meteorological factors at the next moment respectively;
[0097] S3, aggregating the weather forecast results to obtain the predicted full weather elements at the next moment of the current moment;
[0098] S4, the predicted full meteorological elements at the next moment are taken as new full meteorological elements, and the meteorological forecast is carried out for the full meteorological elements according to the categories of the multiple meteorological factors respectively, and the step of obtaining the meteorological forecast results of the multiple meteorological factors at the next moment respectively is continued until the preset iteration condition is met, and the meteorological forecast results of the multiple meteorological factors at the target moment are obtained.
[0099] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0100] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0101] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0102] An embodiment of the present application also provides a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.
[0103] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0104] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0105] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A weather forecasting method, characterized in that: include: Get all meteorological elements at the current moment; The full meteorological elements include multiple meteorological factors; According to the categories of the multiple meteorological factors, a meteorological forecast is carried out for the all meteorological elements to obtain meteorological forecast results of the multiple meteorological factors at the next moment respectively; Aggregating the weather forecast results to obtain the predicted full weather elements for the next moment of the current moment; The predicted full meteorological elements at the next moment are taken as new full meteorological elements, and meteorological forecasts are carried out on the full meteorological elements according to the categories of the multiple meteorological factors respectively. The step of obtaining the meteorological forecast results of the multiple meteorological factors at the next moment respectively is continued until the preset iteration conditions are met, and the meteorological forecast results of the multiple meteorological factors at the target moment are obtained.
2. The method according to claim 1, characterized in that The step of carrying out a meteorological forecast for all meteorological elements according to the categories of the multiple meteorological factors to obtain meteorological forecast results of the multiple meteorological factors at the next moment respectively includes: According to the categories of the plurality of meteorological factors, determining meteorological detection models corresponding to the categories respectively; The total meteorological elements are input into each meteorological detection model, and each meteorological detection model respectively develops meteorological forecasts of the corresponding categories based on the total meteorological elements to obtain meteorological forecast results of the multiple meteorological factors at the next moment.
3. The method according to claim 2, characterized in that The training steps of each of the meteorological detection models include: Obtain multiple sample meteorological factors; Based on the sample meteorological factors, obtaining the sample full meteorological elements; The sample's full meteorological elements are input into a plurality of neural network models to be trained, and the plurality of neural network models to be trained respectively perform training on the sample's full meteorological elements until preset conditions are met, thereby obtaining the trained meteorological detection models.
4. The method according to claim 3, characterized in that The step of inputting the sample full meteorological elements into a plurality of neural network models to be trained, and having the plurality of neural network models to be trained respectively train the sample full meteorological elements until a preset condition is met, and obtaining each of the meteorological detection models that have been trained, comprises: For any neural network model to be trained, the following steps are used to train it: Based on the neural network model to be trained, performing meteorological forecasting on all meteorological elements of the sample to obtain a sample meteorological forecast result; Determine the loss between the sample meteorological forecast result and the sample meteorological actual result of the target sample meteorological factor in the sample full meteorological elements; The parameters of the neural network model to be trained are adjusted according to the loss until the preset conditions are met, thereby obtaining a trained meteorological detection model.
5. The method according to claim 3, characterized in that: The obtaining of the sample full meteorological elements based on the sample meteorological factors includes: Performing dimensional integration based on the sample meteorological factors to obtain multiple sample meteorological factors of the same dimension; The multiple sample meteorological factors of the same dimension are spliced to obtain the sample full meteorological elements.
6. The method according to claim 2, characterized in that The meteorological detection model includes an embedding layer, an association learning layer, and a forecasting layer; the full meteorological elements are input into each of the meteorological detection models, and each of the meteorological detection models respectively develops a meteorological forecast of the category to which it belongs based on the full meteorological elements, and obtains meteorological forecast results of the multiple meteorological factors at the next moment, including: The following steps are used to determine the meteorological forecast results for any meteorological factor at the next moment: Inputting the full meteorological elements into the meteorological detection model, embedding and representing the full meteorological elements by the embedding layer of the meteorological detection model, and obtaining a meteorological characteristic map; The meteorological detection model's association learning layer performs association learning on the meteorological feature graph for a preset number of times to obtain meteorological association features; The meteorological correlation features are processed through the forecast layer of the meteorological detection model to obtain the meteorological forecast results of the meteorological factors at the next moment.
7. The method according to claim 1, characterized in that The aggregating the meteorological forecast results to obtain the predicted full meteorological elements at the next moment of the current moment includes: Performing dimensional integration based on each of the weather forecast results to obtain multiple weather forecast results of the same dimension; The multiple meteorological forecast results of the same dimension are spliced together to obtain the predicted full meteorological elements for the next moment of the current moment.
8. A weather forecasting device, characterized in that: include: The acquisition module is used to obtain all meteorological elements at the current moment; The full meteorological elements include multiple meteorological factors; A prediction module, used to carry out meteorological prediction for all meteorological elements according to the categories of the multiple meteorological factors, and obtain meteorological prediction results of the multiple meteorological factors at the next moment; An aggregation module, used for aggregating the meteorological forecast results to obtain the predicted full meteorological elements at the next moment of the current moment; The prediction module is also used to take the predicted full meteorological elements at the next moment as new full meteorological elements, return to the categories of the multiple meteorological factors, respectively carry out meteorological forecasts for the full meteorological elements, and continue to execute the steps of obtaining the meteorological forecast results of the multiple meteorological factors at the next moment until the preset iteration conditions are met, and obtain the meteorological forecast results of the multiple meteorological factors at the target moment.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.