Meteorological element value prediction method and device, and computer program product
By calculating and fusion of multiple representations of meteorological element feature vectors, multiple fusion representations of meteorological elements are generated and a meteorological prediction model is input, which solves the problem of insufficient accuracy of meteorological forecasting in the prior art and achieves high resolution and efficient meteorological forecasting.
Patent Information
- Application Number
- CN202510141781.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-05-30
AI Technical Summary
Existing meteorological models fail to achieve high-resolution accurate meteorological forecasts, resulting in insufficient accuracy of meteorological forecasts.
By calculating the regional weight fusion meteorological representation, spatial fusion meteorological representation and category fusion meteorological representation of meteorological element characteristic vectors of the target area, the multi-fusion representation of meteorological elements are fused, and the meteorological prediction model is input to obtain the prediction values of multiple meteorological elements.
It improves the accuracy of meteorological forecasting, realizes high-resolution meteorological forecasting, and enhances the efficiency of meteorological forecasting.
Smart Images

Figure CN120069201A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of meteorological forecasting. Specifically, it relates to a method, device, and computer program product for predicting meteorological element values. Background Art
[0002] With the vigorous development of the new energy industry, the power generation capabilities of power generation methods such as wind power, photovoltaic power, and hydropower are closely related to meteorological conditions. Accurate weather prediction results can effectively improve power generation efficiency. Traditional meteorological forecasting implemented based on numerical calculations has problems of high consumption of computing resources and long operation time. Therefore, some researchers have proposed meteorological forecasting through meteorological large models. Although it provides a new idea for improving the efficiency of meteorological forecasting, the current meteorological large models still cannot achieve high-resolution accurate meteorological forecasting. Therefore, in related technologies, there is a problem of how to improve the accuracy of meteorological forecasting.
[0003] In view of the problem in related technologies of how to improve the accuracy of meteorological forecasting, no effective solution has been proposed yet.
[0004] Therefore, it is necessary to improve related technologies to overcome the above-mentioned defects in related technologies. Summary of the Invention
[0005] Embodiments of the present application provide a method, device, and computer program product for predicting meteorological element values, so as to at least solve the problem in related technologies of how to improve the accuracy of meteorological forecasting.
[0006] According to one aspect of the embodiments of the present application, a method for predicting meteorological element values is provided. The method includes: calculating respectively the regional weight fusion meteorological representation of the meteorological element feature vector of the target area, the spatial fusion meteorological representation of the meteorological element feature vector, and the category fusion meteorological representation of the meteorological element feature vector, where the regional weight fusion meteorological representation is used to represent the meteorological element feature vector after regional weight allocation, the spatial fusion meteorological representation is used to represent the correlation between meteorological element feature vectors at different altitude levels, and the category fusion meteorological representation is used to represent the correlation between different meteorological element feature vectors; calculating a multi-fusion meteorological representation of meteorological elements based on the regional weight fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation; inputting the multi-fusion meteorological representation of meteorological elements into a meteorological prediction model to obtain multiple meteorological element prediction values output by the meteorological prediction model, where the meteorological prediction model is trained with the multi-fusion meteorological representation of meteorological elements of the target area at a first historical moment as the input and the meteorological element values of the target area at a second historical moment as the output, and the first historical moment is before the second historical moment.
[0007] In an exemplary embodiment, the regional weight fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation of the meteorological element feature vectors of the target area are calculated respectively, including: for the meteorological element feature vectors of multiple altitude layers corresponding to the target area, the meteorological element values of the multiple altitude layers are subjected to dimensionality reduction mapping processing through the following formula to obtain the meteorological element feature vectors of the multiple altitude layers: sw i = ReLU(W i w i + b i ); where, sw i represents the meteorological element feature vectors of multiple altitude layers, ReLU represents the rectified linear unit function, w i represents the meteorological element feature vectors of multiple altitude layers, W i , b i represent training parameters, W i ∈ R 1×L , b i ∈ R X×Y , L, X, Y ∈ N, L > 1, X, Y > 0, N represents the set of natural numbers; the meteorological element feature vectors of the multiple altitude layers are calculated through the following formula to obtain the regional weight matrix corresponding to the meteorological element feature vectors of the multiple altitude layers: RegionAtt i = Softmax(W' i sw i ); where, RegionAtt i represents the regional weight matrix corresponding to the meteorological element feature vectors of multiple altitude layers, Softmax represents the softmax function, W' i represents training parameters; for the meteorological element feature vectors of a single altitude layer corresponding to the target area, the meteorological element feature vectors of the single altitude layer are calculated through the following formula to obtain the regional weight matrix corresponding to the meteorological element feature vectors of the single altitude layer: RegionAtt j = Softmax(W j w j ); where, RegionAtt j represents the regional weight matrix corresponding to the meteorological element feature vectors of a single altitude layer, W j represents training parameters; w jRepresents the meteorological element feature vector of a single height layer; calculate the regional weight matrix corresponding to the meteorological element feature vector of the multi-height layer, the regional weight matrix corresponding to the meteorological element feature vector of the height layer, and the meteorological element feature vector through the following formula to obtain multiple meteorological element representations after assigning regional weights, where the types of the multiple meteorological element representations after assigning regional weights include the meteorological element representation of the multi-height layer after assigning regional weights and the meteorological element representation of the single height layer after assigning regional weights: RW i = sw i ⊙ RegionAtt i + sw i ; RW j = w j ⊙ RegionAtt j + w j ; where, RW i represents the meteorological element representation of the multi-height layer after assigning regional weights, and RW j represents the meteorological element representation of the single height layer after assigning regional weights; perform splicing processing on the multiple meteorological element representations after assigning regional weights to obtain the regional weight fusion meteorological representation.
[0008] In an exemplary embodiment, calculate the regional weight fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation of the meteorological element feature vector of the target area respectively, including: for the meteorological element feature vector of the multi-height layer corresponding to the target area, perform splicing processing on the meteorological element feature vector of the multi-height layer to obtain a multi-height layer meteorological representation; for the meteorological element feature vector of the single height layer corresponding to the target area, perform splicing processing on the meteorological element feature vector of the single height layer to obtain a single height layer meteorological representation; perform splicing processing on the multi-height layer meteorological representation and the single height layer meteorological representation to obtain an overall height meteorological representation; calculate the spatial fusion meteorological representation through the following formula for the overall height meteorological representation:
[0009]
[0010] where, FW represents the overall height meteorological representation, FW' represents the spatial fusion meteorological representation, dim represents the size of the representation dimension, W 3 , W 4 , W 5 , b 3 , b 4 , b 5 represent training parameters, W 3 , W 4 , W 5 ∈ R dim×dim , b3 , b 4 , b 5 ∈R (L:1)×dim , dim, L ∈ N, L > 1, dim > 0, where N represents the set of natural numbers.
[0011] In an exemplary embodiment, the regional weight fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation of the meteorological element feature vectors in the target area are calculated respectively, including: for the meteorological element feature vectors at multiple altitude levels corresponding to the target area, the following formula is used to perform dimensionality reduction mapping processing on the meteorological element values at multiple altitude levels to obtain the meteorological element feature vectors at multiple altitude levels: lw k = ReLU(W k w k + b k ); where w k represents the meteorological element values at multiple altitude levels, lw k represents the meteorological element feature vectors at multiple altitude levels, W k and b k represent training parameters; the following formula is used to perform unified mapping processing on the meteorological element feature vectors at multiple altitude levels and the meteorological element feature vectors at a single altitude level to obtain the mapping values of the meteorological element feature vectors, where the mapping values of the meteorological element feature vectors include the mapping values of the meteorological element feature vectors at multiple altitude levels and the mapping values of the meteorological element feature vectors at a single altitude level; gw k = ReLU(W′ k lw k + b′ k ); gw l = ReLU(W l w l + b l ); where w l represents the meteorological element feature vectors at a single altitude level, gw k represents the mapping values of the meteorological element feature vectors at multiple altitude levels, gw l represents the mapping values of the meteorological element feature vectors at a single altitude level, W′ k , b′ k , W l , b l represent training parameters, W′ k , W l ∈R D×XY , b′ k , b l ∈R D, D, X, Y ∈ N, D, X, Y > 0, where N represents the set of natural numbers; perform splicing processing on the mapping values of the meteorological element feature vectors of the multi-height layers and the mapping values of the meteorological element feature vectors of the single-height layer to obtain a multi-meteorological element mapping meteorological representation; calculate the category fusion meteorological representation by the following formula for the multi-meteorological element mapping meteorological representation:
[0012]
[0013] Among them, GW represents the multi-meteorological element mapping meteorological representation, GW′ represents the category fusion meteorological representation, D represents the scaling factor, W 6 , W 7 , W 8 , b 6 , b 7 , b 8 represents the training parameters, W 6 , W 7 , W 8 ∈ R D×D , b 6 , b 7 , b 8 ∈ R m×D , D, L ∈ N, L > 1, D > 0, m represents the number of categories of meteorological elements, and N represents the set of natural numbers.
[0014] In an exemplary embodiment, calculate the multi-fusion representation of meteorological elements according to the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation, including: calculate the multi-fusion representation of meteorological elements by the following formula for the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation:
[0015] Weather = α·RW + β·FW′ + γ·GW′;
[0016] Among them, Weather represents the multi-fusion representation of meteorological elements, RW represents the region-weighted fusion meteorological representation, α, β, γ represent the weight coefficients, α + β + γ = 1, and α, β, γ > 0.
[0017] In an exemplary embodiment, the weather prediction model is trained as follows: using the multi-fusion representation of meteorological elements in the target area at the first historical moment as the input, and the meteorological element values in the target area at the second historical moment as the output, training an initial model to obtain the predicted values of meteorological elements at the second historical moment output by the initial model; when it is determined that the mean square error between the predicted values of meteorological elements at the second historical moment and the meteorological element values at the second historical moment is greater than a preset value, adjusting the training parameters of the initial model; when it is determined that the mean square error between the predicted values of meteorological elements at the second historical moment and the meteorological element values at the second historical moment is less than the preset value, determining the initial model as the weather prediction model.
[0018] According to another aspect of the embodiments of the present application, there is also provided a prediction device for meteorological element values, including: a first calculation module, configured to calculate the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation of the meteorological element feature vectors of the target area respectively, where the region-weighted fusion meteorological representation is used to represent the meteorological element feature vectors after region weight allocation, the spatial fusion meteorological representation is used to represent the correlation between the meteorological element feature vectors at different altitude levels, and the category fusion meteorological representation is used to represent the correlation between different meteorological element feature vectors; a second calculation module, configured to calculate the multi-fusion representation of meteorological elements according to the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation; a weather prediction module, configured to input the multi-fusion representation of meteorological elements into a weather prediction model to obtain multiple predicted values of meteorological elements output by the weather prediction model, where the weather prediction model is trained by using the multi-fusion representation of meteorological elements in the target area at the first historical moment as the input and the meteorological element values in the target area at the second historical moment as the output, and the first historical moment is before the second historical moment.
[0019] According to still another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the above-mentioned prediction method for meteorological element values when running.
[0020] According to still another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the above-mentioned processor executes the above-mentioned prediction method for meteorological element values through the computer program.
[0021] According to another aspect of the embodiments of the present application, there is also provided a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the methods described in the embodiments of the present application are implemented.
[0022] Through the present application, the regional weight fusion meteorological representation corresponding to the multiple meteorological element feature vectors of the target area can be calculated. After spatially fusing the meteorological representation and class fusing the meteorological representation, the above multiple meteorological representations are fused to obtain a multi-fused meteorological element representation, and then the multi-fused meteorological element representation is input into a meteorological prediction model to obtain multiple meteorological element prediction values output by the model. Thus, the problem of how to improve the accuracy of meteorological forecasting in the related art is solved, and the effect of improving the accuracy of meteorological forecasting is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0025] Figure 1 It is a hardware structure block diagram of a computer terminal for a method of predicting meteorological element values according to an embodiment of the present application;
[0026] Figure 2 It is a flowchart of a method of predicting meteorological element values according to an embodiment of the present application;
[0027] Figure 3 It is a schematic diagram of a method of predicting meteorological element values according to an embodiment of the present application;
[0028] Figure 4 It is a structure block diagram of a device for predicting meteorological element values according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0029] In order to enable those skilled in the art to better understand the solutions of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.
[0030] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0031] The method embodiments provided in the embodiments of the present application can be executed on a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 is a hardware structure block diagram of a computer terminal for a method of predicting meteorological element values according to an embodiment of the present application. As Figure 1 shown, the computer terminal may include one or more ( Figure 1 only one is shown in Figure 1 the 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 field programmable gate array (Field Programmable Gate Array, FPGA)) and a memory 104 for storing data. Among them, the above computer terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above computer terminal. For example, the computer terminal may also include more or fewer components than Figure 1 shown in
[0032] 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 prediction method of meteorological element values in the embodiments 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, the above-mentioned method is 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 memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the computer terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and their combinations.
[0033] The wireless network provided by the communication provider of the computer terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RadioFrequency, abbreviated as RF) module, which is used to communicate with the Internet wirelessly.
[0034] In this embodiment, a method for predicting meteorological element values is provided. Figure 2 It is a flowchart of a method for predicting meteorological element values according to an embodiment of the present application, as Figure 2 shown, and the process includes the following steps:
[0035] Step S202, calculate the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation of the meteorological element feature vectors of the target region respectively, where the region-weighted fusion meteorological representation is used to represent the meteorological element feature vectors after region weight assignment, the spatial fusion meteorological representation is used to represent the correlation between the meteorological element feature vectors of different altitude layers, and the category fusion meteorological representation is used to represent the correlation between different meteorological element feature vectors;
[0036] Optionally, in the above step S202, the meteorological element feature vectors of the target region are obtained by processing the meteorological element values of the target region through feature engineering. A variety of meteorological element values can be collected in the above target region, such as air pressure, temperature, wind speed, wind direction, surface pressure, surface temperature, etc. The above meteorological elements can be divided into two categories. One category is single-altitude layer meteorological elements, which are meteorological data measured on the ground or at a fixed altitude. The other category is multi-altitude layer meteorological elements, which are meteorological data measured at different altitudes and can provide vertical structure information of the atmosphere.
[0037] Step S204: Calculate the multi-fusion meteorological representation of meteorological elements based on the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation.
[0038] Step S206: Input the multi-fusion meteorological representation of meteorological elements into a meteorological prediction model to obtain multiple predicted values of meteorological elements output by the meteorological prediction model. The meteorological prediction model is trained with the multi-fusion meteorological representation of meteorological elements at a first historical moment in the target region as the input and the meteorological element values at a second historical moment in the target region as the output, where the first historical moment is before the second historical moment.
[0039] Through the above steps, after calculating the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation corresponding to the multiple meteorological element feature vectors of the target region, the above multiple meteorological representations are fused to obtain the multi-fusion meteorological representation of meteorological elements, and then the multi-fusion meteorological representation of meteorological elements is input into the meteorological prediction model to obtain multiple predicted values of meteorological elements output by the model. Thus, the problem of how to improve the accuracy of meteorological forecasting in the related art is solved, and the effect of improving the accuracy of meteorological forecasting is achieved.
[0040] In an exemplary embodiment, calculating the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation of the meteorological element feature vectors of the target region respectively includes: for the meteorological element feature vectors of multiple altitude layers corresponding to the target region, performing dimensionality reduction mapping processing on the meteorological element values of the multiple altitude layers through the following formula to obtain the meteorological element feature vectors of the multiple altitude layers: sw i = ReLU(W i w i + b i ); where sw i represents the meteorological element feature vectors of multiple altitude layers, ReLU represents the rectified linear unit function, w i represents the meteorological element feature vectors of multiple altitude layers, W i , b i represent training parameters, W i ∈ R 1×L , b i ∈ R X×Y , L, X, Y ∈ N, L > 1, X, Y > 0, and N represents the set of natural numbers; calculating the region-weight matrix corresponding to the meteorological element feature vectors of the multiple altitude layers through the following formula for the meteorological element feature vectors of the multiple altitude layers: RegionAtt i = Softmax(W' i swi ); where RegionAtt i represents the regional weight matrix corresponding to the meteorological element feature vectors of multiple height levels, Softmax represents the normalization exponential function, and W′ i represents the training parameter; for the meteorological element feature vector of a single height level corresponding to the target region, the meteorological element feature vector of the single height level is calculated through the following formula to obtain the regional weight matrix corresponding to the meteorological element feature vector of the single height level: RegionAtt j = Softmax(W j w j ); where RegionAtt j represents the regional weight matrix corresponding to the meteorological element feature vector of a single height level, W j represents the training parameter; w j represents the meteorological element feature vector of a single height level; through the following formula, the regional weight matrix corresponding to the meteorological element feature vector of multiple height levels, the regional weight matrix corresponding to the meteorological element feature vector of the height level, and the meteorological element feature vector are calculated to obtain multiple meteorological element representations after region weight assignment, where the types of the multiple meteorological element representations after region weight assignment include the meteorological element representation of multiple height levels after region weight assignment and the meteorological element representation of a single height level after region weight assignment: RW i = sw i ⊙RegionAtt i + sw i ; RW j = w j ⊙RegionAtt j + w j ; where RW i represents the meteorological element representation of multiple height levels after region weight assignment, and RW j represents the meteorological element representation of a single height level after region weight assignment; the multiple meteorological element representations after region weight assignment are concatenated to obtain the region weight fusion meteorological representation.
[0041] Optionally, in the above embodiment, for example, the target region collects 16 meteorological elements at time T0, and the specific meteorological elements are shown in Table 1, where L, X, Y ∈ N, L > 1, X, Y > 0.
[0042] Table 1
[0043] Element Name Altitude Layer Area Size Element Representation Air Pressure L X×Y <![CDATA[w 1 > Temperature L X×Y <![CDATA[w 2 > U Wind (East-West Wind Speed Component) L X×Y <![CDATA[w 3 > V Wind (North-South Wind Speed Component) L X×Y <![CDATA[w 4 > Humidity L X×Y <![CDATA[w 5 > Wind Speed L X×Y <![CDATA[w 6 > Wind Direction L X×Y <![CDATA[w 7 > Wind Energy Density L X×Y <![CDATA[w 8 > Sea Level Pressure 1 X×Y <![CDATA[w 9 > Gust Wind Speed 1 X×Y <![CDATA[w 10 > Surface Pressure 1 X×Y <![CDATA[w 11 > Surface Temperature 1 X×Y <![CDATA[w 12 > Near-Surface Temperature 1 X×Y <![CDATA[w 13 > Near-Surface Humidity 1 X×Y <![CDATA[w 14 > Near-Surface U Wind 1 X×Y <![CDATA[w 15 > Near-Surface V Wind 1 X×Y <![CDATA[w 16 >
[0044] where, w 1 - w 8 is the meteorological element of multiple height levels, w 9 - w16 is the meteorological element of a single height layer.
[0045] For the meteorological element w of multiple height layers i ∈ [w 1 , w 2 ,..., w 8 , first, a dimensionality reduction mapping is implemented through a feedforward neural network to obtain the feature vector sw of the meteorological element of multiple height layers i :
[0046] sw i = ReLU(W i w i + b i );
[0047] Among them, W i ∈ R 1×L and b i ∈ R X×Y are training parameters, and ReLU represents the rectified linear function.
[0048] Transform sw i into 1 dimension, and then calculate the regional weight matrix corresponding to each feature vector of the meteorological element of multiple height layers based on the attention mechanism:
[0049] RegionAtt i = Softmax(W' i sw i );
[0050] Among them, W' i ∈ R XY is a training parameter, and Softmax represents the normalized exponential function.
[0051] Transform RegionAtt i into 2 dimensions, and the obtained RegionAtt i ∈ R X×Y is the regional weight matrix corresponding to the meteorological variable w i .
[0052] Multiply the feature vector sw of the meteorological element of multiple height layers i (sw i ∈ R X×Y ) and RegionAtt i bit by bit, and perform a residual connection to obtain the meteorological element representation RW of multiple height layers after assigning regional weights i :
[0053] RW i = sw i ⊙ RegionAtt i + swi ;
[0054] For the meteorological element w at a single height level j ∈ [w 9 , w 10 ,..., w 16 , transform the meteorological element into a 1D feature vector w j , and then calculate the regional weight matrix corresponding to the feature vector of each single-height-level meteorological element based on the attention mechanism:
[0055] RegionAtt j = Softmax(W j w j );
[0056] where W j ∈ R XY is a training parameter. Transform RegionAtt j into 2D, and the obtained RegionAtt j ∈ R X×Y is the regional weight matrix corresponding to the meteorological variable w j .
[0057] Multiply w j ∈ R X×Y element-wise with RegionAtt j , and perform a residual connection to obtain the meteorological element representation RW of the single height level after assigning regional weights j :
[0058] RW j = w j ⊙ RegionAtt j + w j ;
[0059] Concatenate the meteorological element representations RW 1 - RW 16 to obtain the region-weight-fused meteorological representation RW:
[0060] RW = concat([RW 1 , RW 2 ,..., RW 16 ) ∈ R 16×X×Y .
[0061] In an exemplary embodiment, the regional weight fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation of the meteorological element feature vectors of the target area are calculated respectively, including: for the meteorological element feature vectors of multiple altitude layers corresponding to the target area, performing splicing processing on the meteorological element feature vectors of the multiple altitude layers to obtain a multi-altitude layer meteorological representation; for the meteorological element feature vectors of a single altitude layer corresponding to the target area, performing splicing processing on the meteorological element feature vectors of the single altitude layer to obtain a single altitude layer meteorological representation; performing splicing processing on the multi-altitude layer meteorological representation and the single altitude layer meteorological representation to obtain an overall altitude meteorological representation; calculating the overall altitude meteorological representation through the following formula to obtain the spatial fusion meteorological representation:
[0062]
[0063] where FW represents the overall altitude meteorological representation, FW′ represents the spatial fusion meteorological representation, dim represents the size of the representation dimension, W 3 ,W 4 ,W 5 ,b 3 ,b 4 ,b 5 represents the training parameters, W 3 ,W 4 ,W 5 ∈R dim×dim ,b 3 ,b 4 ,b 5 ∈R (L:1)×dim , dim, L ∈ N, L > 1, dim > 0, and N represents the set of natural numbers.
[0064] Optionally, in the above embodiment, for the multi-altitude layer meteorological elements w i ∈[w 1 ,w 2 ,...,w 8 , first transform the multi-altitude layer meteorological elements into 2D to obtain the meteorological element feature vectors of the multi-altitude layer, that is, w i ∈R L×XY .
[0065] Subsequently, splice w 1 -w 8 to obtain the multi-altitude layer meteorological representation MW:
[0066] MW = concat([w 1 ,w 2 ,...,w 8 ) ∈ R L×8XY ;
[0067] For the meteorological element w at a single altitude layer j ∈ [w 9 , w 10 ,..., w 16 , first perform a dimensionality transformation to obtain the meteorological element feature vector w of the single altitude layer j ∈ R 1×XY .
[0068] Subsequently, concatenate w 9 - w 16 to obtain the single altitude layer meteorological representation SW:
[0069] SW = concat([w 9 , w 10 ,..., w 16 ) ∈ R 1×8XY ;
[0070] Integrate the multi - altitude layer meteorological representation and the single altitude layer meteorological representation, and then perform a concatenation process to obtain the overall altitude meteorological representation FW;
[0071] FW = concat([SW′, MW′]) ∈ R (L:1)×dim ;
[0072] MW′ = MW W 1 + b 1 ;
[0073] SW′ = SW W 2 + b 2 ;
[0074] where MW′ and SW′ respectively represent the integrated multi - altitude layer meteorological representation and the single altitude layer meteorological representation, W 1 , W 2 ∈ R 8XY×dim , b 1 ∈ R L×dim , b 2 ∈ R 1×dim are training parameters, dim ∈ N and dim > 0.
[0075] Based on the self - attention mechanism, learn the correlation of meteorological features between different altitude layers, calculate the correlation matrix between different altitude layers based on the cosine similarity, then obtain the correlation weight matrix through the Softmax function, and finally assign the correlation weight matrix to the meteorological representation. The calculation formula is as follows:
[0076]
[0077] where W 3 , W 4 , W 5∈R dim×dim and b 3 , b 4 , b 5 ∈R (L:1)×dim are training parameters, and FW′ is the obtained multi - layer meteorological element spatial fusion meteorological representation.
[0078] In an exemplary embodiment, the regional weight fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation of the meteorological element feature vectors of the target area are calculated respectively, including: for the meteorological element feature vectors of multiple altitude layers corresponding to the target area, the following formula is used to perform dimensionality reduction mapping processing on the meteorological element values of the multiple altitude layers to obtain the meteorological element feature vectors of the multiple altitude layers: lw k = ReLU(W k w k + b k ); where w k represents the meteorological element values of the multiple altitude layers, lw k represents the meteorological element feature vectors of the multiple altitude layers, W k and b k represent training parameters; the following formula is used to perform unified mapping processing on the meteorological element feature vectors of the multiple altitude layers and the meteorological element feature vectors of the single altitude layer to obtain the mapping values of the meteorological element feature vectors, where the mapping values of the meteorological element feature vectors include the mapping values of the meteorological element feature vectors of the multiple altitude layers and the mapping values of the meteorological element feature vectors of the single altitude layer; gw k = ReLU(W′ k lw k + b′ k ); gw l = ReLU(W l w l + b l ); where w l represents the meteorological element feature vectors of the single altitude layer, gw k represents the mapping values of the meteorological element feature vectors of the multiple altitude layers, gw l represents the mapping values of the meteorological element feature vectors of the single altitude layer, W′ k , b′ k , W l , b l represent training parameters, W′ k , W l ∈R D×XY , b′ k , b l ∈R D, D, X, Y ∈ N, D, X, Y > 0, where N represents the set of natural numbers; concatenate the mapped values of the meteorological element feature vectors of the multi-height layer and the mapped values of the meteorological element feature vectors of the single-height layer to obtain a multi-meteorological element mapped meteorological representation; calculate the category-fused meteorological representation from the multi-meteorological element mapped meteorological representation through the following formula:
[0079]
[0080] where GW represents the multi-meteorological element mapped meteorological representation, GW′ represents the category-fused meteorological representation, D represents the scaling factor, W 6 , W 7 , W 8 , b 6 , b 7 , b 8 represents the training parameters, W 6 , W 7 , W 8 ∈ R D×D , b 6 , b 7 , b 8 ∈ R m×D , D, L ∈ N, L > 1, D > 0, m represents the number of categories of meteorological elements, and N represents the set of natural numbers.
[0081] Optionally, in the above embodiment, for the multi-height layer meteorological element w k ∈ [w 1 , w 2 ,..., w 8 , perform dimensionality reduction mapping through a feedforward neural network to obtain the multi-height layer meteorological element feature vector lw k :
[0082] lw k = ReLU(W k w k + b k );
[0083] where W k ∈ R 1×L and b k ∈ R X×Y are the training parameters.
[0084] Then transform lw k into 1-dimensional (lw k ∈ R XY ), and perform unified mapping through a feedforward neural network to obtain the mapped value gw k :
[0085] gw k= ReLU(W' k lw k + b' k );
[0086] Wherein, W' k ∈ R D×XY and b' k ∈ R D are training parameters.
[0087] For the meteorological element w at a single altitude layer l ∈ [w 9 , w 10 ,..., w 16 , the meteorological element is transformed into a 1-dimensional feature vector w l ∈ R XY , and then the unified mapping is realized through a feedforward neural network to obtain the mapping value gw of the meteorological element feature vector at a single altitude layer l :
[0088] gw l = ReLU(W l w l + b l );
[0089] Where W l ∈ R D×XY and b l ∈ R D are training parameters, D ∈ N and D > 0.
[0090] The meteorological element w 1 - w 16 are respectively mapped to gw 1 - gw 16 . For gw i ∈ [gw 1 , gw 2 ,..., gw 16 , gw i ∈ R D , gw 1 - gw 16 are concatenated to obtain the multi-meteorological-element mapped meteorological representation GW:
[0091] GW = concat([gw 1 , gw 2 ,..., gw 16 ) ∈ R 16×D ;
[0092] Then, based on the self-attention mechanism, the correlation of meteorological characteristics among different meteorological elements is learned. Then, the correlation matrix between different meteorological elements is calculated based on the cosine similarity, and the correlation weight matrix is obtained through the Softmax function. Finally, the correlation is assigned to the meteorological representation, and the calculation formula is as follows:
[0093]
[0094] Among them, W 6 , W 7 , W 8 ∈R D×D and b 6 , b 7 , b 8 ∈R 16×D are training parameters, and GW′ is the obtained class-fused meteorological representation.
[0095] In an exemplary embodiment, according to the region-weighted fused meteorological representation, the spatial-fused meteorological representation, and the class-fused meteorological representation, a multi-fused meteorological element representation is calculated, including: calculating the region-weighted fused meteorological representation, the spatial-fused meteorological representation, and the class-fused meteorological representation through the following formula to obtain the multi-fused meteorological element representation:
[0096] Weather = α·RW + β·FW′ + γ·GW′;
[0097] Among them, Weather represents the multi-fused meteorological element representation, RW represents the region-weighted fused meteorological representation, α, β, γ represent weight coefficients, α + β + γ = 1, and α, β, γ > 0.
[0098] Optionally, in the above embodiment, before performing the fusion calculation on the region-weighted fused meteorological representation RW, the spatial-fused meteorological representation FW′, and the class-fused meteorological representation GW′, it is also necessary to unify FW′ and GW′ to the same dimension as RW through a feed-forward neural network:
[0099] FW integrate = ReLU(FW′W 9 + b 9 );
[0100] GW integrate = ReLU(GW′W 10 + b 10 );
[0101] Among them, W 9 ∈R (L:1)dim×16XY , W 10 ∈R 16D×16XY and b 9 , b 10 , b11 ∈R M is a training parameter, M ∈ N and M > 0. FW integrate and GW integrate are the spatially fused meteorological representation and the class-fused meteorological representation after unifying the dimensions respectively.
[0102] The multi-fused meteorological representation Weather of meteorological elements obtained after the fusion calculation needs to be transformed into a 3D vector, Weather ∈ R 16×X×Y .
[0103] In an exemplary embodiment, the meteorological prediction model is trained in the following manner: using the multi-fused meteorological representation of the meteorological elements of the target area at the first historical moment as the input, and using the meteorological element values of the target area at the second historical moment as the output, training an initial model to obtain the predicted values of the meteorological elements at the second historical moment output by the initial model; in the case where it is determined that the mean squared error between the predicted values of the meteorological elements at the second historical moment and the meteorological element values at the second historical moment is greater than a preset value, adjusting the training parameters of the initial model; in the case where it is determined that the mean squared error between the predicted values of the meteorological elements at the second historical moment and the meteorological element values at the second historical moment is less than the preset value, determining the initial model as the meteorological prediction model.
[0104] Optionally, in the above embodiment, the meteorological prediction model can be trained using a deep learning model based on the self-attention mechanism, and the training process is supervised by the MSE (Mean Squared Error) loss function.
[0105] In an alternative embodiment, the meteorological element prediction process is as Figure 3 shown. After receiving the meteorological element data at time T0, meteorological multi-element and multi-layer fusion are performed. Through the fusion of regional weight representations, multi-layer spatial fusion of meteorological elements, and fusion between multiple element categories, the multi-fused meteorological representation of meteorological elements is finally obtained. Then, the multi-fused meteorological representation of meteorological elements is input into the Swin Transformer network (a deep learning model based on the self-attention mechanism) for meteorological forecasting, and the predicted values of the meteorological element data at time T1 are output.
[0106] Through the above embodiments, by fusing regional weight representations, multi-layer spatial fusion of meteorological elements, fusion between multiple meteorological element categories, and multi-fused meteorological representation of meteorological elements, the problem of learning the multiple correlations of meteorological elements between different meteorological elements, between different altitude levels of meteorological elements, and between meteorological elements at different coordinates is solved. Furthermore, high-resolution meteorological forecasting can be achieved, greatly improving the accuracy of meteorological prediction.
[0107] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of the various embodiments of the present application.
[0108] In this embodiment, a prediction device for meteorological element values is further provided. The device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0109] Figure 4 is a structural block diagram of a prediction device for meteorological element values according to an embodiment of the present application. The device includes:
[0110] A first calculation module 42, configured to calculate respectively the regional weight fusion meteorological representation of the meteorological element feature vector of the target area, the spatial fusion meteorological representation of the meteorological element feature vector, and the category fusion meteorological representation of the meteorological element feature vector. Among them, the regional weight fusion meteorological representation is used to represent the meteorological element feature vector after regional weight allocation, the spatial fusion meteorological representation is used to represent the correlation between the meteorological element feature vectors of different altitude layers, and the category fusion meteorological representation is used to represent the correlation between different meteorological element feature vectors;
[0111] A second calculation module 44, configured to calculate a meteorological element multi-fusion representation according to the regional weight fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation;
[0112] A meteorological prediction module 46, configured to input the meteorological element multi-fusion representation into a meteorological prediction model to obtain multiple meteorological element prediction values output by the meteorological prediction model. Among them, the meteorological prediction model is trained with the meteorological element multi-fusion representation of the target area at a first historical moment as the input and the meteorological element values of the target area at a second historical moment as the output, where the first historical moment is before the second historical moment.
[0113] Through the above device, the regional weight fusion meteorological representation corresponding to the multi-meteorological element feature vectors of the target area can be calculated. After spatially fusing the meteorological representation and classifying and fusing the meteorological representation, the above multi-meteorological representations are fused to obtain a multi-fusion representation of meteorological elements. Then, the multi-fusion representation of meteorological elements is input into a meteorological prediction model to obtain multiple meteorological element prediction values output by the model. Therefore, the problem of how to improve the accuracy of meteorological forecasting in the related art is solved, and the effect of improving the accuracy of meteorological forecasting is achieved.
[0114] In an exemplary embodiment, the first calculation module 42 is further configured to: for the meteorological element feature vectors of multiple altitude layers corresponding to the target area, perform dimensionality reduction mapping processing on the meteorological element values of the multiple altitude layers through the following formula to obtain meteorological element feature vectors of multiple altitude layers: sw i = ReLU(W i w i + b i ); where, sw i represents the meteorological element feature vectors of multiple altitude layers, ReLU represents the rectified linear unit function, w i represents the meteorological element feature vectors of multiple altitude layers, W i , b i represent training parameters, W i ∈R 1×L , b i ∈R X×Y , L, X, Y ∈ N, L > 1, X, Y > 0, N represents the set of natural numbers; calculate the meteorological element feature vectors of the multiple altitude layers through the following formula to obtain the regional weight matrix corresponding to the meteorological element feature vectors of the multiple altitude layers: RegionAtt i = Softmax(W' i sw i ); where, RegionAtt i represents the regional weight matrix corresponding to the meteorological element feature vectors of multiple altitude layers, Softmax represents the softmax function, W' i represents the training parameter; for the meteorological element feature vector of a single altitude layer corresponding to the target area, calculate the meteorological element feature vector of the single altitude layer through the following formula to obtain the regional weight matrix corresponding to the meteorological element feature vector of the single altitude layer: RegionAtt j = Softmax(W j w j ); where, RegionAtt j represents the regional weight matrix corresponding to the meteorological element feature vector of a single altitude layer, W j represents the training parameter; w jRepresents the meteorological element feature vector of a single height layer; calculate the regional weight matrix corresponding to the meteorological element feature vector of the multi-height layer, the regional weight matrix corresponding to the meteorological element feature vector of the height layer, and the meteorological element feature vector through the following formula to obtain multiple meteorological element representations after assigning regional weights, where the types of the multiple meteorological element representations after assigning regional weights include the meteorological element representation of the multi-height layer after assigning regional weights and the meteorological element representation of the single height layer after assigning regional weights: RW i = sw i ⊙ RegionAtt i + sw i ; RW j = w j ⊙ RegionAtt j + w j ; where RW i represents the meteorological element representation of the multi-height layer after assigning regional weights, and RW j represents the meteorological element representation of the single height layer after assigning regional weights; perform splicing processing on the multiple meteorological element representations after assigning regional weights to obtain the region weight fusion meteorological representation.
[0115] In an exemplary embodiment, the first calculation module 42 is further configured to: for the meteorological element feature vector of the multi-height layer corresponding to the target region, perform splicing processing on the meteorological element feature vector of the multi-height layer to obtain a multi-height layer meteorological representation; for the meteorological element feature vector of the single height layer corresponding to the target region, perform splicing processing on the meteorological element feature vector of the single height layer to obtain a single height layer meteorological representation; perform splicing processing on the multi-height layer meteorological representation and the single height layer meteorological representation to obtain an overall height meteorological representation; calculate the spatial fusion meteorological representation through the following formula for the overall height meteorological representation:
[0116]
[0117] where FW represents the overall height meteorological representation, FW′ represents the spatial fusion meteorological representation, dim represents the size of the representation dimension, W 3 , W 4 , W 5 , b 3 , b 4 , b 5 represent training parameters, W 3 , W 4 , W 5 ∈ R dim×dim , b 3 , b 4 , b 5 ∈ R (L:1)×dim, dim, L ∈ N, L > 1, dim > 0, where N represents the set of natural numbers.
[0118] In an exemplary embodiment, the first calculation module 42 is further configured to: for the meteorological element feature vectors of multiple height layers corresponding to the target area, perform dimensionality reduction mapping processing on the meteorological element values of the multiple height layers through the following formula to obtain meteorological element feature vectors of multiple height layers: lw k = ReLU(W k w k + b k ); where w k represents the meteorological element values of multiple height layers, lw k represents the meteorological element feature vectors of multiple height layers, W k and b k represent training parameters; perform unified mapping processing on the meteorological element feature vectors of the multiple height layers and the meteorological element feature vectors of the single height layer through the following formula to obtain the mapping values of the meteorological element feature vectors, where the mapping values of the meteorological element feature vectors include the mapping values of the meteorological element feature vectors of multiple height layers and the mapping values of the meteorological element feature vectors of the single height layer; gw k = ReLU(W' k lw k + b' k ); gw l = ReLU(W l w l + b l ); where w l represents the meteorological element feature vectors of the single height layer, gw k represents the mapping values of the meteorological element feature vectors of multiple height layers, gw l represents the mapping values of the meteorological element feature vectors of the single height layer, W' k , b' k , W l , b l represent training parameters, W' k , W l ∈R D×XY , b' k , b l ∈R D , D, X, Y ∈ N, D, X, Y > 0, where N represents the set of natural numbers; perform splicing processing on the mapping values of the meteorological element feature vectors of the multiple height layers and the mapping values of the meteorological element feature vectors of the single height layer to obtain a multi-meteorological element mapping meteorological representation; perform the following calculation on the multi-meteorological element mapping meteorological representation to obtain the category fusion meteorological representation:
[0119]
[0120] Among them, GW represents the multi - meteorological - element - mapped meteorological representation, GW′ represents the category - fused meteorological representation, D represents the scaling factor, and W 6 ,W 7 ,W 8 ,b 6 ,b 7 ,b 8 represents the training parameters, and W 6 ,W 7 ,W 8 ∈R D×D ,b 6 ,b 7 ,b 8 ∈R m×D , D, L ∈ N, L > 1, D > 0, m represents the number of categories of meteorological elements, and N represents the set of natural numbers.
[0121] In an exemplary embodiment, the second calculation module 44 is further configured to: calculate the multi - fused meteorological representation of the meteorological elements by the following formula for the region - weighted - fused meteorological representation, the spatial - fused meteorological representation, and the category - fused meteorological representation:
[0122] Weather = α·RW + β·FW′+γ·GW′;
[0123] Among them, Weather represents the multi - fused meteorological representation of meteorological elements, RW represents the region - weighted - fused meteorological representation, and α, β, γ represent the weight coefficients, α + β + γ = 1, and α, β, γ > 0.
[0124] In an exemplary embodiment, the apparatus is further configured to: train the meteorological prediction model in the following manner: taking the multi - fused meteorological representation of the meteorological elements at the first historical moment of the target region as the input and the meteorological element value at the second historical moment of the target region as the output, training the initial model to obtain the predicted value of the meteorological elements at the second historical moment output by the initial model; adjusting the training parameters of the initial model when it is determined that the mean square error between the predicted value of the meteorological elements at the second historical moment and the meteorological element value at the second historical moment is greater than a preset value; and determining the initial model as the meteorological prediction model when it is determined that the mean square error between the predicted value of the meteorological elements at the second historical moment and the meteorological element value at the second historical moment is less than the preset value.
[0125] An embodiment of the present application also provides a computer - readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above - mentioned method embodiments when running.
[0126] Optionally, in this embodiment, the above storage medium may be configured to store a computer program for performing the following steps:
[0127] S1. Calculate the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation of the meteorological element feature vectors of the target region respectively, where the region-weighted fusion meteorological representation is used to represent the meteorological element feature vectors after region weight assignment, the spatial fusion meteorological representation is used to represent the correlation between the meteorological element feature vectors at different altitude levels, and the category fusion meteorological representation is used to represent the correlation between different meteorological element feature vectors;
[0128] S2. Calculate the multi-fusion representation of meteorological elements based on the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation;
[0129] S3. Input the multi-fusion representation of meteorological elements into the meteorological prediction model to obtain multiple meteorological element prediction values output by the meteorological prediction model, where the meteorological prediction model is trained with the multi-fusion representation of meteorological elements of the target region at the first historical moment as the input and the meteorological element values of the target region at the second historical moment as the output, and the first historical moment is before the second historical moment.
[0130] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROM), random access memories (RAM), mobile hard disks, magnetic disks, or optical discs that can store computer programs.
[0131] The specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be repeated here.
[0132] The embodiment of the present application further provides an electronic device, including a memory and a processor. 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.
[0133] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:
[0134] S1. Calculate the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation of the meteorological element feature vectors in the target area respectively. Among them, the region-weighted fusion meteorological representation is used to represent the meteorological element feature vectors after region weight assignment, the spatial fusion meteorological representation is used to represent the correlation between the meteorological element feature vectors at different altitude levels, and the category fusion meteorological representation is used to represent the correlation between different meteorological element feature vectors.
[0135] S2. Calculate the multi-fusion representation of meteorological elements based on the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation.
[0136] S3. Input the multi-fusion representation of meteorological elements into the meteorological prediction model to obtain multiple meteorological element prediction values output by the meteorological prediction model. Among them, the meteorological prediction model is trained with the multi-fusion representation of meteorological elements in the target area at the first historical moment as the input and the meteorological element values in the target area at the second historical moment as the output, where the first historical moment is before the second historical moment.
[0137] The embodiment of the present application also provides a computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores the computer program product, and when the computer program is executed by a processor, the steps of the method in each embodiment of the present application are implemented.
[0138] Optionally, in this embodiment, the above computer program can be set to implement the following steps when executed by a processor:
[0139] S1. Calculate the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation of the meteorological element feature vectors in the target area respectively. Among them, the region-weighted fusion meteorological representation is used to represent the meteorological element feature vectors after region weight assignment, the spatial fusion meteorological representation is used to represent the correlation between the meteorological element feature vectors at different altitude levels, and the category fusion meteorological representation is used to represent the correlation between different meteorological element feature vectors.
[0140] S2. Calculate the multi-fusion representation of meteorological elements based on the region-weighted fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation.
[0141] S3. Input the multi-fusion representation of the meteorological elements into a meteorological prediction model to obtain multiple predicted meteorological element values output by the meteorological prediction model. Among them, the meteorological prediction model is trained from an initial model with the multi-fusion representation of the meteorological elements at a first historical moment in the target area as the input and the meteorological element values at a second historical moment in the target area as the output, where the first historical moment is before the second historical moment.
[0142] Specific examples in this embodiment can refer to the examples described in the above embodiments and exemplary embodiments, and will not be elaborated here.
[0143] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented by a general-purpose 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 program codes executable by the 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 here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.
[0144] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A method for predicting meteorological element values, characterized in that: include: Respectively calculating the regional weight fusion meteorological representation of the meteorological element feature vector of the target area, the spatial fusion meteorological representation of the meteorological element feature vector and the category fusion meteorological representation of the meteorological element feature vector, wherein the regional weight fusion meteorological representation is used to represent the meteorological element feature vector after regional weight allocation, the spatial fusion meteorological representation is used to represent the correlation between the meteorological element feature vectors of different altitude layers, and the category fusion meteorological representation is used to represent the correlation between different meteorological element feature vectors; A multi-fusion representation of meteorological elements is calculated based on the regional weight fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation; The multi-fusion representation of meteorological elements is input into a meteorological prediction model to obtain multiple meteorological element prediction values output by the meteorological prediction model, wherein the meteorological prediction model is obtained by training an initial model with the multi-fusion representation of meteorological elements of the target area at a first historical moment as input and the meteorological element values of the target area at a second historical moment as output, wherein the first historical moment is before the second historical moment.
2. The method according to claim 1, characterized in that: The regional weight fusion meteorological representation of the meteorological element feature vector of the target area, the spatial fusion meteorological representation of the meteorological element feature vector and the category fusion meteorological representation of the meteorological element feature vector are calculated respectively, including: For the meteorological element feature vectors of the multiple altitude layers corresponding to the target area, the meteorological element values of the multiple altitude layers are subjected to dimensionality reduction mapping processing by the following formula to obtain the meteorological element feature vectors of the multiple altitude layers: sw i =ReLU(W i In i +b i ); Among them, sw i represents the characteristic vector of meteorological elements at multiple altitudes, ReLU represents the corrected linear function, w i Represents the characteristic vector of meteorological elements at multiple altitude levels, W i ,b i represents the training parameters, W i ∈R 1×L , b i ∈R X×Y , L,X,Y∈N, L>1,X,Y>0, N represents the set of natural numbers; The meteorological element characteristic vectors of the multiple altitude layers are calculated by the following formula to obtain the regional weight matrix corresponding to the meteorological element characteristic vectors of the multiple altitude layers: RegionAtt i =Softmax(W′ i sw i ); Among them, RegionAtt i represents the regional weight matrix corresponding to the characteristic vector of meteorological elements in multiple altitude layers, Softmax represents the normalized exponential function, W′ i represents the training parameters; For the meteorological element characteristic vector of the single altitude layer corresponding to the target area, the meteorological element characteristic vector of the single altitude layer is calculated by the following formula to obtain the regional weight matrix corresponding to the meteorological element characteristic vector of the single altitude layer: RegionAtt j =Softmax(W j In j ); Among them, RegionAtt j Represents the regional weight matrix corresponding to the meteorological element feature vector of a single altitude layer, W j represents the training parameters; w j The characteristic vector of meteorological elements representing a single altitude layer; The regional weight matrix corresponding to the meteorological element characteristic vectors of the multiple altitude layers, the regional weight matrix corresponding to the meteorological element characteristic vectors of the altitude layers, and the meteorological element characteristic vector are calculated by the following formula to obtain a plurality of meteorological element representations after assigning regional weights, wherein the types of the plurality of meteorological element representations after assigning regional weights include meteorological element representations of multiple altitude layers after assigning regional weights and meteorological element representations of a single altitude layer after assigning regional weights: RW i =sw i ⊙RegionAtt i +sw i ; RW j =w j ⊙RegionAtt j +w j ; Among them, RW i Represents the meteorological element representation of multiple altitude layers after assigning regional weights, RW j It represents the meteorological element representation of a single altitude layer after assigning regional weights; The meteorological element representations after the multiple regional weights are assigned are spliced to obtain the regional weight fused meteorological representation.
3. The method according to claim 1, characterized in that The regional weight fusion meteorological representation of the meteorological element feature vector of the target area, the spatial fusion meteorological representation of the meteorological element feature vector and the category fusion meteorological representation of the meteorological element feature vector are calculated respectively, including: For the meteorological element characteristic vectors of multiple altitude layers corresponding to the target area, the meteorological element characteristic vectors of the multiple altitude layers are spliced to obtain the meteorological representation of the multiple altitude layers; For the meteorological element characteristic vectors of the single-altitude layer corresponding to the target area, the meteorological element characteristic vectors of the single-altitude layer are spliced to obtain the meteorological representation of the single-altitude layer; The multi-altitude layer meteorological representation and the single-altitude layer meteorological representation are spliced to obtain an overall altitude meteorological representation; The overall altitude meteorological representation is calculated by the following formula to obtain the spatial fusion meteorological representation: Among them, FW represents the overall height meteorological representation, FW′ represents the spatial fusion meteorological representation, dim represents the representation dimension, W3, W4, W5, b3, b4, b5 represent the training parameters, and W3, W4, W5∈R dim×dim , b3,b4,b5∈R (L+1)×dim , dim,L∈N,L>1,dim>0, N represents the set of natural numbers.
4. The method according to claim 1, characterized in that: The regional weight fusion meteorological representation of the meteorological element feature vector of the target area, the spatial fusion meteorological representation of the meteorological element feature vector and the category fusion meteorological representation of the meteorological element feature vector are calculated respectively, including: For the meteorological element feature vectors of the multiple altitude layers corresponding to the target area, the meteorological element values of the multiple altitude layers are subjected to dimensionality reduction mapping processing by the following formula to obtain the meteorological element feature vectors of the multiple altitude layers: lion k =ReLU(W k In k +b k ); Among them, w k Indicates the meteorological element values of multiple altitude layers, lw k Represents the characteristic vector of meteorological elements at multiple altitude levels, W k and b k represents the training parameters; The meteorological element characteristic vectors of the multiple-altitude layers and the meteorological element characteristic vectors of the single-altitude layer are uniformly mapped by the following formula to obtain the mapping value of the meteorological element characteristic vector, wherein the mapping value of the meteorological element characteristic vector includes the mapping value of the meteorological element characteristic vector of the multiple-altitude layers and the mapping value of the meteorological element characteristic vector of the single-altitude layer; gw k NReLU(W′ k lw k +b′ k )4 gw l =ReLU(W l In l +b l ); Among them, w l Represents the meteorological element characteristic vector of a single altitude layer, gw k Represents the mapping value of the meteorological element feature vector of multiple altitude layers, gw l Represents the mapping value of the meteorological element feature vector of a single altitude layer, W′ k ,b′ k ,W l ,b l represents the training parameters, W′ k ,W l ∈R D×XY , b′ k ,b l ∈R D , D,X,Y∈N, D, X, Y>0, N represents the set of natural numbers; The mapping values of the meteorological element characteristic vectors of the multiple altitude layers and the mapping values of the meteorological element characteristic vectors of the single altitude layer are concatenated to obtain a meteorological representation of multiple meteorological element mapping; The meteorological representation of the multiple meteorological elements is calculated by the following formula to obtain the category fusion meteorological representation: Where GW represents the meteorological representation of multi-meteorological elements mapping, GW′ represents the category fusion meteorological representation, D represents the scaling factor, W6, W7, W8, b6, b7, b8 represent the training parameters, and W6, W7, W8 ∈ R D×D ,b6,b7,b8∈R m×D , D, L∈N, L>1, D>0, m represents the number of categories of meteorological elements, and N represents a set of natural numbers.
5. The method according to claim 1, characterized in that: The meteorological element multi-fusion representation is calculated based on the regional weight fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation, including: The regional weight fusion meteorological representation, the spatial fusion meteorological representation and the category fusion meteorological representation are calculated by the following formula to obtain the meteorological element multi-fusion representation: Weather=α·RW+β·FW′+γ·GW′; Among them, Weather represents the multi-fusion representation of meteorological elements, RW represents the regional weighted fusion meteorological representation, α, β, γ represent weight coefficients, α+β+γ=1, α, β, γ>0.
6. The method according to claim 1, characterized in that The weather forecast model is obtained by training in the following way: Taking the multi-fusion representation of the meteorological elements of the target area at the first historical moment as input and the meteorological element value of the target area at the second historical moment as output, the initial model is trained to obtain the meteorological element forecast value at the second historical moment output by the initial model; When it is determined that the mean square error between the meteorological element prediction value at the second historical moment and the meteorological element value at the second historical moment is greater than a preset value, adjusting the training parameters of the initial model; When it is determined that the mean square error between the meteorological element prediction value at the second historical moment and the meteorological element value at the second historical moment is less than a preset value, the initial model is determined as the meteorological prediction model.
7. A device for predicting meteorological element values, characterized in that: include: A first calculation module is used to respectively calculate the regional weight fusion meteorological representation of the meteorological element feature vector of the target area, the spatial fusion meteorological representation of the meteorological element feature vector and the category fusion meteorological representation of the meteorological element feature vector, wherein the regional weight fusion meteorological representation is used to represent the meteorological element feature vector after regional weight allocation, the spatial fusion meteorological representation is used to represent the correlation between the meteorological element feature vectors of different altitude layers, and the category fusion meteorological representation is used to represent the correlation between different meteorological element feature vectors; A second calculation module is used to calculate the meteorological element multi-fusion representation according to the regional weight fusion meteorological representation, the spatial fusion meteorological representation, and the category fusion meteorological representation; A meteorological forecast module is used to input the multi-fusion representation of meteorological elements into a meteorological forecast model to obtain multiple meteorological element prediction values output by the meteorological forecast model, wherein the meteorological forecast model is trained on an initial model using the multi-fusion representation of meteorological elements of the target area at a first historical moment as input and the meteorological element values of the target area at a second historical moment as output, wherein the first historical moment is before the second historical moment.
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.