A wind speed prediction method and system based on time series threshold segmentation and a medium

By constructing grayscale images and using a secondary thresholding method, the regularity features of wind speed data are extracted. Combined with conditional generative adversarial networks and bidirectional gated recurrent units, the accuracy problem of traditional wind speed prediction methods under sudden wind speed changes is solved, achieving higher accuracy wind speed prediction and meteorological decision support.

CN119784786BActive Publication Date: 2025-11-25GUANGDONG OCEAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411817860.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-11-25
Estimated Expiration
2044-12-11

AI Technical Summary

Technical Problem

Traditional wind speed forecasting methods struggle to accurately capture the inherent patterns of wind speed changes, especially when faced with sudden wind speed shifts, leading to reduced forecast accuracy and impacting the accuracy and reliability of meteorological decision-making.

Method used

By constructing grayscale images of meteorological feature data and target wind speed data, performing secondary threshold segmentation, extracting regular wind speed sequences in four numerical intervals, conducting feature correlation analysis and randomness screening, constructing a feature matrix, using conditional generative adversarial networks and bidirectional gated recurrent units for wind speed prediction, and finally integrating the models through Bagging ensemble learning.

Benefits of technology

It improves the accuracy of wind speed forecasting and numerical weather prediction, enabling more precise prediction of wind speed change trends, supporting early warning and disaster response in meteorological decision-making, and enhancing the safety level of coastal and severe convective regions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784786B_ABST
    Figure CN119784786B_ABST
Patent Text Reader

Abstract

The application obtains weather forecast values, respectively constructs gray images of meteorological feature data and target wind speed data; based on the target wind speed data gray image, performs a secondary threshold segmentation operation to obtain a wind speed gray image of four numerical intervals; according to meteorological feature sequence data and target wind speed sequence data, performs feature correlation analysis to obtain influence values of each meteorological feature and target wind speed; through the influence values, performs random screening on the meteorological feature data, and based on the input data and the wind speed gray image of the four numerical intervals, obtains a mapping relationship image of input images and output images; after the mapping relationship image is unfolded into time sequence data, performs four numerical interval target wind speed sequence prediction and integration comparison. Through secondary threshold segmentation of the image and random screening of the meteorological feature, the application reduces the uncertainty of wind speed prediction, improves the accuracy of wind speed prediction and the accuracy of numerical weather forecast.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of wind speed prediction, and in particular to a wind speed prediction method and system based on time series threshold segmentation and a medium. BACKGROUND

[0002] Wind speed has high randomness and intermittency, making its volatility and uncertainty characteristics extremely prominent. The change of wind speed is influenced by many complex factors such as topography, atmospheric circulation, and temperature difference, and these factors interact and synergize with each other, resulting in strong spatiotemporal dynamic changes of wind speed. When wind speed data is input into a prediction model, the volatility increases the difficulty of the model in processing data.

[0003] Traditional wind speed prediction methods usually cannot accurately capture the internal rules of wind speed changes. The main reason is that they directly input wind speed data containing uncertainty characteristics into the prediction model for training, without taking effective measures to reduce the impact of wind speed uncertainty on the prediction model. When directly using time series prediction models or machine learning models to learn the characteristics of wind speed data with uncertainty, although the overall trend of wind speed change can be grasped to some extent, when facing wind speed mutation and wind speed change near the maximum and minimum values, these models cannot accurately capture the subtle change trend of wind speed under special circumstances, resulting in reduced accuracy of wind speed prediction. Lower prediction accuracy and reduced model universality are the core problems currently faced by wind speed prediction. Lower accuracy of wind speed prediction brings many adverse effects to meteorological decision-making, etc. For example, in the process of meteorological decision-making, relevant departments are difficult to make accurate early warning and effective response measures in a timely manner based on inaccurate prediction results, thereby negatively affecting public safety and social and economic activities.

[0004] In order to enhance the accuracy and reliability of wind speed prediction, it is crucial to construct the time series regularity characteristics of wind speed data. By deeply mining the time series regularity of wind speed data, the prediction model can better handle the change trend of wind speed, thereby improving the prediction accuracy. However, most current prediction methods have obvious deficiencies in this aspect, especially in how to effectively segment uncertain wind speed data to construct time series regularity characteristics, further in-depth exploration and innovation are still needed. Solving this problem will bring a key breakthrough to the development of wind speed prediction technology, and help to provide more accurate basis for meteorological decision-making. SUMMARY

[0005] Therefore, the embodiment of the present application aims to provide a wind speed prediction method, system and medium based on time sequence threshold segmentation to solve the problem of the uncertainty of wind speed affecting the accuracy and reliability of wind speed prediction, and by deeply mining the time sequence rules in wind speed data, the prediction model can better handle the change trend of wind speed, thereby improving the prediction accuracy.

[0006] In one aspect, the embodiment of the present application provides a wind speed prediction method based on time sequence threshold segmentation, comprising:

[0007] Obtaining weather forecast values, and constructing gray scale images of meteorological feature data and target wind speed data respectively;

[0008] Based on the target wind speed data gray scale image, performing a secondary threshold segmentation operation to obtain a wind speed gray scale image of four numerical value intervals to represent regular wind speed sequences of four non-continuous time periods;

[0009] According to the meteorological feature sequence data and the target wind speed sequence data, performing feature correlation analysis to obtain influence values of each meteorological feature and the target wind speed;

[0010] Through the influence values, performing random selection on the meteorological feature data to construct at least one feature matrix, and taking the corresponding meteorological feature gray scale image as prediction model input data;

[0011] Based on the input data and the wind speed gray scale image of the four numerical value intervals, obtaining a mapping relationship image of input image and output image; and after expanding the mapping relationship image into time sequence data, performing target wind speed sequence prediction of the four numerical value intervals and performing integration comparison.

[0012] Optionally, the random selection on the meteorological feature data comprises:

[0013] Based on the meteorological feature corresponding to the influence value, setting a corresponding feature label, and randomly selecting a feature label whose sum of influence values is a target influence value; wherein the target influence value is the sum of the influence values;

[0014] Selecting a feature sequence corresponding to at least one feature label to construct a feature matrix;

[0015] Comparing the prediction accuracy based on at least one feature matrix as input, and taking the meteorological feature gray scale image corresponding to the highest accuracy comparison result as input.

[0016] Optionally, before the wind speed gray scale image of four numerical value intervals obtained by performing the secondary threshold segmentation operation comprises:

[0017] The target wind speed data grayscale image is segmented once based on the improved OTSU algorithm to obtain the wind speed image threshold of the target wind speed data grayscale image.

[0018] If the first wind speed value is greater than or equal to the wind speed image threshold, the original value is retained, and the wind speed values ​​less than the wind speed image threshold are assigned the value 0, thus obtaining the first wind speed image.

[0019] If the second wind speed value is less than the wind speed image threshold, the original value is retained, and the wind speed values ​​that are greater than or equal to the wind speed image threshold are assigned a value of 0 to obtain the second wind speed image.

[0020] Optionally, the random selection of the meteorological characteristic data further includes:

[0021] A decision tree algorithm is used to train the target wind speed to obtain a wind speed prediction model;

[0022] The wind speed prediction model is interpreted based on the Shap interpretability model to obtain the contribution of each meteorological feature to the wind speed.

[0023] The contribution of each meteorological feature to wind speed is compared and analyzed to obtain the first contribution value. The meteorological features corresponding to the first contribution value are then randomly selected, using the following formula:

[0024]

[0025] In the formula, Indicates feature x i Predicted values ​​for model f The degree of contribution, f(S∪{x i}) is a subset containing feature x i f(S) is the model prediction value containing only the feature subset S.

[0026] Optionally, the step of obtaining weather forecast values ​​and constructing grayscale images of meteorological feature data and target wind speed data respectively includes:

[0027] Based on the aforementioned weather forecast values, meteorological characteristics are obtained and denoted as x. i Let the target wind speed sequence be y, and normalize it through logarithmic transformation, as shown in the following formula:

[0028]

[0029] The normalized sequence is reconstructed into a grayscale image of size b×c.

[0030] Optionally, the process of segmenting the target wind speed data grayscale image based on the improved OTSU algorithm to obtain the wind speed image threshold of the target wind speed data grayscale image further includes:

[0031] The original threshold segmentation distinguishes foreground and background by maximum inter-class variance, and the formula is as follows:

[0032] g0=w0(u0-u) 2 +w1(u1-u) 2 ;

[0033] In the formula, w0 is the proportion of the number of foreground pixels in the total image, u0 is the average gray value of the foreground image, w1 is the proportion of the number of background pixels in the total image, and u1 is the average gray value of the background image.

[0034] The maximum inter-class variance is modified to maximum inter-class cubic variance, and the improved formula is as follows:

[0035] g1=w0(u0-u) 3 +w1(u1-u) 3 ;

[0036] In the formula, w0 is the proportion of the number of foreground pixels in the total image, u0 is the average gray value of the foreground image, w1 is the proportion of the number of background pixels in the total image, and u1 is the average gray value of the background image.

[0037] Optionally, the first wind speed image and the second wind speed image are respectively subjected to secondary segmentation by using the improved OTSU algorithm to obtain four numerical interval wind speed gray images, including:

[0038] The maximum inter-class variance is modified to maximum inter-class quartic variance, and the improved formula is as follows:

[0039] g2=w 10 (u 10 -u') 4 +w 11 (u 11 -u') 4 ;

[0040] In the formula, w 10 is the proportion of the number of foreground pixels in the total image, u 10 is the average gray value of the foreground image, w 11 is the proportion of the number of background pixels in the total image, and u 11 is the average gray value of the background image.

[0041] The maximum inter-class variance is modified to maximum inter-class cubic variance, and the improved formula is as follows:

[0042]

[0043] In the formula, w 20is the proportion of the total image that the number of foreground pixels occupies, u 20 is the average gray value of the foreground image, w 21 is the proportion of the total image that the number of foreground pixels occupies, u 21 is the average gray value of the foreground image.

[0044] In another aspect, an embodiment of the present application provides a wind speed prediction device based on time-series threshold segmentation, characterized in that it comprises:

[0045] at least one processor;

[0046] at least one memory for storing at least one program;

[0047] When the at least one program is executed by the at least one processor, the at least one processor implements the wind speed prediction method based on time-series threshold segmentation as described in any one of the above.

[0048] In another aspect, an embodiment of the present application provides a computer readable storage medium, wherein a program executable by a processor is stored, characterized in that the program executable by the processor is used to execute a wind speed prediction method based on time-series threshold segmentation as described in any one of the above when executed by the processor.

[0049] The embodiment of the present application obtains weather forecast values, and constructs gray scale images of meteorological feature data and target wind speed data respectively; based on the target wind speed data gray scale image, a wind speed gray scale image of four numerical interval is obtained after performing a secondary threshold segmentation operation, so as to represent a regular wind speed sequence of four non-continuous time periods; according to the meteorological feature sequence data and the target wind speed sequence data, a feature correlation analysis is performed to obtain an influence value of each meteorological feature and the target wind speed; the meteorological feature data is randomly selected by using the influence value, at least one feature matrix is constructed, and the corresponding meteorological feature gray scale image is taken as prediction model input data; based on the input data and the wind speed gray scale image of the four numerical interval, a mapping relationship image of input image and output image is obtained; after the mapping relationship image is unfolded into time sequence data, a target wind speed sequence prediction of four numerical interval is performed and integration comparison is performed. The present application converts the uncertainty of wind speed data into regularity by threshold segmentation to construct the time sequence regularity feature of wind speed in each numerical interval, which helps to optimize the training process of the prediction model. Meanwhile, the models of each interval are integrated, the regularity feature of wind speed in each period can be fully learned, the target wind speed image is subjected to secondary threshold segmentation, and the meteorological features are randomly selected, so as to reduce the uncertainty of wind speed prediction, improve the accuracy of wind speed prediction and numerical weather prediction, help to more accurately predict wind speed in the meteorological decision-making process, make corresponding meteorological warning and effective disaster prevention and control measures in time, and reduce social and economic losses. And the safety level of people in coastal and strong convective areas can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0051] Figure 1 It is a flow chart of the wind speed prediction method based on time sequence threshold segmentation provided by the embodiment of the present application;

[0052] Figure 2 It is a schematic diagram of the overall process provided by the embodiment of the present application;

[0053] Figure 3 It is an image schematic diagram of the original wind speed sequence provided by the embodiment of the present application;

[0054] Figure 4 It is a contribution image schematic diagram provided by the embodiment of the present application;

[0055] Figure 5is a normalized 5840 data group wind speed sequence image schematic diagram provided by the embodiment of the application;

[0056] Figure 6 is a 73x80 wind speed grayscale image schematic diagram composed of 5840 normalized wind speeds provided by the embodiment of the application;

[0057] Figure 7 is a low wind speed grayscale image schematic diagram after secondary threshold segmentation provided by the embodiment of the application;

[0058] Figure 8 is a low wind speed time sequence schematic diagram provided by the embodiment of the application;

[0059] Figure 9 is a medium-low wind speed grayscale image schematic diagram after secondary threshold segmentation provided by the embodiment of the application;

[0060] Figure 10 is a medium-low wind speed time sequence image schematic diagram provided by the embodiment of the application;

[0061] Figure 11 is a medium-high wind speed grayscale image schematic diagram after secondary threshold segmentation provided by the embodiment of the application;

[0062] Figure 12 is a medium-high wind speed time sequence image schematic diagram provided by the embodiment of the application;

[0063] Figure 13 is a high wind speed grayscale image schematic diagram after secondary threshold segmentation provided by the embodiment of the application;

[0064] Figure 14 is a high wind speed time sequence image schematic diagram provided by the embodiment of the application;

[0065] Figure 15 is a test set comparison line schematic diagram of a wind speed sequence of a prediction method, an original wind speed sequence and a wind speed sequence predicted by an LSTM method;

[0066] Figure 16 is a columnar diagram of error indicators of a prediction method and an LSTM method;

[0067] Figure 17 is a structure block diagram of a system provided by the embodiment of the application;

[0068] Figure 18 is a structure block diagram of a device provided by the embodiment of the application. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.

[0070] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a manner different from the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the description and claims and the above drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.

[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0072] In addition, the described features, structures or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to give a sufficient understanding of the embodiments of the present application. However, one skilled in the art will realize that the technical solutions of the present application can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be used. In other cases, well-known methods, devices, implementations or operations are not shown or described in detail to avoid obscuring the aspects of the present application.

[0073] The block diagram shown in the drawings is only a functional entity, which does not necessarily correspond to a physically independent entity. That is, these functional entities can be implemented in the form of software, or in one or more hardware charging modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0074] The flowchart shown in the drawings is only an exemplary illustration, which does not necessarily include all contents and operations / steps, and does not necessarily be executed in the order described. For example, some operations / steps can be further divided, and some operations / steps can be combined or partially combined, so the actual execution order can be changed according to the actual situation.

[0075] Reference Figures 1 to 16 As shown, the wind speed prediction method based on time sequence threshold segmentation provided by the embodiment of the present application comprises:

[0076] S1, obtaining weather forecast values, respectively constructing gray scale images of meteorological feature data and target wind speed data;

[0077] Exemplarily, the meteorological feature data includes temperature, humidity, air pressure, etc. The target wind speed data includes time, average wind speed, maximum wind speed, wind direction, temperature, air pressure, humidity, etc.

[0078] Specifically, the weather forecast value is obtained, and a gray image of meteorological feature data and target wind speed data is constructed respectively, including:

[0079] Based on the weather forecast value, meteorological feature data is set as x i , and the target wind speed sequence is set as y, which is normalized by logarithmic conversion, as follows:

[0080]

[0081] Based on the normalized sequence, a gray image of a size of a×b×c is reconstructed.

[0082] Exemplarily, according to the existing meteorological data, the corresponding features are constructed, and the meteorological feature data and the target wind speed data are converted into gray images, which can more accurately represent the characteristics of uncertainty and volatility.

[0083] S2, based on the target wind speed data gray image, a wind speed gray image of four numerical intervals is obtained after performing a secondary threshold segmentation operation, to represent the regular wind speed sequence of four non-continuous time periods;

[0084] Specifically, before the wind speed gray image of four numerical intervals is obtained after performing the secondary threshold segmentation operation, it includes:

[0085] Based on the improved OTSU algorithm, the target wind speed data gray image is segmented once to obtain a wind speed image threshold of the target wind speed data gray image;

[0086] If the first wind speed value is greater than or equal to the wind speed image threshold, the original value is retained, and the wind speed value less than the wind speed image threshold is assigned as 0 to obtain a first wind speed image;

[0087] If the second wind speed value is less than the wind speed image threshold, the original value is retained, and the wind speed value greater than or equal to the wind speed image threshold is assigned as 0 to obtain a second wind speed image.

[0088] Exemplarily, the first wind speed image is a high wind speed image of the first segmentation, and the second wind speed image is a low wind speed image of the first segmentation. First, the OTSU algorithm is used for the first segmentation to obtain the first wind speed image and the second wind speed image. Then, the OTSU method is used for improved secondary segmentation on the first wind speed image and the second wind speed image respectively to obtain the gray images of the four wind speed intervals. Finally, the gray images of the four wind speed intervals are expanded in time sequence to obtain the regular wind speed sequence on the four non-continuous time periods.

[0089] Specifically, the target wind speed data grayscale image is segmented once based on the improved OTSU algorithm to obtain a wind speed image threshold of the target wind speed data grayscale image, and the method comprises the following steps:

[0090] The original threshold segmentation distinguishes the foreground from the background by the maximum inter-class variance, and the formula is as follows:

[0091] g0=w0(u0-u) 2 +w1(u1-u) 2 ;

[0092] In the formula, w0 is the proportion of the number of foreground pixels in the total image, u0 is the average gray value of the foreground image, w1 is the proportion of the number of background pixels in the total image, and u1 is the average gray value of the background image.

[0093] The maximum inter-class variance is modified to the maximum inter-class cubic variance, and the improved formula is as follows:

[0094] g1=w0(u0-u) 3 +w1(u1-u) 3 ;

[0095] In the formula, w0 is the proportion of the number of foreground pixels in the total image, u0 is the average gray value of the foreground image, w1 is the proportion of the number of background pixels in the total image, and u1 is the average gray value of the background image; the difference between the foreground and the background is improved to make the segmentation effect more uniform.

[0096] Since the first wind speed image and the second wind speed image after the first segmentation have small grayscale differences, the segmentation method is improved as follows:

[0097] Specifically, the first wind speed image and the second wind speed image are respectively subjected to secondary segmentation by using the improved OTSU algorithm to obtain four wind speed grayscale images in numerical intervals, and the method comprises the following steps:

[0098] The secondary segmentation of the first wind speed image is that the maximum inter-class variance is modified to the maximum inter-class quartic variance, and the improved formula is as follows:

[0099] g2=w 10 (u 10 -u') 4 +w 11 (u 11 -u') 4 ;

[0100] In the formula, w 10 is the proportion of the number of foreground pixels in the total image, u 10 is the average gray value of the foreground image, w 11 is the proportion of the number of background pixels in the total image, and u 11The average gray value of the background image;

[0101] The second wind speed image is subjected to secondary segmentation, i.e., maximum inter-class variance is changed to maximum inter-class cubic variance, and the improved formula is as follows:

[0102]

[0103] In the formula, w 20 is the proportion of the number of foreground pixels in the total image, u 20 is the average gray value of the foreground image, w 21 is the proportion of the number of foreground pixels in the total image, u 21 is the average gray value of the background image; the segmentation effect is more uniform by increasing the difference between the foreground and the background.

[0104] Exemplarily, the first wind speed image is finally segmented into a third wind speed image and a fourth wind speed image, and the second wind speed image is segmented into a fifth wind speed image and a sixth wind speed image; that is, after secondary segmentation, there are four wind speed image intervals.

[0105] It can be understood that the third wind speed image is a high wind speed image after secondary segmentation, the fourth wind speed image is a medium-high wind speed image after secondary segmentation, the fifth wind speed image is a medium-low wind speed image after secondary segmentation, and the sixth wind speed image is a low wind speed image after secondary segmentation.

[0106] S3, according to the meteorological feature sequence data and the target wind speed sequence data, performing feature correlation analysis to obtain the influence value of each meteorological feature and the target wind speed;

[0107] Exemplarily, the screened feature image and the segmented target wind speed image are respectively taken as input and output, and CGAN (conditional generative adversarial network) is used to extract the relationship between the input and the output. Then, it is expanded into sequence data, and BiGRU (bidirectional gated recurrent unit) is used for prediction to obtain a wind speed training model of four intervals under different feature groups as input.

[0108] Exemplarily, the input feature score image is obtained and defined as c, noise z is randomly generated, the feature score image c and the noise z are jointly input into the generator G to obtain the image x=G(c,z);

[0109] The wind speed interval image is obtained and defined as d, the wind speed interval image d, the generated image x, and the corresponding feature score image c are jointly input into the discriminator D, the discriminator D judges according to the input to obtain the discrimination probability that the input image is a real image;

[0110] The generator generates an output wind speed image according to an input feature score image, and the discriminator learns to obtain a discrimination probability to distinguish between a real output image and an image generated by the generator. Then, a loss function is calculated according to the output of the discriminator and the real label (the real image is 1, and the false image is 0). The objective of the generator is to minimize the discrimination probability, while the objective of the discriminator is to maximize the discrimination probability, and the objective loss function is calculated as follows:

[0111]

[0112] The trained generator is used as a feature extractor to extract the features of the hidden layers, and the extracted features are expanded into time series. The expanded sequence is used as the input feature and output sequence of the BiGRU network.

[0113] S4, by the influence value, randomly screening the meteorological feature data, constructing at least one feature matrix, and taking the corresponding meteorological feature gray image as the prediction model input data;

[0114] Specifically, the random screening of the meteorological feature data comprises:

[0115] Based on the meteorological feature corresponding to the influence value, the corresponding feature label is set, and the feature label with the sum of influence values being the target influence value is randomly screened; wherein the target influence value is the sum of the influence values;

[0116] Selecting the feature sequence corresponding to at least one feature label to construct a feature matrix;

[0117] Comparing the prediction accuracy based on at least one feature matrix as input, and taking the meteorological feature gray image corresponding to the highest accuracy comparison result as input.

[0118] For example, according to the comparison result, the meteorological feature gray image corresponding to the optimal feature matrix is selected as the input.

[0119] Specifically, the random screening of the meteorological feature data further comprises:

[0120] The decision tree algorithm is used to train the target wind speed to obtain a wind speed prediction model;

[0121] The wind speed prediction model is explained based on the Shap explainability model to obtain the contribution degree of each meteorological feature to the wind speed;

[0122] The contribution degrees of each meteorological feature to the wind speed are compared and analyzed to obtain a first contribution degree, and the meteorological feature corresponding to the first contribution degree is randomly screened,

[0123] For example, given n meteorological features x i x1, x2, …, xn , the target wind speed is y, and the value predicted according to the decision tree model is Let each feature x i Contribution degree is According to the Shap model, the process of explaining the decision tree model is as follows:

[0124]

[0125] In the formula, Indicates the contribution degree of feature x i to the predicted value of the model f , f(S∪{x i}) is the model prediction value containing feature x i and feature subset S, and f(S) is the model prediction value containing only feature subset S.

[0126] For example, taking the European Center for Medium-Range Weather Forecasts (ECMWF) as an example, meteorological feature data and wind speed data are obtained from the ECMWF. The meteorological features may include temperature, humidity, air pressure, wind direction, etc., and the wind speed data is the target variable. The data is cleaned and preprocessed: that is, missing values are processed, standardized or normalized (if the decision tree model does not require standardization, it can be skipped). The meteorological feature data is used as input, and the wind speed data is used as the target variable to train the decision tree regression model, i.e. DecisionTree Regressor, to fit the relationship between the features and the target. SHAP (SHapley Additive exPlanations) is used to explain the decision tree model, i.e. to calculate the contribution of each meteorological feature to the prediction of the target wind speed and visualize the feature contribution. According to the feature contribution ranking, the first contribution (i.e. high contribution) meteorological feature (such as Importance>0.1) is identified, and the feature set is further optimized through randomness screening for subsequent modeling.

[0127] Random screening of meteorological features can reduce the negative impact of meteorological feature input on the wind speed prediction model.

[0128] S5, based on the input data and the wind speed gray image of the four numerical intervals, an input image and an output image mapping relationship image is obtained; by unfolding the mapping relationship image into time series data, the target wind speed sequence prediction of the four numerical intervals is carried out and integrated comparison is carried out.

[0129] Based on the training model of the wind speed in the four intervals under different feature groups as input, the error of each feature group under a single interval is compared, and the features corresponding to the optimal prediction model with the optimal prediction effect are selected as input, and the optimal prediction model of the four intervals is selected. Subsequently, the Bagging ensemble learning model is used to integrate the wind speed prediction models of the four intervals, and the prediction results are normalized to predict the final wind speed prediction value, and the integration process is as follows:

[0130] For the optimal training model of the wind speed of the four intervals, the training data and the test data are input into the four training models respectively, and the training prediction sequence and the test prediction sequence are obtained. The four training and test prediction sequences are summed, and the summed training prediction data is used as input. The original training data and the original test data of the wind speed of the four intervals are summed, and the summed original training data is used as output to train the Bagging model. The trained model is used to predict the summed test prediction sequence to obtain the integrated test prediction data, and the trained Bagging model is the final prediction model;

[0131] The present application first uses the gray image construction technology to intuitively show the internal characteristics of meteorological features and wind speed data. Then, through in-depth analysis of wind speed uncertainty, improved quadratic threshold segmentation is used to divide the wind speed gray image into four numerical intervals. The regularity of wind speed in four non-continuous periods is characterized, and the wind speed image of the four intervals is taken as the target prediction image. Subsequently, the deep mapping relationship between the input image and the target image is accurately extracted through the conditional generative adversarial network (CGAN), and the mapping image is unfolded into time series data, and the bidirectional gate recurrent unit (BiGRU) is used for efficient training, so as to obtain the wind speed prediction model for each numerical interval. Finally, the models of each interval are integrated by Bagging ensemble learning to construct the final wind speed prediction model. Through the time series threshold quadratic segmentation method, the accuracy of wind speed prediction is improved, and the accuracy of numerical weather prediction is enhanced.

[0132] When predicting short-term and medium-long-term wind speed, the present application constructs wind speed gray images with different degrees of fineness as input. Since the quadratic threshold segmentation can convert uncertain features into regular features, and the CGAN (conditional generative adversarial network) can handle a large number of image samples, and the BiGRU (bidirectional gate recurrent unit) can learn long time series data sufficiently, therefore, both short-term wind speed sequence and medium-long-term wind speed sequence can be effectively predicted. There will be no underfitting or large prediction deviation of later data due to large data sample size and long time span of medium-long-term wind speed.

[0133] Among them, the four performance indicators used by the method are mean absolute error (MAE), mean absolute percentage error (MAPE), root mean square error (RMSE), and mean square error (MSE); the mean absolute error (MAE) of the prediction model is evaluated in the test sample as follows:

[0134]

[0135] The mean absolute percentage error (MAPE) of the prediction model is evaluated in the test sample as follows:

[0136]

[0137] The root mean square error (RMSE) of the prediction model is evaluated in the test sample as follows:

[0138]

[0139] The mean square error (MSE) of the prediction model is evaluated in the test sample as follows:

[0140]

[0141] Where n represents the number of samples, y i represents the true value, represents the predicted value, represents the average value of the true value.

[0142] MAE, MAPE, RMSE and MSE represent the prediction error of the prediction model, that is, the difference between the predicted value and the actual value, and the smaller the value, the smaller the prediction error of the model, and the higher the prediction accuracy of the model.

[0143] Referring to Figure 17 , the embodiment of the application provides a wind speed prediction device based on time series threshold segmentation, characterized in that the device comprises:

[0144] A first module is configured to obtain weather forecast values, and construct gray scale images of meteorological feature data and target wind speed data, respectively.

[0145] A second module is configured to perform a secondary threshold segmentation operation based on the target wind speed data gray scale image to obtain a wind speed gray scale image of four numerical value intervals, so as to represent regular wind speed sequences of four non-continuous time periods.

[0146] A third module is configured to perform feature correlation analysis according to meteorological feature sequence data and target wind speed sequence data to obtain influence values of each meteorological feature and target wind speed.

[0147] A fourth module is configured to perform randomness screening on the meteorological feature data based on the influence value, and construct at least one feature matrix, and take the corresponding meteorological feature grayscale image as prediction model input data.

[0148] A fifth module is configured to obtain a mapping relationship image of input images and output images based on the input data and the wind speed grayscale images of the four numerical value intervals, and perform target wind speed sequence prediction and integration comparison on the four numerical value intervals after the mapping relationship image is unfolded into time sequence data.

[0149] It can be seen that the content in the above method embodiments is applicable to the device embodiments, the device embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0150] Referring to Figure 18 The embodiment of the application provides a nonlinear signal time-frequency spectrum generation system based on an LSTM, and the system comprises:

[0151] at least one processor;

[0152] at least one memory for storing at least one program;

[0153] When the at least one program is executed by the at least one processor, the at least one processor implements the wind speed prediction method based on time sequence threshold segmentation as any one of the above.

[0154] It can be seen that the content in the above method embodiments is applicable to the system embodiments, the system embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0155] In addition, the embodiment of the application further discloses a computer program product or a computer program, and the computer program product or the computer program is stored in a computer readable storage medium. The processor of the computer equipment can read the computer program from the computer readable storage medium, and the processor executes the computer program, so that the computer equipment executes the above method. Similarly, the content in the above method embodiments is applicable to the storage medium embodiments, the storage medium embodiments specifically implement the same functions as the above method embodiments, and achieve the same beneficial effects as the above method embodiments.

[0156] The apparatus embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, i.e., can be located in one place, or can also be distributed to multiple network units. Part or all of the charging modules can be selected according to actual needs to achieve the purpose of the embodiment.

[0157] Those of ordinary skill in the art understand that all or some of the methods disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As is known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage, or other magnetic storage devices, or any other medium that can be used to store the desired information and that can be accessed by a computer. Furthermore, it is known to those of ordinary skill in the art that communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery medium.

[0158] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that makes a contribution to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and various program storage media.

[0159] The preferred embodiments of the present application are described above with reference to the accompanying drawings, and are not intended to limit the scope of the present application. Any modification, equivalent replacement and improvement made by those skilled in the art without departing from the scope and spirit of the present application shall fall within the scope of the present application.

Claims

1. A wind speed prediction method based on time series threshold segmentation, characterized in that, The method comprises the following steps: Obtain weather forecast values, and construct gray images of meteorological feature data and target wind speed data respectively; Based on the gray image of the target wind speed data, perform a secondary threshold segmentation operation to obtain a wind speed gray image of four numerical intervals, to represent a regular wind speed sequence of four non-continuous time periods; According to the meteorological feature sequence data and the target wind speed sequence data, perform feature correlation analysis to obtain the influence value of each meteorological feature on the target wind speed; Through the influence value, randomly screen the meteorological feature data, construct at least one feature matrix, and take the corresponding meteorological feature gray image as the input data of the prediction model; Based on the input data and the wind speed gray image of the four numerical intervals, obtain the mapping relationship image of the input image and the output image; after expanding the mapping relationship image into time sequence data, perform target wind speed sequence prediction and integration comparison of the four numerical intervals; Before the step of performing a secondary threshold segmentation operation to obtain a wind speed gray image of four numerical intervals, the method comprises the following steps: Based on the improved OTSU algorithm, perform a primary segmentation on the target wind speed data gray image to obtain a wind speed image threshold of the target wind speed data gray image; If the first wind speed value is greater than or equal to the wind speed image threshold, the original value is retained, and the wind speed values less than the wind speed image threshold are assigned a value of 0 to obtain a first wind speed image; If the second wind speed value is less than the wind speed image threshold, the original value is retained, and the wind speed values greater than or equal to the wind speed image threshold are assigned a value of 0 to obtain a second wind speed image; After performing a secondary segmentation on the first wind speed image and the second wind speed image respectively by using the improved OTSU algorithm, a wind speed gray image of four numerical intervals is obtained.

2. The method of claim 1, wherein, The step of randomly screening the meteorological feature data comprises the following steps: Based on the meteorological feature corresponding to the influence value, set a corresponding feature label, and randomly select the feature label whose sum of influence values is a target influence value; wherein the target influence value is the sum of the influence values; Select the feature sequence corresponding to at least one feature label to construct a feature matrix; Compare the prediction accuracy based on at least one feature matrix as input, and take the meteorological feature gray image corresponding to the highest accuracy as input.

3. The method of claim 1, wherein, The step of randomly screening the meteorological feature data further comprises the following steps: Use a decision tree algorithm to train the target wind speed to obtain a wind speed prediction model; Based on the Shap interpretability model, perform interpretability analysis on the wind speed prediction model to obtain the contribution degree of each meteorological feature to the wind speed; Compare the contribution degrees of each meteorological feature to the wind speed to obtain a first contribution degree, and randomly screen the meteorological feature corresponding to the first contribution degree, according to the following formula: ; wherein representing weather features contribution of a model prediction value to the prediction value, is a model prediction value containing weather features and a feature subset is a model prediction value containing only the feature subset.

4. The method of claim 1, wherein, The step of obtaining weather forecast values, and constructing gray images of meteorological feature data and target wind speed data respectively comprises the following steps: Based on the weather forecast values, a meteorological feature is obtained as , a target wind speed sequence is y, and is normalized by logarithmic conversion as follows: ; Based on the normalized sequence, reconstruct a gray image with a size of a×b×c.

5. The method of claim 1, wherein, The step of performing a primary segmentation on the target wind speed data gray image based on the improved OTSU algorithm to obtain a wind speed image threshold of the target wind speed data gray image further comprises the following steps: The original threshold segmentation distinguishes the foreground and the background by the maximum inter-class variance, and the formula is as follows: ; In the formula, w0 is the proportion of the number of foreground pixels in the total image, u0 is the average gray value of the foreground image, w1 is the proportion of the number of background pixels in the total image, and u1 is the average gray value of the background image. The maximum inter-class variance is modified to the maximum inter-class cubic variance, and the improved formula is as follows: ; In the formula, w0 is the proportion of the number of foreground pixels in the total image, u0 is the average gray value of the foreground image, w1 is the proportion of the number of background pixels in the total image, and u1 is the average gray value of the background image.

6. The method of claim 5, wherein, The first wind speed image and the second wind speed image are respectively subjected to secondary segmentation by using the improved OTSU algorithm to obtain four numerical interval wind speed gray images, including: The first wind speed image is subjected to secondary segmentation, that is, the maximum inter-class variance is modified to the maximum inter-class quartic variance, and the improved formula is as follows: ; In the formula, w 10 is the proportion of the number of foreground pixels in the total image, u 10 is the average gray value of the foreground image, w 11 is the proportion of the number of background pixels in the total image, u 11 is the average gray value of the background image; The second wind speed image is subjected to secondary segmentation, that is, the maximum inter-class variance is modified to the maximum inter-class cubic variance, and the improved formula is as follows: ; In the formula, w 20 is the proportion of the number of foreground pixels in the total image, u 20 is the average gray value of the foreground image, w 21 is the proportion of the number of background pixels in the total image, u 21 is the average gray value of the background image.

7. A wind speed prediction system based on time series threshold segmentation, characterized in that, The system comprises: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the wind speed prediction method based on time sequence threshold segmentation according to any one of claims 1-6.

8. A computer readable storage medium having stored therein a program which is executable by a processor, characterized in that, The program executable by the processor, when executed by the processor, is used to perform a wind speed prediction method based on time sequence threshold segmentation according to any one of claims 1-6.

Citation Information

Patent Citations

  • Short-term wind speed prediction method based on gray level co-occurrence matrix

    CN112801332A

  • Wind power plant short-term wind speed prediction method combining VMD and attention mechanism

    CN114912577A