A Method for Global Meteorological Element Analysis Based on Attention Mechanism Networks

By introducing the attention mechanism network into the weather forecast model, the problem of insufficient accuracy of existing technology in dealing with complex terrain and rapidly changing weather is solved, more accurate weather prediction and flexible irrigation strategies are achieved, and agricultural production efficiency is improved.

CN118643309BActive Publication Date: 2025-01-21SINE SPACE (ANHUI) TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411126789.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2025-01-21
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

The existing meteorological forecasting models lack accuracy when dealing with complex terrain and rapidly changing weather phenomena, and cannot effectively realize on-demand sprinkler irrigation in places with uneven soil moisture.

Method used

The global meteorological element analysis method based on the attention mechanism network is used to grid the crop area, initialize the meteorological element data, and weight and integrate the meteorological information of neighbor nodes through the attention mechanism to generate a more accurate grid node representation vector.

Benefits of technology

It improves the accuracy of weather prediction in local areas, can flexibly adjust irrigation strategies according to different crop types and climate conditions, is suitable for a variety of agricultural environments, and improves the overall efficiency of agricultural production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643309B_ABST
    Figure CN118643309B_ABST
Patent Text Reader

Abstract

The invention relates to the field of meteorological technology, and discloses a method for global meteorological element analysis based on an attention mechanism network, comprising the following steps: gridding a crop area in an equidistant longitude and latitude grid manner, initializing meteorological element data for each grid node; encoding the meteorological element data initialized by the grid node into meteorological element features; determining a set of one-hop and two-hop neighbor nodes of a target grid node, using an attention mechanism to perform weighted summation on meteorological information of the neighbor nodes, and calculating an attention coefficient; updating the meteorological element features of the target grid node according to the calculated attention coefficient, and generating a characterization vector of the target grid node; and applying the characterization vector of the target grid node to a meteorological prediction model. The invention can focus on neighboring grid nodes that have the greatest contribution to a prediction target through an attention mechanism, thereby improving the accuracy of weather prediction in a local area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of meteorology, and more specifically, to a method for analyzing global meteorological elements based on an attention mechanism network. Background Art

[0002] Traditional global weather forecasting methods usually rely on numerical weather prediction models, which predict future weather conditions by solving a set of atmospheric dynamics equations. However, such models have limitations in dealing with refined weather forecasts in local areas, especially for complex terrain conditions and rapidly changing weather phenomena, such as local severe convection and mountain precipitation.

[0003] Analyzing the weather and meteorology in the crop area is helpful to provide data support for the precise irrigation strategy of crops in agricultural planting bases. The current existing technology uses reinforcement learning to optimize the amount of irrigation water, fertilizer and pesticides by analyzing the crop growth stage, soil moisture monitoring and meteorological forecasts in the crop area. The existing irrigation system uses a water pipe to connect multiple automatically controlled sprinklers to achieve precise irrigation of different crop areas. However, when the crop area is large and the soil moisture in different locations is uneven, it is easy to cause different water requirements for each plot in the crop area. The existing technology cannot achieve on-demand sprinkler irrigation in areas with uneven soil moisture. Summary of the invention

[0004] The present invention provides a method for global meteorological element analysis based on an attention mechanism network, which grids the crop area, initializes meteorological element data including surface variables and atmospheric variables for each grid node, and then uses the attention mechanism in deep learning to perform weighted integration on the meteorological information of neighboring nodes, thereby generating a more accurate grid node representation vector, thereby solving the technical problem of insufficient accuracy of the existing meteorological forecast model proposed above when dealing with complex terrain and rapidly changing weather phenomena.

[0005] The present invention provides a method for global meteorological element analysis based on an attention mechanism network, comprising the following steps:

[0006] Step 101, dividing the crop area into multiple plots according to the latitude and longitude grid method, collecting soil moisture data of all plots, crop growth status data of the crop area and weather status data of the crop area, wherein the soil moisture data of the plot includes the average moisture value of all soil moisture sensors on the plot, the crop growth status data of the crop area includes crop height and leaf area index, and the weather status data of the crop area includes sunny days, rainy days, cloudy days and rainfall;

[0007] Step 102, encoding the soil moisture data of all plots into soil moisture features, encoding the crop growth status data of the crop area into crop features, encoding the weather status data of the crop area into weather status features, and sequentially splicing the soil moisture features, crop features, and weather status features to obtain splicing features;

[0008] Step 103, input the spliced ​​features into the irrigation strategy model, the irrigation strategy model outputs the irrigation strategy, the irrigation strategy includes the amount of sprinkler irrigation for each plot of land, the irrigation strategy model includes a hidden layer and an output layer, the spliced ​​features are input into the hidden layer, the hidden layer outputs the hidden features, the hidden features are input into the output layer, the output layer outputs the Q value of each irrigation strategy, and the irrigation strategy with the largest Q value is selected as the output.

[0009] In a preferred embodiment, the method for acquiring weather status data of the crop area in step 101 comprises the following steps:

[0010] Step 201, gridding the crop area in a latitude and longitude grid manner with equal intervals, and initializing meteorological element data for each grid node, the meteorological element data including surface variable data and atmospheric variable data, wherein the surface variable data includes temperature at a height of 2 meters from the horizontal plane, u component of wind at a height of 10 meters from the horizontal plane, v component of wind at a height of 10 meters from the horizontal plane, and average sea level pressure, and the atmospheric variable data includes potential, specific humidity, temperature, u component of wind, and v component of wind at a height of 12 kilometers from the horizontal plane;

[0011] Step 202, encoding the meteorological element data initialized by the grid node into meteorological element features;

[0012] Step 203, determining the one-hop and two-hop neighbor node sets of the target grid node, using the attention mechanism to perform weighted summation on the meteorological information of the neighbor nodes, and calculating the attention coefficient;

[0013] Step 204, updating the meteorological element characteristics of the target grid node according to the calculated attention coefficient, and generating a representation vector of the target grid node;

[0014] Step 205, applying the characterization vector of the target grid node to the meteorological prediction model, predicting the probability of future weather conditions in the area corresponding to the target grid node, where the weather conditions include sunny, rainy, cloudy and rainfall.

[0015] In a preferred embodiment, the calculation formula for weighted summation of the meteorological information of neighboring nodes using the attention mechanism is:

[0016]

[0017] in, represents the attention coefficient of the target grid node and the nth grid node, represent the target grid node and the nth grid node respectively, represents the activation function, represents the natural base, Represents the meteorological element characteristics of the target grid node, represents the meteorological element characteristics of the nth grid node, represents the node set of mesh nodes connected to the target mesh node, Indicates the splicing operation of meteorological information features. represents the first attention weight matrix, represents the second attention weight matrix and T represents transpose.

[0018] In a preferred embodiment, the calculation formula for updating node features is as follows:

[0019]

[0020] in, represents the updated representation vector of the aggregated features of the target grid node, Represents a constant, with a value range of , represents the attention weight matrix, Represents the meteorological element characteristics of the target grid node, represents the attention coefficient, Represents a node in the Grid The characteristics of meteorological information, Represents all connected nodes The collection of nodes in the grid.

[0021] In a preferred embodiment, the calculation formula of the hidden layer is as follows:

[0022]

[0023] in, represents hidden features, Represents the splicing feature, represents the first weight matrix, represents the bias coefficient of the hidden layer, Represents the ReLU function;

[0024] The calculation formula of the output layer is as follows:

[0025]

[0026] in, represents the Q value of each drip irrigation strategy, represents hidden features, represents the ReLU function, represents the second weight matrix, Represents the bias parameter of the output layer.

[0027] In a preferred embodiment, the state space includes soil moisture characteristics, crop characteristics, and weather forecast characteristics;

[0028] The action space includes a set of actions for adjusting the water spraying amount of the sprinkler heads of each plot, and one action includes increasing the water spraying amount, reducing the water spraying amount, or keeping the current water spraying amount unchanged for the sprinkler heads of each plot.

[0029] In a preferred embodiment, the calculation formula of the reward function is:

[0030]

[0031] in, represents the reward value corresponding to the irrigation strategy, represents crop yield, Indicates the amount of water resources saved, represents the soil moisture deviation, , , Represent the first, second, and third reward weight coefficients respectively.

[0032] In a preferred embodiment, the calculation formula for the amount of water resource savings is:

[0033]

[0034] in, Indicates the amount of water resources saved, represents the average water consumption without irrigation strategy over the years, Indicates actual water consumption;

[0035] The calculation formula for soil moisture deviation is:

[0036]

[0037] in, represents the soil moisture deviation, represents the current soil moisture in the crop area, and The two thresholds represent the ideal soil moisture range.

[0038] A system for global meteorological element analysis based on an attention mechanism network, including the following modules:

[0039] The grid initialization and data mapping module is used to grid the crop area and initialize the meteorological element data for each grid node;

[0040] A feature encoding module, used for encoding meteorological element data initialized by grid nodes into meteorological element features;

[0041] The attention mechanism module is used to perform weighted summation of the meteorological information of neighboring nodes according to the attention mechanism and calculate the attention coefficient;

[0042] The feature updating module updates the meteorological element features of the target grid node according to the calculated attention coefficient and generates a representation vector of the target grid node;

[0043] The weather prediction module is used to predict the weather status according to the updated grid node representation vector.

[0044] A storage medium storing non-transitory computer-readable instructions, which, when executed by a computer, can execute the steps in the above-mentioned method for global meteorological element analysis based on an attention mechanism network.

[0045] The beneficial effects of the present invention are:

[0046] 1. The present invention can focus on the neighboring grid nodes that have the greatest contribution to the prediction target through the attention mechanism, thereby improving the accuracy of local area weather prediction;

[0047] 2. The method of the present invention obtains the meteorological elements of adjacent plots in the aggregated crop area by adopting the attention mechanism, and then comprehensively analyzes the soil moisture, crop growth status and weather conditions of the plots. It can be flexibly adjusted according to different crop types and climatic conditions, is suitable for a variety of agricultural environments, and improves the overall efficiency of agricultural production. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flow chart of applying a method of global meteorological element analysis based on an attention mechanism network of the present invention to agricultural irrigation strategy.

[0049] Figure 2 It is a flow chart of a method for analyzing global meteorological elements based on an attention mechanism network of the present invention, which uses an attention mechanism to perform weighted integration on meteorological information of neighboring nodes.

[0050] Figure 3 It is a system block diagram of global meteorological element analysis based on an attention mechanism network of the present invention.

[0051] Figure 4 It is an example diagram of a target grid node and neighbor nodes in a grid node in the present invention.

[0052] In the figure: 100, grid initialization and data mapping module; 200, feature encoding module; 300, attention mechanism module; 400, feature update module; 500, weather prediction module. DETAILED DESCRIPTION

[0053] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that the discussion of these embodiments is only to enable those skilled in the art to better understand and implement the subject matter described herein, and the functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the contents of this specification. Each example may omit, replace or add various processes or components as needed. In addition, the features described relative to some examples may also be combined in other examples.

[0054] like Figure 2 As shown, a method for global meteorological element analysis based on an attention mechanism network includes the following steps:

[0055] Step 201, gridding the crop area in a latitude and longitude grid manner with equal intervals, and initializing meteorological element data for each grid node, the meteorological element data including surface variable data and atmospheric variable data, wherein the surface variable data includes temperature at a height of 2 meters from the horizontal plane, u component of wind at a height of 10 meters from the horizontal plane, v component of wind at a height of 10 meters from the horizontal plane, and average sea level pressure, and the atmospheric variable data includes potential, specific humidity, temperature, u component of wind, and v component of wind at a height of 12 kilometers from the horizontal plane;

[0056] It should be noted that the crop area can be a city, region or crop farm, each grid node represents a specific geographical location, and the atmospheric variable data are obtained at an altitude of about 1.5 km, 5.5 km and 12 km above the horizontal plane;

[0057] It should be further explained that the meteorological element data initialized at the beginning comes from open source meteorological forecast data, such as the China Meteorological Administration, the European Meteorological Agency, etc.

[0058] Step 202, encoding the meteorological element data initialized by the grid node into meteorological element features;

[0059] Before encoding the meteorological element data, the meteorological element data needs to be preprocessed. The preprocessing method includes the following steps:

[0060] Step 1: Check whether there are missing values ​​for each meteorological element information in the data set. If so, various strategies can be used to fill in the missing values, for example, using the mean, median, value of the previous moment, or interpolation methods to estimate the missing values;

[0061] Step 2: Convert each meteorological element information into numerical features and concatenate them in order. For example, use temperature, wind speed, and air pressure directly as numerical features, and classify weather type data using unique hot encoding or label encoding.

[0062] In one embodiment of the present invention, an example of encoding is provided:

[0063] A grid node is randomly selected, and its initialized meteorological element data is as follows:

[0064] Surface variable data: temperature (2m) = 20°C, wind speed (10m) u = 3m / s, wind speed (10m) v = 2m / s, average sea level pressure = 1013hPa;

[0065] Atmospheric variable data: potential (12km) = 20000 J / kg, specific humidity (12km) = 0.001 kg / kg, temperature (12km) = -20°C, wind speed (12km) u = 10 m / s, wind speed (12km) v = 5 m / s;

[0066] After the above encoding method, the above meteorological element data can be encoded into meteorological element features, which can be expressed as:

[0067]

[0068] in, Represents the meteorological element characteristics of the grid node;

[0069] Step 203, determining the one-hop and two-hop neighbor node sets of the target grid node, using the attention mechanism to perform weighted summation on the meteorological information of the neighbor nodes, and calculating the attention coefficient;

[0070] The calculation formula for weighted summation of the meteorological information of neighboring nodes using the attention mechanism is:

[0071]

[0072] in, represents the attention coefficient of the target grid node and the nth grid node, represent the target grid node and the nth grid node respectively, represents the activation function, represents the natural base, Represents the meteorological element characteristics of the target grid node, represents the meteorological element characteristics of the nth grid node, represents the node set of mesh nodes connected to the target mesh node, Indicates the splicing operation of meteorological information features. represents the first attention weight matrix, represents the second attention weight matrix, T represents transpose;

[0073] It should be noted that the target grid node represents the node corresponding to a certain area in the crop area to be analyzed after gridding; for the aggregation process, when updating the grid node information, it is necessary to aggregate the meteorological information of the neighboring nodes connected to the grid node. During the aggregation process, the attention mechanism is used for weighted summation, and finally linearly weighted with the meteorological information of the target grid node itself;

[0074] It is necessary to further explain that the understanding of the target grid node and the neighboring node in the grid node is as follows Figure 4 As shown, for example, the red node represents the target grid node, that is, the target node, the green node and the purple node represent the neighbor nodes of the target grid node (here we only consider the range of two-hop neighbor nodes), the green node is the one-hop neighbor node of the target grid node, that is, the node directly connected to the target grid node, and the purple node is the two-hop neighbor node of the target grid node, that is, the node connected to the target grid node by two edges. When using the attention mechanism network to analyze meteorological elements, it is essentially the weighted sum of the meteorological data of the green node and the purple node, and then the meteorological information of the target grid node is updated.

[0075] Step 204, updating the meteorological element characteristics of the target grid node according to the calculated attention coefficient, and generating a representation vector of the target grid node;

[0076] The calculation formula for updating node features is as follows:

[0077]

[0078] in, represents the updated representation vector of the aggregated features of the target grid node, Represents a constant, with a value range of , represents the attention weight matrix, Represents the meteorological element characteristics of the target grid node, represents the attention coefficient, Represents a grid node The characteristics of meteorological information, Represents all connected nodes The collection of nodes in the grid;

[0079] Linearly combine the target grid node’s own meteorological information with the aggregated neighbor information to update the node feature vector;

[0080] Step 205, applying the characterization vector of the target grid node to the meteorological prediction model to predict the probability of future weather conditions in the area corresponding to the target grid node, where the weather conditions include sunny, rainy, cloudy and rainfall;

[0081] In one embodiment of the present invention, the weather forecast neural network model is an existing weather forecast model in the field of weather forecasting. Some models are provided below for reference:

[0082] Artificial intelligence global short- and medium-term forecast system "Fengqing", artificial intelligence nowcast system "Fenglei", artificial intelligence global sub-seasonal-seasonal forecast system "Fengshun", Fuxi large model, graphcast model, etc.

[0083] There are many ways to implement the present invention. It can be made into an API interface to provide users with meteorological characterization data, or it can be embedded in other meteorological warning products in the form of a background algorithm. The following describes the specific operations of implementing the present invention in the form of an API interface:

[0084] First, the service provider divides the crop area into grids and initializes the meteorological information data on the grid nodes according to the user's meteorological analysis task and the resolution of the global meteorological data grid. Then, the loss function is set according to the user's analysis task to train the multi-layer perceptron network (the first attention weight matrix mentioned above represents the multi-layer perceptron network) and the single-layer perceptron network (the second attention weight matrix mentioned above represents the multi-layer perceptron network). Then, the attention weight coefficient is calculated, the meteorological representation data of all nodes on the grid are aggregated and updated, and then deployed on the server side with an open interface. The user side uses the http request interface service and can obtain meteorological representation data from the interface by passing in the longitude and latitude range.

[0085] like Figure 1 As shown, in one embodiment of the present invention, a method for global meteorological element analysis based on an attention mechanism network is provided, and the method comprises the following steps:

[0086] Step 101, dividing the crop area into multiple plots according to the latitude and longitude grid method, collecting soil moisture data of all plots, crop growth status data of the crop area and weather status data of the crop area, wherein the soil moisture data of the plot includes the average moisture value of all soil moisture sensors on the plot, the crop growth status data of the crop area includes crop height and leaf area index, and the weather status data of the crop area includes sunny days, rainy days, cloudy days and rainfall;

[0087] It should be noted that the soil moisture data is obtained by installing multiple soil moisture sensors in the gridded plots, dividing the soil moisture data collected by multiple soil moisture sensors in the same plot equally, and taking the calculated average moisture value as the soil moisture data of the plot;

[0088] The acquisition of crop growth status data can be obtained through satellite or drone remote sensing technology;

[0089] Weather status data is obtained from the output of the above-mentioned meteorological forecast model;

[0090] Step 102, encoding the soil moisture data of all plots into soil moisture features, encoding the crop growth status data of the crop area into crop features, encoding the weather status data of the crop area into weather status features, and sequentially splicing the soil moisture features, crop features, and weather status features to obtain splicing features;

[0091] The soil moisture feature coding method includes the following:

[0092] Data cleaning: remove any outliers or missing values;

[0093] Average calculation: average all sensor readings on each plot to get the average soil moisture value of the plot;

[0094] Normalization: Convert the average soil moisture value to a standardized range, such as [0, 1], where 0 represents the driest and 1 represents the wettest;

[0095] The method of crop characteristic coding includes the following:

[0096] Data collection: Crop height and leaf area index (LAI) using remote sensing technology or ground-based measurement equipment;

[0097] Normalization: Convert crop height and LAI to standardized values, for example, normalize crop height to the maximum height and normalize LAI to the crop-specific maximum LAI value;

[0098] The method of weather state feature coding includes the following:

[0099] Weather status data includes sunny, rainy, cloudy and rainfall. Sunny, rainy and cloudy are encoded using one-hot encoding or label encoding.

[0100] Precipitation encoding: Precipitation can be normalized and then treated as a continuous feature.

[0101] Coding example: If the weather state is sunny and the rainfall is 0 mm (0 after normalization), the weather state feature can be encoded as [1, 0, 0, 0];

[0102] Finally, the soil moisture features, crop features, and weather status features are concatenated in sequence to form a concatenated feature vector.

[0103] Step 103, input the splicing features into the irrigation strategy model, the irrigation strategy model outputs the irrigation strategy, the irrigation strategy includes the amount of sprinkler irrigation for each plot, the irrigation strategy model includes a hidden layer and an output layer, the splicing features are input into the hidden layer, the hidden layer outputs the hidden features, the hidden features are input into the output layer, the output layer outputs the Q value of each irrigation strategy, and the irrigation strategy with the largest Q value is selected as the output;

[0104] The calculation formula of the hidden layer is as follows:

[0105]

[0106] in, represents hidden features, Represents the splicing feature, represents the first weight matrix, represents the bias coefficient of the hidden layer, Represents the ReLU function;

[0107] The calculation formula of the output layer is as follows:

[0108]

[0109] in, represents the Q value of each drip irrigation strategy, represents hidden features, represents the ReLU function, represents the second weight matrix, Represents the bias parameter of the output layer;

[0110] The state space includes soil moisture characteristics, crop characteristics, and weather forecast characteristics;

[0111] The action space includes a set of actions for adjusting the water spraying amount of the sprinkler heads of each plot. An action includes increasing the water spraying amount, reducing the water spraying amount, or keeping the current water spraying amount unchanged for the sprinkler heads of each plot.

[0112] The water spraying volume refers to the total amount of water flowing out of the sprinkler per unit time (e.g. one minute) during the irrigation process. The water spraying volume is regulated by controlling the opening degree of the electric valve of the sprinkler.

[0113] The reward function is calculated as:

[0114]

[0115] in, represents the reward value corresponding to the irrigation strategy, represents crop yield, Indicates the amount of water resources saved, represents the soil moisture deviation, , , Represent the first, second, and third reward weight coefficients respectively;

[0116] Crop yield is an estimate of the future yield of the current crop based on historical crop yield data and current crop status;

[0117] Among them, the methods for estimating crop yield include agronomic model methods, and the estimation models used include DSSAT, WOFOST, APSIM, etc.;

[0118] The calculation formula for water resource saving is:

[0119]

[0120] in, Indicates the amount of water resources saved, represents the average water consumption without irrigation strategy over the years, Indicates actual water consumption;

[0121] The calculation formula for soil moisture deviation is:

[0122]

[0123] in, represents the soil moisture deviation, represents the current soil moisture in the crop area, and Two thresholds representing the ideal soil moisture range;

[0124] The method of the present invention obtains the meteorological elements of adjacent plots in the aggregated crop area by adopting the attention mechanism, and then comprehensively analyzes the soil moisture, crop growth status and weather status of the plots, monitors and considers the soil moisture and crop needs on the plots, realizes on-demand irrigation, avoids waste of water resources, and ensures that crops get sufficient water, which is beneficial to improving crop yield and quality. The method can be flexibly adjusted according to different crop types and climatic conditions, is applicable to a variety of agricultural environments, and improves the overall efficiency of agricultural production.

[0125] It should be noted that before each irrigation operation, the soil moisture data, crop growth status data and weather status data need to be updated to regenerate the irrigation strategy;

[0126] The training of the irrigation strategy model includes the following steps:

[0127] Step 1: Initialize the experience pool, randomly initialize the irrigation strategy model, and initialize network, whose parameters are the same as those of the irrigation strategy model;

[0128] Step 2: reset the environment and obtain the first state;

[0129] Step 3: Generate an action using the ϵ-greedy strategy: There is a probability of ϵ to randomly select an action, which is the exploration mode; otherwise, , select In the state The biggest action is the experience mode. Calculated through irrigation strategy model;

[0130] Get feedback based on the interaction between actions and the environment , next state and whether the termination condition done is triggered, the termination condition is the end of the crop production cycle;

[0131] It should be noted that Indicates the reward value corresponding to the irrigation strategy in the current state;

[0132] Experience Deposit into the experience pool, one experience is a four-tuple or ;

[0133] Step 4: Get an experience randomly from the experience pool;

[0134]

[0135] Indicates status Down The network's maximum output;

[0136] according to and Find the loss and use the gradient descent method to update the irrigation strategy model;

[0137]

[0138] Indicates status and actions The output Q value of the irrigation strategy model is as follows;

[0139] is the discount factor, which is a value between 0 and 1, used to balance the weights of immediate rewards and future rewards. The default value is 0.6;

[0140] Step 5: Update every fixed number of network updates. network so that its parameters are the same as those of the current irrigation strategy model;

[0141] Step 6, until After the network converges or the number of updates reaches the set value, the step is terminated.

[0142] like Figure 3 As shown, a system for global meteorological element analysis based on an attention mechanism network includes the following modules:

[0143] The grid initialization and data mapping module 100 is used to grid the crop area and initialize the meteorological element data for each grid node;

[0144] The feature encoding module 200 is used to encode the meteorological element data initialized by the grid node into meteorological element features;

[0145] The attention mechanism module 300 is used to perform weighted summation of the meteorological information of neighboring nodes according to the attention mechanism to calculate the attention coefficient;

[0146] A feature updating module 400 updates the meteorological element feature of the target grid node according to the calculated attention coefficient to generate a characterization vector of the target grid node;

[0147] The weather prediction module 500 is used to predict the weather status according to the updated grid node characterization vector.

[0148] A storage medium storing non-transitory computer-readable instructions, which, when executed by a computer, can execute the steps in the above-mentioned method for global meteorological element analysis based on an attention mechanism network.

[0149] The above describes an embodiment of the present embodiment, but the present embodiment is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present embodiment, ordinary technicians in this field can also make many forms, all of which are within the protection of the present embodiment.

Claims

1. A method for global meteorological element analysis based on an attention mechanism network, characterized in that: The following steps are involved: Step 101, dividing the crop area into multiple plots according to the latitude and longitude grid method, collecting soil moisture data of all plots, crop growth status data of the crop area and weather status data of the crop area, wherein the soil moisture data of the plot includes the average moisture value of all soil moisture sensors on the plot, the crop growth status data of the crop area includes crop height and leaf area index, and the weather status data of the crop area includes sunny days, rainy days, cloudy days and rainfall; Step 102, encoding the soil moisture data of all plots into soil moisture features, encoding the crop growth status data of the crop area into crop features, encoding the weather status data of the crop area into weather status features, and sequentially splicing the soil moisture features, crop features, and weather status features to obtain splicing features; Step 103, input the splicing features into the irrigation strategy model, the irrigation strategy model outputs the irrigation strategy, the irrigation strategy includes the amount of sprinkler irrigation for each plot, the irrigation strategy model includes a hidden layer and an output layer, the splicing features are input into the hidden layer, the hidden layer outputs the hidden features, the hidden features are input into the output layer, the output layer outputs the Q value of each irrigation strategy, and the irrigation strategy with the largest Q value is selected as the output; The method for acquiring weather status data of the crop area in step 101 comprises the following steps: Step 201, gridding the crop area in a latitude and longitude grid manner with equal intervals, and initializing meteorological element data for each grid node, the meteorological element data including surface variable data and atmospheric variable data, wherein the surface variable data includes temperature at a height of 2 meters from the horizontal plane, u component of wind at a height of 10 meters from the horizontal plane, v component of wind at a height of 10 meters from the horizontal plane, and average sea level pressure, and the atmospheric variable data includes potential, specific humidity, temperature, u component of wind, and v component of wind at a height of 12 kilometers from the horizontal plane; Step 202, encoding the meteorological element data initialized by the grid node into meteorological element features; Step 203, determining the one-hop and two-hop neighbor node sets of the target grid node, using the attention mechanism to perform weighted summation on the meteorological information of the neighbor nodes, and calculating the attention coefficient; Step 204, updating the meteorological element characteristics of the target grid node according to the calculated attention coefficient, and generating a representation vector of the target grid node; Step 205, applying the characterization vector of the target grid node to the meteorological prediction model to predict the probability of future weather conditions in the area corresponding to the target grid node, where the weather conditions include sunny, rainy, cloudy and rainfall; The calculation formula for weighted summation of the meteorological information of neighboring nodes using the attention mechanism is: ; in, represents the attention coefficient of the target grid node and the nth grid node, represent the target grid node and the nth grid node respectively, represents the activation function, represents the natural base, Represents the meteorological element characteristics of the target grid node, represents the meteorological element characteristics of the nth grid node, represents the node set of mesh nodes connected to the target mesh node, Indicates the splicing operation of meteorological information features. represents the first attention weight matrix, represents the second attention weight matrix, T represents transpose; The calculation formula for updating node features is as follows: ; in, represents the updated representation vector of the aggregated features of the target grid node, Represents a constant, with a value range of , represents the attention weight matrix, Represents the meteorological element characteristics of the target grid node, represents the attention coefficient, Represents a grid node The characteristics of meteorological information, Represents all connected nodes The collection of nodes in the grid; The calculation formula of the hidden layer is as follows: ; in, represents hidden features, Represents the splicing feature, represents the first weight matrix, represents the bias coefficient of the hidden layer, Represents the ReLU function; The calculation formula of the output layer is as follows: ; in, represents the Q value of each drip irrigation strategy, represents hidden features, represents the ReLU function, represents the second weight matrix, Represents the bias parameter of the output layer.

2. The method for global meteorological element analysis based on an attention mechanism network according to claim 1, characterized in that: The state space includes soil moisture characteristics, crop characteristics, and weather forecast characteristics; The action space includes a set of actions for adjusting the water spraying amount of the sprinkler heads of each plot, and one action includes increasing the water spraying amount, reducing the water spraying amount, or keeping the current water spraying amount unchanged for the sprinkler heads of each plot.

3. The method for global meteorological element analysis based on an attention mechanism network according to claim 2, characterized in that: The reward function is calculated as: ; in, represents the reward value corresponding to the irrigation strategy, represents crop yield, Indicates the amount of water resources saved, represents the soil moisture deviation, , , Represent the first, second, and third reward weight coefficients respectively.

4. The method for global meteorological element analysis based on an attention mechanism network according to claim 3, characterized in that: The calculation formula for water resource saving is: ; in, Indicates the amount of water resources saved, represents the average water consumption without irrigation strategy in the past 10 years, Indicates actual water consumption; The calculation formula for soil moisture deviation is: ; in, represents the soil moisture deviation, represents the current soil moisture in the crop area, and The two thresholds represent the ideal soil moisture range.

5. A system for global meteorological element analysis based on an attention mechanism network, applied to the steps of a method for global meteorological element analysis based on an attention mechanism network as described in any one of claims 1 to 4, characterized in that: Includes the following modules: The grid initialization and data mapping module is used to grid the crop area and initialize the meteorological element data for each grid node; A feature encoding module, used for encoding meteorological element data initialized by grid nodes into meteorological element features; The attention mechanism module is used to perform weighted summation of the meteorological information of neighboring nodes according to the attention mechanism and calculate the attention coefficient; The feature updating module updates the meteorological element features of the target grid node according to the calculated attention coefficient and generates a representation vector of the target grid node; The weather prediction module is used to predict the weather status according to the updated grid node representation vector.

6. A storage medium storing non-transitory computer-readable instructions, characterized in that: When the non-transitory computer-readable instructions are executed by a computer, the steps in the method for global meteorological element analysis based on an attention mechanism network as described in claim 4 can be performed.

Citation Information

Patent Citations

  • Water-saving irrigation control system

    CN117652386A

  • Time series data prediction method associated with time-space relationship

    CN117668743A

  • Weather prediction method based on time-varying graph neural network

    CN117891007A

  • Irrigation control with deep reinforcement learning and smart scheduling

    US20220248616A1