Meteorological resource prediction method, machine readable storage medium and processor

By preprocessing and sending training meteorological data into Transformer model for feature extraction and optimization, the problem of insufficient quality of meteorological resource monitoring data is solved, accurate probability prediction of meteorological resources is achieved, and the prediction accuracy and adaptability of new energy power systems are improved.

CN120337721APending Publication Date: 2025-07-18STATE GRID INFORMATION & TELECOMM GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510351465.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the existing technology, the quality of meteorological resource monitoring data is not very interpretable, and the integration of large-scale monitoring blind spots with actual new energy demand is insufficient, resulting in the inability to fully use the new energy planning and operation, affecting the accuracy of new energy forecasting and forecasting.

Method used

By obtaining training meteorological data, preprocessing and merging it, and then sending it to a prediction model based on Transformer. Multi-scale embedding layer, multi-layer attention layer and feedforward neural network layer are used for feature extraction and prediction, and combined with data trend fitting and optimization, we generate meteorological resource prediction results.

Benefits of technology

Accurate probability prediction of meteorological resources is achieved, the prediction accuracy and adaptability of new energy power systems are improved, and the problem of insufficient application of meteorological resource data in new energy planning is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120337721A_ABST
    Figure CN120337721A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a meteorological resource prediction method, a machine readable storage medium and a processor, and belongs to the field of meteorological prediction. The method comprises the following steps: acquiring training meteorological data influencing new energy power; preprocessing the training meteorological data to obtain training meteorological data meeting requirements; combining the training meteorological data meeting the requirements and sending the combined training meteorological data into a prediction model; optimizing the prediction model according to an error between a prediction result of the prediction model and real meteorological data; and sending the obtained meteorological data into the optimized prediction model to obtain a meteorological resource prediction result. The method can accurately predict the probability of meteorological resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of meteorological prediction, and particularly to a method, a machine-readable storage medium, and a processor for predicting meteorological resources. Background Art

[0002] Under the background of the intensification of global climate change, meteorological conditions have become a key factor affecting the safety of the power grid and power supply. As an important factor affecting the prediction accuracy of new energy power and the operation planning of new energy, there are currently problems in the public meteorological resource monitoring such as the weak interpretability of data quality, the lack of integration between large-scale monitoring blind areas and the actual needs of new energy, resulting in the phenomenon of information islands, making the meteorological resource data unable to be fully used in all aspects of new energy planning and operation. The sources of meteorological resource information are extensive and the data types are diverse, with problems such as poor quality of basic data and low application level of intelligent technologies, resulting in low adaptability of the meteorological resource model for new energy, restricting the improvement of the prediction accuracy of new energy. The key prediction models are affected by climate / terrain, etc., and there are large uncertainties in capturing local micro-scale weather processes. All of the above do not match the construction and operation requirements of the new power system. Therefore, a method for predicting meteorological resources is needed. Summary of the Invention

[0003] The purpose of the embodiments of the present invention is to provide a method, a machine-readable storage medium, and a processor for predicting meteorological resources, and this method can accurately predict the probability of meteorological resources.

[0004] To achieve the above purpose, the embodiments of the present invention provide a method for predicting meteorological resources, and the method includes: Obtain training meteorological data affecting new energy power; Preprocess the training meteorological data to obtain qualified training meteorological data; Merge the qualified training meteorological data and send it into a prediction model to obtain a predicted result; Optimize the prediction model according to the error between the result predicted by the prediction model and the real meteorological data; Send the obtained meteorological data into the optimized prediction model to obtain a meteorological resource prediction result.

[0005] Optionally, the training meteorological data includes: time, geographical location, and meteorological parameters.

[0006] Optionally, preprocessing the training meteorological data to obtain qualified training meteorological data includes: Mark the terrain of the training meteorological data according to the geographical location in the training meteorological data; Classify the training meteorological data according to the terrain markers to obtain a plurality of first classification sets; Obtain the longitude and latitude in the training meteorological data and perform longitude and latitude marking on the training meteorological data in the first classification sets; According to the longitude and latitude markings of the training meteorological data, classify the training meteorological data in the first classification sets by the k-means clustering algorithm to obtain a plurality of second classification sets, thereby obtaining training meteorological data for different scenarios.

[0007] Optionally, preprocess the training meteorological data to obtain qualified training meteorological data, including: Obtain training meteorological data for different scenarios according to the classification of the training meteorological data; Judge whether the quantity of the training meteorological data in different scenarios is above the corresponding scenario's data threshold range; When the quantity of the training meteorological data in a scenario is above the corresponding scenario's data threshold, convert the training meteorological data in this scenario into a first vector; Screen the first vectors whose Euclidean distance from other vectors is less than a first preset threshold; Take the median value of the training meteorological data corresponding to the screened first vectors to obtain screened meteorological data, and incorporate the screened meteorological data into the training meteorological data corresponding to the first vectors that are not screened to obtain qualified training meteorological data.

[0008] Optionally, preprocess the training meteorological data to obtain qualified training meteorological data, including: When the quantity of the training meteorological data in a scenario is below the corresponding scenario's data threshold range, convert the training meteorological data in this scenario into a second vector; Screen the second vectors whose minimum Euclidean distance from other second vectors is greater than a second preset threshold as the screened second vectors; Obtain the K second vectors closest to the screened second vector; Randomly select one of the second vectors from the K second vectors; Randomly select a data on the line connecting the screened second vector and the randomly selected second vector as new training meteorological data; Incorporate the new training meteorological data into the obtained training meteorological data to obtain qualified training meteorological data.

[0009] Optionally, merge the qualified training meteorological data and send it into a prediction model to obtain a predicted result, including: Merge the qualified training meteorological data and send the merged training meteorological data into the prediction model, where the prediction model is a model based on Transformer; The multi-scale embedding layer of the prediction model divides the training meteorological data according to time and space dimensions to generate multi-scale feature maps; The multi-layer attention layer of the prediction model performs dimensionality reduction on the multi-scale feature maps through Fourier transform; The multi-layer attention layer of the prediction model segments and aggregates features of different scales of the multi-scale feature maps after dimensionality reduction through a sliding window mechanism; The feed-forward neural network layer of the prediction model performs independent non-linear transformations on each aggregated feature to capture the relationships between features; The decoder of the prediction model converts the relationships between features into the final predicted results.

[0010] Optionally, the meteorological data sent into the optimized prediction model is obtained through the following method, including: Obtain the current meteorological data and the meteorological data of the same historical period; Judge whether the difference between the current meteorological data and the meteorological data of the same historical period is within a certain threshold; When the difference is within the preset range, retain the meteorological data at this time as a data point for data trend fitting to obtain the meteorological data sent into the optimized prediction model; When the difference is not within the preset range, discard the meteorological data at this time and return to the step of obtaining the current meteorological data and the meteorological data of the same historical period.

[0011] Optionally, the specific steps of data trend fitting include: Judge whether the meteorological data to be subjected to data trend fitting is missing; If so, fit the meteorological data to be subjected to data trend fitting according to the relationship between time and meteorological parameters to obtain a fitting curve; Set the span step size of the fitting curve and determine the range of the starting point of the fitting curve, and select different starting points within the range of the starting point; Starting from different starting points, divide the fitting curve into multiple small intervals according to the span step size; Calculate the average meteorological parameters and average time within each small interval; According to the average meteorological parameters and average time within each small interval, calculate the slope between two adjacent small intervals; Obtain the slope and fit the relationship between the slope and time into a slope distribution curve; Determine the time points of the missing meteorological data, and determine the slopes of the two adjacent time points on the slope distribution curve according to the time points of the missing meteorological data; Take the average value of the slopes of the two time points as the missing slope; Determine the meteorological parameters of the two time points adjacent to the time point of the missing meteorological data, calculate two missing parameters through the missing slope, and take the average value of the two missing parameters as the missing meteorological parameter and incorporate it into the meteorological data to be subjected to data trend fitting, so as to obtain the meteorological data sent into the optimized prediction model.

[0012] On the other hand, the present invention also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to cause a machine to execute a method for predicting meteorological resources as described above.

[0013] On yet another aspect, the present invention also provides a processor for running a program, wherein the program, when run, is used to execute: a method for predicting meteorological resources as described above.

[0014] On yet another aspect, the present invention also provides a system for short-term and medium-term probability prediction of meteorological resources, and the system includes: A data acquisition module for acquiring meteorological resource data; A short-term and medium-term probability prediction module, according to the acquired meteorological resource data, the short-term and medium-term probability prediction model is used to execute: Preprocess the training meteorological data to obtain qualified training meteorological data; Merge the qualified training meteorological data and send it into the prediction model to obtain a prediction result; Optimize the prediction model according to the error between the result predicted by the prediction model and the real meteorological data; Send the acquired meteorological data into the optimized prediction model to obtain a meteorological resource prediction result.

[0015] Optionally, the training meteorological data includes: time, geographical location, and meteorological parameters.

[0016] Optionally, preprocessing the training meteorological data to obtain qualified training meteorological data includes: Perform terrain marking on the training meteorological data according to the geographical location in the training meteorological data; Classify the training meteorological data according to the terrain marking to obtain a plurality of first classification sets; Obtain the longitude and latitude in the training meteorological data and perform longitude and latitude marking on the training meteorological data in the first classification set; According to the longitude and latitude marks of the training meteorological data, classify the training meteorological data in the first classification set through the k-means clustering algorithm to obtain multiple second classification sets, thereby obtaining training meteorological data for different scenarios.

[0017] Optionally, preprocess the training meteorological data to obtain qualified training meteorological data, including: Obtain training meteorological data for different scenarios according to the classification of the training meteorological data; Judge whether the quantity of the training meteorological data in different scenarios is above the data threshold range corresponding to the scenario; When the quantity of the training meteorological data in a scenario is above the data threshold corresponding to the scenario, convert the training meteorological data in this scenario into a first vector; Screen the first vectors whose Euclidean distance from other vectors is less than the first preset threshold; Take the median value of the training meteorological data corresponding to the screened first vectors to obtain screened meteorological data, and incorporate the screened meteorological data into the training meteorological data corresponding to the first vectors that are not screened to obtain qualified training meteorological data.

[0018] Optionally, preprocess the training meteorological data to obtain qualified training meteorological data, including: When the quantity of the training meteorological data in a scenario is below the data threshold range corresponding to the scenario, convert the training meteorological data in this scenario into a second vector; Screen the second vectors whose minimum Euclidean distance from other second vectors is greater than the second preset threshold as the screened second vectors; Obtain the K second vectors closest to the screened second vector; Randomly select one of the second vectors from the K second vectors; Randomly select a data on the line connecting the screened second vector and the randomly selected second vector as new training meteorological data; Incorporate the new training meteorological data into the obtained training meteorological data to obtain qualified training meteorological data.

[0019] Optionally, merge the qualified training meteorological data and send it into a prediction model to obtain a predicted result, including: Merge the qualified training meteorological data, and send the merged training meteorological data into the prediction model, where the prediction model is a model based on Transformer; The multi-scale embedding layer of the prediction model divides the training meteorological data according to time and space dimensions to generate multi-scale feature maps; The multi-layer attention layer of the prediction model reduces the dimension of the multi-scale feature maps through Fourier transform; The multi-layer attention layer of the prediction model segments and aggregates features of different scales of the dimension-reduced multi-scale feature maps through a sliding window mechanism; The feed-forward neural network layer of the prediction model performs independent non-linear transformations on each aggregated feature to capture the relationships between features; The decoder of the prediction model converts the relationships between features into the final prediction results.

[0020] Optionally, the meteorological data fed into the optimized prediction model is obtained through the following methods, including: Obtain the current meteorological data and the meteorological data of the same historical period; Judge whether the difference between the current meteorological data and the meteorological data of the same historical period is within a certain threshold; When the difference is within the preset range, retain the meteorological data at this time as a data point for data trend fitting to obtain the meteorological data fed into the optimized prediction model; When the difference is not within the preset range, discard the meteorological data at this time and return to the step of obtaining the current meteorological data and the meteorological data of the same historical period.

[0021] Optionally, the specific steps of data trend fitting include: Judge whether the meteorological data to be subjected to data trend fitting is missing; If so, fit the meteorological data to be subjected to data trend fitting according to the relationship between time and meteorological parameters to obtain a fitting curve; Set the span step size of the fitting curve and determine the range of the starting point of the fitting curve, and select different starting points within the range of the starting point; Starting from different starting points, divide the fitting curve into multiple small intervals according to the span step size; Calculate the average meteorological parameters and average time within each small interval; According to the average meteorological parameters and average time within each small interval, calculate the slope between two adjacent small intervals; Obtain the slope and fit the relationship between the slope and time into a slope distribution curve; Determine the time points of the missing meteorological data, and determine the slopes of the two adjacent time points on the slope distribution curve according to the time points of the missing meteorological data; Take the average of the slopes at two time points as the missing slope; Determine the meteorological parameters at two time points adjacent to the time point of the missing meteorological data, calculate two missing parameters through the missing slope, and take the average of the two missing parameters as the missing meteorological parameter and incorporate it into the meteorological data to be subjected to data trend fitting, so as to obtain the meteorological data to be sent into the optimized prediction model.

[0022] Through the above technical solution, a method, a machine-readable storage medium and a processor for meteorological resource prediction provided by the present invention can obtain training meteorological data affecting new energy power, and then can preprocess the training meteorological data to obtain qualified training meteorological data. After obtaining the qualified training meteorological data, the training meteorological data can be merged and sent into a prediction model. After being sent into the prediction model, the prediction model can output a meteorological prediction probability according to the input training meteorological data. After obtaining the prediction result of the prediction model, the prediction model can be optimized according to the error between the prediction result of the prediction model and the real meteorological data. After the optimization is completed, the obtained meteorological data can be sent into the optimized prediction model, so as to obtain a meteorological resource prediction result. This prediction method can accurately predict the probability of meteorological resources.

[0023] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent specific implementation part. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings are used to provide a further understanding of the embodiments of the present invention, and constitute a part of the specification, and are used to explain the embodiments of the present invention together with the following specific implementation manners, but do not constitute a limitation to the embodiments of the present invention. In the drawings: Figure 1 is a flowchart of a method for meteorological resource prediction according to an embodiment of the present invention; Figure 2 is a first flowchart of obtaining qualified training meteorological data in a method for meteorological resource prediction according to an embodiment of the present invention; Figure 3 is a second flowchart of obtaining qualified training meteorological data in a method for meteorological resource prediction according to an embodiment of the present invention; Figure 4 is a third flowchart of obtaining qualified training meteorological data in a method for meteorological resource prediction according to an embodiment of the present invention; Figure 5 is a flowchart of training a prediction model in a method for meteorological resource prediction according to an embodiment of the present invention; Figure 6It is the first flowchart for processing the obtained meteorological data in a method for predicting meteorological resources according to an embodiment of the present invention; Figure 7 It is the second flowchart for processing the obtained meteorological data in a method for predicting meteorological resources according to an embodiment of the present invention. Detailed implementation manners

[0025] The following will describe in detail the specific implementation manners of the embodiments of the present invention with reference to the accompanying drawings. It should be understood that the specific implementation manners described herein are only for explaining and illustrating the embodiments of the present invention, and are not used to limit the embodiments of the present invention.

[0026] In the embodiments of the present application, some existing industry solutions such as certain software, components, models, etc. may be mentioned. They should be regarded as exemplary. The purpose is only to illustrate the feasibility in the implementation of the technical solutions of the present application, but it does not mean that the applicant has already or necessarily used this solution.

[0027] Figure 1 It is the flowchart of a method for predicting meteorological resources according to an embodiment of the present invention. In the present invention, the prediction process may include: In step S1, training meteorological data affecting new energy power is obtained.

[0028] In step S2, the training meteorological data is preprocessed to obtain qualified training meteorological data.

[0029] In step S3, the qualified training meteorological data is merged and sent into the prediction model to obtain the prediction result.

[0030] In step S4, the prediction model is optimized according to the error between the result predicted by the prediction model and the real meteorological data.

[0031] In step S5, the obtained meteorological data is sent into the optimized prediction model to obtain the meteorological resource prediction result.

[0032] In the present invention, when making a prediction, training meteorological data affecting new energy power can be obtained, and then the training meteorological data can be preprocessed to obtain training meteorological data that meets the requirements. After obtaining the training meteorological data that meets the requirements, the training meteorological data can be merged and sent into a prediction model. After being sent into the prediction model, the prediction model can output a meteorological prediction probability based on the input training meteorological data. After obtaining the prediction result of the prediction model, the prediction model can be optimized according to the error between the prediction result of the prediction model and the real meteorological data. After the optimization is completed, the obtained meteorological data can be sent into the optimized prediction model, so as to obtain a meteorological resource prediction result. This prediction method can accurately predict the probability of meteorological resources.

[0033] In an embodiment of the present invention, the training meteorological data may include: time, geographical location, and meteorological parameters.

[0034] In an embodiment of the present invention, as Figure 2 shown, the first process of obtaining the training meteorological data that meets the requirements may include: In step S6, the training meteorological data is marked with terrain according to the geographical location in the training meteorological data.

[0035] In step S7, the training meteorological data is classified according to the terrain mark to obtain a plurality of first classification sets.

[0036] In step S8, the geographical location in the training meteorological data is obtained to mark the longitude and latitude of the training meteorological data in the first classification set.

[0037] In step S9, according to the longitude and latitude marks of the training meteorological data, the training meteorological data in the first classification set is classified by the k-means clustering algorithm to obtain a plurality of second classification sets, so as to obtain pre-training meteorological data for different scenarios.

[0038] In the present invention, when training meteorological data is obtained and prediction needs to be performed based on the meteorological data, the training meteorological data needs to be classified by scenario, so that the prediction model can distinguish the training meteorological data of different scenarios, and better predict the meteorological data of the scenario with specific characteristics. When classifying the training meteorological data, the training meteorological data can be marked with terrain according to the geographical location in the training meteorological data. The geographical location can be terrain, and the terrain can be divided into mountainous, plain, hilly and other terrains. Moreover, the meteorological data of different terrains are different. Therefore, the training meteorological data can be classified according to the terrain mark, and multiple first classification sets can be obtained. The first classification sets can include sets such as mountains, plains and hills. After classification, since the range covered by the first classification sets is too large, when input into the prediction model, the prediction model still cannot perform weighted distribution prediction for specific scenarios. Therefore, the training meteorological data in the first classification sets can be classified again. When classifying, the longitude and latitude in the training meteorological data in the first classification sets can be obtained, so that the training meteorological data in the first classification sets can be marked with longitude and latitude. After the longitude and latitude marking, the training meteorological data in the first classification sets can be classified by the k-means clustering algorithm according to the longitude and latitude marking of the training meteorological data, and multiple second classification sets can be obtained. Therefore, training meteorological data of multiple different scenarios can be obtained.

[0039] In one embodiment of the present invention, as Figure 3 shown, the second process of obtaining the training meteorological data that meets the requirements may include: In step S10, different scenarios of training meteorological data are obtained according to the classification of the training meteorological data.

[0040] In step S11, it is judged whether the quantity of the training meteorological data of different scenarios is above the data threshold range of the corresponding scenario.

[0041] In step S12, when the quantity of the training meteorological data of a scenario is above the data threshold of the corresponding scenario, the training meteorological data of this scenario is converted into a first vector.

[0042] In step S13, the first vectors whose Euclidean distance from other vectors is less than the first preset threshold are screened.

[0043] In step S14, the intermediate value of the training meteorological data corresponding to the screened first vectors is taken to obtain the screened meteorological data, and the screened meteorological data is incorporated into the training meteorological data corresponding to the unscreened first vectors to obtain the training meteorological data that meets the requirements.

[0044] In the present invention, after obtaining the training meteorological data, the number of the training meteorological data may be excessive, resulting in an imbalance in the training of the prediction model. Therefore, when the training data is excessive, some data can be reduced to maintain the balance of the data in the scenario. During training, different scenarios of training meteorological data can be obtained according to the classification of the training meteorological data. This classification can be the first classification set obtained according to the terrain marker, or the second classification set. After obtaining the training meteorological data of different scenarios, different data threshold ranges can be set, and then it can be determined whether the number of the training meteorological data of different scenarios is greater than the maximum value of the data threshold range corresponding to the scenario. If the number of the training meteorological data is within the data threshold range, the data does not need to be processed. If it is greater than the maximum value of the data threshold range corresponding to the scenario, the corresponding training meteorological data needs to be reduced, and the training meteorological data of this scenario can be converted into the first vector. After being converted into the first vector, each training meteorological data can be screened one by one. After screening a training meteorological data, it can be screened whether the Euclidean distance between the first vector corresponding to this training meteorological data and other vectors is less than the first preset threshold. In the case where the Euclidean distance is less than the first preset threshold, the training meteorological data corresponding to this first vector can be obtained. After screening out the training meteorological data corresponding to the first vector, the median value of these training meteorological data can be taken to obtain the screened meteorological data. This screened meteorological data can represent the screened training meteorological data, and this screened meteorological data can be incorporated into the training meteorological data corresponding to the first vector that has not been screened, so as to obtain the training meteorological data that meets the quantity requirements. If the training meteorological data is still excessive, the training meteorological data can continue to be screened according to the above method until the training meteorological data that meets the quantity requirements is obtained.

[0045] In an embodiment of the present invention, as Figure 4 shown, the third process of obtaining the training meteorological data that meets the requirements may include: In step S15, when the number of the training meteorological data of a scenario is below the data threshold range corresponding to the scenario, the training meteorological data of this scenario is converted into the second vector.

[0046] In step S16, the second vector whose minimum Euclidean distance from other second vectors is greater than the second preset threshold is screened as the screened second vector.

[0047] In step S17, the K second vectors closest to the screened second vector are obtained.

[0048] In step S18, a second vector is randomly selected from the K second vectors.

[0049] In step S19, a data is randomly selected on the line connecting the screened second vector and the randomly selected second vector as the new training meteorological data.

[0050] In step S20, the new training meteorological data is incorporated into the obtained training meteorological data to obtain the training meteorological data that meets the requirements.

[0051] In the present invention, when the quantity of the training meteorological data is too small, the training meteorological data needs to be increased. Therefore, when the quantity of the training meteorological data of a scenario is less than the minimum value within the data threshold range corresponding to the scenario, the training meteorological data of this scenario can be converted into a second vector. After being converted into a second vector, the Euclidean distance between the second vector corresponding to each training meteorological data and the second vectors corresponding to other training meteorological data can be calculated, and then the second vectors whose minimum Euclidean distance from other second vectors is also greater than the second preset threshold can be screened out as the screened second vectors, and the training meteorological data corresponding to the screened second vectors can be obtained. After obtaining the screened second vectors, the K second vectors closest to the screened second vectors can be obtained, and then a second vector can be randomly selected from these K second vectors. A data can be randomly selected on the line connecting the screened second vector and the randomly selected second vector as the new training meteorological data. After obtaining the randomly selected new training meteorological data, this data can be incorporated into the obtained training meteorological data, so that the quantity of the training meteorological data can be increased to obtain the training meteorological data that meets the requirements.

[0052] In an embodiment of the present invention, as Figure 5 shown, the process of training the prediction model may include: In step S21, the training meteorological data that meets the requirements is merged, and the merged training meteorological data is sent into the prediction model, and the prediction model is a model based on Transformer.

[0053] In step S22, the multi-scale embedding layer of the prediction model divides the training meteorological data according to time and space dimensions to generate a multi-scale feature map.

[0054] In step S23, the multi-layer attention layer of the prediction model performs dimensionality reduction processing on the multi-scale feature map through Fourier transform.

[0055] In step S24, the multi-layer self-attention layer of the prediction model segments and aggregates the features of different scales of the dimensionality-reduced multi-scale feature map through a sliding window mechanism.

[0056] In step S25, the feed-forward neural network layer of the prediction model performs independent non-linear transformation on each aggregated feature to capture the relationship between the features.

[0057] In step S26, the decoder of the prediction model converts the relationship between features into the final prediction result.

[0058] In the present invention, when training the prediction model, the compliant training meteorological data can be merged first, and then the merged training meteorological data can be fed into the pre-trained model. The prediction model can be a model based on Transformer. The multi-scale embedding layer of the prediction model can divide the training meteorological data according to the time dimension and the space dimension, so as to generate a multi-scale feature map to enhance the fusion of local and global features. The multi-layer attention layer of the prediction model can perform dimensionality reduction processing on the multi-scale feature map through Fourier transform. The multi-layer attention layer of the prediction model can segment and aggregate the features of different scales of the dimensionality-reduced multi-scale feature map through a sliding window mechanism. The feed-forward neural network layer of the prediction model can perform independent non-linear transformation on each aggregated feature, so as to better capture the complex relationship between features. The decoder of the prediction model can convert the relationship between features into the final prediction result.

[0059] In the present invention, when optimizing the prediction model, it can be optimized according to the gap between the result of the prediction model and the real meteorological data. The mean square error can be calculated based on the prediction result and the real meteorological data, and then the prediction model can be optimized according to the mean square error. The optimization method can be consistent with the existing method of optimizing the model according to the mean square error.

[0060] In an embodiment of the present invention, as Figure 6 shown, the first process of processing the acquired meteorological data may include: In step S27, the current meteorological data and the meteorological data of the same historical period are acquired.

[0061] In step S28, it is judged whether the difference between the current meteorological data and the meteorological data of the same historical period is within a certain threshold.

[0062] In step S29, when the difference is within the preset range, the meteorological data at this time is retained as a data point for data trend fitting to obtain the meteorological data to be fed into the optimized prediction model.

[0063] In step S30, when the difference is not within the preset range, the meteorological data at this time is discarded, and the step of acquiring the current meteorological data and the meteorological data of the same historical period is returned.

[0064] In the present invention, when obtaining the current meteorological data and performing data prediction based on the current meteorological data, it is possible to first determine whether the meteorological data is an outlier. If it is an outlier, it needs to be removed. When making the determination, the current meteorological data and the meteorological data of the same historical period can be obtained, and then it can be determined whether the difference between the current meteorological data and the meteorological data of the same historical period is within a certain threshold. When the difference is within the preset range, the meteorological data at this time can be retained as a data point for data trend fitting, and it can continue to be determined whether the next meteorological data meets the requirements. When the difference is not within the preset range, the meteorological data at this time can be discarded, and it can return to step S27.

[0065] In one embodiment of the present invention, as Figure 7 shown, the second process of processing the obtained meteorological data may include: In step S31, it is determined whether the meteorological data to be subjected to data trend fitting is missing.

[0066] In step S32, if so, the meteorological data to be subjected to data trend fitting is fitted according to the relationship between time and meteorological parameters to obtain a fitting curve.

[0067] In step S33, the span step size of the fitting curve is set, and the range of the starting point of the fitting curve is determined, and different starting points are selected within the range of the starting point.

[0068] In step S34, starting from different starting points, the fitting curve is divided into multiple small intervals according to the span step size.

[0069] In step S35, the average meteorological parameter and the average time within each small interval are calculated.

[0070] In step S36, according to the average meteorological parameter and the average time within each small interval, the slope between two adjacent small intervals is calculated.

[0071] In step S37, the slope is obtained, and the relationship between the slope and time is fitted into a slope distribution curve.

[0072] In step S38, the time point of the missing meteorological data is determined, and the slopes of the two adjacent time points on the slope distribution curve are determined according to the time point of the missing meteorological data.

[0073] In step S39, the average value of the slopes of the two time points is taken as the missing slope.

[0074] In step S40, determine the meteorological parameters at two time points adjacent to the time point of the missing meteorological data, calculate two missing parameters through the missing slope, take the average value of the two missing parameters as the missing meteorological parameter, and incorporate it into the meteorological data to be subjected to data trend fitting, so as to obtain the meteorological data to be sent into the optimized prediction model.

[0075] In the present invention, when performing data trend fitting, it is possible to first determine whether the meteorological data to be subjected to data trend fitting is missing. When the obtained meteorological data is missing, the missing meteorological data needs to be supplemented. During the supplementation process, the existing obtained meteorological data can be subjected to data fitting according to the relationship between time and meteorological parameters, so as to obtain a fitting curve. After obtaining the fitting curve, the span step length of the fitting curve can be set, and the range of the starting point of the fitting curve can be determined. When dividing the interval, different starting points can be selected within the range of the starting point, so that more different divided intervals can be obtained. After obtaining different small intervals, the average meteorological parameter and average time of each small interval can be calculated. After obtaining the average meteorological parameter and average time of each small interval, the slope between two adjacent small intervals can be calculated. This slope can be the trend distribution of the fitting curve. Since the number of small intervals is large enough, the accuracy of the slope is sufficient. After obtaining the slope, the relationship between the slope and time can be fitted into a slope distribution curve, and then the time point of the missing meteorological data can be determined. According to the missing time point and the slope distribution curve, the slopes of the two time points adjacent to it on the slope distribution curve can be determined. After obtaining the slopes of the two time points, the average value of the slopes of the two time points can be used as the missing slope, and then two missing parameters can be calculated through a simple one-dimensional linear function based on the missing slope and the meteorological parameters of the two time points adjacent to the missing time point. After obtaining the two missing parameters, the average value of the two parameters can be used as the missing meteorological parameter, so that the missing meteorological data can be supplemented. Sending the supplemented meteorological data into the optimized prediction model can obtain the meteorological resource prediction result.

[0076] On the other hand, the present invention can also provide a machine-readable storage medium, on which instructions are stored, and the instructions are used to cause the machine to execute a method for predicting meteorological resources as described above.

[0077] On yet another aspect, the present invention can also provide a processor for running a program, wherein the program, when run, is used to execute: a method for predicting meteorological resources as described above.

[0078] On the other hand, the present invention also provides a system for short- and medium-term probability prediction of meteorological resources. The system includes a data acquisition module and a short- and medium-term probability prediction module. The data acquisition module is used to acquire meteorological resource data. According to the acquired meteorological resource data, the short- and medium-term probability prediction module is used to perform: Preprocess the training meteorological data to obtain qualified training meteorological data. After obtaining the qualified training meteorological data, the training meteorological data can be merged and fed into a prediction model. After being fed into the prediction model, the prediction model can output a meteorological prediction probability according to the input training meteorological data. After obtaining the prediction result of the prediction model, the prediction model can be optimized according to the error between the prediction result of the prediction model and the real meteorological data. After the optimization is completed, the acquired meteorological data can be fed into the optimized prediction model, so as to obtain a meteorological resource prediction result. This prediction method can accurately predict the probability of meteorological resources.

[0079] When the short- and medium-term probability prediction module acquires training meteorological data and needs to make a prediction based on the meteorological data, it is necessary to classify the training meteorological data by scenario, so as to facilitate the prediction model to distinguish the training meteorological data of different scenarios and better predict the meteorological data of the characteristic scenarios. When the short- and medium-term probability prediction module classifies the training meteorological data, it can mark the terrain of the training meteorological data according to the geographical location in the training meteorological data. The geographical location can be the terrain, and the terrain can be divided into mountainous, plain, hilly and other terrains. Moreover, the meteorological data of different terrains are different. Therefore, the training meteorological data can be classified according to the terrain mark, so as to obtain multiple first classification sets. The first classification sets can include sets such as mountains, plains and hills. After classification, since the range covered by the first classification sets is too large, when input into the prediction model, the prediction model still cannot perform weighted distribution prediction for specific scenarios. Therefore, the training meteorological data in the first classification sets can be classified again. When classifying, the longitude and latitude in the training meteorological data in the first classification sets can be obtained, so as to mark the longitude and latitude of the training meteorological data in the first classification sets. After the longitude and latitude marking, the training meteorological data in the first classification sets can be classified by the k-means clustering algorithm according to the longitude and latitude marking of the training meteorological data, so as to obtain multiple second classification sets, and thus multiple training meteorological data of different scenarios can be obtained.

[0080] After the short- and medium-term probability prediction module obtains the training meteorological data, the quantity of the training meteorological data may be excessive, thus causing imbalance in the training of the prediction model. Therefore, when the training data is excessive, some data can be reduced to maintain the balance of the data in the scenario. During training, the training meteorological data of different scenarios can be obtained according to the classification of the training meteorological data. This classification can be the first classification set obtained according to the terrain marker or the second classification set. After obtaining the training meteorological data of different scenarios, the data threshold ranges of different scenarios can be set, and then it can be determined whether the quantity of the training meteorological data of different scenarios is greater than the maximum value of the data threshold range corresponding to the scenario. If the quantity of the training meteorological data is within the data threshold range, the data does not need to be processed. If it is greater than the maximum value of the data threshold range corresponding to the scenario, the corresponding training meteorological data needs to be reduced. The training meteorological data of this scenario can be converted into the first vector. After being converted into the first vector, each training meteorological data can be screened one by one. After a training meteorological data is selected, it can be screened whether the Euclidean distance between the first vector corresponding to the training meteorological data and other vectors is less than the first preset threshold. When the Euclidean distance is less than the first preset threshold, the training meteorological data corresponding to the first vector can be obtained. After the training meteorological data corresponding to the first vector is selected, the median value of these training meteorological data can be taken to obtain the screened meteorological data. The screened meteorological data can represent the selected training meteorological data. The screened meteorological data can be incorporated into the training meteorological data corresponding to the first vector that has not been screened, so as to obtain the training meteorological data that meets the quantity requirements. If the training meteorological data is still excessive, the training meteorological data can continue to be screened according to the above method until the training meteorological data that meets the quantity requirements is obtained.

[0081] When the number of training meteorological data of the short- and medium-term probability prediction module is too small, the training meteorological data needs to be increased. Therefore, when the number of training meteorological data in a scenario is less than the minimum value within the data threshold range corresponding to the scenario, the training meteorological data of this scenario can be converted into a second vector. After being converted into the second vector, the Euclidean distance between the second vector corresponding to each training meteorological data and the second vectors corresponding to other training meteorological data can be calculated. Then, the second vectors whose minimum Euclidean distance from other second vectors is also greater than the second preset threshold can be screened out as the screened second vectors, and the training meteorological data corresponding to the screened second vectors can be obtained. After obtaining the screened second vectors, the K second vectors closest to the screened second vectors can be obtained, and then a second vector can be randomly selected from these K second vectors. A data can be randomly selected on the line connecting the screened second vector and the randomly selected second vector as the new training meteorological data. After obtaining the randomly selected new training meteorological data, this data can be incorporated into the obtained training meteorological data, so as to increase the number of training meteorological data and obtain the training meteorological data that meets the requirements.

[0082] When the short- and medium-term probability prediction module trains the prediction model, the training meteorological data that meets the requirements can be first merged, and then the merged training meteorological data can be sent into the pre-trained model. The prediction model can be a model based on Transformer. The multi-scale embedding layer of the prediction model can divide the training meteorological data according to the time dimension and the space dimension, so as to generate multi-scale feature maps to enhance the fusion of local and global features. The multi-layer attention layer of the prediction model can perform dimensionality reduction processing on the multi-scale feature maps through Fourier transform. The multi-layer attention layer of the prediction model can segment and aggregate the features of different scales of the dimensionality-reduced multi-scale feature maps through a sliding window mechanism. The feed-forward neural network layer of the prediction model can perform independent non-linear transformations on each aggregated feature, so as to better capture the complex relationships between features. The decoder of the prediction model can convert the relationships between features into the final predicted results.

[0083] When the short- and medium-term probability prediction module optimizes the prediction model, it can be optimized according to the gap between the result of the prediction model and the real meteorological data. The mean square error can be calculated based on the prediction result and the real meteorological data, and then the prediction model can be optimized according to the mean square error. This optimization method can be consistent with the existing method of optimizing the model according to the mean square error.

[0084] When the short - and medium - term probability prediction module obtains the current meteorological data and makes data predictions based on the current meteorological data, it can first determine whether the meteorological data is an outlier. If it is an outlier, it needs to be excluded. When making the determination, it can obtain the current meteorological data and the meteorological data in the same historical period, and then can determine whether the difference between the current meteorological data and the meteorological data in the same historical period is within a certain threshold. When the difference is within the preset range, the current meteorological data can be retained as a data point for data trend fitting, and it can continue to determine whether the next meteorological data meets the requirements. When the difference is not within the preset range, the current meteorological data can be discarded.

[0085] When the short - and medium - term probability prediction module performs data trend fitting, it can first determine whether the meteorological data to be used for data trend fitting is missing. When the obtained meteorological data is missing, the missing meteorological data needs to be filled. During the filling process, the existing obtained meteorological data can be fitted according to the relationship between time and meteorological parameters, so as to obtain a fitting curve. After obtaining the fitting curve, the span step size of the fitting curve can be set, and the range of the starting point of the fitting curve can be determined. When dividing the interval, different starting points can be selected within the range of the starting point, so that more different divided intervals can be obtained. After obtaining different small intervals, the average meteorological parameters and average time of each small interval can be calculated. After obtaining the average meteorological parameters and average time of each small interval, the slope between two adjacent small intervals can be calculated. This slope can be the trend distribution of the fitting curve. Because the number of small intervals is large enough, the accuracy of the slope is sufficient. After obtaining the slope, the relationship between the slope and time can be fitted into a slope distribution curve, and then the time point of the missing meteorological data can be determined. According to the missing time point and the slope distribution curve, the slopes of the two adjacent time points on the slope distribution curve can be determined. After obtaining the slopes of these two time points, the average value of the slopes of these two time points can be used as the missing slope, and then two missing parameters can be calculated through a simple one - dimensional linear function based on the missing slope and the meteorological parameters of the two adjacent time points to the missing time point. After obtaining the two missing parameters, the average value of these two parameters can be used as the missing meteorological parameter, so that the missing meteorological data can be filled. After filling the meteorological data, it is sent into the optimized prediction model to obtain the meteorological resource prediction result.

[0086] Through the above technical solution, a method for predicting meteorological resources, a machine-readable storage medium, and a processor provided by the present invention obtain training meteorological data affecting new energy power, and then can preprocess the training meteorological data to obtain qualified training meteorological data. After obtaining the qualified training meteorological data, the training meteorological data can be merged and sent into a prediction model. After being sent into the prediction model, the prediction model can output a meteorological prediction probability according to the input training meteorological data. After obtaining the prediction result of the prediction model, the prediction model can be optimized according to the error between the prediction result of the prediction model and the real meteorological data. After the optimization is completed, the obtained meteorological data can be sent into the optimized prediction model, so as to obtain a meteorological resource prediction result. This prediction method can accurately predict the probability of meteorological resources.

[0087] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0088] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0089] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0090] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 steps for the functions specified in one block or multiple blocks.

[0091] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.

[0092] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.

[0093] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0094] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, commodity or device comprising the element.

[0095] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A method for predicting meteorological resources, characterized in that, The method includes: Obtaining training meteorological data that affects new - energy power; Pre - processing the training meteorological data to obtain qualified training meteorological data; Merging the qualified training meteorological data and sending it into a prediction model to obtain a predicted result; Optimizing the prediction model according to the error between the result predicted by the prediction model and the real meteorological data; Sending the obtained meteorological data into the optimized prediction model to obtain a meteorological resource prediction result.

2. The method according to claim 1, wherein The training meteorological data includes: time, geographical location, and meteorological parameters.

3. The method according to claim 2, wherein Pre - processing the training meteorological data to obtain qualified training meteorological data, including: Marking the terrain of the training meteorological data according to the geographical location in the training meteorological data; Classifying the training meteorological data according to the terrain mark to obtain multiple first - classification sets; Obtaining the longitude and latitude in the training meteorological data and marking the longitude and latitude of the training meteorological data in the first - classification sets; Classifying the training meteorological data in the first - classification sets by the k - means clustering algorithm according to the longitude - latitude mark of the training meteorological data to obtain multiple second - classification sets, thereby obtaining training meteorological data for different scenarios.

4. The method according to claim 1, wherein Pre - processing the training meteorological data to obtain qualified training meteorological data, including: Obtaining training meteorological data for different scenarios according to the classification of the training meteorological data; Judging whether the quantity of the training meteorological data for different scenarios is above the corresponding scenario's data threshold range; When the quantity of the training meteorological data for a scenario is above the corresponding scenario's data threshold, converting the training meteorological data for this scenario into a first vector; Selecting the first vectors whose Euclidean distance from other vectors is less than a first preset threshold; Taking the median value of the training meteorological data corresponding to the selected first vectors to obtain screened meteorological data, and incorporating the screened meteorological data into the training meteorological data corresponding to the first vectors that are not screened, to obtain qualified training meteorological data.

5. The method according to claim 4, wherein Pre - processing the training meteorological data to obtain qualified training meteorological data, including: When the quantity of the training meteorological data for a scenario is below the corresponding scenario's data threshold range, converting the training meteorological data for this scenario into a second vector; Selecting the second vectors whose minimum Euclidean distance from other second vectors is greater than a second preset threshold as the selected second vectors; Obtaining the K second vectors closest to the selected second vector; Randomly selecting one of the K second vectors; Randomly selecting a data on the line connecting the selected second vector and the randomly selected second vector as new training meteorological data; Incorporating the new training meteorological data into the obtained training meteorological data to obtain qualified training meteorological data.

6. The method according to claim 1, characterized in that Merging the qualified training meteorological data and sending it into a prediction model to obtain a predicted result, including: Merge the qualified training meteorological data, and send the merged training meteorological data into the prediction model, where the prediction model is a model based on Transformer; The multi-scale embedding layer of the prediction model divides the training meteorological data according to time and space dimensions to generate multi-scale feature maps; The multi-layer attention layer of the prediction model performs dimensionality reduction processing on the multi-scale feature maps through Fourier transform; The multi-layer attention layer of the prediction model segments and aggregates features of different scales of the dimensionality-reduced multi-scale feature maps through a sliding window mechanism; The feed-forward neural network layer of the prediction model performs independent non-linear transformations on each aggregated feature to capture the relationships between features; The decoder of the prediction model converts the relationships between features into the final predicted results.

7. The method according to claim 2, wherein The meteorological data sent into the optimized prediction model is obtained through the following methods, including: Obtain the current meteorological data and the meteorological data of the same historical period; Judge whether the difference between the current meteorological data and the meteorological data of the same historical period is within a certain threshold; When the difference is within the preset range, retain the meteorological data at this time as a data point for data trend fitting to obtain the meteorological data sent into the optimized prediction model; When the difference is not within the preset range, discard the meteorological data at this time, and return to the step of obtaining the current meteorological data and the meteorological data of the same historical period.

8. The method according to claim 7, wherein The specific steps of data trend fitting include: Judge whether the meteorological data to be subjected to data trend fitting is missing; If so, fit the meteorological data to be subjected to data trend fitting according to the relationship between time and meteorological parameters to obtain a fitting curve; Set the span step size of the fitting curve, and determine the range of the starting point of the fitting curve, and select different starting points within the range of the starting point; Starting from different starting points, divide the fitting curve into multiple small intervals according to the span step size; Calculate the average meteorological parameters and average time within each small interval; According to the average meteorological parameters and average time within each small interval, calculate the slope between two adjacent small intervals; Obtain the slope, and fit the relationship between the slope and time into a slope distribution curve; Determine the time point of the missing meteorological data, and determine the slopes of the two adjacent time points on the slope distribution curve according to the time point of the missing meteorological data; Take the average value of the slopes of the two time points as the missing slope; Determine the meteorological parameters of the two time points adjacent to the time point of the missing meteorological data, calculate two missing parameters through the missing slope, and take the average value of the two missing parameters as the missing meteorological parameter and incorporate it into the meteorological data to be subjected to data trend fitting to obtain the meteorological data sent into the optimized prediction model.

9. A machine-readable storage medium having instructions stored thereon, characterized in that, The instruction is used to cause a machine to execute a method for predicting meteorological resources as described in any one of claims 1-8 above.

10. A processor, characterized in that, For running a program, where the program, when run, is used to execute: a method for predicting meteorological resources as described in any one of claims 1-8.