CN-122018043-A - Method and device for predicting weather and electronic equipment
Abstract
The embodiment of the disclosure relates to a method and a device for predicting weather and electronic equipment. The method includes generating static, dynamic, temporal and spatial features associated with multi-source weather data based on the multi-source weather data, the multi-source weather data including a plurality of pixels having corresponding weather static and weather dynamic data, the weather dynamic data including weather observation data for one or more historical time points, the weather observation data including earth surface observation data and vertical observation data, the vertical observation data including barometric pressure layer observation data for one or more barometric pressure layers. The method further comprises the step of generating weather prediction results of the future preset time through a weather prediction model based on static characteristics, dynamic characteristics, time characteristics and space characteristics, wherein the weather prediction model comprises a model obtained by training an initial neural network model based on a Swin-transducer mechanism and a mixed attention mechanism by using a training set. The method can improve the accuracy and adaptability of weather prediction.
Inventors
- ZHOU ZHENGYI
- WANG ZHEJIN
- DAI REN
- LV WEI
- CHEN WEICHENG
- Zhang Kejiong
- WANG SHENG
- GUO FENG
Assignees
- 浙江省交通投资集团有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251112
Claims (10)
- 1. A method (200) for predicting weather, comprising: Generating (202) static, dynamic, temporal, and spatial features associated with the multi-source weather data based on the multi-source weather data, wherein the multi-source weather data includes a plurality of pixels having corresponding weather static and weather dynamic data, the weather dynamic data including weather observations at one or more historical points in time, the weather observations including surface observations and vertical observations, the vertical observations including barometric pressure layer observations corresponding to one or more barometric pressure layers, and And generating (204) weather prediction results of a future preset time through a weather prediction model based on the static feature, the dynamic feature, the time feature and the space feature, wherein the weather prediction model comprises a model obtained by training an initial neural network model based on a Swin-transducer mechanism and a mixed attention mechanism by using a training set.
- 2. The method of claim 1, wherein the weather forecast includes a forecast weather bias for the future preset time, and wherein the generating static, dynamic, temporal, and spatial features associated with the multi-source weather data based on the multi-source weather data comprises: performing parameter normalization on the meteorological dynamic data of the multi-source meteorological data to generate meteorological dynamic standardized data of the multi-source meteorological data, and Static, dynamic, temporal and spatial features associated with the multi-source weather data are generated based on the weather static data, the weather dynamic standardized data, the historical time points and the pixels, respectively, of the multi-source weather data.
- 3. The method of claim 2, wherein the initial neural network model comprises an encoder, a decoder, and a task adaptation head, wherein the training of the initial neural network comprises a first training process that determines model parameters of the encoder and the decoder based on the training set and a second training process that determines model parameters of the multi-task adaptation head based on the training set, and wherein the weather prediction results comprise global weather prediction results generated by the encoder of the trained weather prediction model and target task prediction results generated by the task adaptation head of the trained weather prediction model.
- 4. The method of claim 3, wherein the training set comprises a plurality of first training samples, the first training samples comprising historical multi-source weather data and historical sample true weather deviations for the historical multi-source weather data, and the first training process of the initial neural network model comprises: Generating first unmasked data and random mask data related to the first training samples based on the first training samples, wherein the random mask data is local random mask data or global random mask data generated based on the first training samples; generating second unmasked data of the first training samples by the encoder based on a mixed attention mechanism based on the first unmasked data; Generating a sample predicted climate bias for the first training sample by the decoder based on a mixed attention mechanism based on the second unmasked data and the masked data, and Model parameters of the encoder and the decoder are adjusted based on the historical sample true climate bias and sample predicted climate bias of the first training sample.
- 5. The method of claim 4, wherein the generating first unmasked data and random masking data associated with the training samples based on the first training samples comprises: Carrying out parameter standardization on the weather dynamic data of the historical multi-source weather data to generate weather dynamic standardized data of the historical multi-source weather data; generating static, dynamic, temporal and spatial features related to the historical multi-source weather data based on the weather static data, weather dynamic standardized data, historical time points and pixels, respectively, of the historical multi-source weather data, and The first unmasked data and the random masking data are generated based on static features, dynamic features, temporal features, and spatial features associated with the historical multi-source weather data.
- 6. The method of claim 5, wherein the first unmasked data is stitched based on static, temporal, and spatial features of the historical multi-source weather data, and the random masking data is generated based on a third unmasked feature stitched of dynamic, temporal, and spatial features of the historical multi-source weather data.
- 7. The method of any of claims 3-6, wherein the encoder comprises at least two transducer modules and the at least two transducer modules alternately perform local attention and global attention mechanisms on the first mask data, and The decoder includes at least two transducer modules that alternately perform local attention and global attention mechanisms on the second mask data, and the decoder calculates attention based on a shift window.
- 8. The method of claim 2, wherein the training set comprises a plurality of second training samples, the second training samples comprising historical multi-source weather data and target task real results for a future preset time corresponding to the historical multi-source weather data, and the second training process of the initial neural network model comprises: Generating first unmasked data and random mask data related to the second training samples based on the second training samples, wherein the random mask data is local random mask data or global random mask data generated based on the second training samples; Generating second unmasked data of the second training samples by an encoder that completes a first training process based on the first unmasked data; Generating, by a decoder that completes a first training process, sample weather prediction results for the second training samples based on the second unmasked data and the masked data; Generating the sample target task prediction result through the task adaptation head based on the sample weather prediction result, and And adjusting model parameters of a task adaptation head based on the target task real result and the sample target task prediction result.
- 9. Apparatus (400) for predicting weather, characterized in that it comprises: A feature generation module configured to generate static, dynamic, temporal, and spatial features related to the multi-source weather data based on the multi-source weather data, wherein the multi-source weather data includes a plurality of pixels having corresponding weather static and weather dynamic data including weather observation data for one or more historical time points, the weather observation data including surface observation data and vertical observation data including barometric pressure layer observation data for one or more barometric pressure layers, and And the result generation module is configured to generate weather prediction results of a future preset time through a trained weather prediction model based on the static feature, the dynamic feature, the time feature and the space feature, wherein the weather prediction model comprises a model obtained by training an initial neural network model based on a Swin-transducer mechanism and a mixed attention mechanism by using a training set.
- 10. An electronic device (500), comprising: one or more processors, and Memory associated with the one or more processors for storing program instructions which, when read for execution by the one or more processors, perform the steps of the method of one of claims 1-8.
Description
Method and device for predicting weather and electronic equipment Technical Field The embodiment of the disclosure relates to the technical field of weather prediction, in particular to a method, a device and electronic equipment for predicting weather in a highway scene. Background By using artificial intelligence techniques, particularly machine learning algorithms, the collected historical and real-time data can be analyzed to identify patterns and predict future weather conditions. The expressway microclimate prediction based on the artificial intelligence technology can improve the safety of the expressway under severe weather conditions, reduce traffic accidents, optimize traffic flow and provide timely decision support for drivers and traffic management departments. In order to achieve accurate microclimate predictions, artificial intelligence techniques are required to be able to capture the complex correlation of small scale weather evolution and large scale circulation in the meteorological predictions. Disclosure of Invention Embodiments of the present disclosure provide a method, apparatus, and electronic device for predicting weather, which aim to address one or more of the above problems, as well as other potential problems. According to a first aspect of the present disclosure, there is provided a method for predicting weather, the method comprising generating static, dynamic, temporal and spatial features associated with multi-source weather data based on the multi-source weather data, wherein the multi-source weather data comprises a plurality of pixels having corresponding weather static and weather dynamic data, the weather dynamic data comprising weather observation data for one or more historical time points, the weather observation data comprising surface observation data and vertical observation data, the vertical observation data comprising barometric pressure layer observation data for one or more barometric pressure layers. In addition, the method further comprises the step of generating weather prediction results of the future preset time through a weather prediction model based on static characteristics, dynamic characteristics, time characteristics and space characteristics, wherein the weather prediction model comprises a model obtained by training an initial neural network model based on a Swin-transducer mechanism and a mixed attention mechanism by using a training set. According to a second aspect of the present disclosure, an apparatus for predicting weather is provided. The apparatus includes a feature generation module configured to generate static features, dynamic features, temporal features, and spatial features related to multi-source weather data based on the multi-source weather data, wherein the multi-source weather data includes a plurality of pixels having corresponding weather static data and weather dynamic data, the weather dynamic data includes weather observation data for one or more historical time points, the weather observation data includes earth surface observation data, and vertical observation data, the vertical observation data includes barometric pressure layer observation data for one or more barometric pressure layers. The device further comprises a result generation module configured to generate weather prediction results for a future preset time through a trained weather prediction model based on the static features, the dynamic features, the time features and the spatial features, wherein the weather prediction model comprises a model obtained by training an initial neural network model based on a Swin-transducer mechanism and a mixed attention mechanism by using a training set. According to a third aspect of the present disclosure, an electronic device is provided. The electronic device includes one or more processors. The electronic device further comprises a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the steps of the method according to the first aspect. Drawings The above, as well as additional purposes, features, and advantages of embodiments of the present disclosure will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown by way of example, and not by way of limitation. FIG. 1 illustrates a schematic diagram of an example environment in which embodiments according to the present disclosure may be implemented. FIG. 2 illustrates a flow chart of a method for predicting weather in accordance with an embodiment of the present disclosure. Fig. 3A illustrates a schematic process diagram of a portion of a first training sample in a first training process of an initial neural network model, according to an embodiment of the present disclosure. Fig. 3B illustrates a schematic