Method and device for determining target meteorological data, storage medium and electronic device

By generating and using the meteorological element prediction model trained by mask value, the problem of insufficient prediction accuracy of meteorological data is solved, the prediction effect of meteorological data is improved, and the model's learning of meteorological changes is enhanced.

CN119179859APending Publication Date: 2024-12-24HUANENG CLEAN ENERGY RES INST
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411213657.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The existing meteorological data prediction methods are insufficient in prediction accuracy due to data redundancy and similarity, especially in the gradual changes in adjacent layer data in meteorological large models, which leads to the model's replication of data, affecting the learning and prediction effect of meteorological change associations.

Method used

By analyzing the monitored current meteorological data, the mask values ​​of different meteorological elements are generated, the mask values ​​are generated using full random mask and multi-layer vertical masking, and the meteorological element prediction model is trained using self-supervised learning and Transformer architecture, and fine-tuning it Pre-train the model to improve prediction accuracy.

Benefits of technology

It improves the prediction accuracy of meteorological data, enhances the model's learning of the correlation of changes of different meteorological factors, and improves the effect of meteorological data prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179859A_ABST
    Figure CN119179859A_ABST
Patent Text Reader

Abstract

The invention discloses a target meteorological data determination method and device, a storage medium and an electronic device, and the method comprises the steps: carrying out the analysis of monitored current meteorological data, and obtaining the meteorological elements of the current meteorological data; sending input data generated based on the current meteorological element value of the meteorological element and the mask value corresponding to the current meteorological element value to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model; and determining target meteorological data based on the predicted meteorological element values. By adopting the technical scheme, the technical problem of how to improve the prediction accuracy of the meteorological data is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of meteorological data processing, and in particular, to a method and device for determining target meteorological data, a storage medium, and an electronic device. Background Art

[0002] At present, the method of weather forecasting based on the calculation results of meteorological values ​​such as wind and light is generally unstable due to the influence of meteorological conditions. With the development of large model technology, the application of large model technology to achieve weather forecasting has become a new research direction.

[0003] In the field of meteorological large models, following the pre-training method of visual large models, by covering up the meteorological data of a part of the area and letting the model complete it, the model can learn the association of atmospheric changes in space, or train the model to learn general capabilities such as contextual semantic association. However, the existing method is to randomly generate masks at the positions on the matrix of all meteorological elements at different altitudes, so as to train the model to complete the meteorological data of the masked part. Since the meteorological data of adjacent layers are very similar, this method faces the problem of data redundancy. Taking air pressure as an example, there is air pressure data at each altitude, so the data of the meteorological element of air pressure at a single moment is itself presented in the form of a 3D matrix, and the change of meteorological elements between adjacent layers is gradual (analogous to the small change of adjacent frames in a video). Therefore, when the mask is generated by randomly generating masks at all positions, the model can easily "copy" a piece of data from the same position of the adjacent layer, so that the effect of the model in learning the association of atmospheric changes in space will be greatly reduced, and the prediction effect of meteorological data will also be affected. Therefore, there is currently a technical problem of how to improve the prediction accuracy of meteorological data.

[0004] With regard to the technical problem of how to improve the prediction accuracy of meteorological data in related technologies, no effective solution has been proposed so far.

[0005] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention

[0006] The embodiments of the present application provide a method and device for determining target meteorological data, a storage medium, and an electronic device to at least solve the technical problem of how to improve the prediction accuracy of meteorological data.

[0007] According to one aspect of an embodiment of the present application, a method for determining target meteorological data is provided, comprising: parsing the monitored current meteorological data to obtain meteorological elements included in the current meteorological data; sending input data generated by a mask value corresponding to a current meteorological element value of the meteorological element and the current meteorological element value to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model; and determining the target meteorological data based on the predicted meteorological element value.

[0008] In an exemplary embodiment, after parsing the monitored current meteorological data to obtain the meteorological elements included in the current meteorological data, the method also includes: determining meteorological element values ​​corresponding to different meteorological elements, the meteorological element values ​​including at least one of the following: a first meteorological element value including a single altitude layer, a second meteorological element value including multiple altitude layers; determining the current meteorological element value based on the first meteorological element value; and / or determining the current meteorological element value based on the second meteorological element value.

[0009] In an exemplary embodiment, before sending input data generated by a mask value corresponding to a current meteorological element value of the meteorological element to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model, the method also includes: when the meteorological element value includes the first meteorological element value, generating a mask value corresponding to the first meteorological element value using a fully random mask generation method; wherein, generating the mask value corresponding to the first meteorological element value using a fully random mask generation method includes: determining a vector position corresponding to the first meteorological element value, wherein all vector values ​​of the vector position have been set to a first preset value; randomly selecting a vector position from multiple vector positions corresponding to all vector values, and updating the first preset value of the one vector position to a second preset value, wherein the first preset value is greater than the second preset value.

[0010] In an exemplary embodiment, before sending input data generated by a mask value corresponding to the current meteorological element value of the meteorological element to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model, the method also includes: when the meteorological element value includes the second meteorological element value, generating a mask value corresponding to the second meteorological element value by using a multi-layer vertical mask generation method; wherein, generating the mask value corresponding to the second meteorological element value by using a multi-layer vertical mask generation method includes: for each altitude layer in the multiple altitude layers, obtaining a sub-meteorological element value corresponding to each altitude layer from the second meteorological element value, and generating a sub-mask value corresponding to the sub-meteorological element value by using a fully random mask generation method; and determining the splicing result of multiple sub-mask layers as the mask value corresponding to the second meteorological element value.

[0011] In an exemplary embodiment, before sending input data generated by the current meteorological element value of the meteorological element and the mask value corresponding to the current meteorological element value to a meteorological element prediction model to obtain the predicted meteorological element value output by the meteorological element prediction model, the method also includes: obtaining the historical meteorological element value corresponding to the meteorological element and the mask value corresponding to the historical meteorological element value; bitwise multiplying the historical meteorological element value and the mask value corresponding to the historical meteorological element value to obtain the masked result of the historical meteorological element; using the masked result as the input sample of the initial model and using the preset training label as the output sample of the initial model to train the initial model; when it is determined that the model loss value of the initial model during the training process is less than the preset loss value, determining that the training of the initial model is completed and obtaining the pre-trained model; and fine-tuning the pre-trained model to obtain the meteorological element prediction model.

[0012] In an exemplary embodiment, the pre-trained model is fine-tuned, including: fixing the encoding parameters of the encoding part of the pre-trained model, using the historical meteorological element values ​​at any historical moment as input samples, and using the historical meteorological element values ​​at historical moments after any historical moment as output samples for the pre-trained model, and fine-tuning the network parameters of the decoding part of the pre-trained model to train the pre-trained model, thereby obtaining the meteorological element prediction model.

[0013] According to another aspect of an embodiment of the present application, a device for determining target meteorological data is also provided, including: a parsing module, used to parse the monitored current meteorological data to obtain the meteorological elements included in the current meteorological data; an obtaining module, used to send input data generated by a mask value corresponding to the current meteorological element value based on the meteorological element to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model; and a determination module, used to determine the target meteorological data based on the predicted meteorological element value.

[0014] According to another aspect of the embodiment 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-mentioned method for determining target meteorological data when running.

[0015] According to another aspect of an embodiment of the present application, an electronic device is also 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 for determining the target meteorological data through the computer program.

[0016] According to another aspect 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 one of the above method embodiments are implemented.

[0017] Through the present application, the meteorological elements included in the current meteorological data are obtained by parsing the monitored current meteorological data; the input data generated by the current meteorological element value based on the meteorological element and the mask value corresponding to the current meteorological element value are sent to the meteorological element prediction model to obtain the predicted meteorological element value output by the meteorological element prediction model; the target meteorological data is determined based on the predicted meteorological element value, and the predicted meteorological element value is obtained using the meteorological element prediction model that has learned the correlation between different meteorological elements, so as to predict the meteorological data, thereby solving the technical problem of how to improve the prediction accuracy of meteorological data, thereby improving the prediction accuracy of meteorological data. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for determining target meteorological data in an embodiment of the present application;

[0021] Figure 2 is a flow chart of a method for determining target meteorological data according to an embodiment of the present application;

[0022] Figure 3 is a flow chart of a method for determining target meteorological data according to an embodiment of the present application;

[0023] Figure 4 It is a structural block diagram of a device for determining target meteorological data 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 interchangeable 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 of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a method for determining target meteorological data in an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Central Processing Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0027] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining target meteorological data in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. 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 mobile 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 the mobile 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 method for determining target meteorological data is provided. Figure 2 is a flow chart of a method for determining target meteorological data according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:

[0030] Step S202: parsing the monitored current meteorological data to obtain meteorological elements included in the current meteorological data;

[0031] Step S204: sending input data generated by the current meteorological element value of the meteorological element and the mask value corresponding to the current meteorological element value to the meteorological element prediction model to obtain the predicted meteorological element value output by the meteorological element prediction model;

[0032] Optionally, for the above input data, it can be understood that the current meteorological element and the mask value corresponding to the current meteorological element value are multiplied bit by bit, and then all the multiplication results are concatenated together to obtain.

[0033] The meteorological element value represents the specific numerical value of the meteorological element. For example, for the meteorological element of air pressure, the air pressure value is the meteorological element value.

[0034] Optionally, for example, the meteorological element prediction model can be obtained by training with a first historical meteorological element value of the meteorological element at a first historical moment, an input sample generated by a historical mask value corresponding to the historical meteorological element value, and a second historical meteorological element value of the meteorological element at a second historical moment as an output sample.

[0035] Step S206: Determine target meteorological data based on the predicted meteorological element values.

[0036] Through the above steps, the current meteorological data monitored is parsed to obtain the meteorological elements included in the current meteorological data; the input data generated by the mask value corresponding to the current meteorological element value based on the current meteorological element value of the meteorological element is sent to the meteorological element prediction model to obtain the predicted meteorological element value output by the meteorological element prediction model; the target meteorological data is determined based on the predicted meteorological element value, and the predicted meteorological element value is obtained by using the meteorological element prediction model that has learned the correlation between different meteorological elements, so as to predict the meteorological data, thereby solving the technical problem of how to improve the prediction accuracy of meteorological data, thereby improving the prediction accuracy of meteorological data.

[0037] The process of determining the target meteorological data based on the predicted meteorological element value can be understood as determining the predicted meteorological element based on the predicted meteorological element value, and determining the target meteorological data according to the predicted meteorological element. For example, if the meteorological element is high air pressure, the target meteorological data is high pressure. If the meteorological element is high surface temperature, the target meteorological data is high temperature.

[0038] In an exemplary embodiment, after parsing the monitored current meteorological data to obtain the meteorological elements included in the current meteorological data, the following technical solution is further proposed: determining the meteorological element values ​​corresponding to different meteorological elements, the meteorological element values ​​including at least one of the following: a first meteorological element value including a single altitude layer, a second meteorological element value including multiple altitude layers; determining the current meteorological element value based on the first meteorological element value; and / or determining the current meteorological element value based on the second meteorological element value.

[0039] In an exemplary embodiment, before sending input data generated by a mask value corresponding to a current meteorological element value of the meteorological element to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model, the mask value can be further generated by the following process: when the meteorological element value includes the first meteorological element value, a mask value corresponding to the first meteorological element value is generated by a fully random mask generation method; wherein the mask value corresponding to the first meteorological element value is generated by a fully random mask generation method, including: determining a vector position corresponding to the first meteorological element value, wherein all vector values ​​of the vector position have been set to a first preset value; randomly selecting a vector position from multiple vector positions corresponding to all vector values, and updating the first preset value of the one vector position to a second preset value, wherein the first preset value is greater than the second preset value. This embodiment uses a fully random mask generation method to generate a mask value corresponding to the first meteorological element value for the first meteorological element value including a single altitude layer, so that a subsequent meteorological element prediction model can use the input data generated by the mask value corresponding to the first meteorological element value based on the meteorological element to perform prediction, and then obtain the target meteorological data, thereby improving the security of the meteorological element prediction model during the prediction process.

[0040] Optionally, for example, the number of positions of the vector position is λ, satisfying 0≤λ≤X×Y.

[0041] In an exemplary embodiment, before sending input data generated by a mask value corresponding to the current meteorological element value of the meteorological element to a meteorological element prediction model to obtain the predicted meteorological element value output by the meteorological element prediction model, other methods for generating mask values ​​are further proposed, specifically including: when the meteorological element value includes the second meteorological element value, generating a mask value corresponding to the second meteorological element value by using a multi-layer vertical mask generation method; wherein, generating the mask value corresponding to the second meteorological element value by using a multi-layer vertical mask generation method includes: for each altitude layer in the multiple altitude layers, obtaining a sub-meteorological element value corresponding to each altitude layer from the second meteorological element value, and generating a sub-mask value corresponding to the sub-meteorological element value by using a fully random mask generation method; and determining the splicing result of multiple sub-mask layers as the mask value corresponding to the second meteorological element value. This embodiment uses a multi-layer vertical mask generation method to generate a mask value corresponding to the second meteorological element value for the second meteorological element value including multiple altitude layers, so that a subsequent meteorological element prediction model is used to perform prediction using the input data generated by the second meteorological element value based on the meteorological element and the mask value corresponding to the second meteorological element value, and then obtain the target meteorological data, thereby improving the security of the meteorological element prediction model during the prediction process.

[0042] Through the above embodiments, mask values ​​are generated by using a mask generation method that mixes random masks and multi-layer vertical masks for the data of single-layer meteorological elements and multi-layer meteorological elements respectively, so that the meteorological element prediction model can generate data of the masked positions in a self-supervised learning manner, thereby allowing the meteorological element prediction model to better learn the correlation between the changes of different meteorological elements in space, thereby improving the prediction accuracy of the model.

[0043] In an exemplary embodiment, before sending the input data generated by the current meteorological element value based on the meteorological element and the mask value corresponding to the current meteorological element value to the meteorological element prediction model to obtain the predicted meteorological element value output by the meteorological element prediction model, other technical solutions are further proposed: obtaining the historical meteorological element value corresponding to the meteorological element and the mask value corresponding to the historical meteorological element value; performing bitwise multiplication on the historical meteorological element value and the mask value corresponding to the historical meteorological element value to obtain the masked result of the historical meteorological element; using the masked result as the input sample of the initial model and using the preset training label as the output sample of the initial model to train the initial model; when it is determined that the model loss value of the initial model during the training process is less than the preset loss value, determining that the training of the initial model is completed and obtaining the pre-trained model; performing model fine-tuning on the pre-trained model to obtain the meteorological element prediction model.

[0044] The above initial model can be constructed by referring to the following process.

[0045] First, we build an encoding + decoding architecture, using Swin-Transformer as the basic model in the encoding part and UNet as the decoding part to reconstruct the output. UNet is a fully convolutional neural network commonly used for image segmentation or pixel-level classification / generation tasks. Here, it can be used to spatially reconstruct and output various meteorological elements.

[0046] Among them, Swin-Transformer is a visual architecture proposed by Microsoft researchers that effectively combines the advantages of CNN and Transformer models. It aims to use the inherent self-attention mechanism of Transformer to process images in a hierarchical manner similar to CNN.

[0047] In addition, although the present application uses different mask generation methods for different meteorological elements, in order to enable the model to still learn the correlation between different meteorological elements, a Transformer architecture including a self-attention mechanism is designed in the self-supervised network, so that the learning of the correlation between different meteorological elements is not lost during the model training process, thereby improving the training accuracy of the model.

[0048] In an exemplary embodiment, the following steps are further used to illustrate the implementation process of fine-tuning the pre-trained model: fix the encoding parameters of the encoding part of the pre-trained model, use the historical meteorological element values ​​at any historical moment as input samples, and use the historical meteorological element values ​​at historical moments after any historical moment as output samples to train the pre-trained model, and fine-tune the network parameters of the decoding part of the pre-trained model to train the pre-trained model, thereby obtaining the meteorological element prediction model. This embodiment fine-tunes the pre-trained model by fixing the parameters of the encoding part of the pre-trained model and only fine-tuning the network parameters of the decoding part, so as to improve the model stability and model prediction accuracy of the meteorological element prediction model.

[0049] Obviously, the embodiments described above are only some embodiments of the present application, not all embodiments. In order to better understand the above method, the above process is described below in conjunction with the embodiments, but it is not intended to limit the technical solutions of the embodiments of the present application, specifically:

[0050] In an optional embodiment, a mask generation method that mixes random masking with multi-layer vertical masking is first used to construct a model architecture of a high-resolution meteorological model (i.e., the above-mentioned meteorological element prediction model). Then, based on the mask generation method and the constructed model architecture, self-supervised pre-training of the model is implemented. The pre-trained model is then fine-tuned, and a high-resolution meteorological model is used to implement high-resolution meteorological forecasting. Figure 3 The process shown in the figure is explained. Figure 3 As shown, the implementation steps are as follows:

[0051] Step S1, first define the input data and output data, that is, define the regularized values ​​of n meteorological elements at time T0 (that is, the above-mentioned input data) as the model input, and the forecast values ​​of these n meteorological elements at time T1 (that is, the predicted meteorological element values) as the model output.

[0052] Among them, the n meteorological elements can be meteorological elements containing multiple altitude layers (that is, the second meteorological element value mentioned above), or can be meteorological elements containing a single altitude layer (that is, the first meteorological element value mentioned above).

[0053] The specific meteorological elements including multiple altitude layers and only a single altitude layer are shown in Table 1, where L, X, Y∈N, X, Y>0. For the convenience of representation, the meteorological elements including multiple altitude layers are represented by a set M. The meteorological elements that only contain a single altitude layer are represented by the set S.

[0054] Table 1 Example of meteorological elements

[0055]

[0056]

[0057] Step S2, mask generation: different mask generation methods are used for the data of single-layer meteorological elements and multi-layer meteorological elements respectively.

[0058] For the meteorological elements in the single-layer meteorological element set S, a fully random mask generation method is adopted.

[0059] That is, first generate a dimension size of R X×Y The vector MaskSingle is filled with integer 1, and then the values ​​of λ positions in the vector are all covered with 0, where λ positions are randomly selected in the vector to be filled or covered with 0, and λ must satisfy 0≤λ≤X×Y.

[0060] Generally speaking, The commonly used λ is set to 0.75×X×Y or 0.8×X×Y. At this time, the MaskSingle vector is the random mask corresponding to the meteorological element.

[0061] For the meteorological elements in the multi-layer meteorological element set M, a multi-layer vertical mask generation method is adopted.

[0062] In order to prevent the model from directly using the data of adjacent altitude layers to complete the mask during training and failing to learn the correlation between meteorological elements at different locations, a fully random mask is not used at the L×X×Y position. Instead, the same mask is used for each layer. In this way, any position that is covered at one altitude layer is also covered at other altitude layers, thus avoiding the model from directly copying data from other altitude layers.

[0063] In the specific implementation process, we first use the above-mentioned MaskSingle vector generation method and the same λ setting to generate a layer of random mask MaskSingle M ∈R X×Y , then the mask is replicated L-1 times and concatenated together to obtain the following result.

[0064] MaskMultiple = [MaskSingle M ,MaskSingle M ,...,MaskSingle M ]∈R L×X×Y .

[0065] The MaskSingle vector at this time is the vertical mask corresponding to the meteorological element.

[0066] Step S3, model construction: an encoding + decoding architecture can be constructed. Swin-Transformer is used as the basic model in the encoding part, and UNet is used to reconstruct the output in the decoding part. UNet is a fully convolutional neural network commonly used in image segmentation or pixel-level classification / generation tasks. Here, it can be used to spatially reconstruct and output various meteorological elements.

[0067] Step S4, pre-training. First, use the following formula to multiply each meteorological element by the mask corresponding to the meteorological element:

[0068]

[0069] target wf =wf.

[0070] Among them, input wf Represents the input after masking, target wf Represents the training label.

[0071] All masked inputs are concatenated using the following formula:

[0072]

[0073] TARGET=[target1,target2,...,target n ]∈R N×X×Y .

[0074] N=|S|+L×|M|, n=|S|+|M|, 1≤i≤n.

[0075] Take INPUT as the input of the model and TARGET as the label (i.e. the training target of the model) for training. After the model loss becomes stable, the pre-trained model is obtained.

[0076] Step S5, fine-tuning. By freezing the parameters of the encoding part of the pre-trained model, only the network parameters of the decoding part are fine-tuned. At this time, the input of the model is all unmasked meteorological elements at time T0, which is expressed as follows.

[0077]

[0078] wf i T0 ∈S T0 ∪M T0 .

[0079] N=|S T0 |+L×|M T0 |.

[0080] n=|S T0 |+|M T0 |, 1≤i≤n.

[0081] Among them, the set S T1 and M T1 They are the single-layer and multi-layer meteorological element sets at time T0 respectively.

[0082] The supervision target of the model is all unmasked meteorological elements at time T1, which is expressed as follows.

[0083]

[0084] wf i T1 ∈S T1 ∪M T1 .

[0085] N=|S T1 |+L×|M T1 |.

[0086] n=|S T1 |+|M T1 |.

[0087] 1≤i≤n.

[0088] Among them, the set S T1 and M T1 They are the single-layer and multi-layer meteorological element sets at time T1 respectively.

[0089] INPUT fine-tuning As model input, TARGET fine-tuning As the label (i.e. the training target of the model), the network parameters of the decoding part are fine-tuned and trained, and the final model can complete the weather forecast from time T0 to time T1.

[0090] Step S6, obtaining the model output: meteorological elements at time T1.

[0091] Through the above embodiments, the present application proposes to use a mask generation method that is a mixture of random masks and multi-layer vertical masks to generate masks for single-layer meteorological elements and multi-layer meteorological elements data, and then train the model in a self-supervised learning manner to generate data for the masked positions, so that the model can better learn the correlation between the changes of different meteorological elements in space.

[0092] In addition, although this application uses different mask generation methods for different categories of meteorological elements, in order to enable the model to still learn the correlation between different meteorological elements, a Transformer architecture including a self-attention mechanism is designed in the self-supervised network so that the correlation between different meteorological elements is not lost during the model training process. Finally, the meteorological data is predicted by using the fine-tuned model.

[0093] 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.

[0094] In this embodiment, a device for determining target meteorological data is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0095] Figure 4 : is a structural block diagram of a device for determining target meteorological data according to an embodiment of the present application, the device comprising:

[0096] The parsing module 42 is used to parse the monitored current meteorological data to obtain the meteorological elements included in the current meteorological data;

[0097] An obtaining module 44 is used to send input data generated based on the current meteorological element value of the meteorological element and the mask value corresponding to the current meteorological element value to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model;

[0098] The determination module 46 is used to determine target meteorological data based on the predicted meteorological element values.

[0099] Through the above-mentioned device, the current meteorological data monitored is analyzed to obtain the meteorological elements included in the current meteorological data; the input data generated by the mask value corresponding to the current meteorological element value based on the current meteorological element value of the meteorological element is sent to the meteorological element prediction model to obtain the predicted meteorological element value output by the meteorological element prediction model; the target meteorological data is determined based on the predicted meteorological element value, and the predicted meteorological element value is obtained using the meteorological element prediction model that has learned the correlation between different meteorological elements, so as to predict the meteorological data, thereby solving the technical problem of how to improve the prediction accuracy of meteorological data, thereby improving the prediction accuracy of meteorological data.

[0100] In an exemplary embodiment, the above-mentioned analysis module is also used to: determine the meteorological element values ​​corresponding to different meteorological elements, and the meteorological element values ​​include at least one of the following: a first meteorological element value including a single altitude layer, and a second meteorological element value including multiple altitude layers; determine the current meteorological element value based on the first meteorological element value; and / or determine the current meteorological element value based on the second meteorological element value.

[0101] In an exemplary embodiment, the above-mentioned obtaining module is also used for: before sending the input data generated by the mask value corresponding to the current meteorological element value based on the meteorological element to the meteorological element prediction model to obtain the predicted meteorological element value output by the meteorological element prediction model, when the meteorological element value includes the first meteorological element value, generating the mask value corresponding to the first meteorological element value by using a fully random mask generation method; wherein, generating the mask value corresponding to the first meteorological element value by using a fully random mask generation method includes: determining the vector position corresponding to the first meteorological element value, wherein all vector values ​​of the vector position have been set to a first preset value; randomly selecting a vector position from multiple vector positions corresponding to all the vector values, and updating the first preset value of the one vector position to a second preset value, wherein the first preset value is greater than the second preset value.

[0102] In an exemplary embodiment, the above-mentioned obtaining module is also used for: before sending the input data generated by the mask value corresponding to the current meteorological element value based on the meteorological element to the meteorological element prediction model to obtain the predicted meteorological element value output by the meteorological element prediction model, when the meteorological element value includes the second meteorological element value, generating the mask value corresponding to the second meteorological element value by using a multi-layer vertical mask generation method; wherein, generating the mask value corresponding to the second meteorological element value by using a multi-layer vertical mask generation method includes: for each altitude layer in the multiple altitude layers, obtaining the sub-meteorological element value corresponding to each altitude layer from the second meteorological element value, and generating the sub-mask value corresponding to the sub-meteorological element value by using a fully random mask generation method; and determining the splicing result of multiple sub-mask layers as the mask value corresponding to the second meteorological element value.

[0103] In an exemplary embodiment, the above-mentioned target meteorological data determination device also includes a model acquisition module, which is used to: before sending the input data generated by the current meteorological element value based on the meteorological element and the mask value corresponding to the current meteorological element value to the meteorological element prediction model to obtain the predicted meteorological element value output by the meteorological element prediction model: obtain the historical meteorological element value corresponding to the meteorological element and the mask value corresponding to the historical meteorological element value; perform bitwise multiplication on the historical meteorological element value and the mask value corresponding to the historical meteorological element value to obtain the masked result of the historical meteorological element; use the masked result as the input sample of the initial model and use the preset training label as the output sample of the initial model to train the initial model; when it is determined that the model loss value of the initial model during the training process is less than the preset loss value, determine that the initial model training is completed and obtain the pre-trained model; perform model fine-tuning on the pre-trained model to obtain the meteorological element prediction model.

[0104] In an exemplary embodiment, the above-mentioned model acquisition module is also used to: fix the encoding parameters of the encoding part of the pre-trained model, use the historical meteorological element values ​​at any historical moment as input samples, and use the historical meteorological element values ​​at historical moments after any historical moment as output samples for the pre-trained model, and fine-tune the network parameters of the decoding part of the pre-trained model to train the pre-trained model, thereby obtaining the meteorological element prediction model.

[0105] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0106] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0107] S1, analyzing the monitored current meteorological data to obtain meteorological elements included in the current meteorological data;

[0108] S2, sending input data generated by a mask value corresponding to the current meteorological element value based on the current meteorological element value to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model;

[0109] S3, determining target meteorological data based on the predicted meteorological element values.

[0110] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as 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.

[0111] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0112] 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.

[0113] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0114] S1, analyzing the monitored current meteorological data to obtain meteorological elements included in the current meteorological data;

[0115] S2, sending input data generated by a mask value corresponding to the current meteorological element value based on the current meteorological element value to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model;

[0116] S3, determining target meteorological data based on the predicted meteorological element values.

[0117] In an exemplary embodiment, 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.

[0118] 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.

[0119] 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.

[0120] An embodiment of the present application also provides a computer program, which includes computer instructions, which are 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.

[0121] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0122] 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, 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.

[0123] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for determining target meteorological data, characterized in that: include: Analyze the monitored current meteorological data to obtain meteorological elements included in the current meteorological data; Sending input data generated by a mask value corresponding to a current meteorological element value based on the meteorological element to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model; Target meteorological data is determined based on the predicted meteorological element values.

2. The method according to claim 1, characterized in that After parsing the monitored current meteorological data to obtain the meteorological elements included in the current meteorological data, the method further includes: Determine meteorological element values ​​corresponding to different meteorological elements, wherein the meteorological element values ​​include at least one of the following: a first meteorological element value including a single altitude layer, and a second meteorological element value including multiple altitude layers; determine the current meteorological element value based on the first meteorological element value; And / or, determining the current meteorological element value based on the second meteorological element value.

3. The method according to claim 2, characterized in that Before sending input data generated by a mask value corresponding to a current meteorological element value based on the meteorological element to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model, the method further includes: In the case where the meteorological element value includes the first meteorological element value, a mask value corresponding to the first meteorological element value is generated by using a fully random mask generation method; The method of generating a mask value corresponding to the first meteorological element value by using a fully random mask generation method includes: Determine a vector position corresponding to the first meteorological element value, wherein all vector values ​​of the vector position are set to a first preset value; A vector position is randomly selected from a plurality of vector positions corresponding to all the vector values, and a first preset value of the one vector position is updated to a second preset value, wherein the first preset value is greater than the second preset value.

4. The method according to claim 2, characterized in that: Before sending input data generated by a mask value corresponding to a current meteorological element value based on the meteorological element to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model, the method further includes: In the case where the meteorological element value includes the second meteorological element value, a mask value corresponding to the second meteorological element value is generated by using a multi-layer vertical mask generation method; The step of generating the mask value corresponding to the second meteorological element value by using a multi-layer vertical mask generation method includes: For each of the multiple altitude layers, obtaining a sub-meteorological element value corresponding to each altitude layer from the second meteorological element value, and generating a sub-mask value corresponding to the sub-meteorological element value by using a fully random mask generation method; A splicing result of the multiple sub-mask layers is determined as the mask value corresponding to the second meteorological element value.

5. The method according to claim 4, characterized in that Before sending input data generated by a mask value corresponding to a current meteorological element value based on the meteorological element to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model, the method further includes: Obtaining a historical meteorological element value corresponding to the meteorological element and a mask value corresponding to the historical meteorological element value; Multiplying the historical meteorological element value and the mask value corresponding to the historical meteorological element value to obtain a mask covering result of the historical meteorological element; The masking result is used as an input sample of the initial model, and the preset training label is used as an output sample of the initial model to train the initial model; When it is determined that the model loss value of the initial model during the training process is less than the preset loss value, it is determined that the training of the initial model is completed to obtain a pre-trained model; The pre-trained model is fine-tuned to obtain the meteorological element prediction model.

6. The method according to claim 5, characterized in that Fine-tuning the pre-trained model includes: The encoding parameters of the encoding part of the pre-trained model are fixed, the historical meteorological element values ​​at any historical moment are used as input samples, and the historical meteorological element values ​​at historical moments after any historical moment are used as output samples for the pre-trained model, and the network parameters of the decoding part of the pre-trained model are fine-tuned to train the pre-trained model, thereby obtaining the meteorological element prediction model.

7. A device for determining target meteorological data, characterized in that: include: The parsing module is used to parse the monitored current meteorological data to obtain the meteorological elements included in the current meteorological data; An obtaining module, used for sending input data generated by a mask value corresponding to a current meteorological element value based on the meteorological element to a meteorological element prediction model to obtain a predicted meteorological element value output by the meteorological element prediction model; A determination module is used to determine target meteorological data based on the predicted meteorological element values.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 6 when executed.

9. 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 6 through the computer program.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Regional medium and long term new energy power prediction method

    CN116596149A

  • Research and judgment method and system for regional rainstorm frequency

    CN117608005A

  • Molecular property prediction method, electronic equipment and computer readable storage medium

    CN118039000A

  • Method for training elevation map completion model

    CN118552806A

  • Apparatus and method for manufacturing of banner

    KR102637940B1